aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod14
-rw-r--r--go.sum431
-rw-r--r--vendor/dmitri.shuralyov.com/gpu/mtl/mtl.go17
-rw-r--r--vendor/dmitri.shuralyov.com/gpu/mtl/mtl.h9
-rw-r--r--vendor/dmitri.shuralyov.com/gpu/mtl/mtl.m3
-rw-r--r--vendor/gioui.org/LICENSE4
-rw-r--r--vendor/gioui.org/app/Gio.java (renamed from vendor/gioui.org/app/internal/window/Gio.java)0
-rw-r--r--vendor/gioui.org/app/GioActivity.java (renamed from vendor/gioui.org/app/internal/window/GioActivity.java)15
-rw-r--r--vendor/gioui.org/app/GioView.java480
-rw-r--r--vendor/gioui.org/app/app.go4
-rw-r--r--vendor/gioui.org/app/app_android.go48
-rw-r--r--vendor/gioui.org/app/d3d11_windows.go135
-rw-r--r--vendor/gioui.org/app/datadir.go1
-rw-r--r--vendor/gioui.org/app/datadir_android.go41
-rw-r--r--vendor/gioui.org/app/egl_android.go66
-rw-r--r--vendor/gioui.org/app/egl_wayland.go (renamed from vendor/gioui.org/app/internal/window/egl_wayland.go)43
-rw-r--r--vendor/gioui.org/app/egl_windows.go (renamed from vendor/gioui.org/app/internal/window/egl_windows.go)27
-rw-r--r--vendor/gioui.org/app/egl_x11.go59
-rw-r--r--vendor/gioui.org/app/framework_ios.h (renamed from vendor/gioui.org/app/internal/window/framework_ios.h)0
-rw-r--r--vendor/gioui.org/app/gl_ios.go (renamed from vendor/gioui.org/app/internal/window/gl_ios.go)93
-rw-r--r--vendor/gioui.org/app/gl_ios.m (renamed from vendor/gioui.org/app/internal/window/gl_ios.m)6
-rw-r--r--vendor/gioui.org/app/gl_js.go69
-rw-r--r--vendor/gioui.org/app/gl_macos.go121
-rw-r--r--vendor/gioui.org/app/gl_macos.m74
-rw-r--r--vendor/gioui.org/app/internal/d3d11/backend_windows.go856
-rw-r--r--vendor/gioui.org/app/internal/glimpl/gl.go541
-rw-r--r--vendor/gioui.org/app/internal/glimpl/gl_js.go339
-rw-r--r--vendor/gioui.org/app/internal/glimpl/gl_windows.go406
-rw-r--r--vendor/gioui.org/app/internal/log/log_android.go24
-rw-r--r--vendor/gioui.org/app/internal/log/log_ios.go9
-rw-r--r--vendor/gioui.org/app/internal/log/log_ios.m11
-rw-r--r--vendor/gioui.org/app/internal/srgb/srgb.go195
-rw-r--r--vendor/gioui.org/app/internal/window/GioView.java255
-rw-r--r--vendor/gioui.org/app/internal/window/d3d11_windows.go102
-rw-r--r--vendor/gioui.org/app/internal/window/egl_android.go54
-rw-r--r--vendor/gioui.org/app/internal/window/egl_x11.go50
-rw-r--r--vendor/gioui.org/app/internal/window/gl_js.go98
-rw-r--r--vendor/gioui.org/app/internal/window/gl_macos.go90
-rw-r--r--vendor/gioui.org/app/internal/window/gl_macos.m143
-rw-r--r--vendor/gioui.org/app/internal/window/os_android.c96
-rw-r--r--vendor/gioui.org/app/internal/window/os_android.go684
-rw-r--r--vendor/gioui.org/app/internal/window/os_darwin.m22
-rw-r--r--vendor/gioui.org/app/internal/window/os_macos.go460
-rw-r--r--vendor/gioui.org/app/internal/window/os_unix.go39
-rw-r--r--vendor/gioui.org/app/internal/window/window.go102
-rw-r--r--vendor/gioui.org/app/internal/windows/windows.go157
-rw-r--r--vendor/gioui.org/app/internal/xkb/xkb_unix.go15
-rw-r--r--vendor/gioui.org/app/loop.go157
-rw-r--r--vendor/gioui.org/app/metal_darwin.go172
-rw-r--r--vendor/gioui.org/app/metal_ios.go48
-rw-r--r--vendor/gioui.org/app/metal_macos.go49
-rw-r--r--vendor/gioui.org/app/os.go220
-rw-r--r--vendor/gioui.org/app/os_android.go1283
-rw-r--r--vendor/gioui.org/app/os_darwin.go (renamed from vendor/gioui.org/app/internal/window/os_darwin.go)76
-rw-r--r--vendor/gioui.org/app/os_darwin.m12
-rw-r--r--vendor/gioui.org/app/os_ios.go (renamed from vendor/gioui.org/app/internal/window/os_ios.go)162
-rw-r--r--vendor/gioui.org/app/os_ios.m (renamed from vendor/gioui.org/app/internal/window/os_ios.m)90
-rw-r--r--vendor/gioui.org/app/os_js.go (renamed from vendor/gioui.org/app/internal/window/os_js.go)342
-rw-r--r--vendor/gioui.org/app/os_macos.go663
-rw-r--r--vendor/gioui.org/app/os_macos.m (renamed from vendor/gioui.org/app/internal/window/os_macos.m)191
-rw-r--r--vendor/gioui.org/app/os_unix.go50
-rw-r--r--vendor/gioui.org/app/os_wayland.c (renamed from vendor/gioui.org/app/internal/window/os_wayland.c)4
-rw-r--r--vendor/gioui.org/app/os_wayland.go (renamed from vendor/gioui.org/app/internal/window/os_wayland.go)328
-rw-r--r--vendor/gioui.org/app/os_windows.go (renamed from vendor/gioui.org/app/internal/window/os_windows.go)486
-rw-r--r--vendor/gioui.org/app/os_x11.go (renamed from vendor/gioui.org/app/internal/window/os_x11.go)420
-rw-r--r--vendor/gioui.org/app/runmain.go (renamed from vendor/gioui.org/app/internal/window/runmain.go)3
-rw-r--r--vendor/gioui.org/app/sigpipe_darwin.go18
-rw-r--r--vendor/gioui.org/app/vulkan.go210
-rw-r--r--vendor/gioui.org/app/vulkan_android.go90
-rw-r--r--vendor/gioui.org/app/vulkan_wayland.go81
-rw-r--r--vendor/gioui.org/app/vulkan_x11.go81
-rw-r--r--vendor/gioui.org/app/wayland_text_input.c (renamed from vendor/gioui.org/app/internal/window/wayland_text_input.c)40
-rw-r--r--vendor/gioui.org/app/wayland_text_input.h (renamed from vendor/gioui.org/app/internal/window/wayland_text_input.h)21
-rw-r--r--vendor/gioui.org/app/wayland_xdg_decoration.c (renamed from vendor/gioui.org/app/internal/window/wayland_xdg_decoration.c)20
-rw-r--r--vendor/gioui.org/app/wayland_xdg_decoration.h (renamed from vendor/gioui.org/app/internal/window/wayland_xdg_decoration.h)12
-rw-r--r--vendor/gioui.org/app/wayland_xdg_shell.c185
-rw-r--r--vendor/gioui.org/app/wayland_xdg_shell.h (renamed from vendor/gioui.org/app/internal/window/wayland_xdg_shell.h)191
-rw-r--r--vendor/gioui.org/app/window.go734
-rw-r--r--vendor/gioui.org/cpu/LICENSE63
-rw-r--r--vendor/gioui.org/cpu/README.md25
-rw-r--r--vendor/gioui.org/cpu/abi.h91
-rw-r--r--vendor/gioui.org/cpu/driver.go86
-rw-r--r--vendor/gioui.org/cpu/driver_nosupport.go64
-rw-r--r--vendor/gioui.org/cpu/embed.go11
-rw-r--r--vendor/gioui.org/cpu/go.mod3
-rw-r--r--vendor/gioui.org/cpu/go.sum0
-rw-r--r--vendor/gioui.org/cpu/init.sh23
-rw-r--r--vendor/gioui.org/cpu/runtime.c245
-rw-r--r--vendor/gioui.org/cpu/runtime.h45
-rw-r--r--vendor/gioui.org/f32/affine.go79
-rw-r--r--vendor/gioui.org/f32/f32.go20
-rw-r--r--vendor/gioui.org/font/opentype/opentype.go196
-rw-r--r--vendor/gioui.org/gesture/gesture.go101
-rw-r--r--vendor/gioui.org/gpu/api.go40
-rw-r--r--vendor/gioui.org/gpu/backend/backend.go204
-rw-r--r--vendor/gioui.org/gpu/caches.go17
-rw-r--r--vendor/gioui.org/gpu/clip.go24
-rw-r--r--vendor/gioui.org/gpu/compute.go2219
-rw-r--r--vendor/gioui.org/gpu/cpu.go129
-rw-r--r--vendor/gioui.org/gpu/gen.go5
-rw-r--r--vendor/gioui.org/gpu/gl/backend.go835
-rw-r--r--vendor/gioui.org/gpu/gl/types.go27
-rw-r--r--vendor/gioui.org/gpu/gl/types_js.go29
-rw-r--r--vendor/gioui.org/gpu/gpu.go1131
-rw-r--r--vendor/gioui.org/gpu/internal/d3d11/d3d11.go5
-rw-r--r--vendor/gioui.org/gpu/internal/d3d11/d3d11_windows.go859
-rw-r--r--vendor/gioui.org/gpu/internal/driver/api.go127
-rw-r--r--vendor/gioui.org/gpu/internal/driver/driver.go237
-rw-r--r--vendor/gioui.org/gpu/internal/metal/metal.go5
-rw-r--r--vendor/gioui.org/gpu/internal/metal/metal_darwin.go1141
-rw-r--r--vendor/gioui.org/gpu/internal/opengl/opengl.go1357
-rw-r--r--vendor/gioui.org/gpu/internal/opengl/srgb.go176
-rw-r--r--vendor/gioui.org/gpu/internal/vulkan/vulkan.go1121
-rw-r--r--vendor/gioui.org/gpu/internal/vulkan/vulkan_nosupport.go5
-rw-r--r--vendor/gioui.org/gpu/pack.go86
-rw-r--r--vendor/gioui.org/gpu/path.go254
-rw-r--r--vendor/gioui.org/gpu/shaders.go657
-rw-r--r--vendor/gioui.org/gpu/timer.go12
-rw-r--r--vendor/gioui.org/internal/byteslice/byteslice.go45
-rw-r--r--vendor/gioui.org/internal/cocoainit/cocoa_darwin.go (renamed from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go)0
-rw-r--r--vendor/gioui.org/internal/d3d11/d3d11_windows.go (renamed from vendor/gioui.org/app/internal/d3d11/d3d11_windows.go)910
-rw-r--r--vendor/gioui.org/internal/egl/egl.go (renamed from vendor/gioui.org/app/internal/egl/egl.go)74
-rw-r--r--vendor/gioui.org/internal/egl/egl_unix.go (renamed from vendor/gioui.org/app/internal/egl/egl_unix.go)7
-rw-r--r--vendor/gioui.org/internal/egl/egl_windows.go (renamed from vendor/gioui.org/app/internal/egl/egl_windows.go)13
-rw-r--r--vendor/gioui.org/internal/f32color/rgba.go128
-rw-r--r--vendor/gioui.org/internal/gl/gl.go (renamed from vendor/gioui.org/gpu/gl/gl.go)115
-rw-r--r--vendor/gioui.org/internal/gl/gl_js.go458
-rw-r--r--vendor/gioui.org/internal/gl/gl_unix.go1222
-rw-r--r--vendor/gioui.org/internal/gl/gl_windows.go502
-rw-r--r--vendor/gioui.org/internal/gl/types.go77
-rw-r--r--vendor/gioui.org/internal/gl/types_js.go90
-rw-r--r--vendor/gioui.org/internal/gl/util.go (renamed from vendor/gioui.org/gpu/gl/util.go)34
-rw-r--r--vendor/gioui.org/internal/opconst/ops.go84
-rw-r--r--vendor/gioui.org/internal/ops/ops.go471
-rw-r--r--vendor/gioui.org/internal/ops/reader.go121
-rw-r--r--vendor/gioui.org/internal/scene/scene.go251
-rw-r--r--vendor/gioui.org/internal/stroke/stroke.go742
-rw-r--r--vendor/gioui.org/internal/unsafe/unsafe.go46
-rw-r--r--vendor/gioui.org/internal/vk/vulkan.go2081
-rw-r--r--vendor/gioui.org/internal/vk/vulkan_android.go45
-rw-r--r--vendor/gioui.org/internal/vk/vulkan_wayland.go46
-rw-r--r--vendor/gioui.org/internal/vk/vulkan_x11.go46
-rw-r--r--vendor/gioui.org/io/clipboard/clipboard.go37
-rw-r--r--vendor/gioui.org/io/key/key.go105
-rw-r--r--vendor/gioui.org/io/key/mod.go1
-rw-r--r--vendor/gioui.org/io/pointer/doc.go64
-rw-r--r--vendor/gioui.org/io/pointer/pointer.go184
-rw-r--r--vendor/gioui.org/io/profile/profile.go6
-rw-r--r--vendor/gioui.org/io/router/clipboard.go57
-rw-r--r--vendor/gioui.org/io/router/key.go157
-rw-r--r--vendor/gioui.org/io/router/pointer.go830
-rw-r--r--vendor/gioui.org/io/router/router.go270
-rw-r--r--vendor/gioui.org/io/semantic/semantic.go93
-rw-r--r--vendor/gioui.org/io/system/system.go43
-rw-r--r--vendor/gioui.org/io/transfer/transfer.go109
-rw-r--r--vendor/gioui.org/layout/context.go20
-rw-r--r--vendor/gioui.org/layout/doc.go2
-rw-r--r--vendor/gioui.org/layout/flex.go106
-rw-r--r--vendor/gioui.org/layout/layout.go126
-rw-r--r--vendor/gioui.org/layout/list.go139
-rw-r--r--vendor/gioui.org/layout/stack.go18
-rw-r--r--vendor/gioui.org/op/clip/clip.go464
-rw-r--r--vendor/gioui.org/op/clip/doc.go16
-rw-r--r--vendor/gioui.org/op/clip/shapes.go185
-rw-r--r--vendor/gioui.org/op/op.go242
-rw-r--r--vendor/gioui.org/op/paint/doc.go9
-rw-r--r--vendor/gioui.org/op/paint/paint.go104
-rw-r--r--vendor/gioui.org/shader/LICENSE63
-rw-r--r--vendor/gioui.org/shader/README.md18
-rw-r--r--vendor/gioui.org/shader/gio/blit.frag15
-rw-r--r--vendor/gioui.org/shader/gio/blit.vert27
-rw-r--r--vendor/gioui.org/shader/gio/common.h35
-rw-r--r--vendor/gioui.org/shader/gio/copy.frag24
-rw-r--r--vendor/gioui.org/shader/gio/copy.vert26
-rw-r--r--vendor/gioui.org/shader/gio/cover.frag20
-rw-r--r--vendor/gioui.org/shader/gio/cover.vert31
-rw-r--r--vendor/gioui.org/shader/gio/gen.go5
-rw-r--r--vendor/gioui.org/shader/gio/input.vert15
-rw-r--r--vendor/gioui.org/shader/gio/intersect.frag15
-rw-r--r--vendor/gioui.org/shader/gio/intersect.vert26
-rw-r--r--vendor/gioui.org/shader/gio/material.frag32
-rw-r--r--vendor/gioui.org/shader/gio/material.vert25
-rw-r--r--vendor/gioui.org/shader/gio/shaders.go796
-rw-r--r--vendor/gioui.org/shader/gio/simple.frag11
-rw-r--r--vendor/gioui.org/shader/gio/stencil.frag81
-rw-r--r--vendor/gioui.org/shader/gio/stencil.vert57
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.dxbcbin0 -> 628 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.glsl100es18
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.glsl15017
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.metallibiosbin0 -> 2679 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.metallibiossimulatorbin0 -> 3057 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.metallibmacosbin0 -> 2695 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.0.spirvbin0 -> 624 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.dxbcbin0 -> 848 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.glsl100es19
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.glsl15018
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.metallibiosbin0 -> 2935 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.metallibiossimulatorbin0 -> 3361 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.metallibmacosbin0 -> 2951 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.1.spirvbin0 -> 964 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.dxbcbin0 -> 660 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.glsl100es13
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.glsl15012
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.metallibiosbin0 -> 2711 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.metallibiossimulatorbin0 -> 3121 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.metallibmacosbin0 -> 2775 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.frag.2.spirvbin0 -> 596 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.dxbcbin0 -> 1184 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.glsl100es37
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.glsl15037
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.metallibiosbin0 -> 3044 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.metallibiossimulatorbin0 -> 3438 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.metallibmacosbin0 -> 3092 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zblit.vert.0.spirvbin0 -> 1600 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.dxbcbin0 -> 1256 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.glsl100es27
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.glsl15026
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.metallibiosbin0 -> 2951 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.metallibiossimulatorbin0 -> 3361 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.metallibmacosbin0 -> 2999 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.frag.0.spirvbin0 -> 1252 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.dxbcbin0 -> 1056 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.glsl100es35
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.glsl15035
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.metallibiosbin0 -> 3028 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.metallibiossimulatorbin0 -> 3438 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.metallibmacosbin0 -> 3060 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcopy.vert.0.spirvbin0 -> 1304 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.dxbcbin0 -> 932 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.glsl100es23
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.glsl15022
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.metallibiosbin0 -> 3191 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.metallibiossimulatorbin0 -> 3665 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.metallibmacosbin0 -> 3207 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.0.spirvbin0 -> 1092 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.dxbcbin0 -> 1152 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.glsl100es24
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.glsl15023
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.metallibiosbin0 -> 3367 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.metallibiossimulatorbin0 -> 3921 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.metallibmacosbin0 -> 3367 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.1.spirvbin0 -> 1416 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.dxbcbin0 -> 984 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.glsl100es17
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.glsl15016
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.metallibiosbin0 -> 2967 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.metallibiossimulatorbin0 -> 3441 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.metallibmacosbin0 -> 3015 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.frag.2.spirvbin0 -> 1000 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.dxbcbin0 -> 1332 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.glsl100es41
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.glsl15041
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.metallibiosbin0 -> 3156 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.metallibiossimulatorbin0 -> 3598 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.metallibmacosbin0 -> 3204 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zcover.vert.0.spirvbin0 -> 1972 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.dxbcbin0 -> 588 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.glsl100es22
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.glsl15022
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.metallibiosbin0 -> 2579 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.metallibiossimulatorbin0 -> 2989 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.metallibmacosbin0 -> 2627 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zinput.vert.0.spirvbin0 -> 800 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.dxbcbin0 -> 776 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.glsl100es13
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.glsl15012
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.metallibiosbin0 -> 2791 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.metallibiossimulatorbin0 -> 3233 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.metallibmacosbin0 -> 2823 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.frag.0.spirvbin0 -> 736 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.dxbcbin0 -> 1048 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.glsl100es35
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.glsl15035
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.metallibiosbin0 -> 2964 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.metallibiossimulatorbin0 -> 3358 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.metallibmacosbin0 -> 3012 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zintersect.vert.0.spirvbin0 -> 1368 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.dxbcbin0 -> 1476 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl100es37
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl15036
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibiosbin0 -> 3367 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibiossimulatorbin0 -> 3761 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibmacosbin0 -> 3383 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.frag.0.spirvbin0 -> 1624 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.dxbcbin0 -> 1000 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl100es34
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl15034
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibiosbin0 -> 2996 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibiossimulatorbin0 -> 3406 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibmacosbin0 -> 3028 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zmaterial.vert.0.spirvbin0 -> 1188 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.dxbcbin0 -> 476 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.glsl100es9
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.glsl1509
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.metallibiosbin0 -> 2359 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.metallibiossimulatorbin0 -> 2721 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.metallibmacosbin0 -> 2391 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zsimple.frag.0.spirvbin0 -> 396 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.dxbcbin0 -> 2652 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.glsl100es38
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.glsl15037
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.metallibiosbin0 -> 3159 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.metallibiossimulatorbin0 -> 3713 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.metallibmacosbin0 -> 3175 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.frag.0.spirvbin0 -> 2868 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.dxbcbin0 -> 2120 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.glsl100es64
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.glsl15064
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.metallibiosbin0 -> 3535 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.metallibiossimulatorbin0 -> 4041 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.metallibmacosbin0 -> 3567 bytes
-rw-r--r--vendor/gioui.org/shader/gio/zstencil.vert.0.spirvbin0 -> 2724 bytes
-rw-r--r--vendor/gioui.org/shader/go.mod5
-rw-r--r--vendor/gioui.org/shader/go.sum2
-rw-r--r--vendor/gioui.org/shader/piet/abi.h91
-rw-r--r--vendor/gioui.org/shader/piet/annotated.h225
-rw-r--r--vendor/gioui.org/shader/piet/backdrop.comp109
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_abi.go35
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_abi.h17
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_abi_nosupport.go22
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_linux_amd64.sysobin0 -> 16384 bytes
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_linux_arm.sysobin0 -> 12248 bytes
-rw-r--r--vendor/gioui.org/shader/piet/backdrop_linux_arm64.sysobin0 -> 9432 bytes
-rw-r--r--vendor/gioui.org/shader/piet/binning.comp148
-rw-r--r--vendor/gioui.org/shader/piet/binning_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/binning_abi.go35
-rw-r--r--vendor/gioui.org/shader/piet/binning_abi.h17
-rw-r--r--vendor/gioui.org/shader/piet/binning_abi_nosupport.go22
-rw-r--r--vendor/gioui.org/shader/piet/binning_linux_amd64.sysobin0 -> 19976 bytes
-rw-r--r--vendor/gioui.org/shader/piet/binning_linux_arm.sysobin0 -> 15688 bytes
-rw-r--r--vendor/gioui.org/shader/piet/binning_linux_arm64.sysobin0 -> 11096 bytes
-rw-r--r--vendor/gioui.org/shader/piet/bins.h31
-rw-r--r--vendor/gioui.org/shader/piet/coarse.comp426
-rw-r--r--vendor/gioui.org/shader/piet/coarse_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/coarse_abi.go35
-rw-r--r--vendor/gioui.org/shader/piet/coarse_abi.h17
-rw-r--r--vendor/gioui.org/shader/piet/coarse_abi_nosupport.go22
-rw-r--r--vendor/gioui.org/shader/piet/coarse_linux_amd64.sysobin0 -> 64736 bytes
-rw-r--r--vendor/gioui.org/shader/piet/coarse_linux_arm.sysobin0 -> 50164 bytes
-rw-r--r--vendor/gioui.org/shader/piet/coarse_linux_arm64.sysobin0 -> 35544 bytes
-rw-r--r--vendor/gioui.org/shader/piet/elements.comp413
-rw-r--r--vendor/gioui.org/shader/piet/elements_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/elements_abi.go43
-rw-r--r--vendor/gioui.org/shader/piet/elements_abi.h19
-rw-r--r--vendor/gioui.org/shader/piet/elements_abi_nosupport.go30
-rw-r--r--vendor/gioui.org/shader/piet/elements_linux_amd64.sysobin0 -> 157712 bytes
-rw-r--r--vendor/gioui.org/shader/piet/elements_linux_arm.sysobin0 -> 143196 bytes
-rw-r--r--vendor/gioui.org/shader/piet/elements_linux_arm64.sysobin0 -> 96456 bytes
-rw-r--r--vendor/gioui.org/shader/piet/gen.go5
-rw-r--r--vendor/gioui.org/shader/piet/gencpu.sh44
-rw-r--r--vendor/gioui.org/shader/piet/kernel4.comp248
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_abi.go43
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_abi.h19
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_abi_nosupport.go30
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_linux_amd64.sysobin0 -> 44120 bytes
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_linux_arm.sysobin0 -> 28548 bytes
-rw-r--r--vendor/gioui.org/shader/piet/kernel4_linux_arm64.sysobin0 -> 23312 bytes
-rw-r--r--vendor/gioui.org/shader/piet/mem.h147
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse.comp294
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_abi.go35
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_abi.h17
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_abi_nosupport.go22
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_linux_amd64.sysobin0 -> 26320 bytes
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_linux_arm.sysobin0 -> 16308 bytes
-rw-r--r--vendor/gioui.org/shader/piet/path_coarse_linux_arm64.sysobin0 -> 12392 bytes
-rw-r--r--vendor/gioui.org/shader/piet/pathseg.h100
-rw-r--r--vendor/gioui.org/shader/piet/ptcl.h278
-rw-r--r--vendor/gioui.org/shader/piet/runtime.h45
-rw-r--r--vendor/gioui.org/shader/piet/scene.h313
-rw-r--r--vendor/gioui.org/shader/piet/setup.h51
-rw-r--r--vendor/gioui.org/shader/piet/shaders.go268
-rw-r--r--vendor/gioui.org/shader/piet/state.h73
-rw-r--r--vendor/gioui.org/shader/piet/support.c27
-rw-r--r--vendor/gioui.org/shader/piet/tile.h150
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc.comp108
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_abi.c23
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_abi.go35
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_abi.h17
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_abi_nosupport.go22
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_linux_amd64.sysobin0 -> 20864 bytes
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_linux_arm.sysobin0 -> 15652 bytes
-rw-r--r--vendor/gioui.org/shader/piet/tile_alloc_linux_arm64.sysobin0 -> 10856 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbackdrop.comp.0.dxbcbin0 -> 3312 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibiosbin0 -> 4407 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibiossimulatorbin0 -> 4977 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibmacosbin0 -> 4407 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbackdrop.comp.0.spirvbin0 -> 5188 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbinning.comp.0.dxbcbin0 -> 4164 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbinning.comp.0.metallibiosbin0 -> 5319 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbinning.comp.0.metallibiossimulatorbin0 -> 6209 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbinning.comp.0.metallibmacosbin0 -> 5351 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zbinning.comp.0.spirvbin0 -> 6924 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zcoarse.comp.0.dxbcbin0 -> 17824 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibiosbin0 -> 9783 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibiossimulatorbin0 -> 10913 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibmacosbin0 -> 9783 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zcoarse.comp.0.spirvbin0 -> 23204 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zelements.comp.0.dxbcbin0 -> 59800 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zelements.comp.0.metallibiosbin0 -> 24263 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zelements.comp.0.metallibiossimulatorbin0 -> 26033 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zelements.comp.0.metallibmacosbin0 -> 23575 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zelements.comp.0.spirvbin0 -> 67752 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zkernel4.comp.0.dxbcbin0 -> 42832 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibiosbin0 -> 8199 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibiossimulatorbin0 -> 9201 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibmacosbin0 -> 8167 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zkernel4.comp.0.spirvbin0 -> 15320 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zpath_coarse.comp.0.dxbcbin0 -> 12712 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibiosbin0 -> 8247 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibiossimulatorbin0 -> 9649 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibmacosbin0 -> 8119 bytes
-rw-r--r--vendor/gioui.org/shader/piet/zpath_coarse.comp.0.spirvbin0 -> 16276 bytes
-rw-r--r--vendor/gioui.org/shader/piet/ztile_alloc.comp.0.dxbcbin0 -> 3476 bytes
-rw-r--r--vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibiosbin0 -> 4967 bytes
-rw-r--r--vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibiossimulatorbin0 -> 5745 bytes
-rw-r--r--vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibmacosbin0 -> 4919 bytes
-rw-r--r--vendor/gioui.org/shader/piet/ztile_alloc.comp.0.spirvbin0 -> 6004 bytes
-rw-r--r--vendor/gioui.org/shader/shader.go65
-rw-r--r--vendor/gioui.org/text/lru.go10
-rw-r--r--vendor/gioui.org/text/shaper.go95
-rw-r--r--vendor/gioui.org/text/text.go91
-rw-r--r--vendor/github.com/BurntSushi/xgb/README7
-rw-r--r--vendor/github.com/BurntSushi/xgb/conn.go3
-rw-r--r--vendor/github.com/aarzilli/nucular/font/font_gio.go5
-rw-r--r--vendor/github.com/aarzilli/nucular/gio.go253
-rw-r--r--vendor/github.com/aarzilli/nucular/go.mod6
-rw-r--r--vendor/github.com/aarzilli/nucular/go.sum14
-rw-r--r--vendor/github.com/aarzilli/nucular/masterwindow.go1
-rw-r--r--vendor/github.com/aarzilli/nucular/nucular.go18
-rw-r--r--vendor/github.com/aarzilli/nucular/shiny.go68
-rw-r--r--vendor/github.com/aarzilli/nucular/text.go6
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/GLFW_C_REVISION.txt2
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/build.go22
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/build_cgo_hack.go18
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_bsd.go29
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_lin.go (renamed from vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_linbsd.go)9
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go10
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/LICENSE.md23
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/dummy.go11
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.c230
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.h57
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/dummy.go4
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/gl.h3840
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/khrplatform.h282
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vk_platform.h92
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vulkan.h3480
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_gl.c1791
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_vulkan.c593
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/linmath.h574
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/_mingw_dxhelper.h117
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dinput.h2467
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dummy.go4
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/xinput.h239
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear.h25539
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear_glfw_gl2.h381
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/stb_image_write.h1048
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.c594
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.h443
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/dummy.go4
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/stdint.h247
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/dummy.go4
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3.h5909
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3native.h594
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_init.m623
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.h51
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.m487
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_monitor.m631
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_platform.h209
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_time.c62
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_window.m1848
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/context.c756
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/dummy.go4
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.c790
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.h215
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.c699
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.h179
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/init.c326
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/input.c1367
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/internal.h780
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.c433
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.h63
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/mappings.h1001
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/monitor.c542
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.h64
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.m376
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_init.c52
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.c44
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.h31
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_monitor.c77
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_platform.h62
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_window.c332
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.c384
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.h92
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.c105
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.h49
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.c87
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.h43
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/vulkan.c332
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c68
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.h236
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c108
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.h658
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c79
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.h301
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.c74
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.h414
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-client-protocol.h382
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-unstable-v1-client-protocol.c75
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.c (renamed from vendor/gioui.org/app/internal/window/wayland_xdg_shell.c)105
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.h2007
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.c798
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.h158
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_init.c623
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.c755
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.h57
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_monitor.c548
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_platform.h452
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_thread.c99
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_time.c60
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_window.c2295
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/window.c1104
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_init.c1327
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_monitor.c231
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_platform.h355
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_window.c1903
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_init.c1211
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_monitor.c614
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_platform.h447
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_window.c3194
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.c942
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.h28
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw_tree_rebuild.go10
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/native_linbsd.go2
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/util.go19
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/vulkan.go74
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/window.go22
-rw-r--r--vendor/github.com/golang/freetype/truetype/truetype.go30
-rw-r--r--vendor/github.com/hashicorp/golang-lru/2q.go21
-rw-r--r--vendor/github.com/hashicorp/golang-lru/arc.go16
-rw-r--r--vendor/github.com/hashicorp/golang-lru/doc.go21
-rw-r--r--vendor/github.com/hashicorp/golang-lru/go.mod3
-rw-r--r--vendor/github.com/hashicorp/golang-lru/lru.go106
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru.go33
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go39
-rw-r--r--vendor/golang.org/x/crypto/ed25519/ed25519.go1
-rw-r--r--vendor/golang.org/x/crypto/ed25519/ed25519_go113.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/driver_darwin.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/driver_fallback.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/driver_x11.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.go5
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.m1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/context.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/other.go3
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/win32.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/x11.c2
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/gldriver/x11.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/internal/swizzle/swizzle_other.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/internal/win32/key.go5
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/internal/win32/win32.go8
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/buffer.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.go13
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.h4
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.m2
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.go13
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.h3
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.m2
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/mtldriver.go15
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/screen.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/texture.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver/window.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/mtldriver_darwin.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/buffer.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/other.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/screen.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/texture.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/window.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/windraw.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/windriver/windriver.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/buffer.go5
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/buffer_fallback.go123
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/screen.go22
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/shm_linux_ipc.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/shm_openbsd_syscall.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/shm_other.go5
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/shm_shmopen_syscall.go1
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/texture.go2
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/window.go2
-rw-r--r--vendor/golang.org/x/exp/shiny/driver/x11driver/x11driver.go6
-rw-r--r--vendor/golang.org/x/image/draw/draw_go117.go27
-rw-r--r--vendor/golang.org/x/image/font/sfnt/postscript.go12
-rw-r--r--vendor/golang.org/x/image/font/sfnt/sfnt.go235
-rw-r--r--vendor/golang.org/x/image/font/sfnt/truetype.go24
-rw-r--r--vendor/golang.org/x/mobile/gl/gl.go13
-rw-r--r--vendor/golang.org/x/mobile/gl/gldebug.go1
-rw-r--r--vendor/golang.org/x/mobile/gl/types_debug.go1
-rw-r--r--vendor/golang.org/x/mobile/gl/types_prod.go1
-rw-r--r--vendor/golang.org/x/mobile/gl/work.c3
-rw-r--r--vendor/golang.org/x/mobile/gl/work.go31
-rw-r--r--vendor/golang.org/x/mobile/gl/work.h2
-rw-r--r--vendor/golang.org/x/mobile/gl/work_other.go1
-rw-r--r--vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go30
-rw-r--r--vendor/golang.org/x/sys/unix/README.md21
-rw-r--r--vendor/golang.org/x/sys/unix/aliases.go3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_aix_ppc64.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_386.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_386.s)12
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_amd64.s (renamed from vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_arm.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_arm.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_arm64.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm.s30
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm64.s30
-rw-r--r--vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_386.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_amd64.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_arm.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_arm64.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_mips64x.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_mipsx.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_riscv64.s4
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_s390x.s5
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_arm.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s (renamed from vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s)5
-rw-r--r--vendor/golang.org/x/sys/unix/asm_solaris_amd64.s3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_zos_s390x.s426
-rw-r--r--vendor/golang.org/x/sys/unix/cap_freebsd.go1
-rw-r--r--vendor/golang.org/x/sys/unix/constants.go3
-rw-r--r--vendor/golang.org/x/sys/unix/dev_aix_ppc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/dev_aix_ppc64.go4
-rw-r--r--vendor/golang.org/x/sys/unix/dev_zos.go29
-rw-r--r--vendor/golang.org/x/sys/unix/dirent.go1
-rw-r--r--vendor/golang.org/x/sys/unix/endian_big.go3
-rw-r--r--vendor/golang.org/x/sys/unix/endian_little.go3
-rw-r--r--vendor/golang.org/x/sys/unix/env_unix.go3
-rw-r--r--vendor/golang.org/x/sys/unix/epoll_zos.go221
-rw-r--r--vendor/golang.org/x/sys/unix/errors_freebsd_386.go6
-rw-r--r--vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go6
-rw-r--r--vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/fcntl.go1
-rw-r--r--vendor/golang.org/x/sys/unix/fcntl_darwin.go6
-rw-r--r--vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go5
-rw-r--r--vendor/golang.org/x/sys/unix/fdset.go3
-rw-r--r--vendor/golang.org/x/sys/unix/fstatfs_zos.go164
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo.go6
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_c.c6
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/ifreq_linux.go149
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl.go10
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl_linux.go196
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl_zos.go74
-rw-r--r--vendor/golang.org/x/sys/unix/mkall.sh42
-rw-r--r--vendor/golang.org/x/sys/unix/mkerrors.sh95
-rw-r--r--vendor/golang.org/x/sys/unix/pagesize_unix.go1
-rw-r--r--vendor/golang.org/x/sys/unix/ptrace_darwin.go12
-rw-r--r--vendor/golang.org/x/sys/unix/ptrace_ios.go12
-rw-r--r--vendor/golang.org/x/sys/unix/race.go1
-rw-r--r--vendor/golang.org/x/sys/unix/race0.go3
-rw-r--r--vendor/golang.org/x/sys/unix/readdirent_getdents.go1
-rw-r--r--vendor/golang.org/x/sys/unix/readdirent_getdirentries.go1
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_linux.go49
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix.go3
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go13
-rw-r--r--vendor/golang.org/x/sys/unix/str.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall.go46
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix.go57
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix_ppc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_bsd.go69
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go27
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.go269
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go9
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_386.go68
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go9
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go23
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go11
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm.go68
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go11
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go25
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go10
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly.go48
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd.go46
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_386.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_illumos.go186
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go522
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_386.go50
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_amd64.go49
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm.go60
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm64.go62
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gc.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go14
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go36
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go44
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc.go237
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go39
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go52
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_s390x.go43
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go38
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd.go40
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd.go29
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go35
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris.go294
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix.go24
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix_gc.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_zos_s390x.go1823
-rw-r--r--vendor/golang.org/x/sys/unix/sysvshm_linux.go21
-rw-r--r--vendor/golang.org/x/sys/unix/sysvshm_unix.go61
-rw-r--r--vendor/golang.org/x/sys/unix/sysvshm_unix_other.go14
-rw-r--r--vendor/golang.org/x/sys/unix/timestruct.go29
-rw-r--r--vendor/golang.org/x/sys/unix/xattr_bsd.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go3046
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go1784
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go3046
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go139
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go178
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go176
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go43
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go177
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux.go3014
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_386.go3368
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go3368
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm.go3380
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go3358
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips.go3372
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go3372
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go3372
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go3372
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go882
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go3491
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go3491
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go3342
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go3490
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go3469
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go8
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go8
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go (renamed from vendor/golang.org/x/sys/unix/zerrors_darwin_386.go)1663
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go860
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_x86_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go23
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go21
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go24
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go22
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go1811
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go41
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s12
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go2499
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s284
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s19
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go911
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s883
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go1784
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go41
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s12
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go2484
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s282
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s19
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go896
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s881
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go45
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go53
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go33
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go35
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go128
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux.go (renamed from vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go)1409
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_386.go1869
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go1869
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go1869
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go1820
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go1871
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go1848
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go1848
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go1871
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go709
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go1869
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go1869
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go1816
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go1859
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go1858
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go (renamed from vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go)515
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go105
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go1255
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go280
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go436
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go436
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go256
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_386.go14
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go708
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go14
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go597
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go13
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go693
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go693
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go13
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go439
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go791
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go791
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go595
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go721
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go749
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go221
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go2670
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_386.go499
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go291
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go500
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go291
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go51
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go57
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go42
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go30
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go72
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go42
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux.go4045
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_386.go2282
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go2282
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm.go2285
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go2282
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips.go2284
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go2282
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go2282
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go2284
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go678
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go2281
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go2281
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go2282
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go2281
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go2281
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go6
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go6
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go6
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go6
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go17
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go17
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go568
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go73
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go406
-rw-r--r--vendor/golang.org/x/sys/windows/aliases.go4
-rw-r--r--vendor/golang.org/x/sys/windows/dll_windows.go32
-rw-r--r--vendor/golang.org/x/sys/windows/empty.s1
-rw-r--r--vendor/golang.org/x/sys/windows/env_windows.go11
-rw-r--r--vendor/golang.org/x/sys/windows/eventlog.go1
-rw-r--r--vendor/golang.org/x/sys/windows/exec_windows.go81
-rw-r--r--vendor/golang.org/x/sys/windows/memory_windows.go36
-rw-r--r--vendor/golang.org/x/sys/windows/mkerrors.bash7
-rw-r--r--vendor/golang.org/x/sys/windows/mksyscall.go3
-rw-r--r--vendor/golang.org/x/sys/windows/race.go1
-rw-r--r--vendor/golang.org/x/sys/windows/race0.go1
-rw-r--r--vendor/golang.org/x/sys/windows/security_windows.go60
-rw-r--r--vendor/golang.org/x/sys/windows/service.go22
-rw-r--r--vendor/golang.org/x/sys/windows/setupapi_windows.go1425
-rw-r--r--vendor/golang.org/x/sys/windows/str.go1
-rw-r--r--vendor/golang.org/x/sys/windows/syscall.go47
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go339
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows.go1458
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_386.go13
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_amd64.go12
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_arm.go13
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_arm64.go34
-rw-r--r--vendor/golang.org/x/sys/windows/zerrors_windows.go2619
-rw-r--r--vendor/golang.org/x/sys/windows/zsyscall_windows.go5177
-rw-r--r--vendor/golang.org/x/text/encoding/encoding.go2
-rw-r--r--vendor/golang.org/x/text/encoding/internal/identifier/identifier.go2
-rw-r--r--vendor/golang.org/x/text/encoding/internal/identifier/mib.go96
-rw-r--r--vendor/golang.org/x/text/transform/transform.go12
-rw-r--r--vendor/modules.txt73
937 files changed, 167887 insertions, 127313 deletions
diff --git a/go.mod b/go.mod
index be2f271..22fb5b9 100644
--- a/go.mod
+++ b/go.mod
@@ -3,11 +3,19 @@ module noisetorch
go 1.16
require (
- gioui.org v0.0.0-20200630184602-223f8fd40ae4 // indirect
+ gioui.org v0.0.0-20220105104929-8d8aeef66bef // indirect
github.com/BurntSushi/toml v0.4.1
+ github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc // indirect
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046
- github.com/aarzilli/nucular v0.0.0-20200615134801-81910c722bba
+ github.com/aarzilli/nucular v0.0.0-20210408133902-d3dd7b05a80a
+ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211213063430-748e38ca8aec // indirect
+ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
+ github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/lawl/pulseaudio v0.0.0-20210928141934-ed754c0c6618
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
- golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
+ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
+ golang.org/x/exp v0.0.0-20220104160115-025e73f80486 // indirect
+ golang.org/x/image v0.0.0-20211028202545-6944b10bf410 // indirect
+ golang.org/x/mobile v0.0.0-20220104184238-4a8be17bd2e3 // indirect
+ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
)
diff --git a/go.sum b/go.sum
index 762023d..0e9c5f6 100644
--- a/go.sum
+++ b/go.sum
@@ -1,61 +1,492 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037 h1:+PdD6GLKejR9DizMAKT5DpSAkKswvZrurk1/eEt9+pw=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20200417085050-0cfc914d8b7d/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org v0.0.0-20200630184602-223f8fd40ae4 h1:Pgz3ROw4pcpdxs62BRaqt4PbBeRHsW+mf5ee92CKZ0M=
gioui.org v0.0.0-20200630184602-223f8fd40ae4/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
+gioui.org v0.0.0-20210407072325-abd6e8f9cdd4/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
+gioui.org v0.0.0-20220105104929-8d8aeef66bef h1:vjBKFl76dewHkdOnlEt09daV4/E/oHHnMA4rV7eGH+E=
+gioui.org v0.0.0-20220105104929-8d8aeef66bef/go.mod h1:yoWOxPng6WkDpsud+NRmkoftmyWn3rkKsYGEcWHpjTI=
+gioui.org/cpu v0.0.0-20210808092351-bfe733dd3334/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ=
+gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2 h1:AGDDxsJE1RpcXTAxPG2B4jrwVUJGFDjINIPi1jtO6pc=
+gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ=
+gioui.org/shader v1.0.6 h1:cvZmU+eODFR2545X+/8XucgZdTtEjR3QWW6W65b0q5Y=
+gioui.org/shader v1.0.6/go.mod h1:mWdiME581d/kV7/iEhLmUgUK5iZ09XR5XpduXzbePVM=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc h1:7D+Bh06CRPCJO3gr2F7h1sriovOZ8BMhca2Rg85c2nk=
+github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 h1:O/r2Sj+8QcMF7V5IcmiE2sMFV2q3J47BEirxbXJAdzA=
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
+github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
+github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
+github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
+github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/aarzilli/nucular v0.0.0-20200615134801-81910c722bba h1:7OBB0+T/f0gGMdqTwoXF872nDKosq4dIK/H2cRlrnWI=
github.com/aarzilli/nucular v0.0.0-20200615134801-81910c722bba/go.mod h1:TsFEH0qn2Uu3C3guJjfIaoCqgpoCvU+laq0SSK2TOyY=
+github.com/aarzilli/nucular v0.0.0-20210408133902-d3dd7b05a80a h1:wHqsWSIZY+TaNApVMZpMKkcBEUmxXCSpT+YKrk3bxnc=
+github.com/aarzilli/nucular v0.0.0-20210408133902-d3dd7b05a80a/go.mod h1:lluRCgvXjI+vUUV2Jc07GMFCBLVc/GQx8NaUPgXY+R0=
+github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
+github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
+github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
+github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
+github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
+github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
+github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
+github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
+github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
+github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72 h1:b+9H1GAsx5RsjvDFLoS5zkNBzIQMuVKUYQDmxU3N5XE=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211213063430-748e38ca8aec h1:3FLiRYO6PlQFDpUU7OEFlWgjGD1jnBIVSJ5SYRWk+9c=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211213063430-748e38ca8aec/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
+github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang/freetype v0.0.0-20161208064710-d9be45aaf745 h1:0d9whnMsm0iklqvoBXNEgHPt8pkXdfDplBAswA/F8YA=
github.com/golang/freetype v0.0.0-20161208064710-d9be45aaf745/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
+github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
+github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
+github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
+github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
+github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
+github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
+github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
+github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad h1:eMxs9EL0PvIGS9TTtxg4R+JxuPGav82J8rA+GFnY7po=
github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
+github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
+github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
+github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
+github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lawl/pulseaudio v0.0.0-20200802093727-ab0735955fd0 h1:JrvOwrr1teFiqsp0EQxgEPJsm0pet+YLTL+HdYmnMx0=
github.com/lawl/pulseaudio v0.0.0-20200802093727-ab0735955fd0/go.mod h1:9h36x4KH7r2V8DOCKoPMt87IXZ++X90y8D5nnuwq290=
github.com/lawl/pulseaudio v0.0.0-20210604102109-cb2596d6a8ef h1:mpCJg3O6C+B8mh5xoO147NG3Z70GBcFNgqgz2DH/rLQ=
github.com/lawl/pulseaudio v0.0.0-20210604102109-cb2596d6a8ef/go.mod h1:9h36x4KH7r2V8DOCKoPMt87IXZ++X90y8D5nnuwq290=
github.com/lawl/pulseaudio v0.0.0-20210928141934-ed754c0c6618 h1:lktbhQBHluc1oWEDow4DEv13qkWJ8zm/dTUSKer2iKk=
github.com/lawl/pulseaudio v0.0.0-20210928141934-ed754c0c6618/go.mod h1:9h36x4KH7r2V8DOCKoPMt87IXZ++X90y8D5nnuwq290=
+github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
+github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
+github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
+github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
+github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
+github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
+github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
+github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
+github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
+github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
+github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
+github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
+github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
+github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
+github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
+github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
+github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
+github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
+github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
+github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
+github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
+github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
+github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
+github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
+github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
+github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
+github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
+github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
+github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
+github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
+github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
+go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo=
+go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU=
+go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw=
+go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc=
+go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
+go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
+go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529 h1:iMGN4xG0cnqj3t+zOM8wUB0BiPKHEwSxEZCvzcbZuvk=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3 h1:n9HxLrNxWWtEb1cA950nuEEj3QnKbtsCJ6KjcgisNUs=
golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE=
golang.org/x/exp v0.0.0-20191224044220-1fea468a75e9 h1:HLuLY2KniBsHW28uXd1i2UZKjifeJUy//P/wTK6AJwI=
golang.org/x/exp v0.0.0-20191224044220-1fea468a75e9/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20210722180016-6781d3edade3/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc=
+golang.org/x/exp v0.0.0-20220104160115-025e73f80486 h1:gpEOK9kxNqVPOaZayQV2bzetZplXWakHeirk1bXKu2s=
+golang.org/x/exp v0.0.0-20220104160115-025e73f80486/go.mod h1:b9TAUYHmRtqA6klRHApnXMnj+OyLce4yF5cZCUbk2ps=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20200618115811-c13761719519 h1:1e2ufUJNM3lCHEY5jIgac/7UTjd6cgJNdatjPdFWf34=
golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
+golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
+golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
+golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=
+golang.org/x/mobile v0.0.0-20220104184238-4a8be17bd2e3 h1:A6xMk9ozH8+K90r7CpnP00jZ92Io02pQ/XLd55pZuf0=
+golang.org/x/mobile v0.0.0-20220104184238-4a8be17bd2e3/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
+golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
+google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
+gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
+gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
diff --git a/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.go b/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.go
index 10ec40c..ce28c32 100644
--- a/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.go
+++ b/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.go
@@ -17,8 +17,9 @@ import (
)
/*
-#cgo LDFLAGS: -framework Metal -framework Foundation
+#cgo LDFLAGS: -framework Metal -framework CoreGraphics -framework Foundation
#include <stdlib.h>
+#include <stdbool.h>
#include "mtl.h"
struct Library Go_Device_MakeLibrary(void * device, _GoString_ source) {
return Device_MakeLibrary(device, _GoStringPtr(source), _GoStringLen(source));
@@ -301,9 +302,9 @@ func CreateSystemDefaultDevice() (Device, error) {
return Device{
device: d.Device,
- Headless: d.Headless != 0,
- LowPower: d.LowPower != 0,
- Removable: d.Removable != 0,
+ Headless: bool(d.Headless),
+ LowPower: bool(d.LowPower),
+ Removable: bool(d.Removable),
RegistryID: uint64(d.RegistryID),
Name: C.GoString(d.Name),
}, nil
@@ -321,9 +322,9 @@ func CopyAllDevices() []Device {
d := (*C.struct_Device)(unsafe.Pointer(uintptr(unsafe.Pointer(d.Devices)) + uintptr(i)*C.sizeof_struct_Device))
ds[i].device = d.Device
- ds[i].Headless = d.Headless != 0
- ds[i].LowPower = d.LowPower != 0
- ds[i].Removable = d.Removable != 0
+ ds[i].Headless = bool(d.Headless)
+ ds[i].LowPower = bool(d.LowPower)
+ ds[i].Removable = bool(d.Removable)
ds[i].RegistryID = uint64(d.RegistryID)
ds[i].Name = C.GoString(d.Name)
}
@@ -337,7 +338,7 @@ func (d Device) Device() unsafe.Pointer { return d.device }
//
// Reference: https://developer.apple.com/documentation/metal/mtldevice/1433418-supportsfeatureset.
func (d Device) SupportsFeatureSet(fs FeatureSet) bool {
- return C.Device_SupportsFeatureSet(d.device, C.uint16_t(fs)) != 0
+ return bool(C.Device_SupportsFeatureSet(d.device, C.uint16_t(fs)))
}
// MakeCommandQueue creates a serial command submission queue.
diff --git a/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.h b/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.h
index 24111a9..94d2bbe 100644
--- a/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.h
+++ b/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.h
@@ -1,6 +1,5 @@
// +build darwin
-typedef signed char BOOL;
typedef unsigned long uint_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
@@ -8,9 +7,9 @@ typedef unsigned long long uint64_t;
struct Device {
void * Device;
- BOOL Headless;
- BOOL LowPower;
- BOOL Removable;
+ bool Headless;
+ bool LowPower;
+ bool Removable;
uint64_t RegistryID;
const char * Name;
};
@@ -77,7 +76,7 @@ struct Region {
struct Device CreateSystemDefaultDevice();
struct Devices CopyAllDevices();
-BOOL Device_SupportsFeatureSet(void * device, uint16_t featureSet);
+bool Device_SupportsFeatureSet(void * device, uint16_t featureSet);
void * Device_MakeCommandQueue(void * device);
struct Library Device_MakeLibrary(void * device, const char * source, size_t sourceLength);
struct RenderPipelineState Device_MakeRenderPipelineState(void * device, struct RenderPipelineDescriptor descriptor);
diff --git a/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.m b/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.m
index e28eef1..b717b77 100644
--- a/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.m
+++ b/vendor/dmitri.shuralyov.com/gpu/mtl/mtl.m
@@ -1,7 +1,6 @@
// +build darwin
#import <Metal/Metal.h>
-#include <stdlib.h>
#include "mtl.h"
struct Device CreateSystemDefaultDevice() {
@@ -40,7 +39,7 @@ struct Devices CopyAllDevices() {
return d;
}
-BOOL Device_SupportsFeatureSet(void * device, uint16_t featureSet) {
+bool Device_SupportsFeatureSet(void * device, uint16_t featureSet) {
return [(id<MTLDevice>)device supportsFeatureSet:featureSet];
}
diff --git a/vendor/gioui.org/LICENSE b/vendor/gioui.org/LICENSE
index 818b5da..81f4733 100644
--- a/vendor/gioui.org/LICENSE
+++ b/vendor/gioui.org/LICENSE
@@ -1,5 +1,5 @@
-This project is dual-licensed under the UNLICENSE or
-the MIT license with the SPDX identifier:
+This project is provided under the terms of the UNLICENSE or
+the MIT license denoted by the following SPDX identifier:
SPDX-License-Identifier: Unlicense OR MIT
diff --git a/vendor/gioui.org/app/internal/window/Gio.java b/vendor/gioui.org/app/Gio.java
index 33e1a68..33e1a68 100644
--- a/vendor/gioui.org/app/internal/window/Gio.java
+++ b/vendor/gioui.org/app/Gio.java
diff --git a/vendor/gioui.org/app/internal/window/GioActivity.java b/vendor/gioui.org/app/GioActivity.java
index 260d4b6..4565e38 100644
--- a/vendor/gioui.org/app/internal/window/GioActivity.java
+++ b/vendor/gioui.org/app/GioActivity.java
@@ -3,12 +3,8 @@
package org.gioui;
import android.app.Activity;
-import android.content.res.Configuration;
-import android.os.Build;
import android.os.Bundle;
-import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
+import android.content.res.Configuration;
public final class GioActivity extends Activity {
private GioView view;
@@ -16,13 +12,8 @@ public final class GioActivity extends Activity {
@Override public void onCreate(Bundle state) {
super.onCreate(state);
- Window w = getWindow();
-
this.view = new GioView(this);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- this.view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
- }
- this.view.setLayoutParams(new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT));
+
setContentView(view);
}
@@ -48,7 +39,7 @@ public final class GioActivity extends Activity {
@Override public void onLowMemory() {
super.onLowMemory();
- view.lowMemory();
+ GioView.onLowMemory();
}
@Override public void onBackPressed() {
diff --git a/vendor/gioui.org/app/GioView.java b/vendor/gioui.org/app/GioView.java
new file mode 100644
index 0000000..14639b0
--- /dev/null
+++ b/vendor/gioui.org/app/GioView.java
@@ -0,0 +1,480 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package org.gioui;
+
+import java.lang.Class;
+import java.lang.IllegalAccessException;
+import java.lang.InstantiationException;
+import java.lang.ExceptionInInitializerError;
+import java.lang.SecurityException;
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.app.FragmentTransaction;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Rect;
+import android.os.Build;
+import android.os.Bundle;
+import android.text.Editable;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+import android.view.KeyCharacterMap;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.PointerIcon;
+import android.view.View;
+import android.view.ViewConfiguration;
+import android.view.WindowInsets;
+import android.view.Surface;
+import android.view.SurfaceView;
+import android.view.SurfaceHolder;
+import android.view.Window;
+import android.view.WindowInsetsController;
+import android.view.WindowManager;
+import android.view.inputmethod.BaseInputConnection;
+import android.view.inputmethod.InputConnection;
+import android.view.inputmethod.InputMethodManager;
+import android.view.inputmethod.EditorInfo;
+import android.text.InputType;
+import android.view.accessibility.AccessibilityNodeProvider;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+
+import java.io.UnsupportedEncodingException;
+
+public final class GioView extends SurfaceView {
+ private static boolean jniLoaded;
+
+ private final SurfaceHolder.Callback surfCallbacks;
+ private final View.OnFocusChangeListener focusCallback;
+ private final InputMethodManager imm;
+ private final float scrollXScale;
+ private final float scrollYScale;
+ private int keyboardHint;
+ private AccessibilityManager accessManager;
+
+ private long nhandle;
+
+ public GioView(Context context) {
+ this(context, null);
+ }
+
+ public GioView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
+ }
+ setLayoutParams(new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT));
+
+ // Late initialization of the Go runtime to wait for a valid context.
+ Gio.init(context.getApplicationContext());
+
+ // Set background color to transparent to avoid a flickering
+ // issue on ChromeOS.
+ setBackgroundColor(Color.argb(0, 0, 0, 0));
+
+ ViewConfiguration conf = ViewConfiguration.get(context);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ scrollXScale = conf.getScaledHorizontalScrollFactor();
+ scrollYScale = conf.getScaledVerticalScrollFactor();
+
+ // The platform focus highlight is not aware of Gio's widgets.
+ setDefaultFocusHighlightEnabled(false);
+ } else {
+ float listItemHeight = 48; // dp
+ float px = TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ listItemHeight,
+ getResources().getDisplayMetrics()
+ );
+ scrollXScale = px;
+ scrollYScale = px;
+ }
+
+ accessManager = (AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
+ nhandle = onCreateView(this);
+ imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
+ setFocusable(true);
+ setFocusableInTouchMode(true);
+ focusCallback = new View.OnFocusChangeListener() {
+ @Override public void onFocusChange(View v, boolean focus) {
+ GioView.this.onFocusChange(nhandle, focus);
+ }
+ };
+ setOnFocusChangeListener(focusCallback);
+ surfCallbacks = new SurfaceHolder.Callback() {
+ @Override public void surfaceCreated(SurfaceHolder holder) {
+ // Ignore; surfaceChanged is guaranteed to be called immediately after this.
+ }
+ @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+ onSurfaceChanged(nhandle, getHolder().getSurface());
+ }
+ @Override public void surfaceDestroyed(SurfaceHolder holder) {
+ onSurfaceDestroyed(nhandle);
+ }
+ };
+ getHolder().addCallback(surfCallbacks);
+ }
+
+ @Override public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (nhandle != 0) {
+ onKeyEvent(nhandle, keyCode, event.getUnicodeChar(), event.getEventTime());
+ }
+ return false;
+ }
+
+ @Override public boolean onGenericMotionEvent(MotionEvent event) {
+ dispatchMotionEvent(event);
+ return true;
+ }
+
+ @Override public boolean onTouchEvent(MotionEvent event) {
+ // Ask for unbuffered events. Flutter and Chrome do it
+ // so assume it's good for us as well.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ requestUnbufferedDispatch(event);
+ }
+
+ dispatchMotionEvent(event);
+ return true;
+ }
+
+ private void setCursor(int id) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
+ return;
+ }
+ PointerIcon pointerIcon = PointerIcon.getSystemIcon(getContext(), id);
+ setPointerIcon(pointerIcon);
+ }
+
+ private void setOrientation(int id, int fallback) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
+ id = fallback;
+ }
+ ((Activity) this.getContext()).setRequestedOrientation(id);
+ }
+
+ private void setFullscreen(boolean enabled) {
+ int flags = this.getSystemUiVisibility();
+ if (enabled) {
+ flags |= SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
+ flags |= SYSTEM_UI_FLAG_HIDE_NAVIGATION;
+ flags |= SYSTEM_UI_FLAG_FULLSCREEN;
+ flags |= SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+ } else {
+ flags &= ~SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
+ flags &= ~SYSTEM_UI_FLAG_HIDE_NAVIGATION;
+ flags &= ~SYSTEM_UI_FLAG_FULLSCREEN;
+ flags &= ~SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+ }
+ this.setSystemUiVisibility(flags);
+ }
+
+ private enum Bar {
+ NAVIGATION,
+ STATUS,
+ }
+
+ private void setBarColor(Bar t, int color, int luminance) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
+ return;
+ }
+
+ Window window = ((Activity) this.getContext()).getWindow();
+
+ int insetsMask;
+ int viewMask;
+
+ switch (t) {
+ case STATUS:
+ insetsMask = WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
+ viewMask = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
+ window.setStatusBarColor(color);
+ break;
+ case NAVIGATION:
+ insetsMask = WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS;
+ viewMask = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
+ window.setNavigationBarColor(color);
+ break;
+ default:
+ throw new RuntimeException("invalid bar type");
+ }
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+ return;
+ }
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
+ int flags = this.getSystemUiVisibility();
+ if (luminance > 128) {
+ flags |= viewMask;
+ } else {
+ flags &= ~viewMask;
+ }
+ this.setSystemUiVisibility(flags);
+ return;
+ }
+
+ WindowInsetsController insetsController = window.getInsetsController();
+ if (insetsController == null) {
+ return;
+ }
+ if (luminance > 128) {
+ insetsController.setSystemBarsAppearance(insetsMask, insetsMask);
+ } else {
+ insetsController.setSystemBarsAppearance(0, insetsMask);
+ }
+ }
+
+ private void setStatusColor(int color, int luminance) {
+ this.setBarColor(Bar.STATUS, color, luminance);
+ }
+
+ private void setNavigationColor(int color, int luminance) {
+ this.setBarColor(Bar.NAVIGATION, color, luminance);
+ }
+
+ @Override protected boolean dispatchHoverEvent(MotionEvent event) {
+ if (!accessManager.isTouchExplorationEnabled()) {
+ return super.dispatchHoverEvent(event);
+ }
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_HOVER_ENTER:
+ // Fall through.
+ case MotionEvent.ACTION_HOVER_MOVE:
+ onTouchExploration(nhandle, event.getX(), event.getY());
+ break;
+ case MotionEvent.ACTION_HOVER_EXIT:
+ onExitTouchExploration(nhandle);
+ break;
+ }
+ return true;
+ }
+
+ void sendA11yEvent(int eventType, int viewId) {
+ if (!accessManager.isEnabled()) {
+ return;
+ }
+ AccessibilityEvent event = obtainA11yEvent(eventType, viewId);
+ getParent().requestSendAccessibilityEvent(this, event);
+ }
+
+ AccessibilityEvent obtainA11yEvent(int eventType, int viewId) {
+ AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
+ event.setPackageName(getContext().getPackageName());
+ event.setSource(this, viewId);
+ return event;
+ }
+
+ boolean isA11yActive() {
+ return accessManager.isEnabled();
+ }
+
+ void sendA11yChange(int viewId) {
+ if (!accessManager.isEnabled()) {
+ return;
+ }
+ AccessibilityEvent event = obtainA11yEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED, viewId);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ event.setContentChangeTypes(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
+ }
+ getParent().requestSendAccessibilityEvent(this, event);
+ }
+
+ private void dispatchMotionEvent(MotionEvent event) {
+ if (nhandle == 0) {
+ return;
+ }
+ for (int j = 0; j < event.getHistorySize(); j++) {
+ long time = event.getHistoricalEventTime(j);
+ for (int i = 0; i < event.getPointerCount(); i++) {
+ onTouchEvent(
+ nhandle,
+ event.ACTION_MOVE,
+ event.getPointerId(i),
+ event.getToolType(i),
+ event.getHistoricalX(i, j),
+ event.getHistoricalY(i, j),
+ scrollXScale*event.getHistoricalAxisValue(MotionEvent.AXIS_HSCROLL, i, j),
+ scrollYScale*event.getHistoricalAxisValue(MotionEvent.AXIS_VSCROLL, i, j),
+ event.getButtonState(),
+ time);
+ }
+ }
+ int act = event.getActionMasked();
+ int idx = event.getActionIndex();
+ for (int i = 0; i < event.getPointerCount(); i++) {
+ int pact = event.ACTION_MOVE;
+ if (i == idx) {
+ pact = act;
+ }
+ onTouchEvent(
+ nhandle,
+ pact,
+ event.getPointerId(i),
+ event.getToolType(i),
+ event.getX(i), event.getY(i),
+ scrollXScale*event.getAxisValue(MotionEvent.AXIS_HSCROLL, i),
+ scrollYScale*event.getAxisValue(MotionEvent.AXIS_VSCROLL, i),
+ event.getButtonState(),
+ event.getEventTime());
+ }
+ }
+
+ @Override public InputConnection onCreateInputConnection(EditorInfo editor) {
+ editor.inputType = this.keyboardHint;
+ editor.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN | EditorInfo.IME_FLAG_NO_EXTRACT_UI;
+ return new InputConnection(this);
+ }
+
+ void setInputHint(int hint) {
+ if (hint == this.keyboardHint) {
+ return;
+ }
+ this.keyboardHint = hint;
+ imm.restartInput(this);
+ }
+
+ void showTextInput() {
+ GioView.this.requestFocus();
+ imm.showSoftInput(GioView.this, 0);
+ }
+
+ void hideTextInput() {
+ imm.hideSoftInputFromWindow(getWindowToken(), 0);
+ }
+
+ @Override protected boolean fitSystemWindows(Rect insets) {
+ if (nhandle != 0) {
+ onWindowInsets(nhandle, insets.top, insets.right, insets.bottom, insets.left);
+ }
+ return true;
+ }
+
+ @Override protected void onDraw(Canvas canvas) {
+ if (nhandle != 0) {
+ onFrameCallback(nhandle);
+ }
+ }
+
+ int getDensity() {
+ return getResources().getDisplayMetrics().densityDpi;
+ }
+
+ float getFontScale() {
+ return getResources().getConfiguration().fontScale;
+ }
+
+ public void start() {
+ if (nhandle != 0) {
+ onStartView(nhandle);
+ }
+ }
+
+ public void stop() {
+ if (nhandle != 0) {
+ onStopView(nhandle);
+ }
+ }
+
+ public void destroy() {
+ if (nhandle != 0) {
+ onDestroyView(nhandle);
+ }
+ }
+
+ protected void unregister() {
+ setOnFocusChangeListener(null);
+ getHolder().removeCallback(surfCallbacks);
+ nhandle = 0;
+ }
+
+ public void configurationChanged() {
+ if (nhandle != 0) {
+ onConfigurationChanged(nhandle);
+ }
+ }
+
+ public boolean backPressed() {
+ if (nhandle == 0) {
+ return false;
+ }
+ return onBack(nhandle);
+ }
+
+ static private native long onCreateView(GioView view);
+ static private native void onDestroyView(long handle);
+ static private native void onStartView(long handle);
+ static private native void onStopView(long handle);
+ static private native void onSurfaceDestroyed(long handle);
+ static private native void onSurfaceChanged(long handle, Surface surface);
+ static private native void onConfigurationChanged(long handle);
+ static private native void onWindowInsets(long handle, int top, int right, int bottom, int left);
+ static public native void onLowMemory();
+ static private native void onTouchEvent(long handle, int action, int pointerID, int tool, float x, float y, float scrollX, float scrollY, int buttons, long time);
+ static private native void onKeyEvent(long handle, int code, int character, long time);
+ static private native void onFrameCallback(long handle);
+ static private native boolean onBack(long handle);
+ static private native void onFocusChange(long handle, boolean focus);
+ static private native AccessibilityNodeInfo initializeAccessibilityNodeInfo(long handle, int viewId, int screenX, int screenY, AccessibilityNodeInfo info);
+ static private native void onTouchExploration(long handle, float x, float y);
+ static private native void onExitTouchExploration(long handle);
+ static private native void onA11yFocus(long handle, int viewId);
+ static private native void onClearA11yFocus(long handle, int viewId);
+
+ private static class InputConnection extends BaseInputConnection {
+ private final Editable editable;
+
+ InputConnection(View view) {
+ // Passing false enables "dummy mode", where the BaseInputConnection
+ // attempts to convert IME operations to key events.
+ super(view, false);
+ editable = Editable.Factory.getInstance().newEditable("");
+ }
+
+ @Override public Editable getEditable() {
+ return editable;
+ }
+ }
+
+ @Override public AccessibilityNodeProvider getAccessibilityNodeProvider() {
+ return new AccessibilityNodeProvider() {
+ private final int[] screenOff = new int[2];
+
+ @Override public AccessibilityNodeInfo createAccessibilityNodeInfo(int viewId) {
+ AccessibilityNodeInfo info = null;
+ if (viewId == View.NO_ID) {
+ info = AccessibilityNodeInfo.obtain(GioView.this);
+ GioView.this.onInitializeAccessibilityNodeInfo(info);
+ } else {
+ info = AccessibilityNodeInfo.obtain(GioView.this, viewId);
+ info.setPackageName(getContext().getPackageName());
+ info.setVisibleToUser(true);
+ }
+ GioView.this.getLocationOnScreen(screenOff);
+ info = GioView.this.initializeAccessibilityNodeInfo(nhandle, viewId, screenOff[0], screenOff[1], info);
+ return info;
+ }
+
+ @Override public boolean performAction(int viewId, int action, Bundle arguments) {
+ if (viewId == View.NO_ID) {
+ return GioView.this.performAccessibilityAction(action, arguments);
+ }
+ switch (action) {
+ case AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS:
+ GioView.this.onA11yFocus(nhandle, viewId);
+ GioView.this.sendA11yEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED, viewId);
+ return true;
+ case AccessibilityNodeInfo.ACTION_CLEAR_ACCESSIBILITY_FOCUS:
+ GioView.this.onClearA11yFocus(nhandle, viewId);
+ GioView.this.sendA11yEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, viewId);
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+}
diff --git a/vendor/gioui.org/app/app.go b/vendor/gioui.org/app/app.go
index d21224e..e00298a 100644
--- a/vendor/gioui.org/app/app.go
+++ b/vendor/gioui.org/app/app.go
@@ -5,8 +5,6 @@ package app
import (
"os"
"strings"
-
- "gioui.org/app/internal/window"
)
// extraArgs contains extra arguments to append to
@@ -44,5 +42,5 @@ func DataDir() (string, error) {
// require control of the main thread of the program for
// running windows.
func Main() {
- window.Main()
+ osMain()
}
diff --git a/vendor/gioui.org/app/app_android.go b/vendor/gioui.org/app/app_android.go
deleted file mode 100644
index 58e40d0..0000000
--- a/vendor/gioui.org/app/app_android.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package app
-
-import (
- "gioui.org/app/internal/window"
-)
-
-// JavaVM returns the global JNI JavaVM.
-func JavaVM() uintptr {
- return window.JavaVM()
-}
-
-// AppContext returns the global Application context as a JNI
-// jobject.
-func AppContext() uintptr {
- return window.AppContext()
-}
-
-// Do invokes the function with a JNI jobject handle to the underlying
-// Android View. The function is invoked on the main thread, and the
-// handle is invalidated after the function returns.
-//
-// Note: Do may deadlock if called from the same goroutine that receives from
-// Events.
-func (w *Window) Do(f func(view uintptr)) {
- type androidDriver interface {
- Do(f func(view uintptr)) bool
- }
- success := make(chan bool)
- for {
- driver := make(chan androidDriver, 1)
- // two-stage process: first wait for a valid driver...
- w.driverDo(func() {
- driver <- w.driver.(androidDriver)
- })
- // .. then run the function on the main thread using the
- // driver. The driver Do method returns false if the
- // view was invalidated while switching to the main thread.
- window.RunOnMain(func() {
- d := <-driver
- success <- d.Do(f)
- })
- if <-success {
- break
- }
- }
-}
diff --git a/vendor/gioui.org/app/d3d11_windows.go b/vendor/gioui.org/app/d3d11_windows.go
new file mode 100644
index 0000000..ab04ee4
--- /dev/null
+++ b/vendor/gioui.org/app/d3d11_windows.go
@@ -0,0 +1,135 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package app
+
+import (
+ "fmt"
+ "unsafe"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/d3d11"
+)
+
+type d3d11Context struct {
+ win *window
+ dev *d3d11.Device
+ ctx *d3d11.DeviceContext
+
+ swchain *d3d11.IDXGISwapChain
+ renderTarget *d3d11.RenderTargetView
+ width, height int
+}
+
+const debug = false
+
+func init() {
+ drivers = append(drivers, gpuAPI{
+ priority: 1,
+ initializer: func(w *window) (context, error) {
+ hwnd, _, _ := w.HWND()
+ var flags uint32
+ if debug {
+ flags |= d3d11.CREATE_DEVICE_DEBUG
+ }
+ dev, ctx, _, err := d3d11.CreateDevice(
+ d3d11.DRIVER_TYPE_HARDWARE,
+ flags,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("NewContext: %v", err)
+ }
+ swchain, err := d3d11.CreateSwapChain(dev, hwnd)
+ if err != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(ctx), ctx.Vtbl.Release)
+ d3d11.IUnknownRelease(unsafe.Pointer(dev), dev.Vtbl.Release)
+ return nil, err
+ }
+ return &d3d11Context{win: w, dev: dev, ctx: ctx, swchain: swchain}, nil
+ },
+ })
+}
+
+func (c *d3d11Context) API() gpu.API {
+ return gpu.Direct3D11{Device: unsafe.Pointer(c.dev)}
+}
+
+func (c *d3d11Context) RenderTarget() (gpu.RenderTarget, error) {
+ return gpu.Direct3D11RenderTarget{
+ RenderTarget: unsafe.Pointer(c.renderTarget),
+ }, nil
+}
+
+func (c *d3d11Context) Present() error {
+ err := c.swchain.Present(1, 0)
+ if err == nil {
+ return nil
+ }
+ if err, ok := err.(d3d11.ErrorCode); ok {
+ switch err.Code {
+ case d3d11.DXGI_STATUS_OCCLUDED:
+ // Ignore
+ return nil
+ case d3d11.DXGI_ERROR_DEVICE_RESET, d3d11.DXGI_ERROR_DEVICE_REMOVED, d3d11.D3DDDIERR_DEVICEREMOVED:
+ return gpu.ErrDeviceLost
+ }
+ }
+ return err
+}
+
+func (c *d3d11Context) Refresh() error {
+ var width, height int
+ _, width, height = c.win.HWND()
+ if c.renderTarget != nil && width == c.width && height == c.height {
+ return nil
+ }
+ c.releaseFBO()
+ if err := c.swchain.ResizeBuffers(0, 0, 0, d3d11.DXGI_FORMAT_UNKNOWN, 0); err != nil {
+ return err
+ }
+ c.width = width
+ c.height = height
+
+ backBuffer, err := c.swchain.GetBuffer(0, &d3d11.IID_Texture2D)
+ if err != nil {
+ return err
+ }
+ texture := (*d3d11.Resource)(unsafe.Pointer(backBuffer))
+ renderTarget, err := c.dev.CreateRenderTargetView(texture)
+ d3d11.IUnknownRelease(unsafe.Pointer(backBuffer), backBuffer.Vtbl.Release)
+ if err != nil {
+ return err
+ }
+ c.renderTarget = renderTarget
+ return nil
+}
+
+func (c *d3d11Context) Lock() error {
+ c.ctx.OMSetRenderTargets(c.renderTarget, nil)
+ return nil
+}
+
+func (c *d3d11Context) Unlock() {}
+
+func (c *d3d11Context) Release() {
+ c.releaseFBO()
+ if c.swchain != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(c.swchain), c.swchain.Vtbl.Release)
+ }
+ if c.ctx != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(c.ctx), c.ctx.Vtbl.Release)
+ }
+ if c.dev != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(c.dev), c.dev.Vtbl.Release)
+ }
+ *c = d3d11Context{}
+ if debug {
+ d3d11.ReportLiveObjects()
+ }
+}
+
+func (c *d3d11Context) releaseFBO() {
+ if c.renderTarget != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(c.renderTarget), c.renderTarget.Vtbl.Release)
+ c.renderTarget = nil
+ }
+}
diff --git a/vendor/gioui.org/app/datadir.go b/vendor/gioui.org/app/datadir.go
index 31e5453..500a59a 100644
--- a/vendor/gioui.org/app/datadir.go
+++ b/vendor/gioui.org/app/datadir.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build !android
// +build !android
package app
diff --git a/vendor/gioui.org/app/datadir_android.go b/vendor/gioui.org/app/datadir_android.go
deleted file mode 100644
index 450e6cf..0000000
--- a/vendor/gioui.org/app/datadir_android.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build android
-
-package app
-
-import "C"
-
-import (
- "os"
- "path/filepath"
- "sync"
-
- "gioui.org/app/internal/window"
-)
-
-var (
- dataDirOnce sync.Once
- dataPath string
-)
-
-func dataDir() (string, error) {
- dataDirOnce.Do(func() {
- dataPath = window.GetDataDir()
- // Set XDG_CACHE_HOME to make os.UserCacheDir work.
- if _, exists := os.LookupEnv("XDG_CACHE_HOME"); !exists {
- cachePath := filepath.Join(dataPath, "cache")
- os.Setenv("XDG_CACHE_HOME", cachePath)
- }
- // Set XDG_CONFIG_HOME to make os.UserConfigDir work.
- if _, exists := os.LookupEnv("XDG_CONFIG_HOME"); !exists {
- cfgPath := filepath.Join(dataPath, "config")
- os.Setenv("XDG_CONFIG_HOME", cfgPath)
- }
- // Set HOME to make os.UserHomeDir work.
- if _, exists := os.LookupEnv("HOME"); !exists {
- os.Setenv("HOME", dataPath)
- }
- })
- return dataPath, nil
-}
diff --git a/vendor/gioui.org/app/egl_android.go b/vendor/gioui.org/app/egl_android.go
new file mode 100644
index 0000000..2c31130
--- /dev/null
+++ b/vendor/gioui.org/app/egl_android.go
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package app
+
+/*
+#include <android/native_window_jni.h>
+#include <EGL/egl.h>
+*/
+import "C"
+
+import (
+ "unsafe"
+
+ "gioui.org/internal/egl"
+)
+
+type androidContext struct {
+ win *window
+ eglSurf egl.NativeWindowType
+ width, height int
+ *egl.Context
+}
+
+func init() {
+ newAndroidGLESContext = func(w *window) (context, error) {
+ ctx, err := egl.NewContext(nil)
+ if err != nil {
+ return nil, err
+ }
+ return &androidContext{win: w, Context: ctx}, nil
+ }
+}
+
+func (c *androidContext) Release() {
+ if c.Context != nil {
+ c.Context.Release()
+ c.Context = nil
+ }
+}
+
+func (c *androidContext) Refresh() error {
+ c.Context.ReleaseSurface()
+ if err := c.win.setVisual(c.Context.VisualID()); err != nil {
+ return err
+ }
+ win, width, height := c.win.nativeWindow()
+ c.eglSurf = egl.NativeWindowType(unsafe.Pointer(win))
+ c.width, c.height = width, height
+ return nil
+}
+
+func (c *androidContext) Lock() error {
+ // The Android emulator creates a broken surface if it is not
+ // created on the same thread as the context is made current.
+ if c.eglSurf != nil {
+ if err := c.Context.CreateSurface(c.eglSurf, c.width, c.height); err != nil {
+ return err
+ }
+ c.eglSurf = nil
+ }
+ return c.Context.MakeCurrent()
+}
+
+func (c *androidContext) Unlock() {
+ c.Context.ReleaseCurrent()
+}
diff --git a/vendor/gioui.org/app/internal/window/egl_wayland.go b/vendor/gioui.org/app/egl_wayland.go
index b4878b4..c2406a0 100644
--- a/vendor/gioui.org/app/internal/window/egl_wayland.go
+++ b/vendor/gioui.org/app/egl_wayland.go
@@ -1,20 +1,22 @@
// SPDX-License-Identifier: Unlicense OR MIT
-// +build linux,!android,!nowayland freebsd
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
-package window
+package app
import (
"errors"
"unsafe"
- "gioui.org/app/internal/egl"
+ "gioui.org/internal/egl"
)
/*
#cgo linux pkg-config: egl wayland-egl
#cgo freebsd openbsd LDFLAGS: -lwayland-egl
-#cgo CFLAGS: -DMESA_EGL_NO_X11_HEADERS
+#cgo CFLAGS: -DEGL_NO_X11
#include <EGL/egl.h>
#include <wayland-client.h>
@@ -22,22 +24,24 @@ import (
*/
import "C"
-type context struct {
+type wlContext struct {
win *window
*egl.Context
eglWin *C.struct_wl_egl_window
}
-func (w *window) NewContext() (Context, error) {
- disp := egl.NativeDisplayType(unsafe.Pointer(w.display()))
- ctx, err := egl.NewContext(disp)
- if err != nil {
- return nil, err
+func init() {
+ newWaylandEGLContext = func(w *window) (context, error) {
+ disp := egl.NativeDisplayType(unsafe.Pointer(w.display()))
+ ctx, err := egl.NewContext(disp)
+ if err != nil {
+ return nil, err
+ }
+ return &wlContext{Context: ctx, win: w}, nil
}
- return &context{Context: ctx, win: w}, nil
}
-func (c *context) Release() {
+func (c *wlContext) Release() {
if c.Context != nil {
c.Context.Release()
c.Context = nil
@@ -48,7 +52,7 @@ func (c *context) Release() {
}
}
-func (c *context) MakeCurrent() error {
+func (c *wlContext) Refresh() error {
c.Context.ReleaseSurface()
if c.eglWin != nil {
C.wl_egl_window_destroy(c.eglWin)
@@ -64,12 +68,13 @@ func (c *context) MakeCurrent() error {
}
c.eglWin = eglWin
eglSurf := egl.NativeWindowType(uintptr(unsafe.Pointer(eglWin)))
- if err := c.Context.CreateSurface(eglSurf, width, height); err != nil {
- return err
- }
- return c.Context.MakeCurrent()
+ return c.Context.CreateSurface(eglSurf, width, height)
}
-func (c *context) Lock() {}
+func (c *wlContext) Lock() error {
+ return c.Context.MakeCurrent()
+}
-func (c *context) Unlock() {}
+func (c *wlContext) Unlock() {
+ c.Context.ReleaseCurrent()
+}
diff --git a/vendor/gioui.org/app/internal/window/egl_windows.go b/vendor/gioui.org/app/egl_windows.go
index 654d279..3a95450 100644
--- a/vendor/gioui.org/app/internal/window/egl_windows.go
+++ b/vendor/gioui.org/app/egl_windows.go
@@ -1,9 +1,11 @@
// SPDX-License-Identifier: Unlicense OR MIT
-package window
+package app
import (
- "gioui.org/app/internal/egl"
+ "golang.org/x/sys/windows"
+
+ "gioui.org/internal/egl"
)
type glContext struct {
@@ -12,9 +14,9 @@ type glContext struct {
}
func init() {
- backends = append(backends, gpuAPI{
+ drivers = append(drivers, gpuAPI{
priority: 2,
- initializer: func(w *window) (Context, error) {
+ initializer: func(w *window) (context, error) {
disp := egl.NativeDisplayType(w.HDC())
ctx, err := egl.NewContext(disp)
if err != nil {
@@ -32,9 +34,13 @@ func (c *glContext) Release() {
}
}
-func (c *glContext) MakeCurrent() error {
+func (c *glContext) Refresh() error {
c.Context.ReleaseSurface()
- win, width, height := c.win.HWND()
+ var (
+ win windows.Handle
+ width, height int
+ )
+ win, width, height = c.win.HWND()
eglSurf := egl.NativeWindowType(win)
if err := c.Context.CreateSurface(eglSurf, width, height); err != nil {
return err
@@ -43,9 +49,14 @@ func (c *glContext) MakeCurrent() error {
return err
}
c.Context.EnableVSync(true)
+ c.Context.ReleaseCurrent()
return nil
}
-func (c *glContext) Lock() {}
+func (c *glContext) Lock() error {
+ return c.Context.MakeCurrent()
+}
-func (c *glContext) Unlock() {}
+func (c *glContext) Unlock() {
+ c.Context.ReleaseCurrent()
+}
diff --git a/vendor/gioui.org/app/egl_x11.go b/vendor/gioui.org/app/egl_x11.go
new file mode 100644
index 0000000..7234808
--- /dev/null
+++ b/vendor/gioui.org/app/egl_x11.go
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build ((linux && !android) || freebsd || openbsd) && !nox11
+// +build linux,!android freebsd openbsd
+// +build !nox11
+
+package app
+
+import (
+ "unsafe"
+
+ "gioui.org/internal/egl"
+)
+
+type x11Context struct {
+ win *x11Window
+ *egl.Context
+}
+
+func init() {
+ newX11EGLContext = func(w *x11Window) (context, error) {
+ disp := egl.NativeDisplayType(unsafe.Pointer(w.display()))
+ ctx, err := egl.NewContext(disp)
+ if err != nil {
+ return nil, err
+ }
+ return &x11Context{win: w, Context: ctx}, nil
+ }
+}
+
+func (c *x11Context) Release() {
+ if c.Context != nil {
+ c.Context.Release()
+ c.Context = nil
+ }
+}
+
+func (c *x11Context) Refresh() error {
+ c.Context.ReleaseSurface()
+ win, width, height := c.win.window()
+ eglSurf := egl.NativeWindowType(uintptr(win))
+ if err := c.Context.CreateSurface(eglSurf, width, height); err != nil {
+ return err
+ }
+ if err := c.Context.MakeCurrent(); err != nil {
+ return err
+ }
+ c.Context.EnableVSync(true)
+ c.Context.ReleaseCurrent()
+ return nil
+}
+
+func (c *x11Context) Lock() error {
+ return c.Context.MakeCurrent()
+}
+
+func (c *x11Context) Unlock() {
+ c.Context.ReleaseCurrent()
+}
diff --git a/vendor/gioui.org/app/internal/window/framework_ios.h b/vendor/gioui.org/app/framework_ios.h
index 18e5a02..18e5a02 100644
--- a/vendor/gioui.org/app/internal/window/framework_ios.h
+++ b/vendor/gioui.org/app/framework_ios.h
diff --git a/vendor/gioui.org/app/internal/window/gl_ios.go b/vendor/gioui.org/app/gl_ios.go
index 0099189..2dc2dbf 100644
--- a/vendor/gioui.org/app/internal/window/gl_ios.go
+++ b/vendor/gioui.org/app/gl_ios.go
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: Unlicense OR MIT
-// +build darwin,ios
+//go:build darwin && ios && nometal
+// +build darwin,ios,nometal
-package window
+package app
/*
+@import UIKit;
+
#include <CoreFoundation/CoreFoundation.h>
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
@@ -14,32 +17,34 @@ __attribute__ ((visibility ("hidden"))) int gio_presentRenderbuffer(CFTypeRef ct
__attribute__ ((visibility ("hidden"))) int gio_makeCurrent(CFTypeRef ctx);
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createContext(void);
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLLayer(void);
+
+static CFTypeRef getViewLayer(CFTypeRef viewRef) {
+ @autoreleasepool {
+ UIView *view = (__bridge UIView *)viewRef;
+ return CFBridgingRetain(view.layer);
+ }
+}
+
*/
import "C"
import (
"errors"
"fmt"
+ "runtime"
- "gioui.org/app/internal/glimpl"
- "gioui.org/gpu/backend"
- "gioui.org/gpu/gl"
+ "gioui.org/gpu"
+ "gioui.org/internal/gl"
)
type context struct {
- owner *window
- c *glimpl.Functions
- ctx C.CFTypeRef
- layer C.CFTypeRef
- init bool
- frameBuffer gl.Framebuffer
- colorBuffer, depthBuffer gl.Renderbuffer
-}
-
-func init() {
- layerFactory = func() uintptr {
- return uintptr(C.gio_createGLLayer())
- }
+ owner *window
+ c *gl.Functions
+ ctx C.CFTypeRef
+ layer C.CFTypeRef
+ init bool
+ frameBuffer gl.Framebuffer
+ colorBuffer gl.Renderbuffer
}
func newContext(w *window) (*context, error) {
@@ -47,17 +52,30 @@ func newContext(w *window) (*context, error) {
if ctx == 0 {
return nil, fmt.Errorf("failed to create EAGLContext")
}
+ api := contextAPI()
+ f, err := gl.NewFunctions(api.Context, api.ES)
+ if err != nil {
+ return nil, err
+ }
c := &context{
ctx: ctx,
owner: w,
- layer: C.CFTypeRef(w.contextLayer()),
- c: new(glimpl.Functions),
+ layer: C.getViewLayer(w.contextView()),
+ c: f,
}
return c, nil
}
-func (c *context) Backend() (backend.Device, error) {
- return gl.NewBackend(c.c)
+func contextAPI() gpu.OpenGL {
+ return gpu.OpenGL{}
+}
+
+func (c *context) RenderTarget() gpu.RenderTarget {
+ return gpu.OpenGLRenderTarget(c.frameBuffer)
+}
+
+func (c *context) API() gpu.API {
+ return contextAPI()
}
func (c *context) Release() {
@@ -67,7 +85,6 @@ func (c *context) Release() {
C.gio_renderbufferStorage(c.ctx, 0, C.GLenum(gl.RENDERBUFFER))
c.c.DeleteFramebuffer(c.frameBuffer)
c.c.DeleteRenderbuffer(c.colorBuffer)
- c.c.DeleteRenderbuffer(c.depthBuffer)
C.gio_makeCurrent(0)
C.CFRelease(c.ctx)
c.ctx = 0
@@ -77,10 +94,6 @@ func (c *context) Present() error {
if c.layer == 0 {
panic("context is not active")
}
- // Discard depth buffer as recommended in
- // https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/WorkingwithEAGLContexts/WorkingwithEAGLContexts.html
- c.c.BindFramebuffer(gl.FRAMEBUFFER, c.frameBuffer)
- c.c.InvalidateFramebuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT)
c.c.BindRenderbuffer(gl.RENDERBUFFER, c.colorBuffer)
if C.gio_presentRenderbuffer(c.ctx, C.GLenum(gl.RENDERBUFFER)) == 0 {
return errors.New("presentRenderBuffer failed")
@@ -88,23 +101,30 @@ func (c *context) Present() error {
return nil
}
-func (c *context) Lock() {}
+func (c *context) Lock() error {
+ // OpenGL contexts are implicit and thread-local. Lock the OS thread.
+ runtime.LockOSThread()
-func (c *context) Unlock() {}
+ if C.gio_makeCurrent(c.ctx) == 0 {
+ return errors.New("[EAGLContext setCurrentContext] failed")
+ }
+ return nil
+}
+
+func (c *context) Unlock() {
+ C.gio_makeCurrent(0)
+}
-func (c *context) MakeCurrent() error {
+func (c *context) Refresh() error {
if C.gio_makeCurrent(c.ctx) == 0 {
- C.CFRelease(c.ctx)
- c.ctx = 0
return errors.New("[EAGLContext setCurrentContext] failed")
}
if !c.init {
c.init = true
c.frameBuffer = c.c.CreateFramebuffer()
c.colorBuffer = c.c.CreateRenderbuffer()
- c.depthBuffer = c.c.CreateRenderbuffer()
}
- if !c.owner.isVisible() {
+ if !c.owner.visible {
// Make sure any in-flight GL commands are complete.
c.c.Finish()
return nil
@@ -114,14 +134,9 @@ func (c *context) MakeCurrent() error {
if C.gio_renderbufferStorage(c.ctx, c.layer, C.GLenum(gl.RENDERBUFFER)) == 0 {
return errors.New("renderbufferStorage failed")
}
- w := c.c.GetRenderbufferParameteri(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)
- h := c.c.GetRenderbufferParameteri(gl.RENDERBUFFER, gl.RENDERBUFFER_HEIGHT)
- c.c.BindRenderbuffer(gl.RENDERBUFFER, c.depthBuffer)
- c.c.RenderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, w, h)
c.c.BindRenderbuffer(gl.RENDERBUFFER, currentRB)
c.c.BindFramebuffer(gl.FRAMEBUFFER, c.frameBuffer)
c.c.FramebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, c.colorBuffer)
- c.c.FramebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, c.depthBuffer)
if st := c.c.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE {
return fmt.Errorf("framebuffer incomplete, status: %#x\n", st)
}
diff --git a/vendor/gioui.org/app/internal/window/gl_ios.m b/vendor/gioui.org/app/gl_ios.m
index 065ea97..8e50753 100644
--- a/vendor/gioui.org/app/internal/window/gl_ios.m
+++ b/vendor/gioui.org/app/gl_ios.m
@@ -1,12 +1,16 @@
// SPDX-License-Identifier: Unlicense OR MIT
-// +build darwin,ios
+// +build darwin,ios,nometal
@import UIKit;
@import OpenGLES;
#include "_cgo_export.h"
+Class gio_layerClass(void) {
+ return [CAEAGLLayer class];
+}
+
int gio_renderbufferStorage(CFTypeRef ctxRef, CFTypeRef layerRef, GLenum buffer) {
EAGLContext *ctx = (__bridge EAGLContext *)ctxRef;
CAEAGLLayer *layer = (__bridge CAEAGLLayer *)layerRef;
diff --git a/vendor/gioui.org/app/gl_js.go b/vendor/gioui.org/app/gl_js.go
new file mode 100644
index 0000000..e3aee8d
--- /dev/null
+++ b/vendor/gioui.org/app/gl_js.go
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package app
+
+import (
+ "errors"
+ "syscall/js"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/gl"
+)
+
+type glContext struct {
+ ctx js.Value
+ cnv js.Value
+}
+
+func newContext(w *window) (*glContext, error) {
+ args := map[string]interface{}{
+ // Enable low latency rendering.
+ // See https://developers.google.com/web/updates/2019/05/desynchronized.
+ "desynchronized": true,
+ "preserveDrawingBuffer": true,
+ }
+ ctx := w.cnv.Call("getContext", "webgl2", args)
+ if ctx.IsNull() {
+ ctx = w.cnv.Call("getContext", "webgl", args)
+ }
+ if ctx.IsNull() {
+ return nil, errors.New("app: webgl is not supported")
+ }
+ c := &glContext{
+ ctx: ctx,
+ cnv: w.cnv,
+ }
+ return c, nil
+}
+
+func (c *glContext) RenderTarget() (gpu.RenderTarget, error) {
+ return gpu.OpenGLRenderTarget{}, nil
+}
+
+func (c *glContext) API() gpu.API {
+ return gpu.OpenGL{Context: gl.Context(c.ctx)}
+}
+
+func (c *glContext) Release() {
+}
+
+func (c *glContext) Present() error {
+ if c.ctx.Call("isContextLost").Bool() {
+ return errors.New("context lost")
+ }
+ return nil
+}
+
+func (c *glContext) Lock() error {
+ return nil
+}
+
+func (c *glContext) Unlock() {}
+
+func (c *glContext) Refresh() error {
+ return nil
+}
+
+func (w *window) NewContext() (context, error) {
+ return newContext(w)
+}
diff --git a/vendor/gioui.org/app/gl_macos.go b/vendor/gioui.org/app/gl_macos.go
new file mode 100644
index 0000000..7511bbd
--- /dev/null
+++ b/vendor/gioui.org/app/gl_macos.go
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build darwin && !ios && nometal
+// +build darwin,!ios,nometal
+
+package app
+
+import (
+ "errors"
+ "runtime"
+
+ "unsafe"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/gl"
+)
+
+/*
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreGraphics/CoreGraphics.h>
+#include <AppKit/AppKit.h>
+#include <dlfcn.h>
+
+__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLContext(void);
+__attribute__ ((visibility ("hidden"))) void gio_setContextView(CFTypeRef ctx, CFTypeRef view);
+__attribute__ ((visibility ("hidden"))) void gio_makeCurrentContext(CFTypeRef ctx);
+__attribute__ ((visibility ("hidden"))) void gio_updateContext(CFTypeRef ctx);
+__attribute__ ((visibility ("hidden"))) void gio_flushContextBuffer(CFTypeRef ctx);
+__attribute__ ((visibility ("hidden"))) void gio_clearCurrentContext(void);
+__attribute__ ((visibility ("hidden"))) void gio_lockContext(CFTypeRef ctxRef);
+__attribute__ ((visibility ("hidden"))) void gio_unlockContext(CFTypeRef ctxRef);
+
+typedef void (*PFN_glFlush)(void);
+
+static void glFlush(PFN_glFlush f) {
+ f();
+}
+*/
+import "C"
+
+type glContext struct {
+ c *gl.Functions
+ ctx C.CFTypeRef
+ view C.CFTypeRef
+
+ glFlush C.PFN_glFlush
+}
+
+func newContext(w *window) (*glContext, error) {
+ clib := C.CString("/System/Library/Frameworks/OpenGL.framework/OpenGL")
+ defer C.free(unsafe.Pointer(clib))
+ lib, err := C.dlopen(clib, C.RTLD_NOW|C.RTLD_LOCAL)
+ if err != nil {
+ return nil, err
+ }
+ csym := C.CString("glFlush")
+ defer C.free(unsafe.Pointer(csym))
+ glFlush := C.PFN_glFlush(C.dlsym(lib, csym))
+ if glFlush == nil {
+ return nil, errors.New("gl: missing symbol glFlush in the OpenGL framework")
+ }
+ view := w.contextView()
+ ctx := C.gio_createGLContext()
+ if ctx == 0 {
+ return nil, errors.New("gl: failed to create NSOpenGLContext")
+ }
+ C.gio_setContextView(ctx, view)
+ c := &glContext{
+ ctx: ctx,
+ view: view,
+ glFlush: glFlush,
+ }
+ return c, nil
+}
+
+func (c *glContext) RenderTarget() (gpu.RenderTarget, error) {
+ return gpu.OpenGLRenderTarget{}, nil
+}
+
+func (c *glContext) API() gpu.API {
+ return gpu.OpenGL{}
+}
+
+func (c *glContext) Release() {
+ if c.ctx != 0 {
+ C.gio_clearCurrentContext()
+ C.CFRelease(c.ctx)
+ c.ctx = 0
+ }
+}
+
+func (c *glContext) Present() error {
+ // Assume the caller already locked the context.
+ C.glFlush(c.glFlush)
+ return nil
+}
+
+func (c *glContext) Lock() error {
+ // OpenGL contexts are implicit and thread-local. Lock the OS thread.
+ runtime.LockOSThread()
+
+ C.gio_lockContext(c.ctx)
+ C.gio_makeCurrentContext(c.ctx)
+ return nil
+}
+
+func (c *glContext) Unlock() {
+ C.gio_clearCurrentContext()
+ C.gio_unlockContext(c.ctx)
+}
+
+func (c *glContext) Refresh() error {
+ c.Lock()
+ defer c.Unlock()
+ C.gio_updateContext(c.ctx)
+ return nil
+}
+
+func (w *window) NewContext() (context, error) {
+ return newContext(w)
+}
diff --git a/vendor/gioui.org/app/gl_macos.m b/vendor/gioui.org/app/gl_macos.m
new file mode 100644
index 0000000..fe83743
--- /dev/null
+++ b/vendor/gioui.org/app/gl_macos.m
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// +build darwin,!ios,nometal
+
+@import AppKit;
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <OpenGL/OpenGL.h>
+#include "_cgo_export.h"
+
+CALayer *gio_layerFactory(void) {
+ @autoreleasepool {
+ return [CALayer layer];
+ }
+}
+
+CFTypeRef gio_createGLContext(void) {
+ @autoreleasepool {
+ NSOpenGLPixelFormatAttribute attr[] = {
+ NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
+ NSOpenGLPFAColorSize, 24,
+ NSOpenGLPFAAccelerated,
+ // Opt-in to automatic GPU switching. CGL-only property.
+ kCGLPFASupportsAutomaticGraphicsSwitching,
+ NSOpenGLPFAAllowOfflineRenderers,
+ 0
+ };
+ NSOpenGLPixelFormat *pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];
+
+ NSOpenGLContext *ctx = [[NSOpenGLContext alloc] initWithFormat:pixFormat shareContext: nil];
+ return CFBridgingRetain(ctx);
+ }
+}
+
+void gio_setContextView(CFTypeRef ctxRef, CFTypeRef viewRef) {
+ NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
+ NSView *view = (__bridge NSView *)viewRef;
+ [view setWantsBestResolutionOpenGLSurface:YES];
+ [ctx setView:view];
+}
+
+void gio_clearCurrentContext(void) {
+ @autoreleasepool {
+ [NSOpenGLContext clearCurrentContext];
+ }
+}
+
+void gio_updateContext(CFTypeRef ctxRef) {
+ @autoreleasepool {
+ NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
+ [ctx update];
+ }
+}
+
+void gio_makeCurrentContext(CFTypeRef ctxRef) {
+ @autoreleasepool {
+ NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
+ [ctx makeCurrentContext];
+ }
+}
+
+void gio_lockContext(CFTypeRef ctxRef) {
+ @autoreleasepool {
+ NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
+ CGLLockContext([ctx CGLContextObj]);
+ }
+}
+
+void gio_unlockContext(CFTypeRef ctxRef) {
+ @autoreleasepool {
+ NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
+ CGLUnlockContext([ctx CGLContextObj]);
+ }
+}
diff --git a/vendor/gioui.org/app/internal/d3d11/backend_windows.go b/vendor/gioui.org/app/internal/d3d11/backend_windows.go
deleted file mode 100644
index 48ff175..0000000
--- a/vendor/gioui.org/app/internal/d3d11/backend_windows.go
+++ /dev/null
@@ -1,856 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package d3d11
-
-import (
- "errors"
- "fmt"
- "image"
- "math"
- "unsafe"
-
- "gioui.org/gpu/backend"
- gunsafe "gioui.org/internal/unsafe"
- "golang.org/x/sys/windows"
-)
-
-const debug = false
-
-type Device struct {
- dev *_ID3D11Device
- ctx *_ID3D11DeviceContext
- featLvl uint32
- floatFormat uint32
- depthStates map[depthState]*_ID3D11DepthStencilState
- blendStates map[blendState]*_ID3D11BlendState
-}
-
-type Backend struct {
- // Temporary storage to avoid garbage.
- clearColor [4]float32
- viewport _D3D11_VIEWPORT
- depthState depthState
- blendState blendState
- prog *Program
-
- dev *Device
- caps backend.Caps
-
- // fbo is the currently bound fbo.
- fbo *Framebuffer
-}
-
-type blendState struct {
- enable bool
- sfactor backend.BlendFactor
- dfactor backend.BlendFactor
-}
-
-type depthState struct {
- enable bool
- mask bool
- fn backend.DepthFunc
-}
-
-type Texture struct {
- backend *Backend
- format uint32
- bindings backend.BufferBinding
- tex *_ID3D11Texture2D
- sampler *_ID3D11SamplerState
- resView *_ID3D11ShaderResourceView
- width int
- height int
-}
-
-type Program struct {
- backend *Backend
-
- vert struct {
- shader *_ID3D11VertexShader
- uniforms *Buffer
- }
- frag struct {
- shader *_ID3D11PixelShader
- uniforms *Buffer
- }
-}
-
-type Framebuffer struct {
- dev *Device
- format uint32
- resource *_ID3D11Resource
- renderTarget *_ID3D11RenderTargetView
- depthView *_ID3D11DepthStencilView
- foreign bool
-}
-
-type Buffer struct {
- backend *Backend
- bind uint32
- buf *_ID3D11Buffer
- immutable bool
-}
-
-type InputLayout struct {
- dev *Device
- layout *_ID3D11InputLayout
-}
-
-type SwapChain struct {
- swchain *_IDXGISwapChain
- fbo *Framebuffer
-}
-
-func NewDevice() (*Device, error) {
- var flags uint32
- if debug {
- flags |= _D3D11_CREATE_DEVICE_DEBUG
- }
- d3ddev, d3dctx, featLvl, err := _D3D11CreateDevice(
- _D3D_DRIVER_TYPE_HARDWARE,
- flags,
- )
- if err != nil {
- return nil, fmt.Errorf("NewContext: %v", err)
- }
- dev := &Device{dev: d3ddev, ctx: d3dctx, featLvl: featLvl}
- if featLvl < _D3D_FEATURE_LEVEL_9_1 {
- _IUnknownRelease(unsafe.Pointer(d3ddev), d3ddev.vtbl.Release)
- _IUnknownRelease(unsafe.Pointer(d3dctx), d3dctx.vtbl.Release)
- return nil, fmt.Errorf("d3d11: feature level too low: %d", featLvl)
- }
- floatFormat, ok := detectFloatFormat(d3ddev)
- if !ok {
- _IUnknownRelease(unsafe.Pointer(d3ddev), d3ddev.vtbl.Release)
- _IUnknownRelease(unsafe.Pointer(d3dctx), d3dctx.vtbl.Release)
- return nil, fmt.Errorf("d3d11: no available floating point formats")
- }
- dev.floatFormat = floatFormat
- dev.depthStates = make(map[depthState]*_ID3D11DepthStencilState)
- dev.blendStates = make(map[blendState]*_ID3D11BlendState)
- return dev, nil
-}
-
-func detectFloatFormat(dev *_ID3D11Device) (uint32, bool) {
- formats := []uint32{
- _DXGI_FORMAT_R16_FLOAT,
- _DXGI_FORMAT_R32_FLOAT,
- _DXGI_FORMAT_R16G16_FLOAT,
- _DXGI_FORMAT_R32G32_FLOAT,
- // These last two are really wasteful, but c'est la vie.
- _DXGI_FORMAT_R16G16B16A16_FLOAT,
- _DXGI_FORMAT_R32G32B32A32_FLOAT,
- }
- for _, format := range formats {
- need := uint32(_D3D11_FORMAT_SUPPORT_TEXTURE2D | _D3D11_FORMAT_SUPPORT_RENDER_TARGET)
- if support, _ := dev.CheckFormatSupport(format); support&need == need {
- return format, true
- }
- }
- return 0, false
-}
-
-func (d *Device) CreateSwapChain(hwnd windows.Handle) (*SwapChain, error) {
- dxgiDev, err := _IUnknownQueryInterface(unsafe.Pointer(d.dev), d.dev.vtbl.QueryInterface, &_IID_IDXGIDevice)
- if err != nil {
- return nil, fmt.Errorf("NewContext: %v", err)
- }
- adapter, err := (*_IDXGIDevice)(unsafe.Pointer(dxgiDev)).GetAdapter()
- _IUnknownRelease(unsafe.Pointer(dxgiDev), dxgiDev.vtbl.Release)
- if err != nil {
- return nil, fmt.Errorf("NewContext: %v", err)
- }
- dxgiFactory, err := (*_IDXGIObject)(unsafe.Pointer(adapter)).GetParent(&_IID_IDXGIFactory)
- _IUnknownRelease(unsafe.Pointer(adapter), adapter.vtbl.Release)
- if err != nil {
- return nil, fmt.Errorf("NewContext: %v", err)
- }
- d3dswchain, err := (*_IDXGIFactory)(unsafe.Pointer(dxgiFactory)).CreateSwapChain(
- (*_IUnknown)(unsafe.Pointer(d.dev)),
- &_DXGI_SWAP_CHAIN_DESC{
- BufferDesc: _DXGI_MODE_DESC{
- Format: _DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
- },
- SampleDesc: _DXGI_SAMPLE_DESC{
- Count: 1,
- },
- BufferUsage: _DXGI_USAGE_RENDER_TARGET_OUTPUT,
- BufferCount: 1,
- OutputWindow: hwnd,
- Windowed: 1,
- SwapEffect: _DXGI_SWAP_EFFECT_DISCARD,
- },
- )
- _IUnknownRelease(unsafe.Pointer(dxgiFactory), dxgiFactory.vtbl.Release)
- if err != nil {
- return nil, fmt.Errorf("NewContext: %v", err)
- }
- return &SwapChain{swchain: d3dswchain, fbo: &Framebuffer{}}, nil
-}
-
-func (s *SwapChain) Framebuffer(d *Device) (*Framebuffer, error) {
- if s.fbo.renderTarget != nil {
- return s.fbo, nil
- }
- desc, err := s.swchain.GetDesc()
- if err != nil {
- return nil, err
- }
- backBuffer, err := s.swchain.GetBuffer(0, &_IID_ID3D11Texture2D)
- if err != nil {
- return nil, err
- }
- texture := (*_ID3D11Resource)(unsafe.Pointer(backBuffer))
- renderTarget, err := d.dev.CreateRenderTargetView(texture)
- _IUnknownRelease(unsafe.Pointer(backBuffer), backBuffer.vtbl.Release)
- if err != nil {
- return nil, err
- }
- depthView, err := createDepthView(d.dev, int(desc.BufferDesc.Width), int(desc.BufferDesc.Height), 24)
- if err != nil {
- _IUnknownRelease(unsafe.Pointer(renderTarget), renderTarget.vtbl.Release)
- return nil, err
- }
- s.fbo.renderTarget = renderTarget
- s.fbo.depthView = depthView
- s.fbo.dev = d
- return s.fbo, nil
-}
-
-func (d *Device) Release() {
- _IUnknownRelease(unsafe.Pointer(d.ctx), d.ctx.vtbl.Release)
- _IUnknownRelease(unsafe.Pointer(d.dev), d.dev.vtbl.Release)
- d.ctx = nil
- d.dev = nil
- for _, state := range d.depthStates {
- _IUnknownRelease(unsafe.Pointer(state), state.vtbl.Release)
- }
- d.depthStates = nil
- for _, state := range d.blendStates {
- _IUnknownRelease(unsafe.Pointer(state), state.vtbl.Release)
- }
- d.blendStates = nil
-}
-
-func (s *SwapChain) Resize() error {
- if s.fbo.renderTarget != nil {
- s.fbo.Release()
- }
- return s.swchain.ResizeBuffers(0, 0, 0, _DXGI_FORMAT_UNKNOWN, 0)
-}
-
-func (s *SwapChain) Release() {
- _IUnknownRelease(unsafe.Pointer(s.swchain), s.swchain.vtbl.Release)
-}
-
-func (s *SwapChain) Present() error {
- return s.swchain.Present(1, 0)
-}
-
-func NewBackend(d *Device) (*Backend, error) {
- caps := backend.Caps{
- MaxTextureSize: 2048, // 9.1 maximum
- }
- switch {
- case d.featLvl >= _D3D_FEATURE_LEVEL_11_0:
- caps.MaxTextureSize = 16384
- case d.featLvl >= _D3D_FEATURE_LEVEL_9_3:
- caps.MaxTextureSize = 4096
- }
- b := &Backend{dev: d, caps: caps}
- // Disable backface culling to match OpenGL.
- state, err := b.dev.dev.CreateRasterizerState(&_D3D11_RASTERIZER_DESC{
- CullMode: _D3D11_CULL_NONE,
- FillMode: _D3D11_FILL_SOLID,
- DepthClipEnable: 1,
- })
- // Enable depth mask to match OpenGL.
- b.depthState.mask = true
- if err != nil {
- return nil, err
- }
- b.dev.ctx.RSSetState(state)
- _IUnknownRelease(unsafe.Pointer(state), state.vtbl.Release)
- return b, nil
-}
-
-func (b *Backend) BeginFrame() {
-}
-
-func (b *Backend) EndFrame() {
-}
-
-func (b *Backend) Caps() backend.Caps {
- return b.caps
-}
-
-func (b *Backend) NewTimer() backend.Timer {
- panic("timers not supported")
-}
-
-func (b *Backend) IsTimeContinuous() bool {
- panic("timers not supported")
-}
-
-func (b *Backend) NewTexture(format backend.TextureFormat, width, height int, minFilter, magFilter backend.TextureFilter, bindings backend.BufferBinding) (backend.Texture, error) {
- var d3dfmt uint32
- switch format {
- case backend.TextureFormatFloat:
- d3dfmt = b.dev.floatFormat
- case backend.TextureFormatSRGB:
- d3dfmt = _DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
- default:
- return nil, fmt.Errorf("unsupported texture format %d", format)
- }
- tex, err := b.dev.dev.CreateTexture2D(&_D3D11_TEXTURE2D_DESC{
- Width: uint32(width),
- Height: uint32(height),
- MipLevels: 1,
- ArraySize: 1,
- Format: d3dfmt,
- SampleDesc: _DXGI_SAMPLE_DESC{
- Count: 1,
- Quality: 0,
- },
- BindFlags: convBufferBinding(bindings),
- })
- if err != nil {
- return nil, err
- }
- var (
- sampler *_ID3D11SamplerState
- resView *_ID3D11ShaderResourceView
- )
- if bindings&backend.BufferBindingTexture != 0 {
- var filter uint32
- switch {
- case minFilter == backend.FilterNearest && magFilter == backend.FilterNearest:
- filter = _D3D11_FILTER_MIN_MAG_MIP_POINT
- case minFilter == backend.FilterLinear && magFilter == backend.FilterLinear:
- filter = _D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT
- default:
- _IUnknownRelease(unsafe.Pointer(tex), tex.vtbl.Release)
- return nil, fmt.Errorf("unsupported texture filter combination %d, %d", minFilter, magFilter)
- }
- var err error
- sampler, err = b.dev.dev.CreateSamplerState(&_D3D11_SAMPLER_DESC{
- Filter: filter,
- AddressU: _D3D11_TEXTURE_ADDRESS_CLAMP,
- AddressV: _D3D11_TEXTURE_ADDRESS_CLAMP,
- AddressW: _D3D11_TEXTURE_ADDRESS_CLAMP,
- MaxAnisotropy: 1,
- MinLOD: -math.MaxFloat32,
- MaxLOD: math.MaxFloat32,
- })
- if err != nil {
- _IUnknownRelease(unsafe.Pointer(tex), tex.vtbl.Release)
- return nil, err
- }
- resView, err = b.dev.dev.CreateShaderResourceViewTEX2D(
- (*_ID3D11Resource)(unsafe.Pointer(tex)),
- &_D3D11_SHADER_RESOURCE_VIEW_DESC_TEX2D{
- _D3D11_SHADER_RESOURCE_VIEW_DESC: _D3D11_SHADER_RESOURCE_VIEW_DESC{
- Format: d3dfmt,
- ViewDimension: _D3D11_SRV_DIMENSION_TEXTURE2D,
- },
- Texture2D: _D3D11_TEX2D_SRV{
- MostDetailedMip: 0,
- MipLevels: ^uint32(0),
- },
- },
- )
- if err != nil {
- _IUnknownRelease(unsafe.Pointer(tex), tex.vtbl.Release)
- _IUnknownRelease(unsafe.Pointer(sampler), sampler.vtbl.Release)
- return nil, err
- }
- }
- return &Texture{backend: b, format: d3dfmt, tex: tex, sampler: sampler, resView: resView, bindings: bindings, width: width, height: height}, nil
-}
-
-func (b *Backend) CurrentFramebuffer() backend.Framebuffer {
- renderTarget := b.dev.ctx.OMGetRenderTargets()
- if renderTarget != nil {
- // Assume someone else is holding on to it.
- _IUnknownRelease(unsafe.Pointer(renderTarget), renderTarget.vtbl.Release)
- }
- if renderTarget == b.fbo.renderTarget {
- return b.fbo
- }
- return &Framebuffer{dev: b.dev, renderTarget: renderTarget, foreign: true}
-}
-
-func (b *Backend) NewFramebuffer(tex backend.Texture, depthBits int) (backend.Framebuffer, error) {
- d3dtex := tex.(*Texture)
- if d3dtex.bindings&backend.BufferBindingFramebuffer == 0 {
- return nil, errors.New("the texture was created without BufferBindingFramebuffer binding")
- }
- resource := (*_ID3D11Resource)(unsafe.Pointer(d3dtex.tex))
- renderTarget, err := b.dev.dev.CreateRenderTargetView(resource)
- if err != nil {
- return nil, err
- }
- fbo := &Framebuffer{dev: b.dev, format: d3dtex.format, resource: resource, renderTarget: renderTarget}
- if depthBits > 0 {
- depthView, err := createDepthView(b.dev.dev, d3dtex.width, d3dtex.height, depthBits)
- if err != nil {
- _IUnknownRelease(unsafe.Pointer(renderTarget), renderTarget.vtbl.Release)
- return nil, err
- }
- fbo.depthView = depthView
- }
- return fbo, nil
-}
-
-func createDepthView(d *_ID3D11Device, width, height, depthBits int) (*_ID3D11DepthStencilView, error) {
- depthTex, err := d.CreateTexture2D(&_D3D11_TEXTURE2D_DESC{
- Width: uint32(width),
- Height: uint32(height),
- MipLevels: 1,
- ArraySize: 1,
- Format: _DXGI_FORMAT_D24_UNORM_S8_UINT,
- SampleDesc: _DXGI_SAMPLE_DESC{
- Count: 1,
- Quality: 0,
- },
- BindFlags: _D3D11_BIND_DEPTH_STENCIL,
- })
- if err != nil {
- return nil, err
- }
- depthView, err := d.CreateDepthStencilViewTEX2D(
- (*_ID3D11Resource)(unsafe.Pointer(depthTex)),
- &_D3D11_DEPTH_STENCIL_VIEW_DESC_TEX2D{
- Format: _DXGI_FORMAT_D24_UNORM_S8_UINT,
- ViewDimension: _D3D11_DSV_DIMENSION_TEXTURE2D,
- },
- )
- _IUnknownRelease(unsafe.Pointer(depthTex), depthTex.vtbl.Release)
- return depthView, err
-}
-
-func (b *Backend) NewInputLayout(vertexShader backend.ShaderSources, layout []backend.InputDesc) (backend.InputLayout, error) {
- if len(vertexShader.Inputs) != len(layout) {
- return nil, fmt.Errorf("NewInputLayout: got %d inputs, expected %d", len(layout), len(vertexShader.Inputs))
- }
- descs := make([]_D3D11_INPUT_ELEMENT_DESC, len(layout))
- for i, l := range layout {
- inp := vertexShader.Inputs[i]
- cname, err := windows.BytePtrFromString(inp.Semantic)
- if err != nil {
- return nil, err
- }
- var format uint32
- switch l.Type {
- case backend.DataTypeFloat:
- switch l.Size {
- case 1:
- format = _DXGI_FORMAT_R32_FLOAT
- case 2:
- format = _DXGI_FORMAT_R32G32_FLOAT
- case 3:
- format = _DXGI_FORMAT_R32G32B32_FLOAT
- case 4:
- format = _DXGI_FORMAT_R32G32B32A32_FLOAT
- default:
- panic("unsupported float data size")
- }
- case backend.DataTypeShort:
- switch l.Size {
- case 1:
- format = _DXGI_FORMAT_R16_SINT
- case 2:
- format = _DXGI_FORMAT_R16G16_SINT
- default:
- panic("unsupported float data size")
- }
- default:
- panic("unsupported data type")
- }
- descs[i] = _D3D11_INPUT_ELEMENT_DESC{
- SemanticName: cname,
- SemanticIndex: uint32(inp.SemanticIndex),
- Format: format,
- AlignedByteOffset: uint32(l.Offset),
- }
- }
- l, err := b.dev.dev.CreateInputLayout(descs, vertexShader.HLSL)
- if err != nil {
- return nil, err
- }
- return &InputLayout{dev: b.dev, layout: l}, nil
-}
-
-func (b *Backend) NewBuffer(typ backend.BufferBinding, size int) (backend.Buffer, error) {
- if typ&backend.BufferBindingUniforms != 0 {
- if typ != backend.BufferBindingUniforms {
- return nil, errors.New("uniform buffers cannot have other bindings")
- }
- if size%16 != 0 {
- return nil, fmt.Errorf("constant buffer size is %d, expected a multiple of 16", size)
- }
- }
- bind := convBufferBinding(typ)
- buf, err := b.dev.dev.CreateBuffer(&_D3D11_BUFFER_DESC{
- ByteWidth: uint32(size),
- BindFlags: bind,
- }, nil)
- if err != nil {
- return nil, err
- }
- return &Buffer{backend: b, buf: buf, bind: bind}, nil
-}
-
-func (b *Backend) NewImmutableBuffer(typ backend.BufferBinding, data []byte) (backend.Buffer, error) {
- if typ&backend.BufferBindingUniforms != 0 {
- if typ != backend.BufferBindingUniforms {
- return nil, errors.New("uniform buffers cannot have other bindings")
- }
- if len(data)%16 != 0 {
- return nil, fmt.Errorf("constant buffer size is %d, expected a multiple of 16", len(data))
- }
- }
- bind := convBufferBinding(typ)
- buf, err := b.dev.dev.CreateBuffer(&_D3D11_BUFFER_DESC{
- ByteWidth: uint32(len(data)),
- Usage: _D3D11_USAGE_IMMUTABLE,
- BindFlags: bind,
- }, data)
- if err != nil {
- return nil, err
- }
- return &Buffer{backend: b, buf: buf, bind: bind, immutable: true}, nil
-}
-
-func (b *Backend) NewProgram(vertexShader, fragmentShader backend.ShaderSources) (backend.Program, error) {
- vs, err := b.dev.dev.CreateVertexShader(vertexShader.HLSL)
- if err != nil {
- return nil, err
- }
- ps, err := b.dev.dev.CreatePixelShader(fragmentShader.HLSL)
- if err != nil {
- return nil, err
- }
- p := &Program{backend: b}
- p.vert.shader = vs
- p.frag.shader = ps
- return p, nil
-}
-
-func (b *Backend) Clear(colr, colg, colb, cola float32) {
- b.clearColor = [4]float32{colr, colg, colb, cola}
- b.dev.ctx.ClearRenderTargetView(b.fbo.renderTarget, &b.clearColor)
-}
-
-func (b *Backend) ClearDepth(depth float32) {
- if b.fbo.depthView != nil {
- b.dev.ctx.ClearDepthStencilView(b.fbo.depthView, _D3D11_CLEAR_DEPTH|_D3D11_CLEAR_STENCIL, depth, 0)
- }
-}
-
-func (b *Backend) Viewport(x, y, width, height int) {
- b.viewport = _D3D11_VIEWPORT{
- TopLeftX: float32(x),
- TopLeftY: float32(y),
- Width: float32(width),
- Height: float32(height),
- MinDepth: 0.0,
- MaxDepth: 1.0,
- }
- b.dev.ctx.RSSetViewports(&b.viewport)
-}
-
-func (b *Backend) DrawArrays(mode backend.DrawMode, off, count int) {
- b.prepareDraw(mode)
- b.dev.ctx.Draw(uint32(count), uint32(off))
-}
-
-func (b *Backend) DrawElements(mode backend.DrawMode, off, count int) {
- b.prepareDraw(mode)
- b.dev.ctx.DrawIndexed(uint32(count), uint32(off), 0)
-}
-
-func (b *Backend) prepareDraw(mode backend.DrawMode) {
- if p := b.prog; p != nil {
- b.dev.ctx.VSSetShader(p.vert.shader)
- b.dev.ctx.PSSetShader(p.frag.shader)
- if buf := p.vert.uniforms; buf != nil {
- b.dev.ctx.VSSetConstantBuffers(buf.buf)
- }
- if buf := p.frag.uniforms; buf != nil {
- b.dev.ctx.PSSetConstantBuffers(buf.buf)
- }
- }
- var topology uint32
- switch mode {
- case backend.DrawModeTriangles:
- topology = _D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST
- case backend.DrawModeTriangleStrip:
- topology = _D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP
- default:
- panic("unsupported draw mode")
- }
- b.dev.ctx.IASetPrimitiveTopology(topology)
-
- depthState, ok := b.dev.depthStates[b.depthState]
- if !ok {
- var desc _D3D11_DEPTH_STENCIL_DESC
- if b.depthState.enable {
- desc.DepthEnable = 1
- }
- if b.depthState.mask {
- desc.DepthWriteMask = _D3D11_DEPTH_WRITE_MASK_ALL
- }
- switch b.depthState.fn {
- case backend.DepthFuncGreater:
- desc.DepthFunc = _D3D11_COMPARISON_GREATER
- case backend.DepthFuncGreaterEqual:
- desc.DepthFunc = _D3D11_COMPARISON_GREATER_EQUAL
- default:
- panic("unsupported depth func")
- }
- var err error
- depthState, err = b.dev.dev.CreateDepthStencilState(&desc)
- if err != nil {
- panic(err)
- }
- b.dev.depthStates[b.depthState] = depthState
- }
- b.dev.ctx.OMSetDepthStencilState(depthState, 0)
-
- blendState, ok := b.dev.blendStates[b.blendState]
- if !ok {
- var desc _D3D11_BLEND_DESC
- t0 := &desc.RenderTarget[0]
- t0.RenderTargetWriteMask = _D3D11_COLOR_WRITE_ENABLE_ALL
- t0.BlendOp = _D3D11_BLEND_OP_ADD
- t0.BlendOpAlpha = _D3D11_BLEND_OP_ADD
- if b.blendState.enable {
- t0.BlendEnable = 1
- }
- scol, salpha := toBlendFactor(b.blendState.sfactor)
- dcol, dalpha := toBlendFactor(b.blendState.dfactor)
- t0.SrcBlend = scol
- t0.SrcBlendAlpha = salpha
- t0.DestBlend = dcol
- t0.DestBlendAlpha = dalpha
- var err error
- blendState, err = b.dev.dev.CreateBlendState(&desc)
- if err != nil {
- panic(err)
- }
- b.dev.blendStates[b.blendState] = blendState
- }
- b.dev.ctx.OMSetBlendState(blendState, nil, 0xffffffff)
-}
-
-func (b *Backend) DepthFunc(f backend.DepthFunc) {
- b.depthState.fn = f
-}
-
-func (b *Backend) SetBlend(enable bool) {
- b.blendState.enable = enable
-}
-
-func (b *Backend) SetDepthTest(enable bool) {
- b.depthState.enable = enable
-}
-
-func (b *Backend) DepthMask(mask bool) {
- b.depthState.mask = mask
-}
-
-func (b *Backend) BlendFunc(sfactor, dfactor backend.BlendFactor) {
- b.blendState.sfactor = sfactor
- b.blendState.dfactor = dfactor
-}
-
-func (t *Texture) Upload(img *image.RGBA) {
- b := img.Bounds()
- w := b.Dx()
- if img.Stride != w*4 {
- panic("unsupported stride")
- }
- start := (b.Min.X + b.Min.Y*w) * 4
- end := (b.Max.X + (b.Max.Y-1)*w) * 4
- pixels := img.Pix[start:end]
- res := (*_ID3D11Resource)(unsafe.Pointer(t.tex))
- t.backend.dev.ctx.UpdateSubresource(res, uint32(img.Stride), uint32(len(pixels)), pixels)
-}
-
-func (t *Texture) Release() {
- _IUnknownRelease(unsafe.Pointer(t.tex), t.tex.vtbl.Release)
- t.tex = nil
- if t.sampler != nil {
- _IUnknownRelease(unsafe.Pointer(t.sampler), t.sampler.vtbl.Release)
- t.sampler = nil
- }
- if t.resView != nil {
- _IUnknownRelease(unsafe.Pointer(t.resView), t.resView.vtbl.Release)
- t.resView = nil
- }
-}
-
-func (b *Backend) BindTexture(unit int, tex backend.Texture) {
- t := tex.(*Texture)
- b.dev.ctx.PSSetSamplers(uint32(unit), t.sampler)
- b.dev.ctx.PSSetShaderResources(uint32(unit), t.resView)
-}
-
-func (b *Backend) BindProgram(prog backend.Program) {
- b.prog = prog.(*Program)
-}
-
-func (p *Program) Release() {
- _IUnknownRelease(unsafe.Pointer(p.vert.shader), p.vert.shader.vtbl.Release)
- _IUnknownRelease(unsafe.Pointer(p.frag.shader), p.frag.shader.vtbl.Release)
- p.vert.shader = nil
- p.frag.shader = nil
-}
-
-func (p *Program) SetVertexUniforms(buf backend.Buffer) {
- p.vert.uniforms = buf.(*Buffer)
-}
-
-func (p *Program) SetFragmentUniforms(buf backend.Buffer) {
- p.frag.uniforms = buf.(*Buffer)
-}
-
-func (b *Backend) BindVertexBuffer(buf backend.Buffer, stride, offset int) {
- b.dev.ctx.IASetVertexBuffers(buf.(*Buffer).buf, uint32(stride), uint32(offset))
-}
-
-func (b *Backend) BindIndexBuffer(buf backend.Buffer) {
- b.dev.ctx.IASetIndexBuffer(buf.(*Buffer).buf, _DXGI_FORMAT_R16_UINT, 0)
-}
-
-func (b *Buffer) Upload(data []byte) {
- b.backend.dev.ctx.UpdateSubresource((*_ID3D11Resource)(unsafe.Pointer(b.buf)), 0, 0, data)
-}
-
-func (b *Buffer) Release() {
- _IUnknownRelease(unsafe.Pointer(b.buf), b.buf.vtbl.Release)
- b.buf = nil
-}
-
-func (f *Framebuffer) ReadPixels(src image.Rectangle, pixels []byte) error {
- if f.resource == nil {
- return errors.New("framebuffer does not support ReadPixels")
- }
- w, h := src.Dx(), src.Dy()
- tex, err := f.dev.dev.CreateTexture2D(&_D3D11_TEXTURE2D_DESC{
- Width: uint32(w),
- Height: uint32(h),
- MipLevels: 1,
- ArraySize: 1,
- Format: f.format,
- SampleDesc: _DXGI_SAMPLE_DESC{
- Count: 1,
- Quality: 0,
- },
- Usage: _D3D11_USAGE_STAGING,
- CPUAccessFlags: _D3D11_CPU_ACCESS_READ,
- })
- if err != nil {
- return fmt.Errorf("ReadPixels: %v", err)
- }
- defer _IUnknownRelease(unsafe.Pointer(tex), tex.vtbl.Release)
- res := (*_ID3D11Resource)(unsafe.Pointer(tex))
- f.dev.ctx.CopySubresourceRegion(
- res,
- 0, // Destination subresource.
- 0, 0, 0, // Destination coordinates (x, y, z).
- f.resource,
- 0, // Source subresource.
- &_D3D11_BOX{
- left: uint32(src.Min.X),
- top: uint32(src.Min.Y),
- right: uint32(src.Max.X),
- bottom: uint32(src.Max.Y),
- front: 0,
- back: 1,
- },
- )
- resMap, err := f.dev.ctx.Map(res, 0, _D3D11_MAP_READ, 0)
- if err != nil {
- return fmt.Errorf("ReadPixels: %v", err)
- }
- defer f.dev.ctx.Unmap(res, 0)
- srcPitch := w * 4
- dstPitch := int(resMap.RowPitch)
- mapSize := dstPitch * h
- data := gunsafe.SliceOf(resMap.pData)[:mapSize:mapSize]
- width := w * 4
- for r := 0; r < h; r++ {
- pixels := pixels[r*srcPitch:]
- copy(pixels[:width], data[r*dstPitch:])
- }
- return nil
-}
-
-func (b *Backend) BindFramebuffer(fbo backend.Framebuffer) {
- b.fbo = fbo.(*Framebuffer)
- b.dev.ctx.OMSetRenderTargets(b.fbo.renderTarget, b.fbo.depthView)
-}
-
-func (f *Framebuffer) Invalidate() {
-}
-
-func (f *Framebuffer) Release() {
- if f.foreign {
- panic("cannot release Framebuffer from CurrentFramebuffer")
- }
- if f.renderTarget != nil {
- _IUnknownRelease(unsafe.Pointer(f.renderTarget), f.renderTarget.vtbl.Release)
- f.renderTarget = nil
- }
- if f.depthView != nil {
- _IUnknownRelease(unsafe.Pointer(f.depthView), f.depthView.vtbl.Release)
- f.depthView = nil
- }
-}
-
-func (b *Backend) BindInputLayout(layout backend.InputLayout) {
- b.dev.ctx.IASetInputLayout(layout.(*InputLayout).layout)
-}
-
-func (l *InputLayout) Release() {
- _IUnknownRelease(unsafe.Pointer(l.layout), l.layout.vtbl.Release)
- l.layout = nil
-}
-
-func convBufferBinding(typ backend.BufferBinding) uint32 {
- var bindings uint32
- if typ&backend.BufferBindingVertices != 0 {
- bindings |= _D3D11_BIND_VERTEX_BUFFER
- }
- if typ&backend.BufferBindingIndices != 0 {
- bindings |= _D3D11_BIND_INDEX_BUFFER
- }
- if typ&backend.BufferBindingUniforms != 0 {
- bindings |= _D3D11_BIND_CONSTANT_BUFFER
- }
- if typ&backend.BufferBindingTexture != 0 {
- bindings |= _D3D11_BIND_SHADER_RESOURCE
- }
- if typ&backend.BufferBindingFramebuffer != 0 {
- bindings |= _D3D11_BIND_RENDER_TARGET
- }
- return bindings
-}
-
-func toBlendFactor(f backend.BlendFactor) (uint32, uint32) {
- switch f {
- case backend.BlendFactorOne:
- return _D3D11_BLEND_ONE, _D3D11_BLEND_ONE
- case backend.BlendFactorOneMinusSrcAlpha:
- return _D3D11_BLEND_INV_SRC_ALPHA, _D3D11_BLEND_INV_SRC_ALPHA
- case backend.BlendFactorZero:
- return _D3D11_BLEND_ZERO, _D3D11_BLEND_ZERO
- case backend.BlendFactorDstColor:
- return _D3D11_BLEND_DEST_COLOR, _D3D11_BLEND_DEST_ALPHA
- default:
- panic("unsupported blend source factor")
- }
-}
diff --git a/vendor/gioui.org/app/internal/glimpl/gl.go b/vendor/gioui.org/app/internal/glimpl/gl.go
deleted file mode 100644
index 5b23e4e..0000000
--- a/vendor/gioui.org/app/internal/glimpl/gl.go
+++ /dev/null
@@ -1,541 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build darwin linux freebsd openbsd
-
-package glimpl
-
-import (
- "runtime"
- "strings"
- "unsafe"
-
- "gioui.org/gpu/gl"
-)
-
-/*
-#cgo CFLAGS: -Werror
-#cgo linux,!android pkg-config: glesv2
-#cgo linux freebsd LDFLAGS: -ldl
-#cgo freebsd openbsd android LDFLAGS: -lGLESv2
-#cgo freebsd CFLAGS: -I/usr/local/include
-#cgo freebsd LDFLAGS: -L/usr/local/lib
-#cgo openbsd CFLAGS: -I/usr/X11R6/include
-#cgo openbsd LDFLAGS: -L/usr/X11R6/lib
-#cgo darwin,!ios CFLAGS: -DGL_SILENCE_DEPRECATION
-#cgo darwin,!ios LDFLAGS: -framework OpenGL
-#cgo darwin,ios CFLAGS: -DGLES_SILENCE_DEPRECATION
-#cgo darwin,ios LDFLAGS: -framework OpenGLES
-
-#include <stdlib.h>
-
-#ifdef __APPLE__
- #include "TargetConditionals.h"
- #if TARGET_OS_IPHONE
- #include <OpenGLES/ES3/gl.h>
- #else
- #include <OpenGL/gl3.h>
- #endif
-#else
-#define __USE_GNU
-#include <dlfcn.h>
-#include <GLES2/gl2.h>
-#include <GLES3/gl3.h>
-#endif
-
-static void (*_glBindBufferBase)(GLenum target, GLuint index, GLuint buffer);
-static GLuint (*_glGetUniformBlockIndex)(GLuint program, const GLchar *uniformBlockName);
-static void (*_glUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-static void (*_glInvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum *attachments);
-
-static void (*_glBeginQuery)(GLenum target, GLuint id);
-static void (*_glDeleteQueries)(GLsizei n, const GLuint *ids);
-static void (*_glEndQuery)(GLenum target);
-static void (*_glGenQueries)(GLsizei n, GLuint *ids);
-static void (*_glGetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params);
-static const GLubyte* (*_glGetStringi)(GLenum name, GLuint index);
-
-// The pointer-free version of glVertexAttribPointer, to avoid the Cgo pointer checks.
-__attribute__ ((visibility ("hidden"))) void gio_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uintptr_t offset) {
- glVertexAttribPointer(index, size, type, normalized, stride, (const GLvoid *)offset);
-}
-
-// The pointer-free version of glDrawElements, to avoid the Cgo pointer checks.
-__attribute__ ((visibility ("hidden"))) void gio_glDrawElements(GLenum mode, GLsizei count, GLenum type, const uintptr_t offset) {
- glDrawElements(mode, count, type, (const GLvoid *)offset);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) {
- _glBindBufferBase(target, index, buffer);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
- _glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
-}
-
-__attribute__ ((visibility ("hidden"))) GLuint gio_glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) {
- return _glGetUniformBlockIndex(program, uniformBlockName);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glInvalidateFramebuffer(GLenum target, GLenum attachment) {
- // gl.Framebuffer invalidation is just a hint and can safely be ignored.
- if (_glInvalidateFramebuffer != NULL) {
- _glInvalidateFramebuffer(target, 1, &attachment);
- }
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glBeginQuery(GLenum target, GLenum attachment) {
- _glBeginQuery(target, attachment);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glDeleteQueries(GLsizei n, const GLuint *ids) {
- _glDeleteQueries(n, ids);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glEndQuery(GLenum target) {
- _glEndQuery(target);
-}
-
-__attribute__ ((visibility ("hidden"))) const GLubyte* gio_glGetStringi(GLenum name, GLuint index) {
- if (_glGetStringi == NULL) {
- return NULL;
- }
- return _glGetStringi(name, index);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glGenQueries(GLsizei n, GLuint *ids) {
- _glGenQueries(n, ids);
-}
-
-__attribute__ ((visibility ("hidden"))) void gio_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) {
- _glGetQueryObjectuiv(id, pname, params);
-}
-
-__attribute__((constructor)) static void gio_loadGLFunctions() {
-#ifdef __APPLE__
- #if TARGET_OS_IPHONE
- _glInvalidateFramebuffer = glInvalidateFramebuffer;
- _glBeginQuery = glBeginQuery;
- _glDeleteQueries = glDeleteQueries;
- _glEndQuery = glEndQuery;
- _glGenQueries = glGenQueries;
- _glGetQueryObjectuiv = glGetQueryObjectuiv;
- #endif
- _glBindBufferBase = glBindBufferBase;
- _glGetUniformBlockIndex = glGetUniformBlockIndex;
- _glUniformBlockBinding = glUniformBlockBinding;
- _glGetStringi = glGetStringi;
-#else
- // Load libGLESv3 if available.
- dlopen("libGLESv3.so", RTLD_NOW | RTLD_GLOBAL);
- _glBindBufferBase = dlsym(RTLD_DEFAULT, "glBindBufferBase");
- _glGetUniformBlockIndex = dlsym(RTLD_DEFAULT, "glGetUniformBlockIndex");
- _glUniformBlockBinding = dlsym(RTLD_DEFAULT, "glUniformBlockBinding");
- _glInvalidateFramebuffer = dlsym(RTLD_DEFAULT, "glInvalidateFramebuffer");
- _glGetStringi = dlsym(RTLD_DEFAULT, "glGetStringi");
- // Fall back to EXT_invalidate_framebuffer if available.
- if (_glInvalidateFramebuffer == NULL) {
- _glInvalidateFramebuffer = dlsym(RTLD_DEFAULT, "glDiscardFramebufferEXT");
- }
-
- _glBeginQuery = dlsym(RTLD_DEFAULT, "glBeginQuery");
- if (_glBeginQuery == NULL)
- _glBeginQuery = dlsym(RTLD_DEFAULT, "glBeginQueryEXT");
- _glDeleteQueries = dlsym(RTLD_DEFAULT, "glDeleteQueries");
- if (_glDeleteQueries == NULL)
- _glDeleteQueries = dlsym(RTLD_DEFAULT, "glDeleteQueriesEXT");
- _glEndQuery = dlsym(RTLD_DEFAULT, "glEndQuery");
- if (_glEndQuery == NULL)
- _glEndQuery = dlsym(RTLD_DEFAULT, "glEndQueryEXT");
- _glGenQueries = dlsym(RTLD_DEFAULT, "glGenQueries");
- if (_glGenQueries == NULL)
- _glGenQueries = dlsym(RTLD_DEFAULT, "glGenQueriesEXT");
- _glGetQueryObjectuiv = dlsym(RTLD_DEFAULT, "glGetQueryObjectuiv");
- if (_glGetQueryObjectuiv == NULL)
- _glGetQueryObjectuiv = dlsym(RTLD_DEFAULT, "glGetQueryObjectuivEXT");
-#endif
-}
-*/
-import "C"
-
-type Functions struct {
- // gl.Query caches.
- uints [100]C.GLuint
- ints [100]C.GLint
-}
-
-func (f *Functions) ActiveTexture(texture gl.Enum) {
- C.glActiveTexture(C.GLenum(texture))
-}
-
-func (f *Functions) AttachShader(p gl.Program, s gl.Shader) {
- C.glAttachShader(C.GLuint(p.V), C.GLuint(s.V))
-}
-
-func (f *Functions) BeginQuery(target gl.Enum, query gl.Query) {
- C.gio_glBeginQuery(C.GLenum(target), C.GLenum(query.V))
-}
-
-func (f *Functions) BindAttribLocation(p gl.Program, a gl.Attrib, name string) {
- cname := C.CString(name)
- defer C.free(unsafe.Pointer(cname))
- C.glBindAttribLocation(C.GLuint(p.V), C.GLuint(a), cname)
-}
-
-func (f *Functions) BindBufferBase(target gl.Enum, index int, b gl.Buffer) {
- C.gio_glBindBufferBase(C.GLenum(target), C.GLuint(index), C.GLuint(b.V))
-}
-
-func (f *Functions) BindBuffer(target gl.Enum, b gl.Buffer) {
- C.glBindBuffer(C.GLenum(target), C.GLuint(b.V))
-}
-
-func (f *Functions) BindFramebuffer(target gl.Enum, fb gl.Framebuffer) {
- C.glBindFramebuffer(C.GLenum(target), C.GLuint(fb.V))
-}
-
-func (f *Functions) BindRenderbuffer(target gl.Enum, fb gl.Renderbuffer) {
- C.glBindRenderbuffer(C.GLenum(target), C.GLuint(fb.V))
-}
-
-func (f *Functions) BindTexture(target gl.Enum, t gl.Texture) {
- C.glBindTexture(C.GLenum(target), C.GLuint(t.V))
-}
-
-func (f *Functions) BlendEquation(mode gl.Enum) {
- C.glBlendEquation(C.GLenum(mode))
-}
-
-func (f *Functions) BlendFunc(sfactor, dfactor gl.Enum) {
- C.glBlendFunc(C.GLenum(sfactor), C.GLenum(dfactor))
-}
-
-func (f *Functions) BufferData(target gl.Enum, src []byte, usage gl.Enum) {
- var p unsafe.Pointer
- if len(src) > 0 {
- p = unsafe.Pointer(&src[0])
- }
- C.glBufferData(C.GLenum(target), C.GLsizeiptr(len(src)), p, C.GLenum(usage))
-}
-
-func (f *Functions) CheckFramebufferStatus(target gl.Enum) gl.Enum {
- return gl.Enum(C.glCheckFramebufferStatus(C.GLenum(target)))
-}
-
-func (f *Functions) Clear(mask gl.Enum) {
- C.glClear(C.GLbitfield(mask))
-}
-
-func (f *Functions) ClearColor(red float32, green float32, blue float32, alpha float32) {
- C.glClearColor(C.GLfloat(red), C.GLfloat(green), C.GLfloat(blue), C.GLfloat(alpha))
-}
-
-func (f *Functions) ClearDepthf(d float32) {
- C.glClearDepthf(C.GLfloat(d))
-}
-
-func (f *Functions) CompileShader(s gl.Shader) {
- C.glCompileShader(C.GLuint(s.V))
-}
-
-func (f *Functions) CreateBuffer() gl.Buffer {
- C.glGenBuffers(1, &f.uints[0])
- return gl.Buffer{uint(f.uints[0])}
-}
-
-func (f *Functions) CreateFramebuffer() gl.Framebuffer {
- C.glGenFramebuffers(1, &f.uints[0])
- return gl.Framebuffer{uint(f.uints[0])}
-}
-
-func (f *Functions) CreateProgram() gl.Program {
- return gl.Program{uint(C.glCreateProgram())}
-}
-
-func (f *Functions) CreateQuery() gl.Query {
- C.gio_glGenQueries(1, &f.uints[0])
- return gl.Query{uint(f.uints[0])}
-}
-
-func (f *Functions) CreateRenderbuffer() gl.Renderbuffer {
- C.glGenRenderbuffers(1, &f.uints[0])
- return gl.Renderbuffer{uint(f.uints[0])}
-}
-
-func (f *Functions) CreateShader(ty gl.Enum) gl.Shader {
- return gl.Shader{uint(C.glCreateShader(C.GLenum(ty)))}
-}
-
-func (f *Functions) CreateTexture() gl.Texture {
- C.glGenTextures(1, &f.uints[0])
- return gl.Texture{uint(f.uints[0])}
-}
-
-func (f *Functions) DeleteBuffer(v gl.Buffer) {
- f.uints[0] = C.GLuint(v.V)
- C.glDeleteBuffers(1, &f.uints[0])
-}
-
-func (f *Functions) DeleteFramebuffer(v gl.Framebuffer) {
- f.uints[0] = C.GLuint(v.V)
- C.glDeleteFramebuffers(1, &f.uints[0])
-}
-
-func (f *Functions) DeleteProgram(p gl.Program) {
- C.glDeleteProgram(C.GLuint(p.V))
-}
-
-func (f *Functions) DeleteQuery(query gl.Query) {
- f.uints[0] = C.GLuint(query.V)
- C.gio_glDeleteQueries(1, &f.uints[0])
-}
-
-func (f *Functions) DeleteRenderbuffer(v gl.Renderbuffer) {
- f.uints[0] = C.GLuint(v.V)
- C.glDeleteRenderbuffers(1, &f.uints[0])
-}
-
-func (f *Functions) DeleteShader(s gl.Shader) {
- C.glDeleteShader(C.GLuint(s.V))
-}
-
-func (f *Functions) DeleteTexture(v gl.Texture) {
- f.uints[0] = C.GLuint(v.V)
- C.glDeleteTextures(1, &f.uints[0])
-}
-
-func (f *Functions) DepthFunc(v gl.Enum) {
- C.glDepthFunc(C.GLenum(v))
-}
-
-func (f *Functions) DepthMask(mask bool) {
- m := C.GLboolean(C.GL_FALSE)
- if mask {
- m = C.GLboolean(C.GL_TRUE)
- }
- C.glDepthMask(m)
-}
-
-func (f *Functions) DisableVertexAttribArray(a gl.Attrib) {
- C.glDisableVertexAttribArray(C.GLuint(a))
-}
-
-func (f *Functions) Disable(cap gl.Enum) {
- C.glDisable(C.GLenum(cap))
-}
-
-func (f *Functions) DrawArrays(mode gl.Enum, first int, count int) {
- C.glDrawArrays(C.GLenum(mode), C.GLint(first), C.GLsizei(count))
-}
-
-func (f *Functions) DrawElements(mode gl.Enum, count int, ty gl.Enum, offset int) {
- C.gio_glDrawElements(C.GLenum(mode), C.GLsizei(count), C.GLenum(ty), C.uintptr_t(offset))
-}
-
-func (f *Functions) Enable(cap gl.Enum) {
- C.glEnable(C.GLenum(cap))
-}
-
-func (f *Functions) EndQuery(target gl.Enum) {
- C.gio_glEndQuery(C.GLenum(target))
-}
-
-func (f *Functions) EnableVertexAttribArray(a gl.Attrib) {
- C.glEnableVertexAttribArray(C.GLuint(a))
-}
-
-func (f *Functions) Finish() {
- C.glFinish()
-}
-
-func (f *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget gl.Enum, renderbuffer gl.Renderbuffer) {
- C.glFramebufferRenderbuffer(C.GLenum(target), C.GLenum(attachment), C.GLenum(renderbuffertarget), C.GLuint(renderbuffer.V))
-}
-
-func (f *Functions) FramebufferTexture2D(target, attachment, texTarget gl.Enum, t gl.Texture, level int) {
- C.glFramebufferTexture2D(C.GLenum(target), C.GLenum(attachment), C.GLenum(texTarget), C.GLuint(t.V), C.GLint(level))
-}
-
-func (c *Functions) GetBinding(pname gl.Enum) gl.Object {
- return gl.Object{uint(c.GetInteger(pname))}
-}
-
-func (f *Functions) GetError() gl.Enum {
- return gl.Enum(C.glGetError())
-}
-
-func (f *Functions) GetRenderbufferParameteri(target, pname gl.Enum) int {
- C.glGetRenderbufferParameteriv(C.GLenum(target), C.GLenum(pname), &f.ints[0])
- return int(f.ints[0])
-}
-
-func (f *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname gl.Enum) int {
- C.glGetFramebufferAttachmentParameteriv(C.GLenum(target), C.GLenum(attachment), C.GLenum(pname), &f.ints[0])
- return int(f.ints[0])
-}
-
-func (f *Functions) GetInteger(pname gl.Enum) int {
- C.glGetIntegerv(C.GLenum(pname), &f.ints[0])
- return int(f.ints[0])
-}
-
-func (f *Functions) GetProgrami(p gl.Program, pname gl.Enum) int {
- C.glGetProgramiv(C.GLuint(p.V), C.GLenum(pname), &f.ints[0])
- return int(f.ints[0])
-}
-
-func (f *Functions) GetProgramInfoLog(p gl.Program) string {
- n := f.GetProgrami(p, gl.INFO_LOG_LENGTH)
- buf := make([]byte, n)
- C.glGetProgramInfoLog(C.GLuint(p.V), C.GLsizei(len(buf)), nil, (*C.GLchar)(unsafe.Pointer(&buf[0])))
- return string(buf)
-}
-
-func (f *Functions) GetQueryObjectuiv(query gl.Query, pname gl.Enum) uint {
- C.gio_glGetQueryObjectuiv(C.GLuint(query.V), C.GLenum(pname), &f.uints[0])
- return uint(f.uints[0])
-}
-
-func (f *Functions) GetShaderi(s gl.Shader, pname gl.Enum) int {
- C.glGetShaderiv(C.GLuint(s.V), C.GLenum(pname), &f.ints[0])
- return int(f.ints[0])
-}
-
-func (f *Functions) GetShaderInfoLog(s gl.Shader) string {
- n := f.GetShaderi(s, gl.INFO_LOG_LENGTH)
- buf := make([]byte, n)
- C.glGetShaderInfoLog(C.GLuint(s.V), C.GLsizei(len(buf)), nil, (*C.GLchar)(unsafe.Pointer(&buf[0])))
- return string(buf)
-}
-
-func (f *Functions) GetStringi(pname gl.Enum, index int) string {
- str := C.gio_glGetStringi(C.GLenum(pname), C.GLuint(index))
- if str == nil {
- return ""
- }
- return C.GoString((*C.char)(unsafe.Pointer(str)))
-}
-
-func (f *Functions) GetString(pname gl.Enum) string {
- switch {
- case runtime.GOOS == "darwin" && pname == gl.EXTENSIONS:
- // macOS OpenGL 3 core profile doesn't support glGetString(GL_EXTENSIONS).
- // Use glGetStringi(GL_EXTENSIONS, <index>).
- var exts []string
- nexts := f.GetInteger(gl.NUM_EXTENSIONS)
- for i := 0; i < nexts; i++ {
- ext := f.GetStringi(gl.EXTENSIONS, i)
- exts = append(exts, ext)
- }
- return strings.Join(exts, " ")
- default:
- str := C.glGetString(C.GLenum(pname))
- return C.GoString((*C.char)(unsafe.Pointer(str)))
- }
-}
-
-func (f *Functions) GetUniformBlockIndex(p gl.Program, name string) uint {
- cname := C.CString(name)
- defer C.free(unsafe.Pointer(cname))
- return uint(C.gio_glGetUniformBlockIndex(C.GLuint(p.V), cname))
-}
-
-func (f *Functions) GetUniformLocation(p gl.Program, name string) gl.Uniform {
- cname := C.CString(name)
- defer C.free(unsafe.Pointer(cname))
- return gl.Uniform{int(C.glGetUniformLocation(C.GLuint(p.V), cname))}
-}
-
-func (f *Functions) InvalidateFramebuffer(target, attachment gl.Enum) {
- C.gio_glInvalidateFramebuffer(C.GLenum(target), C.GLenum(attachment))
-}
-
-func (f *Functions) LinkProgram(p gl.Program) {
- C.glLinkProgram(C.GLuint(p.V))
-}
-
-func (f *Functions) PixelStorei(pname gl.Enum, param int32) {
- C.glPixelStorei(C.GLenum(pname), C.GLint(param))
-}
-
-func (f *Functions) Scissor(x, y, width, height int32) {
- C.glScissor(C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
-}
-
-func (f *Functions) ReadPixels(x, y, width, height int, format, ty gl.Enum, data []byte) {
- var p unsafe.Pointer
- if len(data) > 0 {
- p = unsafe.Pointer(&data[0])
- }
- C.glReadPixels(C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(ty), p)
-}
-
-func (f *Functions) RenderbufferStorage(target, internalformat gl.Enum, width, height int) {
- C.glRenderbufferStorage(C.GLenum(target), C.GLenum(internalformat), C.GLsizei(width), C.GLsizei(height))
-}
-
-func (f *Functions) ShaderSource(s gl.Shader, src string) {
- csrc := C.CString(src)
- defer C.free(unsafe.Pointer(csrc))
- strlen := C.GLint(len(src))
- C.glShaderSource(C.GLuint(s.V), 1, &csrc, &strlen)
-}
-
-func (f *Functions) TexImage2D(target gl.Enum, level int, internalFormat int, width int, height int, format gl.Enum, ty gl.Enum, data []byte) {
- var p unsafe.Pointer
- if len(data) > 0 {
- p = unsafe.Pointer(&data[0])
- }
- C.glTexImage2D(C.GLenum(target), C.GLint(level), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), 0, C.GLenum(format), C.GLenum(ty), p)
-}
-
-func (f *Functions) TexSubImage2D(target gl.Enum, level int, x int, y int, width int, height int, format gl.Enum, ty gl.Enum, data []byte) {
- var p unsafe.Pointer
- if len(data) > 0 {
- p = unsafe.Pointer(&data[0])
- }
- C.glTexSubImage2D(C.GLenum(target), C.GLint(level), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(ty), p)
-}
-
-func (f *Functions) TexParameteri(target, pname gl.Enum, param int) {
- C.glTexParameteri(C.GLenum(target), C.GLenum(pname), C.GLint(param))
-}
-
-func (f *Functions) UniformBlockBinding(p gl.Program, uniformBlockIndex uint, uniformBlockBinding uint) {
- C.gio_glUniformBlockBinding(C.GLuint(p.V), C.GLuint(uniformBlockIndex), C.GLuint(uniformBlockBinding))
-}
-
-func (f *Functions) Uniform1f(dst gl.Uniform, v float32) {
- C.glUniform1f(C.GLint(dst.V), C.GLfloat(v))
-}
-
-func (f *Functions) Uniform1i(dst gl.Uniform, v int) {
- C.glUniform1i(C.GLint(dst.V), C.GLint(v))
-}
-
-func (f *Functions) Uniform2f(dst gl.Uniform, v0 float32, v1 float32) {
- C.glUniform2f(C.GLint(dst.V), C.GLfloat(v0), C.GLfloat(v1))
-}
-
-func (f *Functions) Uniform3f(dst gl.Uniform, v0 float32, v1 float32, v2 float32) {
- C.glUniform3f(C.GLint(dst.V), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2))
-}
-
-func (f *Functions) Uniform4f(dst gl.Uniform, v0 float32, v1 float32, v2 float32, v3 float32) {
- C.glUniform4f(C.GLint(dst.V), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2), C.GLfloat(v3))
-}
-
-func (f *Functions) UseProgram(p gl.Program) {
- C.glUseProgram(C.GLuint(p.V))
-}
-
-func (f *Functions) VertexAttribPointer(dst gl.Attrib, size int, ty gl.Enum, normalized bool, stride int, offset int) {
- var n C.GLboolean = C.GL_FALSE
- if normalized {
- n = C.GL_TRUE
- }
- C.gio_glVertexAttribPointer(C.GLuint(dst), C.GLint(size), C.GLenum(ty), n, C.GLsizei(stride), C.uintptr_t(offset))
-}
-
-func (f *Functions) Viewport(x int, y int, width int, height int) {
- C.glViewport(C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
-}
diff --git a/vendor/gioui.org/app/internal/glimpl/gl_js.go b/vendor/gioui.org/app/internal/glimpl/gl_js.go
deleted file mode 100644
index e4291d0..0000000
--- a/vendor/gioui.org/app/internal/glimpl/gl_js.go
+++ /dev/null
@@ -1,339 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package glimpl
-
-import (
- "errors"
- "strings"
- "syscall/js"
-
- "gioui.org/gpu/gl"
-)
-
-type Functions struct {
- Ctx js.Value
- EXT_disjoint_timer_query js.Value
- EXT_disjoint_timer_query_webgl2 js.Value
-
- // Cached JS arrays.
- byteBuf js.Value
- int32Buf js.Value
-}
-
-func (f *Functions) Init(version int) error {
- if version < 2 {
- f.EXT_disjoint_timer_query = f.getExtension("EXT_disjoint_timer_query")
- if f.getExtension("OES_texture_half_float").IsNull() && f.getExtension("OES_texture_float").IsNull() {
- return errors.New("gl: no support for neither OES_texture_half_float nor OES_texture_float")
- }
- if f.getExtension("EXT_sRGB").IsNull() {
- return errors.New("gl: EXT_sRGB not supported")
- }
- } else {
- // WebGL2 extensions.
- f.EXT_disjoint_timer_query_webgl2 = f.getExtension("EXT_disjoint_timer_query_webgl2")
- if f.getExtension("EXT_color_buffer_half_float").IsNull() && f.getExtension("EXT_color_buffer_float").IsNull() {
- return errors.New("gl: no support for neither EXT_color_buffer_half_float nor EXT_color_buffer_float")
- }
- }
- return nil
-}
-
-func (f *Functions) getExtension(name string) js.Value {
- return f.Ctx.Call("getExtension", name)
-}
-
-func (f *Functions) ActiveTexture(t gl.Enum) {
- f.Ctx.Call("activeTexture", int(t))
-}
-func (f *Functions) AttachShader(p gl.Program, s gl.Shader) {
- f.Ctx.Call("attachShader", js.Value(p), js.Value(s))
-}
-func (f *Functions) BeginQuery(target gl.Enum, query gl.Query) {
- if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
- f.Ctx.Call("beginQuery", int(target), js.Value(query))
- } else {
- f.EXT_disjoint_timer_query.Call("beginQueryEXT", int(target), js.Value(query))
- }
-}
-func (f *Functions) BindAttribLocation(p gl.Program, a gl.Attrib, name string) {
- f.Ctx.Call("bindAttribLocation", js.Value(p), int(a), name)
-}
-func (f *Functions) BindBuffer(target gl.Enum, b gl.Buffer) {
- f.Ctx.Call("bindBuffer", int(target), js.Value(b))
-}
-func (f *Functions) BindBufferBase(target gl.Enum, index int, b gl.Buffer) {
- f.Ctx.Call("bindBufferBase", int(target), index, js.Value(b))
-}
-func (f *Functions) BindFramebuffer(target gl.Enum, fb gl.Framebuffer) {
- f.Ctx.Call("bindFramebuffer", int(target), js.Value(fb))
-}
-func (f *Functions) BindRenderbuffer(target gl.Enum, rb gl.Renderbuffer) {
- f.Ctx.Call("bindRenderbuffer", int(target), js.Value(rb))
-}
-func (f *Functions) BindTexture(target gl.Enum, t gl.Texture) {
- f.Ctx.Call("bindTexture", int(target), js.Value(t))
-}
-func (f *Functions) BlendEquation(mode gl.Enum) {
- f.Ctx.Call("blendEquation", int(mode))
-}
-func (f *Functions) BlendFunc(sfactor, dfactor gl.Enum) {
- f.Ctx.Call("blendFunc", int(sfactor), int(dfactor))
-}
-func (f *Functions) BufferData(target gl.Enum, src []byte, usage gl.Enum) {
- f.Ctx.Call("bufferData", int(target), f.byteArrayOf(src), int(usage))
-}
-func (f *Functions) CheckFramebufferStatus(target gl.Enum) gl.Enum {
- return gl.Enum(f.Ctx.Call("checkFramebufferStatus", int(target)).Int())
-}
-func (f *Functions) Clear(mask gl.Enum) {
- f.Ctx.Call("clear", int(mask))
-}
-func (f *Functions) ClearColor(red, green, blue, alpha float32) {
- f.Ctx.Call("clearColor", red, green, blue, alpha)
-}
-func (f *Functions) ClearDepthf(d float32) {
- f.Ctx.Call("clearDepth", d)
-}
-func (f *Functions) CompileShader(s gl.Shader) {
- f.Ctx.Call("compileShader", js.Value(s))
-}
-func (f *Functions) CreateBuffer() gl.Buffer {
- return gl.Buffer(f.Ctx.Call("createBuffer"))
-}
-func (f *Functions) CreateFramebuffer() gl.Framebuffer {
- return gl.Framebuffer(f.Ctx.Call("createFramebuffer"))
-}
-func (f *Functions) CreateProgram() gl.Program {
- return gl.Program(f.Ctx.Call("createProgram"))
-}
-func (f *Functions) CreateQuery() gl.Query {
- return gl.Query(f.Ctx.Call("createQuery"))
-}
-func (f *Functions) CreateRenderbuffer() gl.Renderbuffer {
- return gl.Renderbuffer(f.Ctx.Call("createRenderbuffer"))
-}
-func (f *Functions) CreateShader(ty gl.Enum) gl.Shader {
- return gl.Shader(f.Ctx.Call("createShader", int(ty)))
-}
-func (f *Functions) CreateTexture() gl.Texture {
- return gl.Texture(f.Ctx.Call("createTexture"))
-}
-func (f *Functions) DeleteBuffer(v gl.Buffer) {
- f.Ctx.Call("deleteBuffer", js.Value(v))
-}
-func (f *Functions) DeleteFramebuffer(v gl.Framebuffer) {
- f.Ctx.Call("deleteFramebuffer", js.Value(v))
-}
-func (f *Functions) DeleteProgram(p gl.Program) {
- f.Ctx.Call("deleteProgram", js.Value(p))
-}
-func (f *Functions) DeleteQuery(query gl.Query) {
- if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
- f.Ctx.Call("deleteQuery", js.Value(query))
- } else {
- f.EXT_disjoint_timer_query.Call("deleteQueryEXT", js.Value(query))
- }
-}
-func (f *Functions) DeleteShader(s gl.Shader) {
- f.Ctx.Call("deleteShader", js.Value(s))
-}
-func (f *Functions) DeleteRenderbuffer(v gl.Renderbuffer) {
- f.Ctx.Call("deleteRenderbuffer", js.Value(v))
-}
-func (f *Functions) DeleteTexture(v gl.Texture) {
- f.Ctx.Call("deleteTexture", js.Value(v))
-}
-func (f *Functions) DepthFunc(fn gl.Enum) {
- f.Ctx.Call("depthFunc", int(fn))
-}
-func (f *Functions) DepthMask(mask bool) {
- f.Ctx.Call("depthMask", mask)
-}
-func (f *Functions) DisableVertexAttribArray(a gl.Attrib) {
- f.Ctx.Call("disableVertexAttribArray", int(a))
-}
-func (f *Functions) Disable(cap gl.Enum) {
- f.Ctx.Call("disable", int(cap))
-}
-func (f *Functions) DrawArrays(mode gl.Enum, first, count int) {
- f.Ctx.Call("drawArrays", int(mode), first, count)
-}
-func (f *Functions) DrawElements(mode gl.Enum, count int, ty gl.Enum, offset int) {
- f.Ctx.Call("drawElements", int(mode), count, int(ty), offset)
-}
-func (f *Functions) Enable(cap gl.Enum) {
- f.Ctx.Call("enable", int(cap))
-}
-func (f *Functions) EnableVertexAttribArray(a gl.Attrib) {
- f.Ctx.Call("enableVertexAttribArray", int(a))
-}
-func (f *Functions) EndQuery(target gl.Enum) {
- if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
- f.Ctx.Call("endQuery", int(target))
- } else {
- f.EXT_disjoint_timer_query.Call("endQueryEXT", int(target))
- }
-}
-func (f *Functions) Finish() {
- f.Ctx.Call("finish")
-}
-func (f *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget gl.Enum, renderbuffer gl.Renderbuffer) {
- f.Ctx.Call("framebufferRenderbuffer", int(target), int(attachment), int(renderbuffertarget), js.Value(renderbuffer))
-}
-func (f *Functions) FramebufferTexture2D(target, attachment, texTarget gl.Enum, t gl.Texture, level int) {
- f.Ctx.Call("framebufferTexture2D", int(target), int(attachment), int(texTarget), js.Value(t), level)
-}
-func (f *Functions) GetError() gl.Enum {
- return gl.Enum(f.Ctx.Call("getError").Int())
-}
-func (f *Functions) GetRenderbufferParameteri(target, pname gl.Enum) int {
- return paramVal(f.Ctx.Call("getRenderbufferParameteri", int(pname)))
-}
-func (f *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname gl.Enum) int {
- return paramVal(f.Ctx.Call("getFramebufferAttachmentParameter", int(target), int(attachment), int(pname)))
-}
-func (f *Functions) GetBinding(pname gl.Enum) gl.Object {
- return gl.Object(f.Ctx.Call("getParameter", int(pname)))
-}
-func (f *Functions) GetInteger(pname gl.Enum) int {
- return paramVal(f.Ctx.Call("getParameter", int(pname)))
-}
-func (f *Functions) GetProgrami(p gl.Program, pname gl.Enum) int {
- return paramVal(f.Ctx.Call("getProgramParameter", js.Value(p), int(pname)))
-}
-func (f *Functions) GetProgramInfoLog(p gl.Program) string {
- return f.Ctx.Call("getProgramInfoLog", js.Value(p)).String()
-}
-func (f *Functions) GetQueryObjectuiv(query gl.Query, pname gl.Enum) uint {
- if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
- return uint(paramVal(f.Ctx.Call("getQueryParameter", js.Value(query), int(pname))))
- } else {
- return uint(paramVal(f.EXT_disjoint_timer_query.Call("getQueryObjectEXT", js.Value(query), int(pname))))
- }
-}
-func (f *Functions) GetShaderi(s gl.Shader, pname gl.Enum) int {
- return paramVal(f.Ctx.Call("getShaderParameter", js.Value(s), int(pname)))
-}
-func (f *Functions) GetShaderInfoLog(s gl.Shader) string {
- return f.Ctx.Call("getShaderInfoLog", js.Value(s)).String()
-}
-func (f *Functions) GetString(pname gl.Enum) string {
- switch pname {
- case gl.EXTENSIONS:
- extsjs := f.Ctx.Call("getSupportedExtensions")
- var exts []string
- for i := 0; i < extsjs.Length(); i++ {
- exts = append(exts, "GL_"+extsjs.Index(i).String())
- }
- return strings.Join(exts, " ")
- default:
- return f.Ctx.Call("getParameter", int(pname)).String()
- }
-}
-func (f *Functions) GetUniformBlockIndex(p gl.Program, name string) uint {
- return uint(paramVal(f.Ctx.Call("getUniformBlockIndex", js.Value(p), name)))
-}
-func (f *Functions) GetUniformLocation(p gl.Program, name string) gl.Uniform {
- return gl.Uniform(f.Ctx.Call("getUniformLocation", js.Value(p), name))
-}
-func (f *Functions) InvalidateFramebuffer(target, attachment gl.Enum) {
- fn := f.Ctx.Get("invalidateFramebuffer")
- if !fn.IsUndefined() {
- if f.int32Buf.IsUndefined() {
- f.int32Buf = js.Global().Get("Int32Array").New(1)
- }
- f.int32Buf.SetIndex(0, int32(attachment))
- f.Ctx.Call("invalidateFramebuffer", int(target), f.int32Buf)
- }
-}
-func (f *Functions) LinkProgram(p gl.Program) {
- f.Ctx.Call("linkProgram", js.Value(p))
-}
-func (f *Functions) PixelStorei(pname gl.Enum, param int32) {
- f.Ctx.Call("pixelStorei", int(pname), param)
-}
-func (f *Functions) RenderbufferStorage(target, internalformat gl.Enum, width, height int) {
- f.Ctx.Call("renderbufferStorage", int(target), int(internalformat), width, height)
-}
-func (f *Functions) ReadPixels(x, y, width, height int, format, ty gl.Enum, data []byte) {
- f.resizeByteBuffer(len(data))
- f.Ctx.Call("readPixels", x, y, width, height, int(format), int(ty), f.byteBuf)
- js.CopyBytesToGo(data, f.byteBuf)
-}
-func (f *Functions) Scissor(x, y, width, height int32) {
- f.Ctx.Call("scissor", x, y, width, height)
-}
-func (f *Functions) ShaderSource(s gl.Shader, src string) {
- f.Ctx.Call("shaderSource", js.Value(s), src)
-}
-func (f *Functions) TexImage2D(target gl.Enum, level int, internalFormat int, width, height int, format, ty gl.Enum, data []byte) {
- f.Ctx.Call("texImage2D", int(target), int(level), int(internalFormat), int(width), int(height), 0, int(format), int(ty), f.byteArrayOf(data))
-}
-func (f *Functions) TexSubImage2D(target gl.Enum, level int, x, y, width, height int, format, ty gl.Enum, data []byte) {
- f.Ctx.Call("texSubImage2D", int(target), level, x, y, width, height, int(format), int(ty), f.byteArrayOf(data))
-}
-func (f *Functions) TexParameteri(target, pname gl.Enum, param int) {
- f.Ctx.Call("texParameteri", int(target), int(pname), int(param))
-}
-func (f *Functions) UniformBlockBinding(p gl.Program, uniformBlockIndex uint, uniformBlockBinding uint) {
- f.Ctx.Call("uniformBlockBinding", js.Value(p), int(uniformBlockIndex), int(uniformBlockBinding))
-}
-func (f *Functions) Uniform1f(dst gl.Uniform, v float32) {
- f.Ctx.Call("uniform1f", js.Value(dst), v)
-}
-func (f *Functions) Uniform1i(dst gl.Uniform, v int) {
- f.Ctx.Call("uniform1i", js.Value(dst), v)
-}
-func (f *Functions) Uniform2f(dst gl.Uniform, v0, v1 float32) {
- f.Ctx.Call("uniform2f", js.Value(dst), v0, v1)
-}
-func (f *Functions) Uniform3f(dst gl.Uniform, v0, v1, v2 float32) {
- f.Ctx.Call("uniform3f", js.Value(dst), v0, v1, v2)
-}
-func (f *Functions) Uniform4f(dst gl.Uniform, v0, v1, v2, v3 float32) {
- f.Ctx.Call("uniform4f", js.Value(dst), v0, v1, v2, v3)
-}
-func (f *Functions) UseProgram(p gl.Program) {
- f.Ctx.Call("useProgram", js.Value(p))
-}
-func (f *Functions) VertexAttribPointer(dst gl.Attrib, size int, ty gl.Enum, normalized bool, stride, offset int) {
- f.Ctx.Call("vertexAttribPointer", int(dst), size, int(ty), normalized, stride, offset)
-}
-func (f *Functions) Viewport(x, y, width, height int) {
- f.Ctx.Call("viewport", x, y, width, height)
-}
-
-func (f *Functions) byteArrayOf(data []byte) js.Value {
- if len(data) == 0 {
- return js.Null()
- }
- f.resizeByteBuffer(len(data))
- js.CopyBytesToJS(f.byteBuf, data)
- return f.byteBuf
-}
-
-func (f *Functions) resizeByteBuffer(n int) {
- if n == 0 {
- return
- }
- if !f.byteBuf.IsUndefined() && f.byteBuf.Length() >= n {
- return
- }
- f.byteBuf = js.Global().Get("Uint8Array").New(n)
-}
-
-func paramVal(v js.Value) int {
- switch v.Type() {
- case js.TypeBoolean:
- if b := v.Bool(); b {
- return 1
- } else {
- return 0
- }
- case js.TypeNumber:
- return v.Int()
- default:
- panic("unknown parameter type")
- }
-}
diff --git a/vendor/gioui.org/app/internal/glimpl/gl_windows.go b/vendor/gioui.org/app/internal/glimpl/gl_windows.go
deleted file mode 100644
index 4fe1d91..0000000
--- a/vendor/gioui.org/app/internal/glimpl/gl_windows.go
+++ /dev/null
@@ -1,406 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package glimpl
-
-import (
- "math"
- "runtime"
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-
- "gioui.org/gpu/gl"
- gunsafe "gioui.org/internal/unsafe"
-)
-
-var (
- LibGLESv2 = windows.NewLazyDLL("libGLESv2.dll")
- _glActiveTexture = LibGLESv2.NewProc("glActiveTexture")
- _glAttachShader = LibGLESv2.NewProc("glAttachShader")
- _glBeginQuery = LibGLESv2.NewProc("glBeginQuery")
- _glBindAttribLocation = LibGLESv2.NewProc("glBindAttribLocation")
- _glBindBuffer = LibGLESv2.NewProc("glBindBuffer")
- _glBindBufferBase = LibGLESv2.NewProc("glBindBufferBase")
- _glBindFramebuffer = LibGLESv2.NewProc("glBindFramebuffer")
- _glBindRenderbuffer = LibGLESv2.NewProc("glBindRenderbuffer")
- _glBindTexture = LibGLESv2.NewProc("glBindTexture")
- _glBlendEquation = LibGLESv2.NewProc("glBlendEquation")
- _glBlendFunc = LibGLESv2.NewProc("glBlendFunc")
- _glBufferData = LibGLESv2.NewProc("glBufferData")
- _glCheckFramebufferStatus = LibGLESv2.NewProc("glCheckFramebufferStatus")
- _glClear = LibGLESv2.NewProc("glClear")
- _glClearColor = LibGLESv2.NewProc("glClearColor")
- _glClearDepthf = LibGLESv2.NewProc("glClearDepthf")
- _glDeleteQueries = LibGLESv2.NewProc("glDeleteQueries")
- _glCompileShader = LibGLESv2.NewProc("glCompileShader")
- _glGenBuffers = LibGLESv2.NewProc("glGenBuffers")
- _glGenFramebuffers = LibGLESv2.NewProc("glGenFramebuffers")
- _glGetUniformBlockIndex = LibGLESv2.NewProc("glGetUniformBlockIndex")
- _glCreateProgram = LibGLESv2.NewProc("glCreateProgram")
- _glGenRenderbuffers = LibGLESv2.NewProc("glGenRenderbuffers")
- _glCreateShader = LibGLESv2.NewProc("glCreateShader")
- _glGenTextures = LibGLESv2.NewProc("glGenTextures")
- _glDeleteBuffers = LibGLESv2.NewProc("glDeleteBuffers")
- _glDeleteFramebuffers = LibGLESv2.NewProc("glDeleteFramebuffers")
- _glDeleteProgram = LibGLESv2.NewProc("glDeleteProgram")
- _glDeleteShader = LibGLESv2.NewProc("glDeleteShader")
- _glDeleteRenderbuffers = LibGLESv2.NewProc("glDeleteRenderbuffers")
- _glDeleteTextures = LibGLESv2.NewProc("glDeleteTextures")
- _glDepthFunc = LibGLESv2.NewProc("glDepthFunc")
- _glDepthMask = LibGLESv2.NewProc("glDepthMask")
- _glDisableVertexAttribArray = LibGLESv2.NewProc("glDisableVertexAttribArray")
- _glDisable = LibGLESv2.NewProc("glDisable")
- _glDrawArrays = LibGLESv2.NewProc("glDrawArrays")
- _glDrawElements = LibGLESv2.NewProc("glDrawElements")
- _glEnable = LibGLESv2.NewProc("glEnable")
- _glEnableVertexAttribArray = LibGLESv2.NewProc("glEnableVertexAttribArray")
- _glEndQuery = LibGLESv2.NewProc("glEndQuery")
- _glFinish = LibGLESv2.NewProc("glFinish")
- _glFramebufferRenderbuffer = LibGLESv2.NewProc("glFramebufferRenderbuffer")
- _glFramebufferTexture2D = LibGLESv2.NewProc("glFramebufferTexture2D")
- _glGenQueries = LibGLESv2.NewProc("glGenQueries")
- _glGetError = LibGLESv2.NewProc("glGetError")
- _glGetRenderbufferParameteri = LibGLESv2.NewProc("glGetRenderbufferParameteri")
- _glGetFramebufferAttachmentParameteri = LibGLESv2.NewProc("glGetFramebufferAttachmentParameteri")
- _glGetIntegerv = LibGLESv2.NewProc("glGetIntegerv")
- _glGetProgramiv = LibGLESv2.NewProc("glGetProgramiv")
- _glGetProgramInfoLog = LibGLESv2.NewProc("glGetProgramInfoLog")
- _glGetQueryObjectuiv = LibGLESv2.NewProc("glGetQueryObjectuiv")
- _glGetShaderiv = LibGLESv2.NewProc("glGetShaderiv")
- _glGetShaderInfoLog = LibGLESv2.NewProc("glGetShaderInfoLog")
- _glGetString = LibGLESv2.NewProc("glGetString")
- _glGetUniformLocation = LibGLESv2.NewProc("glGetUniformLocation")
- _glInvalidateFramebuffer = LibGLESv2.NewProc("glInvalidateFramebuffer")
- _glLinkProgram = LibGLESv2.NewProc("glLinkProgram")
- _glPixelStorei = LibGLESv2.NewProc("glPixelStorei")
- _glReadPixels = LibGLESv2.NewProc("glReadPixels")
- _glRenderbufferStorage = LibGLESv2.NewProc("glRenderbufferStorage")
- _glScissor = LibGLESv2.NewProc("glScissor")
- _glShaderSource = LibGLESv2.NewProc("glShaderSource")
- _glTexImage2D = LibGLESv2.NewProc("glTexImage2D")
- _glTexSubImage2D = LibGLESv2.NewProc("glTexSubImage2D")
- _glTexParameteri = LibGLESv2.NewProc("glTexParameteri")
- _glUniformBlockBinding = LibGLESv2.NewProc("glUniformBlockBinding")
- _glUniform1f = LibGLESv2.NewProc("glUniform1f")
- _glUniform1i = LibGLESv2.NewProc("glUniform1i")
- _glUniform2f = LibGLESv2.NewProc("glUniform2f")
- _glUniform3f = LibGLESv2.NewProc("glUniform3f")
- _glUniform4f = LibGLESv2.NewProc("glUniform4f")
- _glUseProgram = LibGLESv2.NewProc("glUseProgram")
- _glVertexAttribPointer = LibGLESv2.NewProc("glVertexAttribPointer")
- _glViewport = LibGLESv2.NewProc("glViewport")
-)
-
-type Functions struct {
- // gl.Query caches.
- int32s [100]int32
-}
-
-func (c *Functions) ActiveTexture(t gl.Enum) {
- syscall.Syscall(_glActiveTexture.Addr(), 1, uintptr(t), 0, 0)
-}
-func (c *Functions) AttachShader(p gl.Program, s gl.Shader) {
- syscall.Syscall(_glAttachShader.Addr(), 2, uintptr(p.V), uintptr(s.V), 0)
-}
-func (f *Functions) BeginQuery(target gl.Enum, query gl.Query) {
- syscall.Syscall(_glBeginQuery.Addr(), 2, uintptr(target), uintptr(query.V), 0)
-}
-func (c *Functions) BindAttribLocation(p gl.Program, a gl.Attrib, name string) {
- cname := cString(name)
- c0 := &cname[0]
- syscall.Syscall(_glBindAttribLocation.Addr(), 3, uintptr(p.V), uintptr(a), uintptr(unsafe.Pointer(c0)))
- issue34474KeepAlive(c)
-}
-func (c *Functions) BindBuffer(target gl.Enum, b gl.Buffer) {
- syscall.Syscall(_glBindBuffer.Addr(), 2, uintptr(target), uintptr(b.V), 0)
-}
-func (c *Functions) BindBufferBase(target gl.Enum, index int, b gl.Buffer) {
- syscall.Syscall(_glBindBufferBase.Addr(), 3, uintptr(target), uintptr(index), uintptr(b.V))
-}
-func (c *Functions) BindFramebuffer(target gl.Enum, fb gl.Framebuffer) {
- syscall.Syscall(_glBindFramebuffer.Addr(), 2, uintptr(target), uintptr(fb.V), 0)
-}
-func (c *Functions) BindRenderbuffer(target gl.Enum, rb gl.Renderbuffer) {
- syscall.Syscall(_glBindRenderbuffer.Addr(), 2, uintptr(target), uintptr(rb.V), 0)
-}
-func (c *Functions) BindTexture(target gl.Enum, t gl.Texture) {
- syscall.Syscall(_glBindTexture.Addr(), 2, uintptr(target), uintptr(t.V), 0)
-}
-func (c *Functions) BlendEquation(mode gl.Enum) {
- syscall.Syscall(_glBlendEquation.Addr(), 1, uintptr(mode), 0, 0)
-}
-func (c *Functions) BlendFunc(sfactor, dfactor gl.Enum) {
- syscall.Syscall(_glBlendFunc.Addr(), 2, uintptr(sfactor), uintptr(dfactor), 0)
-}
-func (c *Functions) BufferData(target gl.Enum, src []byte, usage gl.Enum) {
- if n := len(src); n == 0 {
- syscall.Syscall6(_glBufferData.Addr(), 4, uintptr(target), 0, 0, uintptr(usage), 0, 0)
- } else {
- s0 := &src[0]
- syscall.Syscall6(_glBufferData.Addr(), 4, uintptr(target), uintptr(n), uintptr(unsafe.Pointer(s0)), uintptr(usage), 0, 0)
- issue34474KeepAlive(s0)
- }
-}
-func (c *Functions) CheckFramebufferStatus(target gl.Enum) gl.Enum {
- s, _, _ := syscall.Syscall(_glCheckFramebufferStatus.Addr(), 1, uintptr(target), 0, 0)
- return gl.Enum(s)
-}
-func (c *Functions) Clear(mask gl.Enum) {
- syscall.Syscall(_glClear.Addr(), 1, uintptr(mask), 0, 0)
-}
-func (c *Functions) ClearColor(red, green, blue, alpha float32) {
- syscall.Syscall6(_glClearColor.Addr(), 4, uintptr(math.Float32bits(red)), uintptr(math.Float32bits(green)), uintptr(math.Float32bits(blue)), uintptr(math.Float32bits(alpha)), 0, 0)
-}
-func (c *Functions) ClearDepthf(d float32) {
- syscall.Syscall(_glClearDepthf.Addr(), 1, uintptr(math.Float32bits(d)), 0, 0)
-}
-func (c *Functions) CompileShader(s gl.Shader) {
- syscall.Syscall(_glCompileShader.Addr(), 1, uintptr(s.V), 0, 0)
-}
-func (c *Functions) CreateBuffer() gl.Buffer {
- var buf uintptr
- syscall.Syscall(_glGenBuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&buf)), 0)
- return gl.Buffer{uint(buf)}
-}
-func (c *Functions) CreateFramebuffer() gl.Framebuffer {
- var fb uintptr
- syscall.Syscall(_glGenFramebuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&fb)), 0)
- return gl.Framebuffer{uint(fb)}
-}
-func (c *Functions) CreateProgram() gl.Program {
- p, _, _ := syscall.Syscall(_glCreateProgram.Addr(), 0, 0, 0, 0)
- return gl.Program{uint(p)}
-}
-func (f *Functions) CreateQuery() gl.Query {
- var q uintptr
- syscall.Syscall(_glGenQueries.Addr(), 2, 1, uintptr(unsafe.Pointer(&q)), 0)
- return gl.Query{uint(q)}
-}
-func (c *Functions) CreateRenderbuffer() gl.Renderbuffer {
- var rb uintptr
- syscall.Syscall(_glGenRenderbuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&rb)), 0)
- return gl.Renderbuffer{uint(rb)}
-}
-func (c *Functions) CreateShader(ty gl.Enum) gl.Shader {
- s, _, _ := syscall.Syscall(_glCreateShader.Addr(), 1, uintptr(ty), 0, 0)
- return gl.Shader{uint(s)}
-}
-func (c *Functions) CreateTexture() gl.Texture {
- var t uintptr
- syscall.Syscall(_glGenTextures.Addr(), 2, 1, uintptr(unsafe.Pointer(&t)), 0)
- return gl.Texture{uint(t)}
-}
-func (c *Functions) DeleteBuffer(v gl.Buffer) {
- syscall.Syscall(_glDeleteBuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&v)), 0)
-}
-func (c *Functions) DeleteFramebuffer(v gl.Framebuffer) {
- syscall.Syscall(_glDeleteFramebuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&v.V)), 0)
-}
-func (c *Functions) DeleteProgram(p gl.Program) {
- syscall.Syscall(_glDeleteProgram.Addr(), 1, uintptr(p.V), 0, 0)
-}
-func (f *Functions) DeleteQuery(query gl.Query) {
- syscall.Syscall(_glDeleteQueries.Addr(), 2, 1, uintptr(unsafe.Pointer(&query.V)), 0)
-}
-func (c *Functions) DeleteShader(s gl.Shader) {
- syscall.Syscall(_glDeleteShader.Addr(), 1, uintptr(s.V), 0, 0)
-}
-func (c *Functions) DeleteRenderbuffer(v gl.Renderbuffer) {
- syscall.Syscall(_glDeleteRenderbuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&v.V)), 0)
-}
-func (c *Functions) DeleteTexture(v gl.Texture) {
- syscall.Syscall(_glDeleteTextures.Addr(), 2, 1, uintptr(unsafe.Pointer(&v.V)), 0)
-}
-func (c *Functions) DepthFunc(f gl.Enum) {
- syscall.Syscall(_glDepthFunc.Addr(), 1, uintptr(f), 0, 0)
-}
-func (c *Functions) DepthMask(mask bool) {
- var m uintptr
- if mask {
- m = 1
- }
- syscall.Syscall(_glDepthMask.Addr(), 1, m, 0, 0)
-}
-func (c *Functions) DisableVertexAttribArray(a gl.Attrib) {
- syscall.Syscall(_glDisableVertexAttribArray.Addr(), 1, uintptr(a), 0, 0)
-}
-func (c *Functions) Disable(cap gl.Enum) {
- syscall.Syscall(_glDisable.Addr(), 1, uintptr(cap), 0, 0)
-}
-func (c *Functions) DrawArrays(mode gl.Enum, first, count int) {
- syscall.Syscall(_glDrawArrays.Addr(), 3, uintptr(mode), uintptr(first), uintptr(count))
-}
-func (c *Functions) DrawElements(mode gl.Enum, count int, ty gl.Enum, offset int) {
- syscall.Syscall6(_glDrawElements.Addr(), 4, uintptr(mode), uintptr(count), uintptr(ty), uintptr(offset), 0, 0)
-}
-func (c *Functions) Enable(cap gl.Enum) {
- syscall.Syscall(_glEnable.Addr(), 1, uintptr(cap), 0, 0)
-}
-func (c *Functions) EnableVertexAttribArray(a gl.Attrib) {
- syscall.Syscall(_glEnableVertexAttribArray.Addr(), 1, uintptr(a), 0, 0)
-}
-func (f *Functions) EndQuery(target gl.Enum) {
- syscall.Syscall(_glEndQuery.Addr(), 1, uintptr(target), 0, 0)
-}
-func (c *Functions) Finish() {
- syscall.Syscall(_glFinish.Addr(), 0, 0, 0, 0)
-}
-func (c *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget gl.Enum, renderbuffer gl.Renderbuffer) {
- syscall.Syscall6(_glFramebufferRenderbuffer.Addr(), 4, uintptr(target), uintptr(attachment), uintptr(renderbuffertarget), uintptr(renderbuffer.V), 0, 0)
-}
-func (c *Functions) FramebufferTexture2D(target, attachment, texTarget gl.Enum, t gl.Texture, level int) {
- syscall.Syscall6(_glFramebufferTexture2D.Addr(), 5, uintptr(target), uintptr(attachment), uintptr(texTarget), uintptr(t.V), uintptr(level), 0)
-}
-func (f *Functions) GetUniformBlockIndex(p gl.Program, name string) uint {
- cname := cString(name)
- c0 := &cname[0]
- u, _, _ := syscall.Syscall(_glGetUniformBlockIndex.Addr(), 2, uintptr(p.V), uintptr(unsafe.Pointer(c0)), 0)
- issue34474KeepAlive(c0)
- return uint(u)
-}
-func (c *Functions) GetBinding(pname gl.Enum) gl.Object {
- return gl.Object{uint(c.GetInteger(pname))}
-}
-func (c *Functions) GetError() gl.Enum {
- e, _, _ := syscall.Syscall(_glGetError.Addr(), 0, 0, 0, 0)
- return gl.Enum(e)
-}
-func (c *Functions) GetRenderbufferParameteri(target, pname gl.Enum) int {
- p, _, _ := syscall.Syscall(_glGetRenderbufferParameteri.Addr(), 2, uintptr(target), uintptr(pname), 0)
- return int(p)
-}
-func (c *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname gl.Enum) int {
- p, _, _ := syscall.Syscall(_glGetFramebufferAttachmentParameteri.Addr(), 3, uintptr(target), uintptr(attachment), uintptr(pname))
- return int(p)
-}
-func (c *Functions) GetInteger(pname gl.Enum) int {
- syscall.Syscall(_glGetIntegerv.Addr(), 2, uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])), 0)
- return int(c.int32s[0])
-}
-func (c *Functions) GetProgrami(p gl.Program, pname gl.Enum) int {
- syscall.Syscall(_glGetProgramiv.Addr(), 3, uintptr(p.V), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
- return int(c.int32s[0])
-}
-func (c *Functions) GetProgramInfoLog(p gl.Program) string {
- n := c.GetProgrami(p, gl.INFO_LOG_LENGTH)
- buf := make([]byte, n)
- syscall.Syscall6(_glGetProgramInfoLog.Addr(), 4, uintptr(p.V), uintptr(len(buf)), 0, uintptr(unsafe.Pointer(&buf[0])), 0, 0)
- return string(buf)
-}
-func (c *Functions) GetQueryObjectuiv(query gl.Query, pname gl.Enum) uint {
- syscall.Syscall(_glGetQueryObjectuiv.Addr(), 3, uintptr(query.V), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
- return uint(c.int32s[0])
-}
-func (c *Functions) GetShaderi(s gl.Shader, pname gl.Enum) int {
- syscall.Syscall(_glGetShaderiv.Addr(), 3, uintptr(s.V), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
- return int(c.int32s[0])
-}
-func (c *Functions) GetShaderInfoLog(s gl.Shader) string {
- n := c.GetShaderi(s, gl.INFO_LOG_LENGTH)
- buf := make([]byte, n)
- syscall.Syscall6(_glGetShaderInfoLog.Addr(), 4, uintptr(s.V), uintptr(len(buf)), 0, uintptr(unsafe.Pointer(&buf[0])), 0, 0)
- return string(buf)
-}
-func (c *Functions) GetString(pname gl.Enum) string {
- s, _, _ := syscall.Syscall(_glGetString.Addr(), 1, uintptr(pname), 0, 0)
- return gunsafe.GoString(gunsafe.SliceOf(s))
-}
-func (c *Functions) GetUniformLocation(p gl.Program, name string) gl.Uniform {
- cname := cString(name)
- c0 := &cname[0]
- u, _, _ := syscall.Syscall(_glGetUniformLocation.Addr(), 2, uintptr(p.V), uintptr(unsafe.Pointer(c0)), 0)
- issue34474KeepAlive(c0)
- return gl.Uniform{int(u)}
-}
-func (c *Functions) InvalidateFramebuffer(target, attachment gl.Enum) {
- addr := _glInvalidateFramebuffer.Addr()
- if addr == 0 {
- // InvalidateFramebuffer is just a hint. Skip it if not supported.
- return
- }
- syscall.Syscall(addr, 3, uintptr(target), 1, uintptr(unsafe.Pointer(&attachment)))
-}
-func (c *Functions) LinkProgram(p gl.Program) {
- syscall.Syscall(_glLinkProgram.Addr(), 1, uintptr(p.V), 0, 0)
-}
-func (c *Functions) PixelStorei(pname gl.Enum, param int32) {
- syscall.Syscall(_glPixelStorei.Addr(), 2, uintptr(pname), uintptr(param), 0)
-}
-func (f *Functions) ReadPixels(x, y, width, height int, format, ty gl.Enum, data []byte) {
- d0 := &data[0]
- syscall.Syscall9(_glReadPixels.Addr(), 7, uintptr(x), uintptr(y), uintptr(width), uintptr(height), uintptr(format), uintptr(ty), uintptr(unsafe.Pointer(d0)), 0, 0)
- issue34474KeepAlive(d0)
-}
-func (c *Functions) RenderbufferStorage(target, internalformat gl.Enum, width, height int) {
- syscall.Syscall6(_glRenderbufferStorage.Addr(), 4, uintptr(target), uintptr(internalformat), uintptr(width), uintptr(height), 0, 0)
-}
-func (c *Functions) Scissor(x, y, width, height int32) {
- syscall.Syscall6(_glScissor.Addr(), 4, uintptr(x), uintptr(y), uintptr(width), uintptr(height), 0, 0)
-}
-func (c *Functions) ShaderSource(s gl.Shader, src string) {
- var n uintptr = uintptr(len(src))
- psrc := &src
- syscall.Syscall6(_glShaderSource.Addr(), 4, uintptr(s.V), 1, uintptr(unsafe.Pointer(psrc)), uintptr(unsafe.Pointer(&n)), 0, 0)
- issue34474KeepAlive(psrc)
-}
-func (c *Functions) TexImage2D(target gl.Enum, level int, internalFormat int, width, height int, format, ty gl.Enum, data []byte) {
- if len(data) == 0 {
- syscall.Syscall9(_glTexImage2D.Addr(), 9, uintptr(target), uintptr(level), uintptr(internalFormat), uintptr(width), uintptr(height), 0, uintptr(format), uintptr(ty), 0)
- } else {
- d0 := &data[0]
- syscall.Syscall9(_glTexImage2D.Addr(), 9, uintptr(target), uintptr(level), uintptr(internalFormat), uintptr(width), uintptr(height), 0, uintptr(format), uintptr(ty), uintptr(unsafe.Pointer(d0)))
- issue34474KeepAlive(d0)
- }
-}
-func (c *Functions) TexSubImage2D(target gl.Enum, level int, x, y, width, height int, format, ty gl.Enum, data []byte) {
- d0 := &data[0]
- syscall.Syscall9(_glTexSubImage2D.Addr(), 9, uintptr(target), uintptr(level), uintptr(x), uintptr(y), uintptr(width), uintptr(height), uintptr(format), uintptr(ty), uintptr(unsafe.Pointer(d0)))
- issue34474KeepAlive(d0)
-}
-func (c *Functions) TexParameteri(target, pname gl.Enum, param int) {
- syscall.Syscall(_glTexParameteri.Addr(), 3, uintptr(target), uintptr(pname), uintptr(param))
-}
-func (f *Functions) UniformBlockBinding(p gl.Program, uniformBlockIndex uint, uniformBlockBinding uint) {
- syscall.Syscall(_glUniformBlockBinding.Addr(), 3, uintptr(p.V), uintptr(uniformBlockIndex), uintptr(uniformBlockBinding))
-}
-func (c *Functions) Uniform1f(dst gl.Uniform, v float32) {
- syscall.Syscall(_glUniform1f.Addr(), 2, uintptr(dst.V), uintptr(math.Float32bits(v)), 0)
-}
-func (c *Functions) Uniform1i(dst gl.Uniform, v int) {
- syscall.Syscall(_glUniform1i.Addr(), 2, uintptr(dst.V), uintptr(v), 0)
-}
-func (c *Functions) Uniform2f(dst gl.Uniform, v0, v1 float32) {
- syscall.Syscall(_glUniform2f.Addr(), 3, uintptr(dst.V), uintptr(math.Float32bits(v0)), uintptr(math.Float32bits(v1)))
-}
-func (c *Functions) Uniform3f(dst gl.Uniform, v0, v1, v2 float32) {
- syscall.Syscall6(_glUniform3f.Addr(), 4, uintptr(dst.V), uintptr(math.Float32bits(v0)), uintptr(math.Float32bits(v1)), uintptr(math.Float32bits(v2)), 0, 0)
-}
-func (c *Functions) Uniform4f(dst gl.Uniform, v0, v1, v2, v3 float32) {
- syscall.Syscall6(_glUniform4f.Addr(), 5, uintptr(dst.V), uintptr(math.Float32bits(v0)), uintptr(math.Float32bits(v1)), uintptr(math.Float32bits(v2)), uintptr(math.Float32bits(v3)), 0)
-}
-func (c *Functions) UseProgram(p gl.Program) {
- syscall.Syscall(_glUseProgram.Addr(), 1, uintptr(p.V), 0, 0)
-}
-func (c *Functions) VertexAttribPointer(dst gl.Attrib, size int, ty gl.Enum, normalized bool, stride, offset int) {
- var norm uintptr
- if normalized {
- norm = 1
- }
- syscall.Syscall6(_glVertexAttribPointer.Addr(), 6, uintptr(dst), uintptr(size), uintptr(ty), norm, uintptr(stride), uintptr(offset))
-}
-func (c *Functions) Viewport(x, y, width, height int) {
- syscall.Syscall6(_glViewport.Addr(), 4, uintptr(x), uintptr(y), uintptr(width), uintptr(height), 0, 0)
-}
-
-func cString(s string) []byte {
- b := make([]byte, len(s)+1)
- copy(b, s)
- return b
-}
-
-// issue34474KeepAlive calls runtime.KeepAlive as a
-// workaround for golang.org/issue/34474.
-func issue34474KeepAlive(v interface{}) {
- runtime.KeepAlive(v)
-}
diff --git a/vendor/gioui.org/app/internal/log/log_android.go b/vendor/gioui.org/app/internal/log/log_android.go
index 7936911..1245598 100644
--- a/vendor/gioui.org/app/internal/log/log_android.go
+++ b/vendor/gioui.org/app/internal/log/log_android.go
@@ -40,16 +40,22 @@ type androidLogWriter struct {
}
func (w *androidLogWriter) Write(data []byte) (int, error) {
- // Truncate the buffer, leaving space for the '\0'.
- if max := len(w.buf) - 1; len(data) > max {
- data = data[:max]
+ n := 0
+ for len(data) > 0 {
+ msg := data
+ // Truncate the buffer, leaving space for the '\0'.
+ if max := len(w.buf) - 1; len(msg) > max {
+ msg = msg[:max]
+ }
+ buf := w.buf[:len(msg)+1]
+ copy(buf, msg)
+ // Terminating '\0'.
+ buf[len(msg)] = 0
+ C.__android_log_write(C.ANDROID_LOG_INFO, logTag, (*C.char)(unsafe.Pointer(&buf[0])))
+ n += len(msg)
+ data = data[len(msg):]
}
- buf := w.buf[:len(data)+1]
- copy(buf, data)
- // Terminating '\0'.
- buf[len(data)] = 0
- C.__android_log_write(C.ANDROID_LOG_INFO, logTag, (*C.char)(unsafe.Pointer(&buf[0])))
- return len(data), nil
+ return n, nil
}
func logFd(fd uintptr) {
diff --git a/vendor/gioui.org/app/internal/log/log_ios.go b/vendor/gioui.org/app/internal/log/log_ios.go
index e49f425..cad4e19 100644
--- a/vendor/gioui.org/app/internal/log/log_ios.go
+++ b/vendor/gioui.org/app/internal/log/log_ios.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build darwin && ios
// +build darwin,ios
package log
@@ -7,7 +8,11 @@ package log
/*
#cgo CFLAGS: -Werror -fmodules -fobjc-arc -x objective-c
-__attribute__ ((visibility ("hidden"))) void nslog(char *str);
+@import Foundation;
+
+static void nslog(char *str) {
+ NSLog(@"%@", @(str));
+}
*/
import "C"
@@ -17,7 +22,7 @@ import (
"log"
"unsafe"
- _ "gioui.org/app/internal/cocoainit"
+ _ "gioui.org/internal/cocoainit"
)
func init() {
diff --git a/vendor/gioui.org/app/internal/log/log_ios.m b/vendor/gioui.org/app/internal/log/log_ios.m
deleted file mode 100644
index 201bc36..0000000
--- a/vendor/gioui.org/app/internal/log/log_ios.m
+++ /dev/null
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build darwin,ios
-
-@import Foundation;
-
-#include "_cgo_export.h"
-
-void nslog(char *str) {
- NSLog(@"%@", @(str));
-}
diff --git a/vendor/gioui.org/app/internal/srgb/srgb.go b/vendor/gioui.org/app/internal/srgb/srgb.go
deleted file mode 100644
index c148b04..0000000
--- a/vendor/gioui.org/app/internal/srgb/srgb.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package srgb
-
-import (
- "fmt"
- "runtime"
- "strings"
-
- "gioui.org/app/internal/glimpl"
- "gioui.org/gpu/gl"
- "gioui.org/internal/unsafe"
-)
-
-// FBO implements an intermediate sRGB FBO
-// for gamma-correct rendering on platforms without
-// sRGB enabled native framebuffers.
-type FBO struct {
- c *glimpl.Functions
- width, height int
- frameBuffer gl.Framebuffer
- depthBuffer gl.Renderbuffer
- colorTex gl.Texture
- blitted bool
- quad gl.Buffer
- prog gl.Program
- gl3 bool
-}
-
-func New(f *glimpl.Functions) (*FBO, error) {
- var gl3 bool
- glVer := f.GetString(gl.VERSION)
- ver, _, err := gl.ParseGLVersion(glVer)
- if err != nil {
- return nil, err
- }
- if ver[0] >= 3 {
- gl3 = true
- } else {
- exts := f.GetString(gl.EXTENSIONS)
- if !strings.Contains(exts, "EXT_sRGB") {
- return nil, fmt.Errorf("no support for OpenGL ES 3 nor EXT_sRGB")
- }
- }
- s := &FBO{
- c: f,
- gl3: gl3,
- frameBuffer: f.CreateFramebuffer(),
- colorTex: f.CreateTexture(),
- depthBuffer: f.CreateRenderbuffer(),
- }
- f.BindTexture(gl.TEXTURE_2D, s.colorTex)
- f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)
- f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)
- f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST)
- f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)
- return s, nil
-}
-
-func (s *FBO) Blit() {
- if !s.blitted {
- prog, err := gl.CreateProgram(s.c, blitVSrc, blitFSrc, []string{"pos", "uv"})
- if err != nil {
- panic(err)
- }
- s.prog = prog
- s.c.UseProgram(prog)
- s.c.Uniform1i(gl.GetUniformLocation(s.c, prog, "tex"), 0)
- s.quad = s.c.CreateBuffer()
- s.c.BindBuffer(gl.ARRAY_BUFFER, s.quad)
- s.c.BufferData(gl.ARRAY_BUFFER,
- unsafe.BytesView([]float32{
- -1, +1, 0, 1,
- +1, +1, 1, 1,
- -1, -1, 0, 0,
- +1, -1, 1, 0,
- }),
- gl.STATIC_DRAW)
- s.blitted = true
- }
- s.c.BindFramebuffer(gl.FRAMEBUFFER, gl.Framebuffer{})
- s.c.UseProgram(s.prog)
- s.c.BindTexture(gl.TEXTURE_2D, s.colorTex)
- s.c.BindBuffer(gl.ARRAY_BUFFER, s.quad)
- s.c.VertexAttribPointer(0 /* pos */, 2, gl.FLOAT, false, 4*4, 0)
- s.c.VertexAttribPointer(1 /* uv */, 2, gl.FLOAT, false, 4*4, 4*2)
- s.c.EnableVertexAttribArray(0)
- s.c.EnableVertexAttribArray(1)
- s.c.DrawArrays(gl.TRIANGLE_STRIP, 0, 4)
- s.c.BindTexture(gl.TEXTURE_2D, gl.Texture{})
- s.c.DisableVertexAttribArray(0)
- s.c.DisableVertexAttribArray(1)
- s.c.BindFramebuffer(gl.FRAMEBUFFER, s.frameBuffer)
- s.c.InvalidateFramebuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0)
- s.c.InvalidateFramebuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT)
- // The Android emulator requires framebuffer 0 bound at eglSwapBuffer time.
- // Bind the sRGB framebuffer again in afterPresent.
- s.c.BindFramebuffer(gl.FRAMEBUFFER, gl.Framebuffer{})
-}
-
-func (s *FBO) AfterPresent() {
- s.c.BindFramebuffer(gl.FRAMEBUFFER, s.frameBuffer)
-}
-
-func (s *FBO) Refresh(w, h int) error {
- s.width, s.height = w, h
- if w == 0 || h == 0 {
- return nil
- }
- s.c.BindTexture(gl.TEXTURE_2D, s.colorTex)
- if s.gl3 {
- s.c.TexImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, w, h, gl.RGBA, gl.UNSIGNED_BYTE, nil)
- } else /* EXT_sRGB */ {
- s.c.TexImage2D(gl.TEXTURE_2D, 0, gl.SRGB_ALPHA_EXT, w, h, gl.SRGB_ALPHA_EXT, gl.UNSIGNED_BYTE, nil)
- }
- currentRB := gl.Renderbuffer(s.c.GetBinding(gl.RENDERBUFFER_BINDING))
- s.c.BindRenderbuffer(gl.RENDERBUFFER, s.depthBuffer)
- s.c.RenderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, w, h)
- s.c.BindRenderbuffer(gl.RENDERBUFFER, currentRB)
- s.c.BindFramebuffer(gl.FRAMEBUFFER, s.frameBuffer)
- s.c.FramebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, s.colorTex, 0)
- s.c.FramebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, s.depthBuffer)
- if st := s.c.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE {
- return fmt.Errorf("sRGB framebuffer incomplete (%dx%d), status: %#x error: %x", s.width, s.height, st, s.c.GetError())
- }
-
- if runtime.GOOS == "js" {
- // With macOS Safari, rendering to and then reading from a SRGB8_ALPHA8
- // texture result in twice gamma corrected colors. Using a plain RGBA
- // texture seems to work.
- s.c.ClearColor(.5, .5, .5, 1.0)
- s.c.Clear(gl.COLOR_BUFFER_BIT)
- var pixel [4]byte
- s.c.ReadPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel[:])
- if pixel[0] == 128 { // Correct sRGB color value is ~188
- s.c.TexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, w, h, gl.RGBA, gl.UNSIGNED_BYTE, nil)
- if st := s.c.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE {
- return fmt.Errorf("fallback RGBA framebuffer incomplete (%dx%d), status: %#x error: %x", s.width, s.height, st, s.c.GetError())
- }
- }
- }
-
- return nil
-}
-
-func (s *FBO) Release() {
- s.c.DeleteFramebuffer(s.frameBuffer)
- s.c.DeleteTexture(s.colorTex)
- s.c.DeleteRenderbuffer(s.depthBuffer)
- if s.blitted {
- s.c.DeleteBuffer(s.quad)
- s.c.DeleteProgram(s.prog)
- }
- s.c = nil
-}
-
-const (
- blitVSrc = `
-#version 100
-
-precision highp float;
-
-attribute vec2 pos;
-attribute vec2 uv;
-
-varying vec2 vUV;
-
-void main() {
- gl_Position = vec4(pos, 0, 1);
- vUV = uv;
-}
-`
- blitFSrc = `
-#version 100
-
-precision mediump float;
-
-uniform sampler2D tex;
-varying vec2 vUV;
-
-vec3 gamma(vec3 rgb) {
- vec3 exp = vec3(1.055)*pow(rgb, vec3(0.41666)) - vec3(0.055);
- vec3 lin = rgb * vec3(12.92);
- bvec3 cut = lessThan(rgb, vec3(0.0031308));
- return vec3(cut.r ? lin.r : exp.r, cut.g ? lin.g : exp.g, cut.b ? lin.b : exp.b);
-}
-
-void main() {
- vec4 col = texture2D(tex, vUV);
- vec3 rgb = col.rgb;
- rgb = gamma(rgb);
- gl_FragColor = vec4(rgb, col.a);
-}
-`
-)
diff --git a/vendor/gioui.org/app/internal/window/GioView.java b/vendor/gioui.org/app/internal/window/GioView.java
deleted file mode 100644
index be90c50..0000000
--- a/vendor/gioui.org/app/internal/window/GioView.java
+++ /dev/null
@@ -1,255 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package org.gioui;
-
-import java.lang.Class;
-import java.lang.IllegalAccessException;
-import java.lang.InstantiationException;
-import java.lang.ExceptionInInitializerError;
-import java.lang.SecurityException;
-import android.app.Activity;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
-import android.content.Context;
-import android.graphics.Rect;
-import android.os.Build;
-import android.text.Editable;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.Choreographer;
-import android.view.KeyCharacterMap;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewConfiguration;
-import android.view.WindowInsets;
-import android.view.Surface;
-import android.view.SurfaceView;
-import android.view.SurfaceHolder;
-import android.view.inputmethod.BaseInputConnection;
-import android.view.inputmethod.InputConnection;
-import android.view.inputmethod.InputMethodManager;
-import android.view.inputmethod.EditorInfo;
-
-import java.io.UnsupportedEncodingException;
-
-public final class GioView extends SurfaceView implements Choreographer.FrameCallback {
- private final static Object initLock = new Object();
- private static boolean jniLoaded;
-
- private final SurfaceHolder.Callback surfCallbacks;
- private final View.OnFocusChangeListener focusCallback;
- private final InputMethodManager imm;
- private final float scrollXScale;
- private final float scrollYScale;
-
- private long nhandle;
-
- public GioView(Context context) {
- this(context, null);
- }
-
- public GioView(Context context, AttributeSet attrs) {
- super(context, attrs);
-
- // Late initialization of the Go runtime to wait for a valid context.
- Gio.init(context.getApplicationContext());
-
- ViewConfiguration conf = ViewConfiguration.get(context);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- scrollXScale = conf.getScaledHorizontalScrollFactor();
- scrollYScale = conf.getScaledVerticalScrollFactor();
- } else {
- float listItemHeight = 48; // dp
- float px = TypedValue.applyDimension(
- TypedValue.COMPLEX_UNIT_DIP,
- listItemHeight,
- getResources().getDisplayMetrics()
- );
- scrollXScale = px;
- scrollYScale = px;
- }
-
- nhandle = onCreateView(this);
- imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
- setFocusable(true);
- setFocusableInTouchMode(true);
- focusCallback = new View.OnFocusChangeListener() {
- @Override public void onFocusChange(View v, boolean focus) {
- GioView.this.onFocusChange(nhandle, focus);
- }
- };
- setOnFocusChangeListener(focusCallback);
- surfCallbacks = new SurfaceHolder.Callback() {
- @Override public void surfaceCreated(SurfaceHolder holder) {
- // Ignore; surfaceChanged is guaranteed to be called immediately after this.
- }
- @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
- onSurfaceChanged(nhandle, getHolder().getSurface());
- }
- @Override public void surfaceDestroyed(SurfaceHolder holder) {
- onSurfaceDestroyed(nhandle);
- }
- };
- getHolder().addCallback(surfCallbacks);
- }
-
- @Override public boolean onKeyDown(int keyCode, KeyEvent event) {
- onKeyEvent(nhandle, keyCode, event.getUnicodeChar(), event.getEventTime());
- return false;
- }
-
- @Override public boolean onGenericMotionEvent(MotionEvent event) {
- dispatchMotionEvent(event);
- return true;
- }
-
- @Override public boolean onTouchEvent(MotionEvent event) {
- // Ask for unbuffered events. Flutter and Chrome does it
- // so I assume its good for us as well.
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- requestUnbufferedDispatch(event);
- }
-
- dispatchMotionEvent(event);
- return true;
- }
-
- private void dispatchMotionEvent(MotionEvent event) {
- for (int j = 0; j < event.getHistorySize(); j++) {
- long time = event.getHistoricalEventTime(j);
- for (int i = 0; i < event.getPointerCount(); i++) {
- onTouchEvent(
- nhandle,
- event.ACTION_MOVE,
- event.getPointerId(i),
- event.getToolType(i),
- event.getHistoricalX(i, j),
- event.getHistoricalY(i, j),
- scrollXScale*event.getHistoricalAxisValue(MotionEvent.AXIS_HSCROLL, i, j),
- scrollYScale*event.getHistoricalAxisValue(MotionEvent.AXIS_VSCROLL, i, j),
- event.getButtonState(),
- time);
- }
- }
- int act = event.getActionMasked();
- int idx = event.getActionIndex();
- for (int i = 0; i < event.getPointerCount(); i++) {
- int pact = event.ACTION_MOVE;
- if (i == idx) {
- pact = act;
- }
- onTouchEvent(
- nhandle,
- pact,
- event.getPointerId(i),
- event.getToolType(i),
- event.getX(i), event.getY(i),
- scrollXScale*event.getAxisValue(MotionEvent.AXIS_HSCROLL, i),
- scrollYScale*event.getAxisValue(MotionEvent.AXIS_VSCROLL, i),
- event.getButtonState(),
- event.getEventTime());
- }
- }
-
- @Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
- return new InputConnection(this);
- }
-
- void showTextInput() {
- post(new Runnable() {
- @Override public void run() {
- GioView.this.requestFocus();
- imm.showSoftInput(GioView.this, 0);
- }
- });
- }
-
- void hideTextInput() {
- post(new Runnable() {
- @Override public void run() {
- imm.hideSoftInputFromWindow(getWindowToken(), 0);
- }
- });
- }
-
- @Override protected boolean fitSystemWindows(Rect insets) {
- onWindowInsets(nhandle, insets.top, insets.right, insets.bottom, insets.left);
- return true;
- }
-
- void postFrameCallback() {
- Choreographer.getInstance().removeFrameCallback(this);
- Choreographer.getInstance().postFrameCallback(this);
- }
-
- @Override public void doFrame(long nanos) {
- onFrameCallback(nhandle, nanos);
- }
-
- int getDensity() {
- return getResources().getDisplayMetrics().densityDpi;
- }
-
- float getFontScale() {
- return getResources().getConfiguration().fontScale;
- }
-
- void start() {
- onStartView(nhandle);
- }
-
- void stop() {
- onStopView(nhandle);
- }
-
- void destroy() {
- setOnFocusChangeListener(null);
- getHolder().removeCallback(surfCallbacks);
- onDestroyView(nhandle);
- nhandle = 0;
- }
-
- void configurationChanged() {
- onConfigurationChanged(nhandle);
- }
-
- void lowMemory() {
- onLowMemory();
- }
-
- boolean backPressed() {
- return onBack(nhandle);
- }
-
- static private native long onCreateView(GioView view);
- static private native void onDestroyView(long handle);
- static private native void onStartView(long handle);
- static private native void onStopView(long handle);
- static private native void onSurfaceDestroyed(long handle);
- static private native void onSurfaceChanged(long handle, Surface surface);
- static private native void onConfigurationChanged(long handle);
- static private native void onWindowInsets(long handle, int top, int right, int bottom, int left);
- static private native void onLowMemory();
- static private native void onTouchEvent(long handle, int action, int pointerID, int tool, float x, float y, float scrollX, float scrollY, int buttons, long time);
- static private native void onKeyEvent(long handle, int code, int character, long time);
- static private native void onFrameCallback(long handle, long nanos);
- static private native boolean onBack(long handle);
- static private native void onFocusChange(long handle, boolean focus);
-
- private static class InputConnection extends BaseInputConnection {
- private final Editable editable;
-
- InputConnection(View view) {
- // Passing false enables "dummy mode", where the BaseInputConnection
- // attempts to convert IME operations to key events.
- super(view, false);
- editable = Editable.Factory.getInstance().newEditable("");
- }
-
- @Override public Editable getEditable() {
- return editable;
- }
- }
-}
diff --git a/vendor/gioui.org/app/internal/window/d3d11_windows.go b/vendor/gioui.org/app/internal/window/d3d11_windows.go
deleted file mode 100644
index f1e06a6..0000000
--- a/vendor/gioui.org/app/internal/window/d3d11_windows.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package window
-
-import (
- "gioui.org/app/internal/d3d11"
- "gioui.org/gpu/backend"
-)
-
-type d3d11Context struct {
- win *window
- swchain *d3d11.SwapChain
- fbo *d3d11.Framebuffer
- backend backend.Device
- *d3d11.Device
- width, height int
-}
-
-func init() {
- backends = append(backends, gpuAPI{
- priority: 1,
- initializer: func(w *window) (Context, error) {
- hwnd, _, _ := w.HWND()
- dev, err := d3d11.NewDevice()
- if err != nil {
- return nil, err
- }
- swchain, err := dev.CreateSwapChain(hwnd)
- if err != nil {
- dev.Release()
- return nil, err
- }
- return &d3d11Context{win: w, Device: dev, swchain: swchain}, nil
- },
- })
-}
-
-func (c *d3d11Context) Backend() (backend.Device, error) {
- backend, err := d3d11.NewBackend(c.Device)
- if err != nil {
- return nil, err
- }
- c.backend = backend
- c.backend.BindFramebuffer(c.fbo)
- return backend, nil
-}
-
-func (c *d3d11Context) Present() error {
- if err := c.swchain.Present(); err != nil {
- if err, ok := err.(d3d11.ErrorCode); ok {
- switch err.Code {
- case d3d11.DXGI_STATUS_OCCLUDED:
- // Ignore
- return nil
- case d3d11.DXGI_ERROR_DEVICE_RESET, d3d11.DXGI_ERROR_DEVICE_REMOVED, d3d11.D3DDDIERR_DEVICEREMOVED:
- return ErrDeviceLost
- }
- }
- }
- return nil
-}
-
-func (c *d3d11Context) MakeCurrent() error {
- _, width, height := c.win.HWND()
- if c.fbo != nil && width == c.width && height == c.height {
- c.backend.BindFramebuffer(c.fbo)
- return nil
- }
- if c.fbo != nil {
- c.fbo.Release()
- c.fbo = nil
- }
- if err := c.swchain.Resize(); err != nil {
- return err
- }
- c.width = width
- c.height = height
- fbo, err := c.swchain.Framebuffer(c.Device)
- if err != nil {
- return err
- }
- c.fbo = fbo
- if c.backend != nil {
- c.backend.BindFramebuffer(c.fbo)
- }
- return nil
-}
-
-func (c *d3d11Context) Lock() {}
-
-func (c *d3d11Context) Unlock() {}
-
-func (c *d3d11Context) Release() {
- if c.fbo != nil {
- c.fbo.Release()
- }
- c.swchain.Release()
- c.Device.Release()
- c.fbo = nil
- c.swchain = nil
- c.Device = nil
-}
diff --git a/vendor/gioui.org/app/internal/window/egl_android.go b/vendor/gioui.org/app/internal/window/egl_android.go
deleted file mode 100644
index 19c8d63..0000000
--- a/vendor/gioui.org/app/internal/window/egl_android.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package window
-
-/*
-#include <EGL/egl.h>
-*/
-import "C"
-
-import (
- "unsafe"
-
- "gioui.org/app/internal/egl"
-)
-
-type context struct {
- win *window
- *egl.Context
-}
-
-func (w *window) NewContext() (Context, error) {
- ctx, err := egl.NewContext(nil)
- if err != nil {
- return nil, err
- }
- return &context{win: w, Context: ctx}, nil
-}
-
-func (c *context) Release() {
- if c.Context != nil {
- c.Context.Release()
- c.Context = nil
- }
-}
-
-func (c *context) MakeCurrent() error {
- c.Context.ReleaseSurface()
- win, width, height := c.win.nativeWindow(c.Context.VisualID())
- if win == nil {
- return nil
- }
- eglSurf := egl.NativeWindowType(unsafe.Pointer(win))
- if err := c.Context.CreateSurface(eglSurf, width, height); err != nil {
- return err
- }
- if err := c.Context.MakeCurrent(); err != nil {
- return err
- }
- return nil
-}
-
-func (c *context) Lock() {}
-
-func (c *context) Unlock() {}
diff --git a/vendor/gioui.org/app/internal/window/egl_x11.go b/vendor/gioui.org/app/internal/window/egl_x11.go
deleted file mode 100644
index ffe69c6..0000000
--- a/vendor/gioui.org/app/internal/window/egl_x11.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build linux,!android,!nox11 freebsd openbsd
-
-package window
-
-import (
- "unsafe"
-
- "gioui.org/app/internal/egl"
-)
-
-type x11Context struct {
- win *x11Window
- *egl.Context
-}
-
-func (w *x11Window) NewContext() (Context, error) {
- disp := egl.NativeDisplayType(unsafe.Pointer(w.display()))
- ctx, err := egl.NewContext(disp)
- if err != nil {
- return nil, err
- }
- return &x11Context{win: w, Context: ctx}, nil
-}
-
-func (c *x11Context) Release() {
- if c.Context != nil {
- c.Context.Release()
- c.Context = nil
- }
-}
-
-func (c *x11Context) MakeCurrent() error {
- c.Context.ReleaseSurface()
- win, width, height := c.win.window()
- eglSurf := egl.NativeWindowType(uintptr(win))
- if err := c.Context.CreateSurface(eglSurf, width, height); err != nil {
- return err
- }
- if err := c.Context.MakeCurrent(); err != nil {
- return err
- }
- c.Context.EnableVSync(true)
- return nil
-}
-
-func (c *x11Context) Lock() {}
-
-func (c *x11Context) Unlock() {}
diff --git a/vendor/gioui.org/app/internal/window/gl_js.go b/vendor/gioui.org/app/internal/window/gl_js.go
deleted file mode 100644
index 0adbdf4..0000000
--- a/vendor/gioui.org/app/internal/window/gl_js.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package window
-
-import (
- "errors"
- "syscall/js"
-
- "gioui.org/app/internal/glimpl"
- "gioui.org/app/internal/srgb"
- "gioui.org/gpu/backend"
- "gioui.org/gpu/gl"
-)
-
-type context struct {
- ctx js.Value
- cnv js.Value
- f *glimpl.Functions
- srgbFBO *srgb.FBO
-}
-
-func newContext(w *window) (*context, error) {
- args := map[string]interface{}{
- // Enable low latency rendering.
- // See https://developers.google.com/web/updates/2019/05/desynchronized.
- "desynchronized": true,
- "preserveDrawingBuffer": true,
- }
- version := 2
- ctx := w.cnv.Call("getContext", "webgl2", args)
- if ctx.IsNull() {
- version = 1
- ctx = w.cnv.Call("getContext", "webgl", args)
- }
- if ctx.IsNull() {
- return nil, errors.New("app: webgl is not supported")
- }
- f := &glimpl.Functions{Ctx: ctx}
- if err := f.Init(version); err != nil {
- return nil, err
- }
- c := &context{
- ctx: ctx,
- cnv: w.cnv,
- f: f,
- }
- return c, nil
-}
-
-func (c *context) Backend() (backend.Device, error) {
- return gl.NewBackend(c.f)
-}
-
-func (c *context) Release() {
- if c.srgbFBO != nil {
- c.srgbFBO.Release()
- c.srgbFBO = nil
- }
-}
-
-func (c *context) Present() error {
- if c.srgbFBO != nil {
- c.srgbFBO.Blit()
- }
- if c.srgbFBO != nil {
- c.srgbFBO.AfterPresent()
- }
- if c.ctx.Call("isContextLost").Bool() {
- return errors.New("context lost")
- }
- return nil
-}
-
-func (c *context) Lock() {}
-
-func (c *context) Unlock() {}
-
-func (c *context) MakeCurrent() error {
- if c.srgbFBO == nil {
- var err error
- c.srgbFBO, err = srgb.New(c.f)
- if err != nil {
- c.Release()
- c.srgbFBO = nil
- return err
- }
- }
- w, h := c.cnv.Get("width").Int(), c.cnv.Get("height").Int()
- if err := c.srgbFBO.Refresh(w, h); err != nil {
- c.Release()
- return err
- }
- return nil
-}
-
-func (w *window) NewContext() (Context, error) {
- return newContext(w)
-}
diff --git a/vendor/gioui.org/app/internal/window/gl_macos.go b/vendor/gioui.org/app/internal/window/gl_macos.go
deleted file mode 100644
index e4e293d..0000000
--- a/vendor/gioui.org/app/internal/window/gl_macos.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build darwin,!ios
-
-package window
-
-import (
- "gioui.org/app/internal/glimpl"
- "gioui.org/gpu/backend"
- "gioui.org/gpu/gl"
-)
-
-/*
-#include <CoreFoundation/CoreFoundation.h>
-#include <CoreGraphics/CoreGraphics.h>
-#include <AppKit/AppKit.h>
-#include <OpenGL/gl3.h>
-
-__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLView(void);
-__attribute__ ((visibility ("hidden"))) CFTypeRef gio_contextForView(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) void gio_makeCurrentContext(CFTypeRef ctx);
-__attribute__ ((visibility ("hidden"))) void gio_flushContextBuffer(CFTypeRef ctx);
-__attribute__ ((visibility ("hidden"))) void gio_clearCurrentContext(void);
-__attribute__ ((visibility ("hidden"))) void gio_lockContext(CFTypeRef ctxRef);
-__attribute__ ((visibility ("hidden"))) void gio_unlockContext(CFTypeRef ctxRef);
-*/
-import "C"
-
-type context struct {
- c *glimpl.Functions
- ctx C.CFTypeRef
- view C.CFTypeRef
-}
-
-func init() {
- viewFactory = func() C.CFTypeRef {
- return C.gio_createGLView()
- }
-}
-
-func newContext(w *window) (*context, error) {
- view := w.contextView()
- ctx := C.gio_contextForView(view)
- c := &context{
- ctx: ctx,
- c: new(glimpl.Functions),
- view: view,
- }
- return c, nil
-}
-
-func (c *context) Backend() (backend.Device, error) {
- return gl.NewBackend(c.c)
-}
-
-func (c *context) Release() {
- c.Lock()
- defer c.Unlock()
- C.gio_clearCurrentContext()
- // We could release the context with [view clearGLContext]
- // and rely on [view openGLContext] auto-creating a new context.
- // However that second context is not properly set up by
- // OpenGLContextView, so we'll stay on the safe side and keep
- // the first context around.
-}
-
-func (c *context) Present() error {
- // Assume the caller already locked the context.
- C.glFlush()
- return nil
-}
-
-func (c *context) Lock() {
- C.gio_lockContext(c.ctx)
-}
-
-func (c *context) Unlock() {
- C.gio_unlockContext(c.ctx)
-}
-
-func (c *context) MakeCurrent() error {
- c.Lock()
- defer c.Unlock()
- C.gio_makeCurrentContext(c.ctx)
- return nil
-}
-
-func (w *window) NewContext() (Context, error) {
- return newContext(w)
-}
diff --git a/vendor/gioui.org/app/internal/window/gl_macos.m b/vendor/gioui.org/app/internal/window/gl_macos.m
deleted file mode 100644
index 0d7f772..0000000
--- a/vendor/gioui.org/app/internal/window/gl_macos.m
+++ /dev/null
@@ -1,143 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build darwin,!ios
-
-@import AppKit;
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <OpenGL/OpenGL.h>
-#include <OpenGL/gl3.h>
-#include "_cgo_export.h"
-
-static void handleMouse(NSView *view, NSEvent *event, int typ, CGFloat dx, CGFloat dy) {
- NSPoint p = [view convertPoint:[event locationInWindow] fromView:nil];
- if (!event.hasPreciseScrollingDeltas) {
- // dx and dy are in rows and columns.
- dx *= 10;
- dy *= 10;
- }
- gio_onMouse((__bridge CFTypeRef)view, typ, [NSEvent pressedMouseButtons], p.x, p.y, dx, dy, [event timestamp], [event modifierFlags]);
-}
-
-@interface GioView : NSOpenGLView
-@end
-
-@implementation GioView
-- (instancetype)initWithFrame:(NSRect)frameRect
- pixelFormat:(NSOpenGLPixelFormat *)format {
- return [super initWithFrame:frameRect pixelFormat:format];
-}
-- (void)prepareOpenGL {
- [super prepareOpenGL];
- // Bind a default VBA to emulate OpenGL ES 2.
- GLuint defVBA;
- glGenVertexArrays(1, &defVBA);
- glBindVertexArray(defVBA);
- glEnable(GL_FRAMEBUFFER_SRGB);
-}
-- (BOOL)isFlipped {
- return YES;
-}
-- (void)update {
- [super update];
- [self setNeedsDisplay:YES];
-}
-- (void)drawRect:(NSRect)r {
- gio_onDraw((__bridge CFTypeRef)self);
-}
-- (void)mouseDown:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_DOWN, 0, 0);
-}
-- (void)mouseUp:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_UP, 0, 0);
-}
-- (void)middleMouseDown:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_DOWN, 0, 0);
-}
-- (void)middletMouseUp:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_UP, 0, 0);
-}
-- (void)rightMouseDown:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_DOWN, 0, 0);
-}
-- (void)rightMouseUp:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_UP, 0, 0);
-}
-- (void)mouseMoved:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_MOVE, 0, 0);
-}
-- (void)mouseDragged:(NSEvent *)event {
- handleMouse(self, event, GIO_MOUSE_MOVE, 0, 0);
-}
-- (void)scrollWheel:(NSEvent *)event {
- CGFloat dx = -event.scrollingDeltaX;
- CGFloat dy = -event.scrollingDeltaY;
- handleMouse(self, event, GIO_MOUSE_SCROLL, dx, dy);
-}
-- (void)keyDown:(NSEvent *)event {
- NSString *keys = [event charactersIgnoringModifiers];
- gio_onKeys((__bridge CFTypeRef)self, (char *)[keys UTF8String], [event timestamp], [event modifierFlags]);
- [self interpretKeyEvents:[NSArray arrayWithObject:event]];
-}
-- (void)insertText:(id)string {
- const char *utf8 = [string UTF8String];
- gio_onText((__bridge CFTypeRef)self, (char *)utf8);
-}
-- (void)doCommandBySelector:(SEL)sel {
- // Don't pass commands up the responder chain.
- // They will end up in a beep.
-}
-@end
-
-CFTypeRef gio_createGLView(void) {
- @autoreleasepool {
- NSOpenGLPixelFormatAttribute attr[] = {
- NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
- NSOpenGLPFAColorSize, 24,
- NSOpenGLPFADepthSize, 16,
- NSOpenGLPFAAccelerated,
- // Opt-in to automatic GPU switching. CGL-only property.
- kCGLPFASupportsAutomaticGraphicsSwitching,
- NSOpenGLPFAAllowOfflineRenderers,
- 0
- };
- id pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];
-
- NSRect frame = NSMakeRect(0, 0, 0, 0);
- GioView* view = [[GioView alloc] initWithFrame:frame pixelFormat:pixFormat];
-
- [view setWantsBestResolutionOpenGLSurface:YES];
- [view setWantsLayer:YES]; // The default in Mojave.
-
- return CFBridgingRetain(view);
- }
-}
-
-void gio_setNeedsDisplay(CFTypeRef viewRef) {
- NSOpenGLView *view = (__bridge NSOpenGLView *)viewRef;
- [view setNeedsDisplay:YES];
-}
-
-CFTypeRef gio_contextForView(CFTypeRef viewRef) {
- NSOpenGLView *view = (__bridge NSOpenGLView *)viewRef;
- return (__bridge CFTypeRef)view.openGLContext;
-}
-
-void gio_clearCurrentContext(void) {
- [NSOpenGLContext clearCurrentContext];
-}
-
-void gio_makeCurrentContext(CFTypeRef ctxRef) {
- NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
- [ctx makeCurrentContext];
-}
-
-void gio_lockContext(CFTypeRef ctxRef) {
- NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
- CGLLockContext([ctx CGLContextObj]);
-}
-
-void gio_unlockContext(CFTypeRef ctxRef) {
- NSOpenGLContext *ctx = (__bridge NSOpenGLContext *)ctxRef;
- CGLUnlockContext([ctx CGLContextObj]);
-}
diff --git a/vendor/gioui.org/app/internal/window/os_android.c b/vendor/gioui.org/app/internal/window/os_android.c
deleted file mode 100644
index 8a2c62d..0000000
--- a/vendor/gioui.org/app/internal/window/os_android.c
+++ /dev/null
@@ -1,96 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-#include <jni.h>
-#include "_cgo_export.h"
-
-jint gio_jni_GetEnv(JavaVM *vm, JNIEnv **env, jint version) {
- return (*vm)->GetEnv(vm, (void **)env, version);
-}
-
-jint gio_jni_GetJavaVM(JNIEnv *env, JavaVM **jvm) {
- return (*env)->GetJavaVM(env, jvm);
-}
-
-jint gio_jni_AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args) {
- return (*vm)->AttachCurrentThread(vm, p_env, thr_args);
-}
-
-jint gio_jni_DetachCurrentThread(JavaVM *vm) {
- return (*vm)->DetachCurrentThread(vm);
-}
-
-jobject gio_jni_NewGlobalRef(JNIEnv *env, jobject obj) {
- return (*env)->NewGlobalRef(env, obj);
-}
-
-void gio_jni_DeleteGlobalRef(JNIEnv *env, jobject obj) {
- (*env)->DeleteGlobalRef(env, obj);
-}
-
-jclass gio_jni_GetObjectClass(JNIEnv *env, jobject obj) {
- return (*env)->GetObjectClass(env, obj);
-}
-
-jmethodID gio_jni_GetMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) {
- return (*env)->GetMethodID(env, clazz, name, sig);
-}
-
-jmethodID gio_jni_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) {
- return (*env)->GetStaticMethodID(env, clazz, name, sig);
-}
-
-jfloat gio_jni_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID) {
- return (*env)->CallFloatMethod(env, obj, methodID);
-}
-
-jint gio_jni_CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID) {
- return (*env)->CallIntMethod(env, obj, methodID);
-}
-
-void gio_jni_CallStaticVoidMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) {
- (*env)->CallStaticVoidMethodA(env, cls, methodID, args);
-}
-
-void gio_jni_CallVoidMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) {
- (*env)->CallVoidMethodA(env, obj, methodID, args);
-}
-
-jbyte *gio_jni_GetByteArrayElements(JNIEnv *env, jbyteArray arr) {
- return (*env)->GetByteArrayElements(env, arr, NULL);
-}
-
-void gio_jni_ReleaseByteArrayElements(JNIEnv *env, jbyteArray arr, jbyte *bytes) {
- (*env)->ReleaseByteArrayElements(env, arr, bytes, JNI_ABORT);
-}
-
-jsize gio_jni_GetArrayLength(JNIEnv *env, jbyteArray arr) {
- return (*env)->GetArrayLength(env, arr);
-}
-
-jstring gio_jni_NewString(JNIEnv *env, const jchar *unicodeChars, jsize len) {
- return (*env)->NewString(env, unicodeChars, len);
-}
-
-jsize gio_jni_GetStringLength(JNIEnv *env, jstring str) {
- return (*env)->GetStringLength(env, str);
-}
-
-const jchar *gio_jni_GetStringChars(JNIEnv *env, jstring str) {
- return (*env)->GetStringChars(env, str, NULL);
-}
-
-jthrowable gio_jni_ExceptionOccurred(JNIEnv *env) {
- return (*env)->ExceptionOccurred(env);
-}
-
-void gio_jni_ExceptionClear(JNIEnv *env) {
- (*env)->ExceptionClear(env);
-}
-
-jobject gio_jni_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID method, jvalue *args) {
- return (*env)->CallObjectMethodA(env, obj, method, args);
-}
-
-jobject gio_jni_CallStaticObjectMethodA(JNIEnv *env, jclass cls, jmethodID method, jvalue *args) {
- return (*env)->CallStaticObjectMethodA(env, cls, method, args);
-}
diff --git a/vendor/gioui.org/app/internal/window/os_android.go b/vendor/gioui.org/app/internal/window/os_android.go
deleted file mode 100644
index 3458b26..0000000
--- a/vendor/gioui.org/app/internal/window/os_android.go
+++ /dev/null
@@ -1,684 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package window
-
-/*
-#cgo CFLAGS: -Werror
-#cgo LDFLAGS: -landroid
-
-#include <android/native_window_jni.h>
-#include <android/configuration.h>
-#include <android/keycodes.h>
-#include <android/input.h>
-#include <stdlib.h>
-
-__attribute__ ((visibility ("hidden"))) jint gio_jni_GetEnv(JavaVM *vm, JNIEnv **env, jint version);
-__attribute__ ((visibility ("hidden"))) jint gio_jni_GetJavaVM(JNIEnv *env, JavaVM **jvm);
-__attribute__ ((visibility ("hidden"))) jint gio_jni_AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args);
-__attribute__ ((visibility ("hidden"))) jint gio_jni_DetachCurrentThread(JavaVM *vm);
-
-__attribute__ ((visibility ("hidden"))) jobject gio_jni_NewGlobalRef(JNIEnv *env, jobject obj);
-__attribute__ ((visibility ("hidden"))) void gio_jni_DeleteGlobalRef(JNIEnv *env, jobject obj);
-__attribute__ ((visibility ("hidden"))) jclass gio_jni_GetObjectClass(JNIEnv *env, jobject obj);
-__attribute__ ((visibility ("hidden"))) jmethodID gio_jni_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig);
-__attribute__ ((visibility ("hidden"))) jmethodID gio_jni_GetMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig);
-__attribute__ ((visibility ("hidden"))) jfloat gio_jni_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID);
-__attribute__ ((visibility ("hidden"))) jint gio_jni_CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID);
-__attribute__ ((visibility ("hidden"))) void gio_jni_CallStaticVoidMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args);
-__attribute__ ((visibility ("hidden"))) void gio_jni_CallVoidMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-__attribute__ ((visibility ("hidden"))) jbyte *gio_jni_GetByteArrayElements(JNIEnv *env, jbyteArray arr);
-__attribute__ ((visibility ("hidden"))) void gio_jni_ReleaseByteArrayElements(JNIEnv *env, jbyteArray arr, jbyte *bytes);
-__attribute__ ((visibility ("hidden"))) jsize gio_jni_GetArrayLength(JNIEnv *env, jbyteArray arr);
-__attribute__ ((visibility ("hidden"))) jstring gio_jni_NewString(JNIEnv *env, const jchar *unicodeChars, jsize len);
-__attribute__ ((visibility ("hidden"))) jsize gio_jni_GetStringLength(JNIEnv *env, jstring str);
-__attribute__ ((visibility ("hidden"))) const jchar *gio_jni_GetStringChars(JNIEnv *env, jstring str);
-__attribute__ ((visibility ("hidden"))) jthrowable gio_jni_ExceptionOccurred(JNIEnv *env);
-__attribute__ ((visibility ("hidden"))) void gio_jni_ExceptionClear(JNIEnv *env);
-__attribute__ ((visibility ("hidden"))) jobject gio_jni_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID method, jvalue *args);
-__attribute__ ((visibility ("hidden"))) jobject gio_jni_CallStaticObjectMethodA(JNIEnv *env, jclass cls, jmethodID method, jvalue *args);
-*/
-import "C"
-
-import (
- "errors"
- "fmt"
- "image"
- "reflect"
- "runtime"
- "runtime/debug"
- "sync"
- "time"
- "unicode/utf16"
- "unsafe"
-
- "gioui.org/f32"
- "gioui.org/io/key"
- "gioui.org/io/pointer"
- "gioui.org/io/system"
- "gioui.org/unit"
-)
-
-type window struct {
- callbacks Callbacks
-
- view C.jobject
-
- dpi int
- fontScale float32
- insets system.Insets
-
- stage system.Stage
- started bool
-
- mu sync.Mutex
- win *C.ANativeWindow
- animating bool
-
- // Cached Java methods.
- mgetDensity C.jmethodID
- mgetFontScale C.jmethodID
- mshowTextInput C.jmethodID
- mhideTextInput C.jmethodID
- mpostFrameCallback C.jmethodID
-}
-
-type jvalue uint64 // The largest JNI type fits in 64 bits.
-
-var dataDirChan = make(chan string, 1)
-
-var android struct {
- // mu protects all fields of this structure. However, once a
- // non-nil jvm is returned from javaVM, all the other fields may
- // be accessed unlocked.
- mu sync.Mutex
- jvm *C.JavaVM
-
- // appCtx is the global Android App context.
- appCtx C.jobject
- // gioCls is the class of the Gio class.
- gioCls C.jclass
-
- mwriteClipboard C.jmethodID
- mreadClipboard C.jmethodID
- mwakeupMainThread C.jmethodID
-}
-
-var views = make(map[C.jlong]*window)
-
-var mainWindow = newWindowRendezvous()
-
-var mainFuncs = make(chan func(env *C.JNIEnv), 1)
-
-func getMethodID(env *C.JNIEnv, class C.jclass, method, sig string) C.jmethodID {
- m := C.CString(method)
- defer C.free(unsafe.Pointer(m))
- s := C.CString(sig)
- defer C.free(unsafe.Pointer(s))
- jm := C.gio_jni_GetMethodID(env, class, m, s)
- if err := exception(env); err != nil {
- panic(err)
- }
- return jm
-}
-
-func getStaticMethodID(env *C.JNIEnv, class C.jclass, method, sig string) C.jmethodID {
- m := C.CString(method)
- defer C.free(unsafe.Pointer(m))
- s := C.CString(sig)
- defer C.free(unsafe.Pointer(s))
- jm := C.gio_jni_GetStaticMethodID(env, class, m, s)
- if err := exception(env); err != nil {
- panic(err)
- }
- return jm
-}
-
-//export Java_org_gioui_Gio_runGoMain
-func Java_org_gioui_Gio_runGoMain(env *C.JNIEnv, class C.jclass, jdataDir C.jbyteArray, context C.jobject) {
- initJVM(env, class, context)
- dirBytes := C.gio_jni_GetByteArrayElements(env, jdataDir)
- if dirBytes == nil {
- panic("runGoMain: GetByteArrayElements failed")
- }
- n := C.gio_jni_GetArrayLength(env, jdataDir)
- dataDir := C.GoStringN((*C.char)(unsafe.Pointer(dirBytes)), n)
- dataDirChan <- dataDir
- C.gio_jni_ReleaseByteArrayElements(env, jdataDir, dirBytes)
-
- runMain()
-}
-
-func initJVM(env *C.JNIEnv, gio C.jclass, ctx C.jobject) {
- android.mu.Lock()
- defer android.mu.Unlock()
- if res := C.gio_jni_GetJavaVM(env, &android.jvm); res != 0 {
- panic("gio: GetJavaVM failed")
- }
- android.appCtx = C.gio_jni_NewGlobalRef(env, ctx)
- android.gioCls = C.jclass(C.gio_jni_NewGlobalRef(env, C.jobject(gio)))
- android.mwriteClipboard = getStaticMethodID(env, gio, "writeClipboard", "(Landroid/content/Context;Ljava/lang/String;)V")
- android.mreadClipboard = getStaticMethodID(env, gio, "readClipboard", "(Landroid/content/Context;)Ljava/lang/String;")
- android.mwakeupMainThread = getStaticMethodID(env, gio, "wakeupMainThread", "()V")
-}
-
-func JavaVM() uintptr {
- jvm := javaVM()
- return uintptr(unsafe.Pointer(jvm))
-}
-
-func javaVM() *C.JavaVM {
- android.mu.Lock()
- defer android.mu.Unlock()
- return android.jvm
-}
-
-func AppContext() uintptr {
- android.mu.Lock()
- defer android.mu.Unlock()
- return uintptr(android.appCtx)
-}
-
-func GetDataDir() string {
- return <-dataDirChan
-}
-
-//export Java_org_gioui_GioView_onCreateView
-func Java_org_gioui_GioView_onCreateView(env *C.JNIEnv, class C.jclass, view C.jobject) C.jlong {
- view = C.gio_jni_NewGlobalRef(env, view)
- w := &window{
- view: view,
- mgetDensity: getMethodID(env, class, "getDensity", "()I"),
- mgetFontScale: getMethodID(env, class, "getFontScale", "()F"),
- mshowTextInput: getMethodID(env, class, "showTextInput", "()V"),
- mhideTextInput: getMethodID(env, class, "hideTextInput", "()V"),
- mpostFrameCallback: getMethodID(env, class, "postFrameCallback", "()V"),
- }
- wopts := <-mainWindow.out
- w.callbacks = wopts.window
- w.callbacks.SetDriver(w)
- handle := C.jlong(view)
- views[handle] = w
- w.loadConfig(env, class)
- w.setStage(system.StagePaused)
- return handle
-}
-
-//export Java_org_gioui_GioView_onDestroyView
-func Java_org_gioui_GioView_onDestroyView(env *C.JNIEnv, class C.jclass, handle C.jlong) {
- w := views[handle]
- w.callbacks.SetDriver(nil)
- delete(views, handle)
- C.gio_jni_DeleteGlobalRef(env, w.view)
- w.view = 0
-}
-
-//export Java_org_gioui_GioView_onStopView
-func Java_org_gioui_GioView_onStopView(env *C.JNIEnv, class C.jclass, handle C.jlong) {
- w := views[handle]
- w.started = false
- w.setStage(system.StagePaused)
-}
-
-//export Java_org_gioui_GioView_onStartView
-func Java_org_gioui_GioView_onStartView(env *C.JNIEnv, class C.jclass, handle C.jlong) {
- w := views[handle]
- w.started = true
- if w.aNativeWindow() != nil {
- w.setVisible()
- }
-}
-
-//export Java_org_gioui_GioView_onSurfaceDestroyed
-func Java_org_gioui_GioView_onSurfaceDestroyed(env *C.JNIEnv, class C.jclass, handle C.jlong) {
- w := views[handle]
- w.mu.Lock()
- w.win = nil
- w.mu.Unlock()
- w.setStage(system.StagePaused)
-}
-
-//export Java_org_gioui_GioView_onSurfaceChanged
-func Java_org_gioui_GioView_onSurfaceChanged(env *C.JNIEnv, class C.jclass, handle C.jlong, surf C.jobject) {
- w := views[handle]
- w.mu.Lock()
- w.win = C.ANativeWindow_fromSurface(env, surf)
- w.mu.Unlock()
- if w.started {
- w.setVisible()
- }
-}
-
-//export Java_org_gioui_GioView_onLowMemory
-func Java_org_gioui_GioView_onLowMemory() {
- runtime.GC()
- debug.FreeOSMemory()
-}
-
-//export Java_org_gioui_GioView_onConfigurationChanged
-func Java_org_gioui_GioView_onConfigurationChanged(env *C.JNIEnv, class C.jclass, view C.jlong) {
- w := views[view]
- w.loadConfig(env, class)
- if w.stage >= system.StageRunning {
- w.draw(true)
- }
-}
-
-//export Java_org_gioui_GioView_onFrameCallback
-func Java_org_gioui_GioView_onFrameCallback(env *C.JNIEnv, class C.jclass, view C.jlong, nanos C.jlong) {
- w, exist := views[view]
- if !exist {
- return
- }
- if w.stage < system.StageRunning {
- return
- }
- w.mu.Lock()
- anim := w.animating
- w.mu.Unlock()
- if anim {
- runInJVM(javaVM(), func(env *C.JNIEnv) {
- callVoidMethod(env, w.view, w.mpostFrameCallback)
- })
- w.draw(false)
- }
-}
-
-//export Java_org_gioui_GioView_onBack
-func Java_org_gioui_GioView_onBack(env *C.JNIEnv, class C.jclass, view C.jlong) C.jboolean {
- w := views[view]
- ev := &system.CommandEvent{Type: system.CommandBack}
- w.callbacks.Event(ev)
- if ev.Cancel {
- return C.JNI_TRUE
- }
- return C.JNI_FALSE
-}
-
-//export Java_org_gioui_GioView_onFocusChange
-func Java_org_gioui_GioView_onFocusChange(env *C.JNIEnv, class C.jclass, view C.jlong, focus C.jboolean) {
- w := views[view]
- w.callbacks.Event(key.FocusEvent{Focus: focus == C.JNI_TRUE})
-}
-
-//export Java_org_gioui_GioView_onWindowInsets
-func Java_org_gioui_GioView_onWindowInsets(env *C.JNIEnv, class C.jclass, view C.jlong, top, right, bottom, left C.jint) {
- w := views[view]
- w.insets = system.Insets{
- Top: unit.Px(float32(top)),
- Right: unit.Px(float32(right)),
- Bottom: unit.Px(float32(bottom)),
- Left: unit.Px(float32(left)),
- }
- if w.stage >= system.StageRunning {
- w.draw(true)
- }
-}
-
-func (w *window) setVisible() {
- win := w.aNativeWindow()
- width, height := C.ANativeWindow_getWidth(win), C.ANativeWindow_getHeight(win)
- if width == 0 || height == 0 {
- return
- }
- w.setStage(system.StageRunning)
- w.draw(true)
-}
-
-func (w *window) setStage(stage system.Stage) {
- if stage == w.stage {
- return
- }
- w.stage = stage
- w.callbacks.Event(system.StageEvent{stage})
-}
-
-func (w *window) nativeWindow(visID int) (*C.ANativeWindow, int, int) {
- win := w.aNativeWindow()
- var width, height int
- if win != nil {
- if C.ANativeWindow_setBuffersGeometry(win, 0, 0, C.int32_t(visID)) != 0 {
- panic(errors.New("ANativeWindow_setBuffersGeometry failed"))
- }
- w, h := C.ANativeWindow_getWidth(win), C.ANativeWindow_getHeight(win)
- width, height = int(w), int(h)
- }
- return win, width, height
-}
-
-func (w *window) aNativeWindow() *C.ANativeWindow {
- w.mu.Lock()
- defer w.mu.Unlock()
- return w.win
-}
-
-func (w *window) loadConfig(env *C.JNIEnv, class C.jclass) {
- dpi := int(C.gio_jni_CallIntMethod(env, w.view, w.mgetDensity))
- w.fontScale = float32(C.gio_jni_CallFloatMethod(env, w.view, w.mgetFontScale))
- switch dpi {
- case C.ACONFIGURATION_DENSITY_NONE,
- C.ACONFIGURATION_DENSITY_DEFAULT,
- C.ACONFIGURATION_DENSITY_ANY:
- // Assume standard density.
- w.dpi = C.ACONFIGURATION_DENSITY_MEDIUM
- default:
- w.dpi = int(dpi)
- }
-}
-
-func (w *window) SetAnimating(anim bool) {
- w.mu.Lock()
- w.animating = anim
- w.mu.Unlock()
- if anim {
- runOnMain(func(env *C.JNIEnv) {
- if w.view == 0 {
- // View was destroyed while switching to main thread.
- return
- }
- callVoidMethod(env, w.view, w.mpostFrameCallback)
- })
- }
-}
-
-func (w *window) draw(sync bool) {
- win := w.aNativeWindow()
- width, height := C.ANativeWindow_getWidth(win), C.ANativeWindow_getHeight(win)
- if width == 0 || height == 0 {
- return
- }
- const inchPrDp = 1.0 / 160
- ppdp := float32(w.dpi) * inchPrDp
- w.callbacks.Event(FrameEvent{
- FrameEvent: system.FrameEvent{
- Now: time.Now(),
- Size: image.Point{
- X: int(width),
- Y: int(height),
- },
- Insets: w.insets,
- Metric: unit.Metric{
- PxPerDp: ppdp,
- PxPerSp: w.fontScale * ppdp,
- },
- },
- Sync: sync,
- })
-}
-
-type keyMapper func(devId, keyCode C.int32_t) rune
-
-func runInJVM(jvm *C.JavaVM, f func(env *C.JNIEnv)) {
- if jvm == nil {
- panic("nil JVM")
- }
- runtime.LockOSThread()
- defer runtime.UnlockOSThread()
- var env *C.JNIEnv
- if res := C.gio_jni_GetEnv(jvm, &env, C.JNI_VERSION_1_6); res != C.JNI_OK {
- if res != C.JNI_EDETACHED {
- panic(fmt.Errorf("JNI GetEnv failed with error %d", res))
- }
- if C.gio_jni_AttachCurrentThread(jvm, &env, nil) != C.JNI_OK {
- panic(errors.New("runInJVM: AttachCurrentThread failed"))
- }
- defer C.gio_jni_DetachCurrentThread(jvm)
- }
-
- f(env)
-}
-
-func convertKeyCode(code C.jint) (string, bool) {
- var n string
- switch code {
- case C.AKEYCODE_DPAD_UP:
- n = key.NameUpArrow
- case C.AKEYCODE_DPAD_DOWN:
- n = key.NameDownArrow
- case C.AKEYCODE_DPAD_LEFT:
- n = key.NameLeftArrow
- case C.AKEYCODE_DPAD_RIGHT:
- n = key.NameRightArrow
- case C.AKEYCODE_FORWARD_DEL:
- n = key.NameDeleteForward
- case C.AKEYCODE_DEL:
- n = key.NameDeleteBackward
- default:
- return "", false
- }
- return n, true
-}
-
-//export Java_org_gioui_GioView_onKeyEvent
-func Java_org_gioui_GioView_onKeyEvent(env *C.JNIEnv, class C.jclass, handle C.jlong, keyCode, r C.jint, t C.jlong) {
- w := views[handle]
- if n, ok := convertKeyCode(keyCode); ok {
- w.callbacks.Event(key.Event{Name: n})
- }
- if r != 0 {
- w.callbacks.Event(key.EditEvent{Text: string(rune(r))})
- }
-}
-
-//export Java_org_gioui_GioView_onTouchEvent
-func Java_org_gioui_GioView_onTouchEvent(env *C.JNIEnv, class C.jclass, handle C.jlong, action, pointerID, tool C.jint, x, y, scrollX, scrollY C.jfloat, jbtns C.jint, t C.jlong) {
- w := views[handle]
- var typ pointer.Type
- switch action {
- case C.AMOTION_EVENT_ACTION_DOWN, C.AMOTION_EVENT_ACTION_POINTER_DOWN:
- typ = pointer.Press
- case C.AMOTION_EVENT_ACTION_UP, C.AMOTION_EVENT_ACTION_POINTER_UP:
- typ = pointer.Release
- case C.AMOTION_EVENT_ACTION_CANCEL:
- typ = pointer.Cancel
- case C.AMOTION_EVENT_ACTION_MOVE:
- typ = pointer.Move
- case C.AMOTION_EVENT_ACTION_SCROLL:
- typ = pointer.Scroll
- default:
- return
- }
- var src pointer.Source
- var btns pointer.Buttons
- if jbtns&C.AMOTION_EVENT_BUTTON_PRIMARY != 0 {
- btns |= pointer.ButtonLeft
- }
- if jbtns&C.AMOTION_EVENT_BUTTON_SECONDARY != 0 {
- btns |= pointer.ButtonRight
- }
- if jbtns&C.AMOTION_EVENT_BUTTON_TERTIARY != 0 {
- btns |= pointer.ButtonMiddle
- }
- switch tool {
- case C.AMOTION_EVENT_TOOL_TYPE_FINGER:
- src = pointer.Touch
- case C.AMOTION_EVENT_TOOL_TYPE_MOUSE:
- src = pointer.Mouse
- case C.AMOTION_EVENT_TOOL_TYPE_UNKNOWN:
- // For example, triggered via 'adb shell input tap'.
- // Instead of discarding it, treat it as a touch event.
- src = pointer.Touch
- default:
- return
- }
- w.callbacks.Event(pointer.Event{
- Type: typ,
- Source: src,
- Buttons: btns,
- PointerID: pointer.ID(pointerID),
- Time: time.Duration(t) * time.Millisecond,
- Position: f32.Point{X: float32(x), Y: float32(y)},
- Scroll: f32.Pt(float32(scrollX), float32(scrollY)),
- })
-}
-
-func (w *window) ShowTextInput(show bool) {
- if w.view == 0 {
- return
- }
- runInJVM(javaVM(), func(env *C.JNIEnv) {
- if show {
- callVoidMethod(env, w.view, w.mshowTextInput)
- } else {
- callVoidMethod(env, w.view, w.mhideTextInput)
- }
- })
-}
-
-func javaString(env *C.JNIEnv, str string) C.jstring {
- if str == "" {
- return 0
- }
- utf16Chars := utf16.Encode([]rune(str))
- return C.gio_jni_NewString(env, (*C.jchar)(unsafe.Pointer(&utf16Chars[0])), C.int(len(utf16Chars)))
-}
-
-// Do invokes the function with a global JNI handle to the view. If
-// the view is destroyed, Do returns false and does not invoke the
-// function.
-//
-// NOTE: Do must be invoked on the Android main thread.
-func (w *window) Do(f func(view uintptr)) bool {
- if w.view == 0 {
- return false
- }
- runInJVM(javaVM(), func(env *C.JNIEnv) {
- view := C.gio_jni_NewGlobalRef(env, w.view)
- defer C.gio_jni_DeleteGlobalRef(env, view)
- f(uintptr(view))
- })
- return true
-}
-
-func varArgs(args []jvalue) *C.jvalue {
- if len(args) == 0 {
- return nil
- }
- return (*C.jvalue)(unsafe.Pointer(&args[0]))
-}
-
-func callStaticVoidMethod(env *C.JNIEnv, cls C.jclass, method C.jmethodID, args ...jvalue) error {
- C.gio_jni_CallStaticVoidMethodA(env, cls, method, varArgs(args))
- return exception(env)
-}
-
-func callStaticObjectMethod(env *C.JNIEnv, cls C.jclass, method C.jmethodID, args ...jvalue) (C.jobject, error) {
- res := C.gio_jni_CallStaticObjectMethodA(env, cls, method, varArgs(args))
- return res, exception(env)
-}
-
-func callVoidMethod(env *C.JNIEnv, obj C.jobject, method C.jmethodID, args ...jvalue) error {
- C.gio_jni_CallVoidMethodA(env, obj, method, varArgs(args))
- return exception(env)
-}
-
-func callObjectMethod(env *C.JNIEnv, obj C.jobject, method C.jmethodID, args ...jvalue) (C.jobject, error) {
- res := C.gio_jni_CallObjectMethodA(env, obj, method, varArgs(args))
- return res, exception(env)
-}
-
-// exception returns an error corresponding to the pending
-// exception, or nil if no exception is pending. The pending
-// exception is cleared.
-func exception(env *C.JNIEnv) error {
- thr := C.gio_jni_ExceptionOccurred(env)
- if thr == 0 {
- return nil
- }
- C.gio_jni_ExceptionClear(env)
- cls := getObjectClass(env, C.jobject(thr))
- toString := getMethodID(env, cls, "toString", "()Ljava/lang/String;")
- msg, err := callObjectMethod(env, C.jobject(thr), toString)
- if err != nil {
- return err
- }
- return errors.New(goString(env, C.jstring(msg)))
-}
-
-func getObjectClass(env *C.JNIEnv, obj C.jobject) C.jclass {
- if obj == 0 {
- panic("null object")
- }
- cls := C.gio_jni_GetObjectClass(env, C.jobject(obj))
- if err := exception(env); err != nil {
- // GetObjectClass should never fail.
- panic(err)
- }
- return cls
-}
-
-// goString converts the JVM jstring to a Go string.
-func goString(env *C.JNIEnv, str C.jstring) string {
- if str == 0 {
- return ""
- }
- strlen := C.gio_jni_GetStringLength(env, C.jstring(str))
- chars := C.gio_jni_GetStringChars(env, C.jstring(str))
- var utf16Chars []uint16
- hdr := (*reflect.SliceHeader)(unsafe.Pointer(&utf16Chars))
- hdr.Data = uintptr(unsafe.Pointer(chars))
- hdr.Cap = int(strlen)
- hdr.Len = int(strlen)
- utf8 := utf16.Decode(utf16Chars)
- return string(utf8)
-}
-
-func Main() {
-}
-
-func NewWindow(window Callbacks, opts *Options) error {
- mainWindow.in <- windowAndOptions{window, opts}
- return <-mainWindow.errs
-}
-
-func (w *window) WriteClipboard(s string) {
- runOnMain(func(env *C.JNIEnv) {
- jstr := javaString(env, s)
- callStaticVoidMethod(env, android.gioCls, android.mwriteClipboard,
- jvalue(android.appCtx), jvalue(jstr))
- })
-}
-
-func (w *window) ReadClipboard() {
- runOnMain(func(env *C.JNIEnv) {
- c, err := callStaticObjectMethod(env, android.gioCls, android.mreadClipboard,
- jvalue(android.appCtx))
- if err != nil {
- return
- }
- content := goString(env, C.jstring(c))
- w.callbacks.Event(system.ClipboardEvent{Text: content})
- })
-}
-
-// Close the window. Not implemented for Android.
-func (w *window) Close() {}
-
-// RunOnMain is the exported version of runOnMain without a JNI
-// environement.
-func RunOnMain(f func()) {
- runOnMain(func(_ *C.JNIEnv) {
- f()
- })
-}
-
-// runOnMain runs a function on the Java main thread.
-func runOnMain(f func(env *C.JNIEnv)) {
- go func() {
- mainFuncs <- f
- runInJVM(javaVM(), func(env *C.JNIEnv) {
- callStaticVoidMethod(env, android.gioCls, android.mwakeupMainThread)
- })
- }()
-}
-
-//export Java_org_gioui_Gio_scheduleMainFuncs
-func Java_org_gioui_Gio_scheduleMainFuncs(env *C.JNIEnv, cls C.jclass) {
- for {
- select {
- case f := <-mainFuncs:
- f(env)
- default:
- return
- }
- }
-}
diff --git a/vendor/gioui.org/app/internal/window/os_darwin.m b/vendor/gioui.org/app/internal/window/os_darwin.m
deleted file mode 100644
index dc4f00b..0000000
--- a/vendor/gioui.org/app/internal/window/os_darwin.m
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-@import Dispatch;
-@import Foundation;
-
-#include "_cgo_export.h"
-
-void gio_wakeupMainThread(void) {
- dispatch_async(dispatch_get_main_queue(), ^{
- gio_dispatchMainFuncs();
- });
-}
-
-NSUInteger gio_nsstringLength(CFTypeRef cstr) {
- NSString *str = (__bridge NSString *)cstr;
- return [str length];
-}
-
-void gio_nsstringGetCharacters(CFTypeRef cstr, unichar *chars, NSUInteger loc, NSUInteger length) {
- NSString *str = (__bridge NSString *)cstr;
- [str getCharacters:chars range:NSMakeRange(loc, length)];
-}
diff --git a/vendor/gioui.org/app/internal/window/os_macos.go b/vendor/gioui.org/app/internal/window/os_macos.go
deleted file mode 100644
index ef95b70..0000000
--- a/vendor/gioui.org/app/internal/window/os_macos.go
+++ /dev/null
@@ -1,460 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build darwin,!ios
-
-package window
-
-import (
- "errors"
- "image"
- "runtime"
- "time"
- "unicode"
- "unicode/utf16"
- "unsafe"
-
- "gioui.org/f32"
- "gioui.org/io/key"
- "gioui.org/io/pointer"
- "gioui.org/io/system"
- "gioui.org/unit"
-
- _ "gioui.org/app/internal/cocoainit"
-)
-
-/*
-#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
-
-#include <AppKit/AppKit.h>
-
-#define GIO_MOUSE_MOVE 1
-#define GIO_MOUSE_UP 2
-#define GIO_MOUSE_DOWN 3
-#define GIO_MOUSE_SCROLL 4
-
-__attribute__ ((visibility ("hidden"))) void gio_main(void);
-__attribute__ ((visibility ("hidden"))) CGFloat gio_viewWidth(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) CGFloat gio_viewHeight(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) CGFloat gio_getViewBackingScale(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) CGFloat gio_getScreenBackingScale(void);
-__attribute__ ((visibility ("hidden"))) CFTypeRef gio_readClipboard(void);
-__attribute__ ((visibility ("hidden"))) void gio_writeClipboard(unichar *chars, NSUInteger length);
-__attribute__ ((visibility ("hidden"))) void gio_setNeedsDisplay(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createWindow(CFTypeRef viewRef, const char *title, CGFloat width, CGFloat height, CGFloat minWidth, CGFloat minHeight, CGFloat maxWidth, CGFloat maxHeight);
-__attribute__ ((visibility ("hidden"))) void gio_makeKeyAndOrderFront(CFTypeRef windowRef);
-__attribute__ ((visibility ("hidden"))) NSPoint gio_cascadeTopLeftFromPoint(CFTypeRef windowRef, NSPoint topLeft);
-__attribute__ ((visibility ("hidden"))) void gio_close(CFTypeRef windowRef);
-*/
-import "C"
-
-func init() {
- // Darwin requires that UI operations happen on the main thread only.
- runtime.LockOSThread()
-}
-
-type window struct {
- view C.CFTypeRef
- window C.CFTypeRef
- w Callbacks
- stage system.Stage
- displayLink *displayLink
-
- scale float32
-}
-
-// viewMap is the mapping from Cocoa NSViews to Go windows.
-var viewMap = make(map[C.CFTypeRef]*window)
-
-var viewFactory func() C.CFTypeRef
-
-// launched is closed when applicationDidFinishLaunching is called.
-var launched = make(chan struct{})
-
-// nextTopLeft is the offset to use for the next window's call to
-// cascadeTopLeftFromPoint.
-var nextTopLeft C.NSPoint
-
-// mustView is like lookoupView, except that it panics
-// if the view isn't mapped.
-func mustView(view C.CFTypeRef) *window {
- w, ok := lookupView(view)
- if !ok {
- panic("no window for view")
- }
- return w
-}
-
-func lookupView(view C.CFTypeRef) (*window, bool) {
- w, exists := viewMap[view]
- if !exists {
- return nil, false
- }
- return w, true
-}
-
-func deleteView(view C.CFTypeRef) {
- delete(viewMap, view)
-}
-
-func insertView(view C.CFTypeRef, w *window) {
- viewMap[view] = w
-}
-
-func (w *window) contextView() C.CFTypeRef {
- return w.view
-}
-
-func (w *window) ReadClipboard() {
- runOnMain(func() {
- content := nsstringToString(C.gio_readClipboard())
- w.w.Event(system.ClipboardEvent{Text: content})
- })
-}
-
-func (w *window) WriteClipboard(s string) {
- u16 := utf16.Encode([]rune(s))
- runOnMain(func() {
- var chars *C.unichar
- if len(u16) > 0 {
- chars = (*C.unichar)(unsafe.Pointer(&u16[0]))
- }
- C.gio_writeClipboard(chars, C.NSUInteger(len(u16)))
- })
-}
-
-func (w *window) ShowTextInput(show bool) {}
-
-func (w *window) SetAnimating(anim bool) {
- if anim {
- w.displayLink.Start()
- } else {
- w.displayLink.Stop()
- }
-}
-
-func (w *window) Close() {
- runOnMain(func() {
- // Make sure the view is still valid. The window might've been closed
- // during the switch to the main thread.
- if w.view != 0 {
- C.gio_close(w.window)
- }
- })
-}
-
-func (w *window) setStage(stage system.Stage) {
- if stage == w.stage {
- return
- }
- w.stage = stage
- w.w.Event(system.StageEvent{Stage: stage})
-}
-
-//export gio_onKeys
-func gio_onKeys(view C.CFTypeRef, cstr *C.char, ti C.double, mods C.NSUInteger) {
- str := C.GoString(cstr)
- kmods := convertMods(mods)
- w := mustView(view)
- for _, k := range str {
- if n, ok := convertKey(k); ok {
- w.w.Event(key.Event{
- Name: n,
- Modifiers: kmods,
- })
- }
- }
-}
-
-//export gio_onText
-func gio_onText(view C.CFTypeRef, cstr *C.char) {
- str := C.GoString(cstr)
- w := mustView(view)
- w.w.Event(key.EditEvent{Text: str})
-}
-
-//export gio_onMouse
-func gio_onMouse(view C.CFTypeRef, cdir C.int, cbtns C.NSUInteger, x, y, dx, dy C.CGFloat, ti C.double, mods C.NSUInteger) {
- var typ pointer.Type
- switch cdir {
- case C.GIO_MOUSE_MOVE:
- typ = pointer.Move
- case C.GIO_MOUSE_UP:
- typ = pointer.Release
- case C.GIO_MOUSE_DOWN:
- typ = pointer.Press
- case C.GIO_MOUSE_SCROLL:
- typ = pointer.Scroll
- default:
- panic("invalid direction")
- }
- var btns pointer.Buttons
- if cbtns&(1<<0) != 0 {
- btns |= pointer.ButtonLeft
- }
- if cbtns&(1<<1) != 0 {
- btns |= pointer.ButtonRight
- }
- if cbtns&(1<<2) != 0 {
- btns |= pointer.ButtonMiddle
- }
- t := time.Duration(float64(ti)*float64(time.Second) + .5)
- w := mustView(view)
- xf, yf := float32(x)*w.scale, float32(y)*w.scale
- dxf, dyf := float32(dx)*w.scale, float32(dy)*w.scale
- w.w.Event(pointer.Event{
- Type: typ,
- Source: pointer.Mouse,
- Time: t,
- Buttons: btns,
- Position: f32.Point{X: xf, Y: yf},
- Scroll: f32.Point{X: dxf, Y: dyf},
- Modifiers: convertMods(mods),
- })
-}
-
-//export gio_onDraw
-func gio_onDraw(view C.CFTypeRef) {
- w := mustView(view)
- w.draw()
-}
-
-//export gio_onFocus
-func gio_onFocus(view C.CFTypeRef, focus C.BOOL) {
- w := mustView(view)
- w.w.Event(key.FocusEvent{Focus: focus == C.YES})
-}
-
-//export gio_onChangeScreen
-func gio_onChangeScreen(view C.CFTypeRef, did uint64) {
- w := mustView(view)
- w.displayLink.SetDisplayID(did)
-}
-
-func (w *window) draw() {
- w.scale = float32(C.gio_getViewBackingScale(w.view))
- wf, hf := float32(C.gio_viewWidth(w.view)), float32(C.gio_viewHeight(w.view))
- if wf == 0 || hf == 0 {
- return
- }
- width := int(wf*w.scale + .5)
- height := int(hf*w.scale + .5)
- cfg := configFor(w.scale)
- w.setStage(system.StageRunning)
- w.w.Event(FrameEvent{
- FrameEvent: system.FrameEvent{
- Now: time.Now(),
- Size: image.Point{
- X: width,
- Y: height,
- },
- Metric: cfg,
- },
- Sync: true,
- })
-}
-
-func configFor(scale float32) unit.Metric {
- return unit.Metric{
- PxPerDp: scale,
- PxPerSp: scale,
- }
-}
-
-//export gio_onClose
-func gio_onClose(view C.CFTypeRef) {
- w := mustView(view)
- w.displayLink.Close()
- deleteView(view)
- w.w.Event(system.DestroyEvent{})
- C.CFRelease(w.view)
- w.view = 0
- C.CFRelease(w.window)
- w.window = 0
-}
-
-//export gio_onHide
-func gio_onHide(view C.CFTypeRef) {
- w := mustView(view)
- w.setStage(system.StagePaused)
-}
-
-//export gio_onShow
-func gio_onShow(view C.CFTypeRef) {
- w := mustView(view)
- w.setStage(system.StageRunning)
-}
-
-//export gio_onAppHide
-func gio_onAppHide() {
- for _, w := range viewMap {
- w.setStage(system.StagePaused)
- }
-}
-
-//export gio_onAppShow
-func gio_onAppShow() {
- for _, w := range viewMap {
- w.setStage(system.StageRunning)
- }
-}
-
-//export gio_onFinishLaunching
-func gio_onFinishLaunching() {
- close(launched)
-}
-
-func NewWindow(win Callbacks, opts *Options) error {
- <-launched
- errch := make(chan error)
- runOnMain(func() {
- w, err := newWindow(opts)
- if err != nil {
- errch <- err
- return
- }
- screenScale := float32(C.gio_getScreenBackingScale())
- cfg := configFor(screenScale)
- width := cfg.Px(opts.Width)
- height := cfg.Px(opts.Height)
- // Window sizes is in unscaled screen coordinates, not device pixels.
- width = int(float32(width) / screenScale)
- height = int(float32(height) / screenScale)
- minWidth := cfg.Px(opts.MinWidth)
- minHeight := cfg.Px(opts.MinHeight)
- minWidth = int(float32(minWidth) / screenScale)
- minHeight = int(float32(minHeight) / screenScale)
- maxWidth := cfg.Px(opts.MaxWidth)
- maxHeight := cfg.Px(opts.MaxHeight)
- maxWidth = int(float32(maxWidth) / screenScale)
- maxHeight = int(float32(maxHeight) / screenScale)
- title := C.CString(opts.Title)
- defer C.free(unsafe.Pointer(title))
- errch <- nil
- win.SetDriver(w)
- w.w = win
- w.window = C.gio_createWindow(w.view, title, C.CGFloat(width), C.CGFloat(height),
- C.CGFloat(minWidth), C.CGFloat(minHeight), C.CGFloat(maxWidth), C.CGFloat(maxHeight))
- if nextTopLeft.x == 0 && nextTopLeft.y == 0 {
- // cascadeTopLeftFromPoint treats (0, 0) as a no-op,
- // and just returns the offset we need for the first window.
- nextTopLeft = C.gio_cascadeTopLeftFromPoint(w.window, nextTopLeft)
- }
- nextTopLeft = C.gio_cascadeTopLeftFromPoint(w.window, nextTopLeft)
- C.gio_makeKeyAndOrderFront(w.window)
- })
- return <-errch
-}
-
-func newWindow(opts *Options) (*window, error) {
- view := viewFactory()
- if view == 0 {
- return nil, errors.New("CreateWindow: failed to create view")
- }
- scale := float32(C.gio_getViewBackingScale(view))
- w := &window{
- view: view,
- scale: scale,
- }
- dl, err := NewDisplayLink(func() {
- runOnMain(func() {
- if w.view != 0 {
- C.gio_setNeedsDisplay(w.view)
- }
- })
- })
- w.displayLink = dl
- if err != nil {
- C.CFRelease(view)
- return nil, err
- }
- insertView(view, w)
- return w, nil
-}
-
-func Main() {
- C.gio_main()
-}
-
-func convertKey(k rune) (string, bool) {
- var n string
- switch k {
- case 0x1b:
- n = key.NameEscape
- case C.NSLeftArrowFunctionKey:
- n = key.NameLeftArrow
- case C.NSRightArrowFunctionKey:
- n = key.NameRightArrow
- case C.NSUpArrowFunctionKey:
- n = key.NameUpArrow
- case C.NSDownArrowFunctionKey:
- n = key.NameDownArrow
- case 0xd:
- n = key.NameReturn
- case 0x3:
- n = key.NameEnter
- case C.NSHomeFunctionKey:
- n = key.NameHome
- case C.NSEndFunctionKey:
- n = key.NameEnd
- case 0x7f:
- n = key.NameDeleteBackward
- case C.NSDeleteFunctionKey:
- n = key.NameDeleteForward
- case C.NSPageUpFunctionKey:
- n = key.NamePageUp
- case C.NSPageDownFunctionKey:
- n = key.NamePageDown
- case C.NSF1FunctionKey:
- n = "F1"
- case C.NSF2FunctionKey:
- n = "F2"
- case C.NSF3FunctionKey:
- n = "F3"
- case C.NSF4FunctionKey:
- n = "F4"
- case C.NSF5FunctionKey:
- n = "F5"
- case C.NSF6FunctionKey:
- n = "F6"
- case C.NSF7FunctionKey:
- n = "F7"
- case C.NSF8FunctionKey:
- n = "F8"
- case C.NSF9FunctionKey:
- n = "F9"
- case C.NSF10FunctionKey:
- n = "F10"
- case C.NSF11FunctionKey:
- n = "F11"
- case C.NSF12FunctionKey:
- n = "F12"
- case 0x09, 0x19:
- n = key.NameTab
- case 0x20:
- n = "Space"
- default:
- k = unicode.ToUpper(k)
- if !unicode.IsPrint(k) {
- return "", false
- }
- n = string(k)
- }
- return n, true
-}
-
-func convertMods(mods C.NSUInteger) key.Modifiers {
- var kmods key.Modifiers
- if mods&C.NSAlternateKeyMask != 0 {
- kmods |= key.ModAlt
- }
- if mods&C.NSControlKeyMask != 0 {
- kmods |= key.ModCtrl
- }
- if mods&C.NSCommandKeyMask != 0 {
- kmods |= key.ModCommand
- }
- if mods&C.NSShiftKeyMask != 0 {
- kmods |= key.ModShift
- }
- return kmods
-}
diff --git a/vendor/gioui.org/app/internal/window/os_unix.go b/vendor/gioui.org/app/internal/window/os_unix.go
deleted file mode 100644
index baaebb5..0000000
--- a/vendor/gioui.org/app/internal/window/os_unix.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build linux,!android freebsd openbsd
-
-package window
-
-import (
- "errors"
-)
-
-func Main() {
- select {}
-}
-
-// instead of creating files with build tags for each combination of wayland +/- x11
-// let each driver initialize these variables with their own version of createWindow.
-var wlDriver, x11Driver func(Callbacks, *Options) error
-
-func NewWindow(window Callbacks, opts *Options) error {
- var errFirst, err error
- if wlDriver != nil {
- if err = wlDriver(window, opts); err == nil {
- return nil
- }
- errFirst = err
- }
- if x11Driver != nil {
- if err = x11Driver(window, opts); err == nil {
- return nil
- }
- if errFirst == nil {
- errFirst = err
- }
- }
- if errFirst != nil {
- return errFirst
- }
- return errors.New("app: no window driver available")
-}
diff --git a/vendor/gioui.org/app/internal/window/window.go b/vendor/gioui.org/app/internal/window/window.go
deleted file mode 100644
index 30ba360..0000000
--- a/vendor/gioui.org/app/internal/window/window.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// Package window implements platform specific windows
-// and GPU contexts.
-package window
-
-import (
- "errors"
-
- "gioui.org/gpu/backend"
- "gioui.org/io/event"
- "gioui.org/io/system"
- "gioui.org/unit"
-)
-
-type Options struct {
- Width, Height unit.Value
- MinWidth, MinHeight unit.Value
- MaxWidth, MaxHeight unit.Value
- Title string
-}
-
-type FrameEvent struct {
- system.FrameEvent
-
- Sync bool
-}
-
-type Callbacks interface {
- SetDriver(d Driver)
- Event(e event.Event)
-}
-
-type Context interface {
- Backend() (backend.Device, error)
- Present() error
- MakeCurrent() error
- Release()
- Lock()
- Unlock()
-}
-
-// ErrDeviceLost is returned from Context.Present when
-// the underlying GPU device is gone and should be
-// recreated.
-var ErrDeviceLost = errors.New("GPU device lost")
-
-// Driver is the interface for the platform implementation
-// of a window.
-type Driver interface {
- // SetAnimating sets the animation flag. When the window is animating,
- // FrameEvents are delivered as fast as the display can handle them.
- SetAnimating(anim bool)
- // ShowTextInput updates the virtual keyboard state.
- ShowTextInput(show bool)
- NewContext() (Context, error)
-
- // ReadClipboard requests the clipboard content.
- ReadClipboard()
- // WriteClipboard requests a clipboard write.
- WriteClipboard(s string)
-
- // Close the window.
- Close()
-}
-
-type windowRendezvous struct {
- in chan windowAndOptions
- out chan windowAndOptions
- errs chan error
-}
-
-type windowAndOptions struct {
- window Callbacks
- opts *Options
-}
-
-func newWindowRendezvous() *windowRendezvous {
- wr := &windowRendezvous{
- in: make(chan windowAndOptions),
- out: make(chan windowAndOptions),
- errs: make(chan error),
- }
- go func() {
- var main windowAndOptions
- var out chan windowAndOptions
- for {
- select {
- case w := <-wr.in:
- var err error
- if main.window != nil {
- err = errors.New("multiple windows are not supported")
- }
- wr.errs <- err
- main = w
- out = wr.out
- case out <- main:
- }
- }
- }()
- return wr
-}
diff --git a/vendor/gioui.org/app/internal/windows/windows.go b/vendor/gioui.org/app/internal/windows/windows.go
index 9006326..65a01d3 100644
--- a/vendor/gioui.org/app/internal/windows/windows.go
+++ b/vendor/gioui.org/app/internal/windows/windows.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build windows
// +build windows
package windows
@@ -54,14 +55,44 @@ type MinMaxInfo struct {
PtMaxTrackSize Point
}
+type WindowPlacement struct {
+ length uint32
+ flags uint32
+ showCmd uint32
+ ptMinPosition Point
+ ptMaxPosition Point
+ rcNormalPosition Rect
+ rcDevice Rect
+}
+
+type MonitorInfo struct {
+ cbSize uint32
+ Monitor Rect
+ WorkArea Rect
+ Flags uint32
+}
+
const (
+ TRUE = 1
+
CS_HREDRAW = 0x0002
CS_VREDRAW = 0x0001
CS_OWNDC = 0x0020
CW_USEDEFAULT = -2147483648
- IDC_ARROW = 32512
+ GWL_STYLE = ^(uint32(16) - 1) // -16
+ HWND_TOPMOST = ^(uint32(1) - 1) // -1
+
+ HTCLIENT = 1
+
+ IDC_ARROW = 32512
+ IDC_IBEAM = 32513
+ IDC_HAND = 32649
+ IDC_CROSS = 32515
+ IDC_SIZENS = 32645
+ IDC_SIZEWE = 32644
+ IDC_SIZEALL = 32646
INFINITE = 0xFFFFFFFF
@@ -77,6 +108,13 @@ const (
SW_SHOWDEFAULT = 10
+ SWP_FRAMECHANGED = 0x0020
+ SWP_NOMOVE = 0x0002
+ SWP_NOOWNERZORDER = 0x0200
+ SWP_NOSIZE = 0x0001
+ SWP_NOZORDER = 0x0004
+ SWP_SHOWWINDOW = 0x0040
+
USER_TIMER_MINIMUM = 0x0000000A
VK_CONTROL = 0x11
@@ -142,14 +180,17 @@ const (
WM_MBUTTONUP = 0x0208
WM_MOUSEMOVE = 0x0200
WM_MOUSEWHEEL = 0x020A
+ WM_MOUSEHWHEEL = 0x020E
WM_PAINT = 0x000F
WM_CLOSE = 0x0010
WM_QUIT = 0x0012
+ WM_SETCURSOR = 0x0020
WM_SETFOCUS = 0x0007
WM_KILLFOCUS = 0x0008
WM_SHOWWINDOW = 0x0018
WM_SIZE = 0x0005
WM_SYSKEYDOWN = 0x0104
+ WM_SYSKEYUP = 0x0105
WM_RBUTTONDOWN = 0x0204
WM_RBUTTONUP = 0x0205
WM_TIMER = 0x0113
@@ -159,6 +200,7 @@ const (
WS_CLIPCHILDREN = 0x00010000
WS_CLIPSIBLINGS = 0x04000000
+ WS_MAXIMIZE = 0x01000000
WS_VISIBLE = 0x10000000
WS_OVERLAPPED = 0x00000000
WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME |
@@ -185,6 +227,19 @@ const (
GHND = 0x0042
CF_UNICODETEXT = 13
+ IMAGE_BITMAP = 0
+ IMAGE_ICON = 1
+ IMAGE_CURSOR = 2
+
+ LR_CREATEDIBSECTION = 0x00002000
+ LR_DEFAULTCOLOR = 0x00000000
+ LR_DEFAULTSIZE = 0x00000040
+ LR_LOADFROMFILE = 0x00000010
+ LR_LOADMAP3DCOLORS = 0x00001000
+ LR_LOADTRANSPARENT = 0x00000020
+ LR_MONOCHROME = 0x00000001
+ LR_SHARED = 0x00008000
+ LR_VGACOLOR = 0x00000080
)
var (
@@ -207,12 +262,20 @@ var (
_GetClientRect = user32.NewProc("GetClientRect")
_GetClipboardData = user32.NewProc("GetClipboardData")
_GetDC = user32.NewProc("GetDC")
+ _GetDpiForWindow = user32.NewProc("GetDpiForWindow")
_GetKeyState = user32.NewProc("GetKeyState")
_GetMessage = user32.NewProc("GetMessageW")
_GetMessageTime = user32.NewProc("GetMessageTime")
+ _GetMonitorInfo = user32.NewProc("GetMonitorInfoW")
+ _GetWindowLong = user32.NewProc("GetWindowLongPtrW")
+ _GetWindowLong32 = user32.NewProc("GetWindowLongW")
+ _GetWindowPlacement = user32.NewProc("GetWindowPlacement")
_KillTimer = user32.NewProc("KillTimer")
_LoadCursor = user32.NewProc("LoadCursorW")
+ _LoadImage = user32.NewProc("LoadImageW")
_MonitorFromPoint = user32.NewProc("MonitorFromPoint")
+ _MonitorFromWindow = user32.NewProc("MonitorFromWindow")
+ _MoveWindow = user32.NewProc("MoveWindow")
_MsgWaitForMultipleObjectsEx = user32.NewProc("MsgWaitForMultipleObjectsEx")
_OpenClipboard = user32.NewProc("OpenClipboard")
_PeekMessage = user32.NewProc("PeekMessageW")
@@ -224,11 +287,17 @@ var (
_ScreenToClient = user32.NewProc("ScreenToClient")
_ShowWindow = user32.NewProc("ShowWindow")
_SetCapture = user32.NewProc("SetCapture")
+ _SetCursor = user32.NewProc("SetCursor")
_SetClipboardData = user32.NewProc("SetClipboardData")
_SetForegroundWindow = user32.NewProc("SetForegroundWindow")
_SetFocus = user32.NewProc("SetFocus")
_SetProcessDPIAware = user32.NewProc("SetProcessDPIAware")
_SetTimer = user32.NewProc("SetTimer")
+ _SetWindowLong = user32.NewProc("SetWindowLongPtrW")
+ _SetWindowLong32 = user32.NewProc("SetWindowLongW")
+ _SetWindowPlacement = user32.NewProc("SetWindowPlacement")
+ _SetWindowPos = user32.NewProc("SetWindowPos")
+ _SetWindowText = user32.NewProc("SetWindowTextW")
_TranslateMessage = user32.NewProc("TranslateMessage")
_UnregisterClass = user32.NewProc("UnregisterClassW")
_UpdateWindow = user32.NewProc("UpdateWindow")
@@ -343,7 +412,7 @@ func getDpiForMonitor(hmonitor syscall.Handle, dpiType uint32) int {
// GetSystemDPI returns the effective DPI of the system.
func GetSystemDPI() int {
- // Check for getDpiForMonitor, introduced in Windows 8.1.
+ // Check for GetDpiForMonitor, introduced in Windows 8.1.
if _GetDpiForMonitor.Find() == nil {
hmon := monitorFromPoint(Point{}, MONITOR_DEFAULTTOPRIMARY)
return getDpiForMonitor(hmon, MDT_EFFECTIVE_DPI)
@@ -377,6 +446,66 @@ func GetMessageTime() time.Duration {
return time.Duration(r) * time.Millisecond
}
+// GetWindowDPI returns the effective DPI of the window.
+func GetWindowDPI(hwnd syscall.Handle) int {
+ // Check for GetDpiForWindow, introduced in Windows 10.
+ if _GetDpiForWindow.Find() == nil {
+ dpi, _, _ := _GetDpiForWindow.Call(uintptr(hwnd))
+ return int(dpi)
+ } else {
+ return GetSystemDPI()
+ }
+}
+
+func GetWindowPlacement(hwnd syscall.Handle) *WindowPlacement {
+ var wp WindowPlacement
+ wp.length = uint32(unsafe.Sizeof(wp))
+ _GetWindowPlacement.Call(uintptr(hwnd), uintptr(unsafe.Pointer(&wp)))
+ return &wp
+}
+
+func GetMonitorInfo(hwnd syscall.Handle) MonitorInfo {
+ var mi MonitorInfo
+ mi.cbSize = uint32(unsafe.Sizeof(mi))
+ v, _, _ := _MonitorFromWindow.Call(uintptr(hwnd), MONITOR_DEFAULTTOPRIMARY)
+ _GetMonitorInfo.Call(v, uintptr(unsafe.Pointer(&mi)))
+ return mi
+}
+
+func GetWindowLong(hwnd syscall.Handle) (style uintptr) {
+ if runtime.GOARCH == "386" {
+ style, _, _ = _GetWindowLong32.Call(uintptr(hwnd), uintptr(GWL_STYLE))
+ } else {
+ style, _, _ = _GetWindowLong.Call(uintptr(hwnd), uintptr(GWL_STYLE))
+ }
+ return
+}
+
+func SetWindowLong(hwnd syscall.Handle, idx uint32, style uintptr) {
+ if runtime.GOARCH == "386" {
+ _SetWindowLong32.Call(uintptr(hwnd), uintptr(idx), style)
+ } else {
+ _SetWindowLong.Call(uintptr(hwnd), uintptr(idx), style)
+ }
+}
+
+func SetWindowPlacement(hwnd syscall.Handle, wp *WindowPlacement) {
+ _SetWindowPlacement.Call(uintptr(hwnd), uintptr(unsafe.Pointer(wp)))
+}
+
+func SetWindowPos(hwnd syscall.Handle, hwndInsertAfter uint32, x, y, dx, dy int32, style uintptr) {
+ _SetWindowPos.Call(uintptr(hwnd), uintptr(hwndInsertAfter),
+ uintptr(x), uintptr(y),
+ uintptr(dx), uintptr(dy),
+ style,
+ )
+}
+
+func SetWindowText(hwnd syscall.Handle, title string) {
+ wname := syscall.StringToUTF16Ptr(title)
+ _SetWindowText.Call(uintptr(hwnd), uintptr(unsafe.Pointer(wname)))
+}
+
func GlobalAlloc(size int) (syscall.Handle, error) {
r, _, err := _GlobalAlloc.Call(GHND, uintptr(size))
if r == 0 {
@@ -417,6 +546,22 @@ func LoadCursor(curID uint16) (syscall.Handle, error) {
return syscall.Handle(h), nil
}
+func LoadImage(hInst syscall.Handle, res uint32, typ uint32, cx, cy int, fuload uint32) (syscall.Handle, error) {
+ h, _, err := _LoadImage.Call(uintptr(hInst), uintptr(res), uintptr(typ), uintptr(cx), uintptr(cy), uintptr(fuload))
+ if h == 0 {
+ return 0, fmt.Errorf("LoadImageW failed: %v", err)
+ }
+ return syscall.Handle(h), nil
+}
+
+func MoveWindow(hwnd syscall.Handle, x, y, width, height int32, repaint bool) {
+ var paint uintptr
+ if repaint {
+ paint = TRUE
+ }
+ _MoveWindow.Call(uintptr(hwnd), uintptr(x), uintptr(y), uintptr(width), uintptr(height), paint)
+}
+
func monitorFromPoint(pt Point, flags uint32) syscall.Handle {
r, _, _ := _MonitorFromPoint.Call(uintptr(pt.X), uintptr(pt.Y), uintptr(flags))
return syscall.Handle(r)
@@ -500,6 +645,10 @@ func SetClipboardData(format uint32, mem syscall.Handle) error {
return nil
}
+func SetCursor(h syscall.Handle) {
+ _SetCursor.Call(uintptr(h))
+}
+
func SetTimer(hwnd syscall.Handle, nIDEvent uintptr, uElapse uint32, timerProc uintptr) error {
r, _, err := _SetTimer.Call(uintptr(hwnd), uintptr(nIDEvent), uintptr(uElapse), timerProc)
if r == 0 {
@@ -530,6 +679,10 @@ func UpdateWindow(hwnd syscall.Handle) {
_UpdateWindow.Call(uintptr(hwnd))
}
+func (p WindowPlacement) Rect() Rect {
+ return p.rcNormalPosition
+}
+
// issue34474KeepAlive calls runtime.KeepAlive as a
// workaround for golang.org/issue/34474.
func issue34474KeepAlive(v interface{}) {
diff --git a/vendor/gioui.org/app/internal/xkb/xkb_unix.go b/vendor/gioui.org/app/internal/xkb/xkb_unix.go
index 3525692..68b1329 100644
--- a/vendor/gioui.org/app/internal/xkb/xkb_unix.go
+++ b/vendor/gioui.org/app/internal/xkb/xkb_unix.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build (linux && !android) || freebsd || openbsd
// +build linux,!android freebsd openbsd
// Package xkb implements a Go interface for the X Keyboard Extension library.
@@ -150,7 +151,7 @@ func (x *Context) Modifiers() key.Modifiers {
return mods
}
-func (x *Context) DispatchKey(keyCode uint32) (events []event.Event) {
+func (x *Context) DispatchKey(keyCode uint32, state key.State) (events []event.Event) {
if x.state == nil {
return
}
@@ -163,6 +164,7 @@ func (x *Context) DispatchKey(keyCode uint32) (events []event.Event) {
cmd := key.Event{
Name: name,
Modifiers: x.Modifiers(),
+ State: state,
}
// Ensure that a physical backtab key is translated to
// Shift-Tab.
@@ -185,7 +187,10 @@ func (x *Context) DispatchKey(keyCode uint32) (events []event.Event) {
C.xkb_compose_state_reset(x.compState)
str = x.utf8Buf[:size]
case C.XKB_COMPOSE_NOTHING:
- str = x.charsForKeycode(kc)
+ mod := x.Modifiers()
+ if mod&(key.ModCtrl|key.ModAlt|key.ModSuper) == 0 {
+ str = x.charsForKeycode(kc)
+ }
}
// Report only printable runes.
var n int
@@ -198,7 +203,7 @@ func (x *Context) DispatchKey(keyCode uint32) (events []event.Event) {
str = str[:len(str)-s]
}
}
- if len(str) > 0 {
+ if state == key.Press && len(str) > 0 {
events = append(events, key.EditEvent{Text: string(str)})
}
return
@@ -230,7 +235,7 @@ func convertKeysym(s C.xkb_keysym_t) (string, bool) {
if 'a' <= s && s <= 'z' {
return string(rune(s - 'a' + 'A')), true
}
- if ' ' <= s && s <= '~' {
+ if ' ' < s && s <= '~' {
return string(rune(s)), true
}
var n string
@@ -288,7 +293,7 @@ func convertKeysym(s C.xkb_keysym_t) (string, bool) {
case C.XKB_KEY_Tab, C.XKB_KEY_KP_Tab, C.XKB_KEY_ISO_Left_Tab:
n = key.NameTab
case 0x20, C.XKB_KEY_KP_Space:
- n = "Space"
+ n = key.NameSpace
default:
return "", false
}
diff --git a/vendor/gioui.org/app/loop.go b/vendor/gioui.org/app/loop.go
deleted file mode 100644
index 0b2195a..0000000
--- a/vendor/gioui.org/app/loop.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package app
-
-import (
- "image"
- "runtime"
-
- "gioui.org/app/internal/window"
- "gioui.org/gpu"
- "gioui.org/op"
-)
-
-type renderLoop struct {
- summary string
- drawing bool
- err error
-
- frames chan frame
- results chan frameResult
- refresh chan struct{}
- refreshErr chan error
- ack chan struct{}
- stop chan struct{}
- stopped chan struct{}
-}
-
-type frame struct {
- viewport image.Point
- ops *op.Ops
-}
-
-type frameResult struct {
- profile string
- err error
-}
-
-func newLoop(ctx window.Context) (*renderLoop, error) {
- l := &renderLoop{
- frames: make(chan frame),
- results: make(chan frameResult),
- refresh: make(chan struct{}),
- refreshErr: make(chan error),
- // Ack is buffered so GPU commands can be issued after
- // ack'ing the frame.
- ack: make(chan struct{}, 1),
- stop: make(chan struct{}),
- stopped: make(chan struct{}),
- }
- if err := l.renderLoop(ctx); err != nil {
- return nil, err
- }
- return l, nil
-}
-
-func (l *renderLoop) renderLoop(ctx window.Context) error {
- // GL Operations must happen on a single OS thread, so
- // pass initialization result through a channel.
- initErr := make(chan error)
- go func() {
- defer close(l.stopped)
- runtime.LockOSThread()
- // Don't UnlockOSThread to avoid reuse by the Go runtime.
-
- if err := ctx.MakeCurrent(); err != nil {
- initErr <- err
- return
- }
- b, err := ctx.Backend()
- if err != nil {
- initErr <- err
- return
- }
- g, err := gpu.New(b)
- if err != nil {
- initErr <- err
- return
- }
- defer ctx.Release()
- initErr <- nil
- loop:
- for {
- select {
- case <-l.refresh:
- l.refreshErr <- ctx.MakeCurrent()
- case frame := <-l.frames:
- ctx.Lock()
- g.Collect(frame.viewport, frame.ops)
- // Signal that we're done with the frame ops.
- l.ack <- struct{}{}
- g.BeginFrame()
- var res frameResult
- res.err = ctx.Present()
- g.EndFrame()
- res.profile = g.Profile()
- ctx.Unlock()
- l.results <- res
- case <-l.stop:
- break loop
- }
- }
- }()
- return <-initErr
-}
-
-func (l *renderLoop) Release() {
- // Flush error.
- l.Flush()
- close(l.stop)
- <-l.stopped
- l.stop = nil
-}
-
-func (l *renderLoop) Flush() error {
- if l.drawing {
- st := <-l.results
- l.setErr(st.err)
- if st.profile != "" {
- l.summary = st.profile
- }
- l.drawing = false
- }
- return l.err
-}
-
-func (l *renderLoop) Summary() string {
- return l.summary
-}
-
-func (l *renderLoop) Refresh() {
- if l.err != nil {
- return
- }
- // Make sure any pending frame is complete.
- l.Flush()
- l.refresh <- struct{}{}
- l.setErr(<-l.refreshErr)
-}
-
-// Draw initiates a draw of a frame. It returns a channel
-// than signals when the frame is no longer being accessed.
-func (l *renderLoop) Draw(viewport image.Point, frameOps *op.Ops) <-chan struct{} {
- if l.err != nil {
- l.ack <- struct{}{}
- return l.ack
- }
- l.Flush()
- l.frames <- frame{viewport, frameOps}
- l.drawing = true
- return l.ack
-}
-
-func (l *renderLoop) setErr(err error) {
- if l.err == nil {
- l.err = err
- }
-}
diff --git a/vendor/gioui.org/app/metal_darwin.go b/vendor/gioui.org/app/metal_darwin.go
new file mode 100644
index 0000000..06b89f3
--- /dev/null
+++ b/vendor/gioui.org/app/metal_darwin.go
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build !nometal
+// +build !nometal
+
+package app
+
+import (
+ "errors"
+
+ "gioui.org/gpu"
+)
+
+/*
+#cgo CFLAGS: -Werror -xobjective-c -fmodules -fobjc-arc
+
+@import Metal;
+@import QuartzCore.CAMetalLayer;
+
+#include <CoreFoundation/CoreFoundation.h>
+
+static CFTypeRef createMetalDevice(void) {
+ @autoreleasepool {
+ id<MTLDevice> dev = MTLCreateSystemDefaultDevice();
+ return CFBridgingRetain(dev);
+ }
+}
+
+static void setupLayer(CFTypeRef layerRef, CFTypeRef devRef) {
+ @autoreleasepool {
+ CAMetalLayer *layer = (__bridge CAMetalLayer *)layerRef;
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ layer.device = dev;
+ // Package gpu assumes an sRGB-encoded framebuffer.
+ layer.pixelFormat = MTLPixelFormatBGRA8Unorm_sRGB;
+ if (@available(iOS 11.0, *)) {
+ // Never let nextDrawable time out and return nil.
+ layer.allowsNextDrawableTimeout = NO;
+ }
+ }
+}
+
+static CFTypeRef nextDrawable(CFTypeRef layerRef) {
+ @autoreleasepool {
+ CAMetalLayer *layer = (__bridge CAMetalLayer *)layerRef;
+ return CFBridgingRetain([layer nextDrawable]);
+ }
+}
+
+static CFTypeRef drawableTexture(CFTypeRef drawableRef) {
+ @autoreleasepool {
+ id<CAMetalDrawable> drawable = (__bridge id<CAMetalDrawable>)drawableRef;
+ return CFBridgingRetain(drawable.texture);
+ }
+}
+
+static void presentDrawable(CFTypeRef queueRef, CFTypeRef drawableRef) {
+ @autoreleasepool {
+ id<MTLDrawable> drawable = (__bridge id<MTLDrawable>)drawableRef;
+ id<MTLCommandQueue> queue = (__bridge id<MTLCommandQueue>)queueRef;
+ id<MTLCommandBuffer> cmdBuffer = [queue commandBuffer];
+ [cmdBuffer presentDrawable:drawable];
+ [cmdBuffer commit];
+ }
+}
+
+static CFTypeRef newCommandQueue(CFTypeRef devRef) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ return CFBridgingRetain([dev newCommandQueue]);
+ }
+}
+*/
+import "C"
+
+type mtlContext struct {
+ dev C.CFTypeRef
+ view C.CFTypeRef
+ layer C.CFTypeRef
+ queue C.CFTypeRef
+ drawable C.CFTypeRef
+ texture C.CFTypeRef
+}
+
+func newMtlContext(w *window) (*mtlContext, error) {
+ dev := C.createMetalDevice()
+ if dev == 0 {
+ return nil, errors.New("metal: MTLCreateSystemDefaultDevice failed")
+ }
+ view := w.contextView()
+ layer := getMetalLayer(view)
+ if layer == 0 {
+ C.CFRelease(dev)
+ return nil, errors.New("metal: CAMetalLayer construction failed")
+ }
+ queue := C.newCommandQueue(dev)
+ if layer == 0 {
+ C.CFRelease(dev)
+ C.CFRelease(layer)
+ return nil, errors.New("metal: [MTLDevice newCommandQueue] failed")
+ }
+ C.setupLayer(layer, dev)
+ c := &mtlContext{
+ dev: dev,
+ view: view,
+ layer: layer,
+ queue: queue,
+ }
+ return c, nil
+}
+
+func (c *mtlContext) RenderTarget() (gpu.RenderTarget, error) {
+ if c.drawable != 0 || c.texture != 0 {
+ return nil, errors.New("metal:a previous RenderTarget wasn't Presented")
+ }
+ c.drawable = C.nextDrawable(c.layer)
+ if c.drawable == 0 {
+ return nil, errors.New("metal: [CAMetalLayer nextDrawable] failed")
+ }
+ c.texture = C.drawableTexture(c.drawable)
+ if c.texture == 0 {
+ return nil, errors.New("metal: CADrawable.texture is nil")
+ }
+ return gpu.MetalRenderTarget{
+ Texture: uintptr(c.texture),
+ }, nil
+}
+
+func (c *mtlContext) API() gpu.API {
+ return gpu.Metal{
+ Device: uintptr(c.dev),
+ Queue: uintptr(c.queue),
+ PixelFormat: int(C.MTLPixelFormatBGRA8Unorm_sRGB),
+ }
+}
+
+func (c *mtlContext) Release() {
+ C.CFRelease(c.queue)
+ C.CFRelease(c.dev)
+ C.CFRelease(c.layer)
+ if c.drawable != 0 {
+ C.CFRelease(c.drawable)
+ }
+ if c.texture != 0 {
+ C.CFRelease(c.texture)
+ }
+ *c = mtlContext{}
+}
+
+func (c *mtlContext) Present() error {
+ C.CFRelease(c.texture)
+ c.texture = 0
+ C.presentDrawable(c.queue, c.drawable)
+ C.CFRelease(c.drawable)
+ c.drawable = 0
+ return nil
+}
+
+func (c *mtlContext) Lock() error {
+ return nil
+}
+
+func (c *mtlContext) Unlock() {}
+
+func (c *mtlContext) Refresh() error {
+ resizeDrawable(c.view, c.layer)
+ return nil
+}
+
+func (w *window) NewContext() (context, error) {
+ return newMtlContext(w)
+}
diff --git a/vendor/gioui.org/app/metal_ios.go b/vendor/gioui.org/app/metal_ios.go
new file mode 100644
index 0000000..860ba1a
--- /dev/null
+++ b/vendor/gioui.org/app/metal_ios.go
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build !nometal
+// +build !nometal
+
+package app
+
+/*
+#cgo CFLAGS: -Werror -xobjective-c -fmodules -fobjc-arc
+
+@import UIKit;
+
+@import QuartzCore.CAMetalLayer;
+
+#include <CoreFoundation/CoreFoundation.h>
+
+Class gio_layerClass(void) {
+ return [CAMetalLayer class];
+}
+
+static CFTypeRef getMetalLayer(CFTypeRef viewRef) {
+ @autoreleasepool {
+ UIView *view = (__bridge UIView *)viewRef;
+ return CFBridgingRetain(view.layer);
+ }
+}
+
+static void resizeDrawable(CFTypeRef viewRef, CFTypeRef layerRef) {
+ @autoreleasepool {
+ UIView *view = (__bridge UIView *)viewRef;
+ CAMetalLayer *layer = (__bridge CAMetalLayer *)layerRef;
+ layer.contentsScale = view.contentScaleFactor;
+ CGSize size = layer.bounds.size;
+ size.width *= layer.contentsScale;
+ size.height *= layer.contentsScale;
+ layer.drawableSize = size;
+ }
+}
+*/
+import "C"
+
+func getMetalLayer(view C.CFTypeRef) C.CFTypeRef {
+ return C.getMetalLayer(view)
+}
+
+func resizeDrawable(view, layer C.CFTypeRef) {
+ C.resizeDrawable(view, layer)
+}
diff --git a/vendor/gioui.org/app/metal_macos.go b/vendor/gioui.org/app/metal_macos.go
new file mode 100644
index 0000000..7db06a9
--- /dev/null
+++ b/vendor/gioui.org/app/metal_macos.go
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build darwin && !ios && !nometal
+// +build darwin,!ios,!nometal
+
+package app
+
+/*
+#cgo CFLAGS: -Werror -xobjective-c -fmodules -fobjc-arc
+
+@import AppKit;
+
+@import QuartzCore.CAMetalLayer;
+
+#include <CoreFoundation/CoreFoundation.h>
+
+CALayer *gio_layerFactory(void) {
+ @autoreleasepool {
+ return [CAMetalLayer layer];
+ }
+}
+
+static CFTypeRef getMetalLayer(CFTypeRef viewRef) {
+ @autoreleasepool {
+ NSView *view = (__bridge NSView *)viewRef;
+ return CFBridgingRetain(view.layer);
+ }
+}
+
+static void resizeDrawable(CFTypeRef viewRef, CFTypeRef layerRef) {
+ @autoreleasepool {
+ NSView *view = (__bridge NSView *)viewRef;
+ CAMetalLayer *layer = (__bridge CAMetalLayer *)layerRef;
+ CGSize size = layer.bounds.size;
+ size.width *= layer.contentsScale;
+ size.height *= layer.contentsScale;
+ layer.drawableSize = size;
+ }
+}
+*/
+import "C"
+
+func getMetalLayer(view C.CFTypeRef) C.CFTypeRef {
+ return C.getMetalLayer(view)
+}
+
+func resizeDrawable(view, layer C.CFTypeRef) {
+ C.resizeDrawable(view, layer)
+}
diff --git a/vendor/gioui.org/app/os.go b/vendor/gioui.org/app/os.go
new file mode 100644
index 0000000..fc5c266
--- /dev/null
+++ b/vendor/gioui.org/app/os.go
@@ -0,0 +1,220 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// package app implements platform specific windows
+// and GPU contexts.
+package app
+
+import (
+ "errors"
+ "image"
+ "image/color"
+
+ "gioui.org/io/key"
+
+ "gioui.org/gpu"
+ "gioui.org/io/pointer"
+ "gioui.org/io/system"
+ "gioui.org/unit"
+)
+
+type size struct {
+ Width unit.Value
+ Height unit.Value
+}
+
+// errOutOfDate is reported when the GPU surface dimensions or properties no
+// longer match the window.
+var errOutOfDate = errors.New("app: GPU surface out of date")
+
+// Config describes a Window configuration.
+type Config struct {
+ // Size is the window dimensions (Width, Height).
+ Size image.Point
+ // MaxSize is the window maximum allowed dimensions.
+ MaxSize image.Point
+ // MinSize is the window minimum allowed dimensions.
+ MinSize image.Point
+ // Title is the window title displayed in its decoration bar.
+ Title string
+ // WindowMode is the window mode.
+ Mode WindowMode
+ // StatusColor is the color of the Android status bar.
+ StatusColor color.NRGBA
+ // NavigationColor is the color of the navigation bar
+ // on Android, or the address bar in browsers.
+ NavigationColor color.NRGBA
+ // Orientation is the current window orientation.
+ Orientation Orientation
+ // CustomRenderer is true when the window content is rendered by the
+ // client.
+ CustomRenderer bool
+}
+
+// ConfigEvent is sent whenever the configuration of a Window changes.
+type ConfigEvent struct {
+ Config Config
+}
+
+func (c *Config) apply(m unit.Metric, options []Option) {
+ for _, o := range options {
+ o(m, c)
+ }
+}
+
+type wakeupEvent struct{}
+
+// WindowMode is the window mode (WindowMode.Option sets it).
+//
+// Supported platforms are macOS, X11, Windows, Android and JS.
+type WindowMode uint8
+
+const (
+ // Windowed is the normal window mode with OS specific window decorations.
+ Windowed WindowMode = iota
+ // Fullscreen is the full screen window mode.
+ Fullscreen
+)
+
+func (m WindowMode) Option() Option {
+ return func(_ unit.Metric, cnf *Config) {
+ cnf.Mode = m
+ }
+}
+
+func (m WindowMode) String() string {
+ switch m {
+ case Windowed:
+ return "windowed"
+ case Fullscreen:
+ return "fullscreen"
+ }
+ return ""
+}
+
+// Orientation is the orientation of the app (Orientation.Option sets it).
+//
+// Supported platforms are Android and JS.
+type Orientation uint8
+
+const (
+ // AnyOrientation allows the window to be freely orientated.
+ AnyOrientation Orientation = iota
+ // LandscapeOrientation constrains the window to landscape orientations.
+ LandscapeOrientation
+ // PortraitOrientation constrains the window to portrait orientations.
+ PortraitOrientation
+)
+
+func (o Orientation) Option() Option {
+ return func(_ unit.Metric, cnf *Config) {
+ cnf.Orientation = o
+ }
+}
+
+func (o Orientation) String() string {
+ switch o {
+ case AnyOrientation:
+ return "any"
+ case LandscapeOrientation:
+ return "landscape"
+ case PortraitOrientation:
+ return "portrait"
+ }
+ return ""
+}
+
+type frameEvent struct {
+ system.FrameEvent
+
+ Sync bool
+}
+
+type context interface {
+ API() gpu.API
+ RenderTarget() (gpu.RenderTarget, error)
+ Present() error
+ Refresh() error
+ Release()
+ Lock() error
+ Unlock()
+}
+
+// Driver is the interface for the platform implementation
+// of a window.
+type driver interface {
+ // SetAnimating sets the animation flag. When the window is animating,
+ // FrameEvents are delivered as fast as the display can handle them.
+ SetAnimating(anim bool)
+
+ // ShowTextInput updates the virtual keyboard state.
+ ShowTextInput(show bool)
+
+ SetInputHint(mode key.InputHint)
+
+ NewContext() (context, error)
+
+ // ReadClipboard requests the clipboard content.
+ ReadClipboard()
+ // WriteClipboard requests a clipboard write.
+ WriteClipboard(s string)
+
+ // Configure the window.
+ Configure([]Option)
+
+ // SetCursor updates the current cursor to name.
+ SetCursor(name pointer.CursorName)
+
+ // Raise the window at the top.
+ Raise()
+
+ // Close the window.
+ Close()
+
+ // Wakeup wakes up the event loop and sends a WakeupEvent.
+ Wakeup()
+
+ // Maximize will make the window as large as possible, but keep the frame decorations.
+ Maximize()
+ // Center will place the window at monitor center.
+ Center()
+}
+
+type windowRendezvous struct {
+ in chan windowAndConfig
+ out chan windowAndConfig
+ errs chan error
+}
+
+type windowAndConfig struct {
+ window *callbacks
+ options []Option
+}
+
+func newWindowRendezvous() *windowRendezvous {
+ wr := &windowRendezvous{
+ in: make(chan windowAndConfig),
+ out: make(chan windowAndConfig),
+ errs: make(chan error),
+ }
+ go func() {
+ var main windowAndConfig
+ var out chan windowAndConfig
+ for {
+ select {
+ case w := <-wr.in:
+ var err error
+ if main.window != nil {
+ err = errors.New("multiple windows are not supported")
+ }
+ wr.errs <- err
+ main = w
+ out = wr.out
+ case out <- main:
+ }
+ }
+ }()
+ return wr
+}
+
+func (wakeupEvent) ImplementsEvent() {}
+func (ConfigEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/os_android.go b/vendor/gioui.org/app/os_android.go
new file mode 100644
index 0000000..51d8289
--- /dev/null
+++ b/vendor/gioui.org/app/os_android.go
@@ -0,0 +1,1283 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package app
+
+/*
+#cgo CFLAGS: -Werror
+#cgo LDFLAGS: -landroid
+
+#include <android/native_window_jni.h>
+#include <android/configuration.h>
+#include <android/keycodes.h>
+#include <android/input.h>
+#include <stdlib.h>
+
+static jint jni_GetEnv(JavaVM *vm, JNIEnv **env, jint version) {
+ return (*vm)->GetEnv(vm, (void **)env, version);
+}
+
+static jint jni_GetJavaVM(JNIEnv *env, JavaVM **jvm) {
+ return (*env)->GetJavaVM(env, jvm);
+}
+
+static jint jni_AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args) {
+ return (*vm)->AttachCurrentThread(vm, p_env, thr_args);
+}
+
+static jint jni_DetachCurrentThread(JavaVM *vm) {
+ return (*vm)->DetachCurrentThread(vm);
+}
+
+static jobject jni_NewGlobalRef(JNIEnv *env, jobject obj) {
+ return (*env)->NewGlobalRef(env, obj);
+}
+
+static void jni_DeleteGlobalRef(JNIEnv *env, jobject obj) {
+ (*env)->DeleteGlobalRef(env, obj);
+}
+
+static jclass jni_GetObjectClass(JNIEnv *env, jobject obj) {
+ return (*env)->GetObjectClass(env, obj);
+}
+
+static jmethodID jni_GetMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) {
+ return (*env)->GetMethodID(env, clazz, name, sig);
+}
+
+static jmethodID jni_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) {
+ return (*env)->GetStaticMethodID(env, clazz, name, sig);
+}
+
+static jfloat jni_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID) {
+ return (*env)->CallFloatMethod(env, obj, methodID);
+}
+
+static jint jni_CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID) {
+ return (*env)->CallIntMethod(env, obj, methodID);
+}
+
+static void jni_CallStaticVoidMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) {
+ (*env)->CallStaticVoidMethodA(env, cls, methodID, args);
+}
+
+static void jni_CallVoidMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) {
+ (*env)->CallVoidMethodA(env, obj, methodID, args);
+}
+
+static jboolean jni_CallBooleanMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) {
+ return (*env)->CallBooleanMethodA(env, obj, methodID, args);
+}
+
+static jbyte *jni_GetByteArrayElements(JNIEnv *env, jbyteArray arr) {
+ return (*env)->GetByteArrayElements(env, arr, NULL);
+}
+
+static void jni_ReleaseByteArrayElements(JNIEnv *env, jbyteArray arr, jbyte *bytes) {
+ (*env)->ReleaseByteArrayElements(env, arr, bytes, JNI_ABORT);
+}
+
+static jsize jni_GetArrayLength(JNIEnv *env, jbyteArray arr) {
+ return (*env)->GetArrayLength(env, arr);
+}
+
+static jstring jni_NewString(JNIEnv *env, const jchar *unicodeChars, jsize len) {
+ return (*env)->NewString(env, unicodeChars, len);
+}
+
+static jsize jni_GetStringLength(JNIEnv *env, jstring str) {
+ return (*env)->GetStringLength(env, str);
+}
+
+static const jchar *jni_GetStringChars(JNIEnv *env, jstring str) {
+ return (*env)->GetStringChars(env, str, NULL);
+}
+
+static jthrowable jni_ExceptionOccurred(JNIEnv *env) {
+ return (*env)->ExceptionOccurred(env);
+}
+
+static void jni_ExceptionClear(JNIEnv *env) {
+ (*env)->ExceptionClear(env);
+}
+
+static jobject jni_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID method, jvalue *args) {
+ return (*env)->CallObjectMethodA(env, obj, method, args);
+}
+
+static jobject jni_CallStaticObjectMethodA(JNIEnv *env, jclass cls, jmethodID method, jvalue *args) {
+ return (*env)->CallStaticObjectMethodA(env, cls, method, args);
+}
+
+static jclass jni_FindClass(JNIEnv *env, char *name) {
+ return (*env)->FindClass(env, name);
+}
+
+static jobject jni_NewObjectA(JNIEnv *env, jclass cls, jmethodID cons, jvalue *args) {
+ return (*env)->NewObjectA(env, cls, cons, args);
+}
+*/
+import "C"
+
+import (
+ "errors"
+ "fmt"
+ "image"
+ "image/color"
+ "os"
+ "path/filepath"
+ "reflect"
+ "runtime"
+ "runtime/debug"
+ "sync"
+ "time"
+ "unicode/utf16"
+ "unsafe"
+
+ "gioui.org/internal/f32color"
+
+ "gioui.org/f32"
+ "gioui.org/io/clipboard"
+ "gioui.org/io/key"
+ "gioui.org/io/pointer"
+ "gioui.org/io/router"
+ "gioui.org/io/semantic"
+ "gioui.org/io/system"
+ "gioui.org/unit"
+)
+
+type window struct {
+ callbacks *callbacks
+
+ view C.jobject
+
+ dpi int
+ fontScale float32
+ insets system.Insets
+
+ stage system.Stage
+ started bool
+ animating bool
+
+ win *C.ANativeWindow
+ config Config
+
+ semantic struct {
+ hoverID router.SemanticID
+ rootID router.SemanticID
+ focusID router.SemanticID
+ diffs []router.SemanticID
+ }
+}
+
+// gioView hold cached JNI methods for GioView.
+var gioView struct {
+ once sync.Once
+ getDensity C.jmethodID
+ getFontScale C.jmethodID
+ showTextInput C.jmethodID
+ hideTextInput C.jmethodID
+ setInputHint C.jmethodID
+ postInvalidate C.jmethodID // requests draw, called from non-UI thread
+ invalidate C.jmethodID // requests draw, called from UI thread
+ setCursor C.jmethodID
+ setOrientation C.jmethodID
+ setNavigationColor C.jmethodID
+ setStatusColor C.jmethodID
+ setFullscreen C.jmethodID
+ unregister C.jmethodID
+ sendA11yEvent C.jmethodID
+ sendA11yChange C.jmethodID
+ isA11yActive C.jmethodID
+}
+
+// ViewEvent is sent whenever the Window's underlying Android view
+// changes.
+type ViewEvent struct {
+ // View is a JNI global reference to the android.view.View
+ // instance backing the Window. The reference is valid until
+ // the next ViewEvent is received.
+ // A zero View means that there is currently no view attached.
+ View uintptr
+}
+
+type jvalue uint64 // The largest JNI type fits in 64 bits.
+
+var dataDirChan = make(chan string, 1)
+
+var android struct {
+ // mu protects all fields of this structure. However, once a
+ // non-nil jvm is returned from javaVM, all the other fields may
+ // be accessed unlocked.
+ mu sync.Mutex
+ jvm *C.JavaVM
+
+ // appCtx is the global Android App context.
+ appCtx C.jobject
+ // gioCls is the class of the Gio class.
+ gioCls C.jclass
+
+ mwriteClipboard C.jmethodID
+ mreadClipboard C.jmethodID
+ mwakeupMainThread C.jmethodID
+
+ // android.view.accessibility.AccessibilityNodeInfo class.
+ accessibilityNodeInfo struct {
+ cls C.jclass
+ // addChild(View, int)
+ addChild C.jmethodID
+ // setBoundsInScreen(Rect)
+ setBoundsInScreen C.jmethodID
+ // setText(CharSequence)
+ setText C.jmethodID
+ // setContentDescription(CharSequence)
+ setContentDescription C.jmethodID
+ // setParent(View, int)
+ setParent C.jmethodID
+ // addAction(int)
+ addAction C.jmethodID
+ // setClassName(CharSequence)
+ setClassName C.jmethodID
+ // setCheckable(boolean)
+ setCheckable C.jmethodID
+ // setSelected(boolean)
+ setSelected C.jmethodID
+ // setChecked(boolean)
+ setChecked C.jmethodID
+ // setEnabled(boolean)
+ setEnabled C.jmethodID
+ // setAccessibilityFocused(boolean)
+ setAccessibilityFocused C.jmethodID
+ }
+
+ // android.graphics.Rect class.
+ rect struct {
+ cls C.jclass
+ // (int, int, int, int) constructor.
+ cons C.jmethodID
+ }
+
+ strings struct {
+ // "android.view.View"
+ androidViewView C.jstring
+ // "android.widget.Button"
+ androidWidgetButton C.jstring
+ // "android.widget.CheckBox"
+ androidWidgetCheckBox C.jstring
+ // "android.widget.EditText"
+ androidWidgetEditText C.jstring
+ // "android.widget.RadioButton"
+ androidWidgetRadioButton C.jstring
+ // "android.widget.Switch"
+ androidWidgetSwitch C.jstring
+ }
+}
+
+// view maps from GioView JNI refenreces to windows.
+var views = make(map[C.jlong]*window)
+
+var windows = make(map[*callbacks]*window)
+
+var mainWindow = newWindowRendezvous()
+
+var mainFuncs = make(chan func(env *C.JNIEnv), 1)
+
+var (
+ dataDirOnce sync.Once
+ dataPath string
+)
+
+var (
+ newAndroidVulkanContext func(w *window) (context, error)
+ newAndroidGLESContext func(w *window) (context, error)
+)
+
+// AccessibilityNodeProvider.HOST_VIEW_ID.
+const HOST_VIEW_ID = -1
+
+const (
+ // AccessibilityEvent constants.
+ TYPE_VIEW_HOVER_ENTER = 128
+ TYPE_VIEW_HOVER_EXIT = 256
+)
+
+const (
+ // AccessibilityNodeInfo constants.
+ ACTION_ACCESSIBILITY_FOCUS = 64
+ ACTION_CLEAR_ACCESSIBILITY_FOCUS = 128
+ ACTION_CLICK = 16
+)
+
+func (w *window) NewContext() (context, error) {
+ funcs := []func(w *window) (context, error){newAndroidVulkanContext, newAndroidGLESContext}
+ var firstErr error
+ for _, f := range funcs {
+ if f == nil {
+ continue
+ }
+ c, err := f(w)
+ if err != nil {
+ if firstErr == nil {
+ firstErr = err
+ }
+ continue
+ }
+ return c, nil
+ }
+ if firstErr != nil {
+ return nil, firstErr
+ }
+ return nil, errors.New("x11: no available GPU backends")
+}
+
+func dataDir() (string, error) {
+ dataDirOnce.Do(func() {
+ dataPath = <-dataDirChan
+ // Set XDG_CACHE_HOME to make os.UserCacheDir work.
+ if _, exists := os.LookupEnv("XDG_CACHE_HOME"); !exists {
+ cachePath := filepath.Join(dataPath, "cache")
+ os.Setenv("XDG_CACHE_HOME", cachePath)
+ }
+ // Set XDG_CONFIG_HOME to make os.UserConfigDir work.
+ if _, exists := os.LookupEnv("XDG_CONFIG_HOME"); !exists {
+ cfgPath := filepath.Join(dataPath, "config")
+ os.Setenv("XDG_CONFIG_HOME", cfgPath)
+ }
+ // Set HOME to make os.UserHomeDir work.
+ if _, exists := os.LookupEnv("HOME"); !exists {
+ os.Setenv("HOME", dataPath)
+ }
+ })
+ return dataPath, nil
+}
+
+func getMethodID(env *C.JNIEnv, class C.jclass, method, sig string) C.jmethodID {
+ m := C.CString(method)
+ defer C.free(unsafe.Pointer(m))
+ s := C.CString(sig)
+ defer C.free(unsafe.Pointer(s))
+ jm := C.jni_GetMethodID(env, class, m, s)
+ if err := exception(env); err != nil {
+ panic(err)
+ }
+ return jm
+}
+
+func getStaticMethodID(env *C.JNIEnv, class C.jclass, method, sig string) C.jmethodID {
+ m := C.CString(method)
+ defer C.free(unsafe.Pointer(m))
+ s := C.CString(sig)
+ defer C.free(unsafe.Pointer(s))
+ jm := C.jni_GetStaticMethodID(env, class, m, s)
+ if err := exception(env); err != nil {
+ panic(err)
+ }
+ return jm
+}
+
+//export Java_org_gioui_Gio_runGoMain
+func Java_org_gioui_Gio_runGoMain(env *C.JNIEnv, class C.jclass, jdataDir C.jbyteArray, context C.jobject) {
+ initJVM(env, class, context)
+ dirBytes := C.jni_GetByteArrayElements(env, jdataDir)
+ if dirBytes == nil {
+ panic("runGoMain: GetByteArrayElements failed")
+ }
+ n := C.jni_GetArrayLength(env, jdataDir)
+ dataDir := C.GoStringN((*C.char)(unsafe.Pointer(dirBytes)), n)
+ dataDirChan <- dataDir
+ C.jni_ReleaseByteArrayElements(env, jdataDir, dirBytes)
+
+ runMain()
+}
+
+func initJVM(env *C.JNIEnv, gio C.jclass, ctx C.jobject) {
+ android.mu.Lock()
+ defer android.mu.Unlock()
+ if res := C.jni_GetJavaVM(env, &android.jvm); res != 0 {
+ panic("gio: GetJavaVM failed")
+ }
+ android.appCtx = C.jni_NewGlobalRef(env, ctx)
+ android.gioCls = C.jclass(C.jni_NewGlobalRef(env, C.jobject(gio)))
+
+ cls := findClass(env, "android/view/accessibility/AccessibilityNodeInfo")
+ android.accessibilityNodeInfo.cls = C.jclass(C.jni_NewGlobalRef(env, C.jobject(cls)))
+ android.accessibilityNodeInfo.addChild = getMethodID(env, cls, "addChild", "(Landroid/view/View;I)V")
+ android.accessibilityNodeInfo.setBoundsInScreen = getMethodID(env, cls, "setBoundsInScreen", "(Landroid/graphics/Rect;)V")
+ android.accessibilityNodeInfo.setText = getMethodID(env, cls, "setText", "(Ljava/lang/CharSequence;)V")
+ android.accessibilityNodeInfo.setContentDescription = getMethodID(env, cls, "setContentDescription", "(Ljava/lang/CharSequence;)V")
+ android.accessibilityNodeInfo.setParent = getMethodID(env, cls, "setParent", "(Landroid/view/View;I)V")
+ android.accessibilityNodeInfo.addAction = getMethodID(env, cls, "addAction", "(I)V")
+ android.accessibilityNodeInfo.setClassName = getMethodID(env, cls, "setClassName", "(Ljava/lang/CharSequence;)V")
+ android.accessibilityNodeInfo.setCheckable = getMethodID(env, cls, "setCheckable", "(Z)V")
+ android.accessibilityNodeInfo.setSelected = getMethodID(env, cls, "setSelected", "(Z)V")
+ android.accessibilityNodeInfo.setChecked = getMethodID(env, cls, "setChecked", "(Z)V")
+ android.accessibilityNodeInfo.setEnabled = getMethodID(env, cls, "setEnabled", "(Z)V")
+ android.accessibilityNodeInfo.setAccessibilityFocused = getMethodID(env, cls, "setAccessibilityFocused", "(Z)V")
+
+ cls = findClass(env, "android/graphics/Rect")
+ android.rect.cls = C.jclass(C.jni_NewGlobalRef(env, C.jobject(cls)))
+ android.rect.cons = getMethodID(env, cls, "<init>", "(IIII)V")
+ android.mwriteClipboard = getStaticMethodID(env, gio, "writeClipboard", "(Landroid/content/Context;Ljava/lang/String;)V")
+ android.mreadClipboard = getStaticMethodID(env, gio, "readClipboard", "(Landroid/content/Context;)Ljava/lang/String;")
+ android.mwakeupMainThread = getStaticMethodID(env, gio, "wakeupMainThread", "()V")
+
+ intern := func(s string) C.jstring {
+ ref := C.jni_NewGlobalRef(env, C.jobject(javaString(env, s)))
+ return C.jstring(ref)
+ }
+ android.strings.androidViewView = intern("android.view.View")
+ android.strings.androidWidgetButton = intern("android.widget.Button")
+ android.strings.androidWidgetCheckBox = intern("android.widget.CheckBox")
+ android.strings.androidWidgetEditText = intern("android.widget.EditText")
+ android.strings.androidWidgetRadioButton = intern("android.widget.RadioButton")
+ android.strings.androidWidgetSwitch = intern("android.widget.Switch")
+}
+
+// JavaVM returns the global JNI JavaVM.
+func JavaVM() uintptr {
+ jvm := javaVM()
+ return uintptr(unsafe.Pointer(jvm))
+}
+
+func javaVM() *C.JavaVM {
+ android.mu.Lock()
+ defer android.mu.Unlock()
+ return android.jvm
+}
+
+// AppContext returns the global Application context as a JNI jobject.
+func AppContext() uintptr {
+ android.mu.Lock()
+ defer android.mu.Unlock()
+ return uintptr(android.appCtx)
+}
+
+//export Java_org_gioui_GioView_onCreateView
+func Java_org_gioui_GioView_onCreateView(env *C.JNIEnv, class C.jclass, view C.jobject) C.jlong {
+ gioView.once.Do(func() {
+ m := &gioView
+ m.getDensity = getMethodID(env, class, "getDensity", "()I")
+ m.getFontScale = getMethodID(env, class, "getFontScale", "()F")
+ m.showTextInput = getMethodID(env, class, "showTextInput", "()V")
+ m.hideTextInput = getMethodID(env, class, "hideTextInput", "()V")
+ m.setInputHint = getMethodID(env, class, "setInputHint", "(I)V")
+ m.postInvalidate = getMethodID(env, class, "postInvalidate", "()V")
+ m.invalidate = getMethodID(env, class, "invalidate", "()V")
+ m.setCursor = getMethodID(env, class, "setCursor", "(I)V")
+ m.setOrientation = getMethodID(env, class, "setOrientation", "(II)V")
+ m.setNavigationColor = getMethodID(env, class, "setNavigationColor", "(II)V")
+ m.setStatusColor = getMethodID(env, class, "setStatusColor", "(II)V")
+ m.setFullscreen = getMethodID(env, class, "setFullscreen", "(Z)V")
+ m.unregister = getMethodID(env, class, "unregister", "()V")
+ m.sendA11yEvent = getMethodID(env, class, "sendA11yEvent", "(II)V")
+ m.sendA11yChange = getMethodID(env, class, "sendA11yChange", "(I)V")
+ m.isA11yActive = getMethodID(env, class, "isA11yActive", "()Z")
+ })
+ view = C.jni_NewGlobalRef(env, view)
+ wopts := <-mainWindow.out
+ w, ok := windows[wopts.window]
+ if !ok {
+ w = &window{
+ callbacks: wopts.window,
+ }
+ windows[wopts.window] = w
+ }
+ if w.view != 0 {
+ w.detach(env)
+ }
+ w.view = view
+ w.callbacks.SetDriver(w)
+ handle := C.jlong(view)
+ views[handle] = w
+ w.loadConfig(env, class)
+ w.Configure(wopts.options)
+ w.setStage(system.StagePaused)
+ w.callbacks.Event(ViewEvent{View: uintptr(view)})
+ return handle
+}
+
+//export Java_org_gioui_GioView_onDestroyView
+func Java_org_gioui_GioView_onDestroyView(env *C.JNIEnv, class C.jclass, handle C.jlong) {
+ w := views[handle]
+ w.detach(env)
+}
+
+//export Java_org_gioui_GioView_onStopView
+func Java_org_gioui_GioView_onStopView(env *C.JNIEnv, class C.jclass, handle C.jlong) {
+ w := views[handle]
+ w.started = false
+ w.setStage(system.StagePaused)
+}
+
+//export Java_org_gioui_GioView_onStartView
+func Java_org_gioui_GioView_onStartView(env *C.JNIEnv, class C.jclass, handle C.jlong) {
+ w := views[handle]
+ w.started = true
+ if w.win != nil {
+ w.setVisible(env)
+ }
+}
+
+//export Java_org_gioui_GioView_onSurfaceDestroyed
+func Java_org_gioui_GioView_onSurfaceDestroyed(env *C.JNIEnv, class C.jclass, handle C.jlong) {
+ w := views[handle]
+ w.win = nil
+ w.setStage(system.StagePaused)
+}
+
+//export Java_org_gioui_GioView_onSurfaceChanged
+func Java_org_gioui_GioView_onSurfaceChanged(env *C.JNIEnv, class C.jclass, handle C.jlong, surf C.jobject) {
+ w := views[handle]
+ w.win = C.ANativeWindow_fromSurface(env, surf)
+ if w.started {
+ w.setVisible(env)
+ }
+}
+
+//export Java_org_gioui_GioView_onLowMemory
+func Java_org_gioui_GioView_onLowMemory(env *C.JNIEnv, class C.jclass) {
+ runtime.GC()
+ debug.FreeOSMemory()
+}
+
+//export Java_org_gioui_GioView_onConfigurationChanged
+func Java_org_gioui_GioView_onConfigurationChanged(env *C.JNIEnv, class C.jclass, view C.jlong) {
+ w := views[view]
+ w.loadConfig(env, class)
+ if w.stage >= system.StageRunning {
+ w.draw(env, true)
+ }
+}
+
+//export Java_org_gioui_GioView_onFrameCallback
+func Java_org_gioui_GioView_onFrameCallback(env *C.JNIEnv, class C.jclass, view C.jlong) {
+ w, exist := views[view]
+ if !exist {
+ return
+ }
+ if w.stage < system.StageRunning {
+ return
+ }
+ if w.animating {
+ w.draw(env, false)
+ // Schedule the next draw immediately after this one. Since onFrameCallback runs
+ // on the UI thread, View.invalidate can be used here instead of postInvalidate.
+ callVoidMethod(env, w.view, gioView.invalidate)
+ }
+}
+
+//export Java_org_gioui_GioView_onBack
+func Java_org_gioui_GioView_onBack(env *C.JNIEnv, class C.jclass, view C.jlong) C.jboolean {
+ w := views[view]
+ ev := &system.CommandEvent{Type: system.CommandBack}
+ w.callbacks.Event(ev)
+ if ev.Cancel {
+ return C.JNI_TRUE
+ }
+ return C.JNI_FALSE
+}
+
+//export Java_org_gioui_GioView_onFocusChange
+func Java_org_gioui_GioView_onFocusChange(env *C.JNIEnv, class C.jclass, view C.jlong, focus C.jboolean) {
+ w := views[view]
+ w.callbacks.Event(key.FocusEvent{Focus: focus == C.JNI_TRUE})
+}
+
+//export Java_org_gioui_GioView_onWindowInsets
+func Java_org_gioui_GioView_onWindowInsets(env *C.JNIEnv, class C.jclass, view C.jlong, top, right, bottom, left C.jint) {
+ w := views[view]
+ w.insets = system.Insets{
+ Top: unit.Px(float32(top)),
+ Right: unit.Px(float32(right)),
+ Bottom: unit.Px(float32(bottom)),
+ Left: unit.Px(float32(left)),
+ }
+ if w.stage >= system.StageRunning {
+ w.draw(env, true)
+ }
+}
+
+//export Java_org_gioui_GioView_initializeAccessibilityNodeInfo
+func Java_org_gioui_GioView_initializeAccessibilityNodeInfo(env *C.JNIEnv, class C.jclass, view C.jlong, virtID, screenX, screenY C.jint, info C.jobject) C.jobject {
+ w := views[view]
+ semID := w.semIDFor(virtID)
+ sem, found := w.callbacks.LookupSemantic(semID)
+ if found {
+ off := f32.Pt(float32(screenX), float32(screenY))
+ if err := w.initAccessibilityNodeInfo(env, sem, off, info); err != nil {
+ panic(err)
+ }
+ }
+ return info
+}
+
+//export Java_org_gioui_GioView_onTouchExploration
+func Java_org_gioui_GioView_onTouchExploration(env *C.JNIEnv, class C.jclass, view C.jlong, x, y C.jfloat) {
+ w := views[view]
+ semID, _ := w.callbacks.SemanticAt(f32.Pt(float32(x), float32(y)))
+ if w.semantic.hoverID == semID {
+ return
+ }
+ // Android expects ENTER before EXIT.
+ if semID != 0 {
+ callVoidMethod(env, w.view, gioView.sendA11yEvent, TYPE_VIEW_HOVER_ENTER, jvalue(w.virtualIDFor(semID)))
+ }
+ if prevID := w.semantic.hoverID; prevID != 0 {
+ callVoidMethod(env, w.view, gioView.sendA11yEvent, TYPE_VIEW_HOVER_EXIT, jvalue(w.virtualIDFor(prevID)))
+ }
+ w.semantic.hoverID = semID
+}
+
+//export Java_org_gioui_GioView_onExitTouchExploration
+func Java_org_gioui_GioView_onExitTouchExploration(env *C.JNIEnv, class C.jclass, view C.jlong) {
+ w := views[view]
+ if w.semantic.hoverID != 0 {
+ callVoidMethod(env, w.view, gioView.sendA11yEvent, TYPE_VIEW_HOVER_EXIT, jvalue(w.virtualIDFor(w.semantic.hoverID)))
+ w.semantic.hoverID = 0
+ }
+}
+
+//export Java_org_gioui_GioView_onA11yFocus
+func Java_org_gioui_GioView_onA11yFocus(env *C.JNIEnv, class C.jclass, view C.jlong, virtID C.jint) {
+ w := views[view]
+ if semID := w.semIDFor(virtID); semID != w.semantic.focusID {
+ w.semantic.focusID = semID
+ // Android needs invalidate to refresh the TalkBack focus indicator.
+ callVoidMethod(env, w.view, gioView.invalidate)
+ }
+}
+
+//export Java_org_gioui_GioView_onClearA11yFocus
+func Java_org_gioui_GioView_onClearA11yFocus(env *C.JNIEnv, class C.jclass, view C.jlong, virtID C.jint) {
+ w := views[view]
+ if w.semantic.focusID == w.semIDFor(virtID) {
+ w.semantic.focusID = 0
+ }
+}
+
+func (w *window) initAccessibilityNodeInfo(env *C.JNIEnv, sem router.SemanticNode, off f32.Point, info C.jobject) error {
+ for _, ch := range sem.Children {
+ err := callVoidMethod(env, info, android.accessibilityNodeInfo.addChild, jvalue(w.view), jvalue(w.virtualIDFor(ch.ID)))
+ if err != nil {
+ return err
+ }
+ }
+ if sem.ParentID != 0 {
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setParent, jvalue(w.view), jvalue(w.virtualIDFor(sem.ParentID))); err != nil {
+ return err
+ }
+ b := sem.Desc.Bounds.Add(off)
+ rect, err := newObject(env, android.rect.cls, android.rect.cons,
+ jvalue(b.Min.X),
+ jvalue(b.Min.Y),
+ jvalue(b.Max.X),
+ jvalue(b.Max.Y),
+ )
+ if err != nil {
+ return err
+ }
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setBoundsInScreen, jvalue(rect)); err != nil {
+ return err
+ }
+ }
+ d := sem.Desc
+ if l := d.Label; l != "" {
+ jlbl := javaString(env, l)
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setText, jvalue(jlbl)); err != nil {
+ return err
+ }
+ }
+ if d.Description != "" {
+ jd := javaString(env, d.Description)
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setContentDescription, jvalue(jd)); err != nil {
+ return err
+ }
+ }
+ addAction := func(act C.jint) {
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.addAction, jvalue(act)); err != nil {
+ panic(err)
+ }
+ }
+ if d.Gestures&router.ClickGesture != 0 {
+ addAction(ACTION_CLICK)
+ }
+ clsName := android.strings.androidViewView
+ selectMethod := android.accessibilityNodeInfo.setChecked
+ checkable := false
+ switch d.Class {
+ case semantic.Button:
+ clsName = android.strings.androidWidgetButton
+ case semantic.CheckBox:
+ checkable = true
+ clsName = android.strings.androidWidgetCheckBox
+ case semantic.Editor:
+ clsName = android.strings.androidWidgetEditText
+ case semantic.RadioButton:
+ selectMethod = android.accessibilityNodeInfo.setSelected
+ clsName = android.strings.androidWidgetRadioButton
+ case semantic.Switch:
+ checkable = true
+ clsName = android.strings.androidWidgetSwitch
+ }
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setClassName, jvalue(clsName)); err != nil {
+ panic(err)
+ }
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setCheckable, jvalue(javaBool(checkable))); err != nil {
+ panic(err)
+ }
+ if err := callVoidMethod(env, info, selectMethod, jvalue(javaBool(d.Selected))); err != nil {
+ panic(err)
+ }
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setEnabled, jvalue(javaBool(!d.Disabled))); err != nil {
+ panic(err)
+ }
+ isFocus := w.semantic.focusID == sem.ID
+ if err := callVoidMethod(env, info, android.accessibilityNodeInfo.setAccessibilityFocused, jvalue(javaBool(isFocus))); err != nil {
+ panic(err)
+ }
+ if isFocus {
+ addAction(ACTION_CLEAR_ACCESSIBILITY_FOCUS)
+ } else {
+ addAction(ACTION_ACCESSIBILITY_FOCUS)
+ }
+ return nil
+}
+
+func (w *window) virtualIDFor(id router.SemanticID) C.jint {
+ // TODO: Android virtual IDs are 32-bit Java integers, but childID is a int64.
+ if id == w.semantic.rootID {
+ return HOST_VIEW_ID
+ }
+ return C.jint(id)
+}
+
+func (w *window) semIDFor(virtID C.jint) router.SemanticID {
+ if virtID == HOST_VIEW_ID {
+ return w.semantic.rootID
+ }
+ return router.SemanticID(virtID)
+}
+
+func (w *window) detach(env *C.JNIEnv) {
+ callVoidMethod(env, w.view, gioView.unregister)
+ w.callbacks.Event(ViewEvent{})
+ w.callbacks.SetDriver(nil)
+ delete(views, C.jlong(w.view))
+ C.jni_DeleteGlobalRef(env, w.view)
+ w.view = 0
+}
+
+func (w *window) setVisible(env *C.JNIEnv) {
+ width, height := C.ANativeWindow_getWidth(w.win), C.ANativeWindow_getHeight(w.win)
+ if width == 0 || height == 0 {
+ return
+ }
+ w.setStage(system.StageRunning)
+ w.draw(env, true)
+}
+
+func (w *window) setStage(stage system.Stage) {
+ if stage == w.stage {
+ return
+ }
+ w.stage = stage
+ w.callbacks.Event(system.StageEvent{stage})
+}
+
+func (w *window) setVisual(visID int) error {
+ if C.ANativeWindow_setBuffersGeometry(w.win, 0, 0, C.int32_t(visID)) != 0 {
+ return errors.New("ANativeWindow_setBuffersGeometry failed")
+ }
+ return nil
+}
+
+func (w *window) nativeWindow() (*C.ANativeWindow, int, int) {
+ width, height := C.ANativeWindow_getWidth(w.win), C.ANativeWindow_getHeight(w.win)
+ return w.win, int(width), int(height)
+}
+
+func (w *window) loadConfig(env *C.JNIEnv, class C.jclass) {
+ dpi := int(C.jni_CallIntMethod(env, w.view, gioView.getDensity))
+ w.fontScale = float32(C.jni_CallFloatMethod(env, w.view, gioView.getFontScale))
+ switch dpi {
+ case C.ACONFIGURATION_DENSITY_NONE,
+ C.ACONFIGURATION_DENSITY_DEFAULT,
+ C.ACONFIGURATION_DENSITY_ANY:
+ // Assume standard density.
+ w.dpi = C.ACONFIGURATION_DENSITY_MEDIUM
+ default:
+ w.dpi = int(dpi)
+ }
+}
+
+func (w *window) SetAnimating(anim bool) {
+ w.animating = anim
+ if anim {
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ callVoidMethod(env, w.view, gioView.postInvalidate)
+ })
+ }
+}
+
+func (w *window) draw(env *C.JNIEnv, sync bool) {
+ size := image.Pt(int(C.ANativeWindow_getWidth(w.win)), int(C.ANativeWindow_getHeight(w.win)))
+ if size != w.config.Size {
+ w.config.Size = size
+ w.callbacks.Event(ConfigEvent{Config: w.config})
+ }
+ if size.X == 0 || size.Y == 0 {
+ return
+ }
+ const inchPrDp = 1.0 / 160
+ ppdp := float32(w.dpi) * inchPrDp
+ w.callbacks.Event(frameEvent{
+ FrameEvent: system.FrameEvent{
+ Now: time.Now(),
+ Size: w.config.Size,
+ Insets: w.insets,
+ Metric: unit.Metric{
+ PxPerDp: ppdp,
+ PxPerSp: w.fontScale * ppdp,
+ },
+ },
+ Sync: sync,
+ })
+ a11yActive, err := callBooleanMethod(env, w.view, gioView.isA11yActive)
+ if err != nil {
+ panic(err)
+ }
+ if a11yActive {
+ if newR, oldR := w.callbacks.SemanticRoot(), w.semantic.rootID; newR != oldR {
+ // Remap focus and hover.
+ if oldR == w.semantic.hoverID {
+ w.semantic.hoverID = newR
+ }
+ if oldR == w.semantic.focusID {
+ w.semantic.focusID = newR
+ }
+ w.semantic.rootID = newR
+ callVoidMethod(env, w.view, gioView.sendA11yChange, jvalue(w.virtualIDFor(newR)))
+ }
+ w.semantic.diffs = w.callbacks.AppendSemanticDiffs(w.semantic.diffs[:0])
+ for _, id := range w.semantic.diffs {
+ callVoidMethod(env, w.view, gioView.sendA11yChange, jvalue(w.virtualIDFor(id)))
+ }
+ }
+}
+
+type keyMapper func(devId, keyCode C.int32_t) rune
+
+func runInJVM(jvm *C.JavaVM, f func(env *C.JNIEnv)) {
+ if jvm == nil {
+ panic("nil JVM")
+ }
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ var env *C.JNIEnv
+ if res := C.jni_GetEnv(jvm, &env, C.JNI_VERSION_1_6); res != C.JNI_OK {
+ if res != C.JNI_EDETACHED {
+ panic(fmt.Errorf("JNI GetEnv failed with error %d", res))
+ }
+ if C.jni_AttachCurrentThread(jvm, &env, nil) != C.JNI_OK {
+ panic(errors.New("runInJVM: AttachCurrentThread failed"))
+ }
+ defer C.jni_DetachCurrentThread(jvm)
+ }
+
+ f(env)
+}
+
+func convertKeyCode(code C.jint) (string, bool) {
+ var n string
+ switch code {
+ case C.AKEYCODE_DPAD_UP:
+ n = key.NameUpArrow
+ case C.AKEYCODE_DPAD_DOWN:
+ n = key.NameDownArrow
+ case C.AKEYCODE_DPAD_LEFT:
+ n = key.NameLeftArrow
+ case C.AKEYCODE_DPAD_RIGHT:
+ n = key.NameRightArrow
+ case C.AKEYCODE_FORWARD_DEL:
+ n = key.NameDeleteForward
+ case C.AKEYCODE_DEL:
+ n = key.NameDeleteBackward
+ case C.AKEYCODE_NUMPAD_ENTER:
+ n = key.NameEnter
+ case C.AKEYCODE_ENTER:
+ n = key.NameEnter
+ default:
+ return "", false
+ }
+ return n, true
+}
+
+//export Java_org_gioui_GioView_onKeyEvent
+func Java_org_gioui_GioView_onKeyEvent(env *C.JNIEnv, class C.jclass, handle C.jlong, keyCode, r C.jint, t C.jlong) {
+ w := views[handle]
+ if n, ok := convertKeyCode(keyCode); ok {
+ w.callbacks.Event(key.Event{Name: n})
+ }
+ if r != 0 && r != '\n' { // Checking for "\n" to prevent duplication with key.NameEnter (gio#224).
+ w.callbacks.Event(key.EditEvent{Text: string(rune(r))})
+ }
+}
+
+//export Java_org_gioui_GioView_onTouchEvent
+func Java_org_gioui_GioView_onTouchEvent(env *C.JNIEnv, class C.jclass, handle C.jlong, action, pointerID, tool C.jint, x, y, scrollX, scrollY C.jfloat, jbtns C.jint, t C.jlong) {
+ w := views[handle]
+ var typ pointer.Type
+ switch action {
+ case C.AMOTION_EVENT_ACTION_DOWN, C.AMOTION_EVENT_ACTION_POINTER_DOWN:
+ typ = pointer.Press
+ case C.AMOTION_EVENT_ACTION_UP, C.AMOTION_EVENT_ACTION_POINTER_UP:
+ typ = pointer.Release
+ case C.AMOTION_EVENT_ACTION_CANCEL:
+ typ = pointer.Cancel
+ case C.AMOTION_EVENT_ACTION_MOVE:
+ typ = pointer.Move
+ case C.AMOTION_EVENT_ACTION_SCROLL:
+ typ = pointer.Scroll
+ default:
+ return
+ }
+ var src pointer.Source
+ var btns pointer.Buttons
+ if jbtns&C.AMOTION_EVENT_BUTTON_PRIMARY != 0 {
+ btns |= pointer.ButtonPrimary
+ }
+ if jbtns&C.AMOTION_EVENT_BUTTON_SECONDARY != 0 {
+ btns |= pointer.ButtonSecondary
+ }
+ if jbtns&C.AMOTION_EVENT_BUTTON_TERTIARY != 0 {
+ btns |= pointer.ButtonTertiary
+ }
+ switch tool {
+ case C.AMOTION_EVENT_TOOL_TYPE_FINGER:
+ src = pointer.Touch
+ case C.AMOTION_EVENT_TOOL_TYPE_STYLUS:
+ src = pointer.Touch
+ case C.AMOTION_EVENT_TOOL_TYPE_MOUSE:
+ src = pointer.Mouse
+ case C.AMOTION_EVENT_TOOL_TYPE_UNKNOWN:
+ // For example, triggered via 'adb shell input tap'.
+ // Instead of discarding it, treat it as a touch event.
+ src = pointer.Touch
+ default:
+ return
+ }
+ w.callbacks.Event(pointer.Event{
+ Type: typ,
+ Source: src,
+ Buttons: btns,
+ PointerID: pointer.ID(pointerID),
+ Time: time.Duration(t) * time.Millisecond,
+ Position: f32.Point{X: float32(x), Y: float32(y)},
+ Scroll: f32.Pt(float32(scrollX), float32(scrollY)),
+ })
+}
+
+func (w *window) ShowTextInput(show bool) {
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ if show {
+ callVoidMethod(env, w.view, gioView.showTextInput)
+ } else {
+ callVoidMethod(env, w.view, gioView.hideTextInput)
+ }
+ })
+}
+
+func (w *window) SetInputHint(mode key.InputHint) {
+ // Constants defined at https://developer.android.com/reference/android/text/InputType.
+ const (
+ TYPE_NULL = 0
+ TYPE_CLASS_NUMBER = 2
+ TYPE_NUMBER_FLAG_DECIMAL = 8192
+ TYPE_NUMBER_FLAG_SIGNED = 4096
+ TYPE_TEXT_FLAG_NO_SUGGESTIONS = 524288
+ TYPE_TEXT_VARIATION_VISIBLE_PASSWORD = 144
+ )
+
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ var m jvalue
+ switch mode {
+ case key.HintNumeric:
+ m = TYPE_CLASS_NUMBER | TYPE_NUMBER_FLAG_DECIMAL | TYPE_NUMBER_FLAG_SIGNED
+ default:
+ // TYPE_NULL, since TYPE_CLASS_TEXT isn't currently supported.
+ m = TYPE_NULL
+ }
+
+ // The TYPE_TEXT_FLAG_NO_SUGGESTIONS and TYPE_TEXT_VARIATION_VISIBLE_PASSWORD are used to fix the
+ // Samsung keyboard compatibility, forcing to disable the suggests/auto-complete. gio#116.
+ m = m | TYPE_TEXT_FLAG_NO_SUGGESTIONS | TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
+
+ callVoidMethod(env, w.view, gioView.setInputHint, m)
+ })
+}
+
+func javaBool(b bool) C.jboolean {
+ if b {
+ return C.JNI_TRUE
+ } else {
+ return C.JNI_FALSE
+ }
+}
+
+func javaString(env *C.JNIEnv, str string) C.jstring {
+ if str == "" {
+ return 0
+ }
+ utf16Chars := utf16.Encode([]rune(str))
+ return C.jni_NewString(env, (*C.jchar)(unsafe.Pointer(&utf16Chars[0])), C.int(len(utf16Chars)))
+}
+
+func varArgs(args []jvalue) *C.jvalue {
+ if len(args) == 0 {
+ return nil
+ }
+ return (*C.jvalue)(unsafe.Pointer(&args[0]))
+}
+
+func callStaticVoidMethod(env *C.JNIEnv, cls C.jclass, method C.jmethodID, args ...jvalue) error {
+ C.jni_CallStaticVoidMethodA(env, cls, method, varArgs(args))
+ return exception(env)
+}
+
+func callStaticObjectMethod(env *C.JNIEnv, cls C.jclass, method C.jmethodID, args ...jvalue) (C.jobject, error) {
+ res := C.jni_CallStaticObjectMethodA(env, cls, method, varArgs(args))
+ return res, exception(env)
+}
+
+func callVoidMethod(env *C.JNIEnv, obj C.jobject, method C.jmethodID, args ...jvalue) error {
+ C.jni_CallVoidMethodA(env, obj, method, varArgs(args))
+ return exception(env)
+}
+
+func callBooleanMethod(env *C.JNIEnv, obj C.jobject, method C.jmethodID, args ...jvalue) (bool, error) {
+ res := C.jni_CallBooleanMethodA(env, obj, method, varArgs(args))
+ return res == C.JNI_TRUE, exception(env)
+}
+
+func callObjectMethod(env *C.JNIEnv, obj C.jobject, method C.jmethodID, args ...jvalue) (C.jobject, error) {
+ res := C.jni_CallObjectMethodA(env, obj, method, varArgs(args))
+ return res, exception(env)
+}
+
+func newObject(env *C.JNIEnv, cls C.jclass, method C.jmethodID, args ...jvalue) (C.jobject, error) {
+ res := C.jni_NewObjectA(env, cls, method, varArgs(args))
+ return res, exception(env)
+}
+
+// exception returns an error corresponding to the pending
+// exception, or nil if no exception is pending. The pending
+// exception is cleared.
+func exception(env *C.JNIEnv) error {
+ thr := C.jni_ExceptionOccurred(env)
+ if thr == 0 {
+ return nil
+ }
+ C.jni_ExceptionClear(env)
+ cls := getObjectClass(env, C.jobject(thr))
+ toString := getMethodID(env, cls, "toString", "()Ljava/lang/String;")
+ msg, err := callObjectMethod(env, C.jobject(thr), toString)
+ if err != nil {
+ return err
+ }
+ return errors.New(goString(env, C.jstring(msg)))
+}
+
+func getObjectClass(env *C.JNIEnv, obj C.jobject) C.jclass {
+ if obj == 0 {
+ panic("null object")
+ }
+ cls := C.jni_GetObjectClass(env, C.jobject(obj))
+ if err := exception(env); err != nil {
+ // GetObjectClass should never fail.
+ panic(err)
+ }
+ return cls
+}
+
+// goString converts the JVM jstring to a Go string.
+func goString(env *C.JNIEnv, str C.jstring) string {
+ if str == 0 {
+ return ""
+ }
+ strlen := C.jni_GetStringLength(env, C.jstring(str))
+ chars := C.jni_GetStringChars(env, C.jstring(str))
+ var utf16Chars []uint16
+ hdr := (*reflect.SliceHeader)(unsafe.Pointer(&utf16Chars))
+ hdr.Data = uintptr(unsafe.Pointer(chars))
+ hdr.Cap = int(strlen)
+ hdr.Len = int(strlen)
+ utf8 := utf16.Decode(utf16Chars)
+ return string(utf8)
+}
+
+func findClass(env *C.JNIEnv, name string) C.jclass {
+ cn := C.CString(name)
+ defer C.free(unsafe.Pointer(cn))
+ return C.jni_FindClass(env, cn)
+}
+
+func osMain() {
+}
+
+func newWindow(window *callbacks, options []Option) error {
+ mainWindow.in <- windowAndConfig{window, options}
+ return <-mainWindow.errs
+}
+
+func (w *window) WriteClipboard(s string) {
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ jstr := javaString(env, s)
+ callStaticVoidMethod(env, android.gioCls, android.mwriteClipboard,
+ jvalue(android.appCtx), jvalue(jstr))
+ })
+}
+
+func (w *window) ReadClipboard() {
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ c, err := callStaticObjectMethod(env, android.gioCls, android.mreadClipboard,
+ jvalue(android.appCtx))
+ if err != nil {
+ return
+ }
+ content := goString(env, C.jstring(c))
+ w.callbacks.Event(clipboard.Event{Text: content})
+ })
+}
+
+func (w *window) Configure(options []Option) {
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ prev := w.config
+ cnf := w.config
+ cnf.apply(unit.Metric{}, options)
+ if prev.Orientation != cnf.Orientation {
+ w.config.Orientation = cnf.Orientation
+ setOrientation(env, w.view, cnf.Orientation)
+ }
+ if prev.NavigationColor != cnf.NavigationColor {
+ w.config.NavigationColor = cnf.NavigationColor
+ setNavigationColor(env, w.view, cnf.NavigationColor)
+ }
+ if prev.StatusColor != cnf.StatusColor {
+ w.config.StatusColor = cnf.StatusColor
+ setStatusColor(env, w.view, cnf.StatusColor)
+ }
+ if prev.Mode != cnf.Mode {
+ switch cnf.Mode {
+ case Fullscreen:
+ callVoidMethod(env, w.view, gioView.setFullscreen, C.JNI_TRUE)
+ w.config.Mode = Fullscreen
+ case Windowed:
+ callVoidMethod(env, w.view, gioView.setFullscreen, C.JNI_FALSE)
+ w.config.Mode = Windowed
+ }
+ }
+ if w.config != prev {
+ w.callbacks.Event(ConfigEvent{Config: w.config})
+ }
+ })
+}
+
+func (w *window) Raise() {}
+
+func (w *window) SetCursor(name pointer.CursorName) {
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ setCursor(env, w.view, name)
+ })
+}
+
+func (w *window) Wakeup() {
+ runOnMain(func(env *C.JNIEnv) {
+ w.callbacks.Event(wakeupEvent{})
+ })
+}
+
+func setCursor(env *C.JNIEnv, view C.jobject, name pointer.CursorName) {
+ var curID int
+ switch name {
+ default:
+ fallthrough
+ case pointer.CursorDefault:
+ curID = 1000 // TYPE_ARROW
+ case pointer.CursorText:
+ curID = 1008 // TYPE_TEXT
+ case pointer.CursorPointer:
+ curID = 1002 // TYPE_HAND
+ case pointer.CursorCrossHair:
+ curID = 1007 // TYPE_CROSSHAIR
+ case pointer.CursorColResize:
+ curID = 1014 // TYPE_HORIZONTAL_DOUBLE_ARROW
+ case pointer.CursorRowResize:
+ curID = 1015 // TYPE_VERTICAL_DOUBLE_ARROW
+ case pointer.CursorNone:
+ curID = 0 // TYPE_NULL
+ }
+ callVoidMethod(env, view, gioView.setCursor, jvalue(curID))
+}
+
+func setOrientation(env *C.JNIEnv, view C.jobject, mode Orientation) {
+ var (
+ id int
+ idFallback int // Used only for SDK 17 or older.
+ )
+ // Constants defined at https://developer.android.com/reference/android/content/pm/ActivityInfo.
+ switch mode {
+ case AnyOrientation:
+ id, idFallback = 2, 2 // SCREEN_ORIENTATION_USER
+ case LandscapeOrientation:
+ id, idFallback = 11, 0 // SCREEN_ORIENTATION_USER_LANDSCAPE (or SCREEN_ORIENTATION_LANDSCAPE)
+ case PortraitOrientation:
+ id, idFallback = 12, 1 // SCREEN_ORIENTATION_USER_PORTRAIT (or SCREEN_ORIENTATION_PORTRAIT)
+ }
+ callVoidMethod(env, view, gioView.setOrientation, jvalue(id), jvalue(idFallback))
+}
+
+func setStatusColor(env *C.JNIEnv, view C.jobject, color color.NRGBA) {
+ callVoidMethod(env, view, gioView.setStatusColor,
+ jvalue(uint32(color.A)<<24|uint32(color.R)<<16|uint32(color.G)<<8|uint32(color.B)),
+ jvalue(int(f32color.LinearFromSRGB(color).Luminance()*255)),
+ )
+}
+
+func setNavigationColor(env *C.JNIEnv, view C.jobject, color color.NRGBA) {
+ callVoidMethod(env, view, gioView.setNavigationColor,
+ jvalue(uint32(color.A)<<24|uint32(color.R)<<16|uint32(color.G)<<8|uint32(color.B)),
+ jvalue(int(f32color.LinearFromSRGB(color).Luminance()*255)),
+ )
+}
+
+// Close the window. Not implemented for Android.
+func (w *window) Close() {}
+
+// Maximize maximizes the window. Not implemented for Android.
+func (w *window) Maximize() {}
+
+// Center the window. Not implemented for Android.
+func (w *window) Center() {}
+
+// runOnMain runs a function on the Java main thread.
+func runOnMain(f func(env *C.JNIEnv)) {
+ go func() {
+ mainFuncs <- f
+ runInJVM(javaVM(), func(env *C.JNIEnv) {
+ callStaticVoidMethod(env, android.gioCls, android.mwakeupMainThread)
+ })
+ }()
+}
+
+//export Java_org_gioui_Gio_scheduleMainFuncs
+func Java_org_gioui_Gio_scheduleMainFuncs(env *C.JNIEnv, cls C.jclass) {
+ for {
+ select {
+ case f := <-mainFuncs:
+ f(env)
+ default:
+ return
+ }
+ }
+}
+
+func (_ ViewEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/internal/window/os_darwin.go b/vendor/gioui.org/app/os_darwin.go
index a3b77dc..c0554db 100644
--- a/vendor/gioui.org/app/internal/window/os_darwin.go
+++ b/vendor/gioui.org/app/os_darwin.go
@@ -1,18 +1,33 @@
// SPDX-License-Identifier: Unlicense OR MIT
-package window
+package app
/*
#include <Foundation/Foundation.h>
__attribute__ ((visibility ("hidden"))) void gio_wakeupMainThread(void);
-__attribute__ ((visibility ("hidden"))) NSUInteger gio_nsstringLength(CFTypeRef str);
-__attribute__ ((visibility ("hidden"))) void gio_nsstringGetCharacters(CFTypeRef str, unichar *chars, NSUInteger loc, NSUInteger length);
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createDisplayLink(void);
__attribute__ ((visibility ("hidden"))) void gio_releaseDisplayLink(CFTypeRef dl);
__attribute__ ((visibility ("hidden"))) int gio_startDisplayLink(CFTypeRef dl);
__attribute__ ((visibility ("hidden"))) int gio_stopDisplayLink(CFTypeRef dl);
__attribute__ ((visibility ("hidden"))) void gio_setDisplayLinkDisplay(CFTypeRef dl, uint64_t did);
+__attribute__ ((visibility ("hidden"))) void gio_hideCursor();
+__attribute__ ((visibility ("hidden"))) void gio_showCursor();
+__attribute__ ((visibility ("hidden"))) void gio_setCursor(NSUInteger curID);
+
+static bool isMainThread() {
+ return [NSThread isMainThread];
+}
+
+static NSUInteger nsstringLength(CFTypeRef cstr) {
+ NSString *str = (__bridge NSString *)cstr;
+ return [str length];
+}
+
+static void nsstringGetCharacters(CFTypeRef cstr, unichar *chars, NSUInteger loc, NSUInteger length) {
+ NSString *str = (__bridge NSString *)cstr;
+ [str getCharacters:chars range:NSMakeRange(loc, length)];
+}
*/
import "C"
import (
@@ -22,6 +37,8 @@ import (
"time"
"unicode/utf16"
"unsafe"
+
+ "gioui.org/io/pointer"
)
// displayLink is the state for a display link (CVDisplayLinkRef on macOS,
@@ -50,6 +67,10 @@ var mainFuncs = make(chan func(), 1)
// runOnMain runs the function on the main thread.
func runOnMain(f func()) {
+ if C.isMainThread() {
+ f()
+ return
+ }
go func() {
mainFuncs <- f
C.gio_wakeupMainThread()
@@ -71,13 +92,16 @@ func gio_dispatchMainFuncs() {
// nsstringToString converts a NSString to a Go string, and
// releases the original string.
func nsstringToString(str C.CFTypeRef) string {
+ if str == 0 {
+ return ""
+ }
defer C.CFRelease(str)
- n := C.gio_nsstringLength(str)
+ n := C.nsstringLength(str)
if n == 0 {
return ""
}
chars := make([]uint16, n)
- C.gio_nsstringGetCharacters(str, (*C.unichar)(unsafe.Pointer(&chars[0])), 0, n)
+ C.nsstringGetCharacters(str, (*C.unichar)(unsafe.Pointer(&chars[0])), 0, n)
utf8 := utf16.Decode(chars)
return string(utf8)
}
@@ -169,3 +193,45 @@ func gio_onFrameCallback(dl C.CFTypeRef) {
}
}
}
+
+// windowSetCursor updates the cursor from the current one to a new one
+// and returns the new one.
+func windowSetCursor(from, to pointer.CursorName) pointer.CursorName {
+ if from == to {
+ return to
+ }
+ var curID int
+ switch to {
+ default:
+ to = pointer.CursorDefault
+ fallthrough
+ case pointer.CursorDefault:
+ curID = 1
+ case pointer.CursorText:
+ curID = 2
+ case pointer.CursorPointer:
+ curID = 3
+ case pointer.CursorCrossHair:
+ curID = 4
+ case pointer.CursorColResize:
+ curID = 5
+ case pointer.CursorRowResize:
+ curID = 6
+ case pointer.CursorGrab:
+ curID = 7
+ case pointer.CursorNone:
+ C.gio_hideCursor()
+ return to
+ }
+ if from == pointer.CursorNone {
+ C.gio_showCursor()
+ }
+ C.gio_setCursor(C.NSUInteger(curID))
+ return to
+}
+
+func (w *window) Wakeup() {
+ runOnMain(func() {
+ w.w.Event(wakeupEvent{})
+ })
+}
diff --git a/vendor/gioui.org/app/os_darwin.m b/vendor/gioui.org/app/os_darwin.m
new file mode 100644
index 0000000..772cc28
--- /dev/null
+++ b/vendor/gioui.org/app/os_darwin.m
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+@import Dispatch;
+@import Foundation;
+
+#include "_cgo_export.h"
+
+void gio_wakeupMainThread(void) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ gio_dispatchMainFuncs();
+ });
+}
diff --git a/vendor/gioui.org/app/internal/window/os_ios.go b/vendor/gioui.org/app/os_ios.go
index 1865454..f6f6dea 100644
--- a/vendor/gioui.org/app/internal/window/os_ios.go
+++ b/vendor/gioui.org/app/os_ios.go
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build darwin && ios
// +build darwin,ios
-package window
+package app
/*
#cgo CFLAGS: -DGLES_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
@@ -17,14 +18,55 @@ struct drawParams {
CGFloat top, right, bottom, left;
};
-__attribute__ ((visibility ("hidden"))) void gio_showTextInput(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) void gio_hideTextInput(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) void gio_addLayerToView(CFTypeRef viewRef, CFTypeRef layerRef);
-__attribute__ ((visibility ("hidden"))) void gio_updateView(CFTypeRef viewRef, CFTypeRef layerRef);
-__attribute__ ((visibility ("hidden"))) void gio_removeLayer(CFTypeRef layerRef);
-__attribute__ ((visibility ("hidden"))) struct drawParams gio_viewDrawParams(CFTypeRef viewRef);
-__attribute__ ((visibility ("hidden"))) CFTypeRef gio_readClipboard(void);
-__attribute__ ((visibility ("hidden"))) void gio_writeClipboard(unichar *chars, NSUInteger length);
+static void writeClipboard(unichar *chars, NSUInteger length) {
+ @autoreleasepool {
+ NSString *s = [NSString string];
+ if (length > 0) {
+ s = [NSString stringWithCharacters:chars length:length];
+ }
+ UIPasteboard *p = UIPasteboard.generalPasteboard;
+ p.string = s;
+ }
+}
+
+static CFTypeRef readClipboard(void) {
+ @autoreleasepool {
+ UIPasteboard *p = UIPasteboard.generalPasteboard;
+ return (__bridge_retained CFTypeRef)p.string;
+ }
+}
+
+static void showTextInput(CFTypeRef viewRef) {
+ UIView *view = (__bridge UIView *)viewRef;
+ [view becomeFirstResponder];
+}
+
+static void hideTextInput(CFTypeRef viewRef) {
+ UIView *view = (__bridge UIView *)viewRef;
+ [view resignFirstResponder];
+}
+
+static struct drawParams viewDrawParams(CFTypeRef viewRef) {
+ UIView *v = (__bridge UIView *)viewRef;
+ struct drawParams params;
+ CGFloat scale = v.layer.contentsScale;
+ // Use 163 as the standard ppi on iOS.
+ params.dpi = 163*scale;
+ params.sdpi = params.dpi;
+ UIEdgeInsets insets = v.layoutMargins;
+ if (@available(iOS 11.0, tvOS 11.0, *)) {
+ UIFontMetrics *metrics = [UIFontMetrics defaultMetrics];
+ params.sdpi = [metrics scaledValueForValue:params.sdpi];
+ insets = v.safeAreaInsets;
+ }
+ params.width = v.bounds.size.width*scale;
+ params.height = v.bounds.size.height*scale;
+ params.top = insets.top*scale;
+ params.right = insets.right*scale;
+ params.bottom = insets.bottom*scale;
+ params.left = insets.left*scale;
+ return params;
+}
*/
import "C"
@@ -32,33 +74,36 @@ import (
"image"
"runtime"
"runtime/debug"
- "sync/atomic"
"time"
"unicode/utf16"
"unsafe"
"gioui.org/f32"
+ "gioui.org/io/clipboard"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
"gioui.org/unit"
)
+type ViewEvent struct {
+ // ViewController is a CFTypeRef for the UIViewController backing a Window.
+ ViewController uintptr
+}
+
type window struct {
view C.CFTypeRef
- w Callbacks
+ w *callbacks
displayLink *displayLink
- layer C.CFTypeRef
- visible atomic.Value
+ visible bool
+ cursor pointer.CursorName
pointerMap []C.CFTypeRef
}
var mainWindow = newWindowRendezvous()
-var layerFactory func() uintptr
-
var views = make(map[C.CFTypeRef]*window)
func init() {
@@ -67,7 +112,7 @@ func init() {
}
//export onCreate
-func onCreate(view C.CFTypeRef) {
+func onCreate(view, controller C.CFTypeRef) {
w := &window{
view: view,
}
@@ -81,11 +126,9 @@ func onCreate(view C.CFTypeRef) {
wopts := <-mainWindow.out
w.w = wopts.window
w.w.SetDriver(w)
- w.visible.Store(false)
- w.layer = C.CFTypeRef(layerFactory())
- C.gio_addLayerToView(view, w.layer)
views[view] = w
w.w.Event(system.StageEvent{Stage: system.StagePaused})
+ w.w.Event(ViewEvent{ViewController: uintptr(controller)})
}
//export gio_onDraw
@@ -95,18 +138,17 @@ func gio_onDraw(view C.CFTypeRef) {
}
func (w *window) draw(sync bool) {
- params := C.gio_viewDrawParams(w.view)
+ params := C.viewDrawParams(w.view)
if params.width == 0 || params.height == 0 {
return
}
- wasVisible := w.isVisible()
- w.visible.Store(true)
- C.gio_updateView(w.view, w.layer)
+ wasVisible := w.visible
+ w.visible = true
if !wasVisible {
w.w.Event(system.StageEvent{Stage: system.StageRunning})
}
const inchPrDp = 1.0 / 163
- w.w.Event(FrameEvent{
+ w.w.Event(frameEvent{
FrameEvent: system.FrameEvent{
Now: time.Now(),
Size: image.Point{
@@ -131,7 +173,7 @@ func (w *window) draw(sync bool) {
//export onStop
func onStop(view C.CFTypeRef) {
w := views[view]
- w.visible.Store(false)
+ w.visible = false
w.w.Event(system.StageEvent{Stage: system.StagePaused})
}
@@ -139,11 +181,9 @@ func onStop(view C.CFTypeRef) {
func onDestroy(view C.CFTypeRef) {
w := views[view]
delete(views, view)
+ w.w.Event(ViewEvent{})
w.w.Event(system.DestroyEvent{})
w.displayLink.Close()
- C.gio_removeLayer(w.layer)
- C.CFRelease(w.layer)
- w.layer = 0
w.view = 0
}
@@ -220,23 +260,23 @@ func onTouch(last C.int, view, touchRef C.CFTypeRef, phase C.NSInteger, x, y C.C
}
func (w *window) ReadClipboard() {
- runOnMain(func() {
- content := nsstringToString(C.gio_readClipboard())
- w.w.Event(system.ClipboardEvent{Text: content})
- })
+ content := nsstringToString(C.readClipboard())
+ w.w.Event(clipboard.Event{Text: content})
}
func (w *window) WriteClipboard(s string) {
u16 := utf16.Encode([]rune(s))
- runOnMain(func() {
- var chars *C.unichar
- if len(u16) > 0 {
- chars = (*C.unichar)(unsafe.Pointer(&u16[0]))
- }
- C.gio_writeClipboard(chars, C.NSUInteger(len(u16)))
- })
+ var chars *C.unichar
+ if len(u16) > 0 {
+ chars = (*C.unichar)(unsafe.Pointer(&u16[0]))
+ }
+ C.writeClipboard(chars, C.NSUInteger(len(u16)))
}
+func (w *window) Configure([]Option) {}
+
+func (w *window) Raise() {}
+
func (w *window) SetAnimating(anim bool) {
v := w.view
if v == 0 {
@@ -249,6 +289,10 @@ func (w *window) SetAnimating(anim bool) {
}
}
+func (w *window) SetCursor(name pointer.CursorName) {
+ w.cursor = windowSetCursor(w.cursor, name)
+}
+
func (w *window) onKeyCommand(name string) {
w.w.Event(key.Event{
Name: name,
@@ -275,42 +319,40 @@ func (w *window) lookupTouch(last bool, touch C.CFTypeRef) pointer.ID {
return pointer.ID(id)
}
-func (w *window) contextLayer() uintptr {
- return uintptr(w.layer)
-}
-
-func (w *window) isVisible() bool {
- return w.visible.Load().(bool)
+func (w *window) contextView() C.CFTypeRef {
+ return w.view
}
func (w *window) ShowTextInput(show bool) {
- v := w.view
- if v == 0 {
- return
+ if show {
+ C.showTextInput(w.view)
+ } else {
+ C.hideTextInput(w.view)
}
- C.CFRetain(v)
- runOnMain(func() {
- defer C.CFRelease(v)
- if show {
- C.gio_showTextInput(w.view)
- } else {
- C.gio_hideTextInput(w.view)
- }
- })
}
+func (w *window) SetInputHint(_ key.InputHint) {}
+
// Close the window. Not implemented for iOS.
func (w *window) Close() {}
-func NewWindow(win Callbacks, opts *Options) error {
- mainWindow.in <- windowAndOptions{win, opts}
+// Maximize the window. Not implemented for iOS.
+func (w *window) Maximize() {}
+
+// Center the window. Not implemented for iOS.
+func (w *window) Center() {}
+
+func newWindow(win *callbacks, options []Option) error {
+ mainWindow.in <- windowAndConfig{win, options}
return <-mainWindow.errs
}
-func Main() {
+func osMain() {
}
//export gio_runMain
func gio_runMain() {
runMain()
}
+
+func (_ ViewEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/internal/window/os_ios.m b/vendor/gioui.org/app/os_ios.m
index 66830e4..94f254b 100644
--- a/vendor/gioui.org/app/internal/window/os_ios.m
+++ b/vendor/gioui.org/app/os_ios.m
@@ -8,6 +8,8 @@
#include "_cgo_export.h"
#include "framework_ios.h"
+__attribute__ ((visibility ("hidden"))) Class gio_layerClass(void);
+
@interface GioView: UIView <UIKeyInput>
@end
@@ -28,7 +30,7 @@ CGFloat _keyboardHeight;
#endif
drawView.preservesSuperviewLayoutMargins = YES;
drawView.layoutMargins = UIEdgeInsetsMake(0, 0, 0, 0);
- onCreate((__bridge CFTypeRef)drawView);
+ onCreate((__bridge CFTypeRef)drawView, (__bridge CFTypeRef)self);
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillChange:)
name:UIKeyboardWillShowNotification
@@ -125,6 +127,9 @@ NSArray<UIKeyCommand *> *_keyCommands;
gio_onFrameCallback((__bridge CFTypeRef)link);
}
++ (Class)layerClass {
+ return gio_layerClass();
+}
- (void)willMoveToWindow:(UIWindow *)newWindow {
if (self.window != nil) {
[[NSNotificationCenter defaultCenter] removeObserver:self
@@ -157,9 +162,6 @@ NSArray<UIKeyCommand *> *_keyCommands;
}
}
-- (void)dealloc {
-}
-
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
handleTouches(0, self, touches, event);
}
@@ -229,74 +231,6 @@ NSArray<UIKeyCommand *> *_keyCommands;
}
@end
-void gio_writeClipboard(unichar *chars, NSUInteger length) {
- @autoreleasepool {
- NSString *s = [NSString string];
- if (length > 0) {
- s = [NSString stringWithCharacters:chars length:length];
- }
- UIPasteboard *p = UIPasteboard.generalPasteboard;
- p.string = s;
- }
-}
-
-CFTypeRef gio_readClipboard(void) {
- @autoreleasepool {
- UIPasteboard *p = UIPasteboard.generalPasteboard;
- return (__bridge_retained CFTypeRef)p.string;
- }
-}
-
-void gio_showTextInput(CFTypeRef viewRef) {
- UIView *view = (__bridge UIView *)viewRef;
- [view becomeFirstResponder];
-}
-
-void gio_hideTextInput(CFTypeRef viewRef) {
- UIView *view = (__bridge UIView *)viewRef;
- [view resignFirstResponder];
-}
-
-void gio_addLayerToView(CFTypeRef viewRef, CFTypeRef layerRef) {
- UIView *view = (__bridge UIView *)viewRef;
- CALayer *layer = (__bridge CALayer *)layerRef;
- [view.layer addSublayer:layer];
-}
-
-void gio_updateView(CFTypeRef viewRef, CFTypeRef layerRef) {
- UIView *view = (__bridge UIView *)viewRef;
- CAEAGLLayer *layer = (__bridge CAEAGLLayer *)layerRef;
- layer.contentsScale = view.contentScaleFactor;
- layer.bounds = view.bounds;
-}
-
-void gio_removeLayer(CFTypeRef layerRef) {
- CALayer *layer = (__bridge CALayer *)layerRef;
- [layer removeFromSuperlayer];
-}
-
-struct drawParams gio_viewDrawParams(CFTypeRef viewRef) {
- UIView *v = (__bridge UIView *)viewRef;
- struct drawParams params;
- CGFloat scale = v.layer.contentsScale;
- // Use 163 as the standard ppi on iOS.
- params.dpi = 163*scale;
- params.sdpi = params.dpi;
- UIEdgeInsets insets = v.layoutMargins;
- if (@available(iOS 11.0, tvOS 11.0, *)) {
- UIFontMetrics *metrics = [UIFontMetrics defaultMetrics];
- params.sdpi = [metrics scaledValueForValue:params.sdpi];
- insets = v.safeAreaInsets;
- }
- params.width = v.bounds.size.width*scale;
- params.height = v.bounds.size.height*scale;
- params.top = insets.top*scale;
- params.right = insets.right*scale;
- params.bottom = insets.bottom*scale;
- params.left = insets.left*scale;
- return params;
-}
-
CFTypeRef gio_createDisplayLink(void) {
CADisplayLink *dl = [CADisplayLink displayLinkWithTarget:[GioView class] selector:@selector(onFrameCallback:)];
dl.paused = YES;
@@ -326,3 +260,15 @@ void gio_releaseDisplayLink(CFTypeRef dlref) {
void gio_setDisplayLinkDisplay(CFTypeRef dl, uint64_t did) {
// Nothing to do on iOS.
}
+
+void gio_hideCursor() {
+ // Not supported.
+}
+
+void gio_showCursor() {
+ // Not supported.
+}
+
+void gio_setCursor(NSUInteger curID) {
+ // Not supported.
+}
diff --git a/vendor/gioui.org/app/internal/window/os_js.go b/vendor/gioui.org/app/os_js.go
index 32235df..5b1388c 100644
--- a/vendor/gioui.org/app/internal/window/os_js.go
+++ b/vendor/gioui.org/app/os_js.go
@@ -1,42 +1,62 @@
// SPDX-License-Identifier: Unlicense OR MIT
-package window
+package app
import (
+ "fmt"
"image"
+ "image/color"
"strings"
- "sync"
"syscall/js"
"time"
"unicode"
"unicode/utf8"
+ "gioui.org/internal/f32color"
+
"gioui.org/f32"
+ "gioui.org/io/clipboard"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
"gioui.org/unit"
)
+type ViewEvent struct{}
+
type window struct {
window js.Value
+ document js.Value
+ head js.Value
clipboard js.Value
cnv js.Value
tarea js.Value
- w Callbacks
+ w *callbacks
redraw js.Func
clipboardCallback js.Func
requestAnimationFrame js.Value
+ browserHistory js.Value
+ visualViewport js.Value
+ screenOrientation js.Value
cleanfuncs []func()
touches []js.Value
composing bool
+ requestFocus bool
+
+ chanAnimation chan struct{}
+ chanRedraw chan struct{}
- mu sync.Mutex
+ config Config
+ inset f32.Point
scale float32
animating bool
+ // animRequested tracks whether a requestAnimationFrame callback
+ // is pending.
+ animRequested bool
+ wakeups chan struct{}
}
-func NewWindow(win Callbacks, opts *Options) error {
+func newWindow(win *callbacks, options []Option) error {
doc := js.Global().Get("document")
cont := getContainer(doc)
cnv := createCanvas(doc)
@@ -45,29 +65,55 @@ func NewWindow(win Callbacks, opts *Options) error {
cont.Call("appendChild", tarea)
w := &window{
cnv: cnv,
+ document: doc,
tarea: tarea,
window: js.Global().Get("window"),
+ head: doc.Get("head"),
clipboard: js.Global().Get("navigator").Get("clipboard"),
+ wakeups: make(chan struct{}, 1),
}
w.requestAnimationFrame = w.window.Get("requestAnimationFrame")
+ w.browserHistory = w.window.Get("history")
+ w.visualViewport = w.window.Get("visualViewport")
+ if w.visualViewport.IsUndefined() {
+ w.visualViewport = w.window
+ }
+ if screen := w.window.Get("screen"); screen.Truthy() {
+ w.screenOrientation = screen.Get("orientation")
+ }
+ w.chanAnimation = make(chan struct{}, 1)
+ w.chanRedraw = make(chan struct{}, 1)
w.redraw = w.funcOf(func(this js.Value, args []js.Value) interface{} {
- w.animCallback()
+ w.chanAnimation <- struct{}{}
return nil
})
w.clipboardCallback = w.funcOf(func(this js.Value, args []js.Value) interface{} {
content := args[0].String()
- win.Event(system.ClipboardEvent{Text: content})
+ go win.Event(clipboard.Event{Text: content})
return nil
})
w.addEventListeners()
+ w.addHistory()
w.w = win
+
go func() {
+ defer w.cleanup()
w.w.SetDriver(w)
- w.focus()
+ w.Configure(options)
+ w.blur()
w.w.Event(system.StageEvent{Stage: system.StageRunning})
+ w.resize()
w.draw(true)
- select {}
- w.cleanup()
+ for {
+ select {
+ case <-w.wakeups:
+ w.w.Event(wakeupEvent{})
+ case <-w.chanAnimation:
+ w.animCallback()
+ case <-w.chanRedraw:
+ w.draw(true)
+ }
+ }
}()
return nil
}
@@ -116,8 +162,33 @@ func (w *window) cleanup() {
}
func (w *window) addEventListeners() {
- w.addEventListener(w.window, "resize", func(this js.Value, args []js.Value) interface{} {
- w.draw(true)
+ w.addEventListener(w.visualViewport, "resize", func(this js.Value, args []js.Value) interface{} {
+ w.resize()
+ w.chanRedraw <- struct{}{}
+ return nil
+ })
+ w.addEventListener(w.window, "contextmenu", func(this js.Value, args []js.Value) interface{} {
+ args[0].Call("preventDefault")
+ return nil
+ })
+ w.addEventListener(w.window, "popstate", func(this js.Value, args []js.Value) interface{} {
+ ev := &system.CommandEvent{Type: system.CommandBack}
+ w.w.Event(ev)
+ if ev.Cancel {
+ return w.browserHistory.Call("forward")
+ }
+
+ return w.browserHistory.Call("back")
+ })
+ w.addEventListener(w.document, "visibilitychange", func(this js.Value, args []js.Value) interface{} {
+ ev := system.StageEvent{}
+ switch w.document.Get("visibilityState").String() {
+ case "hidden", "prerender", "unloaded":
+ ev.Stage = system.StagePaused
+ default:
+ ev.Stage = system.StageRunning
+ }
+ w.w.Event(ev)
return nil
})
w.addEventListener(w.cnv, "mousemove", func(this js.Value, args []js.Value) interface{} {
@@ -126,6 +197,10 @@ func (w *window) addEventListeners() {
})
w.addEventListener(w.cnv, "mousedown", func(this js.Value, args []js.Value) interface{} {
w.pointerEvent(pointer.Press, 0, 0, args[0])
+ if w.requestFocus {
+ w.focus()
+ w.requestFocus = false
+ }
return nil
})
w.addEventListener(w.cnv, "mouseup", func(this js.Value, args []js.Value) interface{} {
@@ -149,6 +224,10 @@ func (w *window) addEventListeners() {
})
w.addEventListener(w.cnv, "touchstart", func(this js.Value, args []js.Value) interface{} {
w.touchEvent(pointer.Press, args[0])
+ if w.requestFocus {
+ w.focus() // iOS can only focus inside a Touch event.
+ w.requestFocus = false
+ }
return nil
})
w.addEventListener(w.cnv, "touchend", func(this js.Value, args []js.Value) interface{} {
@@ -177,10 +256,15 @@ func (w *window) addEventListeners() {
})
w.addEventListener(w.tarea, "blur", func(this js.Value, args []js.Value) interface{} {
w.w.Event(key.FocusEvent{Focus: false})
+ w.blur()
return nil
})
w.addEventListener(w.tarea, "keydown", func(this js.Value, args []js.Value) interface{} {
- w.keyEvent(args[0])
+ w.keyEvent(args[0], key.Press)
+ return nil
+ })
+ w.addEventListener(w.tarea, "keyup", func(this js.Value, args []js.Value) interface{} {
+ w.keyEvent(args[0], key.Release)
return nil
})
w.addEventListener(w.tarea, "compositionstart", func(this js.Value, args []js.Value) interface{} {
@@ -199,6 +283,18 @@ func (w *window) addEventListeners() {
w.flushInput()
return nil
})
+ w.addEventListener(w.tarea, "paste", func(this js.Value, args []js.Value) interface{} {
+ if w.clipboard.IsUndefined() {
+ return nil
+ }
+ // Prevents duplicated-paste, since "paste" is already handled through Clipboard API.
+ args[0].Call("preventDefault")
+ return nil
+ })
+}
+
+func (w *window) addHistory() {
+ w.browserHistory.Call("pushState", nil, nil, w.window.Get("location").Get("href"))
}
func (w *window) flushInput() {
@@ -209,18 +305,42 @@ func (w *window) flushInput() {
func (w *window) blur() {
w.tarea.Call("blur")
+ w.requestFocus = false
}
func (w *window) focus() {
w.tarea.Call("focus")
+ w.requestFocus = true
+}
+
+func (w *window) keyboard(hint key.InputHint) {
+ var m string
+ switch hint {
+ case key.HintAny:
+ m = "text"
+ case key.HintText:
+ m = "text"
+ case key.HintNumeric:
+ m = "decimal"
+ case key.HintEmail:
+ m = "email"
+ case key.HintURL:
+ m = "url"
+ case key.HintTelephone:
+ m = "tel"
+ default:
+ m = "text"
+ }
+ w.tarea.Set("inputMode", m)
}
-func (w *window) keyEvent(e js.Value) {
+func (w *window) keyEvent(e js.Value, ks key.State) {
k := e.Get("key").String()
if n, ok := translateKey(k); ok {
cmd := key.Event{
Name: n,
Modifiers: modifiersFor(e),
+ State: ks,
}
w.w.Event(cmd)
}
@@ -230,6 +350,10 @@ func (w *window) keyEvent(e js.Value) {
// KeyEvent.
func modifiersFor(e js.Value) key.Modifiers {
var mods key.Modifiers
+ if e.Get("getModifierState").IsUndefined() {
+ // Some browsers doesn't support getModifierState.
+ return mods
+ }
if e.Call("getModifierState", "Alt").Bool() {
mods |= key.ModAlt
}
@@ -248,9 +372,7 @@ func (w *window) touchEvent(typ pointer.Type, e js.Value) {
changedTouches := e.Get("changedTouches")
n := changedTouches.Length()
rect := w.cnv.Call("getBoundingClientRect")
- w.mu.Lock()
scale := w.scale
- w.mu.Unlock()
var mods key.Modifiers
if e.Get("shiftKey").Bool() {
mods |= key.ModShift
@@ -277,7 +399,7 @@ func (w *window) touchEvent(typ pointer.Type, e js.Value) {
Position: pos,
PointerID: pid,
Time: t,
- Modifiers: modifiersFor(e),
+ Modifiers: mods,
})
}
}
@@ -300,9 +422,7 @@ func (w *window) pointerEvent(typ pointer.Type, dx, dy float32, e js.Value) {
rect := w.cnv.Call("getBoundingClientRect")
x -= rect.Get("left").Float()
y -= rect.Get("top").Float()
- w.mu.Lock()
scale := w.scale
- w.mu.Unlock()
pos := f32.Point{
X: float32(x) * scale,
Y: float32(y) * scale,
@@ -315,13 +435,13 @@ func (w *window) pointerEvent(typ pointer.Type, dx, dy float32, e js.Value) {
jbtns := e.Get("buttons").Int()
var btns pointer.Buttons
if jbtns&1 != 0 {
- btns |= pointer.ButtonLeft
+ btns |= pointer.ButtonPrimary
}
if jbtns&2 != 0 {
- btns |= pointer.ButtonRight
+ btns |= pointer.ButtonSecondary
}
if jbtns&4 != 0 {
- btns |= pointer.ButtonMiddle
+ btns |= pointer.ButtonTertiary
}
w.w.Event(pointer.Event{
Type: typ,
@@ -343,7 +463,7 @@ func (w *window) addEventListener(this js.Value, event string, f func(this js.Va
}
// funcOf is like js.FuncOf but adds the js.Func to a list of
-// functions to be released up.
+// functions to be released during cleanup.
func (w *window) funcOf(f func(this js.Value, args []js.Value) interface{}) js.Func {
jsf := js.FuncOf(f)
w.cleanfuncs = append(w.cleanfuncs, jsf.Release)
@@ -351,24 +471,22 @@ func (w *window) funcOf(f func(this js.Value, args []js.Value) interface{}) js.F
}
func (w *window) animCallback() {
- w.mu.Lock()
anim := w.animating
+ w.animRequested = anim
if anim {
w.requestAnimationFrame.Invoke(w.redraw)
}
- w.mu.Unlock()
if anim {
w.draw(false)
}
}
func (w *window) SetAnimating(anim bool) {
- w.mu.Lock()
- defer w.mu.Unlock()
- if anim && !w.animating {
+ w.animating = anim
+ if anim && !w.animRequested {
+ w.animRequested = true
w.requestAnimationFrame.Invoke(w.redraw)
}
- w.animating = anim
}
func (w *window) ReadClipboard() {
@@ -391,6 +509,44 @@ func (w *window) WriteClipboard(s string) {
w.clipboard.Call("writeText", s)
}
+func (w *window) Configure(options []Option) {
+ prev := w.config
+ cnf := w.config
+ cnf.apply(unit.Metric{}, options)
+ if prev.Title != cnf.Title {
+ w.config.Title = cnf.Title
+ w.document.Set("title", cnf.Title)
+ }
+ if prev.Mode != cnf.Mode {
+ w.windowMode(cnf.Mode)
+ }
+ if prev.NavigationColor != cnf.NavigationColor {
+ w.config.NavigationColor = cnf.NavigationColor
+ w.navigationColor(cnf.NavigationColor)
+ }
+ if prev.Orientation != cnf.Orientation {
+ w.config.Orientation = cnf.Orientation
+ w.orientation(cnf.Orientation)
+ }
+ if w.config != prev {
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+}
+
+func (w *window) Raise() {}
+
+func (w *window) SetCursor(name pointer.CursorName) {
+ style := w.cnv.Get("style")
+ style.Set("cursor", string(name))
+}
+
+func (w *window) Wakeup() {
+ select {
+ case w.wakeups <- struct{}{}:
+ default:
+ }
+}
+
func (w *window) ShowTextInput(show bool) {
// Run in a goroutine to avoid a deadlock if the
// focus change result in an event.
@@ -403,49 +559,119 @@ func (w *window) ShowTextInput(show bool) {
}()
}
+func (w *window) SetInputHint(mode key.InputHint) {
+ w.keyboard(mode)
+}
+
// Close the window. Not implemented for js.
func (w *window) Close() {}
+// Maximize the window. Not implemented for js.
+func (w *window) Maximize() {}
+
+// Center the window. Not implemented for js.
+func (w *window) Center() {}
+
+func (w *window) resize() {
+ w.scale = float32(w.window.Get("devicePixelRatio").Float())
+
+ rect := w.cnv.Call("getBoundingClientRect")
+ size := image.Point{
+ X: int(float32(rect.Get("width").Float()) * w.scale),
+ Y: int(float32(rect.Get("height").Float()) * w.scale),
+ }
+ if size != w.config.Size {
+ w.config.Size = size
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+
+ if vx, vy := w.visualViewport.Get("width"), w.visualViewport.Get("height"); !vx.IsUndefined() && !vy.IsUndefined() {
+ w.inset.X = float32(w.config.Size.X) - float32(vx.Float())*w.scale
+ w.inset.Y = float32(w.config.Size.Y) - float32(vy.Float())*w.scale
+ }
+
+ if w.config.Size.X == 0 || w.config.Size.Y == 0 {
+ return
+ }
+
+ w.cnv.Set("width", w.config.Size.X)
+ w.cnv.Set("height", w.config.Size.Y)
+}
+
func (w *window) draw(sync bool) {
- width, height, scale, cfg := w.config()
- if cfg == (unit.Metric{}) || width == 0 || height == 0 {
+ size, insets, metric := w.getConfig()
+ if metric == (unit.Metric{}) || size.X == 0 || size.Y == 0 {
return
}
- w.mu.Lock()
- w.scale = float32(scale)
- w.mu.Unlock()
- w.w.Event(FrameEvent{
+ w.w.Event(frameEvent{
FrameEvent: system.FrameEvent{
- Now: time.Now(),
- Size: image.Point{
- X: width,
- Y: height,
- },
- Metric: cfg,
+ Now: time.Now(),
+ Size: size,
+ Insets: insets,
+ Metric: metric,
},
Sync: sync,
})
}
-func (w *window) config() (int, int, float32, unit.Metric) {
- rect := w.cnv.Call("getBoundingClientRect")
- width, height := rect.Get("width").Float(), rect.Get("height").Float()
- scale := w.window.Get("devicePixelRatio").Float()
- width *= scale
- height *= scale
- iw, ih := int(width+.5), int(height+.5)
- // Adjust internal size of canvas if necessary.
- if cw, ch := w.cnv.Get("width").Int(), w.cnv.Get("height").Int(); iw != cw || ih != ch {
- w.cnv.Set("width", iw)
- w.cnv.Set("height", ih)
+func (w *window) getConfig() (image.Point, system.Insets, unit.Metric) {
+ return image.Pt(w.config.Size.X, w.config.Size.Y), system.Insets{
+ Bottom: unit.Px(w.inset.Y),
+ Right: unit.Px(w.inset.X),
+ }, unit.Metric{
+ PxPerDp: w.scale,
+ PxPerSp: w.scale,
+ }
+}
+
+func (w *window) windowMode(mode WindowMode) {
+ switch mode {
+ case Windowed:
+ if !w.document.Get("fullscreenElement").Truthy() {
+ return // Browser is already Windowed.
+ }
+ if !w.document.Get("exitFullscreen").Truthy() {
+ return // Browser doesn't support such feature.
+ }
+ w.document.Call("exitFullscreen")
+ w.config.Mode = Windowed
+ case Fullscreen:
+ elem := w.document.Get("documentElement")
+ if !elem.Get("requestFullscreen").Truthy() {
+ return // Browser doesn't support such feature.
+ }
+ elem.Call("requestFullscreen")
+ w.config.Mode = Fullscreen
+ }
+}
+
+func (w *window) orientation(mode Orientation) {
+ if j := w.screenOrientation; !j.Truthy() || !j.Get("unlock").Truthy() || !j.Get("lock").Truthy() {
+ return // Browser don't support Screen Orientation API.
}
- return iw, ih, float32(scale), unit.Metric{
- PxPerDp: float32(scale),
- PxPerSp: float32(scale),
+
+ switch mode {
+ case AnyOrientation:
+ w.screenOrientation.Call("unlock")
+ case LandscapeOrientation:
+ w.screenOrientation.Call("lock", "landscape").Call("then", w.redraw)
+ case PortraitOrientation:
+ w.screenOrientation.Call("lock", "portrait").Call("then", w.redraw)
}
}
-func Main() {
+func (w *window) navigationColor(c color.NRGBA) {
+ theme := w.head.Call("querySelector", `meta[name="theme-color"]`)
+ if !theme.Truthy() {
+ theme = w.document.Call("createElement", "meta")
+ theme.Set("name", "theme-color")
+ w.head.Call("appendChild", theme)
+ }
+ rgba := f32color.NRGBAToRGBA(c)
+ theme.Set("content", fmt.Sprintf("#%06X", []uint8{rgba.R, rgba.G, rgba.B}))
+}
+
+func osMain() {
select {}
}
@@ -479,7 +705,7 @@ func translateKey(k string) (string, bool) {
case "Tab":
n = key.NameTab
case " ":
- n = "Space"
+ n = key.NameSpace
case "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12":
n = k
default:
@@ -492,3 +718,5 @@ func translateKey(k string) (string, bool) {
}
return n, true
}
+
+func (_ ViewEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/os_macos.go b/vendor/gioui.org/app/os_macos.go
new file mode 100644
index 0000000..270db6a
--- /dev/null
+++ b/vendor/gioui.org/app/os_macos.go
@@ -0,0 +1,663 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build darwin && !ios
+// +build darwin,!ios
+
+package app
+
+import (
+ "errors"
+ "image"
+ "runtime"
+ "time"
+ "unicode"
+ "unicode/utf16"
+ "unsafe"
+
+ "gioui.org/f32"
+ "gioui.org/io/clipboard"
+ "gioui.org/io/key"
+ "gioui.org/io/pointer"
+ "gioui.org/io/system"
+ "gioui.org/unit"
+
+ _ "gioui.org/internal/cocoainit"
+)
+
+/*
+#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
+
+#include <AppKit/AppKit.h>
+
+#define MOUSE_MOVE 1
+#define MOUSE_UP 2
+#define MOUSE_DOWN 3
+#define MOUSE_SCROLL 4
+
+__attribute__ ((visibility ("hidden"))) void gio_main(void);
+__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createView(void);
+__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createWindow(CFTypeRef viewRef, const char *title, CGFloat width, CGFloat height, CGFloat minWidth, CGFloat minHeight, CGFloat maxWidth, CGFloat maxHeight);
+
+static void writeClipboard(unichar *chars, NSUInteger length) {
+ @autoreleasepool {
+ NSString *s = [NSString string];
+ if (length > 0) {
+ s = [NSString stringWithCharacters:chars length:length];
+ }
+ NSPasteboard *p = NSPasteboard.generalPasteboard;
+ [p declareTypes:@[NSPasteboardTypeString] owner:nil];
+ [p setString:s forType:NSPasteboardTypeString];
+ }
+}
+
+static CFTypeRef readClipboard(void) {
+ @autoreleasepool {
+ NSPasteboard *p = NSPasteboard.generalPasteboard;
+ NSString *content = [p stringForType:NSPasteboardTypeString];
+ return (__bridge_retained CFTypeRef)content;
+ }
+}
+
+static CGFloat viewHeight(CFTypeRef viewRef) {
+ NSView *view = (__bridge NSView *)viewRef;
+ return [view bounds].size.height;
+}
+
+static CGFloat viewWidth(CFTypeRef viewRef) {
+ NSView *view = (__bridge NSView *)viewRef;
+ return [view bounds].size.width;
+}
+
+static CGFloat getScreenBackingScale(void) {
+ return [NSScreen.mainScreen backingScaleFactor];
+}
+
+static CGFloat getViewBackingScale(CFTypeRef viewRef) {
+ NSView *view = (__bridge NSView *)viewRef;
+ return [view.window backingScaleFactor];
+}
+
+static void setNeedsDisplay(CFTypeRef viewRef) {
+ NSView *view = (__bridge NSView *)viewRef;
+ [view setNeedsDisplay:YES];
+}
+
+static NSPoint cascadeTopLeftFromPoint(CFTypeRef windowRef, NSPoint topLeft) {
+ NSWindow *window = (__bridge NSWindow *)windowRef;
+ return [window cascadeTopLeftFromPoint:topLeft];
+}
+
+static void makeKeyAndOrderFront(CFTypeRef windowRef) {
+ NSWindow *window = (__bridge NSWindow *)windowRef;
+ [window makeKeyAndOrderFront:nil];
+}
+
+static void toggleFullScreen(CFTypeRef windowRef) {
+ NSWindow *window = (__bridge NSWindow *)windowRef;
+ [window toggleFullScreen:nil];
+}
+
+static NSWindowStyleMask getWindowStyleMask(CFTypeRef windowRef) {
+ NSWindow *window = (__bridge NSWindow *)windowRef;
+ return [window styleMask];
+}
+
+static void closeWindow(CFTypeRef windowRef) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ [window performClose:nil];
+}
+
+static void setSize(CFTypeRef windowRef, CGFloat width, CGFloat height) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ NSSize size = NSMakeSize(width, height);
+ [window setContentSize:size];
+}
+
+static void setMinSize(CFTypeRef windowRef, CGFloat width, CGFloat height) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ window.contentMinSize = NSMakeSize(width, height);
+}
+
+static void setMaxSize(CFTypeRef windowRef, CGFloat width, CGFloat height) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ window.contentMaxSize = NSMakeSize(width, height);
+}
+
+static void setScreenFrame(CFTypeRef windowRef, CGFloat x, CGFloat y, CGFloat w, CGFloat h) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ NSRect r = NSMakeRect(x, y, w, h);
+ [window setFrame:r display:YES];
+}
+
+static NSRect getScreenFrame(CFTypeRef windowRef) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ return [[window screen] frame];
+}
+
+static void setTitle(CFTypeRef windowRef, const char *title) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ window.title = [NSString stringWithUTF8String: title];
+}
+
+static CFTypeRef layerForView(CFTypeRef viewRef) {
+ NSView *view = (__bridge NSView *)viewRef;
+ return (__bridge CFTypeRef)view.layer;
+}
+
+static void raiseWindow(CFTypeRef windowRef) {
+ NSWindow* window = (__bridge NSWindow *)windowRef;
+ [window makeKeyAndOrderFront:nil];
+}
+
+*/
+import "C"
+
+func init() {
+ // Darwin requires that UI operations happen on the main thread only.
+ runtime.LockOSThread()
+}
+
+// ViewEvent notified the client of changes to the window AppKit handles.
+// The handles are retained until another ViewEvent is sent.
+type ViewEvent struct {
+ // View is a CFTypeRef for the NSView for the window.
+ View uintptr
+ // Layer is a CFTypeRef of the CALayer of View.
+ Layer uintptr
+}
+
+type window struct {
+ view C.CFTypeRef
+ window C.CFTypeRef
+ w *callbacks
+ stage system.Stage
+ displayLink *displayLink
+ cursor pointer.CursorName
+
+ scale float32
+ config Config
+}
+
+// viewMap is the mapping from Cocoa NSViews to Go windows.
+var viewMap = make(map[C.CFTypeRef]*window)
+
+// launched is closed when applicationDidFinishLaunching is called.
+var launched = make(chan struct{})
+
+// nextTopLeft is the offset to use for the next window's call to
+// cascadeTopLeftFromPoint.
+var nextTopLeft C.NSPoint
+
+// mustView is like lookupView, except that it panics
+// if the view isn't mapped.
+func mustView(view C.CFTypeRef) *window {
+ w, ok := lookupView(view)
+ if !ok {
+ panic("no window for view")
+ }
+ return w
+}
+
+func lookupView(view C.CFTypeRef) (*window, bool) {
+ w, exists := viewMap[view]
+ if !exists {
+ return nil, false
+ }
+ return w, true
+}
+
+func deleteView(view C.CFTypeRef) {
+ delete(viewMap, view)
+}
+
+func insertView(view C.CFTypeRef, w *window) {
+ viewMap[view] = w
+}
+
+func (w *window) contextView() C.CFTypeRef {
+ return w.view
+}
+
+func (w *window) ReadClipboard() {
+ content := nsstringToString(C.readClipboard())
+ w.w.Event(clipboard.Event{Text: content})
+}
+
+func (w *window) WriteClipboard(s string) {
+ u16 := utf16.Encode([]rune(s))
+ var chars *C.unichar
+ if len(u16) > 0 {
+ chars = (*C.unichar)(unsafe.Pointer(&u16[0]))
+ }
+ C.writeClipboard(chars, C.NSUInteger(len(u16)))
+}
+
+func (w *window) updateWindowMode() {
+ style := int(C.getWindowStyleMask(w.window))
+ if style&C.NSWindowStyleMaskFullScreen > 0 {
+ w.config.Mode = Fullscreen
+ } else {
+ w.config.Mode = Windowed
+ }
+}
+
+func (w *window) Configure(options []Option) {
+ screenScale := float32(C.getScreenBackingScale())
+ cfg := configFor(screenScale)
+ prev := w.config
+ w.updateWindowMode()
+ cnf := w.config
+ cnf.apply(cfg, options)
+ cnf.Size = cnf.Size.Div(int(screenScale))
+ cnf.MinSize = cnf.MinSize.Div(int(screenScale))
+ cnf.MaxSize = cnf.MaxSize.Div(int(screenScale))
+
+ if cnf.Mode != Fullscreen && prev.Size != cnf.Size {
+ w.config.Size = cnf.Size
+ C.setSize(w.window, C.CGFloat(cnf.Size.X), C.CGFloat(cnf.Size.Y))
+ }
+ if prev.MinSize != cnf.MinSize {
+ w.config.MinSize = cnf.MinSize
+ C.setMinSize(w.window, C.CGFloat(cnf.MinSize.X), C.CGFloat(cnf.MinSize.Y))
+ }
+ if prev.MaxSize != cnf.MaxSize {
+ w.config.MaxSize = cnf.MaxSize
+ C.setMaxSize(w.window, C.CGFloat(cnf.MaxSize.X), C.CGFloat(cnf.MaxSize.Y))
+ }
+
+ if prev.Title != cnf.Title {
+ w.config.Title = cnf.Title
+ title := C.CString(cnf.Title)
+ defer C.free(unsafe.Pointer(title))
+ C.setTitle(w.window, title)
+ }
+ if prev.Mode != cnf.Mode {
+ switch cnf.Mode {
+ case Windowed, Fullscreen:
+ w.config.Mode = cnf.Mode
+ C.toggleFullScreen(w.window)
+ }
+ }
+ if w.config != prev {
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+}
+
+func (w *window) SetCursor(name pointer.CursorName) {
+ w.cursor = windowSetCursor(w.cursor, name)
+}
+
+func (w *window) ShowTextInput(show bool) {}
+
+func (w *window) SetInputHint(_ key.InputHint) {}
+
+func (w *window) SetAnimating(anim bool) {
+ if anim {
+ w.displayLink.Start()
+ } else {
+ w.displayLink.Stop()
+ }
+}
+
+func (w *window) Raise() {
+ C.raiseWindow(w.window)
+}
+
+func (w *window) runOnMain(f func()) {
+ runOnMain(func() {
+ // Make sure the view is still valid. The window might've been closed
+ // during the switch to the main thread.
+ if w.view != 0 {
+ f()
+ }
+ })
+}
+
+func (w *window) Close() {
+ C.closeWindow(w.window)
+}
+
+// Maximize the window.
+func (w *window) Maximize() {
+ r := C.getScreenFrame(w.window) // the screen size of the window
+ C.setScreenFrame(w.window, C.CGFloat(0), C.CGFloat(0), r.size.width, r.size.height)
+}
+
+// Center the window.
+func (w *window) Center() {
+ r := C.getScreenFrame(w.window) // the screen size of the window
+
+ screenScale := float32(C.getScreenBackingScale())
+ sz := w.config.Size.Div(int(screenScale))
+ x := (int(r.size.width) - sz.X) / 2
+ y := (int(r.size.height) - sz.Y) / 2
+
+ C.setScreenFrame(w.window, C.CGFloat(x), C.CGFloat(y), C.CGFloat(sz.X), C.CGFloat(sz.Y))
+}
+
+func (w *window) setStage(stage system.Stage) {
+ if stage == w.stage {
+ return
+ }
+ w.stage = stage
+ w.w.Event(system.StageEvent{Stage: stage})
+}
+
+//export gio_onKeys
+func gio_onKeys(view C.CFTypeRef, cstr *C.char, ti C.double, mods C.NSUInteger, keyDown C.bool) {
+ str := C.GoString(cstr)
+ kmods := convertMods(mods)
+ ks := key.Release
+ if keyDown {
+ ks = key.Press
+ }
+ w := mustView(view)
+ for _, k := range str {
+ if n, ok := convertKey(k); ok {
+ w.w.Event(key.Event{
+ Name: n,
+ Modifiers: kmods,
+ State: ks,
+ })
+ }
+ }
+}
+
+//export gio_onText
+func gio_onText(view C.CFTypeRef, cstr *C.char) {
+ str := C.GoString(cstr)
+ w := mustView(view)
+ w.w.Event(key.EditEvent{Text: str})
+}
+
+//export gio_onMouse
+func gio_onMouse(view C.CFTypeRef, cdir C.int, cbtns C.NSUInteger, x, y, dx, dy C.CGFloat, ti C.double, mods C.NSUInteger) {
+ var typ pointer.Type
+ switch cdir {
+ case C.MOUSE_MOVE:
+ typ = pointer.Move
+ case C.MOUSE_UP:
+ typ = pointer.Release
+ case C.MOUSE_DOWN:
+ typ = pointer.Press
+ case C.MOUSE_SCROLL:
+ typ = pointer.Scroll
+ default:
+ panic("invalid direction")
+ }
+ var btns pointer.Buttons
+ if cbtns&(1<<0) != 0 {
+ btns |= pointer.ButtonPrimary
+ }
+ if cbtns&(1<<1) != 0 {
+ btns |= pointer.ButtonSecondary
+ }
+ if cbtns&(1<<2) != 0 {
+ btns |= pointer.ButtonTertiary
+ }
+ t := time.Duration(float64(ti)*float64(time.Second) + .5)
+ w := mustView(view)
+ xf, yf := float32(x)*w.scale, float32(y)*w.scale
+ dxf, dyf := float32(dx)*w.scale, float32(dy)*w.scale
+ w.w.Event(pointer.Event{
+ Type: typ,
+ Source: pointer.Mouse,
+ Time: t,
+ Buttons: btns,
+ Position: f32.Point{X: xf, Y: yf},
+ Scroll: f32.Point{X: dxf, Y: dyf},
+ Modifiers: convertMods(mods),
+ })
+}
+
+//export gio_onDraw
+func gio_onDraw(view C.CFTypeRef) {
+ w := mustView(view)
+ w.draw()
+}
+
+//export gio_onFocus
+func gio_onFocus(view C.CFTypeRef, focus C.int) {
+ w := mustView(view)
+ w.w.Event(key.FocusEvent{Focus: focus == 1})
+ w.SetCursor(w.cursor)
+}
+
+//export gio_onChangeScreen
+func gio_onChangeScreen(view C.CFTypeRef, did uint64) {
+ w := mustView(view)
+ w.displayLink.SetDisplayID(did)
+}
+
+func (w *window) draw() {
+ w.scale = float32(C.getViewBackingScale(w.view))
+ wf, hf := float32(C.viewWidth(w.view)), float32(C.viewHeight(w.view))
+ sz := image.Point{
+ X: int(wf*w.scale + .5),
+ Y: int(hf*w.scale + .5),
+ }
+ if sz != w.config.Size {
+ w.config.Size = sz
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+ if sz.X == 0 || sz.Y == 0 {
+ return
+ }
+ cfg := configFor(w.scale)
+ w.setStage(system.StageRunning)
+ w.w.Event(frameEvent{
+ FrameEvent: system.FrameEvent{
+ Now: time.Now(),
+ Size: w.config.Size,
+ Metric: cfg,
+ },
+ Sync: true,
+ })
+}
+
+func configFor(scale float32) unit.Metric {
+ return unit.Metric{
+ PxPerDp: scale,
+ PxPerSp: scale,
+ }
+}
+
+//export gio_onClose
+func gio_onClose(view C.CFTypeRef) {
+ w := mustView(view)
+ w.w.Event(ViewEvent{})
+ deleteView(view)
+ w.w.Event(system.DestroyEvent{})
+ w.displayLink.Close()
+ C.CFRelease(w.view)
+ C.CFRelease(w.window)
+ w.view = 0
+ w.window = 0
+ w.displayLink = nil
+}
+
+//export gio_onHide
+func gio_onHide(view C.CFTypeRef) {
+ w := mustView(view)
+ w.setStage(system.StagePaused)
+}
+
+//export gio_onShow
+func gio_onShow(view C.CFTypeRef) {
+ w := mustView(view)
+ w.setStage(system.StageRunning)
+}
+
+//export gio_onFullscreen
+func gio_onFullscreen(view C.CFTypeRef) {
+ w := mustView(view)
+ w.config.Mode = Fullscreen
+ w.w.Event(ConfigEvent{Config: w.config})
+}
+
+//export gio_onWindowed
+func gio_onWindowed(view C.CFTypeRef) {
+ w := mustView(view)
+ w.config.Mode = Windowed
+ w.w.Event(ConfigEvent{Config: w.config})
+}
+
+//export gio_onAppHide
+func gio_onAppHide() {
+ for _, w := range viewMap {
+ w.setStage(system.StagePaused)
+ }
+}
+
+//export gio_onAppShow
+func gio_onAppShow() {
+ for _, w := range viewMap {
+ w.setStage(system.StageRunning)
+ }
+}
+
+//export gio_onFinishLaunching
+func gio_onFinishLaunching() {
+ close(launched)
+}
+
+func newWindow(win *callbacks, options []Option) error {
+ <-launched
+ errch := make(chan error)
+ runOnMain(func() {
+ w, err := newOSWindow()
+ if err != nil {
+ errch <- err
+ return
+ }
+ errch <- nil
+ w.w = win
+ w.window = C.gio_createWindow(w.view, nil, 0, 0, 0, 0, 0, 0)
+ win.SetDriver(w)
+ w.Configure(options)
+ if nextTopLeft.x == 0 && nextTopLeft.y == 0 {
+ // cascadeTopLeftFromPoint treats (0, 0) as a no-op,
+ // and just returns the offset we need for the first window.
+ nextTopLeft = C.cascadeTopLeftFromPoint(w.window, nextTopLeft)
+ }
+ nextTopLeft = C.cascadeTopLeftFromPoint(w.window, nextTopLeft)
+ C.makeKeyAndOrderFront(w.window)
+ layer := C.layerForView(w.view)
+ w.w.Event(ViewEvent{View: uintptr(w.view), Layer: uintptr(layer)})
+ })
+ return <-errch
+}
+
+func newOSWindow() (*window, error) {
+ view := C.gio_createView()
+ if view == 0 {
+ return nil, errors.New("CreateWindow: failed to create view")
+ }
+ scale := float32(C.getViewBackingScale(view))
+ w := &window{
+ view: view,
+ scale: scale,
+ }
+ dl, err := NewDisplayLink(func() {
+ w.runOnMain(func() {
+ C.setNeedsDisplay(w.view)
+ })
+ })
+ w.displayLink = dl
+ if err != nil {
+ C.CFRelease(view)
+ return nil, err
+ }
+ insertView(view, w)
+ return w, nil
+}
+
+func osMain() {
+ C.gio_main()
+}
+
+func convertKey(k rune) (string, bool) {
+ var n string
+ switch k {
+ case 0x1b:
+ n = key.NameEscape
+ case C.NSLeftArrowFunctionKey:
+ n = key.NameLeftArrow
+ case C.NSRightArrowFunctionKey:
+ n = key.NameRightArrow
+ case C.NSUpArrowFunctionKey:
+ n = key.NameUpArrow
+ case C.NSDownArrowFunctionKey:
+ n = key.NameDownArrow
+ case 0xd:
+ n = key.NameReturn
+ case 0x3:
+ n = key.NameEnter
+ case C.NSHomeFunctionKey:
+ n = key.NameHome
+ case C.NSEndFunctionKey:
+ n = key.NameEnd
+ case 0x7f:
+ n = key.NameDeleteBackward
+ case C.NSDeleteFunctionKey:
+ n = key.NameDeleteForward
+ case C.NSPageUpFunctionKey:
+ n = key.NamePageUp
+ case C.NSPageDownFunctionKey:
+ n = key.NamePageDown
+ case C.NSF1FunctionKey:
+ n = "F1"
+ case C.NSF2FunctionKey:
+ n = "F2"
+ case C.NSF3FunctionKey:
+ n = "F3"
+ case C.NSF4FunctionKey:
+ n = "F4"
+ case C.NSF5FunctionKey:
+ n = "F5"
+ case C.NSF6FunctionKey:
+ n = "F6"
+ case C.NSF7FunctionKey:
+ n = "F7"
+ case C.NSF8FunctionKey:
+ n = "F8"
+ case C.NSF9FunctionKey:
+ n = "F9"
+ case C.NSF10FunctionKey:
+ n = "F10"
+ case C.NSF11FunctionKey:
+ n = "F11"
+ case C.NSF12FunctionKey:
+ n = "F12"
+ case 0x09, 0x19:
+ n = key.NameTab
+ case 0x20:
+ n = key.NameSpace
+ default:
+ k = unicode.ToUpper(k)
+ if !unicode.IsPrint(k) {
+ return "", false
+ }
+ n = string(k)
+ }
+ return n, true
+}
+
+func convertMods(mods C.NSUInteger) key.Modifiers {
+ var kmods key.Modifiers
+ if mods&C.NSAlternateKeyMask != 0 {
+ kmods |= key.ModAlt
+ }
+ if mods&C.NSControlKeyMask != 0 {
+ kmods |= key.ModCtrl
+ }
+ if mods&C.NSCommandKeyMask != 0 {
+ kmods |= key.ModCommand
+ }
+ if mods&C.NSShiftKeyMask != 0 {
+ kmods |= key.ModShift
+ }
+ return kmods
+}
+
+func (_ ViewEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/internal/window/os_macos.m b/vendor/gioui.org/app/os_macos.m
index b8c0dee..f65099b 100644
--- a/vendor/gioui.org/app/internal/window/os_macos.m
+++ b/vendor/gioui.org/app/os_macos.m
@@ -6,6 +6,8 @@
#include "_cgo_export.h"
+__attribute__ ((visibility ("hidden"))) CALayer *gio_layerFactory(void);
+
@interface GioAppDelegate : NSObject<NSApplicationDelegate>
@end
@@ -21,6 +23,14 @@
NSWindow *window = (NSWindow *)[notification object];
gio_onShow((__bridge CFTypeRef)window.contentView);
}
+- (void)windowWillEnterFullScreen:(NSNotification *)notification {
+ NSWindow *window = (NSWindow *)[notification object];
+ gio_onFullscreen((__bridge CFTypeRef)window.contentView);
+}
+- (void)windowWillExitFullScreen:(NSNotification *)notification {
+ NSWindow *window = (NSWindow *)[notification object];
+ gio_onWindowed((__bridge CFTypeRef)window.contentView);
+}
- (void)windowDidChangeScreen:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
CGDirectDisplayID dispID = [[[window screen] deviceDescription][@"NSScreenNumber"] unsignedIntValue];
@@ -29,11 +39,11 @@
}
- (void)windowDidBecomeKey:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
- gio_onFocus((__bridge CFTypeRef)window.contentView, YES);
+ gio_onFocus((__bridge CFTypeRef)window.contentView, 1);
}
- (void)windowDidResignKey:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
- gio_onFocus((__bridge CFTypeRef)window.contentView, NO);
+ gio_onFocus((__bridge CFTypeRef)window.contentView, 0);
}
- (void)windowWillClose:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
@@ -42,49 +52,92 @@
}
@end
-// Delegates are weakly referenced from their peers. Nothing
-// else holds a strong reference to our window delegate, so
-// keep a single global reference instead.
-static GioWindowDelegate *globalWindowDel;
-
-void gio_writeClipboard(unichar *chars, NSUInteger length) {
- @autoreleasepool {
- NSString *s = [NSString string];
- if (length > 0) {
- s = [NSString stringWithCharacters:chars length:length];
- }
- NSPasteboard *p = NSPasteboard.generalPasteboard;
- [p declareTypes:@[NSPasteboardTypeString] owner:nil];
- [p setString:s forType:NSPasteboardTypeString];
+static void handleMouse(NSView *view, NSEvent *event, int typ, CGFloat dx, CGFloat dy) {
+ NSPoint p = [view convertPoint:[event locationInWindow] fromView:nil];
+ if (!event.hasPreciseScrollingDeltas) {
+ // dx and dy are in rows and columns.
+ dx *= 10;
+ dy *= 10;
}
+ // Origin is in the lower left corner. Convert to upper left.
+ CGFloat height = view.bounds.size.height;
+ gio_onMouse((__bridge CFTypeRef)view, typ, [NSEvent pressedMouseButtons], p.x, height - p.y, dx, dy, [event timestamp], [event modifierFlags]);
}
-CFTypeRef gio_readClipboard(void) {
- @autoreleasepool {
- NSPasteboard *p = NSPasteboard.generalPasteboard;
- NSString *content = [p stringForType:NSPasteboardTypeString];
- return (__bridge_retained CFTypeRef)content;
- }
-}
+@interface GioView : NSView <CALayerDelegate>
+@end
-CGFloat gio_viewHeight(CFTypeRef viewRef) {
- NSView *view = (__bridge NSView *)viewRef;
- return [view bounds].size.height;
+@implementation GioView
+- (void)setFrameSize:(NSSize)newSize {
+ [super setFrameSize:newSize];
+ [self setNeedsDisplay:YES];
}
-
-CGFloat gio_viewWidth(CFTypeRef viewRef) {
- NSView *view = (__bridge NSView *)viewRef;
- return [view bounds].size.width;
+// drawRect is called when OpenGL is used, displayLayer otherwise.
+// Don't know why.
+- (void)drawRect:(NSRect)r {
+ gio_onDraw((__bridge CFTypeRef)self);
}
-
-CGFloat gio_getScreenBackingScale(void) {
- return [NSScreen.mainScreen backingScaleFactor];
+- (void)displayLayer:(CALayer *)layer {
+ layer.contentsScale = self.window.backingScaleFactor;
+ gio_onDraw((__bridge CFTypeRef)self);
}
-
-CGFloat gio_getViewBackingScale(CFTypeRef viewRef) {
- NSView *view = (__bridge NSView *)viewRef;
- return [view.window backingScaleFactor];
+- (CALayer *)makeBackingLayer {
+ CALayer *layer = gio_layerFactory();
+ layer.delegate = self;
+ return layer;
+}
+- (void)mouseDown:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_DOWN, 0, 0);
+}
+- (void)mouseUp:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_UP, 0, 0);
+}
+- (void)middleMouseDown:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_DOWN, 0, 0);
+}
+- (void)middletMouseUp:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_UP, 0, 0);
+}
+- (void)rightMouseDown:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_DOWN, 0, 0);
+}
+- (void)rightMouseUp:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_UP, 0, 0);
}
+- (void)mouseMoved:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_MOVE, 0, 0);
+}
+- (void)mouseDragged:(NSEvent *)event {
+ handleMouse(self, event, MOUSE_MOVE, 0, 0);
+}
+- (void)scrollWheel:(NSEvent *)event {
+ CGFloat dx = -event.scrollingDeltaX;
+ CGFloat dy = -event.scrollingDeltaY;
+ handleMouse(self, event, MOUSE_SCROLL, dx, dy);
+}
+- (void)keyDown:(NSEvent *)event {
+ NSString *keys = [event charactersIgnoringModifiers];
+ gio_onKeys((__bridge CFTypeRef)self, (char *)[keys UTF8String], [event timestamp], [event modifierFlags], true);
+ [self interpretKeyEvents:[NSArray arrayWithObject:event]];
+}
+- (void)keyUp:(NSEvent *)event {
+ NSString *keys = [event charactersIgnoringModifiers];
+ gio_onKeys((__bridge CFTypeRef)self, (char *)[keys UTF8String], [event timestamp], [event modifierFlags], false);
+}
+- (void)insertText:(id)string {
+ const char *utf8 = [string UTF8String];
+ gio_onText((__bridge CFTypeRef)self, (char *)utf8);
+}
+- (void)doCommandBySelector:(SEL)sel {
+ // Don't pass commands up the responder chain.
+ // They will end up in a beep.
+}
+@end
+
+// Delegates are weakly referenced from their peers. Nothing
+// else holds a strong reference to our window delegate, so
+// keep a single global reference instead.
+static GioWindowDelegate *globalWindowDel;
static CVReturn displayLinkCallback(CVDisplayLinkRef dl, const CVTimeStamp *inNow, const CVTimeStamp *inOutputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *displayLinkContext) {
gio_onFrameCallback(dl);
@@ -114,14 +167,47 @@ void gio_setDisplayLinkDisplay(CFTypeRef dl, uint64_t did) {
CVDisplayLinkSetCurrentCGDisplay((CVDisplayLinkRef)dl, (CGDirectDisplayID)did);
}
-NSPoint gio_cascadeTopLeftFromPoint(CFTypeRef windowRef, NSPoint topLeft) {
- NSWindow *window = (__bridge NSWindow *)windowRef;
- return [window cascadeTopLeftFromPoint:topLeft];
+void gio_hideCursor() {
+ @autoreleasepool {
+ [NSCursor hide];
+ }
+}
+
+void gio_showCursor() {
+ @autoreleasepool {
+ [NSCursor unhide];
+ }
}
-void gio_makeKeyAndOrderFront(CFTypeRef windowRef) {
- NSWindow *window = (__bridge NSWindow *)windowRef;
- [window makeKeyAndOrderFront:nil];
+void gio_setCursor(NSUInteger curID) {
+ @autoreleasepool {
+ switch (curID) {
+ case 1:
+ [NSCursor.arrowCursor set];
+ break;
+ case 2:
+ [NSCursor.IBeamCursor set];
+ break;
+ case 3:
+ [NSCursor.pointingHandCursor set];
+ break;
+ case 4:
+ [NSCursor.crosshairCursor set];
+ break;
+ case 5:
+ [NSCursor.resizeLeftRightCursor set];
+ break;
+ case 6:
+ [NSCursor.resizeUpDownCursor set];
+ break;
+ case 7:
+ [NSCursor.openHandCursor set];
+ break;
+ default:
+ [NSCursor.arrowCursor set];
+ break;
+ }
+ }
}
CFTypeRef gio_createWindow(CFTypeRef viewRef, const char *title, CGFloat width, CGFloat height, CGFloat minWidth, CGFloat minHeight, CGFloat maxWidth, CGFloat maxHeight) {
@@ -143,7 +229,9 @@ CFTypeRef gio_createWindow(CFTypeRef viewRef, const char *title, CGFloat width,
window.contentMaxSize = NSMakeSize(maxWidth, maxHeight);
}
[window setAcceptsMouseMovedEvents:YES];
- window.title = [NSString stringWithUTF8String: title];
+ if (title != nil) {
+ window.title = [NSString stringWithUTF8String: title];
+ }
NSView *view = (__bridge NSView *)viewRef;
[window setContentView:view];
[window makeFirstResponder:view];
@@ -153,14 +241,20 @@ CFTypeRef gio_createWindow(CFTypeRef viewRef, const char *title, CGFloat width,
}
}
-void gio_close(CFTypeRef windowRef) {
- NSWindow* window = (__bridge NSWindow *)windowRef;
- [window performClose:nil];
+CFTypeRef gio_createView(void) {
+ @autoreleasepool {
+ NSRect frame = NSMakeRect(0, 0, 0, 0);
+ GioView* view = [[GioView alloc] initWithFrame:frame];
+ view.wantsLayer = YES;
+ view.layerContentsRedrawPolicy = NSViewLayerContentsRedrawDuringViewResize;
+ return CFBridgingRetain(view);
+ }
}
@implementation GioAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
- [[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
+ [NSApp activateIgnoringOtherApps:YES];
gio_onFinishLaunching();
}
- (void)applicationDidHide:(NSNotification *)aNotification {
@@ -176,7 +270,6 @@ void gio_main() {
[NSApplication sharedApplication];
GioAppDelegate *del = [[GioAppDelegate alloc] init];
[NSApp setDelegate:del];
- [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
NSMenuItem *mainMenu = [NSMenuItem new];
diff --git a/vendor/gioui.org/app/os_unix.go b/vendor/gioui.org/app/os_unix.go
new file mode 100644
index 0000000..ee831b3
--- /dev/null
+++ b/vendor/gioui.org/app/os_unix.go
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build (linux && !android) || freebsd || openbsd
+// +build linux,!android freebsd openbsd
+
+package app
+
+import (
+ "errors"
+ "unsafe"
+)
+
+type ViewEvent struct {
+ // Display is a pointer to the X11 Display created by XOpenDisplay.
+ Display unsafe.Pointer
+ // Window is the X11 window ID as returned by XCreateWindow.
+ Window uintptr
+}
+
+func osMain() {
+ select {}
+}
+
+type windowDriver func(*callbacks, []Option) error
+
+// Instead of creating files with build tags for each combination of wayland +/- x11
+// let each driver initialize these variables with their own version of createWindow.
+var wlDriver, x11Driver windowDriver
+
+func newWindow(window *callbacks, options []Option) error {
+ var errFirst error
+ for _, d := range []windowDriver{x11Driver, wlDriver} {
+ if d == nil {
+ continue
+ }
+ err := d(window, options)
+ if err == nil {
+ return nil
+ }
+ if errFirst == nil {
+ errFirst = err
+ }
+ }
+ if errFirst != nil {
+ return errFirst
+ }
+ return errors.New("app: no window driver available")
+}
+
+func (_ ViewEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/internal/window/os_wayland.c b/vendor/gioui.org/app/os_wayland.c
index 5c1c075..b137e1f 100644
--- a/vendor/gioui.org/app/internal/window/os_wayland.c
+++ b/vendor/gioui.org/app/os_wayland.c
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: Unlicense OR MIT
-// +build linux,!android,!nowayland freebsd
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
#include <wayland-client.h>
#include "wayland_xdg_shell.h"
diff --git a/vendor/gioui.org/app/internal/window/os_wayland.go b/vendor/gioui.org/app/os_wayland.go
index 4a456ce..ac7aa17 100644
--- a/vendor/gioui.org/app/internal/window/os_wayland.go
+++ b/vendor/gioui.org/app/os_wayland.go
@@ -1,8 +1,10 @@
// SPDX-License-Identifier: Unlicense OR MIT
-// +build linux,!android,!nowayland freebsd
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
-package window
+package app
import (
"bytes"
@@ -19,14 +21,16 @@ import (
"time"
"unsafe"
+ syscall "golang.org/x/sys/unix"
+
"gioui.org/app/internal/xkb"
"gioui.org/f32"
"gioui.org/internal/fling"
+ "gioui.org/io/clipboard"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
"gioui.org/unit"
- syscall "golang.org/x/sys/unix"
)
// Use wayland-scanner to generate glue code for the xdg-shell and xdg-decoration extensions.
@@ -39,9 +43,9 @@ import (
//go:generate wayland-scanner client-header /usr/share/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml wayland_xdg_decoration.h
//go:generate wayland-scanner private-code /usr/share/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml wayland_xdg_decoration.c
-//go:generate sed -i "1s;^;// +build linux,!android,!nowayland freebsd\\n\\n;" wayland_xdg_shell.c
-//go:generate sed -i "1s;^;// +build linux,!android,!nowayland freebsd\\n\\n;" wayland_xdg_decoration.c
-//go:generate sed -i "1s;^;// +build linux,!android,!nowayland freebsd\\n\\n;" wayland_text_input.c
+//go:generate sed -i "1s;^;//go:build ((linux \\&\\& !android) || freebsd) \\&\\& !nowayland\\n// +build linux,!android freebsd\\n// +build !nowayland\\n\\n;" wayland_xdg_shell.c
+//go:generate sed -i "1s;^;//go:build ((linux \\&\\& !android) || freebsd) \\&\\& !nowayland\\n// +build linux,!android freebsd\\n// +build !nowayland\\n\\n;" wayland_xdg_decoration.c
+//go:generate sed -i "1s;^;//go:build ((linux \\&\\& !android) || freebsd) \\&\\& !nowayland\\n// +build linux,!android freebsd\\n// +build !nowayland\\n\\n;" wayland_text_input.c
/*
#cgo linux pkg-config: wayland-client wayland-cursor
@@ -133,7 +137,7 @@ type repeatState struct {
delay time.Duration
key uint32
- win Callbacks
+ win *callbacks
stopC chan struct{}
start time.Duration
@@ -143,7 +147,7 @@ type repeatState struct {
}
type window struct {
- w Callbacks
+ w *callbacks
disp *wlDisplay
surf *C.struct_wl_surface
wmSurf *C.struct_xdg_surface
@@ -177,19 +181,17 @@ type window struct {
dead bool
lastFrameCallback *C.struct_wl_callback
- mu sync.Mutex
animating bool
needAck bool
// The most recent configure serial waiting to be ack'ed.
serial C.uint32_t
- width int
- height int
newScale bool
scale int
- // readClipboard tracks whether a ClipboardEvent is requested.
- readClipboard bool
- // writeClipboard is set whenever a clipboard write is requested.
- writeClipboard *string
+ // size is the unscaled window size (unlike config.Size which is scaled).
+ size image.Point
+ config Config
+
+ wakeups chan struct{}
}
type poller struct {
@@ -218,25 +220,34 @@ var callbackMap sync.Map
// order of preference.
var clipboardMimeTypes = []string{"text/plain;charset=utf8", "UTF8_STRING", "text/plain", "TEXT", "STRING"}
+var (
+ newWaylandEGLContext func(w *window) (context, error)
+ newWaylandVulkanContext func(w *window) (context, error)
+)
+
func init() {
wlDriver = newWLWindow
}
-func newWLWindow(window Callbacks, opts *Options) error {
+func newWLWindow(callbacks *callbacks, options []Option) error {
d, err := newWLDisplay()
if err != nil {
return err
}
- w, err := d.createNativeWindow(opts)
+ w, err := d.createNativeWindow(options)
if err != nil {
d.destroy()
return err
}
- w.w = window
+ w.w = callbacks
go func() {
defer d.destroy()
defer w.destroy()
+
w.w.SetDriver(w)
+ // Finish and commit setup from createNativeWindow.
+ w.Configure(options)
+ C.wl_surface_commit(w.surf)
if err := w.loop(); err != nil {
panic(err)
}
@@ -280,13 +291,16 @@ func (d *wlDisplay) readClipboard() (io.ReadCloser, error) {
if err != nil {
return nil, err
}
+ // wl_data_offer_receive performs and implicit dup(2) of the write end
+ // of the pipe. Close our version.
+ defer w.Close()
cmimeType := C.CString(s.mimeType)
defer C.free(unsafe.Pointer(cmimeType))
C.wl_data_offer_receive(s.clipboard, cmimeType, C.int(w.Fd()))
return r, nil
}
-func (d *wlDisplay) createNativeWindow(opts *Options) (*window, error) {
+func (d *wlDisplay) createNativeWindow(options []Option) (*window, error) {
if d.compositor == nil {
return nil, errors.New("wayland: no compositor available")
}
@@ -313,6 +327,7 @@ func (d *wlDisplay) createNativeWindow(opts *Options) (*window, error) {
newScale: scale != 1,
ppdp: ppdp,
ppsp: ppdp,
+ wakeups: make(chan struct{}, 1),
}
w.surf = C.wl_compositor_create_surface(d.compositor)
if w.surf == nil {
@@ -351,20 +366,13 @@ func (d *wlDisplay) createNativeWindow(opts *Options) (*window, error) {
C.wl_surface_add_listener(w.surf, &C.gio_surface_listener, unsafe.Pointer(w.surf))
C.xdg_surface_add_listener(w.wmSurf, &C.gio_xdg_surface_listener, unsafe.Pointer(w.surf))
C.xdg_toplevel_add_listener(w.topLvl, &C.gio_xdg_toplevel_listener, unsafe.Pointer(w.surf))
- title := C.CString(opts.Title)
- C.xdg_toplevel_set_title(w.topLvl, title)
- C.free(unsafe.Pointer(title))
- _, _, cfg := w.config()
- w.width = cfg.Px(opts.Width)
- w.height = cfg.Px(opts.Height)
if d.decor != nil {
// Request server side decorations.
w.decor = C.zxdg_decoration_manager_v1_get_toplevel_decoration(d.decor, w.topLvl)
C.zxdg_toplevel_decoration_v1_set_mode(w.decor, C.ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE)
}
w.updateOpaqueRegion()
- C.wl_surface_commit(w.surf)
return w, nil
}
@@ -471,10 +479,8 @@ func gio_onSeatName(data unsafe.Pointer, seat *C.struct_wl_seat, name *C.char) {
//export gio_onXdgSurfaceConfigure
func gio_onXdgSurfaceConfigure(data unsafe.Pointer, wmSurf *C.struct_xdg_surface, serial C.uint32_t) {
w := callbackLoad(data).(*window)
- w.mu.Lock()
w.serial = serial
w.needAck = true
- w.mu.Unlock()
w.setStage(system.StageRunning)
w.draw(true)
}
@@ -489,10 +495,7 @@ func gio_onToplevelClose(data unsafe.Pointer, topLvl *C.struct_xdg_toplevel) {
func gio_onToplevelConfigure(data unsafe.Pointer, topLvl *C.struct_xdg_toplevel, width, height C.int32_t, states *C.struct_wl_array) {
w := callbackLoad(data).(*window)
if width != 0 && height != 0 {
- w.mu.Lock()
- defer w.mu.Unlock()
- w.width = int(width)
- w.height = int(height)
+ w.size = image.Pt(int(width), int(height))
w.updateOpaqueRegion()
}
}
@@ -584,10 +587,11 @@ func gio_onRegistryGlobal(data unsafe.Pointer, reg *C.struct_wl_registry, name C
break
}
d.seat = &wlSeat{
- disp: d,
- name: name,
- seat: s,
- offers: make(map[*C.struct_wl_data_offer][]string),
+ disp: d,
+ name: name,
+ seat: s,
+ offers: make(map[*C.struct_wl_data_offer][]string),
+ touchFoci: make(map[C.int32_t]*window),
}
callbackStore(unsafe.Pointer(s), d.seat)
C.wl_seat_add_listener(s, &C.gio_seat_listener, unsafe.Pointer(s))
@@ -763,16 +767,7 @@ func gio_onPointerEnter(data unsafe.Pointer, pointer *C.struct_wl_pointer, seria
s.serial = serial
w := callbackLoad(unsafe.Pointer(surf)).(*window)
s.pointerFocus = w
- // Get images[0].
- img := *w.cursor.cursor.images
- buf := C.wl_cursor_image_get_buffer(img)
- if buf == nil {
- return
- }
- C.wl_pointer_set_cursor(pointer, serial, w.cursor.surf, C.int32_t(img.hotspot_x), C.int32_t(img.hotspot_y))
- C.wl_surface_attach(w.cursor.surf, buf, 0, 0)
- C.wl_surface_damage(w.cursor.surf, 0, 0, C.int32_t(img.width), C.int32_t(img.height))
- C.wl_surface_commit(w.cursor.surf)
+ w.setCursor(pointer, serial)
w.lastPos = f32.Point{X: fromFixed(x), Y: fromFixed(y)}
}
@@ -804,11 +799,11 @@ func gio_onPointerButton(data unsafe.Pointer, p *C.struct_wl_pointer, serial, t,
var btn pointer.Buttons
switch wbtn {
case BTN_LEFT:
- btn = pointer.ButtonLeft
+ btn = pointer.ButtonPrimary
case BTN_RIGHT:
- btn = pointer.ButtonRight
+ btn = pointer.ButtonSecondary
case BTN_MIDDLE:
- btn = pointer.ButtonMiddle
+ btn = pointer.ButtonTertiary
default:
return
}
@@ -867,15 +862,13 @@ func (w *window) flushFling() {
w.fling.xExtrapolation = fling.Extrapolation{}
w.fling.yExtrapolation = fling.Extrapolation{}
vel := float32(math.Sqrt(float64(estx.Velocity*estx.Velocity + esty.Velocity*esty.Velocity)))
- _, _, c := w.config()
+ _, c := w.getConfig()
if !w.fling.anim.Start(c, time.Now(), vel) {
return
}
invDist := 1 / vel
w.fling.dir.X = estx.Velocity * invDist
w.fling.dir.Y = esty.Velocity * invDist
- // Wake up the window loop.
- w.disp.wakeup()
}
//export gio_onPointerAxisSource
@@ -903,17 +896,94 @@ func gio_onPointerAxisDiscrete(data unsafe.Pointer, p *C.struct_wl_pointer, axis
}
func (w *window) ReadClipboard() {
- w.mu.Lock()
- w.readClipboard = true
- w.mu.Unlock()
- w.disp.wakeup()
+ r, err := w.disp.readClipboard()
+ // Send empty responses on unavailable clipboards or errors.
+ if r == nil || err != nil {
+ w.w.Event(clipboard.Event{})
+ return
+ }
+ // Don't let slow clipboard transfers block event loop.
+ go func() {
+ defer r.Close()
+ data, _ := ioutil.ReadAll(r)
+ w.w.Event(clipboard.Event{Text: string(data)})
+ }()
}
func (w *window) WriteClipboard(s string) {
- w.mu.Lock()
- w.writeClipboard = &s
- w.mu.Unlock()
- w.disp.wakeup()
+ w.disp.writeClipboard([]byte(s))
+}
+
+func (w *window) Configure(options []Option) {
+ _, cfg := w.getConfig()
+ prev := w.config
+ cnf := w.config
+ cnf.apply(cfg, options)
+ if prev.Size != cnf.Size {
+ w.size = image.Pt(cnf.Size.X/w.scale, cnf.Size.Y/w.scale)
+ w.config.Size = cnf.Size
+ }
+ if prev.Title != cnf.Title {
+ w.config.Title = cnf.Title
+ title := C.CString(cnf.Title)
+ C.xdg_toplevel_set_title(w.topLvl, title)
+ C.free(unsafe.Pointer(title))
+ }
+ if w.config != prev {
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+}
+
+func (w *window) Raise() {}
+
+func (w *window) SetCursor(name pointer.CursorName) {
+ ptr := w.disp.seat.pointer
+ if ptr == nil {
+ return
+ }
+ if name == pointer.CursorNone {
+ C.wl_pointer_set_cursor(ptr, w.serial, nil, 0, 0)
+ return
+ }
+ switch name {
+ default:
+ fallthrough
+ case pointer.CursorDefault:
+ name = "left_ptr"
+ case pointer.CursorText:
+ name = "xterm"
+ case pointer.CursorPointer:
+ name = "hand1"
+ case pointer.CursorCrossHair:
+ name = "crosshair"
+ case pointer.CursorRowResize:
+ name = "top_side"
+ case pointer.CursorColResize:
+ name = "left_side"
+ case pointer.CursorGrab:
+ name = "hand1"
+ }
+ cname := C.CString(string(name))
+ defer C.free(unsafe.Pointer(cname))
+ c := C.wl_cursor_theme_get_cursor(w.cursor.theme, cname)
+ if c == nil {
+ return
+ }
+ w.cursor.cursor = c
+ w.setCursor(ptr, w.serial)
+}
+
+func (w *window) setCursor(pointer *C.struct_wl_pointer, serial C.uint32_t) {
+ // Get images[0].
+ img := *w.cursor.cursor.images
+ buf := C.wl_cursor_image_get_buffer(img)
+ if buf == nil {
+ return
+ }
+ C.wl_pointer_set_cursor(pointer, serial, w.cursor.surf, C.int32_t(img.hotspot_x), C.int32_t(img.hotspot_y))
+ C.wl_surface_attach(w.cursor.surf, buf, 0, 0)
+ C.wl_surface_damage(w.cursor.surf, 0, 0, C.int32_t(img.width), C.int32_t(img.height))
+ C.wl_surface_commit(w.cursor.surf)
}
func (w *window) resetFling() {
@@ -963,13 +1033,14 @@ func gio_onKeyboardKey(data unsafe.Pointer, keyboard *C.struct_wl_keyboard, seri
t := time.Duration(timestamp) * time.Millisecond
s.disp.repeat.Stop(t)
w.resetFling()
- if state != C.WL_KEYBOARD_KEY_STATE_PRESSED {
- return
- }
kc := mapXKBKeycode(uint32(keyCode))
- for _, e := range w.disp.xkb.DispatchKey(kc) {
+ ks := mapXKBKeyState(uint32(state))
+ for _, e := range w.disp.xkb.DispatchKey(kc, ks) {
w.w.Event(e)
}
+ if state != C.WL_KEYBOARD_KEY_STATE_PRESSED {
+ return
+ }
if w.disp.xkb.IsRepeatKey(kc) {
w.disp.repeat.Start(w, kc, t)
}
@@ -980,6 +1051,15 @@ func mapXKBKeycode(keyCode uint32) uint32 {
return keyCode + 8
}
+func mapXKBKeyState(state uint32) key.State {
+ switch state {
+ case C.WL_KEYBOARD_KEY_STATE_RELEASED:
+ return key.Release
+ default:
+ return key.Press
+ }
+}
+
func (r *repeatState) Start(w *window, keyCode uint32, t time.Duration) {
if r.rate <= 0 {
return
@@ -1045,7 +1125,7 @@ func (r *repeatState) Repeat(d *wlDisplay) {
if r.last+delay > now {
break
}
- for _, e := range d.xkb.DispatchKey(r.key) {
+ for _, e := range d.xkb.DispatchKey(r.key, key.Press) {
r.win.Event(e)
}
r.last += delay
@@ -1068,43 +1148,21 @@ func (w *window) loop() error {
if err := w.disp.dispatch(&p); err != nil {
return err
}
+ select {
+ case <-w.wakeups:
+ w.w.Event(wakeupEvent{})
+ default:
+ }
if w.dead {
w.w.Event(system.DestroyEvent{})
break
}
- w.process()
+ // pass false to skip unnecessary drawing.
+ w.draw(false)
}
return nil
}
-func (w *window) process() {
- w.mu.Lock()
- readClipboard := w.readClipboard
- writeClipboard := w.writeClipboard
- w.readClipboard = false
- w.writeClipboard = nil
- w.mu.Unlock()
- if readClipboard {
- r, err := w.disp.readClipboard()
- // Send empty responses on unavailable clipboards or errors.
- if r == nil || err != nil {
- w.w.Event(system.ClipboardEvent{})
- return
- }
- // Don't let slow clipboard transfers block event loop.
- go func() {
- defer r.Close()
- data, _ := ioutil.ReadAll(r)
- w.w.Event(system.ClipboardEvent{Text: string(data)})
- }()
- }
- if writeClipboard != nil {
- w.disp.writeClipboard([]byte(*writeClipboard))
- }
- // pass false to skip unnecessary drawing.
- w.draw(false)
-}
-
func (d *wlDisplay) dispatch(p *poller) error {
dispfd := C.wl_display_get_fd(d.disp)
// Poll for events and notifications.
@@ -1147,11 +1205,16 @@ func (d *wlDisplay) dispatch(p *poller) error {
return nil
}
+func (w *window) Wakeup() {
+ select {
+ case w.wakeups <- struct{}{}:
+ default:
+ }
+ w.disp.wakeup()
+}
+
func (w *window) SetAnimating(anim bool) {
- w.mu.Lock()
w.animating = anim
- w.mu.Unlock()
- w.disp.wakeup()
}
// Wakeup wakes up the event loop through the notification pipe.
@@ -1322,7 +1385,7 @@ func (w *window) onPointerMotion(x, y C.wl_fixed_t, t C.uint32_t) {
func (w *window) updateOpaqueRegion() {
reg := C.wl_compositor_create_region(w.disp.compositor)
- C.wl_region_add(reg, 0, 0, C.int32_t(w.width), C.int32_t(w.height))
+ C.wl_region_add(reg, 0, 0, C.int32_t(w.size.X), C.int32_t(w.size.Y))
C.wl_surface_set_opaque_region(w.surf, reg)
C.wl_region_destroy(reg)
}
@@ -1340,12 +1403,10 @@ func (w *window) updateOutputs() {
}
}
}
- w.mu.Lock()
if found && scale != w.scale {
w.scale = scale
w.newScale = true
}
- w.mu.Unlock()
if !found {
w.setStage(system.StagePaused)
} else {
@@ -1354,9 +1415,9 @@ func (w *window) updateOutputs() {
}
}
-func (w *window) config() (int, int, unit.Metric) {
- width, height := w.width*w.scale, w.height*w.scale
- return width, height, unit.Metric{
+func (w *window) getConfig() (image.Point, unit.Metric) {
+ size := w.size.Mul(w.scale)
+ return size, unit.Metric{
PxPerDp: w.ppdp * float32(w.scale),
PxPerSp: w.ppsp * float32(w.scale),
}
@@ -1364,14 +1425,16 @@ func (w *window) config() (int, int, unit.Metric) {
func (w *window) draw(sync bool) {
w.flushScroll()
- w.mu.Lock()
anim := w.animating || w.fling.anim.Active()
dead := w.dead
- w.mu.Unlock()
if dead || (!anim && !sync) {
return
}
- width, height, cfg := w.config()
+ size, cfg := w.getConfig()
+ if size != w.config.Size {
+ w.config.Size = size
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
if cfg == (unit.Metric{}) {
return
}
@@ -1380,13 +1443,10 @@ func (w *window) draw(sync bool) {
// Use the surface as listener data for gio_onFrameDone.
C.wl_callback_add_listener(w.lastFrameCallback, &C.gio_callback_listener, unsafe.Pointer(w.surf))
}
- w.w.Event(FrameEvent{
+ w.w.Event(frameEvent{
FrameEvent: system.FrameEvent{
- Now: time.Now(),
- Size: image.Point{
- X: width,
- Y: height,
- },
+ Now: time.Now(),
+ Size: w.config.Size,
Metric: cfg,
},
Sync: sync,
@@ -1398,7 +1458,7 @@ func (w *window) setStage(s system.Stage) {
return
}
w.stage = s
- w.w.Event(system.StageEvent{s})
+ w.w.Event(system.StageEvent{Stage: s})
}
func (w *window) display() *C.struct_wl_display {
@@ -1410,18 +1470,50 @@ func (w *window) surface() (*C.struct_wl_surface, int, int) {
C.xdg_surface_ack_configure(w.wmSurf, w.serial)
w.needAck = false
}
- width, height, scale := w.width, w.height, w.scale
if w.newScale {
- C.wl_surface_set_buffer_scale(w.surf, C.int32_t(scale))
+ C.wl_surface_set_buffer_scale(w.surf, C.int32_t(w.scale))
w.newScale = false
}
- return w.surf, width * scale, height * scale
+ sz, _ := w.getConfig()
+ return w.surf, sz.X, sz.Y
}
func (w *window) ShowTextInput(show bool) {}
-// Close the window. Not implemented for Wayland.
-func (w *window) Close() {}
+func (w *window) SetInputHint(_ key.InputHint) {}
+
+// Close the window.
+func (w *window) Close() {
+ w.dead = true
+}
+
+// Maximize the window. Not implemented for Wayland.
+func (w *window) Maximize() {}
+
+// Center the window. Not implemented for Wayland.
+func (w *window) Center() {}
+
+func (w *window) NewContext() (context, error) {
+ var firstErr error
+ if f := newWaylandVulkanContext; f != nil {
+ c, err := f(w)
+ if err == nil {
+ return c, nil
+ }
+ firstErr = err
+ }
+ if f := newWaylandEGLContext; f != nil {
+ c, err := f(w)
+ if err == nil {
+ return c, nil
+ }
+ firstErr = err
+ }
+ if firstErr != nil {
+ return nil, firstErr
+ }
+ return nil, errors.New("wayland: no available GPU backends")
+}
// detectUIScale reports the system UI scale, or 1.0 if it fails.
func detectUIScale() float32 {
diff --git a/vendor/gioui.org/app/internal/window/os_windows.go b/vendor/gioui.org/app/os_windows.go
index 247f10a..ecbffb4 100644
--- a/vendor/gioui.org/app/internal/window/os_windows.go
+++ b/vendor/gioui.org/app/os_windows.go
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
-package window
+package app
import (
"errors"
@@ -13,23 +13,23 @@ import (
"sync"
"time"
"unicode"
- "unicode/utf16"
"unsafe"
syscall "golang.org/x/sys/windows"
"gioui.org/app/internal/windows"
"gioui.org/unit"
+ gowindows "golang.org/x/sys/windows"
"gioui.org/f32"
+ "gioui.org/io/clipboard"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
)
-type winConstraints struct {
- minWidth, minHeight int32
- maxWidth, maxHeight int32
+type ViewEvent struct {
+ HWND uintptr
}
type winDeltas struct {
@@ -40,69 +40,80 @@ type winDeltas struct {
type window struct {
hwnd syscall.Handle
hdc syscall.Handle
- w Callbacks
- width int
- height int
+ w *callbacks
stage system.Stage
- dead bool
pointerBtns pointer.Buttons
- mu sync.Mutex
+ // cursorIn tracks whether the cursor was inside the window according
+ // to the most recent WM_SETCURSOR.
+ cursorIn bool
+ cursor syscall.Handle
+
+ // placement saves the previous window position when in full screen mode.
+ placement *windows.WindowPlacement
+
animating bool
- minmax winConstraints
deltas winDeltas
- opts *Options
+ config Config
}
-const _WM_REDRAW = windows.WM_USER + 0
+const _WM_WAKEUP = windows.WM_USER + iota
type gpuAPI struct {
priority int
- initializer func(w *window) (Context, error)
+ initializer func(w *window) (context, error)
}
-// backends is the list of potential Context
-// implementations.
-var backends []gpuAPI
+// drivers is the list of potential Context implementations.
+var drivers []gpuAPI
// winMap maps win32 HWNDs to *windows.
var winMap sync.Map
+// iconID is the ID of the icon in the resource file.
+const iconID = 1
+
var resources struct {
once sync.Once
// handle is the module handle from GetModuleHandle.
handle syscall.Handle
// class is the Gio window class from RegisterClassEx.
class uint16
- // cursor is the arrow cursor resource
+ // cursor is the arrow cursor resource.
cursor syscall.Handle
}
-func Main() {
+func osMain() {
select {}
}
-func NewWindow(window Callbacks, opts *Options) error {
+func newWindow(window *callbacks, options []Option) error {
cerr := make(chan error)
go func() {
- // Call win32 API from a single OS thread.
+ // GetMessage and PeekMessage can filter on a window HWND, but
+ // then thread-specific messages such as WM_QUIT are ignored.
+ // Instead lock the thread so window messages arrive through
+ // unfiltered GetMessage calls.
runtime.LockOSThread()
- w, err := createNativeWindow(opts)
+ w, err := createNativeWindow()
if err != nil {
cerr <- err
return
}
- defer w.destroy()
cerr <- nil
winMap.Store(w.hwnd, w)
defer winMap.Delete(w.hwnd)
w.w = window
w.w.SetDriver(w)
- defer w.w.Event(system.DestroyEvent{})
+ w.w.Event(ViewEvent{HWND: uintptr(w.hwnd)})
+ w.Configure(options)
windows.ShowWindow(w.hwnd, windows.SW_SHOWDEFAULT)
windows.SetForegroundWindow(w.hwnd)
windows.SetFocus(w.hwnd)
+ // Since the window class for the cursor is null,
+ // set it here to show the cursor.
+ w.SetCursor(pointer.CursorDefault)
if err := w.loop(); err != nil {
panic(err)
}
@@ -118,17 +129,18 @@ func initResources() error {
return err
}
resources.handle = hInst
- curs, err := windows.LoadCursor(windows.IDC_ARROW)
+ c, err := windows.LoadCursor(windows.IDC_ARROW)
if err != nil {
return err
}
- resources.cursor = curs
+ resources.cursor = c
+ icon, _ := windows.LoadImage(hInst, iconID, windows.IMAGE_ICON, 0, 0, windows.LR_DEFAULTSIZE|windows.LR_SHARED)
wcls := windows.WndClassEx{
CbSize: uint32(unsafe.Sizeof(windows.WndClassEx{})),
Style: windows.CS_HREDRAW | windows.CS_VREDRAW | windows.CS_OWNDC,
LpfnWndProc: syscall.NewCallback(windowProc),
HInstance: hInst,
- HCursor: curs,
+ HIcon: icon,
LpszClassName: syscall.StringToUTF16Ptr("GioWindow"),
}
cls, err := windows.RegisterClassEx(&wcls)
@@ -139,16 +151,7 @@ func initResources() error {
return nil
}
-func getWindowConstraints(cfg unit.Metric, opts *Options, d winDeltas) winConstraints {
- var minmax winConstraints
- minmax.minWidth = int32(cfg.Px(opts.MinWidth))
- minmax.minHeight = int32(cfg.Px(opts.MinHeight))
- minmax.maxWidth = int32(cfg.Px(opts.MaxWidth))
- minmax.maxHeight = int32(cfg.Px(opts.MaxHeight))
- return minmax
-}
-
-func createNativeWindow(opts *Options) (*window, error) {
+func createNativeWindow() (*window, error) {
var resErr error
resources.once.Do(func() {
resErr = initResources()
@@ -156,28 +159,15 @@ func createNativeWindow(opts *Options) (*window, error) {
if resErr != nil {
return nil, resErr
}
- cfg := configForDC()
- wr := windows.Rect{
- Right: int32(cfg.Px(opts.Width)),
- Bottom: int32(cfg.Px(opts.Height)),
- }
dwStyle := uint32(windows.WS_OVERLAPPEDWINDOW)
dwExStyle := uint32(windows.WS_EX_APPWINDOW | windows.WS_EX_WINDOWEDGE)
- deltas := winDeltas{
- width: wr.Right,
- height: wr.Bottom,
- }
- windows.AdjustWindowRectEx(&wr, dwStyle, 0, dwExStyle)
- deltas.width = wr.Right - wr.Left - deltas.width
- deltas.height = wr.Bottom - wr.Top - deltas.height
hwnd, err := windows.CreateWindowEx(dwExStyle,
resources.class,
- opts.Title,
+ "",
dwStyle|windows.WS_CLIPSIBLINGS|windows.WS_CLIPCHILDREN,
windows.CW_USEDEFAULT, windows.CW_USEDEFAULT,
- wr.Right-wr.Left,
- wr.Bottom-wr.Top,
+ windows.CW_USEDEFAULT, windows.CW_USEDEFAULT,
0,
0,
resources.handle,
@@ -186,10 +176,7 @@ func createNativeWindow(opts *Options) (*window, error) {
return nil, err
}
w := &window{
- hwnd: hwnd,
- minmax: getWindowConstraints(cfg, opts, deltas),
- deltas: deltas,
- opts: opts,
+ hwnd: hwnd,
}
w.hdc, err = windows.GetDC(hwnd)
if err != nil {
@@ -210,7 +197,7 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
case windows.WM_UNICHAR:
if wParam == windows.UNICODE_NOCHAR {
// Tell the system that we accept WM_UNICHAR messages.
- return 1
+ return windows.TRUE
}
fallthrough
case windows.WM_CHAR:
@@ -218,29 +205,44 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
w.w.Event(key.EditEvent{Text: string(r)})
}
// The message is processed.
- return 1
+ return windows.TRUE
case windows.WM_DPICHANGED:
// Let Windows know we're prepared for runtime DPI changes.
- return 1
+ return windows.TRUE
case windows.WM_ERASEBKGND:
// Avoid flickering between GPU content and background color.
- return 1
- case windows.WM_KEYDOWN, windows.WM_SYSKEYDOWN:
+ return windows.TRUE
+ case windows.WM_KEYDOWN, windows.WM_KEYUP, windows.WM_SYSKEYDOWN, windows.WM_SYSKEYUP:
if n, ok := convertKeyCode(wParam); ok {
- w.w.Event(key.Event{Name: n, Modifiers: getModifiers()})
+ e := key.Event{
+ Name: n,
+ Modifiers: getModifiers(),
+ State: key.Press,
+ }
+ if msg == windows.WM_KEYUP || msg == windows.WM_SYSKEYUP {
+ e.State = key.Release
+ }
+
+ w.w.Event(e)
+
+ if (wParam == windows.VK_F10) && (msg == windows.WM_SYSKEYDOWN || msg == windows.WM_SYSKEYUP) {
+ // Reserve F10 for ourselves, and don't let it open the system menu. Other Windows programs
+ // such as cmd.exe and graphical debuggers also reserve F10.
+ return 0
+ }
}
case windows.WM_LBUTTONDOWN:
- w.pointerButton(pointer.ButtonLeft, true, lParam, getModifiers())
+ w.pointerButton(pointer.ButtonPrimary, true, lParam, getModifiers())
case windows.WM_LBUTTONUP:
- w.pointerButton(pointer.ButtonLeft, false, lParam, getModifiers())
+ w.pointerButton(pointer.ButtonPrimary, false, lParam, getModifiers())
case windows.WM_RBUTTONDOWN:
- w.pointerButton(pointer.ButtonRight, true, lParam, getModifiers())
+ w.pointerButton(pointer.ButtonSecondary, true, lParam, getModifiers())
case windows.WM_RBUTTONUP:
- w.pointerButton(pointer.ButtonRight, false, lParam, getModifiers())
+ w.pointerButton(pointer.ButtonSecondary, false, lParam, getModifiers())
case windows.WM_MBUTTONDOWN:
- w.pointerButton(pointer.ButtonMiddle, true, lParam, getModifiers())
+ w.pointerButton(pointer.ButtonTertiary, true, lParam, getModifiers())
case windows.WM_MBUTTONUP:
- w.pointerButton(pointer.ButtonMiddle, false, lParam, getModifiers())
+ w.pointerButton(pointer.ButtonTertiary, false, lParam, getModifiers())
case windows.WM_CANCELMODE:
w.w.Event(pointer.Event{
Type: pointer.Cancel,
@@ -260,9 +262,19 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
Time: windows.GetMessageTime(),
})
case windows.WM_MOUSEWHEEL:
- w.scrollEvent(wParam, lParam)
+ w.scrollEvent(wParam, lParam, false)
+ case windows.WM_MOUSEHWHEEL:
+ w.scrollEvent(wParam, lParam, true)
case windows.WM_DESTROY:
- w.dead = true
+ w.w.Event(ViewEvent{})
+ w.w.Event(system.DestroyEvent{})
+ if w.hdc != 0 {
+ windows.ReleaseDC(w.hdc)
+ w.hdc = 0
+ }
+ // The system destroys the HWND for us.
+ w.hwnd = 0
+ windows.PostQuitMessage(0)
case windows.WM_PAINT:
w.draw(true)
case windows.WM_SIZE:
@@ -270,22 +282,51 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
case windows.SIZE_MINIMIZED:
w.setStage(system.StagePaused)
case windows.SIZE_MAXIMIZED, windows.SIZE_RESTORED:
+ var triggerEvent bool
+ // Check the window size change.
+ var r windows.Rect
+ windows.GetClientRect(w.hwnd, &r)
+ size := image.Point{
+ X: int(r.Right - r.Left),
+ Y: int(r.Bottom - r.Top),
+ }
+ if size != w.config.Size {
+ w.config.Size = size
+ triggerEvent = true
+ }
+ // Check the window mode.
+ mode := w.config.Mode
+ w.updateWindowMode()
+ if mode != w.config.Mode {
+ triggerEvent = true
+ }
+ if triggerEvent {
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
w.setStage(system.StageRunning)
}
case windows.WM_GETMINMAXINFO:
mm := (*windows.MinMaxInfo)(unsafe.Pointer(uintptr(lParam)))
- if w.minmax.minWidth > 0 || w.minmax.minHeight > 0 {
+ if p := w.config.MinSize; p.X > 0 || p.Y > 0 {
mm.PtMinTrackSize = windows.Point{
- w.minmax.minWidth+w.deltas.width,
- w.minmax.minHeight+w.deltas.height,
+ X: int32(p.X) + w.deltas.width,
+ Y: int32(p.Y) + w.deltas.height,
}
}
- if w.minmax.maxWidth > 0 || w.minmax.maxHeight > 0 {
+ if p := w.config.MaxSize; p.X > 0 || p.Y > 0 {
mm.PtMaxTrackSize = windows.Point{
- w.minmax.maxWidth+w.deltas.width,
- w.minmax.maxHeight+w.deltas.height,
+ X: int32(p.X) + w.deltas.width,
+ Y: int32(p.Y) + w.deltas.height,
}
}
+ case windows.WM_SETCURSOR:
+ w.cursorIn = (lParam & 0xffff) == windows.HTCLIENT
+ if w.cursorIn {
+ windows.SetCursor(w.cursor)
+ return windows.TRUE
+ }
+ case _WM_WAKEUP:
+ w.w.Event(wakeupEvent{})
}
return windows.DefWindowProc(hwnd, msg, wParam, lParam)
@@ -341,7 +382,7 @@ func coordsFromlParam(lParam uintptr) (int, int) {
return x, y
}
-func (w *window) scrollEvent(wParam, lParam uintptr) {
+func (w *window) scrollEvent(wParam, lParam uintptr, horizontal bool) {
x, y := coordsFromlParam(lParam)
// The WM_MOUSEWHEEL coordinates are in screen coordinates, in contrast
// to other mouse events.
@@ -349,12 +390,18 @@ func (w *window) scrollEvent(wParam, lParam uintptr) {
windows.ScreenToClient(w.hwnd, &np)
p := f32.Point{X: float32(np.X), Y: float32(np.Y)}
dist := float32(int16(wParam >> 16))
+ var sp f32.Point
+ if horizontal {
+ sp.X = dist
+ } else {
+ sp.Y = -dist
+ }
w.w.Event(pointer.Event{
Type: pointer.Scroll,
Source: pointer.Mouse,
Position: p,
Buttons: w.pointerBtns,
- Scroll: f32.Point{Y: -dist},
+ Scroll: sp,
Time: windows.GetMessageTime(),
})
}
@@ -362,18 +409,19 @@ func (w *window) scrollEvent(wParam, lParam uintptr) {
// Adapted from https://blogs.msdn.microsoft.com/oldnewthing/20060126-00/?p=32513/
func (w *window) loop() error {
msg := new(windows.Msg)
- for !w.dead {
- w.mu.Lock()
+loop:
+ for {
anim := w.animating
- w.mu.Unlock()
- if anim && !windows.PeekMessage(msg, w.hwnd, 0, 0, windows.PM_NOREMOVE) {
+ if anim && !windows.PeekMessage(msg, 0, 0, 0, windows.PM_NOREMOVE) {
w.draw(false)
continue
}
- windows.GetMessage(msg, w.hwnd, 0, 0)
- if msg.Message == windows.WM_QUIT {
- windows.PostQuitMessage(msg.WParam)
- break
+ switch ret := windows.GetMessage(msg, 0, 0, 0); ret {
+ case -1:
+ return errors.New("GetMessage failed")
+ case 0:
+ // WM_QUIT received.
+ break loop
}
windows.TranslateMessage(msg)
windows.DispatchMessage(msg)
@@ -382,65 +430,44 @@ func (w *window) loop() error {
}
func (w *window) SetAnimating(anim bool) {
- w.mu.Lock()
w.animating = anim
- w.mu.Unlock()
- if anim {
- w.postRedraw()
- }
}
-func (w *window) postRedraw() {
- if err := windows.PostMessage(w.hwnd, _WM_REDRAW, 0, 0); err != nil {
+func (w *window) Wakeup() {
+ if err := windows.PostMessage(w.hwnd, _WM_WAKEUP, 0, 0); err != nil {
panic(err)
}
}
func (w *window) setStage(s system.Stage) {
- w.stage = s
- w.w.Event(system.StageEvent{Stage: s})
+ if s != w.stage {
+ w.stage = s
+ w.w.Event(system.StageEvent{Stage: s})
+ }
}
func (w *window) draw(sync bool) {
- var r windows.Rect
- windows.GetClientRect(w.hwnd, &r)
- w.width = int(r.Right - r.Left)
- w.height = int(r.Bottom - r.Top)
- if w.width == 0 || w.height == 0 {
+ if w.config.Size.X == 0 || w.config.Size.Y == 0 {
return
}
- cfg := configForDC()
- w.minmax = getWindowConstraints(cfg, w.opts, w.deltas)
- w.w.Event(FrameEvent{
+ dpi := windows.GetWindowDPI(w.hwnd)
+ cfg := configForDPI(dpi)
+ w.w.Event(frameEvent{
FrameEvent: system.FrameEvent{
- Now: time.Now(),
- Size: image.Point{
- X: w.width,
- Y: w.height,
- },
+ Now: time.Now(),
+ Size: w.config.Size,
Metric: cfg,
},
Sync: sync,
})
}
-func (w *window) destroy() {
- if w.hdc != 0 {
- windows.ReleaseDC(w.hdc)
- w.hdc = 0
- }
- if w.hwnd != 0 {
- windows.DestroyWindow(w.hwnd)
- w.hwnd = 0
- }
-}
-
-func (w *window) NewContext() (Context, error) {
- sort.Slice(backends, func(i, j int) bool {
- return backends[i].priority < backends[j].priority
+func (w *window) NewContext() (context, error) {
+ sort.Slice(drivers, func(i, j int) bool {
+ return drivers[i].priority < drivers[j].priority
})
var errs []string
- for _, b := range backends {
+ for _, b := range drivers {
ctx, err := b.initializer(w)
if err == nil {
return ctx, nil
@@ -450,7 +477,7 @@ func (w *window) NewContext() (Context, error) {
if len(errs) > 0 {
return nil, fmt.Errorf("NewContext: failed to create a GPU device, tried: %s", strings.Join(errs, ", "))
}
- return nil, errors.New("NewContext: no available backends")
+ return nil, errors.New("NewContext: no available GPU drivers")
}
func (w *window) ReadClipboard() {
@@ -471,25 +498,142 @@ func (w *window) readClipboard() error {
return err
}
defer windows.GlobalUnlock(mem)
- // Look for terminating null character.
- n := 0
- for {
- ch := *(*uint16)(unsafe.Pointer(ptr + uintptr(n)*2))
- if ch == 0 {
- break
+ content := gowindows.UTF16PtrToString((*uint16)(unsafe.Pointer(ptr)))
+ w.w.Event(clipboard.Event{Text: content})
+ return nil
+}
+
+func (w *window) updateWindowMode() {
+ p := windows.GetWindowPlacement(w.hwnd)
+ r := p.Rect()
+ mi := windows.GetMonitorInfo(w.hwnd)
+ if r == mi.Monitor {
+ w.config.Mode = Fullscreen
+ } else {
+ w.config.Mode = Windowed
+ }
+}
+
+func (w *window) Configure(options []Option) {
+ dpi := windows.GetSystemDPI()
+ cfg := configForDPI(dpi)
+ prev := w.config
+ w.updateWindowMode()
+ cnf := w.config
+ cnf.apply(cfg, options)
+
+ if cnf.Mode != Fullscreen && prev.Size != cnf.Size {
+ width := int32(cnf.Size.X)
+ height := int32(cnf.Size.Y)
+ w.config.Size = cnf.Size
+
+ // Include the window decorations.
+ wr := windows.Rect{
+ Right: width,
+ Bottom: height,
}
- n++
+ dwStyle := uint32(windows.WS_OVERLAPPEDWINDOW)
+ dwExStyle := uint32(windows.WS_EX_APPWINDOW | windows.WS_EX_WINDOWEDGE)
+ windows.AdjustWindowRectEx(&wr, dwStyle, 0, dwExStyle)
+
+ dw, dh := width, height
+ width = wr.Right - wr.Left
+ height = wr.Bottom - wr.Top
+ w.deltas.width = width - dw
+ w.deltas.height = height - dh
+
+ windows.MoveWindow(w.hwnd, 0, 0, width, height, true)
+ }
+ if prev.MinSize != cnf.MinSize {
+ w.config.MinSize = cnf.MinSize
+ }
+ if prev.MaxSize != cnf.MaxSize {
+ w.config.MaxSize = cnf.MaxSize
+ }
+ if prev.Title != cnf.Title {
+ w.config.Title = cnf.Title
+ windows.SetWindowText(w.hwnd, cnf.Title)
+ }
+ if prev.Mode != cnf.Mode {
+ w.SetWindowMode(cnf.Mode)
+ }
+ if w.config != prev {
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+}
+
+// Maximize the window. It will have no effect when in fullscreen mode.
+func (w *window) Maximize() {
+ if w.config.Mode == Fullscreen {
+ return
+ }
+ style := windows.GetWindowLong(w.hwnd)
+ windows.SetWindowLong(w.hwnd, windows.GWL_STYLE, style|windows.WS_OVERLAPPEDWINDOW|windows.WS_MAXIMIZE)
+ mi := windows.GetMonitorInfo(w.hwnd)
+ windows.SetWindowPos(w.hwnd, 0,
+ mi.Monitor.Left, mi.Monitor.Top,
+ mi.Monitor.Right-mi.Monitor.Left,
+ mi.Monitor.Bottom-mi.Monitor.Top,
+ windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED,
+ )
+}
+
+// Center will place window at monitor center.
+func (w *window) Center() {
+ // Make sure that the window is sizeable
+ style := windows.GetWindowLong(w.hwnd) & (^uintptr(windows.WS_MAXIMIZE))
+ windows.SetWindowLong(w.hwnd, windows.GWL_STYLE, style|windows.WS_OVERLAPPEDWINDOW)
+
+ // Find with/height including the window decorations.
+ wr := windows.Rect{
+ Right: int32(w.config.Size.X),
+ Bottom: int32(w.config.Size.Y),
+ }
+ dwStyle := uint32(windows.WS_OVERLAPPEDWINDOW)
+ dwExStyle := uint32(windows.WS_EX_APPWINDOW | windows.WS_EX_WINDOWEDGE)
+ windows.AdjustWindowRectEx(&wr, dwStyle, 0, dwExStyle)
+ width := wr.Right - wr.Left
+ height := wr.Bottom - wr.Top
+
+ // Move to center of current monitor
+ mi := windows.GetMonitorInfo(w.hwnd).Monitor
+ x := mi.Left + (mi.Right-mi.Left-width)/2
+ y := mi.Top + (mi.Bottom-mi.Top-height)/2
+ windows.MoveWindow(w.hwnd, x, y, width, height, true)
+}
+
+func (w *window) SetWindowMode(mode WindowMode) {
+ // https://devblogs.microsoft.com/oldnewthing/20100412-00/?p=14353
+ switch mode {
+ case Windowed:
+ if w.placement == nil {
+ return
+ }
+ w.config.Mode = Windowed
+ windows.SetWindowPlacement(w.hwnd, w.placement)
+ w.placement = nil
+ style := windows.GetWindowLong(w.hwnd)
+ windows.SetWindowLong(w.hwnd, windows.GWL_STYLE, style|windows.WS_OVERLAPPEDWINDOW)
+ windows.SetWindowPos(w.hwnd, windows.HWND_TOPMOST,
+ 0, 0, 0, 0,
+ windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED,
+ )
+ case Fullscreen:
+ if w.placement != nil {
+ return
+ }
+ w.config.Mode = Fullscreen
+ w.placement = windows.GetWindowPlacement(w.hwnd)
+ style := windows.GetWindowLong(w.hwnd)
+ windows.SetWindowLong(w.hwnd, windows.GWL_STYLE, style&^windows.WS_OVERLAPPEDWINDOW)
+ mi := windows.GetMonitorInfo(w.hwnd)
+ windows.SetWindowPos(w.hwnd, 0,
+ mi.Monitor.Left, mi.Monitor.Top,
+ mi.Monitor.Right-mi.Monitor.Left,
+ mi.Monitor.Bottom-mi.Monitor.Top,
+ windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED,
+ )
}
- var u16 []uint16
- hdr := (*reflect.SliceHeader)(unsafe.Pointer(&u16))
- hdr.Data = ptr
- hdr.Cap = n
- hdr.Len = n
- content := string(utf16.Decode(u16))
- go func() {
- w.w.Event(system.ClipboardEvent{Text: content})
- }()
- return nil
}
func (w *window) WriteClipboard(s string) {
@@ -497,9 +641,6 @@ func (w *window) WriteClipboard(s string) {
}
func (w *window) writeClipboard(s string) error {
- u16 := utf16.Encode([]rune(s))
- // Data must be null terminated.
- u16 = append(u16, 0)
if err := windows.OpenClipboard(w.hwnd); err != nil {
return err
}
@@ -507,6 +648,10 @@ func (w *window) writeClipboard(s string) error {
if err := windows.EmptyClipboard(); err != nil {
return err
}
+ u16, err := gowindows.UTF16FromString(s)
+ if err != nil {
+ return err
+ }
n := len(u16) * int(unsafe.Sizeof(u16[0]))
mem, err := windows.GlobalAlloc(n)
if err != nil {
@@ -531,20 +676,64 @@ func (w *window) writeClipboard(s string) error {
return nil
}
+func (w *window) SetCursor(name pointer.CursorName) {
+ c, err := loadCursor(name)
+ if err != nil {
+ c = resources.cursor
+ }
+ w.cursor = c
+ if w.cursorIn {
+ windows.SetCursor(w.cursor)
+ }
+}
+
+func loadCursor(name pointer.CursorName) (syscall.Handle, error) {
+ var curID uint16
+ switch name {
+ default:
+ fallthrough
+ case pointer.CursorDefault:
+ return resources.cursor, nil
+ case pointer.CursorText:
+ curID = windows.IDC_IBEAM
+ case pointer.CursorPointer:
+ curID = windows.IDC_HAND
+ case pointer.CursorCrossHair:
+ curID = windows.IDC_CROSS
+ case pointer.CursorColResize:
+ curID = windows.IDC_SIZEWE
+ case pointer.CursorRowResize:
+ curID = windows.IDC_SIZENS
+ case pointer.CursorGrab:
+ curID = windows.IDC_SIZEALL
+ case pointer.CursorNone:
+ return 0, nil
+ }
+ return windows.LoadCursor(curID)
+}
+
func (w *window) ShowTextInput(show bool) {}
+func (w *window) SetInputHint(_ key.InputHint) {}
+
func (w *window) HDC() syscall.Handle {
return w.hdc
}
func (w *window) HWND() (syscall.Handle, int, int) {
- return w.hwnd, w.width, w.height
+ return w.hwnd, w.config.Size.X, w.config.Size.Y
}
func (w *window) Close() {
windows.PostMessage(w.hwnd, windows.WM_CLOSE, 0, 0)
}
+func (w *window) Raise() {
+ windows.SetForegroundWindow(w.hwnd)
+ windows.SetWindowPos(w.hwnd, windows.HWND_TOPMOST, 0, 0, 0, 0,
+ windows.SWP_NOMOVE|windows.SWP_NOSIZE|windows.SWP_SHOWWINDOW)
+}
+
func convertKeyCode(code uintptr) (string, bool) {
if '0' <= code && code <= '9' || 'A' <= code && code <= 'Z' {
return string(rune(code)), true
@@ -602,7 +791,7 @@ func convertKeyCode(code uintptr) (string, bool) {
case windows.VK_TAB:
r = key.NameTab
case windows.VK_SPACE:
- r = "Space"
+ r = key.NameSpace
case windows.VK_OEM_1:
r = ";"
case windows.VK_OEM_PLUS:
@@ -631,8 +820,7 @@ func convertKeyCode(code uintptr) (string, bool) {
return r, true
}
-func configForDC() unit.Metric {
- dpi := windows.GetSystemDPI()
+func configForDPI(dpi int) unit.Metric {
const inchPrDp = 1.0 / 96.0
ppdp := float32(dpi) * inchPrDp
return unit.Metric{
@@ -640,3 +828,5 @@ func configForDC() unit.Metric {
PxPerSp: ppdp,
}
}
+
+func (_ ViewEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/app/internal/window/os_x11.go b/vendor/gioui.org/app/os_x11.go
index 69108c6..1c75247 100644
--- a/vendor/gioui.org/app/internal/window/os_x11.go
+++ b/vendor/gioui.org/app/os_x11.go
@@ -1,14 +1,16 @@
// SPDX-License-Identifier: Unlicense OR MIT
-// +build linux,!android,!nox11 freebsd openbsd
+//go:build ((linux && !android) || freebsd || openbsd) && !nox11
+// +build linux,!android freebsd openbsd
+// +build !nox11
-package window
+package app
/*
-#cgo openbsd CFLAGS: -I/usr/X11R6/include -I/usr/local/include
-#cgo openbsd LDFLAGS: -L/usr/X11R6/lib -L/usr/local/lib
-#cgo freebsd openbsd LDFLAGS: -lX11 -lxkbcommon -lxkbcommon-x11 -lX11-xcb
-#cgo linux pkg-config: x11 xkbcommon xkbcommon-x11 x11-xcb
+#cgo freebsd openbsd CFLAGS: -I/usr/X11R6/include -I/usr/local/include
+#cgo freebsd openbsd LDFLAGS: -L/usr/X11R6/lib -L/usr/local/lib
+#cgo freebsd openbsd LDFLAGS: -lX11 -lxkbcommon -lxkbcommon-x11 -lX11-xcb -lXcursor -lXfixes
+#cgo linux pkg-config: x11 xkbcommon xkbcommon-x11 x11-xcb xcursor xfixes
#include <stdlib.h>
#include <locale.h>
@@ -18,6 +20,8 @@ package window
#include <X11/Xresource.h>
#include <X11/XKBlib.h>
#include <X11/Xlib-xcb.h>
+#include <X11/extensions/Xfixes.h>
+#include <X11/Xcursor/Xcursor.h>
#include <xkbcommon/xkbcommon-x11.h>
*/
@@ -34,17 +38,24 @@ import (
"unsafe"
"gioui.org/f32"
+ "gioui.org/io/clipboard"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
"gioui.org/unit"
- "gioui.org/app/internal/xkb"
syscall "golang.org/x/sys/unix"
+
+ "gioui.org/app/internal/xkb"
+)
+
+const (
+ _NET_WM_STATE_REMOVE = 0
+ _NET_WM_STATE_ADD = 1
)
type x11Window struct {
- w Callbacks
+ w *callbacks
x *C.Display
xkb *xkb.Context
xkbEventBase C.int
@@ -53,68 +64,213 @@ type x11Window struct {
atoms struct {
// "UTF8_STRING".
utf8string C.Atom
+ // "text/plain;charset=utf-8".
+ plaintext C.Atom
// "TARGETS"
targets C.Atom
// "CLIPBOARD".
clipboard C.Atom
+ // "PRIMARY".
+ primary C.Atom
// "CLIPBOARD_CONTENT", the clipboard destination property.
clipboardContent C.Atom
// "WM_DELETE_WINDOW"
evDelWindow C.Atom
// "ATOM"
atom C.Atom
+ // "GTK_TEXT_BUFFER_CONTENTS"
+ gtk_text_buffer_contents C.Atom
+ // "_NET_WM_NAME"
+ wmName C.Atom
+ // "_NET_WM_STATE"
+ wmState C.Atom
+ // "_NET_WM_STATE_FULLSCREEN"
+ wmStateFullscreen C.Atom
+ // "_NET_ACTIVE_WINDOW"
+ wmActiveWindow C.Atom
+ // _NET_WM_STATE_MAXIMIZED_HORZ
+ wmStateMaximizedHorz C.Atom
+ // _NET_WM_STATE_MAXIMIZED_VERT
+ wmStateMaximizedVert C.Atom
}
stage system.Stage
- cfg unit.Metric
- width int
- height int
+ metric unit.Metric
notify struct {
read, write int
}
dead bool
- mu sync.Mutex
animating bool
pointerBtns pointer.Buttons
clipboard struct {
- read bool
- write *string
content []byte
}
+ cursor pointer.CursorName
+ config Config
+
+ wakeups chan struct{}
+}
+
+var (
+ newX11EGLContext func(w *x11Window) (context, error)
+ newX11VulkanContext func(w *x11Window) (context, error)
+)
+
+func (w *x11Window) NewContext() (context, error) {
+ var firstErr error
+ if f := newX11VulkanContext; f != nil {
+ c, err := f(w)
+ if err == nil {
+ return c, nil
+ }
+ firstErr = err
+ }
+ if f := newX11EGLContext; f != nil {
+ c, err := f(w)
+ if err == nil {
+ return c, nil
+ }
+ firstErr = err
+ }
+ if firstErr != nil {
+ return nil, firstErr
+ }
+ return nil, errors.New("x11: no available GPU backends")
}
func (w *x11Window) SetAnimating(anim bool) {
- w.mu.Lock()
w.animating = anim
- w.mu.Unlock()
- if anim {
- w.wakeup()
- }
}
func (w *x11Window) ReadClipboard() {
- w.mu.Lock()
- w.clipboard.read = true
- w.mu.Unlock()
- w.wakeup()
+ C.XDeleteProperty(w.x, w.xw, w.atoms.clipboardContent)
+ C.XConvertSelection(w.x, w.atoms.clipboard, w.atoms.utf8string, w.atoms.clipboardContent, w.xw, C.CurrentTime)
}
func (w *x11Window) WriteClipboard(s string) {
- w.mu.Lock()
- w.clipboard.write = &s
- w.mu.Unlock()
- w.wakeup()
+ w.clipboard.content = []byte(s)
+ C.XSetSelectionOwner(w.x, w.atoms.clipboard, w.xw, C.CurrentTime)
+ C.XSetSelectionOwner(w.x, w.atoms.primary, w.xw, C.CurrentTime)
+}
+
+func (w *x11Window) Configure(options []Option) {
+ var shints C.XSizeHints
+ prev := w.config
+ cnf := w.config
+ cnf.apply(w.metric, options)
+ if prev.MinSize != cnf.MinSize {
+ w.config.MinSize = cnf.MinSize
+ shints.min_width = C.int(cnf.MinSize.X)
+ shints.min_height = C.int(cnf.MinSize.Y)
+ shints.flags = C.PMinSize
+ }
+ if prev.MaxSize != cnf.MaxSize {
+ w.config.MaxSize = cnf.MaxSize
+ shints.max_width = C.int(cnf.MaxSize.X)
+ shints.max_height = C.int(cnf.MaxSize.Y)
+ shints.flags = shints.flags | C.PMaxSize
+ }
+ if shints.flags != 0 {
+ C.XSetWMNormalHints(w.x, w.xw, &shints)
+ }
+
+ if cnf.Mode != Fullscreen && prev.Size != cnf.Size {
+ w.config.Size = cnf.Size
+ C.XResizeWindow(w.x, w.xw, C.uint(cnf.Size.X), C.uint(cnf.Size.Y))
+ }
+
+ if prev.Title != cnf.Title {
+ title := cnf.Title
+ ctitle := C.CString(title)
+ defer C.free(unsafe.Pointer(ctitle))
+ C.XStoreName(w.x, w.xw, ctitle)
+ // set _NET_WM_NAME as well for UTF-8 support in window title.
+ C.XSetTextProperty(w.x, w.xw,
+ &C.XTextProperty{
+ value: (*C.uchar)(unsafe.Pointer(ctitle)),
+ encoding: w.atoms.utf8string,
+ format: 8,
+ nitems: C.ulong(len(title)),
+ },
+ w.atoms.wmName)
+ }
+
+ if prev.Mode != cnf.Mode {
+ w.SetWindowMode(cnf.Mode)
+ }
+ if w.config != prev {
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
+}
+
+func (w *x11Window) Raise() {
+ var xev C.XEvent
+ ev := (*C.XClientMessageEvent)(unsafe.Pointer(&xev))
+ *ev = C.XClientMessageEvent{
+ _type: C.ClientMessage,
+ display: w.x,
+ window: w.xw,
+ message_type: w.atoms.wmActiveWindow,
+ format: 32,
+ }
+ C.XSendEvent(
+ w.x,
+ C.XDefaultRootWindow(w.x), // MUST be the root window
+ C.False,
+ C.SubstructureNotifyMask|C.SubstructureRedirectMask,
+ &xev,
+ )
+ C.XMapRaised(w.display(), w.xw)
+}
+
+func (w *x11Window) SetCursor(name pointer.CursorName) {
+ switch name {
+ case pointer.CursorNone:
+ w.cursor = name
+ C.XFixesHideCursor(w.x, w.xw)
+ return
+ case pointer.CursorGrab:
+ name = "hand1"
+ }
+ if w.cursor == pointer.CursorNone {
+ C.XFixesShowCursor(w.x, w.xw)
+ }
+ cname := C.CString(string(name))
+ defer C.free(unsafe.Pointer(cname))
+ c := C.XcursorLibraryLoadCursor(w.x, cname)
+ if c == 0 {
+ name = pointer.CursorDefault
+ }
+ w.cursor = name
+ // If c if null (i.e. name was not found),
+ // XDefineCursor will use the default cursor.
+ C.XDefineCursor(w.x, w.xw, c)
+}
+
+func (w *x11Window) SetWindowMode(mode WindowMode) {
+ var action C.long
+ switch mode {
+ case Windowed:
+ action = _NET_WM_STATE_REMOVE
+ case Fullscreen:
+ action = _NET_WM_STATE_ADD
+ default:
+ return
+ }
+ w.config.Mode = mode
+ // "A Client wishing to change the state of a window MUST send
+ // a _NET_WM_STATE client message to the root window."
+ w.sendWMStateEvent(action, w.atoms.wmStateFullscreen, 0)
}
func (w *x11Window) ShowTextInput(show bool) {}
+func (w *x11Window) SetInputHint(_ key.InputHint) {}
+
// Close the window.
func (w *x11Window) Close() {
- w.mu.Lock()
- defer w.mu.Unlock()
-
var xev C.XEvent
ev := (*C.XClientMessageEvent)(unsafe.Pointer(&xev))
*ev = C.XClientMessageEvent{
@@ -130,9 +286,62 @@ func (w *x11Window) Close() {
C.XSendEvent(w.x, w.xw, C.False, C.NoEventMask, &xev)
}
+// Maximize the window.
+func (w *x11Window) Maximize() {
+ w.sendWMStateEvent(_NET_WM_STATE_ADD, w.atoms.wmStateMaximizedHorz, w.atoms.wmStateMaximizedVert)
+}
+
+// Center the window.
+func (w *x11Window) Center() {
+ screen := C.XDefaultScreen(w.x)
+ width := C.XDisplayWidth(w.x, screen)
+ height := C.XDisplayHeight(w.x, screen)
+
+ var attrs C.XWindowAttributes
+ C.XGetWindowAttributes(w.x, w.xw, &attrs)
+ width -= attrs.border_width
+ height -= attrs.border_width
+
+ sz := w.config.Size
+ x := (int(width) - sz.X) / 2
+ y := (int(height) - sz.Y) / 2
+
+ C.XMoveResizeWindow(w.x, w.xw, C.int(x), C.int(y), C.uint(sz.X), C.uint(sz.Y))
+}
+
+// action is one of _NET_WM_STATE_REMOVE, _NET_WM_STATE_ADD.
+func (w *x11Window) sendWMStateEvent(action C.long, atom1, atom2 C.ulong) {
+ var xev C.XEvent
+ ev := (*C.XClientMessageEvent)(unsafe.Pointer(&xev))
+ *ev = C.XClientMessageEvent{
+ _type: C.ClientMessage,
+ display: w.x,
+ window: w.xw,
+ message_type: w.atoms.wmState,
+ format: 32,
+ }
+ data := (*[5]C.long)(unsafe.Pointer(&ev.data))
+ data[0] = C.long(action)
+ data[1] = C.long(atom1)
+ data[2] = C.long(atom2)
+ data[3] = 1 // application
+
+ C.XSendEvent(
+ w.x,
+ C.XDefaultRootWindow(w.x), // MUST be the root window
+ C.False,
+ C.SubstructureNotifyMask|C.SubstructureRedirectMask,
+ &xev,
+ )
+}
+
var x11OneByte = make([]byte, 1)
-func (w *x11Window) wakeup() {
+func (w *x11Window) Wakeup() {
+ select {
+ case w.wakeups <- struct{}{}:
+ default:
+ }
if _, err := syscall.Write(w.notify.write, x11OneByte); err != nil && err != syscall.EAGAIN {
panic(fmt.Errorf("failed to write to pipe: %v", err))
}
@@ -143,7 +352,7 @@ func (w *x11Window) display() *C.Display {
}
func (w *x11Window) window() (C.Window, int, int) {
- return w.xw, w.width, w.height
+ return w.xw, w.config.Size.X, w.config.Size.Y
}
func (w *x11Window) setStage(s system.Stage) {
@@ -151,7 +360,7 @@ func (w *x11Window) setStage(s system.Stage) {
return
}
w.stage = s
- w.w.Event(system.StageEvent{s})
+ w.w.Event(system.StageEvent{Stage: s})
}
func (w *x11Window) loop() {
@@ -174,9 +383,7 @@ loop:
// This fixes an issue on Xephyr where on startup XPending() > 0 but
// poll will still block. This also prevents no-op calls to poll.
if syn = h.handleEvents(); !syn {
- w.mu.Lock()
anim = w.animating
- w.mu.Unlock()
if !anim {
// Clear poll events.
*xEvents = 0
@@ -205,34 +412,22 @@ loop:
panic(fmt.Errorf("x11 loop: read from notify pipe failed: %w", err))
}
}
+ select {
+ case <-w.wakeups:
+ w.w.Event(wakeupEvent{})
+ default:
+ }
- if anim || syn {
- w.w.Event(FrameEvent{
+ if (anim || syn) && w.config.Size.X != 0 && w.config.Size.Y != 0 {
+ w.w.Event(frameEvent{
FrameEvent: system.FrameEvent{
- Now: time.Now(),
- Size: image.Point{
- X: w.width,
- Y: w.height,
- },
- Metric: w.cfg,
+ Now: time.Now(),
+ Size: w.config.Size,
+ Metric: w.metric,
},
Sync: syn,
})
}
- w.mu.Lock()
- readClipboard := w.clipboard.read
- writeClipboard := w.clipboard.write
- w.clipboard.read = false
- w.clipboard.write = nil
- w.mu.Unlock()
- if readClipboard {
- C.XDeleteProperty(w.x, w.xw, w.atoms.clipboardContent)
- C.XConvertSelection(w.x, w.atoms.clipboard, w.atoms.utf8string, w.atoms.clipboardContent, w.xw, C.CurrentTime)
- }
- if writeClipboard != nil {
- w.clipboard.content = []byte(*writeClipboard)
- C.XSetSelectionOwner(w.x, w.atoms.clipboard, w.xw, C.CurrentTime)
- }
}
w.w.Event(system.DestroyEvent{Err: nil})
}
@@ -301,12 +496,15 @@ func (h *x11EventHandler) handleEvents() bool {
h.w.xkb.UpdateMask(uint32(state.base_mods), uint32(state.latched_mods), uint32(state.locked_mods),
uint32(state.base_group), uint32(state.latched_group), uint32(state.locked_group))
}
- case C.KeyPress:
+ case C.KeyPress, C.KeyRelease:
+ ks := key.Press
+ if _type == C.KeyRelease {
+ ks = key.Release
+ }
kevt := (*C.XKeyPressedEvent)(unsafe.Pointer(xev))
- for _, e := range h.w.xkb.DispatchKey(uint32(kevt.keycode)) {
+ for _, e := range h.w.xkb.DispatchKey(uint32(kevt.keycode), ks) {
w.w.Event(e)
}
- case C.KeyRelease:
case C.ButtonPress, C.ButtonRelease:
bevt := (*C.XButtonEvent)(unsafe.Pointer(xev))
ev := pointer.Event{
@@ -326,11 +524,11 @@ func (h *x11EventHandler) handleEvents() bool {
const scrollScale = 10
switch bevt.button {
case C.Button1:
- btn = pointer.ButtonLeft
+ btn = pointer.ButtonPrimary
case C.Button2:
- btn = pointer.ButtonMiddle
+ btn = pointer.ButtonTertiary
case C.Button3:
- btn = pointer.ButtonRight
+ btn = pointer.ButtonSecondary
case C.Button4:
// scroll up
ev.Type = pointer.Scroll
@@ -339,6 +537,15 @@ func (h *x11EventHandler) handleEvents() bool {
// scroll down
ev.Type = pointer.Scroll
ev.Scroll.Y = +scrollScale
+ case 6:
+ // http://xahlee.info/linux/linux_x11_mouse_button_number.html
+ // scroll left
+ ev.Type = pointer.Scroll
+ ev.Scroll.X = -scrollScale * 2
+ case 7:
+ // scroll right
+ ev.Type = pointer.Scroll
+ ev.Scroll.X = +scrollScale * 2
default:
continue
}
@@ -372,8 +579,10 @@ func (h *x11EventHandler) handleEvents() bool {
w.w.Event(key.FocusEvent{Focus: false})
case C.ConfigureNotify: // window configuration change
cevt := (*C.XConfigureEvent)(unsafe.Pointer(xev))
- w.width = int(cevt.width)
- w.height = int(cevt.height)
+ if sz := image.Pt(int(cevt.width), int(cevt.height)); sz != w.config.Size {
+ w.config.Size = sz
+ w.w.Event(ConfigEvent{Config: w.config})
+ }
// redraw will be done by a later expose event
case C.SelectionNotify:
cevt := (*C.XSelectionEvent)(unsafe.Pointer(xev))
@@ -394,10 +603,10 @@ func (h *x11EventHandler) handleEvents() bool {
break
}
str := C.GoStringN((*C.char)(unsafe.Pointer(text.value)), C.int(text.nitems))
- w.w.Event(system.ClipboardEvent{Text: str})
+ w.w.Event(clipboard.Event{Text: str})
case C.SelectionRequest:
cevt := (*C.XSelectionRequestEvent)(unsafe.Pointer(xev))
- if cevt.selection != w.atoms.clipboard || cevt.property == C.None {
+ if (cevt.selection != w.atoms.clipboard && cevt.selection != w.atoms.primary) || cevt.property == C.None {
// Unsupported clipboard or obsolete requestor.
break
}
@@ -418,21 +627,27 @@ func (h *x11EventHandler) handleEvents() bool {
switch cevt.target {
case w.atoms.targets:
// The requestor wants the supported clipboard
- // formats. First write the formats...
- formats := []uint32{uint32(w.atoms.utf8string)}
+ // formats. First write the targets...
+ formats := [...]C.long{
+ C.long(w.atoms.targets),
+ C.long(w.atoms.utf8string),
+ C.long(w.atoms.plaintext),
+ // GTK clients need this.
+ C.long(w.atoms.gtk_text_buffer_contents),
+ }
C.XChangeProperty(w.x, cevt.requestor, cevt.property, w.atoms.atom,
32 /* bitwidth of formats */, C.PropModeReplace,
- (*C.uchar)(unsafe.Pointer(&formats[0])), C.int(len(formats)),
+ (*C.uchar)(unsafe.Pointer(&formats)), C.int(len(formats)),
)
// ...then notify the requestor.
notify()
- case w.atoms.utf8string:
+ case w.atoms.plaintext, w.atoms.utf8string, w.atoms.gtk_text_buffer_contents:
content := w.clipboard.content
var ptr *C.uchar
if len(content) > 0 {
ptr = (*C.uchar)(unsafe.Pointer(&content[0]))
}
- C.XChangeProperty(w.x, cevt.requestor, cevt.property, w.atoms.utf8string,
+ C.XChangeProperty(w.x, cevt.requestor, cevt.property, cevt.target,
8 /* bitwidth */, C.PropModeReplace,
ptr, C.int(len(content)),
)
@@ -458,7 +673,7 @@ func init() {
x11Driver = newX11Window
}
-func newX11Window(gioWin Callbacks, opts *Options) error {
+func newX11Window(gioWin *callbacks, options []Option) error {
var err error
pipe := make([]int, 2)
@@ -498,6 +713,10 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
ppsp := x11DetectUIScale(dpy)
cfg := unit.Metric{PxPerDp: ppsp, PxPerSp: ppsp}
+ // Only use cnf for getting the window size.
+ var cnf Config
+ cnf.apply(cfg, options)
+
swa := C.XSetWindowAttributes{
event_mask: C.ExposureMask | C.FocusChangeMask | // update
C.KeyPressMask | C.KeyReleaseMask | // keyboard
@@ -508,17 +727,17 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
override_redirect: C.False,
}
win := C.XCreateWindow(dpy, C.XDefaultRootWindow(dpy),
- 0, 0, C.uint(cfg.Px(opts.Width)), C.uint(cfg.Px(opts.Height)),
+ 0, 0, C.uint(cnf.Size.X), C.uint(cnf.Size.Y),
0, C.CopyFromParent, C.InputOutput, nil,
C.CWEventMask|C.CWBackPixmap|C.CWOverrideRedirect, &swa)
w := &x11Window{
w: gioWin, x: dpy, xw: win,
- width: cfg.Px(opts.Width),
- height: cfg.Px(opts.Height),
- cfg: cfg,
+ metric: cfg,
xkb: xkb,
xkbEventBase: xkbEventBase,
+ wakeups: make(chan struct{}, 1),
+ config: Config{Size: cnf.Size},
}
w.notify.read = pipe[0]
w.notify.write = pipe[1]
@@ -533,57 +752,40 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
hints.flags = C.InputHint
C.XSetWMHints(dpy, win, &hints)
- var shints C.XSizeHints
- if opts.MinWidth.V != 0 || opts.MinHeight.V != 0 {
- shints.min_width = C.int(cfg.Px(opts.MinWidth))
- shints.min_height = C.int(cfg.Px(opts.MinHeight))
- shints.flags = C.PMinSize
- }
- if opts.MaxWidth.V != 0 || opts.MaxHeight.V != 0 {
- shints.max_width = C.int(cfg.Px(opts.MaxWidth))
- shints.max_height = C.int(cfg.Px(opts.MaxHeight))
- shints.flags = shints.flags | C.PMaxSize
- }
- if shints.flags != 0 {
- C.XSetWMNormalHints(dpy, win, &shints)
- }
-
name := C.CString(filepath.Base(os.Args[0]))
defer C.free(unsafe.Pointer(name))
wmhints := C.XClassHint{name, name}
C.XSetClassHint(dpy, win, &wmhints)
w.atoms.utf8string = w.atom("UTF8_STRING", false)
+ w.atoms.plaintext = w.atom("text/plain;charset=utf-8", false)
+ w.atoms.gtk_text_buffer_contents = w.atom("GTK_TEXT_BUFFER_CONTENTS", false)
w.atoms.evDelWindow = w.atom("WM_DELETE_WINDOW", false)
w.atoms.clipboard = w.atom("CLIPBOARD", false)
+ w.atoms.primary = w.atom("PRIMARY", false)
w.atoms.clipboardContent = w.atom("CLIPBOARD_CONTENT", false)
w.atoms.atom = w.atom("ATOM", false)
w.atoms.targets = w.atom("TARGETS", false)
-
- // set the name
- ctitle := C.CString(opts.Title)
- defer C.free(unsafe.Pointer(ctitle))
- C.XStoreName(dpy, win, ctitle)
- // set _NET_WM_NAME as well for UTF-8 support in window title.
- C.XSetTextProperty(dpy, win,
- &C.XTextProperty{
- value: (*C.uchar)(unsafe.Pointer(ctitle)),
- encoding: w.atoms.utf8string,
- format: 8,
- nitems: C.ulong(len(opts.Title)),
- },
- w.atom("_NET_WM_NAME", false))
+ w.atoms.wmName = w.atom("_NET_WM_NAME", false)
+ w.atoms.wmState = w.atom("_NET_WM_STATE", false)
+ w.atoms.wmStateFullscreen = w.atom("_NET_WM_STATE_FULLSCREEN", false)
+ w.atoms.wmActiveWindow = w.atom("_NET_ACTIVE_WINDOW", false)
+ w.atoms.wmStateMaximizedHorz = w.atom("_NET_WM_STATE_MAXIMIZED_HORZ", false)
+ w.atoms.wmStateMaximizedVert = w.atom("_NET_WM_STATE_MAXIMIZED_VERT", false)
// extensions
C.XSetWMProtocols(dpy, win, &w.atoms.evDelWindow, 1)
- // make the window visible on the screen
- C.XMapWindow(dpy, win)
-
go func() {
w.w.SetDriver(w)
+ w.Configure(options)
+
+ // make the window visible on the screen
+ C.XMapWindow(dpy, win)
+ w.w.Event(ViewEvent{Display: unsafe.Pointer(dpy), Window: uintptr(win)})
w.setStage(system.StageRunning)
w.loop()
+ w.w.Event(ViewEvent{})
w.destroy()
}()
return nil
diff --git a/vendor/gioui.org/app/internal/window/runmain.go b/vendor/gioui.org/app/runmain.go
index f9de5d0..a1c1e3d 100644
--- a/vendor/gioui.org/app/internal/window/runmain.go
+++ b/vendor/gioui.org/app/runmain.go
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build android || (darwin && ios)
// +build android darwin,ios
-package window
+package app
// Android only supports non-Java programs as c-shared libraries.
// Unfortunately, Go does not run a program's main function in
diff --git a/vendor/gioui.org/app/sigpipe_darwin.go b/vendor/gioui.org/app/sigpipe_darwin.go
deleted file mode 100644
index aca19b7..0000000
--- a/vendor/gioui.org/app/sigpipe_darwin.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-// +build !go1.14
-
-// Work around golang.org/issue/33384, fixed in CL 191785,
-// to be released in Go 1.14.
-
-package app
-
-import (
- "os"
- "os/signal"
- "syscall"
-)
-
-func init() {
- signal.Notify(make(chan os.Signal), syscall.SIGPIPE)
-}
diff --git a/vendor/gioui.org/app/vulkan.go b/vendor/gioui.org/app/vulkan.go
new file mode 100644
index 0000000..630c254
--- /dev/null
+++ b/vendor/gioui.org/app/vulkan.go
@@ -0,0 +1,210 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build (linux || freebsd) && !novulkan
+// +build linux freebsd
+// +build !novulkan
+
+package app
+
+import (
+ "errors"
+ "unsafe"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/vk"
+)
+
+type vkContext struct {
+ physDev vk.PhysicalDevice
+ inst vk.Instance
+ dev vk.Device
+ queueFam int
+ queue vk.Queue
+ acquireSem vk.Semaphore
+ presentSem vk.Semaphore
+
+ swchain vk.Swapchain
+ imgs []vk.Image
+ views []vk.ImageView
+ fbos []vk.Framebuffer
+ format vk.Format
+ presentIdx int
+}
+
+func newVulkanContext(inst vk.Instance, surf vk.Surface) (*vkContext, error) {
+ physDev, qFam, err := vk.ChoosePhysicalDevice(inst, surf)
+ if err != nil {
+ return nil, err
+ }
+ dev, err := vk.CreateDeviceAndQueue(physDev, qFam, "VK_KHR_swapchain")
+ if err != nil {
+ return nil, err
+ }
+ if err != nil {
+ vk.DestroyDevice(dev)
+ return nil, err
+ }
+ acquireSem, err := vk.CreateSemaphore(dev)
+ if err != nil {
+ vk.DestroyDevice(dev)
+ return nil, err
+ }
+ presentSem, err := vk.CreateSemaphore(dev)
+ if err != nil {
+ vk.DestroySemaphore(dev, acquireSem)
+ vk.DestroyDevice(dev)
+ return nil, err
+ }
+ c := &vkContext{
+ physDev: physDev,
+ inst: inst,
+ dev: dev,
+ queueFam: qFam,
+ queue: vk.GetDeviceQueue(dev, qFam, 0),
+ acquireSem: acquireSem,
+ presentSem: presentSem,
+ }
+ return c, nil
+}
+
+func (c *vkContext) RenderTarget() (gpu.RenderTarget, error) {
+ vk.DeviceWaitIdle(c.dev)
+
+ imgIdx, err := vk.AcquireNextImage(c.dev, c.swchain, c.acquireSem, 0)
+ if err := mapSurfaceErr(err); err != nil {
+ return nil, err
+ }
+ c.presentIdx = imgIdx
+ return gpu.VulkanRenderTarget{
+ WaitSem: uint64(c.acquireSem),
+ SignalSem: uint64(c.presentSem),
+ Framebuffer: uint64(c.fbos[imgIdx]),
+ Image: uint64(c.imgs[imgIdx]),
+ }, nil
+}
+
+func (c *vkContext) api() gpu.API {
+ return gpu.Vulkan{
+ PhysDevice: unsafe.Pointer(c.physDev),
+ Device: unsafe.Pointer(c.dev),
+ Format: int(c.format),
+ QueueFamily: c.queueFam,
+ QueueIndex: 0,
+ }
+}
+
+func mapErr(err error) error {
+ var vkErr vk.Error
+ if errors.As(err, &vkErr) && vkErr == vk.ERROR_DEVICE_LOST {
+ return gpu.ErrDeviceLost
+ }
+ return err
+}
+
+func mapSurfaceErr(err error) error {
+ var vkErr vk.Error
+ if !errors.As(err, &vkErr) {
+ return err
+ }
+ switch {
+ case vkErr == vk.SUBOPTIMAL_KHR:
+ // Android reports VK_SUBOPTIMAL_KHR when presenting to a rotated
+ // swapchain (preTransform != currentTransform). However, we don't
+ // support transforming the output ourselves, so we'll live with it.
+ return nil
+ case vkErr == vk.ERROR_OUT_OF_DATE_KHR:
+ return errOutOfDate
+ case vkErr == vk.ERROR_SURFACE_LOST_KHR:
+ // Treating a lost surface as a lost device isn't accurate, but
+ // probably not worth optimizing.
+ return gpu.ErrDeviceLost
+ }
+ return mapErr(err)
+}
+
+func (c *vkContext) release() {
+ vk.DeviceWaitIdle(c.dev)
+
+ c.destroySwapchain()
+ vk.DestroySemaphore(c.dev, c.acquireSem)
+ vk.DestroySemaphore(c.dev, c.presentSem)
+ vk.DestroyDevice(c.dev)
+ *c = vkContext{}
+}
+
+func (c *vkContext) present() error {
+ return mapSurfaceErr(vk.PresentQueue(c.queue, c.swchain, c.presentSem, c.presentIdx))
+}
+
+func (c *vkContext) destroyImageViews() {
+ for _, f := range c.fbos {
+ vk.DestroyFramebuffer(c.dev, f)
+ }
+ c.fbos = nil
+ for _, view := range c.views {
+ vk.DestroyImageView(c.dev, view)
+ }
+ c.views = nil
+}
+
+func (c *vkContext) destroySwapchain() {
+ vk.DeviceWaitIdle(c.dev)
+
+ c.destroyImageViews()
+ if c.swchain != 0 {
+ vk.DestroySwapchain(c.dev, c.swchain)
+ c.swchain = 0
+ }
+}
+
+func (c *vkContext) refresh(surf vk.Surface, width, height int) error {
+ vk.DeviceWaitIdle(c.dev)
+
+ c.destroyImageViews()
+ // Check whether size is valid. That's needed on X11, where ConfigureNotify
+ // is not always synchronized with the window extent.
+ caps, err := vk.GetPhysicalDeviceSurfaceCapabilities(c.physDev, surf)
+ if err != nil {
+ return err
+ }
+ minExt, maxExt := caps.MinExtent(), caps.MaxExtent()
+ if width < minExt.X || maxExt.X < width || height < minExt.Y || maxExt.Y < height {
+ return errOutOfDate
+ }
+ swchain, imgs, format, err := vk.CreateSwapchain(c.physDev, c.dev, surf, width, height, c.swchain)
+ if c.swchain != 0 {
+ vk.DestroySwapchain(c.dev, c.swchain)
+ c.swchain = 0
+ }
+ if err := mapSurfaceErr(err); err != nil {
+ return err
+ }
+ c.swchain = swchain
+ c.imgs = imgs
+ c.format = format
+ pass, err := vk.CreateRenderPass(
+ c.dev,
+ format,
+ vk.ATTACHMENT_LOAD_OP_CLEAR,
+ vk.IMAGE_LAYOUT_UNDEFINED,
+ vk.IMAGE_LAYOUT_PRESENT_SRC_KHR,
+ nil,
+ )
+ if err := mapErr(err); err != nil {
+ return err
+ }
+ defer vk.DestroyRenderPass(c.dev, pass)
+ for _, img := range imgs {
+ view, err := vk.CreateImageView(c.dev, img, format)
+ if err := mapErr(err); err != nil {
+ return err
+ }
+ c.views = append(c.views, view)
+ fbo, err := vk.CreateFramebuffer(c.dev, pass, view, width, height)
+ if err := mapErr(err); err != nil {
+ return err
+ }
+ c.fbos = append(c.fbos, fbo)
+ }
+ return nil
+}
diff --git a/vendor/gioui.org/app/vulkan_android.go b/vendor/gioui.org/app/vulkan_android.go
new file mode 100644
index 0000000..3758d04
--- /dev/null
+++ b/vendor/gioui.org/app/vulkan_android.go
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build !novulkan
+// +build !novulkan
+
+package app
+
+import (
+ "unsafe"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/vk"
+)
+
+type wlVkContext struct {
+ win *window
+ inst vk.Instance
+ surf vk.Surface
+ ctx *vkContext
+}
+
+func init() {
+ newAndroidVulkanContext = func(w *window) (context, error) {
+ inst, err := vk.CreateInstance("VK_KHR_surface", "VK_KHR_android_surface")
+ if err != nil {
+ return nil, err
+ }
+ window, _, _ := w.nativeWindow()
+ surf, err := vk.CreateAndroidSurface(inst, unsafe.Pointer(window))
+ if err != nil {
+ vk.DestroyInstance(inst)
+ return nil, err
+ }
+ ctx, err := newVulkanContext(inst, surf)
+ if err != nil {
+ vk.DestroySurface(inst, surf)
+ vk.DestroyInstance(inst)
+ return nil, err
+ }
+ c := &wlVkContext{
+ win: w,
+ inst: inst,
+ surf: surf,
+ ctx: ctx,
+ }
+ return c, nil
+ }
+}
+
+func (c *wlVkContext) RenderTarget() (gpu.RenderTarget, error) {
+ return c.ctx.RenderTarget()
+}
+
+func (c *wlVkContext) API() gpu.API {
+ return c.ctx.api()
+}
+
+func (c *wlVkContext) Release() {
+ c.ctx.release()
+ if c.surf != 0 {
+ vk.DestroySurface(c.inst, c.surf)
+ }
+ vk.DestroyInstance(c.inst)
+ *c = wlVkContext{}
+}
+
+func (c *wlVkContext) Present() error {
+ return c.ctx.present()
+}
+
+func (c *wlVkContext) Lock() error {
+ return nil
+}
+
+func (c *wlVkContext) Unlock() {}
+
+func (c *wlVkContext) Refresh() error {
+ win, w, h := c.win.nativeWindow()
+ if c.surf != 0 {
+ c.ctx.destroySwapchain()
+ vk.DestroySurface(c.inst, c.surf)
+ c.surf = 0
+ }
+ surf, err := vk.CreateAndroidSurface(c.inst, unsafe.Pointer(win))
+ if err != nil {
+ return err
+ }
+ c.surf = surf
+ return c.ctx.refresh(c.surf, w, h)
+}
diff --git a/vendor/gioui.org/app/vulkan_wayland.go b/vendor/gioui.org/app/vulkan_wayland.go
new file mode 100644
index 0000000..7bf0662
--- /dev/null
+++ b/vendor/gioui.org/app/vulkan_wayland.go
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build ((linux && !android) || freebsd) && !nowayland && !novulkan
+// +build linux,!android freebsd
+// +build !nowayland
+// +build !novulkan
+
+package app
+
+import (
+ "unsafe"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/vk"
+)
+
+type wlVkContext struct {
+ win *window
+ inst vk.Instance
+ surf vk.Surface
+ ctx *vkContext
+}
+
+func init() {
+ newWaylandVulkanContext = func(w *window) (context, error) {
+ inst, err := vk.CreateInstance("VK_KHR_surface", "VK_KHR_wayland_surface")
+ if err != nil {
+ return nil, err
+ }
+ disp := w.display()
+ wlSurf, _, _ := w.surface()
+ surf, err := vk.CreateWaylandSurface(inst, unsafe.Pointer(disp), unsafe.Pointer(wlSurf))
+ if err != nil {
+ vk.DestroyInstance(inst)
+ return nil, err
+ }
+ ctx, err := newVulkanContext(inst, surf)
+ if err != nil {
+ vk.DestroySurface(inst, surf)
+ vk.DestroyInstance(inst)
+ return nil, err
+ }
+ c := &wlVkContext{
+ win: w,
+ inst: inst,
+ surf: surf,
+ ctx: ctx,
+ }
+ return c, nil
+ }
+}
+
+func (c *wlVkContext) RenderTarget() (gpu.RenderTarget, error) {
+ return c.ctx.RenderTarget()
+}
+
+func (c *wlVkContext) API() gpu.API {
+ return c.ctx.api()
+}
+
+func (c *wlVkContext) Release() {
+ c.ctx.release()
+ vk.DestroySurface(c.inst, c.surf)
+ vk.DestroyInstance(c.inst)
+ *c = wlVkContext{}
+}
+
+func (c *wlVkContext) Present() error {
+ return c.ctx.present()
+}
+
+func (c *wlVkContext) Lock() error {
+ return nil
+}
+
+func (c *wlVkContext) Unlock() {}
+
+func (c *wlVkContext) Refresh() error {
+ _, w, h := c.win.surface()
+ return c.ctx.refresh(c.surf, w, h)
+}
diff --git a/vendor/gioui.org/app/vulkan_x11.go b/vendor/gioui.org/app/vulkan_x11.go
new file mode 100644
index 0000000..cf97774
--- /dev/null
+++ b/vendor/gioui.org/app/vulkan_x11.go
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build ((linux && !android) || freebsd) && !nox11 && !novulkan
+// +build linux,!android freebsd
+// +build !nox11
+// +build !novulkan
+
+package app
+
+import (
+ "unsafe"
+
+ "gioui.org/gpu"
+ "gioui.org/internal/vk"
+)
+
+type x11VkContext struct {
+ win *x11Window
+ inst vk.Instance
+ surf vk.Surface
+ ctx *vkContext
+}
+
+func init() {
+ newX11VulkanContext = func(w *x11Window) (context, error) {
+ inst, err := vk.CreateInstance("VK_KHR_surface", "VK_KHR_xlib_surface")
+ if err != nil {
+ return nil, err
+ }
+ disp := w.display()
+ window, _, _ := w.window()
+ surf, err := vk.CreateXlibSurface(inst, unsafe.Pointer(disp), uintptr(window))
+ if err != nil {
+ vk.DestroyInstance(inst)
+ return nil, err
+ }
+ ctx, err := newVulkanContext(inst, surf)
+ if err != nil {
+ vk.DestroySurface(inst, surf)
+ vk.DestroyInstance(inst)
+ return nil, err
+ }
+ c := &x11VkContext{
+ win: w,
+ inst: inst,
+ surf: surf,
+ ctx: ctx,
+ }
+ return c, nil
+ }
+}
+
+func (c *x11VkContext) RenderTarget() (gpu.RenderTarget, error) {
+ return c.ctx.RenderTarget()
+}
+
+func (c *x11VkContext) API() gpu.API {
+ return c.ctx.api()
+}
+
+func (c *x11VkContext) Release() {
+ c.ctx.release()
+ vk.DestroySurface(c.inst, c.surf)
+ vk.DestroyInstance(c.inst)
+ *c = x11VkContext{}
+}
+
+func (c *x11VkContext) Present() error {
+ return c.ctx.present()
+}
+
+func (c *x11VkContext) Lock() error {
+ return nil
+}
+
+func (c *x11VkContext) Unlock() {}
+
+func (c *x11VkContext) Refresh() error {
+ _, w, h := c.win.window()
+ return c.ctx.refresh(c.surf, w, h)
+}
diff --git a/vendor/gioui.org/app/internal/window/wayland_text_input.c b/vendor/gioui.org/app/wayland_text_input.c
index a69af09..65de0bb 100644
--- a/vendor/gioui.org/app/internal/window/wayland_text_input.c
+++ b/vendor/gioui.org/app/wayland_text_input.c
@@ -1,6 +1,8 @@
-// +build linux,!android,!nowayland freebsd
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
-/* Generated by wayland-scanner 1.17.0 */
+/* Generated by wayland-scanner 1.19.0 */
/*
* Copyright © 2012, 2013 Intel Corporation
@@ -48,7 +50,7 @@ extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_text_input_v3_interface;
-static const struct wl_interface *types[] = {
+static const struct wl_interface *text_input_unstable_v3_types[] = {
NULL,
NULL,
NULL,
@@ -60,23 +62,23 @@ static const struct wl_interface *types[] = {
};
static const struct wl_message zwp_text_input_v3_requests[] = {
- { "destroy", "", types + 0 },
- { "enable", "", types + 0 },
- { "disable", "", types + 0 },
- { "set_surrounding_text", "sii", types + 0 },
- { "set_text_change_cause", "u", types + 0 },
- { "set_content_type", "uu", types + 0 },
- { "set_cursor_rectangle", "iiii", types + 0 },
- { "commit", "", types + 0 },
+ { "destroy", "", text_input_unstable_v3_types + 0 },
+ { "enable", "", text_input_unstable_v3_types + 0 },
+ { "disable", "", text_input_unstable_v3_types + 0 },
+ { "set_surrounding_text", "sii", text_input_unstable_v3_types + 0 },
+ { "set_text_change_cause", "u", text_input_unstable_v3_types + 0 },
+ { "set_content_type", "uu", text_input_unstable_v3_types + 0 },
+ { "set_cursor_rectangle", "iiii", text_input_unstable_v3_types + 0 },
+ { "commit", "", text_input_unstable_v3_types + 0 },
};
static const struct wl_message zwp_text_input_v3_events[] = {
- { "enter", "o", types + 4 },
- { "leave", "o", types + 5 },
- { "preedit_string", "?sii", types + 0 },
- { "commit_string", "?s", types + 0 },
- { "delete_surrounding_text", "uu", types + 0 },
- { "done", "u", types + 0 },
+ { "enter", "o", text_input_unstable_v3_types + 4 },
+ { "leave", "o", text_input_unstable_v3_types + 5 },
+ { "preedit_string", "?sii", text_input_unstable_v3_types + 0 },
+ { "commit_string", "?s", text_input_unstable_v3_types + 0 },
+ { "delete_surrounding_text", "uu", text_input_unstable_v3_types + 0 },
+ { "done", "u", text_input_unstable_v3_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_text_input_v3_interface = {
@@ -86,8 +88,8 @@ WL_PRIVATE const struct wl_interface zwp_text_input_v3_interface = {
};
static const struct wl_message zwp_text_input_manager_v3_requests[] = {
- { "destroy", "", types + 0 },
- { "get_text_input", "no", types + 6 },
+ { "destroy", "", text_input_unstable_v3_types + 0 },
+ { "get_text_input", "no", text_input_unstable_v3_types + 6 },
};
WL_PRIVATE const struct wl_interface zwp_text_input_manager_v3_interface = {
diff --git a/vendor/gioui.org/app/internal/window/wayland_text_input.h b/vendor/gioui.org/app/wayland_text_input.h
index 8a6f8dd..882da43 100644
--- a/vendor/gioui.org/app/internal/window/wayland_text_input.h
+++ b/vendor/gioui.org/app/wayland_text_input.h
@@ -1,4 +1,4 @@
-/* Generated by wayland-scanner 1.17.0 */
+/* Generated by wayland-scanner 1.19.0 */
#ifndef TEXT_INPUT_UNSTABLE_V3_CLIENT_PROTOCOL_H
#define TEXT_INPUT_UNSTABLE_V3_CLIENT_PROTOCOL_H
@@ -71,6 +71,8 @@ struct wl_surface;
struct zwp_text_input_manager_v3;
struct zwp_text_input_v3;
+#ifndef ZWP_TEXT_INPUT_V3_INTERFACE
+#define ZWP_TEXT_INPUT_V3_INTERFACE
/**
* @page page_iface_zwp_text_input_v3 zwp_text_input_v3
* @section page_iface_zwp_text_input_v3_desc Description
@@ -135,6 +137,9 @@ struct zwp_text_input_v3;
* needs to be resent by the client.
*/
extern const struct wl_interface zwp_text_input_v3_interface;
+#endif
+#ifndef ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE
+#define ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE
/**
* @page page_iface_zwp_text_input_manager_v3 zwp_text_input_manager_v3
* @section page_iface_zwp_text_input_manager_v3_desc Description
@@ -149,6 +154,7 @@ extern const struct wl_interface zwp_text_input_v3_interface;
* A factory for text-input objects. This object is a global singleton.
*/
extern const struct wl_interface zwp_text_input_manager_v3_interface;
+#endif
#ifndef ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM
#define ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM
@@ -310,6 +316,9 @@ struct zwp_text_input_v3_listener {
* Notification that this seat's text-input focus is on a certain
* surface.
*
+ * If client has created multiple text input objects, compositor
+ * must send this event to all of them.
+ *
* When the seat has the keyboard capability the text-input focus
* follows the keyboard focus. This event sets the current surface
* for the text-input object.
@@ -325,7 +334,9 @@ struct zwp_text_input_v3_listener {
* previously set.
*
* The leave notification clears the current surface. It is sent
- * before the enter notification for the new focus.
+ * before the enter notification for the new focus. After leave
+ * event, compositor must ignore requests from any text input
+ * instances until next enter event.
*
* When the seat has the keyboard capability the text-input focus
* follows the keyboard focus.
@@ -559,6 +570,12 @@ zwp_text_input_v3_destroy(struct zwp_text_input_v3 *zwp_text_input_v3)
* zwp_text_input_v3.disable when there is no longer any input focus on
* the current surface.
*
+ * Clients must not enable more than one text input on the single seat
+ * and should disable the current text input before enabling the new one.
+ * At most one instance of text input may be in enabled state per instance,
+ * Requests to enable the another text input when some text input is active
+ * must be ignored by compositor.
+ *
* This request resets all state associated with previous enable, disable,
* set_surrounding_text, set_text_change_cause, set_content_type, and
* set_cursor_rectangle requests, as well as the state associated with
diff --git a/vendor/gioui.org/app/internal/window/wayland_xdg_decoration.c b/vendor/gioui.org/app/wayland_xdg_decoration.c
index fa13d7c..ee94c60 100644
--- a/vendor/gioui.org/app/internal/window/wayland_xdg_decoration.c
+++ b/vendor/gioui.org/app/wayland_xdg_decoration.c
@@ -1,6 +1,8 @@
-// +build linux,!android,!nowayland freebsd
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
-/* Generated by wayland-scanner 1.17.0 */
+/* Generated by wayland-scanner 1.19.0 */
/*
* Copyright © 2018 Simon Ser
@@ -42,15 +44,15 @@
extern const struct wl_interface xdg_toplevel_interface;
extern const struct wl_interface zxdg_toplevel_decoration_v1_interface;
-static const struct wl_interface *types[] = {
+static const struct wl_interface *xdg_decoration_unstable_v1_types[] = {
NULL,
&zxdg_toplevel_decoration_v1_interface,
&xdg_toplevel_interface,
};
static const struct wl_message zxdg_decoration_manager_v1_requests[] = {
- { "destroy", "", types + 0 },
- { "get_toplevel_decoration", "no", types + 1 },
+ { "destroy", "", xdg_decoration_unstable_v1_types + 0 },
+ { "get_toplevel_decoration", "no", xdg_decoration_unstable_v1_types + 1 },
};
WL_PRIVATE const struct wl_interface zxdg_decoration_manager_v1_interface = {
@@ -60,13 +62,13 @@ WL_PRIVATE const struct wl_interface zxdg_decoration_manager_v1_interface = {
};
static const struct wl_message zxdg_toplevel_decoration_v1_requests[] = {
- { "destroy", "", types + 0 },
- { "set_mode", "u", types + 0 },
- { "unset_mode", "", types + 0 },
+ { "destroy", "", xdg_decoration_unstable_v1_types + 0 },
+ { "set_mode", "u", xdg_decoration_unstable_v1_types + 0 },
+ { "unset_mode", "", xdg_decoration_unstable_v1_types + 0 },
};
static const struct wl_message zxdg_toplevel_decoration_v1_events[] = {
- { "configure", "u", types + 0 },
+ { "configure", "u", xdg_decoration_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zxdg_toplevel_decoration_v1_interface = {
diff --git a/vendor/gioui.org/app/internal/window/wayland_xdg_decoration.h b/vendor/gioui.org/app/wayland_xdg_decoration.h
index 044ea2e..004d342 100644
--- a/vendor/gioui.org/app/internal/window/wayland_xdg_decoration.h
+++ b/vendor/gioui.org/app/wayland_xdg_decoration.h
@@ -1,4 +1,4 @@
-/* Generated by wayland-scanner 1.17.0 */
+/* Generated by wayland-scanner 1.19.0 */
#ifndef XDG_DECORATION_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define XDG_DECORATION_UNSTABLE_V1_CLIENT_PROTOCOL_H
@@ -45,6 +45,8 @@ struct xdg_toplevel;
struct zxdg_decoration_manager_v1;
struct zxdg_toplevel_decoration_v1;
+#ifndef ZXDG_DECORATION_MANAGER_V1_INTERFACE
+#define ZXDG_DECORATION_MANAGER_V1_INTERFACE
/**
* @page page_iface_zxdg_decoration_manager_v1 zxdg_decoration_manager_v1
* @section page_iface_zxdg_decoration_manager_v1_desc Description
@@ -101,6 +103,9 @@ struct zxdg_toplevel_decoration_v1;
* interface version number is reset.
*/
extern const struct wl_interface zxdg_decoration_manager_v1_interface;
+#endif
+#ifndef ZXDG_TOPLEVEL_DECORATION_V1_INTERFACE
+#define ZXDG_TOPLEVEL_DECORATION_V1_INTERFACE
/**
* @page page_iface_zxdg_toplevel_decoration_v1 zxdg_toplevel_decoration_v1
* @section page_iface_zxdg_toplevel_decoration_v1_desc Description
@@ -125,6 +130,7 @@ extern const struct wl_interface zxdg_decoration_manager_v1_interface;
* xdg_toplevel.
*/
extern const struct wl_interface zxdg_toplevel_decoration_v1_interface;
+#endif
#define ZXDG_DECORATION_MANAGER_V1_DESTROY 0
#define ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION 1
@@ -332,7 +338,7 @@ zxdg_toplevel_decoration_v1_destroy(struct zxdg_toplevel_decoration_v1 *zxdg_top
* that the client prefers the provided decoration mode.
*
* After requesting a decoration mode, the compositor will respond by
- * emitting a xdg_surface.configure event. The client should then update
+ * emitting an xdg_surface.configure event. The client should then update
* its content, drawing it without decorations if the received mode is
* server-side decorations. The client must also acknowledge the configure
* when committing the new content (see xdg_surface.ack_configure).
@@ -341,7 +347,7 @@ zxdg_toplevel_decoration_v1_destroy(struct zxdg_toplevel_decoration_v1 *zxdg_top
* different mode instead.
*
* Clients whose decoration mode depend on the xdg_toplevel state may send
- * a set_mode request in response to a xdg_surface.configure event and wait
+ * a set_mode request in response to an xdg_surface.configure event and wait
* for the next xdg_surface.configure event to prevent unwanted state.
* Such clients are responsible for preventing configure loops and must
* make sure not to send multiple successive set_mode requests with the
diff --git a/vendor/gioui.org/app/wayland_xdg_shell.c b/vendor/gioui.org/app/wayland_xdg_shell.c
new file mode 100644
index 0000000..54fe5cf
--- /dev/null
+++ b/vendor/gioui.org/app/wayland_xdg_shell.c
@@ -0,0 +1,185 @@
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
+
+/* Generated by wayland-scanner 1.19.0 */
+
+/*
+ * Copyright © 2008-2013 Kristian Høgsberg
+ * Copyright © 2013 Rafael Antognolli
+ * Copyright © 2013 Jasper St. Pierre
+ * Copyright © 2010-2013 Intel Corporation
+ * Copyright © 2015-2017 Samsung Electronics Co., Ltd
+ * Copyright © 2015-2017 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_output_interface;
+extern const struct wl_interface wl_seat_interface;
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface xdg_popup_interface;
+extern const struct wl_interface xdg_positioner_interface;
+extern const struct wl_interface xdg_surface_interface;
+extern const struct wl_interface xdg_toplevel_interface;
+
+static const struct wl_interface *xdg_shell_types[] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &xdg_positioner_interface,
+ &xdg_surface_interface,
+ &wl_surface_interface,
+ &xdg_toplevel_interface,
+ &xdg_popup_interface,
+ &xdg_surface_interface,
+ &xdg_positioner_interface,
+ &xdg_toplevel_interface,
+ &wl_seat_interface,
+ NULL,
+ NULL,
+ NULL,
+ &wl_seat_interface,
+ NULL,
+ &wl_seat_interface,
+ NULL,
+ NULL,
+ &wl_output_interface,
+ &wl_seat_interface,
+ NULL,
+ &xdg_positioner_interface,
+ NULL,
+};
+
+static const struct wl_message xdg_wm_base_requests[] = {
+ { "destroy", "", xdg_shell_types + 0 },
+ { "create_positioner", "n", xdg_shell_types + 4 },
+ { "get_xdg_surface", "no", xdg_shell_types + 5 },
+ { "pong", "u", xdg_shell_types + 0 },
+};
+
+static const struct wl_message xdg_wm_base_events[] = {
+ { "ping", "u", xdg_shell_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
+ "xdg_wm_base", 3,
+ 4, xdg_wm_base_requests,
+ 1, xdg_wm_base_events,
+};
+
+static const struct wl_message xdg_positioner_requests[] = {
+ { "destroy", "", xdg_shell_types + 0 },
+ { "set_size", "ii", xdg_shell_types + 0 },
+ { "set_anchor_rect", "iiii", xdg_shell_types + 0 },
+ { "set_anchor", "u", xdg_shell_types + 0 },
+ { "set_gravity", "u", xdg_shell_types + 0 },
+ { "set_constraint_adjustment", "u", xdg_shell_types + 0 },
+ { "set_offset", "ii", xdg_shell_types + 0 },
+ { "set_reactive", "3", xdg_shell_types + 0 },
+ { "set_parent_size", "3ii", xdg_shell_types + 0 },
+ { "set_parent_configure", "3u", xdg_shell_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
+ "xdg_positioner", 3,
+ 10, xdg_positioner_requests,
+ 0, NULL,
+};
+
+static const struct wl_message xdg_surface_requests[] = {
+ { "destroy", "", xdg_shell_types + 0 },
+ { "get_toplevel", "n", xdg_shell_types + 7 },
+ { "get_popup", "n?oo", xdg_shell_types + 8 },
+ { "set_window_geometry", "iiii", xdg_shell_types + 0 },
+ { "ack_configure", "u", xdg_shell_types + 0 },
+};
+
+static const struct wl_message xdg_surface_events[] = {
+ { "configure", "u", xdg_shell_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface xdg_surface_interface = {
+ "xdg_surface", 3,
+ 5, xdg_surface_requests,
+ 1, xdg_surface_events,
+};
+
+static const struct wl_message xdg_toplevel_requests[] = {
+ { "destroy", "", xdg_shell_types + 0 },
+ { "set_parent", "?o", xdg_shell_types + 11 },
+ { "set_title", "s", xdg_shell_types + 0 },
+ { "set_app_id", "s", xdg_shell_types + 0 },
+ { "show_window_menu", "ouii", xdg_shell_types + 12 },
+ { "move", "ou", xdg_shell_types + 16 },
+ { "resize", "ouu", xdg_shell_types + 18 },
+ { "set_max_size", "ii", xdg_shell_types + 0 },
+ { "set_min_size", "ii", xdg_shell_types + 0 },
+ { "set_maximized", "", xdg_shell_types + 0 },
+ { "unset_maximized", "", xdg_shell_types + 0 },
+ { "set_fullscreen", "?o", xdg_shell_types + 21 },
+ { "unset_fullscreen", "", xdg_shell_types + 0 },
+ { "set_minimized", "", xdg_shell_types + 0 },
+};
+
+static const struct wl_message xdg_toplevel_events[] = {
+ { "configure", "iia", xdg_shell_types + 0 },
+ { "close", "", xdg_shell_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
+ "xdg_toplevel", 3,
+ 14, xdg_toplevel_requests,
+ 2, xdg_toplevel_events,
+};
+
+static const struct wl_message xdg_popup_requests[] = {
+ { "destroy", "", xdg_shell_types + 0 },
+ { "grab", "ou", xdg_shell_types + 22 },
+ { "reposition", "3ou", xdg_shell_types + 24 },
+};
+
+static const struct wl_message xdg_popup_events[] = {
+ { "configure", "iiii", xdg_shell_types + 0 },
+ { "popup_done", "", xdg_shell_types + 0 },
+ { "repositioned", "3u", xdg_shell_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface xdg_popup_interface = {
+ "xdg_popup", 3,
+ 3, xdg_popup_requests,
+ 3, xdg_popup_events,
+};
+
diff --git a/vendor/gioui.org/app/internal/window/wayland_xdg_shell.h b/vendor/gioui.org/app/wayland_xdg_shell.h
index 1f4bfb5..1db8fd9 100644
--- a/vendor/gioui.org/app/internal/window/wayland_xdg_shell.h
+++ b/vendor/gioui.org/app/wayland_xdg_shell.h
@@ -1,4 +1,4 @@
-/* Generated by wayland-scanner 1.17.0 */
+/* Generated by wayland-scanner 1.19.0 */
#ifndef XDG_SHELL_CLIENT_PROTOCOL_H
#define XDG_SHELL_CLIENT_PROTOCOL_H
@@ -58,6 +58,8 @@ struct xdg_surface;
struct xdg_toplevel;
struct xdg_wm_base;
+#ifndef XDG_WM_BASE_INTERFACE
+#define XDG_WM_BASE_INTERFACE
/**
* @page page_iface_xdg_wm_base xdg_wm_base
* @section page_iface_xdg_wm_base_desc Description
@@ -80,6 +82,9 @@ struct xdg_wm_base;
* creating transient windows such as popup menus.
*/
extern const struct wl_interface xdg_wm_base_interface;
+#endif
+#ifndef XDG_POSITIONER_INTERFACE
+#define XDG_POSITIONER_INTERFACE
/**
* @page page_iface_xdg_positioner xdg_positioner
* @section page_iface_xdg_positioner_desc Description
@@ -130,6 +135,9 @@ extern const struct wl_interface xdg_wm_base_interface;
* positioning a surface raises an error.
*/
extern const struct wl_interface xdg_positioner_interface;
+#endif
+#ifndef XDG_SURFACE_INTERFACE
+#define XDG_SURFACE_INTERFACE
/**
* @page page_iface_xdg_surface xdg_surface
* @section page_iface_xdg_surface_desc Description
@@ -159,6 +167,11 @@ extern const struct wl_interface xdg_positioner_interface;
* manipulate a buffer prior to the first xdg_surface.configure call must
* also be treated as errors.
*
+ * After creating a role-specific object and setting it up, the client must
+ * perform an initial commit without any buffer attached. The compositor
+ * will reply with an xdg_surface.configure event. The client must
+ * acknowledge it and is then allowed to attach a buffer to map the surface.
+ *
* Mapping an xdg_surface-based role surface is defined as making it
* possible for the surface to be shown by the compositor. Note that
* a mapped surface is not guaranteed to be visible once it is mapped.
@@ -204,6 +217,11 @@ extern const struct wl_interface xdg_positioner_interface;
* manipulate a buffer prior to the first xdg_surface.configure call must
* also be treated as errors.
*
+ * After creating a role-specific object and setting it up, the client must
+ * perform an initial commit without any buffer attached. The compositor
+ * will reply with an xdg_surface.configure event. The client must
+ * acknowledge it and is then allowed to attach a buffer to map the surface.
+ *
* Mapping an xdg_surface-based role surface is defined as making it
* possible for the surface to be shown by the compositor. Note that
* a mapped surface is not guaranteed to be visible once it is mapped.
@@ -220,6 +238,9 @@ extern const struct wl_interface xdg_positioner_interface;
* has not been destroyed.
*/
extern const struct wl_interface xdg_surface_interface;
+#endif
+#ifndef XDG_TOPLEVEL_INTERFACE
+#define XDG_TOPLEVEL_INTERFACE
/**
* @page page_iface_xdg_toplevel xdg_toplevel
* @section page_iface_xdg_toplevel_desc Description
@@ -234,7 +255,11 @@ extern const struct wl_interface xdg_surface_interface;
* by the compositor until it is explicitly mapped again.
* All active operations (e.g., move, resize) are canceled and all
* attributes (e.g. title, state, stacking, ...) are discarded for
- * an xdg_toplevel surface when it is unmapped.
+ * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
+ * the state it had right after xdg_surface.get_toplevel. The client
+ * can re-map the toplevel by perfoming a commit without any buffer
+ * attached, waiting for a configure event and handling it as usual (see
+ * xdg_surface description).
*
* Attaching a null buffer to a toplevel unmaps the surface.
* @section page_iface_xdg_toplevel_api API
@@ -253,11 +278,18 @@ extern const struct wl_interface xdg_surface_interface;
* by the compositor until it is explicitly mapped again.
* All active operations (e.g., move, resize) are canceled and all
* attributes (e.g. title, state, stacking, ...) are discarded for
- * an xdg_toplevel surface when it is unmapped.
+ * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
+ * the state it had right after xdg_surface.get_toplevel. The client
+ * can re-map the toplevel by perfoming a commit without any buffer
+ * attached, waiting for a configure event and handling it as usual (see
+ * xdg_surface description).
*
* Attaching a null buffer to a toplevel unmaps the surface.
*/
extern const struct wl_interface xdg_toplevel_interface;
+#endif
+#ifndef XDG_POPUP_INTERFACE
+#define XDG_POPUP_INTERFACE
/**
* @page page_iface_xdg_popup xdg_popup
* @section page_iface_xdg_popup_desc Description
@@ -284,12 +316,6 @@ extern const struct wl_interface xdg_toplevel_interface;
* The parent of an xdg_popup must be mapped (see the xdg_surface
* description) before the xdg_popup itself.
*
- * The x and y arguments passed when creating the popup object specify
- * where the top left of the popup should be placed, relative to the
- * local surface coordinates of the parent surface. See
- * xdg_surface.get_popup. An xdg_popup must intersect with or be at least
- * partially adjacent to its parent surface.
- *
* The client must call wl_surface.commit on the corresponding wl_surface
* for the xdg_popup state to take effect.
* @section page_iface_xdg_popup_api API
@@ -320,16 +346,11 @@ extern const struct wl_interface xdg_toplevel_interface;
* The parent of an xdg_popup must be mapped (see the xdg_surface
* description) before the xdg_popup itself.
*
- * The x and y arguments passed when creating the popup object specify
- * where the top left of the popup should be placed, relative to the
- * local surface coordinates of the parent surface. See
- * xdg_surface.get_popup. An xdg_popup must intersect with or be at least
- * partially adjacent to its parent surface.
- *
* The client must call wl_surface.commit on the corresponding wl_surface
* for the xdg_popup state to take effect.
*/
extern const struct wl_interface xdg_popup_interface;
+#endif
#ifndef XDG_WM_BASE_ERROR_ENUM
#define XDG_WM_BASE_ERROR_ENUM
@@ -587,6 +608,9 @@ enum xdg_positioner_constraint_adjustment {
#define XDG_POSITIONER_SET_GRAVITY 4
#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT 5
#define XDG_POSITIONER_SET_OFFSET 6
+#define XDG_POSITIONER_SET_REACTIVE 7
+#define XDG_POSITIONER_SET_PARENT_SIZE 8
+#define XDG_POSITIONER_SET_PARENT_CONFIGURE 9
/**
@@ -617,6 +641,18 @@ enum xdg_positioner_constraint_adjustment {
* @ingroup iface_xdg_positioner
*/
#define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_REACTIVE_SINCE_VERSION 3
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_PARENT_SIZE_SINCE_VERSION 3
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_PARENT_CONFIGURE_SINCE_VERSION 3
/** @ingroup iface_xdg_positioner */
static inline void
@@ -769,6 +805,56 @@ xdg_positioner_set_offset(struct xdg_positioner *xdg_positioner, int32_t x, int3
XDG_POSITIONER_SET_OFFSET, x, y);
}
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * When set reactive, the surface is reconstrained if the conditions used
+ * for constraining changed, e.g. the parent window moved.
+ *
+ * If the conditions changed and the popup was reconstrained, an
+ * xdg_popup.configure event is sent with updated geometry, followed by an
+ * xdg_surface.configure event.
+ */
+static inline void
+xdg_positioner_set_reactive(struct xdg_positioner *xdg_positioner)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_REACTIVE);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Set the parent window geometry the compositor should use when
+ * positioning the popup. The compositor may use this information to
+ * determine the future state the popup should be constrained using. If
+ * this doesn't match the dimension of the parent the popup is eventually
+ * positioned against, the behavior is undefined.
+ *
+ * The arguments are given in the surface-local coordinate space.
+ */
+static inline void
+xdg_positioner_set_parent_size(struct xdg_positioner *xdg_positioner, int32_t parent_width, int32_t parent_height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_PARENT_SIZE, parent_width, parent_height);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Set the serial of an xdg_surface.configure event this positioner will be
+ * used in response to. The compositor may use this information together
+ * with set_parent_size to determine what future state the popup should be
+ * constrained using.
+ */
+static inline void
+xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_PARENT_CONFIGURE, serial);
+}
+
#ifndef XDG_SURFACE_ERROR_ENUM
#define XDG_SURFACE_ERROR_ENUM
enum xdg_surface_error {
@@ -1691,6 +1777,12 @@ struct xdg_popup_listener {
* The x and y arguments represent the position the popup was
* placed at given the xdg_positioner rule, relative to the upper
* left corner of the window geometry of the parent surface.
+ *
+ * For version 2 or older, the configure event for an xdg_popup is
+ * only ever sent once for the initial configuration. Starting with
+ * version 3, it may be sent again if the popup is setup with an
+ * xdg_positioner with set_reactive requested, or in response to
+ * xdg_popup.reposition requests.
* @param x x position relative to parent surface window geometry
* @param y y position relative to parent surface window geometry
* @param width window geometry width
@@ -1711,6 +1803,32 @@ struct xdg_popup_listener {
*/
void (*popup_done)(void *data,
struct xdg_popup *xdg_popup);
+ /**
+ * signal the completion of a repositioned request
+ *
+ * The repositioned event is sent as part of a popup
+ * configuration sequence, together with xdg_popup.configure and
+ * lastly xdg_surface.configure to notify the completion of a
+ * reposition request.
+ *
+ * The repositioned event is to notify about the completion of a
+ * xdg_popup.reposition request. The token argument is the token
+ * passed in the xdg_popup.reposition request.
+ *
+ * Immediately after this event is emitted, xdg_popup.configure and
+ * xdg_surface.configure will be sent with the updated size and
+ * position, as well as a new configure serial.
+ *
+ * The client should optionally update the content of the popup,
+ * but must acknowledge the new popup configuration for the new
+ * position to take effect. See xdg_surface.ack_configure for
+ * details.
+ * @param token reposition request token
+ * @since 3
+ */
+ void (*repositioned)(void *data,
+ struct xdg_popup *xdg_popup,
+ uint32_t token);
};
/**
@@ -1726,6 +1844,7 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup,
#define XDG_POPUP_DESTROY 0
#define XDG_POPUP_GRAB 1
+#define XDG_POPUP_REPOSITION 2
/**
* @ingroup iface_xdg_popup
@@ -1735,6 +1854,10 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup,
* @ingroup iface_xdg_popup
*/
#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_REPOSITIONED_SINCE_VERSION 3
/**
* @ingroup iface_xdg_popup
@@ -1744,6 +1867,10 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup,
* @ingroup iface_xdg_popup
*/
#define XDG_POPUP_GRAB_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_REPOSITION_SINCE_VERSION 3
/** @ingroup iface_xdg_popup */
static inline void
@@ -1835,6 +1962,40 @@ xdg_popup_grab(struct xdg_popup *xdg_popup, struct wl_seat *seat, uint32_t seria
XDG_POPUP_GRAB, seat, serial);
}
+/**
+ * @ingroup iface_xdg_popup
+ *
+ * Reposition an already-mapped popup. The popup will be placed given the
+ * details in the passed xdg_positioner object, and a
+ * xdg_popup.repositioned followed by xdg_popup.configure and
+ * xdg_surface.configure will be emitted in response. Any parameters set
+ * by the previous positioner will be discarded.
+ *
+ * The passed token will be sent in the corresponding
+ * xdg_popup.repositioned event. The new popup position will not take
+ * effect until the corresponding configure event is acknowledged by the
+ * client. See xdg_popup.repositioned for details. The token itself is
+ * opaque, and has no other special meaning.
+ *
+ * If multiple reposition requests are sent, the compositor may skip all
+ * but the last one.
+ *
+ * If the popup is repositioned in response to a configure event for its
+ * parent, the client should send an xdg_positioner.set_parent_configure
+ * and possibly an xdg_positioner.set_parent_size request to allow the
+ * compositor to properly constrain the popup.
+ *
+ * If the popup is repositioned together with a parent that is being
+ * resized, but not in response to a configure event, the client should
+ * send an xdg_positioner.set_parent_size request.
+ */
+static inline void
+xdg_popup_reposition(struct xdg_popup *xdg_popup, struct xdg_positioner *positioner, uint32_t token)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_popup,
+ XDG_POPUP_REPOSITION, positioner, token);
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/vendor/gioui.org/app/window.go b/vendor/gioui.org/app/window.go
index 2c9860c..ada92fb 100644
--- a/vendor/gioui.org/app/window.go
+++ b/vendor/gioui.org/app/window.go
@@ -6,10 +6,14 @@ import (
"errors"
"fmt"
"image"
+ "image/color"
+ "runtime"
"time"
- "gioui.org/app/internal/window"
+ "gioui.org/f32"
+ "gioui.org/gpu"
"gioui.org/io/event"
+ "gioui.org/io/pointer"
"gioui.org/io/profile"
"gioui.org/io/router"
"gioui.org/io/system"
@@ -19,24 +23,32 @@ import (
_ "gioui.org/app/internal/log"
)
-// WindowOption configures a Window.
-type Option func(opts *window.Options)
+// Option configures a window.
+type Option func(unit.Metric, *Config)
// Window represents an operating system window.
type Window struct {
- driver window.Driver
- loop *renderLoop
+ ctx context
+ gpu gpu.GPU
// driverFuncs is a channel of functions to run when
// the Window has a valid driver.
- driverFuncs chan func()
-
- out chan event.Event
- in chan event.Event
- ack chan struct{}
- invalidates chan struct{}
- frames chan *op.Ops
- frameAck chan struct{}
+ driverFuncs chan func(d driver)
+ // wakeups wakes up the native event loop to send a
+ // WakeupEvent that flushes driverFuncs.
+ wakeups chan struct{}
+ // wakeupFuncs is sent wakeup functions when the driver changes.
+ wakeupFuncs chan func()
+ // redraws is notified when a redraw is requested by the client.
+ redraws chan struct{}
+ // immediateRedraws is like redraw but doesn't need a wakeup.
+ immediateRedraws chan struct{}
+ // scheduledRedraws is sent the most recent delayed redraw time.
+ scheduledRedraws chan time.Time
+
+ out chan event.Event
+ frames chan *op.Ops
+ frameAck chan struct{}
// dead is closed when the window is destroyed.
dead chan struct{}
@@ -46,13 +58,33 @@ type Window struct {
nextFrame time.Time
delayedDraw *time.Timer
- queue queue
+ queue queue
+ cursor pointer.CursorName
callbacks callbacks
+
+ nocontext bool
+
+ // semantic data, lazily evaluated if requested by a backend to speed up
+ // the cases where semantic data is not needed.
+ semantic struct {
+ // uptodate tracks whether the fields below are up to date.
+ uptodate bool
+ root router.SemanticID
+ prevTree []router.SemanticNode
+ tree []router.SemanticNode
+ ids map[router.SemanticID]router.SemanticNode
+ }
+}
+
+type semanticResult struct {
+ found bool
+ node router.SemanticNode
}
type callbacks struct {
w *Window
+ d driver
}
// queue is an event.Queue implementation that distributes system events
@@ -61,12 +93,6 @@ type queue struct {
q router.Router
}
-// driverEvent is sent when a new native driver
-// is available for the Window.
-type driverEvent struct {
- driver window.Driver
-}
-
// Pre-allocate the ack event to avoid garbage.
var ackEvent event.Event
@@ -74,35 +100,37 @@ var ackEvent event.Event
// options. The options are hints; the platform is free to
// ignore or adjust them.
//
-// If the current program is running on iOS and Android,
+// If the current program is running on iOS or Android,
// NewWindow returns the window previously created by the
// platform.
//
// Calling NewWindow more than once is not supported on
// iOS, Android, WebAssembly.
func NewWindow(options ...Option) *Window {
- opts := &window.Options{
- Width: unit.Dp(800),
- Height: unit.Dp(600),
- Title: "Gio",
- }
-
- for _, o := range options {
- o(opts)
+ defaultOptions := []Option{
+ Size(unit.Dp(800), unit.Dp(600)),
+ Title("Gio"),
}
+ options = append(defaultOptions, options...)
+ var cnf Config
+ cnf.apply(unit.Metric{}, options)
w := &Window{
- in: make(chan event.Event),
- out: make(chan event.Event),
- ack: make(chan struct{}),
- invalidates: make(chan struct{}, 1),
- frames: make(chan *op.Ops),
- frameAck: make(chan struct{}),
- driverFuncs: make(chan func()),
- dead: make(chan struct{}),
+ out: make(chan event.Event),
+ immediateRedraws: make(chan struct{}, 0),
+ redraws: make(chan struct{}, 1),
+ scheduledRedraws: make(chan time.Time, 1),
+ frames: make(chan *op.Ops),
+ frameAck: make(chan struct{}),
+ driverFuncs: make(chan func(d driver), 1),
+ wakeups: make(chan struct{}, 1),
+ wakeupFuncs: make(chan func()),
+ dead: make(chan struct{}),
+ nocontext: cnf.CustomRenderer,
}
+ w.semantic.ids = make(map[router.SemanticID]router.SemanticNode)
w.callbacks.w = w
- go w.run(opts)
+ go w.run(options)
return w
}
@@ -111,141 +139,260 @@ func (w *Window) Events() <-chan event.Event {
return w.out
}
-// update updates the Window. Paint operations updates the
-// window contents, input operations declare input handlers,
-// and so on. The supplied operations list completely replaces
-// the window state from previous calls.
+// update updates the window contents, input operations declare input handlers,
+// and so on. The supplied operations list completely replaces the window state
+// from previous calls.
func (w *Window) update(frame *op.Ops) {
w.frames <- frame
<-w.frameAck
}
-func (w *Window) validateAndProcess(frameStart time.Time, size image.Point, sync bool, frame *op.Ops) error {
+func (w *Window) validateAndProcess(d driver, frameStart time.Time, size image.Point, sync bool, frame *op.Ops) error {
for {
- if w.loop != nil {
- if err := w.loop.Flush(); err != nil {
+ if w.gpu == nil && !w.nocontext {
+ var err error
+ if w.ctx == nil {
+ w.ctx, err = d.NewContext()
+ if err != nil {
+ return err
+ }
+ sync = true
+ }
+ }
+ if sync && w.ctx != nil {
+ if err := w.ctx.Refresh(); err != nil {
+ if errors.Is(err, errOutOfDate) {
+ // Surface couldn't be created for transient reasons. Skip
+ // this frame and wait for the next.
+ return nil
+ }
w.destroyGPU()
- if err == window.ErrDeviceLost {
+ if errors.Is(err, gpu.ErrDeviceLost) {
continue
}
return err
}
}
- if w.loop == nil {
- var ctx window.Context
- ctx, err := w.driver.NewContext()
- if err != nil {
+ if w.gpu == nil && !w.nocontext {
+ if err := w.ctx.Lock(); err != nil {
+ w.destroyGPU()
return err
}
- w.loop, err = newLoop(ctx)
+ gpu, err := gpu.New(w.ctx.API())
+ w.ctx.Unlock()
if err != nil {
- ctx.Release()
+ w.destroyGPU()
return err
}
+ w.gpu = gpu
}
- w.processFrame(frameStart, size, frame)
- if sync {
- if err := w.loop.Flush(); err != nil {
+ if w.gpu != nil {
+ if err := w.render(frame, size); err != nil {
+ if errors.Is(err, errOutOfDate) {
+ // GPU surface needs refreshing.
+ sync = true
+ continue
+ }
w.destroyGPU()
- if err == window.ErrDeviceLost {
+ if errors.Is(err, gpu.ErrDeviceLost) {
continue
}
return err
}
}
+ w.processFrame(d, frameStart, frame)
return nil
}
}
-func (w *Window) processFrame(frameStart time.Time, size image.Point, frame *op.Ops) {
- sync := w.loop.Draw(size, frame)
+func (w *Window) render(frame *op.Ops, viewport image.Point) error {
+ if err := w.ctx.Lock(); err != nil {
+ return err
+ }
+ defer w.ctx.Unlock()
+ if runtime.GOOS == "js" {
+ // Use transparent black when Gio is embedded, to allow mixing of Gio and
+ // foreign content below.
+ w.gpu.Clear(color.NRGBA{A: 0x00, R: 0x00, G: 0x00, B: 0x00})
+ } else {
+ w.gpu.Clear(color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
+ }
+ target, err := w.ctx.RenderTarget()
+ if err != nil {
+ return err
+ }
+ if err := w.gpu.Frame(frame, target, viewport); err != nil {
+ return err
+ }
+ return w.ctx.Present()
+}
+
+func (w *Window) processFrame(d driver, frameStart time.Time, frame *op.Ops) {
w.queue.q.Frame(frame)
+ for k := range w.semantic.ids {
+ delete(w.semantic.ids, k)
+ }
+ w.semantic.uptodate = false
switch w.queue.q.TextInputState() {
case router.TextInputOpen:
- w.driver.ShowTextInput(true)
+ d.ShowTextInput(true)
case router.TextInputClose:
- w.driver.ShowTextInput(false)
+ d.ShowTextInput(false)
+ }
+ if hint, ok := w.queue.q.TextInputHint(); ok {
+ d.SetInputHint(hint)
+ }
+ if txt, ok := w.queue.q.WriteClipboard(); ok {
+ w.WriteClipboard(txt)
+ }
+ if w.queue.q.ReadClipboard() {
+ w.ReadClipboard()
}
- if w.queue.q.Profiling() {
+ if w.queue.q.Profiling() && w.gpu != nil {
frameDur := time.Since(frameStart)
frameDur = frameDur.Truncate(100 * time.Microsecond)
q := 100 * time.Microsecond
- timings := fmt.Sprintf("tot:%7s %s", frameDur.Round(q), w.loop.Summary())
- w.queue.q.Add(profile.Event{Timings: timings})
+ timings := fmt.Sprintf("tot:%7s %s", frameDur.Round(q), w.gpu.Profile())
+ w.queue.q.Queue(profile.Event{Timings: timings})
}
if t, ok := w.queue.q.WakeupTime(); ok {
w.setNextFrame(t)
}
- w.updateAnimation()
- // Wait for the GPU goroutine to finish processing frame.
- <-sync
+ w.updateAnimation(d)
}
-// Invalidate the window such that a FrameEvent will be generated
-// immediately. If the window is inactive, the event is sent when the
-// window becomes active.
+// Invalidate the window such that a FrameEvent will be generated immediately.
+// If the window is inactive, the event is sent when the window becomes active.
+//
+// Note that Invalidate is intended for externally triggered updates, such as a
+// response from a network request. InvalidateOp is more efficient for animation
+// and similar internal updates.
+//
// Invalidate is safe for concurrent use.
func (w *Window) Invalidate() {
select {
- case w.invalidates <- struct{}{}:
+ case w.immediateRedraws <- struct{}{}:
+ return
default:
}
+ select {
+ case w.redraws <- struct{}{}:
+ w.wakeup()
+ default:
+ }
+}
+
+// Option applies the options to the window.
+func (w *Window) Option(opts ...Option) {
+ w.driverDefer(func(d driver) {
+ d.Configure(opts)
+ })
}
// ReadClipboard initiates a read of the clipboard in the form
-// of a system.ClipboardEvent. Multiple reads may be coalescedd
+// of a clipboard.Event. Multiple reads may be coalesced
// to a single event.
func (w *Window) ReadClipboard() {
- w.driverDo(func() {
- w.driver.ReadClipboard()
+ w.driverDefer(func(d driver) {
+ d.ReadClipboard()
})
}
// WriteClipboard writes a string to the clipboard.
func (w *Window) WriteClipboard(s string) {
- w.driverDo(func() {
- w.driver.WriteClipboard(s)
+ w.driverDefer(func(d driver) {
+ d.WriteClipboard(s)
+ })
+}
+
+// SetCursorName changes the current window cursor to name.
+func (w *Window) SetCursorName(name pointer.CursorName) {
+ w.driverDefer(func(d driver) {
+ d.SetCursor(name)
})
}
// Close the window. The window's event loop should exit when it receives
// system.DestroyEvent.
//
-// Currently, only macOS, Windows and X11 drivers implement this functionality,
+// Currently, only macOS, Windows, X11 and Wayland drivers implement this functionality,
// all others are stubbed.
func (w *Window) Close() {
- w.driverDo(func() {
- w.driver.Close()
+ w.driverDefer(func(d driver) {
+ d.Close()
})
}
-// driverDo calls f as soon as the window has a valid driver attached,
-// or does nothing if the window is destroyed while waiting.
-func (w *Window) driverDo(f func()) {
- go func() {
- select {
- case w.driverFuncs <- f:
- case <-w.dead:
- }
- }()
+// Maximize the window.
+// Note: only implemented on Windows, macOS and X11.
+func (w *Window) Maximize() {
+ w.driverDefer(func(d driver) {
+ d.Maximize()
+ })
}
-func (w *Window) updateAnimation() {
- animate := false
- if w.delayedDraw != nil {
- w.delayedDraw.Stop()
- w.delayedDraw = nil
+// Center the window.
+// Note: only implemented on Windows, macOS and X11.
+func (w *Window) Center() {
+ w.driverDefer(func(d driver) {
+ d.Center()
+ })
+}
+
+// Run f in the same thread as the native window event loop, and wait for f to
+// return or the window to close. Run is guaranteed not to deadlock if it is
+// invoked during the handling of a ViewEvent, system.FrameEvent,
+// system.StageEvent; call Run in a separate goroutine to avoid deadlock in all
+// other cases.
+//
+// Note that most programs should not call Run; configuring a Window with
+// CustomRenderer is a notable exception.
+func (w *Window) Run(f func()) {
+ done := make(chan struct{})
+ w.driverDefer(func(d driver) {
+ defer close(done)
+ f()
+ })
+ select {
+ case <-done:
+ case <-w.dead:
}
+}
+
+// driverDefer is like Run but can be run from any context. It doesn't wait
+// for f to return.
+func (w *Window) driverDefer(f func(d driver)) {
+ select {
+ case w.driverFuncs <- f:
+ w.wakeup()
+ case <-w.dead:
+ }
+}
+
+func (w *Window) updateAnimation(d driver) {
+ animate := false
if w.stage >= system.StageRunning && w.hasNextFrame {
if dt := time.Until(w.nextFrame); dt <= 0 {
animate = true
} else {
- w.delayedDraw = time.NewTimer(dt)
+ // Schedule redraw.
+ select {
+ case <-w.scheduledRedraws:
+ default:
+ }
+ w.scheduledRedraws <- w.nextFrame
}
}
if animate != w.animating {
w.animating = animate
- w.driver.SetAnimating(animate)
+ d.SetAnimating(animate)
+ }
+}
+
+func (w *Window) wakeup() {
+ select {
+ case w.wakeups <- struct{}{}:
+ default:
}
}
@@ -256,164 +403,289 @@ func (w *Window) setNextFrame(at time.Time) {
}
}
-func (c *callbacks) SetDriver(d window.Driver) {
- c.Event(driverEvent{d})
+func (c *callbacks) SetDriver(d driver) {
+ c.d = d
+ var wakeup func()
+ if d != nil {
+ wakeup = d.Wakeup
+ }
+ c.w.wakeupFuncs <- wakeup
}
func (c *callbacks) Event(e event.Event) {
- select {
- case c.w.in <- e:
- <-c.w.ack
- case <-c.w.dead:
+ if c.d == nil {
+ panic("event while no driver active")
}
+ c.w.processEvent(c.d, e)
+ c.w.updateState(c.d)
+}
+
+// SemanticRoot returns the ID of the semantic root.
+func (c *callbacks) SemanticRoot() router.SemanticID {
+ c.w.updateSemantics()
+ return c.w.semantic.root
}
-func (w *Window) waitAck() {
- // Send a dummy event; when it gets through we
- // know the application has processed the previous event.
- w.out <- ackEvent
+// LookupSemantic looks up a semantic node from an ID. The zero ID denotes the root.
+func (c *callbacks) LookupSemantic(semID router.SemanticID) (router.SemanticNode, bool) {
+ c.w.updateSemantics()
+ n, found := c.w.semantic.ids[semID]
+ return n, found
}
-// Prematurely destroy the window and wait for the native window
-// destroy event.
-func (w *Window) destroy(err error) {
- w.destroyGPU()
- // Ack the current event.
- w.ack <- struct{}{}
- w.out <- system.DestroyEvent{Err: err}
- close(w.dead)
- for e := range w.in {
- w.ack <- struct{}{}
- if _, ok := e.(system.DestroyEvent); ok {
+func (c *callbacks) AppendSemanticDiffs(diffs []router.SemanticID) []router.SemanticID {
+ c.w.updateSemantics()
+ if tree := c.w.semantic.prevTree; len(tree) > 0 {
+ c.w.collectSemanticDiffs(&diffs, c.w.semantic.prevTree[0])
+ }
+ return diffs
+}
+
+func (c *callbacks) SemanticAt(pos f32.Point) (router.SemanticID, bool) {
+ c.w.updateSemantics()
+ return c.w.queue.q.SemanticAt(pos)
+}
+
+func (w *Window) waitAck(d driver) {
+ for {
+ select {
+ case f := <-w.driverFuncs:
+ f(d)
+ case w.out <- ackEvent:
+ // A dummy event went through, so we know the application has processed the previous event.
return
+ case <-w.immediateRedraws:
+ // Invalidate was called during frame processing.
+ w.setNextFrame(time.Time{})
}
}
}
func (w *Window) destroyGPU() {
- if w.loop != nil {
- w.loop.Release()
- w.loop = nil
+ if w.gpu != nil {
+ w.ctx.Lock()
+ w.gpu.Release()
+ w.ctx.Unlock()
+ w.gpu = nil
+ }
+ if w.ctx != nil {
+ w.ctx.Release()
+ w.ctx = nil
}
}
// waitFrame waits for the client to either call FrameEvent.Frame
// or to continue event handling. It returns whether the client
// called Frame or not.
-func (w *Window) waitFrame() (*op.Ops, bool) {
+func (w *Window) waitFrame(d driver) (*op.Ops, bool) {
+ for {
+ select {
+ case f := <-w.driverFuncs:
+ f(d)
+ case frame := <-w.frames:
+ // The client called FrameEvent.Frame.
+ return frame, true
+ case w.out <- ackEvent:
+ // The client ignored FrameEvent and continued processing
+ // events.
+ return nil, false
+ case <-w.immediateRedraws:
+ // Invalidate was called during frame processing.
+ w.setNextFrame(time.Time{})
+ }
+ }
+}
+
+// updateSemantics refreshes the semantics tree, the id to node map and the ids of
+// updated nodes.
+func (w *Window) updateSemantics() {
+ if w.semantic.uptodate {
+ return
+ }
+ w.semantic.uptodate = true
+ w.semantic.prevTree, w.semantic.tree = w.semantic.tree, w.semantic.prevTree
+ w.semantic.tree = w.queue.q.AppendSemantics(w.semantic.tree[:0])
+ w.semantic.root = w.semantic.tree[0].ID
+ for _, n := range w.semantic.tree {
+ w.semantic.ids[n.ID] = n
+ }
+}
+
+// collectSemanticDiffs traverses the previous semantic tree, noting changed nodes.
+func (w *Window) collectSemanticDiffs(diffs *[]router.SemanticID, n router.SemanticNode) {
+ newNode, exists := w.semantic.ids[n.ID]
+ // Ignore deleted nodes, as their disappearance will be reported through an
+ // ancestor node.
+ if !exists {
+ return
+ }
+ diff := newNode.Desc != n.Desc || len(n.Children) != len(newNode.Children)
+ for i, ch := range n.Children {
+ if !diff {
+ newCh := newNode.Children[i]
+ diff = ch.ID != newCh.ID
+ }
+ w.collectSemanticDiffs(diffs, ch)
+ }
+ if diff {
+ *diffs = append(*diffs, n.ID)
+ }
+}
+
+func (w *Window) updateState(d driver) {
+ for {
+ select {
+ case f := <-w.driverFuncs:
+ f(d)
+ case <-w.redraws:
+ w.setNextFrame(time.Time{})
+ w.updateAnimation(d)
+ default:
+ return
+ }
+ }
+}
+
+func (w *Window) processEvent(d driver, e event.Event) {
select {
- case frame := <-w.frames:
- // The client called FrameEvent.Frame.
- return frame, true
- case w.out <- ackEvent:
- // The client ignored FrameEvent and continued processing
- // events.
- return nil, false
+ case <-w.dead:
+ return
+ default:
+ }
+ switch e2 := e.(type) {
+ case system.StageEvent:
+ if e2.Stage < system.StageRunning {
+ if w.gpu != nil {
+ w.ctx.Lock()
+ w.gpu.Release()
+ w.gpu = nil
+ w.ctx.Unlock()
+ }
+ }
+ w.stage = e2.Stage
+ w.updateAnimation(d)
+ w.out <- e
+ w.waitAck(d)
+ case frameEvent:
+ if e2.Size == (image.Point{}) {
+ panic(errors.New("internal error: zero-sized Draw"))
+ }
+ if w.stage < system.StageRunning {
+ // No drawing if not visible.
+ break
+ }
+ frameStart := time.Now()
+ w.hasNextFrame = false
+ e2.Frame = w.update
+ e2.Queue = &w.queue
+ w.out <- e2.FrameEvent
+ frame, gotFrame := w.waitFrame(d)
+ err := w.validateAndProcess(d, frameStart, e2.Size, e2.Sync, frame)
+ if gotFrame {
+ // We're done with frame, let the client continue.
+ w.frameAck <- struct{}{}
+ }
+ if err != nil {
+ w.destroyGPU()
+ w.out <- system.DestroyEvent{Err: err}
+ close(w.dead)
+ close(w.out)
+ break
+ }
+ w.updateCursor()
+ case *system.CommandEvent:
+ w.out <- e
+ w.waitAck(d)
+ case system.DestroyEvent:
+ w.destroyGPU()
+ w.out <- e2
+ close(w.dead)
+ close(w.out)
+ case ViewEvent:
+ w.out <- e2
+ w.waitAck(d)
+ case wakeupEvent:
+ case event.Event:
+ if w.queue.q.Queue(e2) {
+ w.setNextFrame(time.Time{})
+ w.updateAnimation(d)
+ }
+ w.updateCursor()
+ w.out <- e
}
}
-func (w *Window) run(opts *window.Options) {
- defer close(w.in)
- defer close(w.out)
- if err := window.NewWindow(&w.callbacks, opts); err != nil {
+func (w *Window) run(options []Option) {
+ if err := newWindow(&w.callbacks, options); err != nil {
w.out <- system.DestroyEvent{Err: err}
+ close(w.dead)
+ close(w.out)
return
}
+ var wakeup func()
+ var timer *time.Timer
for {
- var driverFuncs chan func()
- if w.driver != nil {
- driverFuncs = w.driverFuncs
- }
- var timer <-chan time.Time
- if w.delayedDraw != nil {
- timer = w.delayedDraw.C
+ var (
+ wakeups <-chan struct{}
+ timeC <-chan time.Time
+ )
+ if wakeup != nil {
+ wakeups = w.wakeups
+ if timer != nil {
+ timeC = timer.C
+ }
}
select {
- case <-timer:
- w.setNextFrame(time.Time{})
- w.updateAnimation()
- case <-w.invalidates:
- w.setNextFrame(time.Time{})
- w.updateAnimation()
- case f := <-driverFuncs:
- f()
- case e := <-w.in:
- switch e2 := e.(type) {
- case system.StageEvent:
- if w.loop != nil {
- if e2.Stage < system.StageRunning {
- w.destroyGPU()
- } else {
- w.loop.Refresh()
- }
- }
- w.stage = e2.Stage
- w.updateAnimation()
- w.out <- e
- w.waitAck()
- case window.FrameEvent:
- if e2.Size == (image.Point{}) {
- panic(errors.New("internal error: zero-sized Draw"))
- }
- if w.stage < system.StageRunning {
- // No drawing if not visible.
- break
- }
- frameStart := time.Now()
- w.hasNextFrame = false
- e2.Frame = w.update
- e2.Queue = &w.queue
- w.out <- e2.FrameEvent
- if w.loop != nil {
- if e2.Sync {
- w.loop.Refresh()
- }
- }
- frame, gotFrame := w.waitFrame()
- err := w.validateAndProcess(frameStart, e2.Size, e2.Sync, frame)
- if gotFrame {
- // We're done with frame, let the client continue.
- w.frameAck <- struct{}{}
- }
- if err != nil {
- w.destroyGPU()
- w.destroy(err)
- return
- }
- case *system.CommandEvent:
- w.out <- e
- w.waitAck()
- case driverEvent:
- w.driver = e2.driver
- case system.DestroyEvent:
- w.destroyGPU()
- w.out <- e2
- w.ack <- struct{}{}
- return
- case event.Event:
- if w.queue.q.Add(e2) {
- w.setNextFrame(time.Time{})
- w.updateAnimation()
- }
- w.out <- e
+ case t := <-w.scheduledRedraws:
+ if timer != nil {
+ timer.Stop()
}
- w.ack <- struct{}{}
+ timer = time.NewTimer(time.Until(t))
+ case <-w.dead:
+ return
+ case <-timeC:
+ select {
+ case w.redraws <- struct{}{}:
+ wakeup()
+ default:
+ }
+ case <-wakeups:
+ wakeup()
+ case wakeup = <-w.wakeupFuncs:
}
}
}
+func (w *Window) updateCursor() {
+ if c := w.queue.q.Cursor(); c != w.cursor {
+ w.cursor = c
+ w.SetCursorName(c)
+ }
+}
+
+// Raise requests that the platform bring this window to the top of all open windows.
+// Some platforms do not allow this except under certain circumstances, such as when
+// a window from the same application already has focus. If the platform does not
+// support it, this method will do nothing.
+func (w *Window) Raise() {
+ w.driverDefer(func(d driver) {
+ d.Raise()
+ })
+}
+
func (q *queue) Events(k event.Tag) []event.Event {
return q.q.Events(k)
}
// Title sets the title of the window.
func Title(t string) Option {
- return func(opts *window.Options) {
- opts.Title = t
+ return func(_ unit.Metric, cnf *Config) {
+ cnf.Title = t
}
}
-// Size sets the size of the window.
+// Size sets the size of the window. The option is ignored
+// in Fullscreen mode.
func Size(w, h unit.Value) Option {
if w.V <= 0 {
panic("width must be larger than or equal to 0")
@@ -421,9 +693,11 @@ func Size(w, h unit.Value) Option {
if h.V <= 0 {
panic("height must be larger than or equal to 0")
}
- return func(opts *window.Options) {
- opts.Width = w
- opts.Height = h
+ return func(m unit.Metric, cnf *Config) {
+ cnf.Size = image.Point{
+ X: m.Px(w),
+ Y: m.Px(h),
+ }
}
}
@@ -435,9 +709,11 @@ func MaxSize(w, h unit.Value) Option {
if h.V <= 0 {
panic("height must be larger than or equal to 0")
}
- return func(opts *window.Options) {
- opts.MaxWidth = w
- opts.MaxHeight = h
+ return func(m unit.Metric, cnf *Config) {
+ cnf.MaxSize = image.Point{
+ X: m.Px(w),
+ Y: m.Px(h),
+ }
}
}
@@ -449,10 +725,32 @@ func MinSize(w, h unit.Value) Option {
if h.V <= 0 {
panic("height must be larger than or equal to 0")
}
- return func(opts *window.Options) {
- opts.MinWidth = w
- opts.MinHeight = h
+ return func(m unit.Metric, cnf *Config) {
+ cnf.MinSize = image.Point{
+ X: m.Px(w),
+ Y: m.Px(h),
+ }
}
}
-func (driverEvent) ImplementsEvent() {}
+// StatusColor sets the color of the Android status bar.
+func StatusColor(color color.NRGBA) Option {
+ return func(_ unit.Metric, cnf *Config) {
+ cnf.StatusColor = color
+ }
+}
+
+// NavigationColor sets the color of the navigation bar on Android, or the address bar in browsers.
+func NavigationColor(color color.NRGBA) Option {
+ return func(_ unit.Metric, cnf *Config) {
+ cnf.NavigationColor = color
+ }
+}
+
+// CustomRenderer controls whether the window contents is
+// rendered by the client. If true, no GPU context is created.
+func CustomRenderer(custom bool) Option {
+ return func(_ unit.Metric, cnf *Config) {
+ cnf.CustomRenderer = custom
+ }
+}
diff --git a/vendor/gioui.org/cpu/LICENSE b/vendor/gioui.org/cpu/LICENSE
new file mode 100644
index 0000000..81f4733
--- /dev/null
+++ b/vendor/gioui.org/cpu/LICENSE
@@ -0,0 +1,63 @@
+This project is provided under the terms of the UNLICENSE or
+the MIT license denoted by the following SPDX identifier:
+
+SPDX-License-Identifier: Unlicense OR MIT
+
+You may use the project under the terms of either license.
+
+Both licenses are reproduced below.
+
+----
+The MIT License (MIT)
+
+Copyright (c) 2019 The Gio authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+---
+
+
+
+---
+The UNLICENSE
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <https://unlicense.org/>
+---
diff --git a/vendor/gioui.org/cpu/README.md b/vendor/gioui.org/cpu/README.md
new file mode 100644
index 0000000..4244fe0
--- /dev/null
+++ b/vendor/gioui.org/cpu/README.md
@@ -0,0 +1,25 @@
+# Compile and run compute programs on CPU
+
+This projects contains the compiler for turning Vulkan SPIR-V compute shaders
+into binaries for arm64, arm or amd64, using
+[SwiftShader](https://github.com/eliasnaur/swiftshader) with a few
+modifications. A runtime implemented in C and Go is available for running the
+resulting binaries.
+
+The primary use is to support a CPU-based rendering fallback for
+[Gio](https://gioui.org). In particular, the `gioui.org/shader/piet` package
+contains arm, arm64, amd64 binaries for
+[piet-gpu](https://github.com/linebender/piet-gpu).
+
+# Compiling and running shaders
+
+The `init.sh` script clones the modifed SwiftShader projects and builds it for
+64-bit and 32-bit. SwiftShader is not designed to cross-compile which is why a
+32-bit build is needed to compile shaders for arm.
+
+The `example/run.sh` script demonstrates compiling and running a simple compute
+program.
+
+## Issues and contributions
+
+See the [Gio contribution guide](https://gioui.org/doc/contribute).
diff --git a/vendor/gioui.org/cpu/abi.h b/vendor/gioui.org/cpu/abi.h
new file mode 100644
index 0000000..365d936
--- /dev/null
+++ b/vendor/gioui.org/cpu/abi.h
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#define ALIGN(bytes, type) type __attribute__((aligned(bytes)))
+
+typedef ALIGN(8, uint8_t) byte8[8];
+typedef ALIGN(8, uint16_t) word4[4];
+typedef ALIGN(4, uint32_t) dword;
+typedef ALIGN(16, uint32_t) dword4[4];
+typedef ALIGN(8, uint64_t) qword;
+typedef ALIGN(16, uint64_t) qword2[2];
+typedef ALIGN(16, unsigned int) uint4[4];
+typedef ALIGN(8, uint32_t) dword2[2];
+typedef ALIGN(8, unsigned short) ushort4[4];
+typedef ALIGN(16, float) float4[4];
+typedef ALIGN(16, int) int4[4];
+
+typedef unsigned short half;
+
+typedef unsigned char bool;
+
+enum {
+ MAX_BOUND_DESCRIPTOR_SETS = 4,
+ MAX_DESCRIPTOR_SET_UNIFORM_BUFFERS_DYNAMIC = 8,
+ MAX_DESCRIPTOR_SET_STORAGE_BUFFERS_DYNAMIC = 4,
+ MAX_DESCRIPTOR_SET_COMBINED_BUFFERS_DYNAMIC =
+ MAX_DESCRIPTOR_SET_UNIFORM_BUFFERS_DYNAMIC +
+ MAX_DESCRIPTOR_SET_STORAGE_BUFFERS_DYNAMIC,
+ MAX_PUSH_CONSTANT_SIZE = 128,
+
+ MIN_STORAGE_BUFFER_OFFSET_ALIGNMENT = 256,
+
+ REQUIRED_MEMORY_ALIGNMENT = 16,
+
+ SIMD_WIDTH = 4,
+};
+
+struct image_descriptor {
+ ALIGN(16, void *ptr);
+ int width;
+ int height;
+ int depth;
+ int row_pitch_bytes;
+ int slice_pitch_bytes;
+ int sample_pitch_bytes;
+ int sample_count;
+ int size_in_bytes;
+
+ void *stencil_ptr;
+ int stencil_row_pitch_bytes;
+ int stencil_slice_pitch_bytes;
+ int stencil_sample_pitch_bytes;
+
+ // TODO: unused?
+ void *memoryOwner;
+};
+
+struct buffer_descriptor {
+ ALIGN(16, void *ptr);
+ int size_in_bytes;
+ int robustness_size;
+};
+
+struct program_data {
+ uint8_t *descriptor_sets[MAX_BOUND_DESCRIPTOR_SETS];
+ uint32_t descriptor_dynamic_offsets[MAX_DESCRIPTOR_SET_COMBINED_BUFFERS_DYNAMIC];
+ uint4 num_workgroups;
+ uint4 workgroup_size;
+ uint32_t invocations_per_subgroup;
+ uint32_t subgroups_per_workgroup;
+ uint32_t invocations_per_workgroup;
+ unsigned char push_constants[MAX_PUSH_CONSTANT_SIZE];
+ // Unused.
+ void *constants;
+};
+
+typedef int32_t yield_result;
+
+typedef void * coroutine;
+
+typedef coroutine (*routine_begin)(struct program_data *data,
+ int32_t workgroupX,
+ int32_t workgroupY,
+ int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount);
+
+typedef bool (*routine_await)(coroutine r, yield_result *res);
+
+typedef void (*routine_destroy)(coroutine r);
+
diff --git a/vendor/gioui.org/cpu/driver.go b/vendor/gioui.org/cpu/driver.go
new file mode 100644
index 0000000..d156e2b
--- /dev/null
+++ b/vendor/gioui.org/cpu/driver.go
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package cpu
+
+/*
+#cgo CFLAGS: -std=c11 -D_POSIX_C_SOURCE=200112L
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+*/
+import "C"
+import (
+ "unsafe"
+)
+
+type (
+ BufferDescriptor = C.struct_buffer_descriptor
+ ImageDescriptor = C.struct_image_descriptor
+ SamplerDescriptor = C.struct_sampler_descriptor
+
+ DispatchContext = C.struct_dispatch_context
+ ThreadContext = C.struct_thread_context
+ ProgramInfo = C.struct_program_info
+)
+
+const Supported = true
+
+func NewBuffer(size int) BufferDescriptor {
+ return C.alloc_buffer(C.size_t(size))
+}
+
+func (d *BufferDescriptor) Data() []byte {
+ return (*(*[1 << 30]byte)(d.ptr))[:d.size_in_bytes:d.size_in_bytes]
+}
+
+func (d *BufferDescriptor) Free() {
+ if d.ptr != nil {
+ C.free(d.ptr)
+ }
+ *d = BufferDescriptor{}
+}
+
+func NewImageRGBA(width, height int) ImageDescriptor {
+ return C.alloc_image_rgba(C.int(width), C.int(height))
+}
+
+func (d *ImageDescriptor) Data() []byte {
+ return (*(*[1 << 30]byte)(d.ptr))[:d.size_in_bytes:d.size_in_bytes]
+}
+
+func (d *ImageDescriptor) Free() {
+ if d.ptr != nil {
+ C.free(d.ptr)
+ }
+ *d = ImageDescriptor{}
+}
+
+func NewDispatchContext() *DispatchContext {
+ return C.alloc_dispatch_context()
+}
+
+func (c *DispatchContext) Free() {
+ C.free_dispatch_context(c)
+}
+
+func (c *DispatchContext) Prepare(numThreads int, prog *ProgramInfo, descSet unsafe.Pointer, x, y, z int) {
+ C.prepare_dispatch(c, C.int(numThreads), prog, (*C.uint8_t)(descSet), C.int(x), C.int(y), C.int(z))
+}
+
+func (c *DispatchContext) Dispatch(threadIdx int, ctx *ThreadContext) {
+ C.dispatch_thread(c, C.int(threadIdx), ctx)
+}
+
+func NewThreadContext() *ThreadContext {
+ return C.alloc_thread_context()
+}
+
+func (c *ThreadContext) Free() {
+ C.free_thread_context(c)
+}
diff --git a/vendor/gioui.org/cpu/driver_nosupport.go b/vendor/gioui.org/cpu/driver_nosupport.go
new file mode 100644
index 0000000..3a118f2
--- /dev/null
+++ b/vendor/gioui.org/cpu/driver_nosupport.go
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package cpu
+
+import "unsafe"
+
+type (
+ BufferDescriptor struct{}
+ ImageDescriptor struct{}
+ SamplerDescriptor struct{}
+
+ DispatchContext struct{}
+ ThreadContext struct{}
+ ProgramInfo struct{}
+)
+
+const Supported = false
+
+func NewBuffer(size int) BufferDescriptor {
+ panic("unsupported")
+}
+
+func (d *BufferDescriptor) Data() []byte {
+ panic("unsupported")
+}
+
+func (d *BufferDescriptor) Free() {
+}
+
+func NewImageRGBA(width, height int) ImageDescriptor {
+ panic("unsupported")
+}
+
+func (d *ImageDescriptor) Data() []byte {
+ panic("unsupported")
+}
+
+func (d *ImageDescriptor) Free() {
+}
+
+func NewDispatchContext() *DispatchContext {
+ panic("unsupported")
+}
+
+func (c *DispatchContext) Free() {
+}
+
+func (c *DispatchContext) Prepare(numThreads int, prog *ProgramInfo, descSet unsafe.Pointer, x, y, z int) {
+ panic("unsupported")
+}
+
+func (c *DispatchContext) Dispatch(threadIdx int, ctx *ThreadContext) {
+ panic("unsupported")
+}
+
+func NewThreadContext() *ThreadContext {
+ panic("unsupported")
+}
+
+func (c *ThreadContext) Free() {
+}
diff --git a/vendor/gioui.org/cpu/embed.go b/vendor/gioui.org/cpu/embed.go
new file mode 100644
index 0000000..9d3b944
--- /dev/null
+++ b/vendor/gioui.org/cpu/embed.go
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package cpu
+
+import _ "embed"
+
+//go:embed abi.h
+var ABIH []byte
+
+//go:embed runtime.h
+var RuntimeH []byte
diff --git a/vendor/gioui.org/cpu/go.mod b/vendor/gioui.org/cpu/go.mod
new file mode 100644
index 0000000..46709a0
--- /dev/null
+++ b/vendor/gioui.org/cpu/go.mod
@@ -0,0 +1,3 @@
+module gioui.org/cpu
+
+go 1.17
diff --git a/vendor/gioui.org/cpu/go.sum b/vendor/gioui.org/cpu/go.sum
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vendor/gioui.org/cpu/go.sum
diff --git a/vendor/gioui.org/cpu/init.sh b/vendor/gioui.org/cpu/init.sh
new file mode 100644
index 0000000..f0f0a9c
--- /dev/null
+++ b/vendor/gioui.org/cpu/init.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# SPDX-License-Identifier: Unlicense OR MIT
+
+set -e
+
+cd ~/.cache
+git clone https://github.com/eliasnaur/swiftshader
+cd swiftshader
+
+# 32-bit build
+cp -a build build.32bit
+cd build.32bit
+CXX=clang++ CC=clang CFLAGS=-m32 CXXFLAGS=-m32 cmake -DREACTOR_EMIT_ASM_FILE=true -DSWIFTSHADER_BUILD_PVR=false -DSWIFTSHADER_BUILD_TESTS=false -DSWIFTSHADER_BUILD_GLESv2=false -DSWIFTSHADER_BUILD_EGL=false -DSWIFTSHADER_BUILD_ANGLE=false ..
+cmake --build . --parallel 4
+cd ..
+
+# 64-bit build
+cp -a build build.64bit
+cd build.64bit
+CXX=clang++ CC=clang cmake -DREACTOR_EMIT_ASM_FILE=true -DSWIFTSHADER_BUILD_PVR=false -DSWIFTSHADER_BUILD_TESTS=false -DSWIFTSHADER_BUILD_GLESv2=false -DSWIFTSHADER_BUILD_EGL=false -DSWIFTSHADER_BUILD_ANGLE=false ..
+cmake --build . --parallel 4
+cd ..
diff --git a/vendor/gioui.org/cpu/runtime.c b/vendor/gioui.org/cpu/runtime.c
new file mode 100644
index 0000000..f7f6108
--- /dev/null
+++ b/vendor/gioui.org/cpu/runtime.c
@@ -0,0 +1,245 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "abi.h"
+#include "runtime.h"
+#include "_cgo_export.h"
+
+// coroutines is a FIFO queue of coroutines implemented as a circular
+// buffer.
+struct coroutines {
+ coroutine *routines;
+ // start and end indexes into routines.
+ unsigned int start;
+ unsigned int end;
+ // cap is the capacity of routines.
+ unsigned int cap;
+};
+
+struct dispatch_context {
+ // descriptor_set is the aligned storage for the descriptor set.
+ void *descriptor_set;
+ int desc_set_size;
+
+ int nthreads;
+ bool has_cbarriers;
+ size_t memory_size;
+ // Program entrypoints.
+ routine_begin begin;
+ routine_await await;
+ routine_destroy destroy;
+
+ struct program_data data;
+};
+
+struct thread_context {
+ struct coroutines routines;
+ size_t memory_size;
+ uint8_t *memory;
+};
+
+static void *malloc_align(size_t alignment, size_t size) {
+ void *ptr;
+ int ret = posix_memalign(&ptr, alignment, size);
+ assert(ret == 0);
+ return ptr;
+}
+
+static void coroutines_dump(struct coroutines *routines) {
+ fprintf(stderr, "s: %d e: %d c: %d [", routines->start, routines->end, routines->cap);
+ unsigned int i = routines->start;
+ while (i != routines->end) {
+ fprintf(stderr, "%p,", routines->routines[routines->start]);
+ i = (i + 1)%routines->cap;
+ }
+ fprintf(stderr, "]\n");
+}
+
+static void coroutines_push(struct coroutines *routines, coroutine r) {
+ unsigned int next = routines->end + 1;
+ if (next >= routines->cap) {
+ next = 0;
+ }
+ if (next == routines->start) {
+ unsigned int newcap = routines->cap*2;
+ if (newcap < 10) {
+ newcap = 10;
+ }
+ routines->routines = realloc(routines->routines, newcap*sizeof(coroutine));
+ // Move elements wrapped around the old cap to the newly allocated space.
+ if (routines->end < routines->start) {
+ unsigned int nelems = routines->end;
+ unsigned int max = newcap - routines->cap;
+ // We doubled the space above, so we can assume enough room.
+ assert(nelems <= max);
+ memmove(&routines->routines[routines->cap], &routines->routines[0], nelems*sizeof(coroutine));
+ routines->end += routines->cap;
+ }
+ routines->cap = newcap;
+ next = (routines->end + 1)%routines->cap;
+ }
+ routines->routines[routines->end] = r;
+ routines->end = next;
+}
+
+static bool coroutines_pop(struct coroutines *routines, coroutine *r) {
+ if (routines->start == routines->end) {
+ return 0;
+ }
+ *r = routines->routines[routines->start];
+ routines->start = (routines->start + 1)%routines->cap;
+ return 1;
+}
+
+static void coroutines_free(struct coroutines *routines) {
+ if (routines->routines != NULL) {
+ free(routines->routines);
+ }
+ struct coroutines clr = { 0 }; *routines = clr;
+}
+
+struct dispatch_context *alloc_dispatch_context(void) {
+ struct dispatch_context *c = malloc(sizeof(*c));
+ assert(c != NULL);
+ struct dispatch_context clr = { 0 }; *c = clr;
+ return c;
+}
+
+void free_dispatch_context(struct dispatch_context *c) {
+ if (c->descriptor_set != NULL) {
+ free(c->descriptor_set);
+ c->descriptor_set = NULL;
+ }
+}
+
+struct thread_context *alloc_thread_context(void) {
+ struct thread_context *c = malloc(sizeof(*c));
+ assert(c != NULL);
+ struct thread_context clr = { 0 }; *c = clr;
+ return c;
+}
+
+void free_thread_context(struct thread_context *c) {
+ if (c->memory != NULL) {
+ free(c->memory);
+ }
+ coroutines_free(&c->routines);
+ struct thread_context clr = { 0 }; *c = clr;
+}
+
+struct buffer_descriptor alloc_buffer(size_t size) {
+ void *buf = malloc_align(MIN_STORAGE_BUFFER_OFFSET_ALIGNMENT, size);
+ struct buffer_descriptor desc = {
+ .ptr = buf,
+ .size_in_bytes = size,
+ .robustness_size = size,
+ };
+ return desc;
+}
+
+struct image_descriptor alloc_image_rgba(int width, int height) {
+ size_t size = width*height*4;
+ size = (size + 16 - 1)&~(16 - 1);
+ void *storage = malloc_align(REQUIRED_MEMORY_ALIGNMENT, size);
+ struct image_descriptor desc = { 0 };
+ desc.ptr = storage;
+ desc.width = width;
+ desc.height = height;
+ desc.depth = 1;
+ desc.row_pitch_bytes = width*4;
+ desc.slice_pitch_bytes = size;
+ desc.sample_pitch_bytes = size;
+ desc.sample_count = 1;
+ desc.size_in_bytes = size;
+ return desc;
+}
+
+void prepare_dispatch(struct dispatch_context *ctx, int nthreads, struct program_info *info, uint8_t *desc_set, int ngroupx, int ngroupy, int ngroupz) {
+ if (ctx->desc_set_size < info->desc_set_size) {
+ if (ctx->descriptor_set != NULL) {
+ free(ctx->descriptor_set);
+ }
+ ctx->descriptor_set = malloc_align(16, info->desc_set_size);
+ ctx->desc_set_size = info->desc_set_size;
+ }
+ memcpy(ctx->descriptor_set, desc_set, info->desc_set_size);
+
+ int invocations_per_subgroup = SIMD_WIDTH;
+ int invocations_per_workgroup = info->workgroup_size_x * info->workgroup_size_y * info->workgroup_size_z;
+ int subgroups_per_workgroup = (invocations_per_workgroup + invocations_per_subgroup - 1) / invocations_per_subgroup;
+
+ ctx->has_cbarriers = info->has_cbarriers;
+ ctx->begin = info->begin;
+ ctx->await = info->await;
+ ctx->destroy = info->destroy;
+ ctx->nthreads = nthreads;
+ ctx->memory_size = info->min_memory_size;
+
+ ctx->data.workgroup_size[0] = info->workgroup_size_x;
+ ctx->data.workgroup_size[1] = info->workgroup_size_y;
+ ctx->data.workgroup_size[2] = info->workgroup_size_z;
+ ctx->data.num_workgroups[0] = ngroupx;
+ ctx->data.num_workgroups[1] = ngroupy;
+ ctx->data.num_workgroups[2] = ngroupz;
+ ctx->data.invocations_per_subgroup = invocations_per_subgroup;
+ ctx->data.invocations_per_workgroup = invocations_per_workgroup;
+ ctx->data.subgroups_per_workgroup = subgroups_per_workgroup;
+ ctx->data.descriptor_sets[0] = ctx->descriptor_set;
+}
+
+void dispatch_thread(struct dispatch_context *ctx, int thread_idx, struct thread_context *thread) {
+ if (thread->memory_size < ctx->memory_size) {
+ if (thread->memory != NULL) {
+ free(thread->memory);
+ }
+ // SwiftShader doesn't seem to align shared memory. However, better safe
+ // than subtle errors. Note that the program info generator pads
+ // memory_size to ensure space for alignment.
+ thread->memory = malloc_align(16, ctx->memory_size);
+ thread->memory_size = ctx->memory_size;
+ }
+ uint8_t *memory = thread->memory;
+
+ struct program_data *data = &ctx->data;
+
+ int sx = data->num_workgroups[0];
+ int sy = data->num_workgroups[1];
+ int sz = data->num_workgroups[2];
+ int ngroups = sx * sy * sz;
+
+ for (int i = thread_idx; i < ngroups; i += ctx->nthreads) {
+ int group_id = i;
+ int z = group_id / (sx * sy);
+ group_id -= z * sx * sy;
+ int y = group_id / sx;
+ group_id -= y * sx;
+ int x = group_id;
+ if (ctx->has_cbarriers) {
+ for (int subgroup = 0; subgroup < data->subgroups_per_workgroup; subgroup++) {
+ coroutine r = ctx->begin(data, x, y, z, memory, subgroup, 1);
+ coroutines_push(&thread->routines, r);
+ }
+ } else {
+ coroutine r = ctx->begin(data, x, y, z, memory, 0, data->subgroups_per_workgroup);
+ coroutines_push(&thread->routines, r);
+ }
+ coroutine r;
+ while (coroutines_pop(&thread->routines, &r)) {
+ yield_result res;
+ if (ctx->await(r, &res)) {
+ coroutines_push(&thread->routines, r);
+ } else {
+ ctx->destroy(r);
+ }
+ }
+ }
+}
diff --git a/vendor/gioui.org/cpu/runtime.h b/vendor/gioui.org/cpu/runtime.h
new file mode 100644
index 0000000..cfae912
--- /dev/null
+++ b/vendor/gioui.org/cpu/runtime.h
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#define ATTR_HIDDEN __attribute__ ((visibility ("hidden")))
+
+// program_info contains constant parameters for a program.
+struct program_info {
+ // MinMemorySize is the minimum size of memory passed to dispatch.
+ size_t min_memory_size;
+ // has_cbarriers is 1 when the program contains control barriers.
+ bool has_cbarriers;
+ // desc_set_size is the size of the first descriptor set for the program.
+ size_t desc_set_size;
+ int workgroup_size_x;
+ int workgroup_size_y;
+ int workgroup_size_z;
+ // Program entrypoints.
+ routine_begin begin;
+ routine_await await;
+ routine_destroy destroy;
+};
+
+// dispatch_context contains the information a program dispatch.
+struct dispatch_context;
+
+// thread_context contains the working memory of a batch. It may be
+// reused, but not concurrently.
+struct thread_context;
+
+extern struct buffer_descriptor alloc_buffer(size_t size) ATTR_HIDDEN;
+extern struct image_descriptor alloc_image_rgba(int width, int height) ATTR_HIDDEN;
+
+extern struct dispatch_context *alloc_dispatch_context(void) ATTR_HIDDEN;
+
+extern void free_dispatch_context(struct dispatch_context *c) ATTR_HIDDEN;
+
+extern struct thread_context *alloc_thread_context(void) ATTR_HIDDEN;
+
+extern void free_thread_context(struct thread_context *c) ATTR_HIDDEN;
+
+// prepare_dispatch initializes ctx to run a dispatch of a program distributed
+// among nthreads threads.
+extern void prepare_dispatch(struct dispatch_context *ctx, int nthreads, struct program_info *info, uint8_t *desc_set, int ngroupx, int ngroupy, int ngroupz) ATTR_HIDDEN;
+
+// dispatch_batch executes a dispatch batch.
+extern void dispatch_thread(struct dispatch_context *ctx, int thread_idx, struct thread_context *thread) ATTR_HIDDEN;
diff --git a/vendor/gioui.org/f32/affine.go b/vendor/gioui.org/f32/affine.go
index 44e914b..667f7e9 100644
--- a/vendor/gioui.org/f32/affine.go
+++ b/vendor/gioui.org/f32/affine.go
@@ -3,6 +3,7 @@
package f32
import (
+ "fmt"
"math"
)
@@ -11,7 +12,7 @@ import (
type Affine2D struct {
// in order to make the zero value of Affine2D represent the identity
// transform we store it with the identity matrix subtracted, that is
- // if the actual transformaiton matrix is:
+ // if the actual transformation matrix is:
// [sx, hx, ox]
// [hy, sy, oy]
// [ 0, 0, 1]
@@ -24,9 +25,9 @@ type Affine2D struct {
// in row major order. The rows are: [sx, hx, ox], [hy, sy, oy], [0, 0, 1].
func NewAffine2D(sx, hx, ox, hy, sy, oy float32) Affine2D {
return Affine2D{
- a: sx, b: hx, c: ox,
- d: hy, e: sy, f: oy,
- }.encode()
+ a: sx - 1, b: hx, c: ox,
+ d: hy, e: sy - 1, f: oy,
+ }
}
// Offset the transformation.
@@ -69,14 +70,13 @@ func (a Affine2D) Shear(origin Point, radiansX, radiansY float32) Affine2D {
// Mul returns A*B.
func (A Affine2D) Mul(B Affine2D) (r Affine2D) {
- A, B = A.decode(), B.decode()
- r.a = A.a*B.a + A.b*B.d
- r.b = A.a*B.b + A.b*B.e
- r.c = A.a*B.c + A.b*B.f + A.c
- r.d = A.d*B.a + A.e*B.d
- r.e = A.d*B.b + A.e*B.e
- r.f = A.d*B.c + A.e*B.f + A.f
- return r.encode()
+ r.a = (A.a+1)*(B.a+1) + A.b*B.d - 1
+ r.b = (A.a+1)*B.b + A.b*(B.e+1)
+ r.c = (A.a+1)*B.c + A.b*B.f + A.c
+ r.d = A.d*(B.a+1) + (A.e+1)*B.d
+ r.e = A.d*B.b + (A.e+1)*(B.e+1) - 1
+ r.f = A.d*B.c + (A.e+1)*B.f + A.f
+ return r
}
// Invert the transformation. Note that if the matrix is close to singular
@@ -85,70 +85,59 @@ func (a Affine2D) Invert() Affine2D {
if a.a == 0 && a.b == 0 && a.d == 0 && a.e == 0 {
return Affine2D{a: 0, b: 0, c: -a.c, d: 0, e: 0, f: -a.f}
}
- a = a.decode()
+ a.a += 1
+ a.e += 1
det := a.a*a.e - a.b*a.d
a.a, a.e = a.e/det, a.a/det
a.b, a.d = -a.b/det, -a.d/det
temp := a.c
a.c = -a.a*a.c - a.b*a.f
a.f = -a.d*temp - a.e*a.f
- return a.encode()
+ a.a -= 1
+ a.e -= 1
+ return a
}
// Transform p by returning a*p.
func (a Affine2D) Transform(p Point) Point {
- a = a.decode()
return Point{
- X: p.X*a.a + p.Y*a.b + a.c,
- Y: p.X*a.d + p.Y*a.e + a.f,
+ X: p.X*(a.a+1) + p.Y*a.b + a.c,
+ Y: p.X*a.d + p.Y*(a.e+1) + a.f,
}
}
// Elems returns the matrix elements of the transform in row-major order. The
// rows are: [sx, hx, ox], [hy, sy, oy], [0, 0, 1].
func (a Affine2D) Elems() (sx, hx, ox, hy, sy, oy float32) {
- a = a.decode()
- return a.a, a.b, a.c, a.d, a.e, a.f
-}
-
-func (a Affine2D) encode() Affine2D {
- // since we store with identity matrix subtracted
- a.a -= 1
- a.e -= 1
- return a
-}
-
-func (a Affine2D) decode() Affine2D {
- // since we store with identity matrix subtracted
- a.a += 1
- a.e += 1
- return a
+ return a.a + 1, a.b, a.c, a.d, a.e + 1, a.f
}
func (a Affine2D) scale(factor Point) Affine2D {
- a = a.decode()
return Affine2D{
- a.a * factor.X, a.b * factor.X, a.c * factor.X,
- a.d * factor.Y, a.e * factor.Y, a.f * factor.Y,
- }.encode()
+ (a.a+1)*factor.X - 1, a.b * factor.X, a.c * factor.X,
+ a.d * factor.Y, (a.e+1)*factor.Y - 1, a.f * factor.Y,
+ }
}
func (a Affine2D) rotate(radians float32) Affine2D {
sin, cos := math.Sincos(float64(radians))
s, c := float32(sin), float32(cos)
- a = a.decode()
return Affine2D{
- a.a*c - a.d*s, a.b*c - a.e*s, a.c*c - a.f*s,
- a.a*s + a.d*c, a.b*s + a.e*c, a.c*s + a.f*c,
- }.encode()
+ (a.a+1)*c - a.d*s - 1, a.b*c - (a.e+1)*s, a.c*c - a.f*s,
+ (a.a+1)*s + a.d*c, a.b*s + (a.e+1)*c - 1, a.c*s + a.f*c,
+ }
}
func (a Affine2D) shear(radiansX, radiansY float32) Affine2D {
tx := float32(math.Tan(float64(radiansX)))
ty := float32(math.Tan(float64(radiansY)))
- a = a.decode()
return Affine2D{
- a.a + a.d*tx, a.b + a.e*tx, a.c + a.f*tx,
- a.a*ty + a.d, a.b*ty + a.e, a.f*ty + a.f,
- }.encode()
+ (a.a + 1) + a.d*tx - 1, a.b + (a.e+1)*tx, a.c + a.f*tx,
+ (a.a+1)*ty + a.d, a.b*ty + (a.e + 1) - 1, a.f*ty + a.f,
+ }
+}
+
+func (a Affine2D) String() string {
+ sx, hx, ox, hy, sy, oy := a.Elems()
+ return fmt.Sprintf("[[%f %f %f] [%f %f %f]]", sx, hx, ox, hy, sy, oy)
}
diff --git a/vendor/gioui.org/f32/f32.go b/vendor/gioui.org/f32/f32.go
index 798e3bf..54882cb 100644
--- a/vendor/gioui.org/f32/f32.go
+++ b/vendor/gioui.org/f32/f32.go
@@ -66,6 +66,17 @@ func (p Point) Mul(s float32) Point {
return Point{X: p.X * s, Y: p.Y * s}
}
+// Div returns the vector p/s.
+func (p Point) Div(s float32) Point {
+ return Point{X: p.X / s, Y: p.Y / s}
+}
+
+// In reports whether p is in r.
+func (p Point) In(r Rectangle) bool {
+ return r.Min.X <= p.X && p.X < r.Max.X &&
+ r.Min.Y <= p.Y && p.Y < r.Max.Y
+}
+
// Size returns r's width and height.
func (r Rectangle) Size() Point {
return Point{X: r.Dx(), Y: r.Dy()}
@@ -95,11 +106,20 @@ func (r Rectangle) Intersect(s Rectangle) Rectangle {
if r.Max.Y > s.Max.Y {
r.Max.Y = s.Max.Y
}
+ if r.Empty() {
+ return Rectangle{}
+ }
return r
}
// Union returns the union of r and s.
func (r Rectangle) Union(s Rectangle) Rectangle {
+ if r.Empty() {
+ return s
+ }
+ if s.Empty() {
+ return r
+ }
if r.Min.X > s.Min.X {
r.Min.X = s.Min.X
}
diff --git a/vendor/gioui.org/font/opentype/opentype.go b/vendor/gioui.org/font/opentype/opentype.go
index 27afea4..1f42330 100644
--- a/vendor/gioui.org/font/opentype/opentype.go
+++ b/vendor/gioui.org/font/opentype/opentype.go
@@ -5,29 +5,32 @@
package opentype
import (
+ "bytes"
"io"
-
"unicode"
"unicode/utf8"
+ "golang.org/x/image/font"
+ "golang.org/x/image/font/sfnt"
+ "golang.org/x/image/math/fixed"
+
"gioui.org/f32"
"gioui.org/op"
"gioui.org/op/clip"
"gioui.org/text"
- "golang.org/x/image/font"
- "golang.org/x/image/font/sfnt"
- "golang.org/x/image/math/fixed"
)
-// Font implements text.Face.
+// Font implements text.Face. Its methods are safe to use
+// concurrently.
type Font struct {
font *sfnt.Font
- buf sfnt.Buffer
}
-// Collection is a collection of one or more fonts.
+// Collection is a collection of one or more fonts. When used as a text.Face,
+// each rune will be assigned a glyph from the first font in the collection
+// that supports it.
type Collection struct {
- coll *sfnt.Collection
+ fonts []*opentype
}
type opentype struct {
@@ -35,6 +38,13 @@ type opentype struct {
Hinting font.Hinting
}
+// a glyph represents a rune and its advance according to a Font.
+// TODO: remove this type and work on io.Readers directly.
+type glyph struct {
+ Rune rune
+ Advance fixed.Int26_6
+}
+
// NewFont parses an SFNT font, such as TTF or OTF data, from a []byte
// data source.
func Parse(src []byte) (*Font, error) {
@@ -55,7 +65,7 @@ func ParseCollection(src []byte) (*Collection, error) {
if err != nil {
return nil, err
}
- return &Collection{c}, nil
+ return newCollectionFrom(c)
}
// ParseCollectionReaderAt parses an SFNT collection, such as TTC or OTC data,
@@ -68,21 +78,35 @@ func ParseCollectionReaderAt(src io.ReaderAt) (*Collection, error) {
if err != nil {
return nil, err
}
- return &Collection{c}, nil
+ return newCollectionFrom(c)
+}
+
+func newCollectionFrom(coll *sfnt.Collection) (*Collection, error) {
+ fonts := make([]*opentype, coll.NumFonts())
+ for i := range fonts {
+ fnt, err := coll.Font(i)
+ if err != nil {
+ return nil, err
+ }
+ fonts[i] = &opentype{
+ Font: fnt,
+ Hinting: font.HintingFull,
+ }
+ }
+ return &Collection{fonts: fonts}, nil
}
// NumFonts returns the number of fonts in the collection.
func (c *Collection) NumFonts() int {
- return c.coll.NumFonts()
+ return len(c.fonts)
}
// Font returns the i'th font in the collection.
func (c *Collection) Font(i int) (*Font, error) {
- fnt, err := c.coll.Font(i)
- if err != nil {
- return nil, err
+ if i < 0 || len(c.fonts) <= i {
+ return nil, sfnt.ErrNotFound
}
- return &Font{font: fnt}, nil
+ return &Font{font: c.fonts[i].Font}, nil
}
func (f *Font) Layout(ppem fixed.Int26_6, maxWidth int, txt io.Reader) ([]text.Line, error) {
@@ -90,31 +114,69 @@ func (f *Font) Layout(ppem fixed.Int26_6, maxWidth int, txt io.Reader) ([]text.L
if err != nil {
return nil, err
}
- return layoutText(&f.buf, ppem, maxWidth, &opentype{Font: f.font, Hinting: font.HintingFull}, glyphs)
+ fonts := []*opentype{{Font: f.font, Hinting: font.HintingFull}}
+ var buf sfnt.Buffer
+ return layoutText(&buf, ppem, maxWidth, fonts, glyphs)
}
-func (f *Font) Shape(ppem fixed.Int26_6, str []text.Glyph) op.CallOp {
- return textPath(&f.buf, ppem, &opentype{Font: f.font, Hinting: font.HintingFull}, str)
+func (f *Font) Shape(ppem fixed.Int26_6, str text.Layout) clip.PathSpec {
+ var buf sfnt.Buffer
+ return textPath(&buf, ppem, []*opentype{{Font: f.font, Hinting: font.HintingFull}}, str)
}
func (f *Font) Metrics(ppem fixed.Int26_6) font.Metrics {
o := &opentype{Font: f.font, Hinting: font.HintingFull}
- return o.Metrics(&f.buf, ppem)
+ var buf sfnt.Buffer
+ return o.Metrics(&buf, ppem)
+}
+
+func (c *Collection) Layout(ppem fixed.Int26_6, maxWidth int, txt io.Reader) ([]text.Line, error) {
+ glyphs, err := readGlyphs(txt)
+ if err != nil {
+ return nil, err
+ }
+ var buf sfnt.Buffer
+ return layoutText(&buf, ppem, maxWidth, c.fonts, glyphs)
+}
+
+func (c *Collection) Shape(ppem fixed.Int26_6, str text.Layout) clip.PathSpec {
+ var buf sfnt.Buffer
+ return textPath(&buf, ppem, c.fonts, str)
+}
+
+func fontForGlyph(buf *sfnt.Buffer, fonts []*opentype, r rune) *opentype {
+ if len(fonts) < 1 {
+ return nil
+ }
+ for _, f := range fonts {
+ if f.HasGlyph(buf, r) {
+ return f
+ }
+ }
+ return fonts[0] // Use replacement character from the first font if necessary
}
-func layoutText(sbuf *sfnt.Buffer, ppem fixed.Int26_6, maxWidth int, f *opentype, glyphs []text.Glyph) ([]text.Line, error) {
- m := f.Metrics(sbuf, ppem)
- lineTmpl := text.Line{
- Ascent: m.Ascent,
+func layoutText(sbuf *sfnt.Buffer, ppem fixed.Int26_6, maxWidth int, fonts []*opentype, glyphs []glyph) ([]text.Line, error) {
+ var lines []text.Line
+ var nextLine text.Line
+ updateBounds := func(f *opentype) {
+ m := f.Metrics(sbuf, ppem)
+ if m.Ascent > nextLine.Ascent {
+ nextLine.Ascent = m.Ascent
+ }
// m.Height is equal to m.Ascent + m.Descent + linegap.
// Compute the descent including the linegap.
- Descent: m.Height - m.Ascent,
- Bounds: f.Bounds(sbuf, ppem),
+ descent := m.Height - m.Ascent
+ if descent > nextLine.Descent {
+ nextLine.Descent = descent
+ }
+ b := f.Bounds(sbuf, ppem)
+ nextLine.Bounds = nextLine.Bounds.Union(b)
}
- var lines []text.Line
maxDotX := fixed.I(maxWidth)
type state struct {
r rune
+ f *opentype
adv fixed.Int26_6
x fixed.Int26_6
idx int
@@ -123,26 +185,33 @@ func layoutText(sbuf *sfnt.Buffer, ppem fixed.Int26_6, maxWidth int, f *opentype
}
var prev, word state
endLine := func() {
- line := lineTmpl
- line.Layout = glyphs[:prev.idx:prev.idx]
- line.Len = prev.len
- line.Width = prev.x + prev.adv
- line.Bounds.Max.X += prev.x
- lines = append(lines, line)
+ if prev.f == nil && len(fonts) > 0 {
+ prev.f = fonts[0]
+ }
+ updateBounds(prev.f)
+ nextLine.Layout = toLayout(glyphs[:prev.idx:prev.idx])
+ nextLine.Width = prev.x + prev.adv
+ nextLine.Bounds.Max.X += prev.x
+ lines = append(lines, nextLine)
glyphs = glyphs[prev.idx:]
+ nextLine = text.Line{}
prev = state{}
word = state{}
}
for prev.idx < len(glyphs) {
g := &glyphs[prev.idx]
- a, valid := f.GlyphAdvance(sbuf, ppem, g.Rune)
next := state{
- r: g.Rune,
- idx: prev.idx + 1,
- len: prev.len + utf8.RuneLen(g.Rune),
- x: prev.x + prev.adv,
- adv: a,
- valid: valid,
+ r: g.Rune,
+ f: fontForGlyph(sbuf, fonts, g.Rune),
+ idx: prev.idx + 1,
+ len: prev.len + utf8.RuneLen(g.Rune),
+ x: prev.x + prev.adv,
+ }
+ if next.f != nil {
+ if next.f != prev.f {
+ updateBounds(next.f)
+ }
+ next.adv, next.valid = next.f.GlyphAdvance(sbuf, ppem, g.Rune)
}
if g.Rune == '\n' {
// The newline is zero width; use the previous
@@ -153,8 +222,8 @@ func layoutText(sbuf *sfnt.Buffer, ppem fixed.Int26_6, maxWidth int, f *opentype
continue
}
var k fixed.Int26_6
- if prev.valid {
- k = f.Kern(sbuf, ppem, prev.r, next.r)
+ if prev.valid && next.f != nil {
+ k = next.f.Kern(sbuf, ppem, prev.r, next.r)
}
// Break the line if we're out of space.
if prev.idx > 0 && next.x+next.adv+k > maxDotX {
@@ -181,16 +250,30 @@ func layoutText(sbuf *sfnt.Buffer, ppem fixed.Int26_6, maxWidth int, f *opentype
return lines, nil
}
-func textPath(buf *sfnt.Buffer, ppem fixed.Int26_6, f *opentype, str []text.Glyph) op.CallOp {
+// toLayout converts a slice of glyphs to a text.Layout.
+func toLayout(glyphs []glyph) text.Layout {
+ var buf bytes.Buffer
+ advs := make([]fixed.Int26_6, len(glyphs))
+ for i, g := range glyphs {
+ buf.WriteRune(g.Rune)
+ advs[i] = glyphs[i].Advance
+ }
+ return text.Layout{Text: buf.String(), Advances: advs}
+}
+
+func textPath(buf *sfnt.Buffer, ppem fixed.Int26_6, fonts []*opentype, str text.Layout) clip.PathSpec {
var lastPos f32.Point
var builder clip.Path
- ops := new(op.Ops)
- m := op.Record(ops)
var x fixed.Int26_6
- builder.Begin(ops)
- for _, g := range str {
- if !unicode.IsSpace(g.Rune) {
- segs, ok := f.LoadGlyph(buf, ppem, g.Rune)
+ builder.Begin(new(op.Ops))
+ rune := 0
+ for _, r := range str.Text {
+ if !unicode.IsSpace(r) {
+ f := fontForGlyph(buf, fonts, r)
+ if f == nil {
+ continue
+ }
+ segs, ok := f.LoadGlyph(buf, ppem, r)
if !ok {
continue
}
@@ -236,14 +319,14 @@ func textPath(buf *sfnt.Buffer, ppem fixed.Int26_6, f *opentype, str []text.Glyp
}
lastPos = lastPos.Add(lastArg)
}
- x += g.Advance
+ x += str.Advances[rune]
+ rune++
}
- builder.End().Add(ops)
- return m.Stop()
+ return builder.End()
}
-func readGlyphs(r io.Reader) ([]text.Glyph, error) {
- var glyphs []text.Glyph
+func readGlyphs(r io.Reader) ([]glyph, error) {
+ var glyphs []glyph
buf := make([]byte, 0, 1024)
for {
n, err := r.Read(buf[len(buf):cap(buf)])
@@ -257,7 +340,7 @@ func readGlyphs(r io.Reader) ([]text.Glyph, error) {
for i < lim {
c, s := utf8.DecodeRune(buf[i:])
i += s
- glyphs = append(glyphs, text.Glyph{Rune: c})
+ glyphs = append(glyphs, glyph{Rune: c})
}
n = copy(buf, buf[i:])
buf = buf[:n]
@@ -271,6 +354,11 @@ func readGlyphs(r io.Reader) ([]text.Glyph, error) {
return glyphs, nil
}
+func (f *opentype) HasGlyph(buf *sfnt.Buffer, r rune) bool {
+ g, err := f.Font.GlyphIndex(buf, r)
+ return g != 0 && err == nil
+}
+
func (f *opentype) GlyphAdvance(buf *sfnt.Buffer, ppem fixed.Int26_6, r rune) (advance fixed.Int26_6, ok bool) {
g, err := f.Font.GlyphIndex(buf, r)
if err != nil {
diff --git a/vendor/gioui.org/gesture/gesture.go b/vendor/gioui.org/gesture/gesture.go
index 36ecd80..2d63963 100644
--- a/vendor/gioui.org/gesture/gesture.go
+++ b/vendor/gioui.org/gesture/gesture.go
@@ -10,6 +10,7 @@ and scrolling.
package gesture
import (
+ "image"
"math"
"runtime"
"time"
@@ -26,11 +27,49 @@ import (
// The duration is somewhat arbitrary.
const doubleClickDuration = 200 * time.Millisecond
+// Hover detects the hover gesture for a pointer area.
+type Hover struct {
+ // entered tracks whether the pointer is inside the gesture.
+ entered bool
+ // pid is the pointer.ID.
+ pid pointer.ID
+}
+
+// Add the gesture to detect hovering over the current pointer area.
+func (h *Hover) Add(ops *op.Ops) {
+ pointer.InputOp{
+ Tag: h,
+ Types: pointer.Enter | pointer.Leave,
+ }.Add(ops)
+}
+
+// Hovered returns whether a pointer is inside the area.
+func (h *Hover) Hovered(q event.Queue) bool {
+ for _, ev := range q.Events(h) {
+ e, ok := ev.(pointer.Event)
+ if !ok {
+ continue
+ }
+ switch e.Type {
+ case pointer.Leave:
+ if h.entered && h.pid == e.PointerID {
+ h.entered = false
+ }
+ case pointer.Enter:
+ if !h.entered {
+ h.pid = e.PointerID
+ }
+ if h.pid == e.PointerID {
+ h.entered = true
+ }
+ }
+ }
+ return h.entered
+}
+
// Click detects click gestures in the form
// of ClickEvents.
type Click struct {
- // state tracks the gesture state.
- state ClickState
// clickedAt is the timestamp at which
// the last click occurred.
clickedAt time.Duration
@@ -45,8 +84,6 @@ type Click struct {
pid pointer.ID
}
-type ClickState uint8
-
// ClickEvent represent a click action, either a
// TypePress for the beginning of a click or a
// TypeClick for a completed click.
@@ -65,6 +102,7 @@ type ClickType uint8
// Drag detects drag gestures in the form of pointer.Drag events.
type Drag struct {
dragging bool
+ pressed bool
pid pointer.ID
start f32.Point
grab bool
@@ -92,6 +130,7 @@ type Axis uint8
const (
Horizontal Axis = iota
Vertical
+ Both
)
const (
@@ -109,7 +148,7 @@ const (
const (
// StateIdle is the default scroll state.
StateIdle ScrollState = iota
- // StateDrag is reported during drag gestures.
+ // StateDragging is reported during drag gestures.
StateDragging
// StateFlinging is reported when a fling is
// in progress.
@@ -120,14 +159,23 @@ var touchSlop = unit.Dp(3)
// Add the handler to the operation list to receive click events.
func (c *Click) Add(ops *op.Ops) {
- op := pointer.InputOp{
+ pointer.InputOp{
Tag: c,
Types: pointer.Press | pointer.Release | pointer.Enter | pointer.Leave,
- }
- op.Add(ops)
+ }.Add(ops)
+}
+
+// Hovered returns whether a pointer is inside the area.
+func (c *Click) Hovered() bool {
+ return c.entered
}
-// Events returns the next click event, if any.
+// Pressed returns whether a pointer is pressing.
+func (c *Click) Pressed() bool {
+ return c.pressed
+}
+
+// Events returns the next click events, if any.
func (c *Click) Events(q event.Queue) []ClickEvent {
var events []ClickEvent
for _, evt := range q.Events(c) {
@@ -163,7 +211,7 @@ func (c *Click) Events(q event.Queue) []ClickEvent {
if c.pressed {
break
}
- if e.Source == pointer.Mouse && e.Buttons != pointer.ButtonLeft {
+ if e.Source == pointer.Mouse && e.Buttons != pointer.ButtonPrimary {
break
}
if !c.entered {
@@ -193,12 +241,17 @@ func (c *Click) Events(q event.Queue) []ClickEvent {
return events
}
+func (ClickEvent) ImplementsEvent() {}
+
// Add the handler to the operation list to receive scroll events.
-func (s *Scroll) Add(ops *op.Ops) {
+// The bounds variable refers to the scrolling boundaries
+// as defined in io/pointer.InputOp.
+func (s *Scroll) Add(ops *op.Ops, bounds image.Rectangle) {
oph := pointer.InputOp{
- Tag: s,
- Grab: s.grab,
- Types: pointer.Press | pointer.Drag | pointer.Release | pointer.Scroll,
+ Tag: s,
+ Grab: s.grab,
+ Types: pointer.Press | pointer.Drag | pointer.Release | pointer.Scroll,
+ ScrollBounds: bounds,
}
oph.Add(ops)
if s.flinger.Active() {
@@ -254,9 +307,6 @@ func (s *Scroll) Scroll(cfg unit.Metric, q event.Queue, t time.Time, axis Axis)
s.dragging = false
s.grab = false
case pointer.Scroll:
- if e.Priority < pointer.Foremost {
- continue
- }
switch s.axis {
case Horizontal:
s.scroll += e.Scroll.X
@@ -311,12 +361,11 @@ func (s *Scroll) State() ScrollState {
// Add the handler to the operation list to receive drag events.
func (d *Drag) Add(ops *op.Ops) {
- op := pointer.InputOp{
+ pointer.InputOp{
Tag: d,
Grab: d.grab,
Types: pointer.Press | pointer.Drag | pointer.Release,
- }
- op.Add(ops)
+ }.Add(ops)
}
// Events returns the next drag events, if any.
@@ -330,9 +379,10 @@ func (d *Drag) Events(cfg unit.Metric, q event.Queue, axis Axis) []pointer.Event
switch e.Type {
case pointer.Press:
- if !(e.Buttons == pointer.ButtonLeft || e.Source == pointer.Touch) {
+ if !(e.Buttons == pointer.ButtonPrimary || e.Source == pointer.Touch) {
continue
}
+ d.pressed = true
if d.dragging {
continue
}
@@ -348,6 +398,8 @@ func (d *Drag) Events(cfg unit.Metric, q event.Queue, axis Axis) []pointer.Event
e.Position.Y = d.start.Y
case Vertical:
e.Position.X = d.start.X
+ case Both:
+ // Do nothing
}
if e.Priority < pointer.Grabbed {
diff := e.Position.Sub(d.start)
@@ -357,6 +409,7 @@ func (d *Drag) Events(cfg unit.Metric, q event.Queue, axis Axis) []pointer.Event
}
}
case pointer.Release, pointer.Cancel:
+ d.pressed = false
if !d.dragging || e.PointerID != d.pid {
continue
}
@@ -370,6 +423,12 @@ func (d *Drag) Events(cfg unit.Metric, q event.Queue, axis Axis) []pointer.Event
return events
}
+// Dragging reports whether it is currently in use.
+func (d *Drag) Dragging() bool { return d.dragging }
+
+// Pressed returns whether a pointer is pressing.
+func (d *Drag) Pressed() bool { return d.pressed }
+
func (a Axis) String() string {
switch a {
case Horizontal:
diff --git a/vendor/gioui.org/gpu/api.go b/vendor/gioui.org/gpu/api.go
new file mode 100644
index 0000000..d347e5a
--- /dev/null
+++ b/vendor/gioui.org/gpu/api.go
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gpu
+
+import "gioui.org/gpu/internal/driver"
+
+// An API carries the necessary GPU API specific resources to create a Device.
+// There is an API type for each supported GPU API such as OpenGL and Direct3D.
+type API = driver.API
+
+// A RenderTarget denotes the destination framebuffer for a frame.
+type RenderTarget = driver.RenderTarget
+
+// OpenGLRenderTarget is a render target suitable for the OpenGL backend.
+type OpenGLRenderTarget = driver.OpenGLRenderTarget
+
+// Direct3D11RenderTarget is a render target suitable for the Direct3D 11 backend.
+type Direct3D11RenderTarget = driver.Direct3D11RenderTarget
+
+// MetalRenderTarget is a render target suitable for the Metal backend.
+type MetalRenderTarget = driver.MetalRenderTarget
+
+// VulkanRenderTarget is a render target suitable for the Vulkan backend.
+type VulkanRenderTarget = driver.VulkanRenderTarget
+
+// OpenGL denotes the OpenGL or OpenGL ES API.
+type OpenGL = driver.OpenGL
+
+// Direct3D11 denotes the Direct3D API.
+type Direct3D11 = driver.Direct3D11
+
+// Metal denotes the Apple Metal API.
+type Metal = driver.Metal
+
+// Vulkan denotes the Vulkan API.
+type Vulkan = driver.Vulkan
+
+// ErrDeviceLost is returned from GPU operations when the underlying GPU device
+// is lost and should be recreated.
+var ErrDeviceLost = driver.ErrDeviceLost
diff --git a/vendor/gioui.org/gpu/backend/backend.go b/vendor/gioui.org/gpu/backend/backend.go
deleted file mode 100644
index 871eea4..0000000
--- a/vendor/gioui.org/gpu/backend/backend.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package backend
-
-import (
- "image"
- "time"
-)
-
-// Device represents the abstraction of underlying GPU
-// APIs such as OpenGL, Direct3D useful for rendering Gio
-// operations.
-type Device interface {
- BeginFrame()
- EndFrame()
- Caps() Caps
- NewTimer() Timer
- // IsContinuousTime reports whether all timer measurements
- // are valid at the point of call.
- IsTimeContinuous() bool
- NewTexture(format TextureFormat, width, height int, minFilter, magFilter TextureFilter, bindings BufferBinding) (Texture, error)
- CurrentFramebuffer() Framebuffer
- NewFramebuffer(tex Texture, depthBits int) (Framebuffer, error)
- NewImmutableBuffer(typ BufferBinding, data []byte) (Buffer, error)
- NewBuffer(typ BufferBinding, size int) (Buffer, error)
- NewProgram(vertexShader, fragmentShader ShaderSources) (Program, error)
- NewInputLayout(vertexShader ShaderSources, layout []InputDesc) (InputLayout, error)
-
- DepthFunc(f DepthFunc)
- ClearDepth(d float32)
- Clear(r, g, b, a float32)
- Viewport(x, y, width, height int)
- DrawArrays(mode DrawMode, off, count int)
- DrawElements(mode DrawMode, off, count int)
- SetBlend(enable bool)
- SetDepthTest(enable bool)
- DepthMask(mask bool)
- BlendFunc(sfactor, dfactor BlendFactor)
-
- BindInputLayout(i InputLayout)
- BindProgram(p Program)
- BindFramebuffer(f Framebuffer)
- BindTexture(unit int, t Texture)
- BindVertexBuffer(b Buffer, stride, offset int)
- BindIndexBuffer(b Buffer)
-}
-
-type ShaderSources struct {
- GLSL100ES string
- GLSL300ES string
- GLSL130 string
- GLSL150 string
- HLSL []byte
- Uniforms UniformsReflection
- Inputs []InputLocation
- Textures []TextureBinding
-}
-
-type UniformsReflection struct {
- Blocks []UniformBlock
- Locations []UniformLocation
- Size int
-}
-
-type TextureBinding struct {
- Name string
- Binding int
-}
-
-type UniformBlock struct {
- Name string
- Binding int
-}
-
-type UniformLocation struct {
- Name string
- Type DataType
- Size int
- Offset int
-}
-
-type InputLocation struct {
- // For GLSL.
- Name string
- Location int
- // For HLSL.
- Semantic string
- SemanticIndex int
-
- Type DataType
- Size int
-}
-
-// InputDesc describes a vertex attribute as laid out in a Buffer.
-type InputDesc struct {
- Type DataType
- Size int
-
- Offset int
-}
-
-// InputLayout is the backend specific representation of the mapping
-// between Buffers and shader attributes.
-type InputLayout interface {
- Release()
-}
-
-type BlendFactor uint8
-
-type DrawMode uint8
-
-type TextureFilter uint8
-type TextureFormat uint8
-
-type BufferBinding uint8
-
-type DataType uint8
-
-type DepthFunc uint8
-
-type Features uint
-
-type Caps struct {
- Features Features
- MaxTextureSize int
-}
-
-type Program interface {
- Release()
- SetVertexUniforms(buf Buffer)
- SetFragmentUniforms(buf Buffer)
-}
-
-type Buffer interface {
- Release()
- Upload(data []byte)
-}
-
-type Framebuffer interface {
- Invalidate()
- Release()
- ReadPixels(src image.Rectangle, pixels []byte) error
-}
-
-type Timer interface {
- Begin()
- End()
- Duration() (time.Duration, bool)
- Release()
-}
-
-type Texture interface {
- Upload(img *image.RGBA)
- Release()
-}
-
-const (
- DepthFuncGreater DepthFunc = iota
- DepthFuncGreaterEqual
-)
-
-const (
- DataTypeFloat DataType = iota
- DataTypeInt
- DataTypeShort
-)
-
-const (
- BufferBindingIndices BufferBinding = 1 << iota
- BufferBindingVertices
- BufferBindingUniforms
- BufferBindingTexture
- BufferBindingFramebuffer
-)
-
-const (
- TextureFormatSRGB TextureFormat = iota
- TextureFormatFloat
-)
-
-const (
- FilterNearest TextureFilter = iota
- FilterLinear
-)
-
-const (
- FeatureTimers Features = iota
-)
-
-const (
- DrawModeTriangleStrip DrawMode = iota
- DrawModeTriangles
-)
-
-const (
- BlendFactorOne BlendFactor = iota
- BlendFactorOneMinusSrcAlpha
- BlendFactorZero
- BlendFactorDstColor
-)
-
-func (f Features) Has(feats Features) bool {
- return f&feats == feats
-}
diff --git a/vendor/gioui.org/gpu/caches.go b/vendor/gioui.org/gpu/caches.go
index cefba83..c6a71bc 100644
--- a/vendor/gioui.org/gpu/caches.go
+++ b/vendor/gioui.org/gpu/caches.go
@@ -6,7 +6,6 @@ import (
"fmt"
"gioui.org/f32"
- "gioui.org/internal/ops"
)
type resourceCache struct {
@@ -19,17 +18,18 @@ type resourceCache struct {
// since benchmarking showed them as a bottleneck.
type opCache struct {
// store the index + 1 in cache this key is stored in
- index map[ops.Key]int
+ index map[opKey]int
// list of indexes in cache that are free and can be used
freelist []int
cache []opCacheValue
}
type opCacheValue struct {
- data pathData
+ data pathData
+
bounds f32.Rectangle
// the fields below are handled by opCache
- key ops.Key
+ key opKey
keep bool
}
@@ -70,7 +70,8 @@ func (r *resourceCache) frame() {
}
func (r *resourceCache) release() {
- for _, v := range r.newRes {
+ r.frame()
+ for _, v := range r.res {
v.release()
}
r.newRes = nil
@@ -79,13 +80,13 @@ func (r *resourceCache) release() {
func newOpCache() *opCache {
return &opCache{
- index: make(map[ops.Key]int),
+ index: make(map[opKey]int),
freelist: make([]int, 0),
cache: make([]opCacheValue, 0),
}
}
-func (r *opCache) get(key ops.Key) (o opCacheValue, exist bool) {
+func (r *opCache) get(key opKey) (o opCacheValue, exist bool) {
v := r.index[key]
if v == 0 {
return
@@ -94,7 +95,7 @@ func (r *opCache) get(key ops.Key) (o opCacheValue, exist bool) {
return r.cache[v-1], true
}
-func (r *opCache) put(key ops.Key, val opCacheValue) {
+func (r *opCache) put(key opKey, val opCacheValue) {
v := r.index[key]
val.keep = true
val.key = key
diff --git a/vendor/gioui.org/gpu/clip.go b/vendor/gioui.org/gpu/clip.go
index 51022a0..8ae25b5 100644
--- a/vendor/gioui.org/gpu/clip.go
+++ b/vendor/gioui.org/gpu/clip.go
@@ -2,11 +2,10 @@ package gpu
import (
"gioui.org/f32"
- "gioui.org/internal/ops"
+ "gioui.org/internal/stroke"
)
type quadSplitter struct {
- verts []byte
bounds f32.Rectangle
contour uint32
d *drawOps
@@ -48,7 +47,7 @@ func (qs *quadSplitter) encodeQuadTo(from, ctrl, to f32.Point) {
encodeQuadTo(data, qs.contour, from, ctrl, to)
}
-func (qs *quadSplitter) splitAndEncode(quad ops.Quad) {
+func (qs *quadSplitter) splitAndEncode(quad stroke.QuadSegment) {
cbnd := f32.Rectangle{
Min: quad.From,
Max: quad.To,
@@ -94,5 +93,22 @@ func (qs *quadSplitter) splitAndEncode(quad ops.Quad) {
}
}
- qs.bounds = qs.bounds.Union(cbnd)
+ qs.bounds = unionRect(qs.bounds, cbnd)
+}
+
+// Union is like f32.Rectangle.Union but ignores empty rectangles.
+func unionRect(r, s f32.Rectangle) f32.Rectangle {
+ if r.Min.X > s.Min.X {
+ r.Min.X = s.Min.X
+ }
+ if r.Min.Y > s.Min.Y {
+ r.Min.Y = s.Min.Y
+ }
+ if r.Max.X < s.Max.X {
+ r.Max.X = s.Max.X
+ }
+ if r.Max.Y < s.Max.Y {
+ r.Max.Y = s.Max.Y
+ }
+ return r
}
diff --git a/vendor/gioui.org/gpu/compute.go b/vendor/gioui.org/gpu/compute.go
new file mode 100644
index 0000000..625658c
--- /dev/null
+++ b/vendor/gioui.org/gpu/compute.go
@@ -0,0 +1,2219 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gpu
+
+import (
+ "bytes"
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "hash/maphash"
+ "image"
+ "image/color"
+ "image/draw"
+ "image/png"
+ "io/ioutil"
+ "math"
+ "math/bits"
+ "runtime"
+ "sort"
+ "time"
+ "unsafe"
+
+ "gioui.org/cpu"
+ "gioui.org/f32"
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/internal/byteslice"
+ "gioui.org/internal/f32color"
+ "gioui.org/internal/ops"
+ "gioui.org/internal/scene"
+ "gioui.org/layout"
+ "gioui.org/op"
+ "gioui.org/shader"
+ "gioui.org/shader/gio"
+ "gioui.org/shader/piet"
+)
+
+type compute struct {
+ ctx driver.Device
+
+ collector collector
+ enc encoder
+ texOps []textureOp
+ viewport image.Point
+ maxTextureDim int
+ srgb bool
+ atlases []*textureAtlas
+ frameCount uint
+ moves []atlasMove
+
+ programs struct {
+ elements computeProgram
+ tileAlloc computeProgram
+ pathCoarse computeProgram
+ backdrop computeProgram
+ binning computeProgram
+ coarse computeProgram
+ kernel4 computeProgram
+ }
+ buffers struct {
+ config sizedBuffer
+ scene sizedBuffer
+ state sizedBuffer
+ memory sizedBuffer
+ }
+ output struct {
+ blitPipeline driver.Pipeline
+
+ buffer sizedBuffer
+
+ uniforms *copyUniforms
+ uniBuf driver.Buffer
+
+ layerVertices []layerVertex
+ descriptors *piet.Kernel4DescriptorSetLayout
+
+ nullMaterials driver.Texture
+ }
+ // imgAllocs maps imageOpData.handles to allocs.
+ imgAllocs map[interface{}]*atlasAlloc
+ // materials contains the pre-processed materials (transformed images for
+ // now, gradients etc. later) packed in a texture atlas. The atlas is used
+ // as source in kernel4.
+ materials struct {
+ // allocs maps texture ops the their atlases and FillImage offsets.
+ allocs map[textureKey]materialAlloc
+
+ pipeline driver.Pipeline
+ buffer sizedBuffer
+ quads []materialVertex
+ uniforms struct {
+ u *materialUniforms
+ buf driver.Buffer
+ }
+ }
+ timers struct {
+ profile string
+ t *timers
+ compact *timer
+ render *timer
+ blit *timer
+ }
+
+ // CPU fallback fields.
+ useCPU bool
+ dispatcher *dispatcher
+
+ // The following fields hold scratch space to avoid garbage.
+ zeroSlice []byte
+ memHeader *memoryHeader
+ conf *config
+}
+
+type materialAlloc struct {
+ alloc *atlasAlloc
+ offset image.Point
+}
+
+type layer struct {
+ rect image.Rectangle
+ alloc *atlasAlloc
+ ops []paintOp
+ materials *textureAtlas
+}
+
+type allocQuery struct {
+ atlas *textureAtlas
+ size image.Point
+ empty bool
+ format driver.TextureFormat
+ bindings driver.BufferBinding
+ nocompact bool
+}
+
+type atlasAlloc struct {
+ atlas *textureAtlas
+ rect image.Rectangle
+ cpu bool
+ dead bool
+ frameCount uint
+}
+
+type atlasMove struct {
+ src *textureAtlas
+ dstPos image.Point
+ srcRect image.Rectangle
+ cpu bool
+}
+
+type textureAtlas struct {
+ image driver.Texture
+ format driver.TextureFormat
+ bindings driver.BufferBinding
+ hasCPU bool
+ cpuImage cpu.ImageDescriptor
+ size image.Point
+ allocs []*atlasAlloc
+ packer packer
+ realized bool
+ lastFrame uint
+ compact bool
+}
+
+type copyUniforms struct {
+ scale [2]float32
+ pos [2]float32
+ uvScale [2]float32
+ _ [8]byte // Pad to 16 bytes.
+}
+
+type materialUniforms struct {
+ scale [2]float32
+ pos [2]float32
+ emulatesRGB float32
+ _ [12]byte // Pad to 16 bytes
+}
+
+type collector struct {
+ hasher maphash.Hash
+ profile bool
+ reader ops.Reader
+ states []f32.Affine2D
+ clear bool
+ clearColor f32color.RGBA
+ clipStates []clipState
+ order []hashIndex
+ transStack []transEntry
+ prevFrame opsCollector
+ frame opsCollector
+}
+
+type transEntry struct {
+ t f32.Affine2D
+ relTrans f32.Affine2D
+}
+
+type hashIndex struct {
+ index int
+ hash uint64
+}
+
+type opsCollector struct {
+ paths []byte
+ clipCmds []clipCmd
+ ops []paintOp
+ layers []layer
+}
+
+type paintOp struct {
+ clipStack []clipCmd
+ offset image.Point
+ state paintKey
+ intersect f32.Rectangle
+ hash uint64
+ layer int
+ texOpIdx int
+}
+
+// clipCmd describes a clipping command ready to be used for the compute
+// pipeline.
+type clipCmd struct {
+ // union of the bounds of the operations that are clipped.
+ union f32.Rectangle
+ state clipKey
+ path []byte
+ pathKey ops.Key
+ absBounds f32.Rectangle
+}
+
+type encoderState struct {
+ relTrans f32.Affine2D
+ clip *clipState
+
+ paintKey
+}
+
+// clipKey completely describes a clip operation (along with its path) and is appropriate
+// for hashing and equality checks.
+type clipKey struct {
+ bounds f32.Rectangle
+ strokeWidth float32
+ relTrans f32.Affine2D
+ pathHash uint64
+}
+
+// paintKey completely defines a paint operation. It is suitable for hashing and
+// equality checks.
+type paintKey struct {
+ t f32.Affine2D
+ matType materialType
+ // Current paint.ImageOp
+ image imageOpData
+ // Current paint.ColorOp, if any.
+ color color.NRGBA
+
+ // Current paint.LinearGradientOp.
+ stop1 f32.Point
+ stop2 f32.Point
+ color1 color.NRGBA
+ color2 color.NRGBA
+}
+
+type clipState struct {
+ absBounds f32.Rectangle
+ parent *clipState
+ path []byte
+ pathKey ops.Key
+ intersect f32.Rectangle
+ push bool
+
+ clipKey
+}
+
+type layerVertex struct {
+ posX, posY float32
+ u, v float32
+}
+
+// materialVertex describes a vertex of a quad used to render a transformed
+// material.
+type materialVertex struct {
+ posX, posY float32
+ u, v float32
+}
+
+// textureKey identifies textureOp.
+type textureKey struct {
+ handle interface{}
+ transform f32.Affine2D
+ bounds image.Rectangle
+}
+
+// textureOp represents an paintOp that requires texture space.
+type textureOp struct {
+ img imageOpData
+ key textureKey
+ // offset is the integer offset separated from key.transform to increase cache hit rate.
+ off image.Point
+ // matAlloc is the atlas placement for material.
+ matAlloc materialAlloc
+ // imgAlloc is the atlas placement for the source image
+ imgAlloc *atlasAlloc
+}
+
+type encoder struct {
+ scene []scene.Command
+ npath int
+ npathseg int
+ ntrans int
+}
+
+type encodeState struct {
+ trans f32.Affine2D
+ clip f32.Rectangle
+}
+
+// sizedBuffer holds a GPU buffer, or its equivalent CPU memory.
+type sizedBuffer struct {
+ size int
+ buffer driver.Buffer
+ // cpuBuf is initialized when useCPU is true.
+ cpuBuf cpu.BufferDescriptor
+}
+
+// computeProgram holds a compute program, or its equivalent CPU implementation.
+type computeProgram struct {
+ prog driver.Program
+
+ // CPU fields.
+ progInfo *cpu.ProgramInfo
+ descriptors unsafe.Pointer
+ buffers []*cpu.BufferDescriptor
+}
+
+// config matches Config in setup.h
+type config struct {
+ n_elements uint32 // paths
+ n_pathseg uint32
+ width_in_tiles uint32
+ height_in_tiles uint32
+ tile_alloc memAlloc
+ bin_alloc memAlloc
+ ptcl_alloc memAlloc
+ pathseg_alloc memAlloc
+ anno_alloc memAlloc
+ trans_alloc memAlloc
+}
+
+// memAlloc matches Alloc in mem.h
+type memAlloc struct {
+ offset uint32
+ //size uint32
+}
+
+// memoryHeader matches the header of Memory in mem.h.
+type memoryHeader struct {
+ mem_offset uint32
+ mem_error uint32
+}
+
+// rect is a oriented rectangle.
+type rectangle [4]f32.Point
+
+const (
+ layersBindings = driver.BufferBindingShaderStorageWrite | driver.BufferBindingTexture
+ materialsBindings = driver.BufferBindingFramebuffer | driver.BufferBindingShaderStorageRead
+ // Materials and layers can share texture storage if their bindings match.
+ combinedBindings = layersBindings | materialsBindings
+)
+
+// GPU structure sizes and constants.
+const (
+ tileWidthPx = 32
+ tileHeightPx = 32
+ ptclInitialAlloc = 1024
+ kernel4OutputUnit = 2
+ kernel4AtlasUnit = 3
+
+ pathSize = 12
+ binSize = 8
+ pathsegSize = 52
+ annoSize = 32
+ transSize = 24
+ stateSize = 60
+ stateStride = 4 + 2*stateSize
+)
+
+// mem.h constants.
+const (
+ memNoError = 0 // NO_ERROR
+ memMallocFailed = 1 // ERR_MALLOC_FAILED
+)
+
+func newCompute(ctx driver.Device) (*compute, error) {
+ caps := ctx.Caps()
+ maxDim := caps.MaxTextureSize
+ // Large atlas textures cause artifacts due to precision loss in
+ // shaders.
+ if cap := 8192; maxDim > cap {
+ maxDim = cap
+ }
+ // The compute programs can only span 128x64 tiles. Limit to 64 for now, and leave the
+ // complexity of a rectangular limit for later.
+ if computeCap := 4096; maxDim > computeCap {
+ maxDim = computeCap
+ }
+ g := &compute{
+ ctx: ctx,
+ maxTextureDim: maxDim,
+ srgb: caps.Features.Has(driver.FeatureSRGB),
+ conf: new(config),
+ memHeader: new(memoryHeader),
+ }
+ null, err := ctx.NewTexture(driver.TextureFormatRGBA8, 1, 1, driver.FilterNearest, driver.FilterNearest, driver.BufferBindingShaderStorageRead)
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ g.output.nullMaterials = null
+ shaders := []struct {
+ prog *computeProgram
+ src shader.Sources
+ info *cpu.ProgramInfo
+ }{
+ {&g.programs.elements, piet.Shader_elements_comp, piet.ElementsProgramInfo},
+ {&g.programs.tileAlloc, piet.Shader_tile_alloc_comp, piet.Tile_allocProgramInfo},
+ {&g.programs.pathCoarse, piet.Shader_path_coarse_comp, piet.Path_coarseProgramInfo},
+ {&g.programs.backdrop, piet.Shader_backdrop_comp, piet.BackdropProgramInfo},
+ {&g.programs.binning, piet.Shader_binning_comp, piet.BinningProgramInfo},
+ {&g.programs.coarse, piet.Shader_coarse_comp, piet.CoarseProgramInfo},
+ {&g.programs.kernel4, piet.Shader_kernel4_comp, piet.Kernel4ProgramInfo},
+ }
+ if !caps.Features.Has(driver.FeatureCompute) {
+ if !cpu.Supported {
+ return nil, errors.New("gpu: missing support for compute programs")
+ }
+ g.useCPU = true
+ }
+ if g.useCPU {
+ g.dispatcher = newDispatcher(runtime.NumCPU())
+ }
+
+ copyVert, copyFrag, err := newShaders(ctx, gio.Shader_copy_vert, gio.Shader_copy_frag)
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ defer copyVert.Release()
+ defer copyFrag.Release()
+ pipe, err := ctx.NewPipeline(driver.PipelineDesc{
+ VertexShader: copyVert,
+ FragmentShader: copyFrag,
+ VertexLayout: driver.VertexLayout{
+ Inputs: []driver.InputDesc{
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 0},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 4 * 2},
+ },
+ Stride: int(unsafe.Sizeof(g.output.layerVertices[0])),
+ },
+ PixelFormat: driver.TextureFormatOutput,
+ BlendDesc: driver.BlendDesc{
+ Enable: true,
+ SrcFactor: driver.BlendFactorOne,
+ DstFactor: driver.BlendFactorOneMinusSrcAlpha,
+ },
+ Topology: driver.TopologyTriangles,
+ })
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ g.output.blitPipeline = pipe
+ g.output.uniforms = new(copyUniforms)
+
+ buf, err := ctx.NewBuffer(driver.BufferBindingUniforms, int(unsafe.Sizeof(*g.output.uniforms)))
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ g.output.uniBuf = buf
+
+ materialVert, materialFrag, err := newShaders(ctx, gio.Shader_material_vert, gio.Shader_material_frag)
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ defer materialVert.Release()
+ defer materialFrag.Release()
+ pipe, err = ctx.NewPipeline(driver.PipelineDesc{
+ VertexShader: materialVert,
+ FragmentShader: materialFrag,
+ VertexLayout: driver.VertexLayout{
+ Inputs: []driver.InputDesc{
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 0},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 4 * 2},
+ },
+ Stride: int(unsafe.Sizeof(g.materials.quads[0])),
+ },
+ PixelFormat: driver.TextureFormatRGBA8,
+ Topology: driver.TopologyTriangles,
+ })
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ g.materials.pipeline = pipe
+ g.materials.uniforms.u = new(materialUniforms)
+
+ buf, err = ctx.NewBuffer(driver.BufferBindingUniforms, int(unsafe.Sizeof(*g.materials.uniforms.u)))
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ g.materials.uniforms.buf = buf
+
+ for _, shader := range shaders {
+ if !g.useCPU {
+ p, err := ctx.NewComputeProgram(shader.src)
+ if err != nil {
+ g.Release()
+ return nil, err
+ }
+ shader.prog.prog = p
+ } else {
+ shader.prog.progInfo = shader.info
+ }
+ }
+ if g.useCPU {
+ {
+ desc := new(piet.ElementsDescriptorSetLayout)
+ g.programs.elements.descriptors = unsafe.Pointer(desc)
+ g.programs.elements.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1(), desc.Binding2(), desc.Binding3()}
+ }
+ {
+ desc := new(piet.Tile_allocDescriptorSetLayout)
+ g.programs.tileAlloc.descriptors = unsafe.Pointer(desc)
+ g.programs.tileAlloc.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1()}
+ }
+ {
+ desc := new(piet.Path_coarseDescriptorSetLayout)
+ g.programs.pathCoarse.descriptors = unsafe.Pointer(desc)
+ g.programs.pathCoarse.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1()}
+ }
+ {
+ desc := new(piet.BackdropDescriptorSetLayout)
+ g.programs.backdrop.descriptors = unsafe.Pointer(desc)
+ g.programs.backdrop.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1()}
+ }
+ {
+ desc := new(piet.BinningDescriptorSetLayout)
+ g.programs.binning.descriptors = unsafe.Pointer(desc)
+ g.programs.binning.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1()}
+ }
+ {
+ desc := new(piet.CoarseDescriptorSetLayout)
+ g.programs.coarse.descriptors = unsafe.Pointer(desc)
+ g.programs.coarse.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1()}
+ }
+ {
+ desc := new(piet.Kernel4DescriptorSetLayout)
+ g.programs.kernel4.descriptors = unsafe.Pointer(desc)
+ g.programs.kernel4.buffers = []*cpu.BufferDescriptor{desc.Binding0(), desc.Binding1()}
+ g.output.descriptors = desc
+ }
+ }
+ return g, nil
+}
+
+func newShaders(ctx driver.Device, vsrc, fsrc shader.Sources) (vert driver.VertexShader, frag driver.FragmentShader, err error) {
+ vert, err = ctx.NewVertexShader(vsrc)
+ if err != nil {
+ return
+ }
+ frag, err = ctx.NewFragmentShader(fsrc)
+ if err != nil {
+ vert.Release()
+ }
+ return
+}
+
+func (g *compute) Frame(frameOps *op.Ops, target RenderTarget, viewport image.Point) error {
+ g.frameCount++
+ g.collect(viewport, frameOps)
+ return g.frame(target)
+}
+
+func (g *compute) collect(viewport image.Point, ops *op.Ops) {
+ g.viewport = viewport
+ g.collector.reset()
+
+ g.texOps = g.texOps[:0]
+ g.collector.collect(ops, viewport, &g.texOps)
+}
+
+func (g *compute) Clear(col color.NRGBA) {
+ g.collector.clear = true
+ g.collector.clearColor = f32color.LinearFromSRGB(col)
+}
+
+func (g *compute) frame(target RenderTarget) error {
+ viewport := g.viewport
+ defFBO := g.ctx.BeginFrame(target, g.collector.clear, viewport)
+ defer g.ctx.EndFrame()
+
+ t := &g.timers
+ if g.collector.profile && t.t == nil && g.ctx.Caps().Features.Has(driver.FeatureTimers) {
+ t.t = newTimers(g.ctx)
+ t.compact = t.t.newTimer()
+ t.render = t.t.newTimer()
+ t.blit = t.t.newTimer()
+ }
+
+ if err := g.uploadImages(); err != nil {
+ return err
+ }
+ if err := g.renderMaterials(); err != nil {
+ return err
+ }
+ g.layer(viewport, g.texOps)
+ t.render.begin()
+ if err := g.renderLayers(viewport); err != nil {
+ return err
+ }
+ t.render.end()
+ d := driver.LoadDesc{
+ ClearColor: g.collector.clearColor,
+ }
+ if g.collector.clear {
+ g.collector.clear = false
+ d.Action = driver.LoadActionClear
+ }
+ t.blit.begin()
+ g.blitLayers(d, defFBO, viewport)
+ t.blit.end()
+ t.compact.begin()
+ if err := g.compactAllocs(); err != nil {
+ return err
+ }
+ t.compact.end()
+ if g.collector.profile && t.t.ready() {
+ com, ren, blit := t.compact.Elapsed, t.render.Elapsed, t.blit.Elapsed
+ ft := com + ren + blit
+ q := 100 * time.Microsecond
+ ft = ft.Round(q)
+ com, ren, blit = com.Round(q), ren.Round(q), blit.Round(q)
+ t.profile = fmt.Sprintf("ft:%7s com: %7s ren:%7s blit:%7s", ft, com, ren, blit)
+ }
+ return nil
+}
+
+func (g *compute) dumpAtlases() {
+ for i, a := range g.atlases {
+ dump := image.NewRGBA(image.Rectangle{Max: a.size})
+ err := driver.DownloadImage(g.ctx, a.image, dump)
+ if err != nil {
+ panic(err)
+ }
+ nrgba := image.NewNRGBA(dump.Bounds())
+ draw.Draw(nrgba, image.Rectangle{}, dump, image.Point{}, draw.Src)
+ var buf bytes.Buffer
+ if err := png.Encode(&buf, nrgba); err != nil {
+ panic(err)
+ }
+ if err := ioutil.WriteFile(fmt.Sprintf("dump-%d.png", i), buf.Bytes(), 0600); err != nil {
+ panic(err)
+ }
+ }
+}
+
+func (g *compute) Profile() string {
+ return g.timers.profile
+}
+
+func (g *compute) compactAllocs() error {
+ const (
+ maxAllocAge = 3
+ maxAtlasAge = 10
+ )
+ atlases := g.atlases
+ for _, a := range atlases {
+ if len(a.allocs) > 0 && g.frameCount-a.lastFrame > maxAtlasAge {
+ a.compact = true
+ }
+ }
+ for len(atlases) > 0 {
+ var (
+ dstAtlas *textureAtlas
+ format driver.TextureFormat
+ bindings driver.BufferBinding
+ )
+ g.moves = g.moves[:0]
+ addedLayers := false
+ useCPU := false
+ fill:
+ for len(atlases) > 0 {
+ srcAtlas := atlases[0]
+ allocs := srcAtlas.allocs
+ if !srcAtlas.compact {
+ atlases = atlases[1:]
+ continue
+ }
+ if addedLayers && (format != srcAtlas.format || srcAtlas.bindings&bindings != srcAtlas.bindings) {
+ break
+ }
+ format = srcAtlas.format
+ bindings = srcAtlas.bindings
+ for len(srcAtlas.allocs) > 0 {
+ a := srcAtlas.allocs[0]
+ n := len(srcAtlas.allocs)
+ if g.frameCount-a.frameCount > maxAllocAge {
+ a.dead = true
+ srcAtlas.allocs[0] = srcAtlas.allocs[n-1]
+ srcAtlas.allocs = srcAtlas.allocs[:n-1]
+ continue
+ }
+ size := a.rect.Size()
+ alloc, fits := g.atlasAlloc(allocQuery{
+ atlas: dstAtlas,
+ size: size,
+ format: format,
+ bindings: bindings,
+ nocompact: true,
+ })
+ if !fits {
+ break fill
+ }
+ dstAtlas = alloc.atlas
+ allocs = append(allocs, a)
+ addedLayers = true
+ useCPU = useCPU || a.cpu
+ dstAtlas.allocs = append(dstAtlas.allocs, a)
+ pos := alloc.rect.Min
+ g.moves = append(g.moves, atlasMove{
+ src: srcAtlas, dstPos: pos, srcRect: a.rect, cpu: a.cpu,
+ })
+ a.atlas = dstAtlas
+ a.rect = image.Rectangle{Min: pos, Max: pos.Add(a.rect.Size())}
+ srcAtlas.allocs[0] = srcAtlas.allocs[n-1]
+ srcAtlas.allocs = srcAtlas.allocs[:n-1]
+ }
+ srcAtlas.compact = false
+ srcAtlas.realized = false
+ srcAtlas.packer.clear()
+ srcAtlas.packer.newPage()
+ srcAtlas.packer.maxDims = image.Pt(g.maxTextureDim, g.maxTextureDim)
+ atlases = atlases[1:]
+ }
+ if !addedLayers {
+ break
+ }
+ outputSize := dstAtlas.packer.sizes[0]
+ if err := g.realizeAtlas(dstAtlas, useCPU, outputSize); err != nil {
+ return err
+ }
+ for _, move := range g.moves {
+ if !move.cpu {
+ g.ctx.CopyTexture(dstAtlas.image, move.dstPos, move.src.image, move.srcRect)
+ } else {
+ src := move.src.cpuImage.Data()
+ dst := dstAtlas.cpuImage.Data()
+ sstride := move.src.size.X * 4
+ dstride := dstAtlas.size.X * 4
+ copyImage(dst, dstride, move.dstPos, src, sstride, move.srcRect)
+ }
+ }
+ }
+ for i := len(g.atlases) - 1; i >= 0; i-- {
+ a := g.atlases[i]
+ if len(a.allocs) == 0 && g.frameCount-a.lastFrame > maxAtlasAge {
+ a.Release()
+ n := len(g.atlases)
+ g.atlases[i] = g.atlases[n-1]
+ g.atlases = g.atlases[:n-1]
+ }
+ }
+ return nil
+}
+
+func copyImage(dst []byte, dstStride int, dstPos image.Point, src []byte, srcStride int, srcRect image.Rectangle) {
+ sz := srcRect.Size()
+ soff := srcRect.Min.Y*srcStride + srcRect.Min.X*4
+ doff := dstPos.Y*dstStride + dstPos.X*4
+ rowLen := sz.X * 4
+ for y := 0; y < sz.Y; y++ {
+ srow := src[soff : soff+rowLen]
+ drow := dst[doff : doff+rowLen]
+ copy(drow, srow)
+ soff += srcStride
+ doff += dstStride
+ }
+}
+
+func (g *compute) renderLayers(viewport image.Point) error {
+ layers := g.collector.frame.layers
+ for len(layers) > 0 {
+ var materials, dst *textureAtlas
+ addedLayers := false
+ g.enc.reset()
+ for len(layers) > 0 {
+ l := &layers[0]
+ if l.alloc != nil {
+ layers = layers[1:]
+ continue
+ }
+ if materials != nil {
+ if l.materials != nil && materials != l.materials {
+ // Only one materials texture per compute pass.
+ break
+ }
+ } else {
+ materials = l.materials
+ }
+ size := l.rect.Size()
+ alloc, fits := g.atlasAlloc(allocQuery{
+ atlas: dst,
+ empty: true,
+ format: driver.TextureFormatRGBA8,
+ bindings: combinedBindings,
+ // Pad to avoid overlap.
+ size: size.Add(image.Pt(1, 1)),
+ })
+ if !fits {
+ // Only one output atlas per compute pass.
+ break
+ }
+ dst = alloc.atlas
+ dst.compact = true
+ addedLayers = true
+ l.alloc = &alloc
+ dst.allocs = append(dst.allocs, l.alloc)
+ encodeLayer(*l, alloc.rect.Min, viewport, &g.enc, g.texOps)
+ layers = layers[1:]
+ }
+ if !addedLayers {
+ break
+ }
+ outputSize := dst.packer.sizes[0]
+ tileDims := image.Point{
+ X: (outputSize.X + tileWidthPx - 1) / tileWidthPx,
+ Y: (outputSize.Y + tileHeightPx - 1) / tileHeightPx,
+ }
+ w, h := tileDims.X*tileWidthPx, tileDims.Y*tileHeightPx
+ if err := g.realizeAtlas(dst, g.useCPU, image.Pt(w, h)); err != nil {
+ return err
+ }
+ if err := g.render(materials, dst.image, dst.cpuImage, tileDims, dst.size.X*4); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (g *compute) blitLayers(d driver.LoadDesc, fbo driver.Texture, viewport image.Point) {
+ layers := g.collector.frame.layers
+ g.output.layerVertices = g.output.layerVertices[:0]
+ for _, l := range layers {
+ placef := layout.FPt(l.alloc.rect.Min)
+ sizef := layout.FPt(l.rect.Size())
+ r := layout.FRect(l.rect)
+ quad := [4]layerVertex{
+ {posX: float32(r.Min.X), posY: float32(r.Min.Y), u: placef.X, v: placef.Y},
+ {posX: float32(r.Max.X), posY: float32(r.Min.Y), u: placef.X + sizef.X, v: placef.Y},
+ {posX: float32(r.Max.X), posY: float32(r.Max.Y), u: placef.X + sizef.X, v: placef.Y + sizef.Y},
+ {posX: float32(r.Min.X), posY: float32(r.Max.Y), u: placef.X, v: placef.Y + sizef.Y},
+ }
+ g.output.layerVertices = append(g.output.layerVertices, quad[0], quad[1], quad[3], quad[3], quad[2], quad[1])
+ g.ctx.PrepareTexture(l.alloc.atlas.image)
+ }
+ if len(g.output.layerVertices) > 0 {
+ vertexData := byteslice.Slice(g.output.layerVertices)
+ g.output.buffer.ensureCapacity(false, g.ctx, driver.BufferBindingVertices, len(vertexData))
+ g.output.buffer.buffer.Upload(vertexData)
+ }
+ g.ctx.BeginRenderPass(fbo, d)
+ defer g.ctx.EndRenderPass()
+ if len(layers) == 0 {
+ return
+ }
+ g.ctx.Viewport(0, 0, viewport.X, viewport.Y)
+ g.ctx.BindPipeline(g.output.blitPipeline)
+ g.ctx.BindVertexBuffer(g.output.buffer.buffer, 0)
+ start := 0
+ for len(layers) > 0 {
+ count := 0
+ atlas := layers[0].alloc.atlas
+ for len(layers) > 0 {
+ l := layers[0]
+ if l.alloc.atlas != atlas {
+ break
+ }
+ layers = layers[1:]
+ const verticesPerQuad = 6
+ count += verticesPerQuad
+ }
+
+ // Transform positions to clip space: [-1, -1] - [1, 1], and texture
+ // coordinates to texture space: [0, 0] - [1, 1].
+ clip := f32.Affine2D{}.Scale(f32.Pt(0, 0), f32.Pt(2/float32(viewport.X), 2/float32(viewport.Y))).Offset(f32.Pt(-1, -1))
+ sx, _, ox, _, sy, oy := clip.Elems()
+ g.output.uniforms.scale = [2]float32{sx, sy}
+ g.output.uniforms.pos = [2]float32{ox, oy}
+ g.output.uniforms.uvScale = [2]float32{1 / float32(atlas.size.X), 1 / float32(atlas.size.Y)}
+ g.output.uniBuf.Upload(byteslice.Struct(g.output.uniforms))
+ g.ctx.BindUniforms(g.output.uniBuf)
+ g.ctx.BindTexture(0, atlas.image)
+ g.ctx.DrawArrays(start, count)
+ start += count
+ }
+}
+
+func (g *compute) renderMaterials() error {
+ m := &g.materials
+ for k, place := range m.allocs {
+ if place.alloc.dead {
+ delete(m.allocs, k)
+ }
+ }
+ texOps := g.texOps
+ for len(texOps) > 0 {
+ m.quads = m.quads[:0]
+ var (
+ atlas *textureAtlas
+ imgAtlas *textureAtlas
+ )
+ // A material is clipped to avoid drawing outside its atlas bounds.
+ // However, imprecision in the clipping may cause a single pixel
+ // overflow.
+ var padding = image.Pt(1, 1)
+ var allocStart int
+ for len(texOps) > 0 {
+ op := &texOps[0]
+ if a, exists := m.allocs[op.key]; exists {
+ g.touchAlloc(a.alloc)
+ op.matAlloc = a
+ texOps = texOps[1:]
+ continue
+ }
+
+ if imgAtlas != nil && op.imgAlloc.atlas != imgAtlas {
+ // Only one image atlas per render pass.
+ break
+ }
+ imgAtlas = op.imgAlloc.atlas
+ quad := g.materialQuad(imgAtlas.size, op.key.transform, op.img, op.imgAlloc.rect.Min)
+ boundsf := quadBounds(quad)
+ bounds := boundRectF(boundsf)
+ bounds = bounds.Intersect(op.key.bounds)
+
+ size := bounds.Size()
+ alloc, fits := g.atlasAlloc(allocQuery{
+ atlas: atlas,
+ size: size.Add(padding),
+ format: driver.TextureFormatRGBA8,
+ bindings: combinedBindings,
+ })
+ if !fits {
+ break
+ }
+ if atlas == nil {
+ allocStart = len(alloc.atlas.allocs)
+ }
+ atlas = alloc.atlas
+ alloc.cpu = g.useCPU
+ offsetf := layout.FPt(bounds.Min.Mul(-1))
+ scale := f32.Pt(float32(size.X), float32(size.Y))
+ for i := range quad {
+ // Position quad to match place.
+ quad[i].posX += offsetf.X
+ quad[i].posY += offsetf.Y
+ // Scale to match viewport [0, 1].
+ quad[i].posX /= scale.X
+ quad[i].posY /= scale.Y
+ }
+ // Draw quad as two triangles.
+ m.quads = append(m.quads, quad[0], quad[1], quad[3], quad[3], quad[1], quad[2])
+ if m.allocs == nil {
+ m.allocs = make(map[textureKey]materialAlloc)
+ }
+ atlasAlloc := materialAlloc{
+ alloc: &alloc,
+ offset: bounds.Min.Mul(-1),
+ }
+ atlas.allocs = append(atlas.allocs, atlasAlloc.alloc)
+ m.allocs[op.key] = atlasAlloc
+ op.matAlloc = atlasAlloc
+ texOps = texOps[1:]
+ }
+ if len(m.quads) == 0 {
+ break
+ }
+ realized := atlas.realized
+ if err := g.realizeAtlas(atlas, g.useCPU, atlas.packer.sizes[0]); err != nil {
+ return err
+ }
+ // Transform to clip space: [-1, -1] - [1, 1].
+ *m.uniforms.u = materialUniforms{
+ scale: [2]float32{2, 2},
+ pos: [2]float32{-1, -1},
+ }
+ if !g.srgb {
+ m.uniforms.u.emulatesRGB = 1.0
+ }
+ m.uniforms.buf.Upload(byteslice.Struct(m.uniforms.u))
+ vertexData := byteslice.Slice(m.quads)
+ n := pow2Ceil(len(vertexData))
+ m.buffer.ensureCapacity(false, g.ctx, driver.BufferBindingVertices, n)
+ m.buffer.buffer.Upload(vertexData)
+ var d driver.LoadDesc
+ if !realized {
+ d.Action = driver.LoadActionClear
+ }
+ g.ctx.PrepareTexture(imgAtlas.image)
+ g.ctx.BeginRenderPass(atlas.image, d)
+ g.ctx.BindTexture(0, imgAtlas.image)
+ g.ctx.BindPipeline(m.pipeline)
+ g.ctx.BindUniforms(m.uniforms.buf)
+ g.ctx.BindVertexBuffer(m.buffer.buffer, 0)
+ newAllocs := atlas.allocs[allocStart:]
+ for i, a := range newAllocs {
+ sz := a.rect.Size().Sub(padding)
+ g.ctx.Viewport(a.rect.Min.X, a.rect.Min.Y, sz.X, sz.Y)
+ g.ctx.DrawArrays(i*6, 6)
+ }
+ g.ctx.EndRenderPass()
+ if !g.useCPU {
+ continue
+ }
+ src := atlas.image
+ data := atlas.cpuImage.Data()
+ for _, a := range newAllocs {
+ stride := atlas.size.X * 4
+ col := a.rect.Min.X * 4
+ row := stride * a.rect.Min.Y
+ off := col + row
+ src.ReadPixels(a.rect, data[off:], stride)
+ }
+ }
+ return nil
+}
+
+func (g *compute) uploadImages() error {
+ for k, a := range g.imgAllocs {
+ if a.dead {
+ delete(g.imgAllocs, k)
+ }
+ }
+ type upload struct {
+ pos image.Point
+ img *image.RGBA
+ }
+ var uploads []upload
+ format := driver.TextureFormatSRGBA
+ if !g.srgb {
+ format = driver.TextureFormatRGBA8
+ }
+ // padding is the number of pixels added to the right and below
+ // images, to avoid atlas filtering artifacts.
+ const padding = 1
+ texOps := g.texOps
+ for len(texOps) > 0 {
+ uploads = uploads[:0]
+ var atlas *textureAtlas
+ for len(texOps) > 0 {
+ op := &texOps[0]
+ if a, exists := g.imgAllocs[op.img.handle]; exists {
+ g.touchAlloc(a)
+ op.imgAlloc = a
+ texOps = texOps[1:]
+ continue
+ }
+ size := op.img.src.Bounds().Size().Add(image.Pt(padding, padding))
+ alloc, fits := g.atlasAlloc(allocQuery{
+ atlas: atlas,
+ size: size,
+ format: format,
+ bindings: driver.BufferBindingTexture | driver.BufferBindingFramebuffer,
+ })
+ if !fits {
+ break
+ }
+ atlas = alloc.atlas
+ if g.imgAllocs == nil {
+ g.imgAllocs = make(map[interface{}]*atlasAlloc)
+ }
+ op.imgAlloc = &alloc
+ atlas.allocs = append(atlas.allocs, op.imgAlloc)
+ g.imgAllocs[op.img.handle] = op.imgAlloc
+ uploads = append(uploads, upload{pos: alloc.rect.Min, img: op.img.src})
+ texOps = texOps[1:]
+ }
+ if len(uploads) == 0 {
+ break
+ }
+ if err := g.realizeAtlas(atlas, false, atlas.packer.sizes[0]); err != nil {
+ return err
+ }
+ for _, u := range uploads {
+ size := u.img.Bounds().Size()
+ driver.UploadImage(atlas.image, u.pos, u.img)
+ rightPadding := image.Pt(padding, size.Y)
+ atlas.image.Upload(image.Pt(u.pos.X+size.X, u.pos.Y), rightPadding, g.zeros(rightPadding.X*rightPadding.Y*4), 0)
+ bottomPadding := image.Pt(size.X, padding)
+ atlas.image.Upload(image.Pt(u.pos.X, u.pos.Y+size.Y), bottomPadding, g.zeros(bottomPadding.X*bottomPadding.Y*4), 0)
+ }
+ }
+ return nil
+}
+
+func pow2Ceil(v int) int {
+ exp := bits.Len(uint(v))
+ if bits.OnesCount(uint(v)) == 1 {
+ exp--
+ }
+ return 1 << exp
+}
+
+// materialQuad constructs a quad that represents the transformed image. It returns the quad
+// and its bounds.
+func (g *compute) materialQuad(imgAtlasSize image.Point, M f32.Affine2D, img imageOpData, uvPos image.Point) [4]materialVertex {
+ imgSize := layout.FPt(img.src.Bounds().Size())
+ sx, hx, ox, hy, sy, oy := M.Elems()
+ transOff := f32.Pt(ox, oy)
+ // The 4 corners of the image rectangle transformed by M, excluding its offset, are:
+ //
+ // q0: M * (0, 0) q3: M * (w, 0)
+ // q1: M * (0, h) q2: M * (w, h)
+ //
+ // Note that q0 = M*0 = 0, q2 = q1 + q3.
+ q0 := f32.Pt(0, 0)
+ q1 := f32.Pt(hx*imgSize.Y, sy*imgSize.Y)
+ q3 := f32.Pt(sx*imgSize.X, hy*imgSize.X)
+ q2 := q1.Add(q3)
+ q0 = q0.Add(transOff)
+ q1 = q1.Add(transOff)
+ q2 = q2.Add(transOff)
+ q3 = q3.Add(transOff)
+
+ uvPosf := layout.FPt(uvPos)
+ atlasScale := f32.Pt(1/float32(imgAtlasSize.X), 1/float32(imgAtlasSize.Y))
+ uvBounds := f32.Rectangle{
+ Min: uvPosf,
+ Max: uvPosf.Add(imgSize),
+ }
+ uvBounds.Min.X *= atlasScale.X
+ uvBounds.Min.Y *= atlasScale.Y
+ uvBounds.Max.X *= atlasScale.X
+ uvBounds.Max.Y *= atlasScale.Y
+ quad := [4]materialVertex{
+ {posX: q0.X, posY: q0.Y, u: uvBounds.Min.X, v: uvBounds.Min.Y},
+ {posX: q1.X, posY: q1.Y, u: uvBounds.Min.X, v: uvBounds.Max.Y},
+ {posX: q2.X, posY: q2.Y, u: uvBounds.Max.X, v: uvBounds.Max.Y},
+ {posX: q3.X, posY: q3.Y, u: uvBounds.Max.X, v: uvBounds.Min.Y},
+ }
+ return quad
+}
+
+func quadBounds(q [4]materialVertex) f32.Rectangle {
+ q0 := f32.Pt(q[0].posX, q[0].posY)
+ q1 := f32.Pt(q[1].posX, q[1].posY)
+ q2 := f32.Pt(q[2].posX, q[2].posY)
+ q3 := f32.Pt(q[3].posX, q[3].posY)
+ return f32.Rectangle{
+ Min: min(min(q0, q1), min(q2, q3)),
+ Max: max(max(q0, q1), max(q2, q3)),
+ }
+}
+
+func max(p1, p2 f32.Point) f32.Point {
+ p := p1
+ if p2.X > p.X {
+ p.X = p2.X
+ }
+ if p2.Y > p.Y {
+ p.Y = p2.Y
+ }
+ return p
+}
+
+func min(p1, p2 f32.Point) f32.Point {
+ p := p1
+ if p2.X < p.X {
+ p.X = p2.X
+ }
+ if p2.Y < p.Y {
+ p.Y = p2.Y
+ }
+ return p
+}
+
+func (enc *encoder) encodePath(verts []byte, fillMode int) {
+ for ; len(verts) >= scene.CommandSize+4; verts = verts[scene.CommandSize+4:] {
+ cmd := ops.DecodeCommand(verts[4:])
+ if cmd.Op() == scene.OpGap {
+ if fillMode != scene.FillModeNonzero {
+ // Skip gaps in strokes.
+ continue
+ }
+ // Replace them by a straight line in outlines.
+ cmd = scene.Line(scene.DecodeGap(cmd))
+ }
+ enc.scene = append(enc.scene, cmd)
+ enc.npathseg++
+ }
+}
+
+func (g *compute) render(images *textureAtlas, dst driver.Texture, cpuDst cpu.ImageDescriptor, tileDims image.Point, stride int) error {
+ const (
+ // wgSize is the largest and most common workgroup size.
+ wgSize = 128
+ // PARTITION_SIZE from elements.comp
+ partitionSize = 32 * 4
+ )
+ widthInBins := (tileDims.X + 15) / 16
+ heightInBins := (tileDims.Y + 7) / 8
+ if widthInBins*heightInBins > wgSize {
+ return fmt.Errorf("gpu: output too large (%dx%d)", tileDims.X*tileWidthPx, tileDims.Y*tileHeightPx)
+ }
+
+ enc := &g.enc
+ // Pad scene with zeroes to avoid reading garbage in elements.comp.
+ scenePadding := partitionSize - len(enc.scene)%partitionSize
+ enc.scene = append(enc.scene, make([]scene.Command, scenePadding)...)
+
+ scene := byteslice.Slice(enc.scene)
+ if s := len(scene); s > g.buffers.scene.size {
+ paddedCap := s * 11 / 10
+ if err := g.buffers.scene.ensureCapacity(g.useCPU, g.ctx, driver.BufferBindingShaderStorageRead, paddedCap); err != nil {
+ return err
+ }
+ }
+ g.buffers.scene.upload(scene)
+
+ // alloc is the number of allocated bytes for static buffers.
+ var alloc uint32
+ round := func(v, quantum int) int {
+ return (v + quantum - 1) &^ (quantum - 1)
+ }
+ malloc := func(size int) memAlloc {
+ size = round(size, 4)
+ offset := alloc
+ alloc += uint32(size)
+ return memAlloc{offset /*, uint32(size)*/}
+ }
+
+ *g.conf = config{
+ n_elements: uint32(enc.npath),
+ n_pathseg: uint32(enc.npathseg),
+ width_in_tiles: uint32(tileDims.X),
+ height_in_tiles: uint32(tileDims.Y),
+ tile_alloc: malloc(enc.npath * pathSize),
+ bin_alloc: malloc(round(enc.npath, wgSize) * binSize),
+ ptcl_alloc: malloc(tileDims.X * tileDims.Y * ptclInitialAlloc),
+ pathseg_alloc: malloc(enc.npathseg * pathsegSize),
+ anno_alloc: malloc(enc.npath * annoSize),
+ trans_alloc: malloc(enc.ntrans * transSize),
+ }
+
+ numPartitions := (enc.numElements() + 127) / 128
+ // clearSize is the atomic partition counter plus flag and 2 states per partition.
+ clearSize := 4 + numPartitions*stateStride
+ if clearSize > g.buffers.state.size {
+ paddedCap := clearSize * 11 / 10
+ if err := g.buffers.state.ensureCapacity(g.useCPU, g.ctx, driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite, paddedCap); err != nil {
+ return err
+ }
+ }
+
+ confData := byteslice.Struct(g.conf)
+ g.buffers.config.ensureCapacity(g.useCPU, g.ctx, driver.BufferBindingShaderStorageRead, len(confData))
+ g.buffers.config.upload(confData)
+
+ minSize := int(unsafe.Sizeof(memoryHeader{})) + int(alloc)
+ if minSize > g.buffers.memory.size {
+ // Add space for dynamic GPU allocations.
+ const sizeBump = 4 * 1024 * 1024
+ minSize += sizeBump
+ if err := g.buffers.memory.ensureCapacity(g.useCPU, g.ctx, driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite, minSize); err != nil {
+ return err
+ }
+ }
+
+ for {
+ *g.memHeader = memoryHeader{
+ mem_offset: alloc,
+ }
+ g.buffers.memory.upload(byteslice.Struct(g.memHeader))
+ g.buffers.state.upload(g.zeros(clearSize))
+
+ if !g.useCPU {
+ g.ctx.BeginCompute()
+ g.ctx.BindImageTexture(kernel4OutputUnit, dst)
+ img := g.output.nullMaterials
+ if images != nil {
+ img = images.image
+ }
+ g.ctx.BindImageTexture(kernel4AtlasUnit, img)
+ } else {
+ *g.output.descriptors.Binding2() = cpuDst
+ if images != nil {
+ *g.output.descriptors.Binding3() = images.cpuImage
+ }
+ }
+
+ g.bindBuffers()
+ g.memoryBarrier()
+ g.dispatch(g.programs.elements, numPartitions, 1, 1)
+ g.memoryBarrier()
+ g.dispatch(g.programs.tileAlloc, (enc.npath+wgSize-1)/wgSize, 1, 1)
+ g.memoryBarrier()
+ g.dispatch(g.programs.pathCoarse, (enc.npathseg+31)/32, 1, 1)
+ g.memoryBarrier()
+ g.dispatch(g.programs.backdrop, (enc.npath+wgSize-1)/wgSize, 1, 1)
+ // No barrier needed between backdrop and binning.
+ g.dispatch(g.programs.binning, (enc.npath+wgSize-1)/wgSize, 1, 1)
+ g.memoryBarrier()
+ g.dispatch(g.programs.coarse, widthInBins, heightInBins, 1)
+ g.memoryBarrier()
+ g.dispatch(g.programs.kernel4, tileDims.X, tileDims.Y, 1)
+ g.memoryBarrier()
+ if !g.useCPU {
+ g.ctx.EndCompute()
+ } else {
+ g.dispatcher.Sync()
+ }
+
+ if err := g.buffers.memory.download(byteslice.Struct(g.memHeader)); err != nil {
+ if err == driver.ErrContentLost {
+ continue
+ }
+ return err
+ }
+ switch errCode := g.memHeader.mem_error; errCode {
+ case memNoError:
+ if g.useCPU {
+ w, h := tileDims.X*tileWidthPx, tileDims.Y*tileHeightPx
+ dst.Upload(image.Pt(0, 0), image.Pt(w, h), cpuDst.Data(), stride)
+ }
+ return nil
+ case memMallocFailed:
+ // Resize memory and try again.
+ sz := g.buffers.memory.size * 15 / 10
+ if err := g.buffers.memory.ensureCapacity(g.useCPU, g.ctx, driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite, sz); err != nil {
+ return err
+ }
+ continue
+ default:
+ return fmt.Errorf("compute: shader program failed with error %d", errCode)
+ }
+ }
+}
+
+func (g *compute) memoryBarrier() {
+ if g.useCPU {
+ g.dispatcher.Barrier()
+ }
+}
+
+func (g *compute) dispatch(p computeProgram, x, y, z int) {
+ if !g.useCPU {
+ g.ctx.BindProgram(p.prog)
+ g.ctx.DispatchCompute(x, y, z)
+ } else {
+ g.dispatcher.Dispatch(p.progInfo, p.descriptors, x, y, z)
+ }
+}
+
+// zeros returns a byte slice with size bytes of zeros.
+func (g *compute) zeros(size int) []byte {
+ if cap(g.zeroSlice) < size {
+ g.zeroSlice = append(g.zeroSlice, make([]byte, size)...)
+ }
+ return g.zeroSlice[:size]
+}
+
+func (g *compute) touchAlloc(a *atlasAlloc) {
+ if a.dead {
+ panic("re-use of dead allocation")
+ }
+ a.frameCount = g.frameCount
+ a.atlas.lastFrame = a.frameCount
+}
+
+func (g *compute) atlasAlloc(q allocQuery) (atlasAlloc, bool) {
+ var (
+ place placement
+ fits bool
+ atlas = q.atlas
+ )
+ if atlas != nil {
+ place, fits = atlas.packer.tryAdd(q.size)
+ if !fits {
+ atlas.compact = true
+ }
+ }
+ if atlas == nil {
+ // Look for matching atlas to re-use.
+ for _, a := range g.atlases {
+ if q.empty && len(a.allocs) > 0 {
+ continue
+ }
+ if q.nocompact && a.compact {
+ continue
+ }
+ if a.format != q.format || a.bindings&q.bindings != q.bindings {
+ continue
+ }
+ place, fits = a.packer.tryAdd(q.size)
+ if !fits {
+ a.compact = true
+ continue
+ }
+ atlas = a
+ break
+ }
+ }
+ if atlas == nil {
+ atlas = &textureAtlas{
+ format: q.format,
+ bindings: q.bindings,
+ }
+ atlas.packer.maxDims = image.Pt(g.maxTextureDim, g.maxTextureDim)
+ atlas.packer.newPage()
+ g.atlases = append(g.atlases, atlas)
+ place, fits = atlas.packer.tryAdd(q.size)
+ if !fits {
+ panic(fmt.Errorf("compute: atlas allocation too large (%v)", q.size))
+ }
+ }
+ if !fits {
+ return atlasAlloc{}, false
+ }
+ atlas.lastFrame = g.frameCount
+ return atlasAlloc{
+ frameCount: g.frameCount,
+ atlas: atlas,
+ rect: image.Rectangle{Min: place.Pos, Max: place.Pos.Add(q.size)},
+ }, true
+}
+
+func (g *compute) realizeAtlas(atlas *textureAtlas, useCPU bool, size image.Point) error {
+ defer func() {
+ atlas.packer.maxDims = atlas.size
+ atlas.realized = true
+ atlas.ensureCPUImage(useCPU)
+ }()
+ if atlas.size.X >= size.X && atlas.size.Y >= size.Y {
+ return nil
+ }
+ if atlas.realized {
+ panic("resizing a realized atlas")
+ }
+ if err := atlas.resize(g.ctx, size); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (a *textureAtlas) resize(ctx driver.Device, size image.Point) error {
+ a.Release()
+
+ img, err := ctx.NewTexture(a.format, size.X, size.Y,
+ driver.FilterNearest,
+ driver.FilterNearest,
+ a.bindings)
+ if err != nil {
+ return err
+ }
+ a.image = img
+ a.size = size
+ return nil
+}
+
+func (a *textureAtlas) ensureCPUImage(useCPU bool) {
+ if !useCPU || a.hasCPU {
+ return
+ }
+ a.hasCPU = true
+ a.cpuImage = cpu.NewImageRGBA(a.size.X, a.size.Y)
+}
+
+func (g *compute) Release() {
+ if g.useCPU {
+ g.dispatcher.Stop()
+ }
+ type resource interface {
+ Release()
+ }
+ res := []resource{
+ g.output.nullMaterials,
+ &g.programs.elements,
+ &g.programs.tileAlloc,
+ &g.programs.pathCoarse,
+ &g.programs.backdrop,
+ &g.programs.binning,
+ &g.programs.coarse,
+ &g.programs.kernel4,
+ g.output.blitPipeline,
+ &g.output.buffer,
+ g.output.uniBuf,
+ &g.buffers.scene,
+ &g.buffers.state,
+ &g.buffers.memory,
+ &g.buffers.config,
+ g.materials.pipeline,
+ &g.materials.buffer,
+ g.materials.uniforms.buf,
+ g.timers.t,
+ }
+ for _, r := range res {
+ if r != nil {
+ r.Release()
+ }
+ }
+ for _, a := range g.atlases {
+ a.Release()
+ }
+ g.ctx.Release()
+ *g = compute{}
+}
+
+func (a *textureAtlas) Release() {
+ if a.image != nil {
+ a.image.Release()
+ a.image = nil
+ }
+ a.cpuImage.Free()
+ a.hasCPU = false
+}
+
+func (g *compute) bindBuffers() {
+ g.bindStorageBuffers(g.programs.elements, g.buffers.memory, g.buffers.config, g.buffers.scene, g.buffers.state)
+ g.bindStorageBuffers(g.programs.tileAlloc, g.buffers.memory, g.buffers.config)
+ g.bindStorageBuffers(g.programs.pathCoarse, g.buffers.memory, g.buffers.config)
+ g.bindStorageBuffers(g.programs.backdrop, g.buffers.memory, g.buffers.config)
+ g.bindStorageBuffers(g.programs.binning, g.buffers.memory, g.buffers.config)
+ g.bindStorageBuffers(g.programs.coarse, g.buffers.memory, g.buffers.config)
+ g.bindStorageBuffers(g.programs.kernel4, g.buffers.memory, g.buffers.config)
+}
+
+func (p *computeProgram) Release() {
+ if p.prog != nil {
+ p.prog.Release()
+ }
+ *p = computeProgram{}
+}
+
+func (b *sizedBuffer) Release() {
+ if b.buffer != nil {
+ b.buffer.Release()
+ }
+ b.cpuBuf.Free()
+ *b = sizedBuffer{}
+}
+
+func (b *sizedBuffer) ensureCapacity(useCPU bool, ctx driver.Device, binding driver.BufferBinding, size int) error {
+ if b.size >= size {
+ return nil
+ }
+ if b.buffer != nil {
+ b.Release()
+ }
+ b.cpuBuf.Free()
+ if !useCPU {
+ buf, err := ctx.NewBuffer(binding, size)
+ if err != nil {
+ return err
+ }
+ b.buffer = buf
+ } else {
+ b.cpuBuf = cpu.NewBuffer(size)
+ }
+ b.size = size
+ return nil
+}
+
+func (b *sizedBuffer) download(data []byte) error {
+ if b.buffer != nil {
+ return b.buffer.Download(data)
+ } else {
+ copy(data, b.cpuBuf.Data())
+ return nil
+ }
+}
+
+func (b *sizedBuffer) upload(data []byte) {
+ if b.buffer != nil {
+ b.buffer.Upload(data)
+ } else {
+ copy(b.cpuBuf.Data(), data)
+ }
+}
+
+func (g *compute) bindStorageBuffers(prog computeProgram, buffers ...sizedBuffer) {
+ for i, buf := range buffers {
+ if !g.useCPU {
+ g.ctx.BindStorageBuffer(i, buf.buffer)
+ } else {
+ *prog.buffers[i] = buf.cpuBuf
+ }
+ }
+}
+
+var bo = binary.LittleEndian
+
+func (e *encoder) reset() {
+ e.scene = e.scene[:0]
+ e.npath = 0
+ e.npathseg = 0
+ e.ntrans = 0
+}
+
+func (e *encoder) numElements() int {
+ return len(e.scene)
+}
+
+func (e *encoder) append(e2 encoder) {
+ e.scene = append(e.scene, e2.scene...)
+ e.npath += e2.npath
+ e.npathseg += e2.npathseg
+ e.ntrans += e2.ntrans
+}
+
+func (e *encoder) transform(m f32.Affine2D) {
+ e.scene = append(e.scene, scene.Transform(m))
+ e.ntrans++
+}
+
+func (e *encoder) lineWidth(width float32) {
+ e.scene = append(e.scene, scene.SetLineWidth(width))
+}
+
+func (e *encoder) fillMode(mode scene.FillMode) {
+ e.scene = append(e.scene, scene.SetFillMode(mode))
+}
+
+func (e *encoder) beginClip(bbox f32.Rectangle) {
+ e.scene = append(e.scene, scene.BeginClip(bbox))
+ e.npath++
+}
+
+func (e *encoder) endClip(bbox f32.Rectangle) {
+ e.scene = append(e.scene, scene.EndClip(bbox))
+ e.npath++
+}
+
+func (e *encoder) rect(r f32.Rectangle) {
+ // Rectangle corners, clock-wise.
+ c0, c1, c2, c3 := r.Min, f32.Pt(r.Min.X, r.Max.Y), r.Max, f32.Pt(r.Max.X, r.Min.Y)
+ e.line(c0, c1)
+ e.line(c1, c2)
+ e.line(c2, c3)
+ e.line(c3, c0)
+}
+
+func (e *encoder) fillColor(col color.RGBA) {
+ e.scene = append(e.scene, scene.FillColor(col))
+ e.npath++
+}
+
+func (e *encoder) fillImage(index int, offset image.Point) {
+ e.scene = append(e.scene, scene.FillImage(index, offset))
+ e.npath++
+}
+
+func (e *encoder) line(start, end f32.Point) {
+ e.scene = append(e.scene, scene.Line(start, end))
+ e.npathseg++
+}
+
+func (e *encoder) quad(start, ctrl, end f32.Point) {
+ e.scene = append(e.scene, scene.Quad(start, ctrl, end))
+ e.npathseg++
+}
+
+func (c *collector) reset() {
+ c.prevFrame, c.frame = c.frame, c.prevFrame
+ c.profile = false
+ c.clipStates = c.clipStates[:0]
+ c.transStack = c.transStack[:0]
+ c.frame.reset()
+}
+
+func (c *opsCollector) reset() {
+ c.paths = c.paths[:0]
+ c.clipCmds = c.clipCmds[:0]
+ c.ops = c.ops[:0]
+ c.layers = c.layers[:0]
+}
+
+func (c *collector) addClip(state *encoderState, viewport, bounds f32.Rectangle, path []byte, key ops.Key, hash uint64, strokeWidth float32, push bool) {
+ // Rectangle clip regions.
+ if len(path) == 0 && !push {
+ // If the rectangular clip region contains a previous path it can be discarded.
+ p := state.clip
+ t := state.relTrans.Invert()
+ for p != nil {
+ // rect is the parent bounds transformed relative to the rectangle.
+ rect := transformBounds(t, p.bounds)
+ if rect.In(bounds) {
+ return
+ }
+ t = p.relTrans.Invert().Mul(t)
+ p = p.parent
+ }
+ }
+
+ absBounds := transformBounds(state.t, bounds).Bounds()
+ intersect := absBounds
+ if state.clip != nil {
+ intersect = state.clip.intersect.Intersect(intersect)
+ }
+ c.clipStates = append(c.clipStates, clipState{
+ parent: state.clip,
+ absBounds: absBounds,
+ path: path,
+ pathKey: key,
+ intersect: intersect,
+ clipKey: clipKey{
+ bounds: bounds,
+ relTrans: state.relTrans,
+ strokeWidth: strokeWidth,
+ pathHash: hash,
+ },
+ })
+ state.clip = &c.clipStates[len(c.clipStates)-1]
+ state.relTrans = f32.Affine2D{}
+}
+
+func (c *collector) collect(root *op.Ops, viewport image.Point, texOps *[]textureOp) {
+ fview := f32.Rectangle{Max: layout.FPt(viewport)}
+ var intOps *ops.Ops
+ if root != nil {
+ intOps = &root.Internal
+ }
+ c.reader.Reset(intOps)
+ var state encoderState
+ reset := func() {
+ state = encoderState{
+ paintKey: paintKey{
+ color: color.NRGBA{A: 0xff},
+ },
+ }
+ }
+ reset()
+ r := &c.reader
+ var (
+ pathData struct {
+ data []byte
+ key ops.Key
+ hash uint64
+ }
+ strWidth float32
+ )
+ c.addClip(&state, fview, fview, nil, ops.Key{}, 0, 0, false)
+ for encOp, ok := r.Decode(); ok; encOp, ok = r.Decode() {
+ switch ops.OpType(encOp.Data[0]) {
+ case ops.TypeProfile:
+ c.profile = true
+ case ops.TypeTransform:
+ dop, push := ops.DecodeTransform(encOp.Data)
+ if push {
+ c.transStack = append(c.transStack, transEntry{t: state.t, relTrans: state.relTrans})
+ }
+ state.t = state.t.Mul(dop)
+ state.relTrans = state.relTrans.Mul(dop)
+ case ops.TypePopTransform:
+ n := len(c.transStack)
+ st := c.transStack[n-1]
+ c.transStack = c.transStack[:n-1]
+ state.t = st.t
+ state.relTrans = st.relTrans
+ case ops.TypeStroke:
+ strWidth = decodeStrokeOp(encOp.Data)
+ case ops.TypePath:
+ hash := bo.Uint64(encOp.Data[1:])
+ encOp, ok = r.Decode()
+ if !ok {
+ panic("unexpected end of path operation")
+ }
+ pathData.data = encOp.Data[ops.TypeAuxLen:]
+ pathData.key = encOp.Key
+ pathData.hash = hash
+ case ops.TypeClip:
+ var op ops.ClipOp
+ op.Decode(encOp.Data)
+ bounds := layout.FRect(op.Bounds)
+ c.addClip(&state, fview, bounds, pathData.data, pathData.key, pathData.hash, strWidth, true)
+ pathData.data = nil
+ strWidth = 0
+ case ops.TypePopClip:
+ state.relTrans = state.clip.relTrans.Mul(state.relTrans)
+ state.clip = state.clip.parent
+ case ops.TypeColor:
+ state.matType = materialColor
+ state.color = decodeColorOp(encOp.Data)
+ case ops.TypeLinearGradient:
+ state.matType = materialLinearGradient
+ op := decodeLinearGradientOp(encOp.Data)
+ state.stop1 = op.stop1
+ state.stop2 = op.stop2
+ state.color1 = op.color1
+ state.color2 = op.color2
+ case ops.TypeImage:
+ state.matType = materialTexture
+ state.image = decodeImageOp(encOp.Data, encOp.Refs)
+ case ops.TypePaint:
+ paintState := state
+ if paintState.matType == materialTexture {
+ // Clip to the bounds of the image, to hide other images in the atlas.
+ sz := state.image.src.Rect.Size()
+ bounds := f32.Rectangle{Max: layout.FPt(sz)}
+ c.addClip(&paintState, fview, bounds, nil, ops.Key{}, 0, 0, false)
+ }
+ intersect := paintState.clip.intersect
+ if intersect.Empty() {
+ break
+ }
+
+ // If the paint is a uniform opaque color that takes up the whole
+ // screen, it covers all previous paints and we can discard all
+ // rendering commands recorded so far.
+ if paintState.clip == nil && paintState.matType == materialColor && paintState.color.A == 255 {
+ c.clearColor = f32color.LinearFromSRGB(paintState.color).Opaque()
+ c.clear = true
+ c.frame.reset()
+ break
+ }
+
+ // Flatten clip stack.
+ p := paintState.clip
+ startIdx := len(c.frame.clipCmds)
+ for p != nil {
+ idx := len(c.frame.paths)
+ c.frame.paths = append(c.frame.paths, make([]byte, len(p.path))...)
+ path := c.frame.paths[idx:]
+ copy(path, p.path)
+ c.frame.clipCmds = append(c.frame.clipCmds, clipCmd{
+ state: p.clipKey,
+ path: path,
+ pathKey: p.pathKey,
+ absBounds: p.absBounds,
+ })
+ p = p.parent
+ }
+ clipStack := c.frame.clipCmds[startIdx:]
+ c.frame.ops = append(c.frame.ops, paintOp{
+ clipStack: clipStack,
+ state: paintState.paintKey,
+ intersect: intersect,
+ })
+ case ops.TypeSave:
+ id := ops.DecodeSave(encOp.Data)
+ c.save(id, state.t)
+ case ops.TypeLoad:
+ reset()
+ id := ops.DecodeLoad(encOp.Data)
+ state.t = c.states[id]
+ state.relTrans = state.t
+ }
+ }
+ for i := range c.frame.ops {
+ op := &c.frame.ops[i]
+ // For each clip, cull rectangular clip regions that contain its
+ // (transformed) bounds. addClip already handled the converse case.
+ // TODO: do better than O(n²) to efficiently deal with deep stacks.
+ for j := 0; j < len(op.clipStack)-1; j++ {
+ cl := op.clipStack[j]
+ p := cl.state
+ r := transformBounds(p.relTrans, p.bounds)
+ for k := j + 1; k < len(op.clipStack); k++ {
+ cl2 := op.clipStack[k]
+ p2 := cl2.state
+ if len(cl2.path) == 0 && r.In(cl2.state.bounds) {
+ op.clipStack = append(op.clipStack[:k], op.clipStack[k+1:]...)
+ k--
+ op.clipStack[k].state.relTrans = p2.relTrans.Mul(op.clipStack[k].state.relTrans)
+ }
+ r = transformRect(p2.relTrans, r)
+ }
+ }
+ // Separate the integer offset from the first transform. Two ops that differ
+ // only in integer offsets may share backing storage.
+ if len(op.clipStack) > 0 {
+ c := &op.clipStack[len(op.clipStack)-1]
+ t := c.state.relTrans
+ t, off := separateTransform(t)
+ c.state.relTrans = t
+ op.offset = off
+ op.state.t = op.state.t.Offset(layout.FPt(off.Mul(-1)))
+ }
+ op.hash = c.hashOp(*op)
+ op.texOpIdx = -1
+ switch op.state.matType {
+ case materialTexture:
+ op.texOpIdx = len(*texOps)
+ // Separate integer offset from transformation. TextureOps that have identical transforms
+ // except for their integer offsets can share a transformed image.
+ t := op.state.t.Offset(layout.FPt(op.offset))
+ t, off := separateTransform(t)
+ bounds := boundRectF(op.intersect).Sub(off)
+ *texOps = append(*texOps, textureOp{
+ img: op.state.image,
+ off: off,
+ key: textureKey{
+ bounds: bounds,
+ transform: t,
+ handle: op.state.image.handle,
+ },
+ })
+ }
+ }
+}
+
+func (c *collector) hashOp(op paintOp) uint64 {
+ c.hasher.Reset()
+ for _, cl := range op.clipStack {
+ k := cl.state
+ keyBytes := (*[unsafe.Sizeof(k)]byte)(unsafe.Pointer(unsafe.Pointer(&k)))
+ c.hasher.Write(keyBytes[:])
+ }
+ k := op.state
+ keyBytes := (*[unsafe.Sizeof(k)]byte)(unsafe.Pointer(unsafe.Pointer(&k)))
+ c.hasher.Write(keyBytes[:])
+ return c.hasher.Sum64()
+}
+
+func (g *compute) layer(viewport image.Point, texOps []textureOp) {
+ // Sort ops from previous frames by hash.
+ c := &g.collector
+ prevOps := c.prevFrame.ops
+ c.order = c.order[:0]
+ for i, op := range prevOps {
+ c.order = append(c.order, hashIndex{
+ index: i,
+ hash: op.hash,
+ })
+ }
+ sort.Slice(c.order, func(i, j int) bool {
+ return c.order[i].hash < c.order[j].hash
+ })
+ // Split layers with different materials atlas; the compute stage has only
+ // one materials slot.
+ splitLayer := func(ops []paintOp, prevLayerIdx int) {
+ for len(ops) > 0 {
+ var materials *textureAtlas
+ idx := 0
+ for idx < len(ops) {
+ if i := ops[idx].texOpIdx; i != -1 {
+ omats := texOps[i].matAlloc.alloc.atlas
+ if materials != nil && omats != nil && omats != materials {
+ break
+ }
+ materials = omats
+ }
+ idx++
+ }
+ l := layer{ops: ops[:idx], materials: materials}
+ if prevLayerIdx != -1 {
+ prev := c.prevFrame.layers[prevLayerIdx]
+ if !prev.alloc.dead && len(prev.ops) == len(l.ops) {
+ l.alloc = prev.alloc
+ l.materials = prev.materials
+ g.touchAlloc(l.alloc)
+ }
+ }
+ for i, op := range l.ops {
+ l.rect = l.rect.Union(boundRectF(op.intersect))
+ l.ops[i].layer = len(c.frame.layers)
+ }
+ c.frame.layers = append(c.frame.layers, l)
+ ops = ops[idx:]
+ }
+ }
+ ops := c.frame.ops
+ idx := 0
+ for idx < len(ops) {
+ op := ops[idx]
+ // Search for longest matching op sequence.
+ // start is the earliest index of a match.
+ start := searchOp(c.order, op.hash)
+ layerOps, prevLayerIdx := longestLayer(prevOps, c.order[start:], ops[idx:])
+ if len(layerOps) == 0 {
+ idx++
+ continue
+ }
+ if unmatched := ops[:idx]; len(unmatched) > 0 {
+ // Flush layer of unmatched ops.
+ splitLayer(unmatched, -1)
+ ops = ops[idx:]
+ idx = 0
+ }
+ splitLayer(layerOps, prevLayerIdx)
+ ops = ops[len(layerOps):]
+ }
+ if len(ops) > 0 {
+ splitLayer(ops, -1)
+ }
+}
+
+func longestLayer(prev []paintOp, order []hashIndex, ops []paintOp) ([]paintOp, int) {
+ longest := 0
+ longestIdx := -1
+outer:
+ for len(order) > 0 {
+ first := order[0]
+ order = order[1:]
+ match := prev[first.index:]
+ // Potential match found. Now find longest matching sequence.
+ end := 0
+ layer := match[0].layer
+ off := match[0].offset.Sub(ops[0].offset)
+ for end < len(match) && end < len(ops) {
+ m := match[end]
+ o := ops[end]
+ // End layers on previous match.
+ if m.layer != layer {
+ break
+ }
+ // End layer when the next op doesn't match.
+ if m.hash != o.hash {
+ if end == 0 {
+ // Hashes are sorted so if the first op doesn't match, no
+ // more matches are possible.
+ break outer
+ }
+ break
+ }
+ if !opEqual(off, m, o) {
+ break
+ }
+ end++
+ }
+ if end > longest {
+ longest = end
+ longestIdx = layer
+
+ }
+ }
+ return ops[:longest], longestIdx
+}
+
+func searchOp(order []hashIndex, hash uint64) int {
+ lo, hi := 0, len(order)
+ for lo < hi {
+ mid := (lo + hi) / 2
+ if order[mid].hash < hash {
+ lo = mid + 1
+ } else {
+ hi = mid
+ }
+ }
+ return lo
+}
+
+func opEqual(off image.Point, o1 paintOp, o2 paintOp) bool {
+ if len(o1.clipStack) != len(o2.clipStack) {
+ return false
+ }
+ if o1.state != o2.state {
+ return false
+ }
+ if o1.offset.Sub(o2.offset) != off {
+ return false
+ }
+ for i, cl1 := range o1.clipStack {
+ cl2 := o2.clipStack[i]
+ if len(cl1.path) != len(cl2.path) {
+ return false
+ }
+ if cl1.state != cl2.state {
+ return false
+ }
+ if cl1.pathKey != cl2.pathKey && !bytes.Equal(cl1.path, cl2.path) {
+ return false
+ }
+ }
+ return true
+}
+
+func encodeLayer(l layer, pos image.Point, viewport image.Point, enc *encoder, texOps []textureOp) {
+ off := pos.Sub(l.rect.Min)
+ offf := layout.FPt(off)
+
+ enc.transform(f32.Affine2D{}.Offset(offf))
+ for _, op := range l.ops {
+ encodeOp(viewport, off, enc, texOps, op)
+ }
+ enc.transform(f32.Affine2D{}.Offset(offf.Mul(-1)))
+}
+
+func encodeOp(viewport image.Point, absOff image.Point, enc *encoder, texOps []textureOp, op paintOp) {
+ // Fill in clip bounds, which the shaders expect to be the union
+ // of all affected bounds.
+ var union f32.Rectangle
+ for i, cl := range op.clipStack {
+ union = union.Union(cl.absBounds)
+ op.clipStack[i].union = union
+ }
+
+ absOfff := layout.FPt(absOff)
+ fillMode := scene.FillModeNonzero
+ opOff := layout.FPt(op.offset)
+ inv := f32.Affine2D{}.Offset(opOff)
+ enc.transform(inv)
+ for i := len(op.clipStack) - 1; i >= 0; i-- {
+ cl := op.clipStack[i]
+ if w := cl.state.strokeWidth; w > 0 {
+ enc.fillMode(scene.FillModeStroke)
+ enc.lineWidth(w)
+ fillMode = scene.FillModeStroke
+ } else if fillMode != scene.FillModeNonzero {
+ enc.fillMode(scene.FillModeNonzero)
+ fillMode = scene.FillModeNonzero
+ }
+ enc.transform(cl.state.relTrans)
+ inv = inv.Mul(cl.state.relTrans)
+ if len(cl.path) == 0 {
+ enc.rect(cl.state.bounds)
+ } else {
+ enc.encodePath(cl.path, fillMode)
+ }
+ if i != 0 {
+ enc.beginClip(cl.union.Add(absOfff))
+ }
+ }
+ if len(op.clipStack) == 0 {
+ // No clipping; fill the entire view.
+ enc.rect(f32.Rectangle{Max: layout.FPt(viewport)})
+ }
+
+ switch op.state.matType {
+ case materialTexture:
+ texOp := texOps[op.texOpIdx]
+ off := texOp.matAlloc.alloc.rect.Min.Add(texOp.matAlloc.offset).Sub(texOp.off).Sub(absOff)
+ enc.fillImage(0, off)
+ case materialColor:
+ enc.fillColor(f32color.NRGBAToRGBA(op.state.color))
+ case materialLinearGradient:
+ // TODO: implement.
+ enc.fillColor(f32color.NRGBAToRGBA(op.state.color1))
+ default:
+ panic("not implemented")
+ }
+ enc.transform(inv.Invert())
+ // Pop the clip stack, except the first entry used for fill.
+ for i := 1; i < len(op.clipStack); i++ {
+ cl := op.clipStack[i]
+ enc.endClip(cl.union.Add(absOfff))
+ }
+ if fillMode != scene.FillModeNonzero {
+ enc.fillMode(scene.FillModeNonzero)
+ }
+}
+
+func (c *collector) save(id int, state f32.Affine2D) {
+ if extra := id - len(c.states) + 1; extra > 0 {
+ c.states = append(c.states, make([]f32.Affine2D, extra)...)
+ }
+ c.states[id] = state
+}
+
+func transformBounds(t f32.Affine2D, bounds f32.Rectangle) rectangle {
+ return rectangle{
+ t.Transform(bounds.Min), t.Transform(f32.Pt(bounds.Max.X, bounds.Min.Y)),
+ t.Transform(bounds.Max), t.Transform(f32.Pt(bounds.Min.X, bounds.Max.Y)),
+ }
+}
+
+func separateTransform(t f32.Affine2D) (f32.Affine2D, image.Point) {
+ sx, hx, ox, hy, sy, oy := t.Elems()
+ intx, fracx := math.Modf(float64(ox))
+ inty, fracy := math.Modf(float64(oy))
+ t = f32.NewAffine2D(sx, hx, float32(fracx), hy, sy, float32(fracy))
+ return t, image.Pt(int(intx), int(inty))
+}
+
+func transformRect(t f32.Affine2D, r rectangle) rectangle {
+ var tr rectangle
+ for i, c := range r {
+ tr[i] = t.Transform(c)
+ }
+ return tr
+}
+
+func (r rectangle) In(b f32.Rectangle) bool {
+ for _, c := range r {
+ inside := b.Min.X <= c.X && c.X <= b.Max.X &&
+ b.Min.Y <= c.Y && c.Y <= b.Max.Y
+ if !inside {
+ return false
+ }
+ }
+ return true
+}
+
+func (r rectangle) Contains(b f32.Rectangle) bool {
+ return true
+}
+
+func (r rectangle) Bounds() f32.Rectangle {
+ bounds := f32.Rectangle{
+ Min: f32.Pt(math.MaxFloat32, math.MaxFloat32),
+ Max: f32.Pt(-math.MaxFloat32, -math.MaxFloat32),
+ }
+ for _, c := range r {
+ if c.X < bounds.Min.X {
+ bounds.Min.X = c.X
+ }
+ if c.Y < bounds.Min.Y {
+ bounds.Min.Y = c.Y
+ }
+ if c.X > bounds.Max.X {
+ bounds.Max.X = c.X
+ }
+ if c.Y > bounds.Max.Y {
+ bounds.Max.Y = c.Y
+ }
+ }
+ return bounds
+}
diff --git a/vendor/gioui.org/gpu/cpu.go b/vendor/gioui.org/gpu/cpu.go
new file mode 100644
index 0000000..f2f84ad
--- /dev/null
+++ b/vendor/gioui.org/gpu/cpu.go
@@ -0,0 +1,129 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gpu
+
+import (
+ "unsafe"
+
+ "gioui.org/cpu"
+)
+
+// This file contains code specific to running compute shaders on the CPU.
+
+// dispatcher dispatches CPU compute programs across multiple goroutines.
+type dispatcher struct {
+ // done is notified when a worker completes its work slice.
+ done chan struct{}
+ // work receives work slice indices. It is closed when the dispatcher is released.
+ work chan work
+ // dispatch receives compute jobs, which is then split among workers.
+ dispatch chan dispatch
+ // sync receives notification when a Sync completes.
+ sync chan struct{}
+}
+
+type work struct {
+ ctx *cpu.DispatchContext
+ index int
+}
+
+type dispatch struct {
+ _type jobType
+ program *cpu.ProgramInfo
+ descSet unsafe.Pointer
+ x, y, z int
+}
+
+type jobType uint8
+
+const (
+ jobDispatch jobType = iota
+ jobBarrier
+ jobSync
+)
+
+func newDispatcher(workers int) *dispatcher {
+ d := &dispatcher{
+ work: make(chan work, workers),
+ done: make(chan struct{}, workers),
+ // Leave some room to avoid blocking calls to Dispatch.
+ dispatch: make(chan dispatch, 20),
+ sync: make(chan struct{}),
+ }
+ for i := 0; i < workers; i++ {
+ go d.worker()
+ }
+ go d.dispatcher()
+ return d
+}
+
+func (d *dispatcher) dispatcher() {
+ defer close(d.work)
+ var free []*cpu.DispatchContext
+ defer func() {
+ for _, ctx := range free {
+ ctx.Free()
+ }
+ }()
+ var used []*cpu.DispatchContext
+ for job := range d.dispatch {
+ switch job._type {
+ case jobDispatch:
+ if len(free) == 0 {
+ free = append(free, cpu.NewDispatchContext())
+ }
+ ctx := free[len(free)-1]
+ free = free[:len(free)-1]
+ used = append(used, ctx)
+ ctx.Prepare(cap(d.work), job.program, job.descSet, job.x, job.y, job.z)
+ for i := 0; i < cap(d.work); i++ {
+ d.work <- work{
+ ctx: ctx,
+ index: i,
+ }
+ }
+ case jobBarrier:
+ // Wait for all outstanding dispatches to complete.
+ for i := 0; i < len(used)*cap(d.work); i++ {
+ <-d.done
+ }
+ free = append(free, used...)
+ used = used[:0]
+ case jobSync:
+ d.sync <- struct{}{}
+ }
+ }
+}
+
+func (d *dispatcher) worker() {
+ thread := cpu.NewThreadContext()
+ defer thread.Free()
+ for w := range d.work {
+ w.ctx.Dispatch(w.index, thread)
+ d.done <- struct{}{}
+ }
+}
+
+func (d *dispatcher) Barrier() {
+ d.dispatch <- dispatch{_type: jobBarrier}
+}
+
+func (d *dispatcher) Sync() {
+ d.dispatch <- dispatch{_type: jobSync}
+ <-d.sync
+}
+
+func (d *dispatcher) Dispatch(program *cpu.ProgramInfo, descSet unsafe.Pointer, x, y, z int) {
+ d.dispatch <- dispatch{
+ _type: jobDispatch,
+ program: program,
+ descSet: descSet,
+ x: x,
+ y: y,
+ z: z,
+ }
+}
+
+func (d *dispatcher) Stop() {
+ close(d.dispatch)
+}
diff --git a/vendor/gioui.org/gpu/gen.go b/vendor/gioui.org/gpu/gen.go
deleted file mode 100644
index 709d0a7..0000000
--- a/vendor/gioui.org/gpu/gen.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package gpu
-
-//go:generate go run ../internal/cmd/convertshaders -package gpu
diff --git a/vendor/gioui.org/gpu/gl/backend.go b/vendor/gioui.org/gpu/gl/backend.go
deleted file mode 100644
index 02037c3..0000000
--- a/vendor/gioui.org/gpu/gl/backend.go
+++ /dev/null
@@ -1,835 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package gl
-
-import (
- "errors"
- "fmt"
- "image"
- "strings"
- "time"
- "unsafe"
-
- "gioui.org/gpu/backend"
-)
-
-// Backend implements backend.Device.
-type Backend struct {
- funcs Functions
-
- state glstate
-
- glver [2]int
- gles bool
- ubo bool
- feats backend.Caps
- // floatTriple holds the settings for floating point
- // textures.
- floatTriple textureTriple
- // Single channel alpha textures.
- alphaTriple textureTriple
- srgbaTriple textureTriple
-}
-
-// State tracking.
-type glstate struct {
- // nattr is the current number of enabled vertex arrays.
- nattr int
- prog *gpuProgram
- texUnits [2]*gpuTexture
- layout *gpuInputLayout
- buffer bufferBinding
-}
-
-type bufferBinding struct {
- buf *gpuBuffer
- offset int
- stride int
-}
-
-type gpuTimer struct {
- funcs Functions
- obj Query
-}
-
-type gpuTexture struct {
- backend *Backend
- obj Texture
- triple textureTriple
- width int
- height int
-}
-
-type gpuFramebuffer struct {
- backend *Backend
- obj Framebuffer
- hasDepth bool
- depthBuf Renderbuffer
- foreign bool
-}
-
-type gpuBuffer struct {
- backend *Backend
- hasBuffer bool
- obj Buffer
- typ backend.BufferBinding
- size int
- immutable bool
- version int
- // For emulation of uniform buffers.
- data []byte
-}
-
-type gpuProgram struct {
- backend *Backend
- obj Program
- nattr int
- vertUniforms uniformsTracker
- fragUniforms uniformsTracker
-}
-
-type uniformsTracker struct {
- locs []uniformLocation
- size int
- buf *gpuBuffer
- version int
-}
-
-type uniformLocation struct {
- uniform Uniform
- offset int
- typ backend.DataType
- size int
-}
-
-type gpuInputLayout struct {
- inputs []backend.InputLocation
- layout []backend.InputDesc
-}
-
-// textureTriple holds the type settings for
-// a TexImage2D call.
-type textureTriple struct {
- internalFormat int
- format Enum
- typ Enum
-}
-
-func NewBackend(f Functions) (*Backend, error) {
- exts := strings.Split(f.GetString(EXTENSIONS), " ")
- glVer := f.GetString(VERSION)
- ver, gles, err := ParseGLVersion(glVer)
- if err != nil {
- return nil, err
- }
- floatTriple, err := floatTripleFor(f, ver, exts)
- if err != nil {
- return nil, err
- }
- srgbaTriple, err := srgbaTripleFor(ver, exts)
- if err != nil {
- return nil, err
- }
- ubo := ver[0] >= 3 && gles
- b := &Backend{
- glver: ver,
- gles: gles,
- ubo: ubo,
- funcs: f,
- floatTriple: floatTriple,
- alphaTriple: alphaTripleFor(ver),
- srgbaTriple: srgbaTriple,
- }
- if hasExtension(exts, "GL_EXT_disjoint_timer_query_webgl2") || hasExtension(exts, "GL_EXT_disjoint_timer_query") {
- b.feats.Features |= backend.FeatureTimers
- }
- b.feats.MaxTextureSize = f.GetInteger(MAX_TEXTURE_SIZE)
- return b, nil
-}
-
-func (b *Backend) BeginFrame() {
- // Assume GL state is reset between frames.
- b.state = glstate{}
-}
-
-func (b *Backend) EndFrame() {
- b.funcs.ActiveTexture(TEXTURE0)
-}
-
-func (b *Backend) Caps() backend.Caps {
- return b.feats
-}
-
-func (b *Backend) NewTimer() backend.Timer {
- return &gpuTimer{
- funcs: b.funcs,
- obj: b.funcs.CreateQuery(),
- }
-}
-
-func (b *Backend) IsTimeContinuous() bool {
- return b.funcs.GetInteger(GPU_DISJOINT_EXT) == FALSE
-}
-
-func (b *Backend) NewFramebuffer(tex backend.Texture, depthBits int) (backend.Framebuffer, error) {
- glErr(b.funcs)
- gltex := tex.(*gpuTexture)
- fb := b.funcs.CreateFramebuffer()
- fbo := &gpuFramebuffer{backend: b, obj: fb}
- b.BindFramebuffer(fbo)
- if err := glErr(b.funcs); err != nil {
- fbo.Release()
- return nil, err
- }
- b.funcs.FramebufferTexture2D(FRAMEBUFFER, COLOR_ATTACHMENT0, TEXTURE_2D, gltex.obj, 0)
- if depthBits > 0 {
- size := Enum(DEPTH_COMPONENT16)
- switch {
- case depthBits > 24:
- size = DEPTH_COMPONENT32F
- case depthBits > 16:
- size = DEPTH_COMPONENT24
- }
- depthBuf := b.funcs.CreateRenderbuffer()
- b.funcs.BindRenderbuffer(RENDERBUFFER, depthBuf)
- b.funcs.RenderbufferStorage(RENDERBUFFER, size, gltex.width, gltex.height)
- b.funcs.FramebufferRenderbuffer(FRAMEBUFFER, DEPTH_ATTACHMENT, RENDERBUFFER, depthBuf)
- fbo.depthBuf = depthBuf
- fbo.hasDepth = true
- if err := glErr(b.funcs); err != nil {
- fbo.Release()
- return nil, err
- }
- }
- if st := b.funcs.CheckFramebufferStatus(FRAMEBUFFER); st != FRAMEBUFFER_COMPLETE {
- fbo.Release()
- return nil, fmt.Errorf("incomplete framebuffer, status = 0x%x, err = %d", st, b.funcs.GetError())
- }
- return fbo, nil
-}
-
-func (b *Backend) CurrentFramebuffer() backend.Framebuffer {
- fboID := Framebuffer(b.funcs.GetBinding(FRAMEBUFFER_BINDING))
- return &gpuFramebuffer{backend: b, obj: fboID, foreign: true}
-}
-
-func (b *Backend) NewTexture(format backend.TextureFormat, width, height int, minFilter, magFilter backend.TextureFilter, binding backend.BufferBinding) (backend.Texture, error) {
- glErr(b.funcs)
- tex := &gpuTexture{backend: b, obj: b.funcs.CreateTexture(), width: width, height: height}
- switch format {
- case backend.TextureFormatFloat:
- tex.triple = b.floatTriple
- case backend.TextureFormatSRGB:
- tex.triple = b.srgbaTriple
- default:
- return nil, errors.New("unsupported texture format")
- }
- b.BindTexture(0, tex)
- b.funcs.TexParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, toTexFilter(magFilter))
- b.funcs.TexParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, toTexFilter(minFilter))
- b.funcs.TexParameteri(TEXTURE_2D, TEXTURE_WRAP_S, CLAMP_TO_EDGE)
- b.funcs.TexParameteri(TEXTURE_2D, TEXTURE_WRAP_T, CLAMP_TO_EDGE)
- b.funcs.TexImage2D(TEXTURE_2D, 0, tex.triple.internalFormat, width, height, tex.triple.format, tex.triple.typ, nil)
- if err := glErr(b.funcs); err != nil {
- tex.Release()
- return nil, err
- }
- return tex, nil
-}
-
-func (b *Backend) NewBuffer(typ backend.BufferBinding, size int) (backend.Buffer, error) {
- glErr(b.funcs)
- buf := &gpuBuffer{backend: b, typ: typ, size: size}
- if typ&backend.BufferBindingUniforms != 0 {
- if typ != backend.BufferBindingUniforms {
- return nil, errors.New("uniforms buffers cannot be bound as anything else")
- }
- if !b.ubo {
- // GLES 2 doesn't support uniform buffers.
- buf.data = make([]byte, size)
- }
- }
- if typ&^backend.BufferBindingUniforms != 0 || b.ubo {
- buf.hasBuffer = true
- buf.obj = b.funcs.CreateBuffer()
- if err := glErr(b.funcs); err != nil {
- buf.Release()
- return nil, err
- }
- }
- return buf, nil
-}
-
-func (b *Backend) NewImmutableBuffer(typ backend.BufferBinding, data []byte) (backend.Buffer, error) {
- glErr(b.funcs)
- obj := b.funcs.CreateBuffer()
- buf := &gpuBuffer{backend: b, obj: obj, typ: typ, size: len(data), hasBuffer: true}
- buf.Upload(data)
- buf.immutable = true
- if err := glErr(b.funcs); err != nil {
- buf.Release()
- return nil, err
- }
- return buf, nil
-}
-
-func glErr(f Functions) error {
- if st := f.GetError(); st != NO_ERROR {
- return fmt.Errorf("glGetError: %#x", st)
- }
- return nil
-}
-
-func (b *Backend) bindTexture(unit int, t *gpuTexture) {
- if b.state.texUnits[unit] != t {
- b.funcs.ActiveTexture(TEXTURE0 + Enum(unit))
- b.funcs.BindTexture(TEXTURE_2D, t.obj)
- b.state.texUnits[unit] = t
- }
-}
-
-func (b *Backend) useProgram(p *gpuProgram) {
- if b.state.prog != p {
- p.backend.funcs.UseProgram(p.obj)
- b.state.prog = p
- }
-}
-
-func (b *Backend) enableVertexArrays(n int) {
- // Enable needed arrays.
- for i := b.state.nattr; i < n; i++ {
- b.funcs.EnableVertexAttribArray(Attrib(i))
- }
- // Disable extra arrays.
- for i := n; i < b.state.nattr; i++ {
- b.funcs.DisableVertexAttribArray(Attrib(i))
- }
- b.state.nattr = n
-}
-
-func (b *Backend) SetDepthTest(enable bool) {
- if enable {
- b.funcs.Enable(DEPTH_TEST)
- } else {
- b.funcs.Disable(DEPTH_TEST)
- }
-}
-
-func (b *Backend) BlendFunc(sfactor, dfactor backend.BlendFactor) {
- b.funcs.BlendFunc(toGLBlendFactor(sfactor), toGLBlendFactor(dfactor))
-}
-
-func toGLBlendFactor(f backend.BlendFactor) Enum {
- switch f {
- case backend.BlendFactorOne:
- return ONE
- case backend.BlendFactorOneMinusSrcAlpha:
- return ONE_MINUS_SRC_ALPHA
- case backend.BlendFactorZero:
- return ZERO
- case backend.BlendFactorDstColor:
- return DST_COLOR
- default:
- panic("unsupported blend factor")
- }
-}
-
-func (b *Backend) DepthMask(mask bool) {
- b.funcs.DepthMask(mask)
-}
-
-func (b *Backend) SetBlend(enable bool) {
- if enable {
- b.funcs.Enable(BLEND)
- } else {
- b.funcs.Disable(BLEND)
- }
-}
-
-func (b *Backend) DrawElements(mode backend.DrawMode, off, count int) {
- b.prepareDraw()
- // off is in 16-bit indices, but DrawElements take a byte offset.
- byteOff := off * 2
- b.funcs.DrawElements(toGLDrawMode(mode), count, UNSIGNED_SHORT, byteOff)
-}
-
-func (b *Backend) DrawArrays(mode backend.DrawMode, off, count int) {
- b.prepareDraw()
- b.funcs.DrawArrays(toGLDrawMode(mode), off, count)
-}
-
-func (b *Backend) prepareDraw() {
- nattr := b.state.prog.nattr
- b.enableVertexArrays(nattr)
- if nattr > 0 {
- b.setupVertexArrays()
- }
- if p := b.state.prog; p != nil {
- p.updateUniforms()
- }
-}
-
-func toGLDrawMode(mode backend.DrawMode) Enum {
- switch mode {
- case backend.DrawModeTriangleStrip:
- return TRIANGLE_STRIP
- case backend.DrawModeTriangles:
- return TRIANGLES
- default:
- panic("unsupported draw mode")
- }
-}
-
-func (b *Backend) Viewport(x, y, width, height int) {
- b.funcs.Viewport(x, y, width, height)
-}
-
-func (b *Backend) Clear(colR, colG, colB, colA float32) {
- b.funcs.ClearColor(colR, colG, colB, colA)
- b.funcs.Clear(COLOR_BUFFER_BIT)
-}
-
-func (b *Backend) ClearDepth(d float32) {
- b.funcs.ClearDepthf(d)
- b.funcs.Clear(DEPTH_BUFFER_BIT)
-}
-
-func (b *Backend) DepthFunc(f backend.DepthFunc) {
- var glfunc Enum
- switch f {
- case backend.DepthFuncGreater:
- glfunc = GREATER
- case backend.DepthFuncGreaterEqual:
- glfunc = GEQUAL
- default:
- panic("unsupported depth func")
- }
- b.funcs.DepthFunc(glfunc)
-}
-
-func (b *Backend) NewInputLayout(vs backend.ShaderSources, layout []backend.InputDesc) (backend.InputLayout, error) {
- if len(vs.Inputs) != len(layout) {
- return nil, fmt.Errorf("NewInputLayout: got %d inputs, expected %d", len(layout), len(vs.Inputs))
- }
- for i, inp := range vs.Inputs {
- if exp, got := inp.Size, layout[i].Size; exp != got {
- return nil, fmt.Errorf("NewInputLayout: data size mismatch for %q: got %d expected %d", inp.Name, got, exp)
- }
- }
- return &gpuInputLayout{
- inputs: vs.Inputs,
- layout: layout,
- }, nil
-}
-
-func (b *Backend) NewProgram(vertShader, fragShader backend.ShaderSources) (backend.Program, error) {
- attr := make([]string, len(vertShader.Inputs))
- for _, inp := range vertShader.Inputs {
- attr[inp.Location] = inp.Name
- }
- vsrc, fsrc := vertShader.GLSL100ES, fragShader.GLSL100ES
- if b.glver[0] >= 3 {
- // OpenGL (ES) 3.0.
- switch {
- case b.gles:
- vsrc, fsrc = vertShader.GLSL300ES, fragShader.GLSL300ES
- case b.glver[0] >= 4 || b.glver[1] >= 2:
- // OpenGL 3.2 Core only accepts glsl 1.50 or newer.
- vsrc, fsrc = vertShader.GLSL150, fragShader.GLSL150
- default:
- vsrc, fsrc = vertShader.GLSL130, fragShader.GLSL130
- }
- }
- p, err := CreateProgram(b.funcs, vsrc, fsrc, attr)
- if err != nil {
- return nil, err
- }
- gpuProg := &gpuProgram{
- backend: b,
- obj: p,
- nattr: len(attr),
- }
- b.BindProgram(gpuProg)
- // Bind texture uniforms.
- for _, tex := range vertShader.Textures {
- u := b.funcs.GetUniformLocation(p, tex.Name)
- if u.valid() {
- b.funcs.Uniform1i(u, tex.Binding)
- }
- }
- for _, tex := range fragShader.Textures {
- u := b.funcs.GetUniformLocation(p, tex.Name)
- if u.valid() {
- b.funcs.Uniform1i(u, tex.Binding)
- }
- }
- if b.ubo {
- for _, block := range vertShader.Uniforms.Blocks {
- blockIdx := b.funcs.GetUniformBlockIndex(p, block.Name)
- if blockIdx != INVALID_INDEX {
- b.funcs.UniformBlockBinding(p, blockIdx, uint(block.Binding))
- }
- }
- // To match Direct3D 11 with separate vertex and fragment
- // shader uniform buffers, offset all fragment blocks to be
- // located after the vertex blocks.
- off := len(vertShader.Uniforms.Blocks)
- for _, block := range fragShader.Uniforms.Blocks {
- blockIdx := b.funcs.GetUniformBlockIndex(p, block.Name)
- if blockIdx != INVALID_INDEX {
- b.funcs.UniformBlockBinding(p, blockIdx, uint(block.Binding+off))
- }
- }
- } else {
- gpuProg.vertUniforms.setup(b.funcs, p, vertShader.Uniforms.Size, vertShader.Uniforms.Locations)
- gpuProg.fragUniforms.setup(b.funcs, p, fragShader.Uniforms.Size, fragShader.Uniforms.Locations)
- }
- return gpuProg, nil
-}
-
-func lookupUniform(funcs Functions, p Program, loc backend.UniformLocation) uniformLocation {
- u := GetUniformLocation(funcs, p, loc.Name)
- return uniformLocation{uniform: u, offset: loc.Offset, typ: loc.Type, size: loc.Size}
-}
-
-func (p *gpuProgram) SetVertexUniforms(buffer backend.Buffer) {
- p.vertUniforms.setBuffer(buffer)
-}
-
-func (p *gpuProgram) SetFragmentUniforms(buffer backend.Buffer) {
- p.fragUniforms.setBuffer(buffer)
-}
-
-func (p *gpuProgram) updateUniforms() {
- f := p.backend.funcs
- if p.backend.ubo {
- if b := p.vertUniforms.buf; b != nil {
- f.BindBufferBase(UNIFORM_BUFFER, 0, b.obj)
- }
- if b := p.fragUniforms.buf; b != nil {
- f.BindBufferBase(UNIFORM_BUFFER, 1, b.obj)
- }
- } else {
- p.vertUniforms.update(f)
- p.fragUniforms.update(f)
- }
-}
-
-func (b *Backend) BindProgram(prog backend.Program) {
- p := prog.(*gpuProgram)
- b.useProgram(p)
-}
-
-func (p *gpuProgram) Release() {
- p.backend.funcs.DeleteProgram(p.obj)
-}
-
-func (u *uniformsTracker) setup(funcs Functions, p Program, uniformSize int, uniforms []backend.UniformLocation) {
- u.locs = make([]uniformLocation, len(uniforms))
- for i, uniform := range uniforms {
- u.locs[i] = lookupUniform(funcs, p, uniform)
- }
- u.size = uniformSize
-}
-
-func (u *uniformsTracker) setBuffer(buffer backend.Buffer) {
- buf := buffer.(*gpuBuffer)
- if buf.typ&backend.BufferBindingUniforms == 0 {
- panic("not a uniform buffer")
- }
- if buf.size < u.size {
- panic(fmt.Errorf("uniform buffer too small, got %d need %d", buf.size, u.size))
- }
- u.buf = buf
- // Force update.
- u.version = buf.version - 1
-}
-
-func (p *uniformsTracker) update(funcs Functions) {
- b := p.buf
- if b == nil || b.version == p.version {
- return
- }
- p.version = b.version
- data := b.data
- for _, u := range p.locs {
- data := data[u.offset:]
- switch {
- case u.typ == backend.DataTypeFloat && u.size == 1:
- data := data[:4]
- v := *(*[1]float32)(unsafe.Pointer(&data[0]))
- funcs.Uniform1f(u.uniform, v[0])
- case u.typ == backend.DataTypeFloat && u.size == 2:
- data := data[:8]
- v := *(*[2]float32)(unsafe.Pointer(&data[0]))
- funcs.Uniform2f(u.uniform, v[0], v[1])
- case u.typ == backend.DataTypeFloat && u.size == 3:
- data := data[:12]
- v := *(*[3]float32)(unsafe.Pointer(&data[0]))
- funcs.Uniform3f(u.uniform, v[0], v[1], v[2])
- case u.typ == backend.DataTypeFloat && u.size == 4:
- data := data[:16]
- v := *(*[4]float32)(unsafe.Pointer(&data[0]))
- funcs.Uniform4f(u.uniform, v[0], v[1], v[2], v[3])
- default:
- panic("unsupported uniform data type or size")
- }
- }
-}
-
-func (b *gpuBuffer) Upload(data []byte) {
- if b.immutable {
- panic("immutable buffer")
- }
- if len(data) > b.size {
- panic("buffer size overflow")
- }
- b.version++
- copy(b.data, data)
- if b.hasBuffer {
- firstBinding := firstBufferType(b.typ)
- b.backend.funcs.BindBuffer(firstBinding, b.obj)
- b.backend.funcs.BufferData(firstBinding, data, STATIC_DRAW)
- }
-}
-
-func (b *gpuBuffer) Release() {
- if b.hasBuffer {
- b.backend.funcs.DeleteBuffer(b.obj)
- b.hasBuffer = false
- }
-}
-
-func (b *Backend) BindVertexBuffer(buf backend.Buffer, stride, offset int) {
- gbuf := buf.(*gpuBuffer)
- if gbuf.typ&backend.BufferBindingVertices == 0 {
- panic("not a vertex buffer")
- }
- b.state.buffer = bufferBinding{buf: gbuf, stride: stride, offset: offset}
-}
-
-func (b *Backend) setupVertexArrays() {
- layout := b.state.layout
- if layout == nil {
- return
- }
- buf := b.state.buffer
- b.funcs.BindBuffer(ARRAY_BUFFER, buf.buf.obj)
- for i, inp := range layout.inputs {
- l := layout.layout[i]
- var gltyp Enum
- switch l.Type {
- case backend.DataTypeFloat:
- gltyp = FLOAT
- case backend.DataTypeShort:
- gltyp = SHORT
- default:
- panic("unsupported data type")
- }
- b.funcs.VertexAttribPointer(Attrib(inp.Location), l.Size, gltyp, false, buf.stride, buf.offset+l.Offset)
- }
-}
-
-func (b *Backend) BindIndexBuffer(buf backend.Buffer) {
- gbuf := buf.(*gpuBuffer)
- if gbuf.typ&backend.BufferBindingIndices == 0 {
- panic("not an index buffer")
- }
- b.funcs.BindBuffer(ELEMENT_ARRAY_BUFFER, gbuf.obj)
-}
-
-func (f *gpuFramebuffer) ReadPixels(src image.Rectangle, pixels []byte) error {
- glErr(f.backend.funcs)
- f.backend.BindFramebuffer(f)
- if len(pixels) < src.Dx()*src.Dy() {
- return errors.New("unexpected RGBA size")
- }
- f.backend.funcs.ReadPixels(src.Min.X, src.Min.Y, src.Dx(), src.Dy(), RGBA, UNSIGNED_BYTE, pixels)
- // OpenGL origin is in the lower-left corner. Flip the image to
- // match.
- flipImageY(src.Dx()*4, src.Dy(), pixels)
- return glErr(f.backend.funcs)
-}
-
-func flipImageY(stride int, height int, pixels []byte) {
- // Flip image in y-direction. OpenGL's origin is in the lower
- // left corner.
- row := make([]uint8, stride)
- for y := 0; y < height/2; y++ {
- y1 := height - y - 1
- dest := y1 * stride
- src := y * stride
- copy(row, pixels[dest:])
- copy(pixels[dest:], pixels[src:src+len(row)])
- copy(pixels[src:], row)
- }
-}
-
-func (b *Backend) BindFramebuffer(fbo backend.Framebuffer) {
- b.funcs.BindFramebuffer(FRAMEBUFFER, fbo.(*gpuFramebuffer).obj)
-}
-
-func (f *gpuFramebuffer) Invalidate() {
- f.backend.BindFramebuffer(f)
- f.backend.funcs.InvalidateFramebuffer(FRAMEBUFFER, COLOR_ATTACHMENT0)
-}
-
-func (f *gpuFramebuffer) Release() {
- if f.foreign {
- panic("cannot release framebuffer created by CurrentFramebuffer")
- }
- f.backend.funcs.DeleteFramebuffer(f.obj)
- if f.hasDepth {
- f.backend.funcs.DeleteRenderbuffer(f.depthBuf)
- }
-}
-
-func toTexFilter(f backend.TextureFilter) int {
- switch f {
- case backend.FilterNearest:
- return NEAREST
- case backend.FilterLinear:
- return LINEAR
- default:
- panic("unsupported texture filter")
- }
-}
-
-func (b *Backend) BindTexture(unit int, t backend.Texture) {
- b.bindTexture(unit, t.(*gpuTexture))
-}
-
-func (t *gpuTexture) Release() {
- t.backend.funcs.DeleteTexture(t.obj)
-}
-
-func (t *gpuTexture) Upload(img *image.RGBA) {
- t.backend.BindTexture(0, t)
- var pixels []byte
- b := img.Bounds()
- w, h := b.Dx(), b.Dy()
- if img.Stride != w*4 {
- panic("unsupported stride")
- }
- start := (b.Min.X + b.Min.Y*w) * 4
- end := (b.Max.X + (b.Max.Y-1)*w) * 4
- pixels = img.Pix[start:end]
- t.backend.funcs.TexImage2D(TEXTURE_2D, 0, t.triple.internalFormat, w, h, t.triple.format, t.triple.typ, pixels)
-}
-
-func (t *gpuTimer) Begin() {
- t.funcs.BeginQuery(TIME_ELAPSED_EXT, t.obj)
-}
-
-func (t *gpuTimer) End() {
- t.funcs.EndQuery(TIME_ELAPSED_EXT)
-}
-
-func (t *gpuTimer) ready() bool {
- return t.funcs.GetQueryObjectuiv(t.obj, QUERY_RESULT_AVAILABLE) == TRUE
-}
-
-func (t *gpuTimer) Release() {
- t.funcs.DeleteQuery(t.obj)
-}
-
-func (t *gpuTimer) Duration() (time.Duration, bool) {
- if !t.ready() {
- return 0, false
- }
- nanos := t.funcs.GetQueryObjectuiv(t.obj, QUERY_RESULT)
- return time.Duration(nanos), true
-}
-
-func (b *Backend) BindInputLayout(l backend.InputLayout) {
- b.state.layout = l.(*gpuInputLayout)
-}
-
-func (l *gpuInputLayout) Release() {}
-
-// floatTripleFor determines the best texture triple for floating point FBOs.
-func floatTripleFor(f Functions, ver [2]int, exts []string) (textureTriple, error) {
- var triples []textureTriple
- if ver[0] >= 3 {
- triples = append(triples, textureTriple{R16F, Enum(RED), Enum(HALF_FLOAT)})
- }
- // According to the OES_texture_half_float specification, EXT_color_buffer_half_float is needed to
- // render to FBOs. However, the Safari WebGL1 implementation does support half-float FBOs but does not
- // report EXT_color_buffer_half_float support. The triples are verified below, so it doesn't matter if we're
- // wrong.
- if hasExtension(exts, "GL_OES_texture_half_float") || hasExtension(exts, "GL_EXT_color_buffer_half_float") {
- // Try single channel.
- triples = append(triples, textureTriple{LUMINANCE, Enum(LUMINANCE), Enum(HALF_FLOAT_OES)})
- // Fallback to 4 channels.
- triples = append(triples, textureTriple{RGBA, Enum(RGBA), Enum(HALF_FLOAT_OES)})
- }
- if hasExtension(exts, "GL_OES_texture_float") || hasExtension(exts, "GL_EXT_color_buffer_float") {
- triples = append(triples, textureTriple{RGBA, Enum(RGBA), Enum(FLOAT)})
- }
- tex := f.CreateTexture()
- defer f.DeleteTexture(tex)
- f.BindTexture(TEXTURE_2D, tex)
- f.TexParameteri(TEXTURE_2D, TEXTURE_WRAP_S, CLAMP_TO_EDGE)
- f.TexParameteri(TEXTURE_2D, TEXTURE_WRAP_T, CLAMP_TO_EDGE)
- f.TexParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, NEAREST)
- f.TexParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, NEAREST)
- fbo := f.CreateFramebuffer()
- defer f.DeleteFramebuffer(fbo)
- defFBO := Framebuffer(f.GetBinding(FRAMEBUFFER_BINDING))
- f.BindFramebuffer(FRAMEBUFFER, fbo)
- defer f.BindFramebuffer(FRAMEBUFFER, defFBO)
- var attempts []string
- for _, tt := range triples {
- const size = 256
- f.TexImage2D(TEXTURE_2D, 0, tt.internalFormat, size, size, tt.format, tt.typ, nil)
- f.FramebufferTexture2D(FRAMEBUFFER, COLOR_ATTACHMENT0, TEXTURE_2D, tex, 0)
- st := f.CheckFramebufferStatus(FRAMEBUFFER)
- if st == FRAMEBUFFER_COMPLETE {
- return tt, nil
- }
- attempts = append(attempts, fmt.Sprintf("(0x%x, 0x%x, 0x%x): 0x%x", tt.internalFormat, tt.format, tt.typ, st))
- }
- return textureTriple{}, fmt.Errorf("floating point fbos not supported (attempted %s)", attempts)
-}
-
-func srgbaTripleFor(ver [2]int, exts []string) (textureTriple, error) {
- switch {
- case ver[0] >= 3:
- return textureTriple{SRGB8_ALPHA8, Enum(RGBA), Enum(UNSIGNED_BYTE)}, nil
- case hasExtension(exts, "GL_EXT_sRGB"):
- return textureTriple{SRGB_ALPHA_EXT, Enum(SRGB_ALPHA_EXT), Enum(UNSIGNED_BYTE)}, nil
- default:
- return textureTriple{}, errors.New("no sRGB texture formats found")
- }
-}
-
-func alphaTripleFor(ver [2]int) textureTriple {
- intf, f := R8, Enum(RED)
- if ver[0] < 3 {
- // R8, RED not supported on OpenGL ES 2.0.
- intf, f = LUMINANCE, Enum(LUMINANCE)
- }
- return textureTriple{intf, f, UNSIGNED_BYTE}
-}
-
-func hasExtension(exts []string, ext string) bool {
- for _, e := range exts {
- if ext == e {
- return true
- }
- }
- return false
-}
-
-func firstBufferType(typ backend.BufferBinding) Enum {
- switch {
- case typ&backend.BufferBindingIndices != 0:
- return ELEMENT_ARRAY_BUFFER
- case typ&backend.BufferBindingVertices != 0:
- return ARRAY_BUFFER
- case typ&backend.BufferBindingUniforms != 0:
- return UNIFORM_BUFFER
- default:
- panic("unsupported buffer type")
- }
-}
diff --git a/vendor/gioui.org/gpu/gl/types.go b/vendor/gioui.org/gpu/gl/types.go
deleted file mode 100644
index f986bba..0000000
--- a/vendor/gioui.org/gpu/gl/types.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// +build !js
-
-package gl
-
-type (
- Buffer struct{ V uint }
- Framebuffer struct{ V uint }
- Program struct{ V uint }
- Renderbuffer struct{ V uint }
- Shader struct{ V uint }
- Texture struct{ V uint }
- Query struct{ V uint }
- Uniform struct{ V int }
- Object struct{ V uint }
-)
-
-func (u Uniform) valid() bool {
- return u.V != -1
-}
-
-func (p Program) valid() bool {
- return p.V != 0
-}
-
-func (s Shader) valid() bool {
- return s.V != 0
-}
diff --git a/vendor/gioui.org/gpu/gl/types_js.go b/vendor/gioui.org/gpu/gl/types_js.go
deleted file mode 100644
index 16e3a71..0000000
--- a/vendor/gioui.org/gpu/gl/types_js.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package gl
-
-import "syscall/js"
-
-type (
- Buffer js.Value
- Framebuffer js.Value
- Program js.Value
- Renderbuffer js.Value
- Shader js.Value
- Texture js.Value
- Query js.Value
- Uniform js.Value
- Object js.Value
-)
-
-func (p Program) valid() bool {
- return !js.Value(p).IsUndefined() && !js.Value(p).IsNull()
-}
-
-func (s Shader) valid() bool {
- return !js.Value(s).IsUndefined() && !js.Value(s).IsNull()
-}
-
-func (u Uniform) valid() bool {
- return !js.Value(u).IsUndefined() && !js.Value(u).IsNull()
-}
diff --git a/vendor/gioui.org/gpu/gpu.go b/vendor/gioui.org/gpu/gpu.go
index 321b2a8..0bd15c6 100644
--- a/vendor/gioui.org/gpu/gpu.go
+++ b/vendor/gioui.org/gpu/gpu.go
@@ -13,36 +13,57 @@ import (
"image"
"image/color"
"math"
+ "os"
"reflect"
"time"
"unsafe"
"gioui.org/f32"
- "gioui.org/gpu/backend"
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/internal/byteslice"
"gioui.org/internal/f32color"
- "gioui.org/internal/opconst"
"gioui.org/internal/ops"
- gunsafe "gioui.org/internal/unsafe"
+ "gioui.org/internal/scene"
+ "gioui.org/internal/stroke"
"gioui.org/layout"
"gioui.org/op"
- "gioui.org/op/paint"
+ "gioui.org/shader"
+ "gioui.org/shader/gio"
+
+ // Register backends.
+ _ "gioui.org/gpu/internal/d3d11"
+ _ "gioui.org/gpu/internal/metal"
+ _ "gioui.org/gpu/internal/opengl"
+ _ "gioui.org/gpu/internal/vulkan"
)
-type GPU struct {
+type GPU interface {
+ // Release non-Go resources. The GPU is no longer valid after Release.
+ Release()
+ // Clear sets the clear color for the next Frame.
+ Clear(color color.NRGBA)
+ // Frame draws the graphics operations from op into a viewport of target.
+ Frame(frame *op.Ops, target RenderTarget, viewport image.Point) error
+ // Profile returns the last available profiling information. Profiling
+ // information is requested when Frame sees an io/profile.Op, and the result
+ // is available through Profile at some later time.
+ Profile() string
+}
+
+type gpu struct {
cache *resourceCache
- defFBO backend.Framebuffer
- profile string
- timers *timers
- frameStart time.Time
- zopsTimer, stencilTimer, coverTimer, cleanupTimer *timer
- drawOps drawOps
- ctx backend.Device
- renderer *renderer
+ profile string
+ timers *timers
+ frameStart time.Time
+ stencilTimer, coverTimer, cleanupTimer *timer
+ drawOps drawOps
+ ctx driver.Device
+ renderer *renderer
}
type renderer struct {
- ctx backend.Device
+ ctx driver.Device
blitter *blitter
pather *pather
packer packer
@@ -50,17 +71,15 @@ type renderer struct {
}
type drawOps struct {
- profile bool
- reader ops.Reader
- cache *resourceCache
- vertCache []byte
- viewport image.Point
- clearColor f32color.RGBA
- imageOps []imageOp
- // zimageOps are the rectangle clipped opaque images
- // that can use fast front-to-back rendering with z-test
- // and no blending.
- zimageOps []imageOp
+ profile bool
+ reader ops.Reader
+ states []f32.Affine2D
+ transStack []f32.Affine2D
+ vertCache []byte
+ viewport image.Point
+ clear bool
+ clearColor f32color.RGBA
+ imageOps []imageOp
pathOps []*pathOp
pathOpCache []pathOp
qs quadSplitter
@@ -68,26 +87,35 @@ type drawOps struct {
}
type drawState struct {
- clip f32.Rectangle
t f32.Affine2D
cpath *pathOp
- rect bool
- z int
matType materialType
// Current paint.ImageOp
image imageOpData
// Current paint.ColorOp, if any.
- color color.RGBA
+ color color.NRGBA
+
+ // Current paint.LinearGradientOp.
+ stop1 f32.Point
+ stop2 f32.Point
+ color1 color.NRGBA
+ color2 color.NRGBA
}
type pathOp struct {
off f32.Point
+ // rect tracks whether the clip stack can be represented by a
+ // pixel-aligned rectangle.
+ rect bool
// clip is the union of all
// later clip rectangles.
- clip image.Rectangle
- bounds f32.Rectangle
- pathKey ops.Key
+ clip image.Rectangle
+ bounds f32.Rectangle
+ // intersect is the intersection of bounds and all
+ // previous clip bounds.
+ intersect f32.Rectangle
+ pathKey opKey
path bool
pathVerts []byte
parent *pathOp
@@ -95,87 +123,70 @@ type pathOp struct {
}
type imageOp struct {
- z float32
path *pathOp
- off f32.Point
clip image.Rectangle
material material
clipType clipType
place placement
}
+func decodeStrokeOp(data []byte) float32 {
+ _ = data[4]
+ bo := binary.LittleEndian
+ return math.Float32frombits(bo.Uint32(data[1:]))
+}
+
+type quadsOp struct {
+ key opKey
+ aux []byte
+}
+
+type opKey struct {
+ outline bool
+ strokeWidth float32
+ sx, hx, sy, hy float32
+ ops.Key
+}
+
type material struct {
material materialType
opaque bool
// For materialTypeColor.
color f32color.RGBA
+ // For materialTypeLinearGradient.
+ color1 f32color.RGBA
+ color2 f32color.RGBA
// For materialTypeTexture.
- texture *texture
+ data imageOpData
uvTrans f32.Affine2D
}
-// clipOp is the shadow of clip.Op.
-type clipOp struct {
- bounds f32.Rectangle
-}
-
// imageOpData is the shadow of paint.ImageOp.
type imageOpData struct {
- rect image.Rectangle
src *image.RGBA
handle interface{}
}
-func (op *clipOp) decode(data []byte) {
- if opconst.OpType(data[0]) != opconst.TypeClip {
- panic("invalid op")
- }
- bo := binary.LittleEndian
- r := f32.Rectangle{
- Min: f32.Point{
- X: math.Float32frombits(bo.Uint32(data[1:])),
- Y: math.Float32frombits(bo.Uint32(data[5:])),
- },
- Max: f32.Point{
- X: math.Float32frombits(bo.Uint32(data[9:])),
- Y: math.Float32frombits(bo.Uint32(data[13:])),
- },
- }
- *op = clipOp{
- bounds: r,
- }
+type linearGradientOpData struct {
+ stop1 f32.Point
+ color1 color.NRGBA
+ stop2 f32.Point
+ color2 color.NRGBA
}
func decodeImageOp(data []byte, refs []interface{}) imageOpData {
- if opconst.OpType(data[0]) != opconst.TypeImage {
- panic("invalid op")
- }
handle := refs[1]
if handle == nil {
return imageOpData{}
}
- bo := binary.LittleEndian
return imageOpData{
- rect: image.Rectangle{
- Min: image.Point{
- X: int(bo.Uint32(data[1:])),
- Y: int(bo.Uint32(data[5:])),
- },
- Max: image.Point{
- X: int(bo.Uint32(data[9:])),
- Y: int(bo.Uint32(data[13:])),
- },
- },
src: refs[0].(*image.RGBA),
handle: handle,
}
}
-func decodeColorOp(data []byte) color.RGBA {
- if opconst.OpType(data[0]) != opconst.TypeColor {
- panic("invalid op")
- }
- return color.RGBA{
+func decodeColorOp(data []byte) color.NRGBA {
+ return color.NRGBA{
R: data[1],
G: data[2],
B: data[3],
@@ -183,23 +194,29 @@ func decodeColorOp(data []byte) color.RGBA {
}
}
-func decodePaintOp(data []byte) paint.PaintOp {
+func decodeLinearGradientOp(data []byte) linearGradientOpData {
bo := binary.LittleEndian
- if opconst.OpType(data[0]) != opconst.TypePaint {
- panic("invalid op")
- }
- r := f32.Rectangle{
- Min: f32.Point{
+ return linearGradientOpData{
+ stop1: f32.Point{
X: math.Float32frombits(bo.Uint32(data[1:])),
Y: math.Float32frombits(bo.Uint32(data[5:])),
},
- Max: f32.Point{
+ stop2: f32.Point{
X: math.Float32frombits(bo.Uint32(data[9:])),
Y: math.Float32frombits(bo.Uint32(data[13:])),
},
- }
- return paint.PaintOp{
- Rect: r,
+ color1: color.NRGBA{
+ R: data[17+0],
+ G: data[17+1],
+ B: data[17+2],
+ A: data[17+3],
+ },
+ color2: color.NRGBA{
+ R: data[21+0],
+ G: data[21+1],
+ B: data[21+2],
+ A: data[21+3],
+ },
}
}
@@ -211,58 +228,60 @@ type resource interface {
type texture struct {
src *image.RGBA
- tex backend.Texture
+ tex driver.Texture
}
type blitter struct {
- ctx backend.Device
- viewport image.Point
- prog [2]*program
- layout backend.InputLayout
- colUniforms *blitColUniforms
- texUniforms *blitTexUniforms
- quadVerts backend.Buffer
+ ctx driver.Device
+ viewport image.Point
+ pipelines [3]*pipeline
+ colUniforms *blitColUniforms
+ texUniforms *blitTexUniforms
+ linearGradientUniforms *blitLinearGradientUniforms
+ quadVerts driver.Buffer
}
type blitColUniforms struct {
- vert struct {
- blitUniforms
- _ [12]byte // Padding to a multiple of 16.
- }
- frag struct {
- colorUniforms
- }
+ blitUniforms
+ _ [128 - unsafe.Sizeof(blitUniforms{}) - unsafe.Sizeof(colorUniforms{})]byte // Padding to 128 bytes.
+ colorUniforms
}
type blitTexUniforms struct {
- vert struct {
- blitUniforms
- _ [12]byte // Padding to a multiple of 16.
- }
+ blitUniforms
+}
+
+type blitLinearGradientUniforms struct {
+ blitUniforms
+ _ [128 - unsafe.Sizeof(blitUniforms{}) - unsafe.Sizeof(gradientUniforms{})]byte // Padding to 128 bytes.
+ gradientUniforms
}
type uniformBuffer struct {
- buf backend.Buffer
+ buf driver.Buffer
ptr []byte
}
-type program struct {
- prog backend.Program
- vertUniforms *uniformBuffer
- fragUniforms *uniformBuffer
+type pipeline struct {
+ pipeline driver.Pipeline
+ uniforms *uniformBuffer
}
type blitUniforms struct {
transform [4]float32
uvTransformR1 [4]float32
uvTransformR2 [4]float32
- z float32
}
type colorUniforms struct {
color f32color.RGBA
}
+type gradientUniforms struct {
+ color1 f32color.RGBA
+ color2 f32color.RGBA
+}
+
type materialType uint8
const (
@@ -273,14 +292,37 @@ const (
const (
materialColor materialType = iota
+ materialLinearGradient
materialTexture
)
-func New(ctx backend.Device) (*GPU, error) {
- defFBO := ctx.CurrentFramebuffer()
- g := &GPU{
- defFBO: defFBO,
- cache: newResourceCache(),
+// New creates a GPU for the given API.
+func New(api API) (GPU, error) {
+ d, err := driver.NewDevice(api)
+ if err != nil {
+ return nil, err
+ }
+ return NewWithDevice(d)
+}
+
+// NewWithDevice creates a GPU with a pre-existing device.
+//
+// Note: for internal use only.
+func NewWithDevice(d driver.Device) (GPU, error) {
+ d.BeginFrame(nil, false, image.Point{})
+ defer d.EndFrame()
+ forceCompute := os.Getenv("GIORENDERER") == "forcecompute"
+ feats := d.Caps().Features
+ switch {
+ case !forceCompute && feats.Has(driver.FeatureFloatRenderTargets) && feats.Has(driver.FeatureSRGB):
+ return newGPU(d)
+ }
+ return newCompute(d)
+}
+
+func newGPU(ctx driver.Device) (*gpu, error) {
+ g := &gpu{
+ cache: newResourceCache(),
}
g.drawOps.pathCache = newOpCache()
if err := g.init(ctx); err != nil {
@@ -289,111 +331,116 @@ func New(ctx backend.Device) (*GPU, error) {
return g, nil
}
-func (g *GPU) init(ctx backend.Device) error {
+func (g *gpu) init(ctx driver.Device) error {
g.ctx = ctx
g.renderer = newRenderer(ctx)
return nil
}
-func (g *GPU) Release() {
+func (g *gpu) Clear(col color.NRGBA) {
+ g.drawOps.clear = true
+ g.drawOps.clearColor = f32color.LinearFromSRGB(col)
+}
+
+func (g *gpu) Release() {
g.renderer.release()
g.drawOps.pathCache.release()
g.cache.release()
if g.timers != nil {
- g.timers.release()
+ g.timers.Release()
}
+ g.ctx.Release()
+}
+
+func (g *gpu) Frame(frameOps *op.Ops, target RenderTarget, viewport image.Point) error {
+ g.collect(viewport, frameOps)
+ return g.frame(target)
}
-func (g *GPU) Collect(viewport image.Point, frameOps *op.Ops) {
+func (g *gpu) collect(viewport image.Point, frameOps *op.Ops) {
g.renderer.blitter.viewport = viewport
g.renderer.pather.viewport = viewport
- g.drawOps.reset(g.cache, viewport)
- g.drawOps.collect(g.cache, frameOps, viewport)
+ g.drawOps.reset(viewport)
+ g.drawOps.collect(frameOps, viewport)
g.frameStart = time.Now()
- if g.drawOps.profile && g.timers == nil && g.ctx.Caps().Features.Has(backend.FeatureTimers) {
+ if g.drawOps.profile && g.timers == nil && g.ctx.Caps().Features.Has(driver.FeatureTimers) {
g.timers = newTimers(g.ctx)
- g.zopsTimer = g.timers.newTimer()
g.stencilTimer = g.timers.newTimer()
g.coverTimer = g.timers.newTimer()
g.cleanupTimer = g.timers.newTimer()
}
- for _, p := range g.drawOps.pathOps {
- if v, exists := g.drawOps.pathCache.get(p.pathKey); !exists || v.data.data == nil {
- data := buildPath(g.ctx, p.pathVerts)
- g.drawOps.pathCache.put(p.pathKey, opCacheValue{
- data: data,
- bounds: p.bounds,
- })
- }
- p.pathVerts = nil
- }
}
-func (g *GPU) BeginFrame() {
- g.ctx.BeginFrame()
- defer g.ctx.EndFrame()
+func (g *gpu) frame(target RenderTarget) error {
viewport := g.renderer.blitter.viewport
+ defFBO := g.ctx.BeginFrame(target, g.drawOps.clear, viewport)
+ defer g.ctx.EndFrame()
+ g.drawOps.buildPaths(g.ctx)
for _, img := range g.drawOps.imageOps {
expandPathOp(img.path, img.clip)
}
- if g.drawOps.profile {
- g.zopsTimer.begin()
- }
- g.ctx.BindFramebuffer(g.defFBO)
- g.ctx.DepthFunc(backend.DepthFuncGreater)
- g.ctx.ClearDepth(0.0)
- g.ctx.Clear(g.drawOps.clearColor.Float32())
- g.ctx.Viewport(0, 0, viewport.X, viewport.Y)
- g.renderer.drawZOps(g.drawOps.zimageOps)
- g.zopsTimer.end()
g.stencilTimer.begin()
- g.ctx.SetBlend(true)
g.renderer.packStencils(&g.drawOps.pathOps)
g.renderer.stencilClips(g.drawOps.pathCache, g.drawOps.pathOps)
g.renderer.packIntersections(g.drawOps.imageOps)
+ g.renderer.prepareIntersections(g.drawOps.imageOps)
g.renderer.intersect(g.drawOps.imageOps)
g.stencilTimer.end()
g.coverTimer.begin()
- g.ctx.BindFramebuffer(g.defFBO)
+ g.renderer.uploadImages(g.cache, g.drawOps.imageOps)
+ g.renderer.prepareDrawOps(g.cache, g.drawOps.imageOps)
+ d := driver.LoadDesc{
+ ClearColor: g.drawOps.clearColor,
+ }
+ if g.drawOps.clear {
+ g.drawOps.clear = false
+ d.Action = driver.LoadActionClear
+ }
+ g.ctx.BeginRenderPass(defFBO, d)
g.ctx.Viewport(0, 0, viewport.X, viewport.Y)
- g.renderer.drawOps(g.drawOps.imageOps)
- g.ctx.SetBlend(false)
- g.renderer.pather.stenciler.invalidateFBO()
+ g.renderer.drawOps(g.cache, g.drawOps.imageOps)
g.coverTimer.end()
- g.ctx.BindFramebuffer(g.defFBO)
-}
-
-func (g *GPU) EndFrame() {
+ g.ctx.EndRenderPass()
g.cleanupTimer.begin()
g.cache.frame()
g.drawOps.pathCache.frame()
g.cleanupTimer.end()
if g.drawOps.profile && g.timers.ready() {
- zt, st, covt, cleant := g.zopsTimer.Elapsed, g.stencilTimer.Elapsed, g.coverTimer.Elapsed, g.cleanupTimer.Elapsed
- ft := zt + st + covt + cleant
+ st, covt, cleant := g.stencilTimer.Elapsed, g.coverTimer.Elapsed, g.cleanupTimer.Elapsed
+ ft := st + covt + cleant
q := 100 * time.Microsecond
- zt, st, covt = zt.Round(q), st.Round(q), covt.Round(q)
+ st, covt = st.Round(q), covt.Round(q)
frameDur := time.Since(g.frameStart).Round(q)
ft = ft.Round(q)
- g.profile = fmt.Sprintf("draw:%7s gpu:%7s zt:%7s st:%7s cov:%7s", frameDur, ft, zt, st, covt)
+ g.profile = fmt.Sprintf("draw:%7s gpu:%7s st:%7s cov:%7s", frameDur, ft, st, covt)
}
+ return nil
}
-func (g *GPU) Profile() string {
+func (g *gpu) Profile() string {
return g.profile
}
-func (r *renderer) texHandle(t *texture) backend.Texture {
- if t.tex != nil {
- return t.tex
+func (r *renderer) texHandle(cache *resourceCache, data imageOpData) driver.Texture {
+ var tex *texture
+ t, exists := cache.get(data.handle)
+ if !exists {
+ t = &texture{
+ src: data.src,
+ }
+ cache.put(data.handle, t)
}
- tex, err := r.ctx.NewTexture(backend.TextureFormatSRGB, t.src.Bounds().Dx(), t.src.Bounds().Dy(), backend.FilterLinear, backend.FilterLinear, backend.BufferBindingTexture)
+ tex = t.(*texture)
+ if tex.tex != nil {
+ return tex.tex
+ }
+ handle, err := r.ctx.NewTexture(driver.TextureFormatSRGBA, data.src.Bounds().Dx(), data.src.Bounds().Dy(), driver.FilterLinear, driver.FilterLinear, driver.BufferBindingTexture)
if err != nil {
panic(err)
}
- tex.Upload(t.src)
- t.tex = tex
- return t.tex
+ driver.UploadImage(handle, image.Pt(0, 0), data.src)
+ tex.tex = handle
+ return tex.tex
}
func (t *texture) release() {
@@ -402,14 +449,22 @@ func (t *texture) release() {
}
}
-func newRenderer(ctx backend.Device) *renderer {
+func newRenderer(ctx driver.Device) *renderer {
r := &renderer{
ctx: ctx,
blitter: newBlitter(ctx),
pather: newPather(ctx),
}
- r.packer.maxDim = ctx.Caps().MaxTextureSize
- r.intersections.maxDim = r.packer.maxDim
+
+ maxDim := ctx.Caps().MaxTextureSize
+ // Large atlas textures cause artifacts due to precision loss in
+ // shaders.
+ if cap := 8192; maxDim > cap {
+ maxDim = cap
+ }
+
+ r.packer.maxDims = image.Pt(maxDim, maxDim)
+ r.intersections.maxDims = image.Pt(maxDim, maxDim)
return r
}
@@ -418,13 +473,13 @@ func (r *renderer) release() {
r.blitter.release()
}
-func newBlitter(ctx backend.Device) *blitter {
- quadVerts, err := ctx.NewImmutableBuffer(backend.BufferBindingVertices,
- gunsafe.BytesView([]float32{
- -1, +1, 0, 0,
- +1, +1, 1, 0,
- -1, -1, 0, 1,
- +1, -1, 1, 1,
+func newBlitter(ctx driver.Device) *blitter {
+ quadVerts, err := ctx.NewImmutableBuffer(driver.BufferBindingVertices,
+ byteslice.Slice([]float32{
+ -1, -1, 0, 0,
+ +1, -1, 1, 0,
+ -1, +1, 0, 1,
+ +1, +1, 1, 1,
}),
)
if err != nil {
@@ -436,65 +491,125 @@ func newBlitter(ctx backend.Device) *blitter {
}
b.colUniforms = new(blitColUniforms)
b.texUniforms = new(blitTexUniforms)
- prog, layout, err := createColorPrograms(ctx, shader_blit_vert, shader_blit_frag,
- [2]interface{}{&b.colUniforms.vert, &b.texUniforms.vert}, [2]interface{}{&b.colUniforms.frag, nil})
+ b.linearGradientUniforms = new(blitLinearGradientUniforms)
+ pipelines, err := createColorPrograms(ctx, gio.Shader_blit_vert, gio.Shader_blit_frag,
+ [3]interface{}{b.colUniforms, b.linearGradientUniforms, b.texUniforms},
+ )
if err != nil {
panic(err)
}
- b.prog = prog
- b.layout = layout
+ b.pipelines = pipelines
return b
}
func (b *blitter) release() {
b.quadVerts.Release()
- for _, p := range b.prog {
+ for _, p := range b.pipelines {
p.Release()
}
- b.layout.Release()
}
-func createColorPrograms(b backend.Device, vsSrc backend.ShaderSources, fsSrc [2]backend.ShaderSources, vertUniforms, fragUniforms [2]interface{}) ([2]*program, backend.InputLayout, error) {
- var progs [2]*program
- prog, err := b.NewProgram(vsSrc, fsSrc[materialTexture])
- if err != nil {
- return progs, nil, err
+func createColorPrograms(b driver.Device, vsSrc shader.Sources, fsSrc [3]shader.Sources, uniforms [3]interface{}) ([3]*pipeline, error) {
+ var pipelines [3]*pipeline
+ blend := driver.BlendDesc{
+ Enable: true,
+ SrcFactor: driver.BlendFactorOne,
+ DstFactor: driver.BlendFactorOneMinusSrcAlpha,
}
- var vertBuffer *uniformBuffer
- if u := vertUniforms[materialTexture]; u != nil {
- vertBuffer = newUniformBuffer(b, u)
- prog.SetVertexUniforms(vertBuffer.buf)
- }
- var fragBuffer *uniformBuffer
- if u := fragUniforms[materialTexture]; u != nil {
- fragBuffer = newUniformBuffer(b, u)
- prog.SetFragmentUniforms(fragBuffer.buf)
+ layout := driver.VertexLayout{
+ Inputs: []driver.InputDesc{
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 0},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 4 * 2},
+ },
+ Stride: 4 * 4,
}
- progs[materialTexture] = newProgram(prog, vertBuffer, fragBuffer)
- prog, err = b.NewProgram(vsSrc, fsSrc[materialColor])
+ vsh, err := b.NewVertexShader(vsSrc)
if err != nil {
- progs[materialTexture].Release()
- return progs, nil, err
- }
- if u := vertUniforms[materialColor]; u != nil {
- vertBuffer = newUniformBuffer(b, u)
- prog.SetVertexUniforms(vertBuffer.buf)
- }
- if u := fragUniforms[materialColor]; u != nil {
- fragBuffer = newUniformBuffer(b, u)
- prog.SetFragmentUniforms(fragBuffer.buf)
- }
- progs[materialColor] = newProgram(prog, vertBuffer, fragBuffer)
- layout, err := b.NewInputLayout(vsSrc, []backend.InputDesc{
- {Type: backend.DataTypeFloat, Size: 2, Offset: 0},
- {Type: backend.DataTypeFloat, Size: 2, Offset: 4 * 2},
- })
+ return pipelines, err
+ }
+ defer vsh.Release()
+ {
+ fsh, err := b.NewFragmentShader(fsSrc[materialTexture])
+ if err != nil {
+ return pipelines, err
+ }
+ defer fsh.Release()
+ pipe, err := b.NewPipeline(driver.PipelineDesc{
+ VertexShader: vsh,
+ FragmentShader: fsh,
+ BlendDesc: blend,
+ VertexLayout: layout,
+ PixelFormat: driver.TextureFormatOutput,
+ Topology: driver.TopologyTriangleStrip,
+ })
+ if err != nil {
+ return pipelines, err
+ }
+ var vertBuffer *uniformBuffer
+ if u := uniforms[materialTexture]; u != nil {
+ vertBuffer = newUniformBuffer(b, u)
+ }
+ pipelines[materialTexture] = &pipeline{pipe, vertBuffer}
+ }
+ {
+ var vertBuffer *uniformBuffer
+ fsh, err := b.NewFragmentShader(fsSrc[materialColor])
+ if err != nil {
+ pipelines[materialTexture].Release()
+ return pipelines, err
+ }
+ defer fsh.Release()
+ pipe, err := b.NewPipeline(driver.PipelineDesc{
+ VertexShader: vsh,
+ FragmentShader: fsh,
+ BlendDesc: blend,
+ VertexLayout: layout,
+ PixelFormat: driver.TextureFormatOutput,
+ Topology: driver.TopologyTriangleStrip,
+ })
+ if err != nil {
+ pipelines[materialTexture].Release()
+ return pipelines, err
+ }
+ if u := uniforms[materialColor]; u != nil {
+ vertBuffer = newUniformBuffer(b, u)
+ }
+ pipelines[materialColor] = &pipeline{pipe, vertBuffer}
+ }
+ {
+ var vertBuffer *uniformBuffer
+ fsh, err := b.NewFragmentShader(fsSrc[materialLinearGradient])
+ if err != nil {
+ pipelines[materialTexture].Release()
+ pipelines[materialColor].Release()
+ return pipelines, err
+ }
+ defer fsh.Release()
+ pipe, err := b.NewPipeline(driver.PipelineDesc{
+ VertexShader: vsh,
+ FragmentShader: fsh,
+ BlendDesc: blend,
+ VertexLayout: layout,
+ PixelFormat: driver.TextureFormatOutput,
+ Topology: driver.TopologyTriangleStrip,
+ })
+ if err != nil {
+ pipelines[materialTexture].Release()
+ pipelines[materialColor].Release()
+ return pipelines, err
+ }
+ if u := uniforms[materialLinearGradient]; u != nil {
+ vertBuffer = newUniformBuffer(b, u)
+ }
+ pipelines[materialLinearGradient] = &pipeline{pipe, vertBuffer}
+ }
if err != nil {
- progs[materialTexture].Release()
- progs[materialColor].Release()
- return progs, nil, err
+ for _, p := range pipelines {
+ p.Release()
+ }
+ return pipelines, err
}
- return progs, layout, nil
+ return pipelines, nil
}
func (r *renderer) stencilClips(pathCache *opCache, ops []*pathOp) {
@@ -505,14 +620,31 @@ func (r *renderer) stencilClips(pathCache *opCache, ops []*pathOp) {
r.pather.begin(r.packer.sizes)
for _, p := range ops {
if fbo != p.place.Idx {
+ if fbo != -1 {
+ r.ctx.EndRenderPass()
+ }
fbo = p.place.Idx
f := r.pather.stenciler.cover(fbo)
- r.ctx.BindFramebuffer(f.fbo)
- r.ctx.Clear(0.0, 0.0, 0.0, 0.0)
+ r.ctx.BeginRenderPass(f.tex, driver.LoadDesc{Action: driver.LoadActionClear})
+ r.ctx.BindPipeline(r.pather.stenciler.pipeline.pipeline.pipeline)
+ r.ctx.BindIndexBuffer(r.pather.stenciler.indexBuf)
}
v, _ := pathCache.get(p.pathKey)
r.pather.stencilPath(p.clip, p.off, p.place.Pos, v.data)
}
+ if fbo != -1 {
+ r.ctx.EndRenderPass()
+ }
+}
+
+func (r *renderer) prepareIntersections(ops []imageOp) {
+ for _, img := range ops {
+ if img.clipType != clipTypeIntersection {
+ continue
+ }
+ fbo := r.pather.stenciler.cover(img.path.place.Idx)
+ r.ctx.PrepareTexture(fbo.tex)
+ }
}
func (r *renderer) intersect(ops []imageOp) {
@@ -521,21 +653,28 @@ func (r *renderer) intersect(ops []imageOp) {
}
fbo := -1
r.pather.stenciler.beginIntersect(r.intersections.sizes)
- r.ctx.BindVertexBuffer(r.blitter.quadVerts, 4*4, 0)
- r.ctx.BindInputLayout(r.pather.stenciler.iprog.layout)
for _, img := range ops {
if img.clipType != clipTypeIntersection {
continue
}
if fbo != img.place.Idx {
+ if fbo != -1 {
+ r.ctx.EndRenderPass()
+ }
fbo = img.place.Idx
f := r.pather.stenciler.intersections.fbos[fbo]
- r.ctx.BindFramebuffer(f.fbo)
- r.ctx.Clear(1.0, 0.0, 0.0, 0.0)
+ d := driver.LoadDesc{Action: driver.LoadActionClear}
+ d.ClearColor.R = 1.0
+ r.ctx.BeginRenderPass(f.tex, d)
+ r.ctx.BindPipeline(r.pather.stenciler.ipipeline.pipeline.pipeline)
+ r.ctx.BindVertexBuffer(r.blitter.quadVerts, 0)
}
r.ctx.Viewport(img.place.Pos.X, img.place.Pos.Y, img.clip.Dx(), img.clip.Dy())
r.intersectPath(img.path, img.clip)
}
+ if fbo != -1 {
+ r.ctx.EndRenderPass()
+ }
}
func (r *renderer) intersectPath(p *pathOp, clip image.Rectangle) {
@@ -556,12 +695,12 @@ func (r *renderer) intersectPath(p *pathOp, clip image.Rectangle) {
}
fbo := r.pather.stenciler.cover(p.place.Idx)
r.ctx.BindTexture(0, fbo.tex)
- coverScale, coverOff := texSpaceTransform(toRectF(uv), fbo.size)
- subScale, subOff := texSpaceTransform(toRectF(sub), p.clip.Size())
- r.pather.stenciler.iprog.uniforms.vert.uvTransform = [4]float32{coverScale.X, coverScale.Y, coverOff.X, coverOff.Y}
- r.pather.stenciler.iprog.uniforms.vert.subUVTransform = [4]float32{subScale.X, subScale.Y, subOff.X, subOff.Y}
- r.pather.stenciler.iprog.prog.UploadUniforms()
- r.ctx.DrawArrays(backend.DrawModeTriangleStrip, 0, 4)
+ coverScale, coverOff := texSpaceTransform(layout.FRect(uv), fbo.size)
+ subScale, subOff := texSpaceTransform(layout.FRect(sub), p.clip.Size())
+ r.pather.stenciler.ipipeline.uniforms.vert.uvTransform = [4]float32{coverScale.X, coverScale.Y, coverOff.X, coverOff.Y}
+ r.pather.stenciler.ipipeline.uniforms.vert.subUVTransform = [4]float32{subScale.X, subScale.Y, subOff.X, subOff.Y}
+ r.pather.stenciler.ipipeline.pipeline.UploadUniforms(r.ctx)
+ r.ctx.DrawArrays(0, 4)
}
func (r *renderer) packIntersections(ops []imageOp) {
@@ -611,7 +750,7 @@ func (r *renderer) packStencils(pops *[]*pathOp) {
if !ok {
// The clip area is at most the entire screen. Hopefully no
// screen is larger than GL_MAX_TEXTURE_SIZE.
- panic(fmt.Errorf("clip area %v is larger than maximum texture size %dx%d", p.clip, r.packer.maxDim, r.packer.maxDim))
+ panic(fmt.Errorf("clip area %v is larger than maximum texture size %v", p.clip, r.packer.maxDims))
}
p.place = place
i++
@@ -619,8 +758,7 @@ func (r *renderer) packStencils(pops *[]*pathOp) {
*pops = ops
}
-// intersects intersects clip and b where b is offset by off.
-// ceilRect returns a bounding image.Rectangle for a f32.Rectangle.
+// boundRectF returns a bounding image.Rectangle for a f32.Rectangle.
func boundRectF(r f32.Rectangle) image.Rectangle {
return image.Rectangle{
Min: image.Point{
@@ -634,19 +772,6 @@ func boundRectF(r f32.Rectangle) image.Rectangle {
}
}
-func toRectF(r image.Rectangle) f32.Rectangle {
- return f32.Rectangle{
- Min: f32.Point{
- X: float32(r.Min.X),
- Y: float32(r.Min.Y),
- },
- Max: f32.Point{
- X: float32(r.Max.X),
- Y: float32(r.Max.Y),
- },
- }
-}
-
func ceil(v float32) int {
return int(math.Ceil(float64(v)))
}
@@ -655,30 +780,39 @@ func floor(v float32) int {
return int(math.Floor(float64(v)))
}
-func (d *drawOps) reset(cache *resourceCache, viewport image.Point) {
+func (d *drawOps) reset(viewport image.Point) {
d.profile = false
- d.clearColor = f32color.RGBA{R: 1.0, G: 1.0, B: 1.0, A: 1.0}
- d.cache = cache
d.viewport = viewport
d.imageOps = d.imageOps[:0]
- d.zimageOps = d.zimageOps[:0]
d.pathOps = d.pathOps[:0]
d.pathOpCache = d.pathOpCache[:0]
d.vertCache = d.vertCache[:0]
+ d.transStack = d.transStack[:0]
}
-func (d *drawOps) collect(cache *resourceCache, root *op.Ops, viewport image.Point) {
- d.reset(cache, viewport)
- clip := f32.Rectangle{
+func (d *drawOps) collect(root *op.Ops, viewport image.Point) {
+ viewf := f32.Rectangle{
Max: f32.Point{X: float32(viewport.X), Y: float32(viewport.Y)},
}
- d.reader.Reset(root)
- state := drawState{
- clip: clip,
- rect: true,
- color: color.RGBA{A: 0xff},
+ var ops *ops.Ops
+ if root != nil {
+ ops = &root.Internal
+ }
+ d.reader.Reset(ops)
+ d.collectOps(&d.reader, viewf)
+}
+
+func (d *drawOps) buildPaths(ctx driver.Device) {
+ for _, p := range d.pathOps {
+ if v, exists := d.pathCache.get(p.pathKey); !exists || v.data.data == nil {
+ data := buildPath(ctx, p.pathVerts)
+ d.pathCache.put(p.pathKey, opCacheValue{
+ data: data,
+ bounds: p.bounds,
+ })
+ }
+ p.pathVerts = nil
}
- d.collectOps(&d.reader, state)
}
func (d *drawOps) newPathOp() *pathOp {
@@ -686,24 +820,30 @@ func (d *drawOps) newPathOp() *pathOp {
return &d.pathOpCache[len(d.pathOpCache)-1]
}
-func (d *drawOps) addClipPath(state *drawState, aux []byte, auxKey ops.Key, bounds f32.Rectangle, off f32.Point) {
+func (d *drawOps) addClipPath(state *drawState, aux []byte, auxKey opKey, bounds f32.Rectangle, off f32.Point, push bool) {
npath := d.newPathOp()
*npath = pathOp{
- parent: state.cpath,
- bounds: bounds,
- off: off,
+ parent: state.cpath,
+ bounds: bounds,
+ off: off,
+ intersect: bounds.Add(off),
+ rect: true,
+ }
+ if npath.parent != nil {
+ npath.rect = npath.parent.rect
+ npath.intersect = npath.parent.intersect.Intersect(npath.intersect)
}
- state.cpath = npath
if len(aux) > 0 {
- state.rect = false
- state.cpath.pathKey = auxKey
- state.cpath.path = true
- state.cpath.pathVerts = aux
- d.pathOps = append(d.pathOps, state.cpath)
+ npath.rect = false
+ npath.pathKey = auxKey
+ npath.path = true
+ npath.pathVerts = aux
+ d.pathOps = append(d.pathOps, npath)
}
+ state.cpath = npath
}
-// split a transform into two parts, one which is pur offset and the
+// split a transform into two parts, one which is pure offset and the
// other representing the scaling, shearing and rotation part
func splitTransform(t f32.Affine2D) (srs f32.Affine2D, offset f32.Point) {
sx, hx, ox, hy, sy, oy := t.Elems()
@@ -712,121 +852,169 @@ func splitTransform(t f32.Affine2D) (srs f32.Affine2D, offset f32.Point) {
return
}
-func (d *drawOps) collectOps(r *ops.Reader, state drawState) int {
- var aux []byte
- var auxKey ops.Key
+func (d *drawOps) save(id int, state f32.Affine2D) {
+ if extra := id - len(d.states) + 1; extra > 0 {
+ d.states = append(d.states, make([]f32.Affine2D, extra)...)
+ }
+ d.states[id] = state
+}
+
+func (k opKey) SetTransform(t f32.Affine2D) opKey {
+ sx, hx, _, hy, sy, _ := t.Elems()
+ k.sx = sx
+ k.hx = hx
+ k.hy = hy
+ k.sy = sy
+ return k
+}
+
+func (d *drawOps) collectOps(r *ops.Reader, viewport f32.Rectangle) {
+ var (
+ quads quadsOp
+ state drawState
+ )
+ reset := func() {
+ state = drawState{
+ color: color.NRGBA{A: 0xff},
+ }
+ }
+ reset()
loop:
for encOp, ok := r.Decode(); ok; encOp, ok = r.Decode() {
- switch opconst.OpType(encOp.Data[0]) {
- case opconst.TypeProfile:
+ switch ops.OpType(encOp.Data[0]) {
+ case ops.TypeProfile:
d.profile = true
- case opconst.TypeTransform:
- dop := ops.DecodeTransform(encOp.Data)
+ case ops.TypeTransform:
+ dop, push := ops.DecodeTransform(encOp.Data)
+ if push {
+ d.transStack = append(d.transStack, state.t)
+ }
state.t = state.t.Mul(dop)
- case opconst.TypeAux:
- aux = encOp.Data[opconst.TypeAuxLen:]
- auxKey = encOp.Key
- case opconst.TypeClip:
- var op clipOp
- op.decode(encOp.Data)
- bounds := op.bounds
+ case ops.TypePopTransform:
+ n := len(d.transStack)
+ state.t = d.transStack[n-1]
+ d.transStack = d.transStack[:n-1]
+
+ case ops.TypeStroke:
+ quads.key.strokeWidth = decodeStrokeOp(encOp.Data)
+
+ case ops.TypePath:
+ encOp, ok = r.Decode()
+ if !ok {
+ break loop
+ }
+ quads.aux = encOp.Data[ops.TypeAuxLen:]
+ quads.key.Key = encOp.Key
+
+ case ops.TypeClip:
+ var op ops.ClipOp
+ op.Decode(encOp.Data)
+ quads.key.outline = op.Outline
+ bounds := layout.FRect(op.Bounds)
trans, off := splitTransform(state.t)
- if len(aux) > 0 {
+ if len(quads.aux) > 0 {
// There is a clipping path, build the gpu data and update the
// cache key such that it will be equal only if the transform is the
// same also. Use cached data if we have it.
- auxKey = auxKey.SetTransform(trans)
- if v, ok := d.pathCache.get(auxKey); ok {
+ quads.key = quads.key.SetTransform(trans)
+ if v, ok := d.pathCache.get(quads.key); ok {
// Since the GPU data exists in the cache aux will not be used.
// Why is this not used for the offset shapes?
- op.bounds = v.bounds
+ bounds = v.bounds
} else {
- aux, op.bounds = d.buildVerts(aux, trans)
+ var pathData []byte
+ pathData, bounds = d.buildVerts(
+ quads.aux, trans, quads.key.outline, quads.key.strokeWidth,
+ )
+ quads.aux = pathData
// add it to the cache, without GPU data, so the transform can be
// reused.
- d.pathCache.put(auxKey, opCacheValue{bounds: op.bounds})
+ d.pathCache.put(quads.key, opCacheValue{bounds: bounds})
}
} else {
- aux, op.bounds, _ = d.boundsForTransformedRect(bounds, trans)
- auxKey = encOp.Key
- auxKey.SetTransform(trans)
+ quads.aux, bounds, _ = d.boundsForTransformedRect(bounds, trans)
+ quads.key = opKey{Key: encOp.Key}
}
- state.clip = state.clip.Intersect(op.bounds.Add(off))
- d.addClipPath(&state, aux, auxKey, op.bounds, off)
- aux = nil
- auxKey = ops.Key{}
- case opconst.TypeColor:
+ d.addClipPath(&state, quads.aux, quads.key, bounds, off, true)
+ quads = quadsOp{}
+ case ops.TypePopClip:
+ state.cpath = state.cpath.parent
+
+ case ops.TypeColor:
state.matType = materialColor
state.color = decodeColorOp(encOp.Data)
- case opconst.TypeImage:
+ case ops.TypeLinearGradient:
+ state.matType = materialLinearGradient
+ op := decodeLinearGradientOp(encOp.Data)
+ state.stop1 = op.stop1
+ state.stop2 = op.stop2
+ state.color1 = op.color1
+ state.color2 = op.color2
+ case ops.TypeImage:
state.matType = materialTexture
state.image = decodeImageOp(encOp.Data, encOp.Refs)
- case opconst.TypePaint:
- op := decodePaintOp(encOp.Data)
+ case ops.TypePaint:
// Transform (if needed) the painting rectangle and if so generate a clip path,
// for those cases also compute a partialTrans that maps texture coordinates between
// the new bounding rectangle and the transformed original paint rectangle.
- trans, off := splitTransform(state.t)
- clipData, bnd, partialTrans := d.boundsForTransformedRect(op.Rect, trans)
- clip := state.clip.Intersect(bnd.Add(off))
- if clip.Empty() {
+ t, off := splitTransform(state.t)
+ // Fill the clip area, unless the material is a (bounded) image.
+ // TODO: Find a tighter bound.
+ inf := float32(1e6)
+ dst := f32.Rect(-inf, -inf, inf, inf)
+ if state.matType == materialTexture {
+ sz := state.image.src.Rect.Size()
+ dst = f32.Rectangle{Max: layout.FPt(sz)}
+ }
+ clipData, bnd, partialTrans := d.boundsForTransformedRect(dst, t)
+ cl := viewport.Intersect(bnd.Add(off))
+ if state.cpath != nil {
+ cl = state.cpath.intersect.Intersect(cl)
+ }
+ if cl.Empty() {
continue
}
- wasrect := state.rect
if clipData != nil {
// The paint operation is sheared or rotated, add a clip path representing
// this transformed rectangle.
- encOp.Key.SetTransform(trans)
- d.addClipPath(&state, clipData, encOp.Key, bnd, off)
+ k := opKey{Key: encOp.Key}
+ k.SetTransform(t) // TODO: This call has no effect.
+ d.addClipPath(&state, clipData, k, bnd, off, false)
}
- bounds := boundRectF(clip)
- mat := state.materialFor(d.cache, bnd, off, partialTrans, bounds)
+ bounds := boundRectF(cl)
+ mat := state.materialFor(bnd, off, partialTrans, bounds)
- if bounds.Min == (image.Point{}) && bounds.Max == d.viewport && state.rect && mat.opaque && mat.material == materialColor {
+ rect := state.cpath == nil || state.cpath.rect
+ if bounds.Min == (image.Point{}) && bounds.Max == d.viewport && rect && mat.opaque && (mat.material == materialColor) {
// The image is a uniform opaque color and takes up the whole screen.
// Scrap images up to and including this image and set clear color.
- d.zimageOps = d.zimageOps[:0]
d.imageOps = d.imageOps[:0]
- state.z = 0
d.clearColor = mat.color.Opaque()
+ d.clear = true
continue
}
- state.z++
- if state.z != int(uint16(state.z)) {
- // TODO(eliasnaur) gioui.org/issue/127.
- panic("more than 65k paint objects not supported")
- }
- // Assume 16-bit depth buffer.
- const zdepth = 1 << 16
- // Convert z to window-space, assuming depth range [0;1].
- zf := float32(state.z)*2/zdepth - 1.0
img := imageOp{
- z: zf,
path: state.cpath,
- off: off,
clip: bounds,
material: mat,
}
- if state.rect && img.material.opaque {
- d.zimageOps = append(d.zimageOps, img)
- } else {
- d.imageOps = append(d.imageOps, img)
- }
+ d.imageOps = append(d.imageOps, img)
if clipData != nil {
// we added a clip path that should not remain
state.cpath = state.cpath.parent
- state.rect = wasrect
}
- case opconst.TypePush:
- state.z = d.collectOps(r, state)
- case opconst.TypePop:
- break loop
+ case ops.TypeSave:
+ id := ops.DecodeSave(encOp.Data)
+ d.save(id, state.t)
+ case ops.TypeLoad:
+ reset()
+ id := ops.DecodeLoad(encOp.Data)
+ state.t = d.states[id]
}
}
- return state.z
}
func expandPathOp(p *pathOp, clip image.Rectangle) {
@@ -840,78 +1028,83 @@ func expandPathOp(p *pathOp, clip image.Rectangle) {
}
}
-func (d *drawState) materialFor(cache *resourceCache, rect f32.Rectangle, off f32.Point, trans f32.Affine2D, clip image.Rectangle) material {
+func (d *drawState) materialFor(rect f32.Rectangle, off f32.Point, partTrans f32.Affine2D, clip image.Rectangle) material {
var m material
switch d.matType {
case materialColor:
m.material = materialColor
- m.color = f32color.RGBAFromSRGB(d.color)
+ m.color = f32color.LinearFromSRGB(d.color)
m.opaque = m.color.A == 1.0
+ case materialLinearGradient:
+ m.material = materialLinearGradient
+
+ m.color1 = f32color.LinearFromSRGB(d.color1)
+ m.color2 = f32color.LinearFromSRGB(d.color2)
+ m.opaque = m.color1.A == 1.0 && m.color2.A == 1.0
+
+ m.uvTrans = partTrans.Mul(gradientSpaceTransform(clip, off, d.stop1, d.stop2))
case materialTexture:
m.material = materialTexture
dr := boundRectF(rect.Add(off))
sz := d.image.src.Bounds().Size()
- sr := layout.FRect(d.image.rect)
- if dx := float32(dr.Dx()); dx != 0 {
- // Don't clip 1 px width sources.
- if sdx := sr.Dx(); sdx > 1 {
- sr.Min.X += (float32(clip.Min.X-dr.Min.X)*sdx + dx/2) / dx
- sr.Max.X -= (float32(dr.Max.X-clip.Max.X)*sdx + dx/2) / dx
- }
- }
- if dy := float32(dr.Dy()); dy != 0 {
- // Don't clip 1 px height sources.
- if sdy := sr.Dy(); sdy > 1 {
- sr.Min.Y += (float32(clip.Min.Y-dr.Min.Y)*sdy + dy/2) / dy
- sr.Max.Y -= (float32(dr.Max.Y-clip.Max.Y)*sdy + dy/2) / dy
- }
- }
- tex, exists := cache.get(d.image.handle)
- if !exists {
- t := &texture{
- src: d.image.src,
- }
- cache.put(d.image.handle, t)
- tex = t
+ sr := f32.Rectangle{
+ Max: f32.Point{
+ X: float32(sz.X),
+ Y: float32(sz.Y),
+ },
}
- m.texture = tex.(*texture)
+ dx := float32(dr.Dx())
+ sdx := sr.Dx()
+ sr.Min.X += float32(clip.Min.X-dr.Min.X) * sdx / dx
+ sr.Max.X -= float32(dr.Max.X-clip.Max.X) * sdx / dx
+ dy := float32(dr.Dy())
+ sdy := sr.Dy()
+ sr.Min.Y += float32(clip.Min.Y-dr.Min.Y) * sdy / dy
+ sr.Max.Y -= float32(dr.Max.Y-clip.Max.Y) * sdy / dy
uvScale, uvOffset := texSpaceTransform(sr, sz)
- m.uvTrans = trans.Mul(f32.Affine2D{}.Scale(f32.Point{}, uvScale).Offset(uvOffset))
+ m.uvTrans = partTrans.Mul(f32.Affine2D{}.Scale(f32.Point{}, uvScale).Offset(uvOffset))
+ m.data = d.image
}
return m
}
-func (r *renderer) drawZOps(ops []imageOp) {
- r.ctx.SetDepthTest(true)
- r.ctx.BindVertexBuffer(r.blitter.quadVerts, 4*4, 0)
- r.ctx.BindInputLayout(r.blitter.layout)
- // Render front to back.
- for i := len(ops) - 1; i >= 0; i-- {
- img := ops[i]
+func (r *renderer) uploadImages(cache *resourceCache, ops []imageOp) {
+ for _, img := range ops {
+ m := img.material
+ if m.material == materialTexture {
+ r.texHandle(cache, m.data)
+ }
+ }
+}
+
+func (r *renderer) prepareDrawOps(cache *resourceCache, ops []imageOp) {
+ for _, img := range ops {
m := img.material
switch m.material {
case materialTexture:
- r.ctx.BindTexture(0, r.texHandle(m.texture))
+ r.ctx.PrepareTexture(r.texHandle(cache, m.data))
}
- drc := img.clip
- scale, off := clipSpaceTransform(drc, r.blitter.viewport)
- r.blitter.blit(img.z, m.material, m.color, scale, off, m.uvTrans)
+
+ var fbo stencilFBO
+ switch img.clipType {
+ case clipTypeNone:
+ continue
+ case clipTypePath:
+ fbo = r.pather.stenciler.cover(img.place.Idx)
+ case clipTypeIntersection:
+ fbo = r.pather.stenciler.intersections.fbos[img.place.Idx]
+ }
+ r.ctx.PrepareTexture(fbo.tex)
}
- r.ctx.SetDepthTest(false)
}
-func (r *renderer) drawOps(ops []imageOp) {
- r.ctx.SetDepthTest(true)
- r.ctx.DepthMask(false)
- r.ctx.BlendFunc(backend.BlendFactorOne, backend.BlendFactorOneMinusSrcAlpha)
- r.ctx.BindVertexBuffer(r.blitter.quadVerts, 4*4, 0)
- r.ctx.BindInputLayout(r.pather.coverer.layout)
- var coverTex backend.Texture
+func (r *renderer) drawOps(cache *resourceCache, ops []imageOp) {
+ var coverTex driver.Texture
for _, img := range ops {
m := img.material
switch m.material {
case materialTexture:
- r.ctx.BindTexture(0, r.texHandle(m.texture))
+ r.ctx.BindTexture(0, r.texHandle(cache, m.data))
}
drc := img.clip
@@ -919,7 +1112,10 @@ func (r *renderer) drawOps(ops []imageOp) {
var fbo stencilFBO
switch img.clipType {
case clipTypeNone:
- r.blitter.blit(img.z, m.material, m.color, scale, off, m.uvTrans)
+ p := r.blitter.pipelines[m.material]
+ r.ctx.BindPipeline(p.pipeline)
+ r.ctx.BindVertexBuffer(r.blitter.quadVerts, 0)
+ r.blitter.blit(m.material, m.color, m.color1, m.color2, scale, off, m.uvTrans)
continue
case clipTypePath:
fbo = r.pather.stenciler.cover(img.place.Idx)
@@ -934,42 +1130,50 @@ func (r *renderer) drawOps(ops []imageOp) {
Min: img.place.Pos,
Max: img.place.Pos.Add(drc.Size()),
}
- coverScale, coverOff := texSpaceTransform(toRectF(uv), fbo.size)
- r.pather.cover(img.z, m.material, m.color, scale, off, m.uvTrans, coverScale, coverOff)
+ coverScale, coverOff := texSpaceTransform(layout.FRect(uv), fbo.size)
+ p := r.pather.coverer.pipelines[m.material]
+ r.ctx.BindPipeline(p.pipeline)
+ r.ctx.BindVertexBuffer(r.blitter.quadVerts, 0)
+ r.pather.cover(m.material, m.color, m.color1, m.color2, scale, off, m.uvTrans, coverScale, coverOff)
}
- r.ctx.DepthMask(true)
- r.ctx.SetDepthTest(false)
}
-func (b *blitter) blit(z float32, mat materialType, col f32color.RGBA, scale, off f32.Point, uvTrans f32.Affine2D) {
- p := b.prog[mat]
- b.ctx.BindProgram(p.prog)
+func (b *blitter) blit(mat materialType, col f32color.RGBA, col1, col2 f32color.RGBA, scale, off f32.Point, uvTrans f32.Affine2D) {
+ p := b.pipelines[mat]
+ b.ctx.BindPipeline(p.pipeline)
var uniforms *blitUniforms
switch mat {
case materialColor:
- b.colUniforms.frag.color = col
- uniforms = &b.colUniforms.vert.blitUniforms
+ b.colUniforms.color = col
+ uniforms = &b.colUniforms.blitUniforms
case materialTexture:
t1, t2, t3, t4, t5, t6 := uvTrans.Elems()
- b.texUniforms.vert.blitUniforms.uvTransformR1 = [4]float32{t1, t2, t3, 0}
- b.texUniforms.vert.blitUniforms.uvTransformR2 = [4]float32{t4, t5, t6, 0}
- uniforms = &b.texUniforms.vert.blitUniforms
+ b.texUniforms.blitUniforms.uvTransformR1 = [4]float32{t1, t2, t3, 0}
+ b.texUniforms.blitUniforms.uvTransformR2 = [4]float32{t4, t5, t6, 0}
+ uniforms = &b.texUniforms.blitUniforms
+ case materialLinearGradient:
+ b.linearGradientUniforms.color1 = col1
+ b.linearGradientUniforms.color2 = col2
+
+ t1, t2, t3, t4, t5, t6 := uvTrans.Elems()
+ b.linearGradientUniforms.blitUniforms.uvTransformR1 = [4]float32{t1, t2, t3, 0}
+ b.linearGradientUniforms.blitUniforms.uvTransformR2 = [4]float32{t4, t5, t6, 0}
+ uniforms = &b.linearGradientUniforms.blitUniforms
}
- uniforms.z = z
uniforms.transform = [4]float32{scale.X, scale.Y, off.X, off.Y}
- p.UploadUniforms()
- b.ctx.DrawArrays(backend.DrawModeTriangleStrip, 0, 4)
+ p.UploadUniforms(b.ctx)
+ b.ctx.DrawArrays(0, 4)
}
// newUniformBuffer creates a new GPU uniform buffer backed by the
// structure uniformBlock points to.
-func newUniformBuffer(b backend.Device, uniformBlock interface{}) *uniformBuffer {
+func newUniformBuffer(b driver.Device, uniformBlock interface{}) *uniformBuffer {
ref := reflect.ValueOf(uniformBlock)
// Determine the size of the uniforms structure, *uniforms.
size := ref.Elem().Type().Size()
// Map the uniforms structure as a byte slice.
ptr := (*[1 << 30]byte)(unsafe.Pointer(ref.Pointer()))[:size:size]
- ubuf, err := b.NewBuffer(backend.BufferBindingUniforms, len(ptr))
+ ubuf, err := b.NewBuffer(driver.BufferBindingUniforms, len(ptr))
if err != nil {
panic(err)
}
@@ -985,36 +1189,19 @@ func (u *uniformBuffer) Release() {
u.buf = nil
}
-func newProgram(prog backend.Program, vertUniforms, fragUniforms *uniformBuffer) *program {
- if vertUniforms != nil {
- prog.SetVertexUniforms(vertUniforms.buf)
- }
- if fragUniforms != nil {
- prog.SetFragmentUniforms(fragUniforms.buf)
- }
- return &program{prog: prog, vertUniforms: vertUniforms, fragUniforms: fragUniforms}
-}
-
-func (p *program) UploadUniforms() {
- if p.vertUniforms != nil {
- p.vertUniforms.Upload()
- }
- if p.fragUniforms != nil {
- p.fragUniforms.Upload()
+func (p *pipeline) UploadUniforms(ctx driver.Device) {
+ if p.uniforms != nil {
+ p.uniforms.Upload()
+ ctx.BindUniforms(p.uniforms.buf)
}
}
-func (p *program) Release() {
- p.prog.Release()
- p.prog = nil
- if p.vertUniforms != nil {
- p.vertUniforms.Release()
- p.vertUniforms = nil
- }
- if p.fragUniforms != nil {
- p.fragUniforms.Release()
- p.fragUniforms = nil
+func (p *pipeline) Release() {
+ p.pipeline.Release()
+ if p.uniforms != nil {
+ p.uniforms.Release()
}
+ *p = pipeline{}
}
// texSpaceTransform return the scale and offset that transforms the given subimage
@@ -1026,26 +1213,42 @@ func texSpaceTransform(r f32.Rectangle, bounds image.Point) (f32.Point, f32.Poin
return scale, offset
}
+// gradientSpaceTransform transforms stop1 and stop2 to [(0,0), (1,1)].
+func gradientSpaceTransform(clip image.Rectangle, off f32.Point, stop1, stop2 f32.Point) f32.Affine2D {
+ d := stop2.Sub(stop1)
+ l := float32(math.Sqrt(float64(d.X*d.X + d.Y*d.Y)))
+ a := float32(math.Atan2(float64(-d.Y), float64(d.X)))
+
+ // TODO: optimize
+ zp := f32.Point{}
+ return f32.Affine2D{}.
+ Scale(zp, layout.FPt(clip.Size())). // scale to pixel space
+ Offset(zp.Sub(off).Add(layout.FPt(clip.Min))). // offset to clip space
+ Offset(zp.Sub(stop1)). // offset to first stop point
+ Rotate(zp, a). // rotate to align gradient
+ Scale(zp, f32.Pt(1/l, 1/l)) // scale gradient to right size
+}
+
// clipSpaceTransform returns the scale and offset that transforms the given
-// rectangle from a viewport into OpenGL clip space.
+// rectangle from a viewport into GPU driver device coordinates.
func clipSpaceTransform(r image.Rectangle, viewport image.Point) (f32.Point, f32.Point) {
- // First, transform UI coordinates to OpenGL coordinates:
+ // First, transform UI coordinates to device coordinates:
//
- // [(-1, +1) (+1, +1)]
// [(-1, -1) (+1, -1)]
+ // [(-1, +1) (+1, +1)]
//
x, y := float32(r.Min.X), float32(r.Min.Y)
w, h := float32(r.Dx()), float32(r.Dy())
vx, vy := 2/float32(viewport.X), 2/float32(viewport.Y)
x = x*vx - 1
- y = 1 - y*vy
+ y = y*vy - 1
w *= vx
h *= vy
// Then, compute the transformation from the fullscreen quad to
// the rectangle at (x, y) and dimensions (w, h).
scale := f32.Point{X: w * .5, Y: h * .5}
- offset := f32.Point{X: x + w*.5, Y: y - h*.5}
+ offset := f32.Point{X: x + w*.5, Y: y + h*.5}
return scale, offset
}
@@ -1097,29 +1300,73 @@ func (d *drawOps) writeVertCache(n int) []byte {
}
// transform, split paths as needed, calculate maxY, bounds and create GPU vertices.
-func (d *drawOps) buildVerts(aux []byte, tr f32.Affine2D) (verts []byte, bounds f32.Rectangle) {
+func (d *drawOps) buildVerts(pathData []byte, tr f32.Affine2D, outline bool, strWidth float32) (verts []byte, bounds f32.Rectangle) {
inf := float32(math.Inf(+1))
d.qs.bounds = f32.Rectangle{
Min: f32.Point{X: inf, Y: inf},
Max: f32.Point{X: -inf, Y: -inf},
}
d.qs.d = d
- bo := binary.LittleEndian
startLength := len(d.vertCache)
- for qi := 0; len(aux) >= (ops.QuadSize + 4); qi++ {
- d.qs.contour = bo.Uint32(aux)
- quad := ops.DecodeQuad(aux[4:])
- quad = quad.Transform(tr)
- d.qs.splitAndEncode(quad)
+ switch {
+ case strWidth > 0:
+ // Stroke path.
+ ss := stroke.StrokeStyle{
+ Width: strWidth,
+ }
+ quads := stroke.StrokePathCommands(ss, pathData)
+ for _, quad := range quads {
+ d.qs.contour = quad.Contour
+ quad.Quad = quad.Quad.Transform(tr)
+
+ d.qs.splitAndEncode(quad.Quad)
+ }
- aux = aux[ops.QuadSize+4:]
+ case outline:
+ decodeToOutlineQuads(&d.qs, tr, pathData)
}
fillMaxY(d.vertCache[startLength:])
return d.vertCache[startLength:], d.qs.bounds
}
+// decodeOutlineQuads decodes scene commands, splits them into quadratic béziers
+// as needed and feeds them to the supplied splitter.
+func decodeToOutlineQuads(qs *quadSplitter, tr f32.Affine2D, pathData []byte) {
+ for len(pathData) >= scene.CommandSize+4 {
+ qs.contour = bo.Uint32(pathData)
+ cmd := ops.DecodeCommand(pathData[4:])
+ switch cmd.Op() {
+ case scene.OpLine:
+ var q stroke.QuadSegment
+ q.From, q.To = scene.DecodeLine(cmd)
+ q.Ctrl = q.From.Add(q.To).Mul(.5)
+ q = q.Transform(tr)
+ qs.splitAndEncode(q)
+ case scene.OpGap:
+ var q stroke.QuadSegment
+ q.From, q.To = scene.DecodeGap(cmd)
+ q.Ctrl = q.From.Add(q.To).Mul(.5)
+ q = q.Transform(tr)
+ qs.splitAndEncode(q)
+ case scene.OpQuad:
+ var q stroke.QuadSegment
+ q.From, q.Ctrl, q.To = scene.DecodeQuad(cmd)
+ q = q.Transform(tr)
+ qs.splitAndEncode(q)
+ case scene.OpCubic:
+ for _, q := range stroke.SplitCubic(scene.DecodeCubic(cmd)) {
+ q = q.Transform(tr)
+ qs.splitAndEncode(q)
+ }
+ default:
+ panic("unsupported scene command")
+ }
+ pathData = pathData[scene.CommandSize+4:]
+ }
+}
+
// create GPU vertices for transformed r, find the bounds and establish texture transform.
func (d *drawOps) boundsForTransformedRect(r f32.Rectangle, tr f32.Affine2D) (aux []byte, bnd f32.Rectangle, ptr f32.Affine2D) {
if isPureOffset(tr) {
diff --git a/vendor/gioui.org/gpu/internal/d3d11/d3d11.go b/vendor/gioui.org/gpu/internal/d3d11/d3d11.go
new file mode 100644
index 0000000..3ddf7c3
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/d3d11/d3d11.go
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// This file exists so this package builds on non-Windows platforms.
+
+package d3d11
diff --git a/vendor/gioui.org/gpu/internal/d3d11/d3d11_windows.go b/vendor/gioui.org/gpu/internal/d3d11/d3d11_windows.go
new file mode 100644
index 0000000..08698c3
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/d3d11/d3d11_windows.go
@@ -0,0 +1,859 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package d3d11
+
+import (
+ "errors"
+ "fmt"
+ "image"
+ "math"
+ "reflect"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/internal/d3d11"
+ "gioui.org/shader"
+)
+
+type Backend struct {
+ dev *d3d11.Device
+ ctx *d3d11.DeviceContext
+
+ // Temporary storage to avoid garbage.
+ clearColor [4]float32
+ viewport d3d11.VIEWPORT
+
+ pipeline *Pipeline
+ vert struct {
+ buffer *Buffer
+ offset int
+ }
+
+ program *Program
+
+ caps driver.Caps
+
+ floatFormat uint32
+}
+
+type Pipeline struct {
+ vert *d3d11.VertexShader
+ frag *d3d11.PixelShader
+ layout *d3d11.InputLayout
+ blend *d3d11.BlendState
+ stride int
+ topology driver.Topology
+}
+
+type Texture struct {
+ backend *Backend
+ format uint32
+ bindings driver.BufferBinding
+ tex *d3d11.Texture2D
+ sampler *d3d11.SamplerState
+ resView *d3d11.ShaderResourceView
+ uaView *d3d11.UnorderedAccessView
+ renderTarget *d3d11.RenderTargetView
+
+ width int
+ height int
+ foreign bool
+}
+
+type VertexShader struct {
+ backend *Backend
+ shader *d3d11.VertexShader
+ src shader.Sources
+}
+
+type FragmentShader struct {
+ backend *Backend
+ shader *d3d11.PixelShader
+}
+
+type Program struct {
+ backend *Backend
+ shader *d3d11.ComputeShader
+}
+
+type Buffer struct {
+ backend *Backend
+ bind uint32
+ buf *d3d11.Buffer
+ resView *d3d11.ShaderResourceView
+ uaView *d3d11.UnorderedAccessView
+ size int
+ immutable bool
+}
+
+func init() {
+ driver.NewDirect3D11Device = newDirect3D11Device
+}
+
+func detectFloatFormat(dev *d3d11.Device) (uint32, bool) {
+ formats := []uint32{
+ d3d11.DXGI_FORMAT_R16_FLOAT,
+ d3d11.DXGI_FORMAT_R32_FLOAT,
+ d3d11.DXGI_FORMAT_R16G16_FLOAT,
+ d3d11.DXGI_FORMAT_R32G32_FLOAT,
+ // These last two are really wasteful, but c'est la vie.
+ d3d11.DXGI_FORMAT_R16G16B16A16_FLOAT,
+ d3d11.DXGI_FORMAT_R32G32B32A32_FLOAT,
+ }
+ for _, format := range formats {
+ need := uint32(d3d11.FORMAT_SUPPORT_TEXTURE2D | d3d11.FORMAT_SUPPORT_RENDER_TARGET)
+ if support, _ := dev.CheckFormatSupport(format); support&need == need {
+ return format, true
+ }
+ }
+ return 0, false
+}
+
+func newDirect3D11Device(api driver.Direct3D11) (driver.Device, error) {
+ dev := (*d3d11.Device)(api.Device)
+ b := &Backend{
+ dev: dev,
+ ctx: dev.GetImmediateContext(),
+ caps: driver.Caps{
+ MaxTextureSize: 2048, // 9.1 maximum
+ Features: driver.FeatureSRGB,
+ },
+ }
+ featLvl := dev.GetFeatureLevel()
+ switch {
+ case featLvl < d3d11.FEATURE_LEVEL_9_1:
+ d3d11.IUnknownRelease(unsafe.Pointer(dev), dev.Vtbl.Release)
+ d3d11.IUnknownRelease(unsafe.Pointer(b.ctx), b.ctx.Vtbl.Release)
+ return nil, fmt.Errorf("d3d11: feature level too low: %d", featLvl)
+ case featLvl >= d3d11.FEATURE_LEVEL_11_0:
+ b.caps.MaxTextureSize = 16384
+ b.caps.Features |= driver.FeatureCompute
+ case featLvl >= d3d11.FEATURE_LEVEL_9_3:
+ b.caps.MaxTextureSize = 4096
+ }
+ if fmt, ok := detectFloatFormat(dev); ok {
+ b.floatFormat = fmt
+ b.caps.Features |= driver.FeatureFloatRenderTargets
+ }
+ // Disable backface culling to match OpenGL.
+ state, err := dev.CreateRasterizerState(&d3d11.RASTERIZER_DESC{
+ CullMode: d3d11.CULL_NONE,
+ FillMode: d3d11.FILL_SOLID,
+ })
+ if err != nil {
+ return nil, err
+ }
+ defer d3d11.IUnknownRelease(unsafe.Pointer(state), state.Vtbl.Release)
+ b.ctx.RSSetState(state)
+ return b, nil
+}
+
+func (b *Backend) BeginFrame(target driver.RenderTarget, clear bool, viewport image.Point) driver.Texture {
+ var (
+ renderTarget *d3d11.RenderTargetView
+ )
+ if target != nil {
+ switch t := target.(type) {
+ case driver.Direct3D11RenderTarget:
+ renderTarget = (*d3d11.RenderTargetView)(t.RenderTarget)
+ case *Texture:
+ renderTarget = t.renderTarget
+ default:
+ panic(fmt.Errorf("d3d11: invalid render target type: %T", target))
+ }
+ }
+ b.ctx.OMSetRenderTargets(renderTarget, nil)
+ return &Texture{backend: b, renderTarget: renderTarget, foreign: true}
+}
+
+func (b *Backend) CopyTexture(dstTex driver.Texture, dstOrigin image.Point, srcTex driver.Texture, srcRect image.Rectangle) {
+ dst := (*d3d11.Resource)(unsafe.Pointer(dstTex.(*Texture).tex))
+ src := (*d3d11.Resource)(srcTex.(*Texture).tex)
+ b.ctx.CopySubresourceRegion(
+ dst,
+ 0, // Destination subresource.
+ uint32(dstOrigin.X), uint32(dstOrigin.Y), 0, // Destination coordinates (x, y, z).
+ src,
+ 0, // Source subresource.
+ &d3d11.BOX{
+ Left: uint32(srcRect.Min.X),
+ Top: uint32(srcRect.Min.Y),
+ Right: uint32(srcRect.Max.X),
+ Bottom: uint32(srcRect.Max.Y),
+ Front: 0,
+ Back: 1,
+ },
+ )
+}
+
+func (b *Backend) EndFrame() {
+}
+
+func (b *Backend) Caps() driver.Caps {
+ return b.caps
+}
+
+func (b *Backend) NewTimer() driver.Timer {
+ panic("timers not supported")
+}
+
+func (b *Backend) IsTimeContinuous() bool {
+ panic("timers not supported")
+}
+
+func (b *Backend) Release() {
+ d3d11.IUnknownRelease(unsafe.Pointer(b.ctx), b.ctx.Vtbl.Release)
+ *b = Backend{}
+}
+
+func (b *Backend) NewTexture(format driver.TextureFormat, width, height int, minFilter, magFilter driver.TextureFilter, bindings driver.BufferBinding) (driver.Texture, error) {
+ var d3dfmt uint32
+ switch format {
+ case driver.TextureFormatFloat:
+ d3dfmt = b.floatFormat
+ case driver.TextureFormatSRGBA:
+ d3dfmt = d3d11.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
+ case driver.TextureFormatRGBA8:
+ d3dfmt = d3d11.DXGI_FORMAT_R8G8B8A8_UNORM
+ default:
+ return nil, fmt.Errorf("unsupported texture format %d", format)
+ }
+ tex, err := b.dev.CreateTexture2D(&d3d11.TEXTURE2D_DESC{
+ Width: uint32(width),
+ Height: uint32(height),
+ MipLevels: 1,
+ ArraySize: 1,
+ Format: d3dfmt,
+ SampleDesc: d3d11.DXGI_SAMPLE_DESC{
+ Count: 1,
+ Quality: 0,
+ },
+ BindFlags: convBufferBinding(bindings),
+ })
+ if err != nil {
+ return nil, err
+ }
+ var (
+ sampler *d3d11.SamplerState
+ resView *d3d11.ShaderResourceView
+ uaView *d3d11.UnorderedAccessView
+ fbo *d3d11.RenderTargetView
+ )
+ if bindings&driver.BufferBindingTexture != 0 {
+ var filter uint32
+ switch {
+ case minFilter == driver.FilterNearest && magFilter == driver.FilterNearest:
+ filter = d3d11.FILTER_MIN_MAG_MIP_POINT
+ case minFilter == driver.FilterLinear && magFilter == driver.FilterLinear:
+ filter = d3d11.FILTER_MIN_MAG_LINEAR_MIP_POINT
+ default:
+ d3d11.IUnknownRelease(unsafe.Pointer(tex), tex.Vtbl.Release)
+ return nil, fmt.Errorf("unsupported texture filter combination %d, %d", minFilter, magFilter)
+ }
+ var err error
+ sampler, err = b.dev.CreateSamplerState(&d3d11.SAMPLER_DESC{
+ Filter: filter,
+ AddressU: d3d11.TEXTURE_ADDRESS_CLAMP,
+ AddressV: d3d11.TEXTURE_ADDRESS_CLAMP,
+ AddressW: d3d11.TEXTURE_ADDRESS_CLAMP,
+ MaxAnisotropy: 1,
+ MinLOD: -math.MaxFloat32,
+ MaxLOD: math.MaxFloat32,
+ })
+ if err != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(tex), tex.Vtbl.Release)
+ return nil, err
+ }
+ resView, err = b.dev.CreateShaderResourceView(
+ (*d3d11.Resource)(unsafe.Pointer(tex)),
+ unsafe.Pointer(&d3d11.SHADER_RESOURCE_VIEW_DESC_TEX2D{
+ SHADER_RESOURCE_VIEW_DESC: d3d11.SHADER_RESOURCE_VIEW_DESC{
+ Format: d3dfmt,
+ ViewDimension: d3d11.SRV_DIMENSION_TEXTURE2D,
+ },
+ Texture2D: d3d11.TEX2D_SRV{
+ MostDetailedMip: 0,
+ MipLevels: ^uint32(0),
+ },
+ }),
+ )
+ if err != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(tex), tex.Vtbl.Release)
+ d3d11.IUnknownRelease(unsafe.Pointer(sampler), sampler.Vtbl.Release)
+ return nil, err
+ }
+ }
+ if bindings&driver.BufferBindingShaderStorageWrite != 0 {
+ uaView, err = b.dev.CreateUnorderedAccessView(
+ (*d3d11.Resource)(unsafe.Pointer(tex)),
+ unsafe.Pointer(&d3d11.UNORDERED_ACCESS_VIEW_DESC_TEX2D{
+ UNORDERED_ACCESS_VIEW_DESC: d3d11.UNORDERED_ACCESS_VIEW_DESC{
+ Format: d3dfmt,
+ ViewDimension: d3d11.UAV_DIMENSION_TEXTURE2D,
+ },
+ Texture2D: d3d11.TEX2D_UAV{
+ MipSlice: 0,
+ },
+ }),
+ )
+ if err != nil {
+ if sampler != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(sampler), sampler.Vtbl.Release)
+ }
+ if resView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(resView), resView.Vtbl.Release)
+ }
+ d3d11.IUnknownRelease(unsafe.Pointer(tex), tex.Vtbl.Release)
+ return nil, err
+ }
+ }
+ if bindings&driver.BufferBindingFramebuffer != 0 {
+ resource := (*d3d11.Resource)(unsafe.Pointer(tex))
+ fbo, err = b.dev.CreateRenderTargetView(resource)
+ if err != nil {
+ if uaView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(uaView), uaView.Vtbl.Release)
+ }
+ if sampler != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(sampler), sampler.Vtbl.Release)
+ }
+ if resView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(resView), resView.Vtbl.Release)
+ }
+ d3d11.IUnknownRelease(unsafe.Pointer(tex), tex.Vtbl.Release)
+ return nil, err
+ }
+ }
+ return &Texture{backend: b, format: d3dfmt, tex: tex, sampler: sampler, resView: resView, uaView: uaView, renderTarget: fbo, bindings: bindings, width: width, height: height}, nil
+}
+
+func (b *Backend) newInputLayout(vertexShader shader.Sources, layout []driver.InputDesc) (*d3d11.InputLayout, error) {
+ if len(vertexShader.Inputs) != len(layout) {
+ return nil, fmt.Errorf("NewInputLayout: got %d inputs, expected %d", len(layout), len(vertexShader.Inputs))
+ }
+ descs := make([]d3d11.INPUT_ELEMENT_DESC, len(layout))
+ for i, l := range layout {
+ inp := vertexShader.Inputs[i]
+ cname, err := windows.BytePtrFromString(inp.Semantic)
+ if err != nil {
+ return nil, err
+ }
+ var format uint32
+ switch l.Type {
+ case shader.DataTypeFloat:
+ switch l.Size {
+ case 1:
+ format = d3d11.DXGI_FORMAT_R32_FLOAT
+ case 2:
+ format = d3d11.DXGI_FORMAT_R32G32_FLOAT
+ case 3:
+ format = d3d11.DXGI_FORMAT_R32G32B32_FLOAT
+ case 4:
+ format = d3d11.DXGI_FORMAT_R32G32B32A32_FLOAT
+ default:
+ panic("unsupported data size")
+ }
+ case shader.DataTypeShort:
+ switch l.Size {
+ case 1:
+ format = d3d11.DXGI_FORMAT_R16_SINT
+ case 2:
+ format = d3d11.DXGI_FORMAT_R16G16_SINT
+ default:
+ panic("unsupported data size")
+ }
+ default:
+ panic("unsupported data type")
+ }
+ descs[i] = d3d11.INPUT_ELEMENT_DESC{
+ SemanticName: cname,
+ SemanticIndex: uint32(inp.SemanticIndex),
+ Format: format,
+ AlignedByteOffset: uint32(l.Offset),
+ }
+ }
+ return b.dev.CreateInputLayout(descs, []byte(vertexShader.DXBC))
+}
+
+func (b *Backend) NewBuffer(typ driver.BufferBinding, size int) (driver.Buffer, error) {
+ return b.newBuffer(typ, size, nil, false)
+}
+
+func (b *Backend) NewImmutableBuffer(typ driver.BufferBinding, data []byte) (driver.Buffer, error) {
+ return b.newBuffer(typ, len(data), data, true)
+}
+
+func (b *Backend) newBuffer(typ driver.BufferBinding, size int, data []byte, immutable bool) (*Buffer, error) {
+ if typ&driver.BufferBindingUniforms != 0 {
+ if typ != driver.BufferBindingUniforms {
+ return nil, errors.New("uniform buffers cannot have other bindings")
+ }
+ if size%16 != 0 {
+ return nil, fmt.Errorf("constant buffer size is %d, expected a multiple of 16", size)
+ }
+ }
+ bind := convBufferBinding(typ)
+ var usage, miscFlags, cpuFlags uint32
+ if immutable {
+ usage = d3d11.USAGE_IMMUTABLE
+ }
+ if typ&driver.BufferBindingShaderStorageWrite != 0 {
+ cpuFlags = d3d11.CPU_ACCESS_READ
+ }
+ if typ&(driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite) != 0 {
+ miscFlags |= d3d11.RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS
+ }
+ buf, err := b.dev.CreateBuffer(&d3d11.BUFFER_DESC{
+ ByteWidth: uint32(size),
+ Usage: usage,
+ BindFlags: bind,
+ CPUAccessFlags: cpuFlags,
+ MiscFlags: miscFlags,
+ }, data)
+ if err != nil {
+ return nil, err
+ }
+ var (
+ resView *d3d11.ShaderResourceView
+ uaView *d3d11.UnorderedAccessView
+ )
+ if typ&driver.BufferBindingShaderStorageWrite != 0 {
+ uaView, err = b.dev.CreateUnorderedAccessView(
+ (*d3d11.Resource)(unsafe.Pointer(buf)),
+ unsafe.Pointer(&d3d11.UNORDERED_ACCESS_VIEW_DESC_BUFFER{
+ UNORDERED_ACCESS_VIEW_DESC: d3d11.UNORDERED_ACCESS_VIEW_DESC{
+ Format: d3d11.DXGI_FORMAT_R32_TYPELESS,
+ ViewDimension: d3d11.UAV_DIMENSION_BUFFER,
+ },
+ Buffer: d3d11.BUFFER_UAV{
+ FirstElement: 0,
+ NumElements: uint32(size / 4),
+ Flags: d3d11.BUFFER_UAV_FLAG_RAW,
+ },
+ }),
+ )
+ if err != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(buf), buf.Vtbl.Release)
+ return nil, err
+ }
+ } else if typ&driver.BufferBindingShaderStorageRead != 0 {
+ resView, err = b.dev.CreateShaderResourceView(
+ (*d3d11.Resource)(unsafe.Pointer(buf)),
+ unsafe.Pointer(&d3d11.SHADER_RESOURCE_VIEW_DESC_BUFFEREX{
+ SHADER_RESOURCE_VIEW_DESC: d3d11.SHADER_RESOURCE_VIEW_DESC{
+ Format: d3d11.DXGI_FORMAT_R32_TYPELESS,
+ ViewDimension: d3d11.SRV_DIMENSION_BUFFEREX,
+ },
+ Buffer: d3d11.BUFFEREX_SRV{
+ FirstElement: 0,
+ NumElements: uint32(size / 4),
+ Flags: d3d11.BUFFEREX_SRV_FLAG_RAW,
+ },
+ }),
+ )
+ if err != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(buf), buf.Vtbl.Release)
+ return nil, err
+ }
+ }
+ return &Buffer{backend: b, buf: buf, bind: bind, size: size, resView: resView, uaView: uaView, immutable: immutable}, nil
+}
+
+func (b *Backend) NewComputeProgram(shader shader.Sources) (driver.Program, error) {
+ cs, err := b.dev.CreateComputeShader([]byte(shader.DXBC))
+ if err != nil {
+ return nil, err
+ }
+ return &Program{backend: b, shader: cs}, nil
+}
+
+func (b *Backend) NewPipeline(desc driver.PipelineDesc) (driver.Pipeline, error) {
+ vsh := desc.VertexShader.(*VertexShader)
+ fsh := desc.FragmentShader.(*FragmentShader)
+ blend, err := b.newBlendState(desc.BlendDesc)
+ if err != nil {
+ return nil, err
+ }
+ var layout *d3d11.InputLayout
+ if l := desc.VertexLayout; l.Stride > 0 {
+ var err error
+ layout, err = b.newInputLayout(vsh.src, l.Inputs)
+ if err != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(blend), blend.Vtbl.AddRef)
+ return nil, err
+ }
+ }
+
+ // Retain shaders.
+ vshRef := vsh.shader
+ fshRef := fsh.shader
+ d3d11.IUnknownAddRef(unsafe.Pointer(vshRef), vshRef.Vtbl.AddRef)
+ d3d11.IUnknownAddRef(unsafe.Pointer(fshRef), fshRef.Vtbl.AddRef)
+
+ return &Pipeline{
+ vert: vshRef,
+ frag: fshRef,
+ layout: layout,
+ stride: desc.VertexLayout.Stride,
+ blend: blend,
+ topology: desc.Topology,
+ }, nil
+}
+
+func (b *Backend) newBlendState(desc driver.BlendDesc) (*d3d11.BlendState, error) {
+ var d3ddesc d3d11.BLEND_DESC
+ t0 := &d3ddesc.RenderTarget[0]
+ t0.RenderTargetWriteMask = d3d11.COLOR_WRITE_ENABLE_ALL
+ t0.BlendOp = d3d11.BLEND_OP_ADD
+ t0.BlendOpAlpha = d3d11.BLEND_OP_ADD
+ if desc.Enable {
+ t0.BlendEnable = 1
+ }
+ scol, salpha := toBlendFactor(desc.SrcFactor)
+ dcol, dalpha := toBlendFactor(desc.DstFactor)
+ t0.SrcBlend = scol
+ t0.SrcBlendAlpha = salpha
+ t0.DestBlend = dcol
+ t0.DestBlendAlpha = dalpha
+ return b.dev.CreateBlendState(&d3ddesc)
+}
+
+func (b *Backend) NewVertexShader(src shader.Sources) (driver.VertexShader, error) {
+ vs, err := b.dev.CreateVertexShader([]byte(src.DXBC))
+ if err != nil {
+ return nil, err
+ }
+ return &VertexShader{b, vs, src}, nil
+}
+
+func (b *Backend) NewFragmentShader(src shader.Sources) (driver.FragmentShader, error) {
+ fs, err := b.dev.CreatePixelShader([]byte(src.DXBC))
+ if err != nil {
+ return nil, err
+ }
+ return &FragmentShader{b, fs}, nil
+}
+
+func (b *Backend) Viewport(x, y, width, height int) {
+ b.viewport = d3d11.VIEWPORT{
+ TopLeftX: float32(x),
+ TopLeftY: float32(y),
+ Width: float32(width),
+ Height: float32(height),
+ MinDepth: 0.0,
+ MaxDepth: 1.0,
+ }
+ b.ctx.RSSetViewports(&b.viewport)
+}
+
+func (b *Backend) DrawArrays(off, count int) {
+ b.prepareDraw()
+ b.ctx.Draw(uint32(count), uint32(off))
+}
+
+func (b *Backend) DrawElements(off, count int) {
+ b.prepareDraw()
+ b.ctx.DrawIndexed(uint32(count), uint32(off), 0)
+}
+
+func (b *Backend) prepareDraw() {
+ p := b.pipeline
+ if p == nil {
+ return
+ }
+ b.ctx.VSSetShader(p.vert)
+ b.ctx.PSSetShader(p.frag)
+ b.ctx.IASetInputLayout(p.layout)
+ b.ctx.OMSetBlendState(p.blend, nil, 0xffffffff)
+ if b.vert.buffer != nil {
+ b.ctx.IASetVertexBuffers(b.vert.buffer.buf, uint32(p.stride), uint32(b.vert.offset))
+ }
+ var topology uint32
+ switch p.topology {
+ case driver.TopologyTriangles:
+ topology = d3d11.PRIMITIVE_TOPOLOGY_TRIANGLELIST
+ case driver.TopologyTriangleStrip:
+ topology = d3d11.PRIMITIVE_TOPOLOGY_TRIANGLESTRIP
+ default:
+ panic("unsupported draw mode")
+ }
+ b.ctx.IASetPrimitiveTopology(topology)
+}
+
+func (b *Backend) BindImageTexture(unit int, tex driver.Texture) {
+ t := tex.(*Texture)
+ if t.uaView != nil {
+ b.ctx.CSSetUnorderedAccessViews(uint32(unit), t.uaView)
+ } else {
+ b.ctx.CSSetShaderResources(uint32(unit), t.resView)
+ }
+}
+
+func (b *Backend) DispatchCompute(x, y, z int) {
+ b.ctx.CSSetShader(b.program.shader)
+ b.ctx.Dispatch(uint32(x), uint32(y), uint32(z))
+}
+
+func (t *Texture) Upload(offset, size image.Point, pixels []byte, stride int) {
+ if stride == 0 {
+ stride = size.X * 4
+ }
+ dst := &d3d11.BOX{
+ Left: uint32(offset.X),
+ Top: uint32(offset.Y),
+ Right: uint32(offset.X + size.X),
+ Bottom: uint32(offset.Y + size.Y),
+ Front: 0,
+ Back: 1,
+ }
+ res := (*d3d11.Resource)(unsafe.Pointer(t.tex))
+ t.backend.ctx.UpdateSubresource(res, dst, uint32(stride), uint32(len(pixels)), pixels)
+}
+
+func (t *Texture) Release() {
+ if t.foreign {
+ panic("texture not created by NewTexture")
+ }
+ if t.renderTarget != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(t.renderTarget), t.renderTarget.Vtbl.Release)
+ }
+ if t.sampler != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(t.sampler), t.sampler.Vtbl.Release)
+ }
+ if t.resView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(t.resView), t.resView.Vtbl.Release)
+ }
+ if t.uaView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(t.uaView), t.uaView.Vtbl.Release)
+ }
+ d3d11.IUnknownRelease(unsafe.Pointer(t.tex), t.tex.Vtbl.Release)
+ *t = Texture{}
+}
+
+func (b *Backend) PrepareTexture(tex driver.Texture) {}
+
+func (b *Backend) BindTexture(unit int, tex driver.Texture) {
+ t := tex.(*Texture)
+ b.ctx.PSSetSamplers(uint32(unit), t.sampler)
+ b.ctx.PSSetShaderResources(uint32(unit), t.resView)
+}
+
+func (b *Backend) BindPipeline(pipe driver.Pipeline) {
+ b.pipeline = pipe.(*Pipeline)
+}
+
+func (b *Backend) BindProgram(prog driver.Program) {
+ b.program = prog.(*Program)
+}
+
+func (s *VertexShader) Release() {
+ d3d11.IUnknownRelease(unsafe.Pointer(s.shader), s.shader.Vtbl.Release)
+ *s = VertexShader{}
+}
+
+func (s *FragmentShader) Release() {
+ d3d11.IUnknownRelease(unsafe.Pointer(s.shader), s.shader.Vtbl.Release)
+ *s = FragmentShader{}
+}
+
+func (s *Program) Release() {
+ d3d11.IUnknownRelease(unsafe.Pointer(s.shader), s.shader.Vtbl.Release)
+ *s = Program{}
+}
+
+func (p *Pipeline) Release() {
+ d3d11.IUnknownRelease(unsafe.Pointer(p.vert), p.vert.Vtbl.Release)
+ d3d11.IUnknownRelease(unsafe.Pointer(p.frag), p.frag.Vtbl.Release)
+ d3d11.IUnknownRelease(unsafe.Pointer(p.blend), p.blend.Vtbl.Release)
+ if l := p.layout; l != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(l), l.Vtbl.Release)
+ }
+ *p = Pipeline{}
+}
+
+func (b *Backend) BindStorageBuffer(binding int, buffer driver.Buffer) {
+ buf := buffer.(*Buffer)
+ if buf.resView != nil {
+ b.ctx.CSSetShaderResources(uint32(binding), buf.resView)
+ } else {
+ b.ctx.CSSetUnorderedAccessViews(uint32(binding), buf.uaView)
+ }
+}
+
+func (b *Backend) BindUniforms(buffer driver.Buffer) {
+ buf := buffer.(*Buffer)
+ b.ctx.VSSetConstantBuffers(buf.buf)
+ b.ctx.PSSetConstantBuffers(buf.buf)
+}
+
+func (b *Backend) BindVertexBuffer(buf driver.Buffer, offset int) {
+ b.vert.buffer = buf.(*Buffer)
+ b.vert.offset = offset
+}
+
+func (b *Backend) BindIndexBuffer(buf driver.Buffer) {
+ b.ctx.IASetIndexBuffer(buf.(*Buffer).buf, d3d11.DXGI_FORMAT_R16_UINT, 0)
+}
+
+func (b *Buffer) Download(dst []byte) error {
+ res := (*d3d11.Resource)(unsafe.Pointer(b.buf))
+ resMap, err := b.backend.ctx.Map(res, 0, d3d11.MAP_READ, 0)
+ if err != nil {
+ return fmt.Errorf("d3d11: %v", err)
+ }
+ defer b.backend.ctx.Unmap(res, 0)
+ data := sliceOf(resMap.PData, len(dst))
+ copy(dst, data)
+ return nil
+}
+
+func (b *Buffer) Upload(data []byte) {
+ var dst *d3d11.BOX
+ if len(data) < b.size {
+ dst = &d3d11.BOX{
+ Left: 0,
+ Right: uint32(len(data)),
+ Top: 0,
+ Bottom: 1,
+ Front: 0,
+ Back: 1,
+ }
+ }
+ b.backend.ctx.UpdateSubresource((*d3d11.Resource)(unsafe.Pointer(b.buf)), dst, 0, 0, data)
+}
+
+func (b *Buffer) Release() {
+ if b.resView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(b.resView), b.resView.Vtbl.Release)
+ }
+ if b.uaView != nil {
+ d3d11.IUnknownRelease(unsafe.Pointer(b.uaView), b.uaView.Vtbl.Release)
+ }
+ d3d11.IUnknownRelease(unsafe.Pointer(b.buf), b.buf.Vtbl.Release)
+ *b = Buffer{}
+}
+
+func (t *Texture) ReadPixels(src image.Rectangle, pixels []byte, stride int) error {
+ w, h := src.Dx(), src.Dy()
+ tex, err := t.backend.dev.CreateTexture2D(&d3d11.TEXTURE2D_DESC{
+ Width: uint32(w),
+ Height: uint32(h),
+ MipLevels: 1,
+ ArraySize: 1,
+ Format: t.format,
+ SampleDesc: d3d11.DXGI_SAMPLE_DESC{
+ Count: 1,
+ Quality: 0,
+ },
+ Usage: d3d11.USAGE_STAGING,
+ CPUAccessFlags: d3d11.CPU_ACCESS_READ,
+ })
+ if err != nil {
+ return fmt.Errorf("ReadPixels: %v", err)
+ }
+ defer d3d11.IUnknownRelease(unsafe.Pointer(tex), tex.Vtbl.Release)
+ res := (*d3d11.Resource)(unsafe.Pointer(tex))
+ t.backend.ctx.CopySubresourceRegion(
+ res,
+ 0, // Destination subresource.
+ 0, 0, 0, // Destination coordinates (x, y, z).
+ (*d3d11.Resource)(t.tex),
+ 0, // Source subresource.
+ &d3d11.BOX{
+ Left: uint32(src.Min.X),
+ Top: uint32(src.Min.Y),
+ Right: uint32(src.Max.X),
+ Bottom: uint32(src.Max.Y),
+ Front: 0,
+ Back: 1,
+ },
+ )
+ resMap, err := t.backend.ctx.Map(res, 0, d3d11.MAP_READ, 0)
+ if err != nil {
+ return fmt.Errorf("ReadPixels: %v", err)
+ }
+ defer t.backend.ctx.Unmap(res, 0)
+ srcPitch := stride
+ dstPitch := int(resMap.RowPitch)
+ mapSize := dstPitch * h
+ data := sliceOf(resMap.PData, mapSize)
+ width := w * 4
+ for r := 0; r < h; r++ {
+ pixels := pixels[r*srcPitch:]
+ copy(pixels[:width], data[r*dstPitch:])
+ }
+ return nil
+}
+
+func (b *Backend) BeginCompute() {
+}
+
+func (b *Backend) EndCompute() {
+}
+
+func (b *Backend) BeginRenderPass(tex driver.Texture, d driver.LoadDesc) {
+ t := tex.(*Texture)
+ b.ctx.OMSetRenderTargets(t.renderTarget, nil)
+ if d.Action == driver.LoadActionClear {
+ c := d.ClearColor
+ b.clearColor = [4]float32{c.R, c.G, c.B, c.A}
+ b.ctx.ClearRenderTargetView(t.renderTarget, &b.clearColor)
+ }
+}
+
+func (b *Backend) EndRenderPass() {
+}
+
+func (f *Texture) ImplementsRenderTarget() {}
+
+func convBufferBinding(typ driver.BufferBinding) uint32 {
+ var bindings uint32
+ if typ&driver.BufferBindingVertices != 0 {
+ bindings |= d3d11.BIND_VERTEX_BUFFER
+ }
+ if typ&driver.BufferBindingIndices != 0 {
+ bindings |= d3d11.BIND_INDEX_BUFFER
+ }
+ if typ&driver.BufferBindingUniforms != 0 {
+ bindings |= d3d11.BIND_CONSTANT_BUFFER
+ }
+ if typ&driver.BufferBindingTexture != 0 {
+ bindings |= d3d11.BIND_SHADER_RESOURCE
+ }
+ if typ&driver.BufferBindingFramebuffer != 0 {
+ bindings |= d3d11.BIND_RENDER_TARGET
+ }
+ if typ&driver.BufferBindingShaderStorageWrite != 0 {
+ bindings |= d3d11.BIND_UNORDERED_ACCESS
+ } else if typ&driver.BufferBindingShaderStorageRead != 0 {
+ bindings |= d3d11.BIND_SHADER_RESOURCE
+ }
+ return bindings
+}
+
+func toBlendFactor(f driver.BlendFactor) (uint32, uint32) {
+ switch f {
+ case driver.BlendFactorOne:
+ return d3d11.BLEND_ONE, d3d11.BLEND_ONE
+ case driver.BlendFactorOneMinusSrcAlpha:
+ return d3d11.BLEND_INV_SRC_ALPHA, d3d11.BLEND_INV_SRC_ALPHA
+ case driver.BlendFactorZero:
+ return d3d11.BLEND_ZERO, d3d11.BLEND_ZERO
+ case driver.BlendFactorDstColor:
+ return d3d11.BLEND_DEST_COLOR, d3d11.BLEND_DEST_ALPHA
+ default:
+ panic("unsupported blend source factor")
+ }
+}
+
+// sliceOf returns a slice from a (native) pointer.
+func sliceOf(ptr uintptr, cap int) []byte {
+ var data []byte
+ h := (*reflect.SliceHeader)(unsafe.Pointer(&data))
+ h.Data = ptr
+ h.Cap = cap
+ h.Len = cap
+ return data
+}
diff --git a/vendor/gioui.org/gpu/internal/driver/api.go b/vendor/gioui.org/gpu/internal/driver/api.go
new file mode 100644
index 0000000..9a762a6
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/driver/api.go
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package driver
+
+import (
+ "fmt"
+ "unsafe"
+
+ "gioui.org/internal/gl"
+)
+
+// See gpu/api.go for documentation for the API types.
+
+type API interface {
+ implementsAPI()
+}
+
+type RenderTarget interface {
+ ImplementsRenderTarget()
+}
+
+type OpenGLRenderTarget gl.Framebuffer
+
+type Direct3D11RenderTarget struct {
+ // RenderTarget is a *ID3D11RenderTargetView.
+ RenderTarget unsafe.Pointer
+}
+
+type MetalRenderTarget struct {
+ // Texture is a MTLTexture.
+ Texture uintptr
+}
+
+type VulkanRenderTarget struct {
+ // WaitSem is a VkSemaphore that must signaled before accessing Framebuffer.
+ WaitSem uint64
+ // SignalSem is a VkSemaphore that signal access to Framebuffer is complete.
+ SignalSem uint64
+ // Image is the VkImage to render into.
+ Image uint64
+ // Framebuffer is a VkFramebuffer for Image.
+ Framebuffer uint64
+}
+
+type OpenGL struct {
+ // ES forces the use of ANGLE OpenGL ES libraries on macOS. It is
+ // ignored on all other platforms.
+ ES bool
+ // Context contains the WebGL context for WebAssembly platforms. It is
+ // empty for all other platforms; an OpenGL context is assumed current when
+ // calling NewDevice.
+ Context gl.Context
+ // Shared instructs users of the context to restore the GL state after
+ // use.
+ Shared bool
+}
+
+type Direct3D11 struct {
+ // Device contains a *ID3D11Device.
+ Device unsafe.Pointer
+}
+
+type Metal struct {
+ // Device is an MTLDevice.
+ Device uintptr
+ // Queue is a MTLCommandQueue.
+ Queue uintptr
+ // PixelFormat is the MTLPixelFormat of the default framebuffer.
+ PixelFormat int
+}
+
+type Vulkan struct {
+ // PhysDevice is a VkPhysicalDevice.
+ PhysDevice unsafe.Pointer
+ // Device is a VkDevice.
+ Device unsafe.Pointer
+ // QueueFamily is the queue familily index of the queue.
+ QueueFamily int
+ // QueueIndex is the logical queue index of the queue.
+ QueueIndex int
+ // Format is a VkFormat that matches render targets.
+ Format int
+}
+
+// API specific device constructors.
+var (
+ NewOpenGLDevice func(api OpenGL) (Device, error)
+ NewDirect3D11Device func(api Direct3D11) (Device, error)
+ NewMetalDevice func(api Metal) (Device, error)
+ NewVulkanDevice func(api Vulkan) (Device, error)
+)
+
+// NewDevice creates a new Device given the api.
+//
+// Note that the device does not assume ownership of the resources contained in
+// api; the caller must ensure the resources are valid until the device is
+// released.
+func NewDevice(api API) (Device, error) {
+ switch api := api.(type) {
+ case OpenGL:
+ if NewOpenGLDevice != nil {
+ return NewOpenGLDevice(api)
+ }
+ case Direct3D11:
+ if NewDirect3D11Device != nil {
+ return NewDirect3D11Device(api)
+ }
+ case Metal:
+ if NewMetalDevice != nil {
+ return NewMetalDevice(api)
+ }
+ case Vulkan:
+ if NewVulkanDevice != nil {
+ return NewVulkanDevice(api)
+ }
+ }
+ return nil, fmt.Errorf("driver: no driver available for the API %T", api)
+}
+
+func (OpenGL) implementsAPI() {}
+func (Direct3D11) implementsAPI() {}
+func (Metal) implementsAPI() {}
+func (Vulkan) implementsAPI() {}
+func (OpenGLRenderTarget) ImplementsRenderTarget() {}
+func (Direct3D11RenderTarget) ImplementsRenderTarget() {}
+func (MetalRenderTarget) ImplementsRenderTarget() {}
+func (VulkanRenderTarget) ImplementsRenderTarget() {}
diff --git a/vendor/gioui.org/gpu/internal/driver/driver.go b/vendor/gioui.org/gpu/internal/driver/driver.go
new file mode 100644
index 0000000..58cb89b
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/driver/driver.go
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package driver
+
+import (
+ "errors"
+ "image"
+ "time"
+
+ "gioui.org/internal/f32color"
+ "gioui.org/shader"
+)
+
+// Device represents the abstraction of underlying GPU
+// APIs such as OpenGL, Direct3D useful for rendering Gio
+// operations.
+type Device interface {
+ BeginFrame(target RenderTarget, clear bool, viewport image.Point) Texture
+ EndFrame()
+ Caps() Caps
+ NewTimer() Timer
+ // IsContinuousTime reports whether all timer measurements
+ // are valid at the point of call.
+ IsTimeContinuous() bool
+ NewTexture(format TextureFormat, width, height int, minFilter, magFilter TextureFilter, bindings BufferBinding) (Texture, error)
+ NewImmutableBuffer(typ BufferBinding, data []byte) (Buffer, error)
+ NewBuffer(typ BufferBinding, size int) (Buffer, error)
+ NewComputeProgram(shader shader.Sources) (Program, error)
+ NewVertexShader(src shader.Sources) (VertexShader, error)
+ NewFragmentShader(src shader.Sources) (FragmentShader, error)
+ NewPipeline(desc PipelineDesc) (Pipeline, error)
+
+ Viewport(x, y, width, height int)
+ DrawArrays(off, count int)
+ DrawElements(off, count int)
+
+ BeginRenderPass(t Texture, desc LoadDesc)
+ EndRenderPass()
+ PrepareTexture(t Texture)
+ BindProgram(p Program)
+ BindPipeline(p Pipeline)
+ BindTexture(unit int, t Texture)
+ BindVertexBuffer(b Buffer, offset int)
+ BindIndexBuffer(b Buffer)
+ BindImageTexture(unit int, texture Texture)
+ BindUniforms(buf Buffer)
+ BindStorageBuffer(binding int, buf Buffer)
+
+ BeginCompute()
+ EndCompute()
+ CopyTexture(dst Texture, dstOrigin image.Point, src Texture, srcRect image.Rectangle)
+ DispatchCompute(x, y, z int)
+
+ Release()
+}
+
+var ErrDeviceLost = errors.New("GPU device lost")
+
+type LoadDesc struct {
+ Action LoadAction
+ ClearColor f32color.RGBA
+}
+
+type Pipeline interface {
+ Release()
+}
+
+type PipelineDesc struct {
+ VertexShader VertexShader
+ FragmentShader FragmentShader
+ VertexLayout VertexLayout
+ BlendDesc BlendDesc
+ PixelFormat TextureFormat
+ Topology Topology
+}
+
+type VertexLayout struct {
+ Inputs []InputDesc
+ Stride int
+}
+
+// InputDesc describes a vertex attribute as laid out in a Buffer.
+type InputDesc struct {
+ Type shader.DataType
+ Size int
+
+ Offset int
+}
+
+type BlendDesc struct {
+ Enable bool
+ SrcFactor, DstFactor BlendFactor
+}
+
+type BlendFactor uint8
+
+type Topology uint8
+
+type TextureFilter uint8
+type TextureFormat uint8
+
+type BufferBinding uint8
+
+type LoadAction uint8
+
+type Features uint
+
+type Caps struct {
+ // BottomLeftOrigin is true if the driver has the origin in the lower left
+ // corner. The OpenGL driver returns true.
+ BottomLeftOrigin bool
+ Features Features
+ MaxTextureSize int
+}
+
+type VertexShader interface {
+ Release()
+}
+
+type FragmentShader interface {
+ Release()
+}
+
+type Program interface {
+ Release()
+}
+
+type Buffer interface {
+ Release()
+ Upload(data []byte)
+ Download(data []byte) error
+}
+
+type Timer interface {
+ Begin()
+ End()
+ Duration() (time.Duration, bool)
+ Release()
+}
+
+type Texture interface {
+ RenderTarget
+ Upload(offset, size image.Point, pixels []byte, stride int)
+ ReadPixels(src image.Rectangle, pixels []byte, stride int) error
+ Release()
+}
+
+const (
+ BufferBindingIndices BufferBinding = 1 << iota
+ BufferBindingVertices
+ BufferBindingUniforms
+ BufferBindingTexture
+ BufferBindingFramebuffer
+ BufferBindingShaderStorageRead
+ BufferBindingShaderStorageWrite
+)
+
+const (
+ TextureFormatSRGBA TextureFormat = iota
+ TextureFormatFloat
+ TextureFormatRGBA8
+ // TextureFormatOutput denotes the format used by the output framebuffer.
+ TextureFormatOutput
+)
+
+const (
+ FilterNearest TextureFilter = iota
+ FilterLinear
+)
+
+const (
+ FeatureTimers Features = 1 << iota
+ FeatureFloatRenderTargets
+ FeatureCompute
+ FeatureSRGB
+)
+
+const (
+ TopologyTriangleStrip Topology = iota
+ TopologyTriangles
+)
+
+const (
+ BlendFactorOne BlendFactor = iota
+ BlendFactorOneMinusSrcAlpha
+ BlendFactorZero
+ BlendFactorDstColor
+)
+
+const (
+ LoadActionKeep LoadAction = iota
+ LoadActionClear
+ LoadActionInvalidate
+)
+
+var ErrContentLost = errors.New("buffer content lost")
+
+func (f Features) Has(feats Features) bool {
+ return f&feats == feats
+}
+
+func DownloadImage(d Device, t Texture, img *image.RGBA) error {
+ r := img.Bounds()
+ if err := t.ReadPixels(r, img.Pix, img.Stride); err != nil {
+ return err
+ }
+ if d.Caps().BottomLeftOrigin {
+ // OpenGL origin is in the lower-left corner. Flip the image to
+ // match.
+ flipImageY(r.Dx()*4, r.Dy(), img.Pix)
+ }
+ return nil
+}
+
+func flipImageY(stride, height int, pixels []byte) {
+ // Flip image in y-direction. OpenGL's origin is in the lower
+ // left corner.
+ row := make([]uint8, stride)
+ for y := 0; y < height/2; y++ {
+ y1 := height - y - 1
+ dest := y1 * stride
+ src := y * stride
+ copy(row, pixels[dest:])
+ copy(pixels[dest:], pixels[src:src+len(row)])
+ copy(pixels[src:], row)
+ }
+}
+
+func UploadImage(t Texture, offset image.Point, img *image.RGBA) {
+ var pixels []byte
+ size := img.Bounds().Size()
+ min := img.Rect.Min
+ start := img.PixOffset(min.X, min.Y)
+ end := img.PixOffset(min.X+size.X, min.Y+size.Y-1)
+ pixels = img.Pix[start:end]
+ t.Upload(offset, size, pixels, img.Stride)
+}
diff --git a/vendor/gioui.org/gpu/internal/metal/metal.go b/vendor/gioui.org/gpu/internal/metal/metal.go
new file mode 100644
index 0000000..b9739af
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/metal/metal.go
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// This file exists so this package builds on non-Darwin platforms.
+
+package metal
diff --git a/vendor/gioui.org/gpu/internal/metal/metal_darwin.go b/vendor/gioui.org/gpu/internal/metal/metal_darwin.go
new file mode 100644
index 0000000..c180731
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/metal/metal_darwin.go
@@ -0,0 +1,1141 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package metal
+
+import (
+ "errors"
+ "fmt"
+ "image"
+ "unsafe"
+
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/shader"
+)
+
+/*
+#cgo CFLAGS: -Werror -xobjective-c -fmodules -fobjc-arc
+#cgo LDFLAGS: -framework CoreGraphics
+
+@import Metal;
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Metal/Metal.h>
+
+typedef struct {
+ void *addr;
+ NSUInteger size;
+} slice;
+
+static CFTypeRef queueNewBuffer(CFTypeRef queueRef) {
+ @autoreleasepool {
+ id<MTLCommandQueue> queue = (__bridge id<MTLCommandQueue>)queueRef;
+ return CFBridgingRetain([queue commandBuffer]);
+ }
+}
+
+static void cmdBufferCommit(CFTypeRef cmdBufRef) {
+ @autoreleasepool {
+ id<MTLCommandBuffer> cmdBuf = (__bridge id<MTLCommandBuffer>)cmdBufRef;
+ [cmdBuf commit];
+ }
+}
+
+static void cmdBufferWaitUntilCompleted(CFTypeRef cmdBufRef) {
+ @autoreleasepool {
+ id<MTLCommandBuffer> cmdBuf = (__bridge id<MTLCommandBuffer>)cmdBufRef;
+ [cmdBuf waitUntilCompleted];
+ }
+}
+
+static CFTypeRef cmdBufferRenderEncoder(CFTypeRef cmdBufRef, CFTypeRef textureRef, MTLLoadAction act, float r, float g, float b, float a) {
+ @autoreleasepool {
+ id<MTLCommandBuffer> cmdBuf = (__bridge id<MTLCommandBuffer>)cmdBufRef;
+ MTLRenderPassDescriptor *desc = [MTLRenderPassDescriptor new];
+ desc.colorAttachments[0].texture = (__bridge id<MTLTexture>)textureRef;
+ desc.colorAttachments[0].loadAction = act;
+ desc.colorAttachments[0].clearColor = MTLClearColorMake(r, g, b, a);
+ return CFBridgingRetain([cmdBuf renderCommandEncoderWithDescriptor:desc]);
+ }
+}
+
+static CFTypeRef cmdBufferComputeEncoder(CFTypeRef cmdBufRef) {
+ @autoreleasepool {
+ id<MTLCommandBuffer> cmdBuf = (__bridge id<MTLCommandBuffer>)cmdBufRef;
+ return CFBridgingRetain([cmdBuf computeCommandEncoder]);
+ }
+}
+
+static CFTypeRef cmdBufferBlitEncoder(CFTypeRef cmdBufRef) {
+ @autoreleasepool {
+ id<MTLCommandBuffer> cmdBuf = (__bridge id<MTLCommandBuffer>)cmdBufRef;
+ return CFBridgingRetain([cmdBuf blitCommandEncoder]);
+ }
+}
+
+static void renderEncEnd(CFTypeRef renderEncRef) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ [enc endEncoding];
+ }
+}
+
+static void renderEncViewport(CFTypeRef renderEncRef, MTLViewport viewport) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ [enc setViewport:viewport];
+ }
+}
+
+static void renderEncSetFragmentTexture(CFTypeRef renderEncRef, NSUInteger index, CFTypeRef texRef) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ id<MTLTexture> tex = (__bridge id<MTLTexture>)texRef;
+ [enc setFragmentTexture:tex atIndex:index];
+ }
+}
+
+static void renderEncSetFragmentSamplerState(CFTypeRef renderEncRef, NSUInteger index, CFTypeRef samplerRef) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ id<MTLSamplerState> sampler = (__bridge id<MTLSamplerState>)samplerRef;
+ [enc setFragmentSamplerState:sampler atIndex:index];
+ }
+}
+
+static void renderEncSetVertexBuffer(CFTypeRef renderEncRef, CFTypeRef bufRef, NSUInteger idx, NSUInteger offset) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ id<MTLBuffer> buf = (__bridge id<MTLBuffer>)bufRef;
+ [enc setVertexBuffer:buf offset:offset atIndex:idx];
+ }
+}
+
+static void renderEncSetFragmentBuffer(CFTypeRef renderEncRef, CFTypeRef bufRef, NSUInteger idx, NSUInteger offset) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ id<MTLBuffer> buf = (__bridge id<MTLBuffer>)bufRef;
+ [enc setFragmentBuffer:buf offset:offset atIndex:idx];
+ }
+}
+
+static void renderEncSetFragmentBytes(CFTypeRef renderEncRef, const void *bytes, NSUInteger length, NSUInteger idx) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ [enc setFragmentBytes:bytes length:length atIndex:idx];
+ }
+}
+
+static void renderEncSetVertexBytes(CFTypeRef renderEncRef, const void *bytes, NSUInteger length, NSUInteger idx) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ [enc setVertexBytes:bytes length:length atIndex:idx];
+ }
+}
+
+static void renderEncSetRenderPipelineState(CFTypeRef renderEncRef, CFTypeRef pipeRef) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ id<MTLRenderPipelineState> pipe = (__bridge id<MTLRenderPipelineState>)pipeRef;
+ [enc setRenderPipelineState:pipe];
+ }
+}
+
+static void renderEncDrawPrimitives(CFTypeRef renderEncRef, MTLPrimitiveType type, NSUInteger start, NSUInteger count) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ [enc drawPrimitives:type vertexStart:start vertexCount:count];
+ }
+}
+
+static void renderEncDrawIndexedPrimitives(CFTypeRef renderEncRef, MTLPrimitiveType type, CFTypeRef bufRef, NSUInteger offset, NSUInteger count) {
+ @autoreleasepool {
+ id<MTLRenderCommandEncoder> enc = (__bridge id<MTLRenderCommandEncoder>)renderEncRef;
+ id<MTLBuffer> buf = (__bridge id<MTLBuffer>)bufRef;
+ [enc drawIndexedPrimitives:type indexCount:count indexType:MTLIndexTypeUInt16 indexBuffer:buf indexBufferOffset:offset];
+ }
+}
+
+static void computeEncSetPipeline(CFTypeRef computeEncRef, CFTypeRef pipeRef) {
+ @autoreleasepool {
+ id<MTLComputeCommandEncoder> enc = (__bridge id<MTLComputeCommandEncoder>)computeEncRef;
+ id<MTLComputePipelineState> pipe = (__bridge id<MTLComputePipelineState>)pipeRef;
+ [enc setComputePipelineState:pipe];
+ }
+}
+
+static void computeEncSetTexture(CFTypeRef computeEncRef, NSUInteger index, CFTypeRef texRef) {
+ @autoreleasepool {
+ id<MTLComputeCommandEncoder> enc = (__bridge id<MTLComputeCommandEncoder>)computeEncRef;
+ id<MTLTexture> tex = (__bridge id<MTLTexture>)texRef;
+ [enc setTexture:tex atIndex:index];
+ }
+}
+
+static void computeEncEnd(CFTypeRef computeEncRef) {
+ @autoreleasepool {
+ id<MTLComputeCommandEncoder> enc = (__bridge id<MTLComputeCommandEncoder>)computeEncRef;
+ [enc endEncoding];
+ }
+}
+
+static void computeEncSetBuffer(CFTypeRef computeEncRef, NSUInteger index, CFTypeRef bufRef) {
+ @autoreleasepool {
+ id<MTLComputeCommandEncoder> enc = (__bridge id<MTLComputeCommandEncoder>)computeEncRef;
+ id<MTLBuffer> buf = (__bridge id<MTLBuffer>)bufRef;
+ [enc setBuffer:buf offset:0 atIndex:index];
+ }
+}
+
+static void computeEncDispatch(CFTypeRef computeEncRef, MTLSize threadgroupsPerGrid, MTLSize threadsPerThreadgroup) {
+ @autoreleasepool {
+ id<MTLComputeCommandEncoder> enc = (__bridge id<MTLComputeCommandEncoder>)computeEncRef;
+ [enc dispatchThreadgroups:threadgroupsPerGrid threadsPerThreadgroup:threadsPerThreadgroup];
+ }
+}
+
+static void computeEncSetBytes(CFTypeRef computeEncRef, const void *bytes, NSUInteger length, NSUInteger index) {
+ @autoreleasepool {
+ id<MTLComputeCommandEncoder> enc = (__bridge id<MTLComputeCommandEncoder>)computeEncRef;
+ [enc setBytes:bytes length:length atIndex:index];
+ }
+}
+
+static void blitEncEnd(CFTypeRef blitEncRef) {
+ @autoreleasepool {
+ id<MTLBlitCommandEncoder> enc = (__bridge id<MTLBlitCommandEncoder>)blitEncRef;
+ [enc endEncoding];
+ }
+}
+
+static void blitEncCopyFromTexture(CFTypeRef blitEncRef, CFTypeRef srcRef, MTLOrigin srcOrig, MTLSize srcSize, CFTypeRef dstRef, MTLOrigin dstOrig) {
+ @autoreleasepool {
+ id<MTLBlitCommandEncoder> enc = (__bridge id<MTLBlitCommandEncoder>)blitEncRef;
+ id<MTLTexture> src = (__bridge id<MTLTexture>)srcRef;
+ id<MTLTexture> dst = (__bridge id<MTLTexture>)dstRef;
+ [enc copyFromTexture:src
+ sourceSlice:0
+ sourceLevel:0
+ sourceOrigin:srcOrig
+ sourceSize:srcSize
+ toTexture:dst
+ destinationSlice:0
+ destinationLevel:0
+ destinationOrigin:dstOrig];
+ }
+}
+
+static void blitEncCopyBufferToTexture(CFTypeRef blitEncRef, CFTypeRef bufRef, CFTypeRef texRef, NSUInteger offset, NSUInteger stride, NSUInteger length, MTLSize dims, MTLOrigin orig) {
+ @autoreleasepool {
+ id<MTLBlitCommandEncoder> enc = (__bridge id<MTLBlitCommandEncoder>)blitEncRef;
+ id<MTLBuffer> src = (__bridge id<MTLBuffer>)bufRef;
+ id<MTLTexture> dst = (__bridge id<MTLTexture>)texRef;
+ [enc copyFromBuffer:src
+ sourceOffset:offset
+ sourceBytesPerRow:stride
+ sourceBytesPerImage:length
+ sourceSize:dims
+ toTexture:dst
+ destinationSlice:0
+ destinationLevel:0
+ destinationOrigin:orig];
+ }
+}
+
+static void blitEncCopyTextureToBuffer(CFTypeRef blitEncRef, CFTypeRef texRef, CFTypeRef bufRef, NSUInteger offset, NSUInteger stride, NSUInteger length, MTLSize dims, MTLOrigin orig) {
+ @autoreleasepool {
+ id<MTLBlitCommandEncoder> enc = (__bridge id<MTLBlitCommandEncoder>)blitEncRef;
+ id<MTLTexture> src = (__bridge id<MTLTexture>)texRef;
+ id<MTLBuffer> dst = (__bridge id<MTLBuffer>)bufRef;
+ [enc copyFromTexture:src
+ sourceSlice:0
+ sourceLevel:0
+ sourceOrigin:orig
+ sourceSize:dims
+ toBuffer:dst
+ destinationOffset:offset
+ destinationBytesPerRow:stride
+ destinationBytesPerImage:length];
+ }
+}
+
+static void blitEncCopyBufferToBuffer(CFTypeRef blitEncRef, CFTypeRef srcRef, CFTypeRef dstRef, NSUInteger srcOff, NSUInteger dstOff, NSUInteger size) {
+ @autoreleasepool {
+ id<MTLBlitCommandEncoder> enc = (__bridge id<MTLBlitCommandEncoder>)blitEncRef;
+ id<MTLBuffer> src = (__bridge id<MTLBuffer>)srcRef;
+ id<MTLBuffer> dst = (__bridge id<MTLBuffer>)dstRef;
+ [enc copyFromBuffer:src
+ sourceOffset:srcOff
+ toBuffer:dst
+ destinationOffset:dstOff
+ size:size];
+ }
+}
+
+static CFTypeRef newTexture(CFTypeRef devRef, NSUInteger width, NSUInteger height, MTLPixelFormat format, MTLTextureUsage usage) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ MTLTextureDescriptor *mtlDesc = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat: format
+ width: width
+ height: height
+ mipmapped: NO];
+ mtlDesc.usage = usage;
+ mtlDesc.storageMode = MTLStorageModePrivate;
+ return CFBridgingRetain([dev newTextureWithDescriptor:mtlDesc]);
+ }
+}
+
+static CFTypeRef newSampler(CFTypeRef devRef, MTLSamplerMinMagFilter minFilter, MTLSamplerMinMagFilter magFilter) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ MTLSamplerDescriptor *desc = [MTLSamplerDescriptor new];
+ desc.minFilter = minFilter;
+ desc.magFilter = magFilter;
+ return CFBridgingRetain([dev newSamplerStateWithDescriptor:desc]);
+ }
+}
+
+static CFTypeRef newBuffer(CFTypeRef devRef, NSUInteger size, MTLResourceOptions opts) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ id<MTLBuffer> buf = [dev newBufferWithLength:size
+ options:opts];
+ return CFBridgingRetain(buf);
+ }
+}
+
+static slice bufferContents(CFTypeRef bufRef) {
+ @autoreleasepool {
+ id<MTLBuffer> buf = (__bridge id<MTLBuffer>)bufRef;
+ slice s = {.addr = [buf contents], .size = [buf length]};
+ return s;
+ }
+}
+
+static CFTypeRef newLibrary(CFTypeRef devRef, char *name, void *mtllib, size_t size) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ dispatch_data_t data = dispatch_data_create(mtllib, size, DISPATCH_TARGET_QUEUE_DEFAULT, DISPATCH_DATA_DESTRUCTOR_DEFAULT);
+ id<MTLLibrary> lib = [dev newLibraryWithData:data error:nil];
+ lib.label = [NSString stringWithUTF8String:name];
+ return CFBridgingRetain(lib);
+ }
+}
+
+static CFTypeRef libraryNewFunction(CFTypeRef libRef, char *funcName) {
+ @autoreleasepool {
+ id<MTLLibrary> lib = (__bridge id<MTLLibrary>)libRef;
+ NSString *name = [NSString stringWithUTF8String:funcName];
+ return CFBridgingRetain([lib newFunctionWithName:name]);
+ }
+}
+
+static CFTypeRef newComputePipeline(CFTypeRef devRef, CFTypeRef funcRef) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ id<MTLFunction> func = (__bridge id<MTLFunction>)funcRef;
+ return CFBridgingRetain([dev newComputePipelineStateWithFunction:func error:nil]);
+ }
+}
+
+static CFTypeRef newRenderPipeline(CFTypeRef devRef, CFTypeRef vertFunc, CFTypeRef fragFunc, MTLPixelFormat pixelFormat, NSUInteger bufIdx, NSUInteger nverts, MTLVertexFormat *fmts, NSUInteger *offsets, NSUInteger stride, int blend, MTLBlendFactor srcFactor, MTLBlendFactor dstFactor, NSUInteger nvertBufs, NSUInteger nfragBufs) {
+ @autoreleasepool {
+ id<MTLDevice> dev = (__bridge id<MTLDevice>)devRef;
+ id<MTLFunction> vfunc = (__bridge id<MTLFunction>)vertFunc;
+ id<MTLFunction> ffunc = (__bridge id<MTLFunction>)fragFunc;
+ MTLVertexDescriptor *vdesc = [MTLVertexDescriptor vertexDescriptor];
+ vdesc.layouts[bufIdx].stride = stride;
+ for (NSUInteger i = 0; i < nverts; i++) {
+ vdesc.attributes[i].format = fmts[i];
+ vdesc.attributes[i].offset = offsets[i];
+ vdesc.attributes[i].bufferIndex = bufIdx;
+ }
+ MTLRenderPipelineDescriptor *desc = [MTLRenderPipelineDescriptor new];
+ desc.vertexFunction = vfunc;
+ desc.fragmentFunction = ffunc;
+ desc.vertexDescriptor = vdesc;
+ for (NSUInteger i = 0; i < nvertBufs; i++) {
+ if (@available(iOS 11.0, *)) {
+ desc.vertexBuffers[i].mutability = MTLMutabilityImmutable;
+ }
+ }
+ for (NSUInteger i = 0; i < nfragBufs; i++) {
+ if (@available(iOS 11.0, *)) {
+ desc.fragmentBuffers[i].mutability = MTLMutabilityImmutable;
+ }
+ }
+ desc.colorAttachments[0].pixelFormat = pixelFormat;
+ desc.colorAttachments[0].blendingEnabled = blend ? YES : NO;
+ desc.colorAttachments[0].sourceAlphaBlendFactor = srcFactor;
+ desc.colorAttachments[0].sourceRGBBlendFactor = srcFactor;
+ desc.colorAttachments[0].destinationAlphaBlendFactor = dstFactor;
+ desc.colorAttachments[0].destinationRGBBlendFactor = dstFactor;
+ return CFBridgingRetain([dev newRenderPipelineStateWithDescriptor:desc
+ error:nil]);
+ }
+}
+*/
+import "C"
+
+type Backend struct {
+ dev C.CFTypeRef
+ queue C.CFTypeRef
+ pixelFmt C.MTLPixelFormat
+
+ cmdBuffer C.CFTypeRef
+ lastCmdBuffer C.CFTypeRef
+ renderEnc C.CFTypeRef
+ computeEnc C.CFTypeRef
+ blitEnc C.CFTypeRef
+
+ prog *Program
+ topology C.MTLPrimitiveType
+
+ stagingBuf C.CFTypeRef
+ stagingOff int
+
+ indexBuf *Buffer
+
+ // bufSizes is scratch space for filling out the spvBufferSizeConstants
+ // that spirv-cross generates for emulating buffer.length expressions in
+ // shaders.
+ bufSizes []uint32
+}
+
+type Texture struct {
+ backend *Backend
+ texture C.CFTypeRef
+ sampler C.CFTypeRef
+ width int
+ height int
+ foreign bool
+}
+
+type Shader struct {
+ function C.CFTypeRef
+ inputs []shader.InputLocation
+}
+
+type Program struct {
+ pipeline C.CFTypeRef
+ groupSize [3]int
+}
+
+type Pipeline struct {
+ pipeline C.CFTypeRef
+ topology C.MTLPrimitiveType
+}
+
+type Buffer struct {
+ backend *Backend
+ size int
+ buffer C.CFTypeRef
+
+ // store is the buffer contents For buffers not allocated on the GPU.
+ store []byte
+}
+
+const (
+ uniformBufferIndex = 0
+ attributeBufferIndex = 1
+
+ spvBufferSizeConstantsBinding = 25
+)
+
+const (
+ texUnits = 4
+ bufferUnits = 4
+)
+
+func init() {
+ driver.NewMetalDevice = newMetalDevice
+}
+
+func newMetalDevice(api driver.Metal) (driver.Device, error) {
+ dev := C.CFTypeRef(api.Device)
+ C.CFRetain(dev)
+ queue := C.CFTypeRef(api.Queue)
+ C.CFRetain(queue)
+ b := &Backend{
+ dev: dev,
+ queue: queue,
+ pixelFmt: C.MTLPixelFormat(api.PixelFormat),
+ bufSizes: make([]uint32, bufferUnits),
+ }
+ return b, nil
+}
+
+func (b *Backend) BeginFrame(target driver.RenderTarget, clear bool, viewport image.Point) driver.Texture {
+ if b.lastCmdBuffer != 0 {
+ C.cmdBufferWaitUntilCompleted(b.lastCmdBuffer)
+ b.stagingOff = 0
+ }
+ if target == nil {
+ return nil
+ }
+ switch t := target.(type) {
+ case driver.MetalRenderTarget:
+ texture := C.CFTypeRef(t.Texture)
+ return &Texture{texture: texture, foreign: true}
+ case *Texture:
+ return t
+ default:
+ panic(fmt.Sprintf("metal: unsupported render target type: %T", t))
+ }
+}
+
+func (b *Backend) startBlit() C.CFTypeRef {
+ if b.blitEnc != 0 {
+ return b.blitEnc
+ }
+ b.endEncoder()
+ b.ensureCmdBuffer()
+ b.blitEnc = C.cmdBufferBlitEncoder(b.cmdBuffer)
+ if b.blitEnc == 0 {
+ panic("metal: [MTLCommandBuffer blitCommandEncoder:] failed")
+ }
+ return b.blitEnc
+}
+
+func (b *Backend) CopyTexture(dst driver.Texture, dorig image.Point, src driver.Texture, srect image.Rectangle) {
+ enc := b.startBlit()
+ dstTex := dst.(*Texture).texture
+ srcTex := src.(*Texture).texture
+ ssz := srect.Size()
+ C.blitEncCopyFromTexture(
+ enc,
+ srcTex,
+ C.MTLOrigin{
+ x: C.NSUInteger(srect.Min.X),
+ y: C.NSUInteger(srect.Min.Y),
+ },
+ C.MTLSize{
+ width: C.NSUInteger(ssz.X),
+ height: C.NSUInteger(ssz.Y),
+ depth: 1,
+ },
+ dstTex,
+ C.MTLOrigin{
+ x: C.NSUInteger(dorig.X),
+ y: C.NSUInteger(dorig.Y),
+ },
+ )
+}
+
+func (b *Backend) EndFrame() {
+ b.endCmdBuffer(false)
+}
+
+func (b *Backend) endCmdBuffer(wait bool) {
+ b.endEncoder()
+ if b.cmdBuffer == 0 {
+ return
+ }
+ C.cmdBufferCommit(b.cmdBuffer)
+ if wait {
+ C.cmdBufferWaitUntilCompleted(b.cmdBuffer)
+ }
+ if b.lastCmdBuffer != 0 {
+ C.CFRelease(b.lastCmdBuffer)
+ }
+ b.lastCmdBuffer = b.cmdBuffer
+ b.cmdBuffer = 0
+}
+
+func (b *Backend) Caps() driver.Caps {
+ return driver.Caps{
+ MaxTextureSize: 8192,
+ Features: driver.FeatureSRGB | driver.FeatureCompute | driver.FeatureFloatRenderTargets,
+ }
+}
+
+func (b *Backend) NewTimer() driver.Timer {
+ panic("timers not supported")
+}
+
+func (b *Backend) IsTimeContinuous() bool {
+ panic("timers not supported")
+}
+
+func (b *Backend) Release() {
+ if b.cmdBuffer != 0 {
+ C.CFRelease(b.cmdBuffer)
+ }
+ if b.lastCmdBuffer != 0 {
+ C.CFRelease(b.lastCmdBuffer)
+ }
+ if b.stagingBuf != 0 {
+ C.CFRelease(b.stagingBuf)
+ }
+ C.CFRelease(b.queue)
+ C.CFRelease(b.dev)
+ *b = Backend{}
+}
+
+func (b *Backend) NewTexture(format driver.TextureFormat, width, height int, minFilter, magFilter driver.TextureFilter, bindings driver.BufferBinding) (driver.Texture, error) {
+ mformat := pixelFormatFor(format)
+ var usage C.MTLTextureUsage
+ if bindings&(driver.BufferBindingTexture|driver.BufferBindingShaderStorageRead) != 0 {
+ usage |= C.MTLTextureUsageShaderRead
+ }
+ if bindings&driver.BufferBindingFramebuffer != 0 {
+ usage |= C.MTLTextureUsageRenderTarget
+ }
+ if bindings&driver.BufferBindingShaderStorageWrite != 0 {
+ usage |= C.MTLTextureUsageShaderWrite
+ }
+ tex := C.newTexture(b.dev, C.NSUInteger(width), C.NSUInteger(height), mformat, usage)
+ if tex == 0 {
+ return nil, errors.New("metal: [MTLDevice newTextureWithDescriptor:] failed")
+ }
+ min := samplerFilterFor(minFilter)
+ max := samplerFilterFor(magFilter)
+ s := C.newSampler(b.dev, min, max)
+ if s == 0 {
+ C.CFRelease(tex)
+ return nil, errors.New("metal: [MTLDevice newSamplerStateWithDescriptor:] failed")
+ }
+ return &Texture{backend: b, texture: tex, sampler: s, width: width, height: height}, nil
+}
+
+func samplerFilterFor(f driver.TextureFilter) C.MTLSamplerMinMagFilter {
+ switch f {
+ case driver.FilterNearest:
+ return C.MTLSamplerMinMagFilterNearest
+ case driver.FilterLinear:
+ return C.MTLSamplerMinMagFilterLinear
+ default:
+ panic("invalid texture filter")
+ }
+}
+
+func (b *Backend) NewPipeline(desc driver.PipelineDesc) (driver.Pipeline, error) {
+ vsh, fsh := desc.VertexShader.(*Shader), desc.FragmentShader.(*Shader)
+ layout := desc.VertexLayout.Inputs
+ if got, exp := len(layout), len(vsh.inputs); got != exp {
+ return nil, fmt.Errorf("metal: number of input descriptors (%d) doesn't match number of inputs (%d)", got, exp)
+ }
+ formats := make([]C.MTLVertexFormat, len(layout))
+ offsets := make([]C.NSUInteger, len(layout))
+ for i, inp := range layout {
+ index := vsh.inputs[i].Location
+ formats[index] = vertFormatFor(vsh.inputs[i])
+ offsets[index] = C.NSUInteger(inp.Offset)
+ }
+ var (
+ fmtPtr *C.MTLVertexFormat
+ offPtr *C.NSUInteger
+ )
+ if len(layout) > 0 {
+ fmtPtr = &formats[0]
+ offPtr = &offsets[0]
+ }
+ srcFactor := blendFactorFor(desc.BlendDesc.SrcFactor)
+ dstFactor := blendFactorFor(desc.BlendDesc.DstFactor)
+ blend := C.int(0)
+ if desc.BlendDesc.Enable {
+ blend = 1
+ }
+ pf := b.pixelFmt
+ if f := desc.PixelFormat; f != driver.TextureFormatOutput {
+ pf = pixelFormatFor(f)
+ }
+ pipe := C.newRenderPipeline(
+ b.dev,
+ vsh.function,
+ fsh.function,
+ pf,
+ attributeBufferIndex,
+ C.NSUInteger(len(layout)), fmtPtr, offPtr,
+ C.NSUInteger(desc.VertexLayout.Stride),
+ blend, srcFactor, dstFactor,
+ 2, // Number of vertex buffers.
+ 1, // Number of fragment buffers.
+ )
+ if pipe == 0 {
+ return nil, errors.New("metal: pipeline construction failed")
+ }
+ return &Pipeline{pipeline: pipe, topology: primitiveFor(desc.Topology)}, nil
+}
+
+func dataTypeSize(d shader.DataType) int {
+ switch d {
+ case shader.DataTypeFloat:
+ return 4
+ default:
+ panic("unsupported data type")
+ }
+}
+
+func blendFactorFor(f driver.BlendFactor) C.MTLBlendFactor {
+ switch f {
+ case driver.BlendFactorZero:
+ return C.MTLBlendFactorZero
+ case driver.BlendFactorOne:
+ return C.MTLBlendFactorOne
+ case driver.BlendFactorOneMinusSrcAlpha:
+ return C.MTLBlendFactorOneMinusSourceAlpha
+ case driver.BlendFactorDstColor:
+ return C.MTLBlendFactorDestinationColor
+ default:
+ panic("unsupported blend factor")
+ }
+}
+
+func vertFormatFor(f shader.InputLocation) C.MTLVertexFormat {
+ t := f.Type
+ s := f.Size
+ switch {
+ case t == shader.DataTypeFloat && s == 1:
+ return C.MTLVertexFormatFloat
+ case t == shader.DataTypeFloat && s == 2:
+ return C.MTLVertexFormatFloat2
+ case t == shader.DataTypeFloat && s == 3:
+ return C.MTLVertexFormatFloat3
+ case t == shader.DataTypeFloat && s == 4:
+ return C.MTLVertexFormatFloat4
+ default:
+ panic("unsupported data type")
+ }
+}
+
+func pixelFormatFor(f driver.TextureFormat) C.MTLPixelFormat {
+ switch f {
+ case driver.TextureFormatFloat:
+ return C.MTLPixelFormatR16Float
+ case driver.TextureFormatRGBA8:
+ return C.MTLPixelFormatRGBA8Unorm
+ case driver.TextureFormatSRGBA:
+ return C.MTLPixelFormatRGBA8Unorm_sRGB
+ default:
+ panic("unsupported pixel format")
+ }
+}
+
+func (b *Backend) NewBuffer(typ driver.BufferBinding, size int) (driver.Buffer, error) {
+ // Transfer buffer contents in command encoders on every use for
+ // smaller buffers. The advantage is that buffer re-use during a frame
+ // won't occur a GPU wait.
+ // We can't do this for buffers written to by the GPU and read by the client,
+ // and Metal doesn't require a buffer for indexed draws.
+ if size <= 4096 && typ&(driver.BufferBindingShaderStorageWrite|driver.BufferBindingIndices) == 0 {
+ return &Buffer{size: size, store: make([]byte, size)}, nil
+ }
+ buf := C.newBuffer(b.dev, C.NSUInteger(size), C.MTLResourceStorageModePrivate)
+ return &Buffer{backend: b, size: size, buffer: buf}, nil
+}
+
+func (b *Backend) NewImmutableBuffer(typ driver.BufferBinding, data []byte) (driver.Buffer, error) {
+ buf, err := b.NewBuffer(typ, len(data))
+ if err != nil {
+ return nil, err
+ }
+ buf.Upload(data)
+ return buf, nil
+}
+
+func (b *Backend) NewComputeProgram(src shader.Sources) (driver.Program, error) {
+ sh, err := b.newShader(src)
+ if err != nil {
+ return nil, err
+ }
+ defer sh.Release()
+ pipe := C.newComputePipeline(b.dev, sh.function)
+ if pipe == 0 {
+ return nil, fmt.Errorf("metal: compute program %q load failed", src.Name)
+ }
+ return &Program{pipeline: pipe, groupSize: src.WorkgroupSize}, nil
+}
+
+func (b *Backend) NewVertexShader(src shader.Sources) (driver.VertexShader, error) {
+ return b.newShader(src)
+}
+
+func (b *Backend) NewFragmentShader(src shader.Sources) (driver.FragmentShader, error) {
+ return b.newShader(src)
+}
+
+func (b *Backend) newShader(src shader.Sources) (*Shader, error) {
+ vsrc := []byte(src.MetalLib)
+ cname := C.CString(src.Name)
+ defer C.free(unsafe.Pointer(cname))
+ vlib := C.newLibrary(b.dev, cname, unsafe.Pointer(&vsrc[0]), C.size_t(len(vsrc)))
+ if vlib == 0 {
+ return nil, fmt.Errorf("metal: vertex shader %q load failed", src.Name)
+ }
+ defer C.CFRelease(vlib)
+ funcName := C.CString("main0")
+ defer C.free(unsafe.Pointer(funcName))
+ f := C.libraryNewFunction(vlib, funcName)
+ if f == 0 {
+ return nil, fmt.Errorf("metal: main function not found in %q", src.Name)
+ }
+ return &Shader{function: f, inputs: src.Inputs}, nil
+}
+
+func (b *Backend) Viewport(x, y, width, height int) {
+ enc := b.renderEnc
+ if enc == 0 {
+ panic("no active render pass")
+ }
+ C.renderEncViewport(enc, C.MTLViewport{
+ originX: C.double(x),
+ originY: C.double(y),
+ width: C.double(width),
+ height: C.double(height),
+ znear: 0.0,
+ zfar: 1.0,
+ })
+}
+
+func (b *Backend) DrawArrays(off, count int) {
+ enc := b.renderEnc
+ if enc == 0 {
+ panic("no active render pass")
+ }
+ C.renderEncDrawPrimitives(enc, b.topology, C.NSUInteger(off), C.NSUInteger(count))
+}
+
+func (b *Backend) DrawElements(off, count int) {
+ enc := b.renderEnc
+ if enc == 0 {
+ panic("no active render pass")
+ }
+ C.renderEncDrawIndexedPrimitives(enc, b.topology, b.indexBuf.buffer, C.NSUInteger(off), C.NSUInteger(count))
+}
+
+func primitiveFor(mode driver.Topology) C.MTLPrimitiveType {
+ switch mode {
+ case driver.TopologyTriangles:
+ return C.MTLPrimitiveTypeTriangle
+ case driver.TopologyTriangleStrip:
+ return C.MTLPrimitiveTypeTriangleStrip
+ default:
+ panic("metal: unknown draw mode")
+ }
+}
+
+func (b *Backend) BindImageTexture(unit int, tex driver.Texture) {
+ b.BindTexture(unit, tex)
+}
+
+func (b *Backend) BeginCompute() {
+ b.endEncoder()
+ b.ensureCmdBuffer()
+ for i := range b.bufSizes {
+ b.bufSizes[i] = 0
+ }
+ b.computeEnc = C.cmdBufferComputeEncoder(b.cmdBuffer)
+ if b.computeEnc == 0 {
+ panic("metal: [MTLCommandBuffer computeCommandEncoder:] failed")
+ }
+}
+
+func (b *Backend) EndCompute() {
+ if b.computeEnc == 0 {
+ panic("no active compute pass")
+ }
+ C.computeEncEnd(b.computeEnc)
+ C.CFRelease(b.computeEnc)
+ b.computeEnc = 0
+}
+
+func (b *Backend) DispatchCompute(x, y, z int) {
+ enc := b.computeEnc
+ if enc == 0 {
+ panic("no active compute pass")
+ }
+ C.computeEncSetBytes(enc, unsafe.Pointer(&b.bufSizes[0]), C.NSUInteger(len(b.bufSizes)*4), spvBufferSizeConstantsBinding)
+ threadgroupsPerGrid := C.MTLSize{
+ width: C.NSUInteger(x), height: C.NSUInteger(y), depth: C.NSUInteger(z),
+ }
+ sz := b.prog.groupSize
+ threadsPerThreadgroup := C.MTLSize{
+ width: C.NSUInteger(sz[0]), height: C.NSUInteger(sz[1]), depth: C.NSUInteger(sz[2]),
+ }
+ C.computeEncDispatch(enc, threadgroupsPerGrid, threadsPerThreadgroup)
+}
+
+func (b *Backend) stagingBuffer(size int) (C.CFTypeRef, int) {
+ if b.stagingBuf == 0 || b.stagingOff+size > len(bufferStore(b.stagingBuf)) {
+ if b.stagingBuf != 0 {
+ C.CFRelease(b.stagingBuf)
+ }
+ cap := 2 * (b.stagingOff + size)
+ b.stagingBuf = C.newBuffer(b.dev, C.NSUInteger(cap), C.MTLResourceStorageModeShared|C.MTLResourceCPUCacheModeWriteCombined)
+ if b.stagingBuf == 0 {
+ panic(fmt.Errorf("metal: failed to allocate %d bytes of staging buffer", cap))
+ }
+ b.stagingOff = 0
+ }
+ off := b.stagingOff
+ b.stagingOff += size
+ return b.stagingBuf, off
+}
+
+func (t *Texture) Upload(offset, size image.Point, pixels []byte, stride int) {
+ if len(pixels) == 0 {
+ return
+ }
+ if stride == 0 {
+ stride = size.X * 4
+ }
+ dstStride := size.X * 4
+ n := size.Y * dstStride
+ buf, off := t.backend.stagingBuffer(n)
+ store := bufferSlice(buf, off, n)
+ var srcOff, dstOff int
+ for y := 0; y < size.Y; y++ {
+ srcRow := pixels[srcOff : srcOff+dstStride]
+ dstRow := store[dstOff : dstOff+dstStride]
+ copy(dstRow, srcRow)
+ dstOff += dstStride
+ srcOff += stride
+ }
+ enc := t.backend.startBlit()
+ orig := C.MTLOrigin{
+ x: C.NSUInteger(offset.X),
+ y: C.NSUInteger(offset.Y),
+ }
+ msize := C.MTLSize{
+ width: C.NSUInteger(size.X),
+ height: C.NSUInteger(size.Y),
+ depth: 1,
+ }
+ C.blitEncCopyBufferToTexture(enc, buf, t.texture, C.NSUInteger(off), C.NSUInteger(dstStride), C.NSUInteger(len(store)), msize, orig)
+}
+
+func (t *Texture) Release() {
+ if t.foreign {
+ panic("metal: release of external texture")
+ }
+ C.CFRelease(t.texture)
+ C.CFRelease(t.sampler)
+ *t = Texture{}
+}
+
+func (p *Pipeline) Release() {
+ C.CFRelease(p.pipeline)
+ *p = Pipeline{}
+}
+
+func (b *Backend) PrepareTexture(tex driver.Texture) {}
+
+func (b *Backend) BindTexture(unit int, tex driver.Texture) {
+ t := tex.(*Texture)
+ if enc := b.renderEnc; enc != 0 {
+ C.renderEncSetFragmentTexture(enc, C.NSUInteger(unit), t.texture)
+ C.renderEncSetFragmentSamplerState(enc, C.NSUInteger(unit), t.sampler)
+ } else if enc := b.computeEnc; enc != 0 {
+ C.computeEncSetTexture(enc, C.NSUInteger(unit), t.texture)
+ } else {
+ panic("no active render nor compute pass")
+ }
+}
+
+func (b *Backend) ensureCmdBuffer() {
+ if b.cmdBuffer != 0 {
+ return
+ }
+ b.cmdBuffer = C.queueNewBuffer(b.queue)
+ if b.cmdBuffer == 0 {
+ panic("metal: [MTLCommandQueue cmdBuffer] failed")
+ }
+}
+
+func (b *Backend) BindPipeline(pipe driver.Pipeline) {
+ p := pipe.(*Pipeline)
+ enc := b.renderEnc
+ if enc == 0 {
+ panic("no active render pass")
+ }
+ C.renderEncSetRenderPipelineState(enc, p.pipeline)
+ b.topology = p.topology
+}
+
+func (b *Backend) BindProgram(prog driver.Program) {
+ enc := b.computeEnc
+ if enc == 0 {
+ panic("no active compute pass")
+ }
+ p := prog.(*Program)
+ C.computeEncSetPipeline(enc, p.pipeline)
+ b.prog = p
+}
+
+func (s *Shader) Release() {
+ C.CFRelease(s.function)
+ *s = Shader{}
+}
+
+func (p *Program) Release() {
+ C.CFRelease(p.pipeline)
+ *p = Program{}
+}
+
+func (b *Backend) BindStorageBuffer(binding int, buffer driver.Buffer) {
+ buf := buffer.(*Buffer)
+ b.bufSizes[binding] = uint32(buf.size)
+ enc := b.computeEnc
+ if enc == 0 {
+ panic("no active compute pass")
+ }
+ if buf.buffer != 0 {
+ C.computeEncSetBuffer(enc, C.NSUInteger(binding), buf.buffer)
+ } else if buf.size > 0 {
+ C.computeEncSetBytes(enc, unsafe.Pointer(&buf.store[0]), C.NSUInteger(buf.size), C.NSUInteger(binding))
+ }
+}
+
+func (b *Backend) BindUniforms(buf driver.Buffer) {
+ bf := buf.(*Buffer)
+ enc := b.renderEnc
+ if enc == 0 {
+ panic("no active render pass")
+ }
+ if bf.buffer != 0 {
+ C.renderEncSetVertexBuffer(enc, bf.buffer, uniformBufferIndex, 0)
+ C.renderEncSetFragmentBuffer(enc, bf.buffer, uniformBufferIndex, 0)
+ } else if bf.size > 0 {
+ C.renderEncSetVertexBytes(enc, unsafe.Pointer(&bf.store[0]), C.NSUInteger(bf.size), uniformBufferIndex)
+ C.renderEncSetFragmentBytes(enc, unsafe.Pointer(&bf.store[0]), C.NSUInteger(bf.size), uniformBufferIndex)
+ }
+}
+
+func (b *Backend) BindVertexBuffer(buf driver.Buffer, offset int) {
+ bf := buf.(*Buffer)
+ enc := b.renderEnc
+ if enc == 0 {
+ panic("no active render pass")
+ }
+ if bf.buffer != 0 {
+ C.renderEncSetVertexBuffer(enc, bf.buffer, attributeBufferIndex, C.NSUInteger(offset))
+ } else if n := bf.size - offset; n > 0 {
+ C.renderEncSetVertexBytes(enc, unsafe.Pointer(&bf.store[offset]), C.NSUInteger(n), attributeBufferIndex)
+ }
+}
+
+func (b *Backend) BindIndexBuffer(buf driver.Buffer) {
+ b.indexBuf = buf.(*Buffer)
+}
+
+func (b *Buffer) Download(data []byte) error {
+ if len(data) > b.size {
+ panic(fmt.Errorf("len(data) (%d) larger than len(content) (%d)", len(data), b.size))
+ }
+ buf, off := b.backend.stagingBuffer(len(data))
+ enc := b.backend.startBlit()
+ C.blitEncCopyBufferToBuffer(enc, b.buffer, buf, 0, C.NSUInteger(off), C.NSUInteger(len(data)))
+ b.backend.endCmdBuffer(true)
+ store := bufferSlice(buf, off, len(data))
+ copy(data, store)
+ return nil
+}
+
+func (b *Buffer) Upload(data []byte) {
+ if len(data) > b.size {
+ panic(fmt.Errorf("len(data) (%d) larger than len(content) (%d)", len(data), b.size))
+ }
+ if b.buffer == 0 {
+ copy(b.store, data)
+ return
+ }
+ buf, off := b.backend.stagingBuffer(len(data))
+ store := bufferSlice(buf, off, len(data))
+ copy(store, data)
+ enc := b.backend.startBlit()
+ C.blitEncCopyBufferToBuffer(enc, buf, b.buffer, C.NSUInteger(off), 0, C.NSUInteger(len(store)))
+}
+
+func bufferStore(buf C.CFTypeRef) []byte {
+ contents := C.bufferContents(buf)
+ return (*(*[1 << 30]byte)(contents.addr))[:contents.size:contents.size]
+}
+
+func bufferSlice(buf C.CFTypeRef, off, len int) []byte {
+ store := bufferStore(buf)
+ return store[off : off+len]
+}
+
+func (b *Buffer) Release() {
+ if b.buffer != 0 {
+ C.CFRelease(b.buffer)
+ }
+ *b = Buffer{}
+}
+
+func (t *Texture) ReadPixels(src image.Rectangle, pixels []byte, stride int) error {
+ if len(pixels) == 0 {
+ return nil
+ }
+ sz := src.Size()
+ orig := C.MTLOrigin{
+ x: C.NSUInteger(src.Min.X),
+ y: C.NSUInteger(src.Min.Y),
+ }
+ msize := C.MTLSize{
+ width: C.NSUInteger(sz.X),
+ height: C.NSUInteger(sz.Y),
+ depth: 1,
+ }
+ stageStride := sz.X * 4
+ n := sz.Y * stageStride
+ buf, off := t.backend.stagingBuffer(n)
+ enc := t.backend.startBlit()
+ C.blitEncCopyTextureToBuffer(enc, t.texture, buf, C.NSUInteger(off), C.NSUInteger(stageStride), C.NSUInteger(n), msize, orig)
+ t.backend.endCmdBuffer(true)
+ store := bufferSlice(buf, off, n)
+ var srcOff, dstOff int
+ for y := 0; y < sz.Y; y++ {
+ dstRow := pixels[srcOff : srcOff+stageStride]
+ srcRow := store[dstOff : dstOff+stageStride]
+ copy(dstRow, srcRow)
+ dstOff += stageStride
+ srcOff += stride
+ }
+ return nil
+}
+
+func (b *Backend) BeginRenderPass(tex driver.Texture, d driver.LoadDesc) {
+ b.endEncoder()
+ b.ensureCmdBuffer()
+ f := tex.(*Texture)
+ col := d.ClearColor
+ var act C.MTLLoadAction
+ switch d.Action {
+ case driver.LoadActionKeep:
+ act = C.MTLLoadActionLoad
+ case driver.LoadActionClear:
+ act = C.MTLLoadActionClear
+ case driver.LoadActionInvalidate:
+ act = C.MTLLoadActionDontCare
+ }
+ b.renderEnc = C.cmdBufferRenderEncoder(b.cmdBuffer, f.texture, act, C.float(col.R), C.float(col.G), C.float(col.B), C.float(col.A))
+ if b.renderEnc == 0 {
+ panic("metal: [MTLCommandBuffer renderCommandEncoderWithDescriptor:] failed")
+ }
+}
+
+func (b *Backend) EndRenderPass() {
+ if b.renderEnc == 0 {
+ panic("no active render pass")
+ }
+ C.renderEncEnd(b.renderEnc)
+ C.CFRelease(b.renderEnc)
+ b.renderEnc = 0
+}
+
+func (b *Backend) endEncoder() {
+ if b.renderEnc != 0 {
+ panic("active render pass")
+ }
+ if b.computeEnc != 0 {
+ panic("active compute pass")
+ }
+ if b.blitEnc != 0 {
+ C.blitEncEnd(b.blitEnc)
+ C.CFRelease(b.blitEnc)
+ b.blitEnc = 0
+ }
+}
+
+func (f *Texture) ImplementsRenderTarget() {}
diff --git a/vendor/gioui.org/gpu/internal/opengl/opengl.go b/vendor/gioui.org/gpu/internal/opengl/opengl.go
new file mode 100644
index 0000000..ef89197
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/opengl/opengl.go
@@ -0,0 +1,1357 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package opengl
+
+import (
+ "errors"
+ "fmt"
+ "image"
+ "strings"
+ "time"
+ "unsafe"
+
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/internal/gl"
+ "gioui.org/shader"
+)
+
+// Backend implements driver.Device.
+type Backend struct {
+ funcs *gl.Functions
+
+ clear bool
+ glstate glState
+ state state
+ savedState glState
+ sharedCtx bool
+
+ glver [2]int
+ gles bool
+ feats driver.Caps
+ // floatTriple holds the settings for floating point
+ // textures.
+ floatTriple textureTriple
+ // Single channel alpha textures.
+ alphaTriple textureTriple
+ srgbaTriple textureTriple
+ storage [storageBindings]*buffer
+
+ outputFBO gl.Framebuffer
+ sRGBFBO *SRGBFBO
+
+ // vertArray is bound during a frame. We don't need it, but
+ // core desktop OpenGL profile 3.3 requires some array bound.
+ vertArray gl.VertexArray
+}
+
+// State tracking.
+type glState struct {
+ drawFBO gl.Framebuffer
+ readFBO gl.Framebuffer
+ renderBuf gl.Renderbuffer
+ vertAttribs [5]struct {
+ obj gl.Buffer
+ enabled bool
+ size int
+ typ gl.Enum
+ normalized bool
+ stride int
+ offset uintptr
+ }
+ prog gl.Program
+ texUnits struct {
+ active gl.Enum
+ binds [2]gl.Texture
+ }
+ arrayBuf gl.Buffer
+ elemBuf gl.Buffer
+ uniBuf gl.Buffer
+ uniBufs [2]gl.Buffer
+ storeBuf gl.Buffer
+ storeBufs [4]gl.Buffer
+ vertArray gl.VertexArray
+ srgb bool
+ blend struct {
+ enable bool
+ srcRGB, dstRGB gl.Enum
+ srcA, dstA gl.Enum
+ }
+ clearColor [4]float32
+ viewport [4]int
+ unpack_row_length int
+ pack_row_length int
+}
+
+type state struct {
+ pipeline *pipeline
+ buffer bufferBinding
+}
+
+type bufferBinding struct {
+ obj gl.Buffer
+ offset int
+}
+
+type timer struct {
+ funcs *gl.Functions
+ obj gl.Query
+}
+
+type texture struct {
+ backend *Backend
+ obj gl.Texture
+ fbo gl.Framebuffer
+ hasFBO bool
+ triple textureTriple
+ width int
+ height int
+ bindings driver.BufferBinding
+ foreign bool
+}
+
+type pipeline struct {
+ prog *program
+ inputs []shader.InputLocation
+ layout driver.VertexLayout
+ blend driver.BlendDesc
+ topology driver.Topology
+}
+
+type buffer struct {
+ backend *Backend
+ hasBuffer bool
+ obj gl.Buffer
+ typ driver.BufferBinding
+ size int
+ immutable bool
+ // For emulation of uniform buffers.
+ data []byte
+}
+
+type glshader struct {
+ backend *Backend
+ obj gl.Shader
+ src shader.Sources
+}
+
+type program struct {
+ backend *Backend
+ obj gl.Program
+ vertUniforms uniforms
+ fragUniforms uniforms
+}
+
+type uniforms struct {
+ locs []uniformLocation
+ size int
+}
+
+type uniformLocation struct {
+ uniform gl.Uniform
+ offset int
+ typ shader.DataType
+ size int
+}
+
+type inputLayout struct {
+ inputs []shader.InputLocation
+ layout []driver.InputDesc
+}
+
+// textureTriple holds the type settings for
+// a TexImage2D call.
+type textureTriple struct {
+ internalFormat gl.Enum
+ format gl.Enum
+ typ gl.Enum
+}
+
+const (
+ storageBindings = 32
+)
+
+func init() {
+ driver.NewOpenGLDevice = newOpenGLDevice
+}
+
+// Supporting compute programs is theoretically possible with OpenGL ES 3.1. In
+// practice, there are too many driver issues, especially on Android (e.g.
+// Google Pixel, Samsung J2 are both broken i different ways). Disable support
+// and rely on Vulkan for devices that support it, and the CPU fallback for
+// devices that don't.
+const brokenGLES31 = true
+
+func newOpenGLDevice(api driver.OpenGL) (driver.Device, error) {
+ f, err := gl.NewFunctions(api.Context, api.ES)
+ if err != nil {
+ return nil, err
+ }
+ exts := strings.Split(f.GetString(gl.EXTENSIONS), " ")
+ glVer := f.GetString(gl.VERSION)
+ ver, gles, err := gl.ParseGLVersion(glVer)
+ if err != nil {
+ return nil, err
+ }
+ floatTriple, ffboErr := floatTripleFor(f, ver, exts)
+ srgbaTriple, srgbErr := srgbaTripleFor(ver, exts)
+ gles31 := gles && (ver[0] > 3 || (ver[0] == 3 && ver[1] >= 1))
+ b := &Backend{
+ glver: ver,
+ gles: gles,
+ funcs: f,
+ floatTriple: floatTriple,
+ alphaTriple: alphaTripleFor(ver),
+ srgbaTriple: srgbaTriple,
+ sharedCtx: api.Shared,
+ }
+ b.feats.BottomLeftOrigin = true
+ if srgbErr == nil {
+ b.feats.Features |= driver.FeatureSRGB
+ }
+ if ffboErr == nil {
+ b.feats.Features |= driver.FeatureFloatRenderTargets
+ }
+ if gles31 && !brokenGLES31 {
+ b.feats.Features |= driver.FeatureCompute
+ }
+ if hasExtension(exts, "GL_EXT_disjoint_timer_query_webgl2") || hasExtension(exts, "GL_EXT_disjoint_timer_query") {
+ b.feats.Features |= driver.FeatureTimers
+ }
+ b.feats.MaxTextureSize = f.GetInteger(gl.MAX_TEXTURE_SIZE)
+ if !b.sharedCtx {
+ // We have exclusive access to the context, so query the GL state once
+ // instead of at each frame.
+ b.glstate = b.queryState()
+ }
+ return b, nil
+}
+
+func (b *Backend) BeginFrame(target driver.RenderTarget, clear bool, viewport image.Point) driver.Texture {
+ b.clear = clear
+ if b.sharedCtx {
+ b.glstate = b.queryState()
+ b.savedState = b.glstate
+ }
+ b.state = state{}
+ var renderFBO gl.Framebuffer
+ if target != nil {
+ switch t := target.(type) {
+ case driver.OpenGLRenderTarget:
+ renderFBO = gl.Framebuffer(t)
+ case *texture:
+ renderFBO = t.ensureFBO()
+ default:
+ panic(fmt.Errorf("opengl: invalid render target type: %T", target))
+ }
+ }
+ b.outputFBO = renderFBO
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, renderFBO)
+ if b.gles {
+ // If the output framebuffer is not in the sRGB colorspace already, emulate it.
+ var fbEncoding int
+ if !renderFBO.Valid() {
+ fbEncoding = b.funcs.GetFramebufferAttachmentParameteri(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING)
+ } else {
+ fbEncoding = b.funcs.GetFramebufferAttachmentParameteri(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING)
+ }
+ if fbEncoding == gl.LINEAR && viewport != (image.Point{}) {
+ if b.sRGBFBO == nil {
+ sfbo, err := NewSRGBFBO(b.funcs, &b.glstate)
+ if err != nil {
+ panic(err)
+ }
+ b.sRGBFBO = sfbo
+ }
+ if err := b.sRGBFBO.Refresh(viewport); err != nil {
+ panic(err)
+ }
+ renderFBO = b.sRGBFBO.Framebuffer()
+ } else if b.sRGBFBO != nil {
+ b.sRGBFBO.Release()
+ b.sRGBFBO = nil
+ }
+ } else {
+ b.glstate.set(b.funcs, gl.FRAMEBUFFER_SRGB, true)
+ if !b.vertArray.Valid() {
+ b.vertArray = b.funcs.CreateVertexArray()
+ }
+ b.glstate.bindVertexArray(b.funcs, b.vertArray)
+ }
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, renderFBO)
+ if b.sRGBFBO != nil && !clear {
+ b.clearOutput(0, 0, 0, 0)
+ }
+ return &texture{backend: b, fbo: renderFBO, hasFBO: true, foreign: true}
+}
+
+func (b *Backend) EndFrame() {
+ if b.sRGBFBO != nil {
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, b.outputFBO)
+ if b.clear {
+ b.SetBlend(false)
+ } else {
+ b.BlendFunc(driver.BlendFactorOne, driver.BlendFactorOneMinusSrcAlpha)
+ b.SetBlend(true)
+ }
+ b.sRGBFBO.Blit()
+ }
+ if b.sharedCtx {
+ b.restoreState(b.savedState)
+ }
+}
+
+func (b *Backend) queryState() glState {
+ s := glState{
+ prog: gl.Program(b.funcs.GetBinding(gl.CURRENT_PROGRAM)),
+ arrayBuf: gl.Buffer(b.funcs.GetBinding(gl.ARRAY_BUFFER_BINDING)),
+ elemBuf: gl.Buffer(b.funcs.GetBinding(gl.ELEMENT_ARRAY_BUFFER_BINDING)),
+ drawFBO: gl.Framebuffer(b.funcs.GetBinding(gl.FRAMEBUFFER_BINDING)),
+ clearColor: b.funcs.GetFloat4(gl.COLOR_CLEAR_VALUE),
+ viewport: b.funcs.GetInteger4(gl.VIEWPORT),
+ unpack_row_length: b.funcs.GetInteger(gl.UNPACK_ROW_LENGTH),
+ pack_row_length: b.funcs.GetInteger(gl.PACK_ROW_LENGTH),
+ }
+ s.blend.enable = b.funcs.IsEnabled(gl.BLEND)
+ s.blend.srcRGB = gl.Enum(b.funcs.GetInteger(gl.BLEND_SRC_RGB))
+ s.blend.dstRGB = gl.Enum(b.funcs.GetInteger(gl.BLEND_DST_RGB))
+ s.blend.srcA = gl.Enum(b.funcs.GetInteger(gl.BLEND_SRC_ALPHA))
+ s.blend.dstA = gl.Enum(b.funcs.GetInteger(gl.BLEND_DST_ALPHA))
+ s.texUnits.active = gl.Enum(b.funcs.GetInteger(gl.ACTIVE_TEXTURE))
+ if !b.gles {
+ s.srgb = b.funcs.IsEnabled(gl.FRAMEBUFFER_SRGB)
+ }
+ if !b.gles || b.glver[0] >= 3 {
+ s.vertArray = gl.VertexArray(b.funcs.GetBinding(gl.VERTEX_ARRAY_BINDING))
+ s.readFBO = gl.Framebuffer(b.funcs.GetBinding(gl.READ_FRAMEBUFFER_BINDING))
+ s.uniBuf = gl.Buffer(b.funcs.GetBinding(gl.UNIFORM_BUFFER_BINDING))
+ for i := range s.uniBufs {
+ s.uniBufs[i] = gl.Buffer(b.funcs.GetBindingi(gl.UNIFORM_BUFFER_BINDING, i))
+ }
+ }
+ if b.gles && (b.glver[0] > 3 || (b.glver[0] == 3 && b.glver[1] >= 1)) {
+ s.storeBuf = gl.Buffer(b.funcs.GetBinding(gl.SHADER_STORAGE_BUFFER_BINDING))
+ for i := range s.storeBufs {
+ s.storeBufs[i] = gl.Buffer(b.funcs.GetBindingi(gl.SHADER_STORAGE_BUFFER_BINDING, i))
+ }
+ }
+ for i := range s.texUnits.binds {
+ s.activeTexture(b.funcs, gl.TEXTURE0+gl.Enum(i))
+ s.texUnits.binds[i] = gl.Texture(b.funcs.GetBinding(gl.TEXTURE_BINDING_2D))
+ }
+ for i := range s.vertAttribs {
+ a := &s.vertAttribs[i]
+ a.enabled = b.funcs.GetVertexAttrib(i, gl.VERTEX_ATTRIB_ARRAY_ENABLED) != gl.FALSE
+ a.obj = gl.Buffer(b.funcs.GetVertexAttribBinding(i, gl.VERTEX_ATTRIB_ARRAY_ENABLED))
+ a.size = b.funcs.GetVertexAttrib(i, gl.VERTEX_ATTRIB_ARRAY_SIZE)
+ a.typ = gl.Enum(b.funcs.GetVertexAttrib(i, gl.VERTEX_ATTRIB_ARRAY_TYPE))
+ a.normalized = b.funcs.GetVertexAttrib(i, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED) != gl.FALSE
+ a.stride = b.funcs.GetVertexAttrib(i, gl.VERTEX_ATTRIB_ARRAY_STRIDE)
+ a.offset = b.funcs.GetVertexAttribPointer(i, gl.VERTEX_ATTRIB_ARRAY_POINTER)
+ }
+ return s
+}
+
+func (b *Backend) restoreState(dst glState) {
+ src := b.glstate
+ f := b.funcs
+ for i, unit := range dst.texUnits.binds {
+ src.bindTexture(f, i, unit)
+ }
+ src.activeTexture(f, dst.texUnits.active)
+ src.bindFramebuffer(f, gl.FRAMEBUFFER, dst.drawFBO)
+ src.bindFramebuffer(f, gl.READ_FRAMEBUFFER, dst.readFBO)
+ src.set(f, gl.BLEND, dst.blend.enable)
+ bf := dst.blend
+ src.setBlendFuncSeparate(f, bf.srcRGB, bf.dstRGB, bf.srcA, bf.dstA)
+ src.set(f, gl.FRAMEBUFFER_SRGB, dst.srgb)
+ src.bindVertexArray(f, dst.vertArray)
+ src.useProgram(f, dst.prog)
+ src.bindBuffer(f, gl.ELEMENT_ARRAY_BUFFER, dst.elemBuf)
+ for i, b := range dst.uniBufs {
+ src.bindBufferBase(f, gl.UNIFORM_BUFFER, i, b)
+ }
+ src.bindBuffer(f, gl.UNIFORM_BUFFER, dst.uniBuf)
+ for i, b := range dst.storeBufs {
+ src.bindBufferBase(f, gl.SHADER_STORAGE_BUFFER, i, b)
+ }
+ src.bindBuffer(f, gl.SHADER_STORAGE_BUFFER, dst.storeBuf)
+ col := dst.clearColor
+ src.setClearColor(f, col[0], col[1], col[2], col[3])
+ for i, attr := range dst.vertAttribs {
+ src.setVertexAttribArray(f, i, attr.enabled)
+ src.vertexAttribPointer(f, attr.obj, i, attr.size, attr.typ, attr.normalized, attr.stride, int(attr.offset))
+ }
+ src.bindBuffer(f, gl.ARRAY_BUFFER, dst.arrayBuf)
+ v := dst.viewport
+ src.setViewport(f, v[0], v[1], v[2], v[3])
+ src.pixelStorei(f, gl.UNPACK_ROW_LENGTH, dst.unpack_row_length)
+ src.pixelStorei(f, gl.PACK_ROW_LENGTH, dst.pack_row_length)
+}
+
+func (s *glState) setVertexAttribArray(f *gl.Functions, idx int, enabled bool) {
+ a := &s.vertAttribs[idx]
+ if enabled != a.enabled {
+ if enabled {
+ f.EnableVertexAttribArray(gl.Attrib(idx))
+ } else {
+ f.DisableVertexAttribArray(gl.Attrib(idx))
+ }
+ a.enabled = enabled
+ }
+}
+
+func (s *glState) vertexAttribPointer(f *gl.Functions, buf gl.Buffer, idx, size int, typ gl.Enum, normalized bool, stride, offset int) {
+ s.bindBuffer(f, gl.ARRAY_BUFFER, buf)
+ a := &s.vertAttribs[idx]
+ a.obj = buf
+ a.size = size
+ a.typ = typ
+ a.normalized = normalized
+ a.stride = stride
+ a.offset = uintptr(offset)
+ f.VertexAttribPointer(gl.Attrib(idx), a.size, a.typ, a.normalized, a.stride, int(a.offset))
+}
+
+func (s *glState) activeTexture(f *gl.Functions, unit gl.Enum) {
+ if unit != s.texUnits.active {
+ f.ActiveTexture(unit)
+ s.texUnits.active = unit
+ }
+}
+
+func (s *glState) bindRenderbuffer(f *gl.Functions, target gl.Enum, r gl.Renderbuffer) {
+ if !r.Equal(s.renderBuf) {
+ f.BindRenderbuffer(gl.RENDERBUFFER, r)
+ s.renderBuf = r
+ }
+}
+
+func (s *glState) bindTexture(f *gl.Functions, unit int, t gl.Texture) {
+ s.activeTexture(f, gl.TEXTURE0+gl.Enum(unit))
+ if !t.Equal(s.texUnits.binds[unit]) {
+ f.BindTexture(gl.TEXTURE_2D, t)
+ s.texUnits.binds[unit] = t
+ }
+}
+
+func (s *glState) bindVertexArray(f *gl.Functions, a gl.VertexArray) {
+ if !a.Equal(s.vertArray) {
+ f.BindVertexArray(a)
+ s.vertArray = a
+ }
+}
+
+func (s *glState) deleteRenderbuffer(f *gl.Functions, r gl.Renderbuffer) {
+ f.DeleteRenderbuffer(r)
+ if r.Equal(s.renderBuf) {
+ s.renderBuf = gl.Renderbuffer{}
+ }
+}
+
+func (s *glState) deleteFramebuffer(f *gl.Functions, fbo gl.Framebuffer) {
+ f.DeleteFramebuffer(fbo)
+ if fbo.Equal(s.drawFBO) {
+ s.drawFBO = gl.Framebuffer{}
+ }
+ if fbo.Equal(s.readFBO) {
+ s.readFBO = gl.Framebuffer{}
+ }
+}
+
+func (s *glState) deleteBuffer(f *gl.Functions, b gl.Buffer) {
+ f.DeleteBuffer(b)
+ if b.Equal(s.arrayBuf) {
+ s.arrayBuf = gl.Buffer{}
+ }
+ if b.Equal(s.elemBuf) {
+ s.elemBuf = gl.Buffer{}
+ }
+ if b.Equal(s.uniBuf) {
+ s.uniBuf = gl.Buffer{}
+ }
+ if b.Equal(s.storeBuf) {
+ s.uniBuf = gl.Buffer{}
+ }
+ for i, b2 := range s.storeBufs {
+ if b.Equal(b2) {
+ s.storeBufs[i] = gl.Buffer{}
+ }
+ }
+ for i, b2 := range s.uniBufs {
+ if b.Equal(b2) {
+ s.uniBufs[i] = gl.Buffer{}
+ }
+ }
+}
+
+func (s *glState) deleteProgram(f *gl.Functions, p gl.Program) {
+ f.DeleteProgram(p)
+ if p.Equal(s.prog) {
+ s.prog = gl.Program{}
+ }
+}
+
+func (s *glState) deleteVertexArray(f *gl.Functions, a gl.VertexArray) {
+ f.DeleteVertexArray(a)
+ if a.Equal(s.vertArray) {
+ s.vertArray = gl.VertexArray{}
+ }
+}
+
+func (s *glState) deleteTexture(f *gl.Functions, t gl.Texture) {
+ f.DeleteTexture(t)
+ binds := &s.texUnits.binds
+ for i, obj := range binds {
+ if t.Equal(obj) {
+ binds[i] = gl.Texture{}
+ }
+ }
+}
+
+func (s *glState) useProgram(f *gl.Functions, p gl.Program) {
+ if !p.Equal(s.prog) {
+ f.UseProgram(p)
+ s.prog = p
+ }
+}
+
+func (s *glState) bindFramebuffer(f *gl.Functions, target gl.Enum, fbo gl.Framebuffer) {
+ switch target {
+ case gl.FRAMEBUFFER:
+ if fbo.Equal(s.drawFBO) && fbo.Equal(s.readFBO) {
+ return
+ }
+ s.drawFBO = fbo
+ s.readFBO = fbo
+ case gl.READ_FRAMEBUFFER:
+ if fbo.Equal(s.readFBO) {
+ return
+ }
+ s.readFBO = fbo
+ case gl.DRAW_FRAMEBUFFER:
+ if fbo.Equal(s.drawFBO) {
+ return
+ }
+ s.drawFBO = fbo
+ default:
+ panic("unknown target")
+ }
+ f.BindFramebuffer(target, fbo)
+}
+
+func (s *glState) bindBufferBase(f *gl.Functions, target gl.Enum, idx int, buf gl.Buffer) {
+ switch target {
+ case gl.UNIFORM_BUFFER:
+ if buf.Equal(s.uniBuf) && buf.Equal(s.uniBufs[idx]) {
+ return
+ }
+ s.uniBuf = buf
+ s.uniBufs[idx] = buf
+ case gl.SHADER_STORAGE_BUFFER:
+ if buf.Equal(s.storeBuf) && buf.Equal(s.storeBufs[idx]) {
+ return
+ }
+ s.storeBuf = buf
+ s.storeBufs[idx] = buf
+ default:
+ panic("unknown buffer target")
+ }
+ f.BindBufferBase(target, idx, buf)
+}
+
+func (s *glState) bindBuffer(f *gl.Functions, target gl.Enum, buf gl.Buffer) {
+ switch target {
+ case gl.ARRAY_BUFFER:
+ if buf.Equal(s.arrayBuf) {
+ return
+ }
+ s.arrayBuf = buf
+ case gl.ELEMENT_ARRAY_BUFFER:
+ if buf.Equal(s.elemBuf) {
+ return
+ }
+ s.elemBuf = buf
+ case gl.UNIFORM_BUFFER:
+ if buf.Equal(s.uniBuf) {
+ return
+ }
+ s.uniBuf = buf
+ case gl.SHADER_STORAGE_BUFFER:
+ if buf.Equal(s.storeBuf) {
+ return
+ }
+ s.storeBuf = buf
+ default:
+ panic("unknown buffer target")
+ }
+ f.BindBuffer(target, buf)
+}
+
+func (s *glState) pixelStorei(f *gl.Functions, pname gl.Enum, val int) {
+ switch pname {
+ case gl.UNPACK_ROW_LENGTH:
+ if val == s.unpack_row_length {
+ return
+ }
+ s.unpack_row_length = val
+ case gl.PACK_ROW_LENGTH:
+ if val == s.pack_row_length {
+ return
+ }
+ s.pack_row_length = val
+ default:
+ panic("unsupported PixelStorei pname")
+ }
+ f.PixelStorei(pname, val)
+}
+
+func (s *glState) setClearColor(f *gl.Functions, r, g, b, a float32) {
+ col := [4]float32{r, g, b, a}
+ if col != s.clearColor {
+ f.ClearColor(r, g, b, a)
+ s.clearColor = col
+ }
+}
+
+func (s *glState) setViewport(f *gl.Functions, x, y, width, height int) {
+ view := [4]int{x, y, width, height}
+ if view != s.viewport {
+ f.Viewport(x, y, width, height)
+ s.viewport = view
+ }
+}
+
+func (s *glState) setBlendFuncSeparate(f *gl.Functions, srcRGB, dstRGB, srcA, dstA gl.Enum) {
+ if srcRGB != s.blend.srcRGB || dstRGB != s.blend.dstRGB || srcA != s.blend.srcA || dstA != s.blend.dstA {
+ s.blend.srcRGB = srcRGB
+ s.blend.dstRGB = dstRGB
+ s.blend.srcA = srcA
+ s.blend.dstA = dstA
+ f.BlendFuncSeparate(srcA, dstA, srcA, dstA)
+ }
+}
+
+func (s *glState) set(f *gl.Functions, target gl.Enum, enable bool) {
+ switch target {
+ case gl.FRAMEBUFFER_SRGB:
+ if s.srgb == enable {
+ return
+ }
+ s.srgb = enable
+ case gl.BLEND:
+ if enable == s.blend.enable {
+ return
+ }
+ s.blend.enable = enable
+ default:
+ panic("unknown enable")
+ }
+ if enable {
+ f.Enable(target)
+ } else {
+ f.Disable(target)
+ }
+}
+
+func (b *Backend) Caps() driver.Caps {
+ return b.feats
+}
+
+func (b *Backend) NewTimer() driver.Timer {
+ return &timer{
+ funcs: b.funcs,
+ obj: b.funcs.CreateQuery(),
+ }
+}
+
+func (b *Backend) IsTimeContinuous() bool {
+ return b.funcs.GetInteger(gl.GPU_DISJOINT_EXT) == gl.FALSE
+}
+
+func (t *texture) ensureFBO() gl.Framebuffer {
+ if t.hasFBO {
+ return t.fbo
+ }
+ b := t.backend
+ oldFBO := b.glstate.drawFBO
+ defer func() {
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, oldFBO)
+ }()
+ glErr(b.funcs)
+ fb := b.funcs.CreateFramebuffer()
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, fb)
+ if err := glErr(b.funcs); err != nil {
+ b.funcs.DeleteFramebuffer(fb)
+ panic(err)
+ }
+ b.funcs.FramebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, t.obj, 0)
+ if st := b.funcs.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE {
+ b.funcs.DeleteFramebuffer(fb)
+ panic(fmt.Errorf("incomplete framebuffer, status = 0x%x, err = %d", st, b.funcs.GetError()))
+ }
+ t.fbo = fb
+ t.hasFBO = true
+ return fb
+}
+
+func (b *Backend) NewTexture(format driver.TextureFormat, width, height int, minFilter, magFilter driver.TextureFilter, binding driver.BufferBinding) (driver.Texture, error) {
+ glErr(b.funcs)
+ tex := &texture{backend: b, obj: b.funcs.CreateTexture(), width: width, height: height, bindings: binding}
+ switch format {
+ case driver.TextureFormatFloat:
+ tex.triple = b.floatTriple
+ case driver.TextureFormatSRGBA:
+ tex.triple = b.srgbaTriple
+ case driver.TextureFormatRGBA8:
+ tex.triple = textureTriple{gl.RGBA8, gl.RGBA, gl.UNSIGNED_BYTE}
+ default:
+ return nil, errors.New("unsupported texture format")
+ }
+ b.BindTexture(0, tex)
+ b.funcs.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, toTexFilter(magFilter))
+ b.funcs.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, toTexFilter(minFilter))
+ b.funcs.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)
+ b.funcs.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)
+ if b.gles && b.glver[0] >= 3 {
+ // Immutable textures are required for BindImageTexture, and can't hurt otherwise.
+ b.funcs.TexStorage2D(gl.TEXTURE_2D, 1, tex.triple.internalFormat, width, height)
+ } else {
+ b.funcs.TexImage2D(gl.TEXTURE_2D, 0, tex.triple.internalFormat, width, height, tex.triple.format, tex.triple.typ)
+ }
+ if err := glErr(b.funcs); err != nil {
+ tex.Release()
+ return nil, err
+ }
+ return tex, nil
+}
+
+func (b *Backend) NewBuffer(typ driver.BufferBinding, size int) (driver.Buffer, error) {
+ glErr(b.funcs)
+ buf := &buffer{backend: b, typ: typ, size: size}
+ if typ&driver.BufferBindingUniforms != 0 {
+ if typ != driver.BufferBindingUniforms {
+ return nil, errors.New("uniforms buffers cannot be bound as anything else")
+ }
+ buf.data = make([]byte, size)
+ }
+ if typ&^driver.BufferBindingUniforms != 0 {
+ buf.hasBuffer = true
+ buf.obj = b.funcs.CreateBuffer()
+ if err := glErr(b.funcs); err != nil {
+ buf.Release()
+ return nil, err
+ }
+ firstBinding := firstBufferType(typ)
+ b.glstate.bindBuffer(b.funcs, firstBinding, buf.obj)
+ b.funcs.BufferData(firstBinding, size, gl.DYNAMIC_DRAW, nil)
+ }
+ return buf, nil
+}
+
+func (b *Backend) NewImmutableBuffer(typ driver.BufferBinding, data []byte) (driver.Buffer, error) {
+ glErr(b.funcs)
+ obj := b.funcs.CreateBuffer()
+ buf := &buffer{backend: b, obj: obj, typ: typ, size: len(data), hasBuffer: true}
+ firstBinding := firstBufferType(typ)
+ b.glstate.bindBuffer(b.funcs, firstBinding, buf.obj)
+ b.funcs.BufferData(firstBinding, len(data), gl.STATIC_DRAW, data)
+ buf.immutable = true
+ if err := glErr(b.funcs); err != nil {
+ buf.Release()
+ return nil, err
+ }
+ return buf, nil
+}
+
+func glErr(f *gl.Functions) error {
+ if st := f.GetError(); st != gl.NO_ERROR {
+ return fmt.Errorf("glGetError: %#x", st)
+ }
+ return nil
+}
+
+func (b *Backend) Release() {
+ if b.sRGBFBO != nil {
+ b.sRGBFBO.Release()
+ }
+ if b.vertArray.Valid() {
+ b.glstate.deleteVertexArray(b.funcs, b.vertArray)
+ }
+ *b = Backend{}
+}
+
+func (b *Backend) DispatchCompute(x, y, z int) {
+ for binding, buf := range b.storage {
+ if buf != nil {
+ b.glstate.bindBufferBase(b.funcs, gl.SHADER_STORAGE_BUFFER, binding, buf.obj)
+ }
+ }
+ b.funcs.DispatchCompute(x, y, z)
+ b.funcs.MemoryBarrier(gl.ALL_BARRIER_BITS)
+}
+
+func (b *Backend) BindImageTexture(unit int, tex driver.Texture) {
+ t := tex.(*texture)
+ var acc gl.Enum
+ switch t.bindings & (driver.BufferBindingShaderStorageRead | driver.BufferBindingShaderStorageWrite) {
+ case driver.BufferBindingShaderStorageRead:
+ acc = gl.READ_ONLY
+ case driver.BufferBindingShaderStorageWrite:
+ acc = gl.WRITE_ONLY
+ case driver.BufferBindingShaderStorageRead | driver.BufferBindingShaderStorageWrite:
+ acc = gl.READ_WRITE
+ default:
+ panic("unsupported access bits")
+ }
+ b.funcs.BindImageTexture(unit, t.obj, 0, false, 0, acc, t.triple.internalFormat)
+}
+
+func (b *Backend) BlendFunc(sfactor, dfactor driver.BlendFactor) {
+ src, dst := toGLBlendFactor(sfactor), toGLBlendFactor(dfactor)
+ b.glstate.setBlendFuncSeparate(b.funcs, src, dst, src, dst)
+}
+
+func toGLBlendFactor(f driver.BlendFactor) gl.Enum {
+ switch f {
+ case driver.BlendFactorOne:
+ return gl.ONE
+ case driver.BlendFactorOneMinusSrcAlpha:
+ return gl.ONE_MINUS_SRC_ALPHA
+ case driver.BlendFactorZero:
+ return gl.ZERO
+ case driver.BlendFactorDstColor:
+ return gl.DST_COLOR
+ default:
+ panic("unsupported blend factor")
+ }
+}
+
+func (b *Backend) SetBlend(enable bool) {
+ b.glstate.set(b.funcs, gl.BLEND, enable)
+}
+
+func (b *Backend) DrawElements(off, count int) {
+ b.prepareDraw()
+ // off is in 16-bit indices, but DrawElements take a byte offset.
+ byteOff := off * 2
+ b.funcs.DrawElements(toGLDrawMode(b.state.pipeline.topology), count, gl.UNSIGNED_SHORT, byteOff)
+}
+
+func (b *Backend) DrawArrays(off, count int) {
+ b.prepareDraw()
+ b.funcs.DrawArrays(toGLDrawMode(b.state.pipeline.topology), off, count)
+}
+
+func (b *Backend) prepareDraw() {
+ p := b.state.pipeline
+ if p == nil {
+ return
+ }
+ b.setupVertexArrays()
+}
+
+func toGLDrawMode(mode driver.Topology) gl.Enum {
+ switch mode {
+ case driver.TopologyTriangleStrip:
+ return gl.TRIANGLE_STRIP
+ case driver.TopologyTriangles:
+ return gl.TRIANGLES
+ default:
+ panic("unsupported draw mode")
+ }
+}
+
+func (b *Backend) Viewport(x, y, width, height int) {
+ b.glstate.setViewport(b.funcs, x, y, width, height)
+}
+
+func (b *Backend) clearOutput(colR, colG, colB, colA float32) {
+ b.glstate.setClearColor(b.funcs, colR, colG, colB, colA)
+ b.funcs.Clear(gl.COLOR_BUFFER_BIT)
+}
+
+func (b *Backend) NewComputeProgram(src shader.Sources) (driver.Program, error) {
+ // We don't support ES 3.1 compute, see brokenGLES31 above.
+ const GLES31Source = ""
+ p, err := gl.CreateComputeProgram(b.funcs, GLES31Source)
+ if err != nil {
+ return nil, fmt.Errorf("%s: %v", src.Name, err)
+ }
+ return &program{
+ backend: b,
+ obj: p,
+ }, nil
+}
+
+func (b *Backend) NewVertexShader(src shader.Sources) (driver.VertexShader, error) {
+ glslSrc := b.glslFor(src)
+ sh, err := gl.CreateShader(b.funcs, gl.VERTEX_SHADER, glslSrc)
+ return &glshader{backend: b, obj: sh, src: src}, err
+}
+
+func (b *Backend) NewFragmentShader(src shader.Sources) (driver.FragmentShader, error) {
+ glslSrc := b.glslFor(src)
+ sh, err := gl.CreateShader(b.funcs, gl.FRAGMENT_SHADER, glslSrc)
+ return &glshader{backend: b, obj: sh, src: src}, err
+}
+
+func (b *Backend) glslFor(src shader.Sources) string {
+ if b.gles {
+ return src.GLSL100ES
+ } else {
+ return src.GLSL150
+ }
+}
+
+func (b *Backend) NewPipeline(desc driver.PipelineDesc) (driver.Pipeline, error) {
+ p, err := b.newProgram(desc)
+ if err != nil {
+ return nil, err
+ }
+ layout := desc.VertexLayout
+ vsrc := desc.VertexShader.(*glshader).src
+ if len(vsrc.Inputs) != len(layout.Inputs) {
+ return nil, fmt.Errorf("opengl: got %d inputs, expected %d", len(layout.Inputs), len(vsrc.Inputs))
+ }
+ for i, inp := range vsrc.Inputs {
+ if exp, got := inp.Size, layout.Inputs[i].Size; exp != got {
+ return nil, fmt.Errorf("opengl: data size mismatch for %q: got %d expected %d", inp.Name, got, exp)
+ }
+ }
+ return &pipeline{
+ prog: p,
+ inputs: vsrc.Inputs,
+ layout: layout,
+ blend: desc.BlendDesc,
+ topology: desc.Topology,
+ }, nil
+}
+
+func (b *Backend) newProgram(desc driver.PipelineDesc) (*program, error) {
+ p := b.funcs.CreateProgram()
+ if !p.Valid() {
+ return nil, errors.New("opengl: glCreateProgram failed")
+ }
+ vsh, fsh := desc.VertexShader.(*glshader), desc.FragmentShader.(*glshader)
+ b.funcs.AttachShader(p, vsh.obj)
+ b.funcs.AttachShader(p, fsh.obj)
+ for _, inp := range vsh.src.Inputs {
+ b.funcs.BindAttribLocation(p, gl.Attrib(inp.Location), inp.Name)
+ }
+ b.funcs.LinkProgram(p)
+ if b.funcs.GetProgrami(p, gl.LINK_STATUS) == 0 {
+ log := b.funcs.GetProgramInfoLog(p)
+ b.funcs.DeleteProgram(p)
+ return nil, fmt.Errorf("opengl: program link failed: %s", strings.TrimSpace(log))
+ }
+ prog := &program{
+ backend: b,
+ obj: p,
+ }
+ b.glstate.useProgram(b.funcs, p)
+ // Bind texture uniforms.
+ for _, tex := range vsh.src.Textures {
+ u := b.funcs.GetUniformLocation(p, tex.Name)
+ if u.Valid() {
+ b.funcs.Uniform1i(u, tex.Binding)
+ }
+ }
+ for _, tex := range fsh.src.Textures {
+ u := b.funcs.GetUniformLocation(p, tex.Name)
+ if u.Valid() {
+ b.funcs.Uniform1i(u, tex.Binding)
+ }
+ }
+ prog.vertUniforms.setup(b.funcs, p, vsh.src.Uniforms.Size, vsh.src.Uniforms.Locations)
+ prog.fragUniforms.setup(b.funcs, p, fsh.src.Uniforms.Size, fsh.src.Uniforms.Locations)
+ return prog, nil
+}
+
+func (b *Backend) BindStorageBuffer(binding int, buf driver.Buffer) {
+ bf := buf.(*buffer)
+ if bf.typ&(driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite) == 0 {
+ panic("not a shader storage buffer")
+ }
+ b.storage[binding] = bf
+}
+
+func (b *Backend) BindUniforms(buf driver.Buffer) {
+ bf := buf.(*buffer)
+ if bf.typ&driver.BufferBindingUniforms == 0 {
+ panic("not a uniform buffer")
+ }
+ b.state.pipeline.prog.vertUniforms.update(b.funcs, bf)
+ b.state.pipeline.prog.fragUniforms.update(b.funcs, bf)
+}
+
+func (b *Backend) BindProgram(prog driver.Program) {
+ p := prog.(*program)
+ b.glstate.useProgram(b.funcs, p.obj)
+}
+
+func (s *glshader) Release() {
+ s.backend.funcs.DeleteShader(s.obj)
+}
+
+func (p *program) Release() {
+ p.backend.glstate.deleteProgram(p.backend.funcs, p.obj)
+}
+
+func (u *uniforms) setup(funcs *gl.Functions, p gl.Program, uniformSize int, uniforms []shader.UniformLocation) {
+ u.locs = make([]uniformLocation, len(uniforms))
+ for i, uniform := range uniforms {
+ loc := funcs.GetUniformLocation(p, uniform.Name)
+ u.locs[i] = uniformLocation{uniform: loc, offset: uniform.Offset, typ: uniform.Type, size: uniform.Size}
+ }
+ u.size = uniformSize
+}
+
+func (p *uniforms) update(funcs *gl.Functions, buf *buffer) {
+ if buf.size < p.size {
+ panic(fmt.Errorf("uniform buffer too small, got %d need %d", buf.size, p.size))
+ }
+ data := buf.data
+ for _, u := range p.locs {
+ if !u.uniform.Valid() {
+ continue
+ }
+ data := data[u.offset:]
+ switch {
+ case u.typ == shader.DataTypeFloat && u.size == 1:
+ data := data[:4]
+ v := *(*[1]float32)(unsafe.Pointer(&data[0]))
+ funcs.Uniform1f(u.uniform, v[0])
+ case u.typ == shader.DataTypeFloat && u.size == 2:
+ data := data[:8]
+ v := *(*[2]float32)(unsafe.Pointer(&data[0]))
+ funcs.Uniform2f(u.uniform, v[0], v[1])
+ case u.typ == shader.DataTypeFloat && u.size == 3:
+ data := data[:12]
+ v := *(*[3]float32)(unsafe.Pointer(&data[0]))
+ funcs.Uniform3f(u.uniform, v[0], v[1], v[2])
+ case u.typ == shader.DataTypeFloat && u.size == 4:
+ data := data[:16]
+ v := *(*[4]float32)(unsafe.Pointer(&data[0]))
+ funcs.Uniform4f(u.uniform, v[0], v[1], v[2], v[3])
+ default:
+ panic("unsupported uniform data type or size")
+ }
+ }
+}
+
+func (b *buffer) Upload(data []byte) {
+ if b.immutable {
+ panic("immutable buffer")
+ }
+ if len(data) > b.size {
+ panic("buffer size overflow")
+ }
+ copy(b.data, data)
+ if b.hasBuffer {
+ firstBinding := firstBufferType(b.typ)
+ b.backend.glstate.bindBuffer(b.backend.funcs, firstBinding, b.obj)
+ if len(data) == b.size {
+ // the iOS GL implementation doesn't recognize when BufferSubData
+ // clears the entire buffer. Tell it and avoid GPU stalls.
+ // See also https://github.com/godotengine/godot/issues/23956.
+ b.backend.funcs.BufferData(firstBinding, b.size, gl.DYNAMIC_DRAW, data)
+ } else {
+ b.backend.funcs.BufferSubData(firstBinding, 0, data)
+ }
+ }
+}
+
+func (b *buffer) Download(data []byte) error {
+ if len(data) > b.size {
+ panic("buffer size overflow")
+ }
+ if !b.hasBuffer {
+ copy(data, b.data)
+ return nil
+ }
+ firstBinding := firstBufferType(b.typ)
+ b.backend.glstate.bindBuffer(b.backend.funcs, firstBinding, b.obj)
+ bufferMap := b.backend.funcs.MapBufferRange(firstBinding, 0, len(data), gl.MAP_READ_BIT)
+ if bufferMap == nil {
+ return fmt.Errorf("MapBufferRange: error %#x", b.backend.funcs.GetError())
+ }
+ copy(data, bufferMap)
+ if !b.backend.funcs.UnmapBuffer(firstBinding) {
+ return driver.ErrContentLost
+ }
+ return nil
+}
+
+func (b *buffer) Release() {
+ if b.hasBuffer {
+ b.backend.glstate.deleteBuffer(b.backend.funcs, b.obj)
+ b.hasBuffer = false
+ }
+}
+
+func (b *Backend) BindVertexBuffer(buf driver.Buffer, offset int) {
+ gbuf := buf.(*buffer)
+ if gbuf.typ&driver.BufferBindingVertices == 0 {
+ panic("not a vertex buffer")
+ }
+ b.state.buffer = bufferBinding{obj: gbuf.obj, offset: offset}
+}
+
+func (b *Backend) setupVertexArrays() {
+ p := b.state.pipeline
+ inputs := p.inputs
+ if len(inputs) == 0 {
+ return
+ }
+ layout := p.layout
+ const max = len(b.glstate.vertAttribs)
+ var enabled [max]bool
+ buf := b.state.buffer
+ for i, inp := range inputs {
+ l := layout.Inputs[i]
+ var gltyp gl.Enum
+ switch l.Type {
+ case shader.DataTypeFloat:
+ gltyp = gl.FLOAT
+ case shader.DataTypeShort:
+ gltyp = gl.SHORT
+ default:
+ panic("unsupported data type")
+ }
+ enabled[inp.Location] = true
+ b.glstate.vertexAttribPointer(b.funcs, buf.obj, inp.Location, l.Size, gltyp, false, p.layout.Stride, buf.offset+l.Offset)
+ }
+ for i := 0; i < max; i++ {
+ b.glstate.setVertexAttribArray(b.funcs, i, enabled[i])
+ }
+}
+
+func (b *Backend) BindIndexBuffer(buf driver.Buffer) {
+ gbuf := buf.(*buffer)
+ if gbuf.typ&driver.BufferBindingIndices == 0 {
+ panic("not an index buffer")
+ }
+ b.glstate.bindBuffer(b.funcs, gl.ELEMENT_ARRAY_BUFFER, gbuf.obj)
+}
+
+func (b *Backend) CopyTexture(dst driver.Texture, dstOrigin image.Point, src driver.Texture, srcRect image.Rectangle) {
+ const unit = 0
+ oldTex := b.glstate.texUnits.binds[unit]
+ defer func() {
+ b.glstate.bindTexture(b.funcs, unit, oldTex)
+ }()
+ b.glstate.bindTexture(b.funcs, unit, dst.(*texture).obj)
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, src.(*texture).ensureFBO())
+ sz := srcRect.Size()
+ b.funcs.CopyTexSubImage2D(gl.TEXTURE_2D, 0, dstOrigin.X, dstOrigin.Y, srcRect.Min.X, srcRect.Min.Y, sz.X, sz.Y)
+}
+
+func (t *texture) ReadPixels(src image.Rectangle, pixels []byte, stride int) error {
+ glErr(t.backend.funcs)
+ t.backend.glstate.bindFramebuffer(t.backend.funcs, gl.FRAMEBUFFER, t.ensureFBO())
+ if len(pixels) < src.Dx()*src.Dy()*4 {
+ return errors.New("unexpected RGBA size")
+ }
+ w, h := src.Dx(), src.Dy()
+ // WebGL 1 doesn't support PACK_ROW_LENGTH != 0. Avoid it if possible.
+ rowLen := 0
+ if n := stride / 4; n != w {
+ rowLen = n
+ }
+ t.backend.glstate.pixelStorei(t.backend.funcs, gl.PACK_ROW_LENGTH, rowLen)
+ t.backend.funcs.ReadPixels(src.Min.X, src.Min.Y, w, h, gl.RGBA, gl.UNSIGNED_BYTE, pixels)
+ return glErr(t.backend.funcs)
+}
+
+func (b *Backend) BindPipeline(pl driver.Pipeline) {
+ p := pl.(*pipeline)
+ b.state.pipeline = p
+ b.glstate.useProgram(b.funcs, p.prog.obj)
+ b.SetBlend(p.blend.Enable)
+ b.BlendFunc(p.blend.SrcFactor, p.blend.DstFactor)
+}
+
+func (b *Backend) BeginCompute() {
+ b.funcs.MemoryBarrier(gl.ALL_BARRIER_BITS)
+}
+
+func (b *Backend) EndCompute() {
+}
+
+func (b *Backend) BeginRenderPass(tex driver.Texture, desc driver.LoadDesc) {
+ fbo := tex.(*texture).ensureFBO()
+ b.glstate.bindFramebuffer(b.funcs, gl.FRAMEBUFFER, fbo)
+ switch desc.Action {
+ case driver.LoadActionClear:
+ c := desc.ClearColor
+ b.clearOutput(c.R, c.G, c.B, c.A)
+ case driver.LoadActionInvalidate:
+ b.funcs.InvalidateFramebuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0)
+ }
+}
+
+func (b *Backend) EndRenderPass() {
+}
+
+func (f *texture) ImplementsRenderTarget() {}
+
+func (p *pipeline) Release() {
+ p.prog.Release()
+ *p = pipeline{}
+}
+
+func toTexFilter(f driver.TextureFilter) int {
+ switch f {
+ case driver.FilterNearest:
+ return gl.NEAREST
+ case driver.FilterLinear:
+ return gl.LINEAR
+ default:
+ panic("unsupported texture filter")
+ }
+}
+
+func (b *Backend) PrepareTexture(tex driver.Texture) {}
+
+func (b *Backend) BindTexture(unit int, t driver.Texture) {
+ b.glstate.bindTexture(b.funcs, unit, t.(*texture).obj)
+}
+
+func (t *texture) Release() {
+ if t.foreign {
+ panic("texture not created by NewTexture")
+ }
+ if t.hasFBO {
+ t.backend.glstate.deleteFramebuffer(t.backend.funcs, t.fbo)
+ }
+ t.backend.glstate.deleteTexture(t.backend.funcs, t.obj)
+}
+
+func (t *texture) Upload(offset, size image.Point, pixels []byte, stride int) {
+ if min := size.X * size.Y * 4; min > len(pixels) {
+ panic(fmt.Errorf("size %d larger than data %d", min, len(pixels)))
+ }
+ t.backend.BindTexture(0, t)
+ // WebGL 1 doesn't support UNPACK_ROW_LENGTH != 0. Avoid it if possible.
+ rowLen := 0
+ if n := stride / 4; n != size.X {
+ rowLen = n
+ }
+ t.backend.glstate.pixelStorei(t.backend.funcs, gl.UNPACK_ROW_LENGTH, rowLen)
+ t.backend.funcs.TexSubImage2D(gl.TEXTURE_2D, 0, offset.X, offset.Y, size.X, size.Y, t.triple.format, t.triple.typ, pixels)
+}
+
+func (t *timer) Begin() {
+ t.funcs.BeginQuery(gl.TIME_ELAPSED_EXT, t.obj)
+}
+
+func (t *timer) End() {
+ t.funcs.EndQuery(gl.TIME_ELAPSED_EXT)
+}
+
+func (t *timer) ready() bool {
+ return t.funcs.GetQueryObjectuiv(t.obj, gl.QUERY_RESULT_AVAILABLE) == gl.TRUE
+}
+
+func (t *timer) Release() {
+ t.funcs.DeleteQuery(t.obj)
+}
+
+func (t *timer) Duration() (time.Duration, bool) {
+ if !t.ready() {
+ return 0, false
+ }
+ nanos := t.funcs.GetQueryObjectuiv(t.obj, gl.QUERY_RESULT)
+ return time.Duration(nanos), true
+}
+
+// floatTripleFor determines the best texture triple for floating point FBOs.
+func floatTripleFor(f *gl.Functions, ver [2]int, exts []string) (textureTriple, error) {
+ var triples []textureTriple
+ if ver[0] >= 3 {
+ triples = append(triples, textureTriple{gl.R16F, gl.Enum(gl.RED), gl.Enum(gl.HALF_FLOAT)})
+ }
+ // According to the OES_texture_half_float specification, EXT_color_buffer_half_float is needed to
+ // render to FBOs. However, the Safari WebGL1 implementation does support half-float FBOs but does not
+ // report EXT_color_buffer_half_float support. The triples are verified below, so it doesn't matter if we're
+ // wrong.
+ if hasExtension(exts, "GL_OES_texture_half_float") || hasExtension(exts, "GL_EXT_color_buffer_half_float") {
+ // Try single channel.
+ triples = append(triples, textureTriple{gl.LUMINANCE, gl.Enum(gl.LUMINANCE), gl.Enum(gl.HALF_FLOAT_OES)})
+ // Fallback to 4 channels.
+ triples = append(triples, textureTriple{gl.RGBA, gl.Enum(gl.RGBA), gl.Enum(gl.HALF_FLOAT_OES)})
+ }
+ if hasExtension(exts, "GL_OES_texture_float") || hasExtension(exts, "GL_EXT_color_buffer_float") {
+ triples = append(triples, textureTriple{gl.RGBA, gl.Enum(gl.RGBA), gl.Enum(gl.FLOAT)})
+ }
+ tex := f.CreateTexture()
+ defer f.DeleteTexture(tex)
+ defTex := gl.Texture(f.GetBinding(gl.TEXTURE_BINDING_2D))
+ defer f.BindTexture(gl.TEXTURE_2D, defTex)
+ f.BindTexture(gl.TEXTURE_2D, tex)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)
+ fbo := f.CreateFramebuffer()
+ defer f.DeleteFramebuffer(fbo)
+ defFBO := gl.Framebuffer(f.GetBinding(gl.FRAMEBUFFER_BINDING))
+ f.BindFramebuffer(gl.FRAMEBUFFER, fbo)
+ defer f.BindFramebuffer(gl.FRAMEBUFFER, defFBO)
+ var attempts []string
+ for _, tt := range triples {
+ const size = 256
+ f.TexImage2D(gl.TEXTURE_2D, 0, tt.internalFormat, size, size, tt.format, tt.typ)
+ f.FramebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0)
+ st := f.CheckFramebufferStatus(gl.FRAMEBUFFER)
+ if st == gl.FRAMEBUFFER_COMPLETE {
+ return tt, nil
+ }
+ attempts = append(attempts, fmt.Sprintf("(0x%x, 0x%x, 0x%x): 0x%x", tt.internalFormat, tt.format, tt.typ, st))
+ }
+ return textureTriple{}, fmt.Errorf("floating point fbos not supported (attempted %s)", attempts)
+}
+
+func srgbaTripleFor(ver [2]int, exts []string) (textureTriple, error) {
+ switch {
+ case ver[0] >= 3:
+ return textureTriple{gl.SRGB8_ALPHA8, gl.Enum(gl.RGBA), gl.Enum(gl.UNSIGNED_BYTE)}, nil
+ case hasExtension(exts, "GL_EXT_sRGB"):
+ return textureTriple{gl.SRGB_ALPHA_EXT, gl.Enum(gl.SRGB_ALPHA_EXT), gl.Enum(gl.UNSIGNED_BYTE)}, nil
+ default:
+ return textureTriple{}, errors.New("no sRGB texture formats found")
+ }
+}
+
+func alphaTripleFor(ver [2]int) textureTriple {
+ intf, f := gl.Enum(gl.R8), gl.Enum(gl.RED)
+ if ver[0] < 3 {
+ // R8, RED not supported on OpenGL ES 2.0.
+ intf, f = gl.LUMINANCE, gl.Enum(gl.LUMINANCE)
+ }
+ return textureTriple{intf, f, gl.UNSIGNED_BYTE}
+}
+
+func hasExtension(exts []string, ext string) bool {
+ for _, e := range exts {
+ if ext == e {
+ return true
+ }
+ }
+ return false
+}
+
+func firstBufferType(typ driver.BufferBinding) gl.Enum {
+ switch {
+ case typ&driver.BufferBindingIndices != 0:
+ return gl.ELEMENT_ARRAY_BUFFER
+ case typ&driver.BufferBindingVertices != 0:
+ return gl.ARRAY_BUFFER
+ case typ&driver.BufferBindingUniforms != 0:
+ return gl.UNIFORM_BUFFER
+ case typ&(driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite) != 0:
+ return gl.SHADER_STORAGE_BUFFER
+ default:
+ panic("unsupported buffer type")
+ }
+}
diff --git a/vendor/gioui.org/gpu/internal/opengl/srgb.go b/vendor/gioui.org/gpu/internal/opengl/srgb.go
new file mode 100644
index 0000000..4871d94
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/opengl/srgb.go
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package opengl
+
+import (
+ "errors"
+ "fmt"
+ "image"
+ "runtime"
+ "strings"
+
+ "gioui.org/internal/byteslice"
+ "gioui.org/internal/gl"
+)
+
+// SRGBFBO implements an intermediate sRGB FBO
+// for gamma-correct rendering on platforms without
+// sRGB enabled native framebuffers.
+type SRGBFBO struct {
+ c *gl.Functions
+ state *glState
+ viewport image.Point
+ fbo gl.Framebuffer
+ tex gl.Texture
+ blitted bool
+ quad gl.Buffer
+ prog gl.Program
+ format textureTriple
+}
+
+func NewSRGBFBO(f *gl.Functions, state *glState) (*SRGBFBO, error) {
+ glVer := f.GetString(gl.VERSION)
+ ver, _, err := gl.ParseGLVersion(glVer)
+ if err != nil {
+ return nil, err
+ }
+ exts := strings.Split(f.GetString(gl.EXTENSIONS), " ")
+ srgbTriple, err := srgbaTripleFor(ver, exts)
+ if err != nil {
+ // Fall back to the linear RGB colorspace, at the cost of color precision loss.
+ srgbTriple = textureTriple{gl.RGBA, gl.Enum(gl.RGBA), gl.Enum(gl.UNSIGNED_BYTE)}
+ }
+ s := &SRGBFBO{
+ c: f,
+ state: state,
+ format: srgbTriple,
+ fbo: f.CreateFramebuffer(),
+ tex: f.CreateTexture(),
+ }
+ state.bindTexture(f, 0, s.tex)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST)
+ f.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)
+ return s, nil
+}
+
+func (s *SRGBFBO) Blit() {
+ if !s.blitted {
+ prog, err := gl.CreateProgram(s.c, blitVSrc, blitFSrc, []string{"pos", "uv"})
+ if err != nil {
+ panic(err)
+ }
+ s.prog = prog
+ s.state.useProgram(s.c, prog)
+ s.c.Uniform1i(s.c.GetUniformLocation(prog, "tex"), 0)
+ s.quad = s.c.CreateBuffer()
+ s.state.bindBuffer(s.c, gl.ARRAY_BUFFER, s.quad)
+ coords := byteslice.Slice([]float32{
+ -1, +1, 0, 1,
+ +1, +1, 1, 1,
+ -1, -1, 0, 0,
+ +1, -1, 1, 0,
+ })
+ s.c.BufferData(gl.ARRAY_BUFFER, len(coords), gl.STATIC_DRAW, coords)
+ s.blitted = true
+ }
+ s.state.useProgram(s.c, s.prog)
+ s.state.bindTexture(s.c, 0, s.tex)
+ s.state.vertexAttribPointer(s.c, s.quad, 0 /* pos */, 2, gl.FLOAT, false, 4*4, 0)
+ s.state.vertexAttribPointer(s.c, s.quad, 1 /* uv */, 2, gl.FLOAT, false, 4*4, 4*2)
+ s.state.setVertexAttribArray(s.c, 0, true)
+ s.state.setVertexAttribArray(s.c, 1, true)
+ s.c.DrawArrays(gl.TRIANGLE_STRIP, 0, 4)
+ s.state.bindFramebuffer(s.c, gl.FRAMEBUFFER, s.fbo)
+ s.c.InvalidateFramebuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0)
+}
+
+func (s *SRGBFBO) Framebuffer() gl.Framebuffer {
+ return s.fbo
+}
+
+func (s *SRGBFBO) Refresh(viewport image.Point) error {
+ if viewport.X == 0 || viewport.Y == 0 {
+ return errors.New("srgb: zero-sized framebuffer")
+ }
+ if s.viewport == viewport {
+ return nil
+ }
+ s.viewport = viewport
+ s.state.bindTexture(s.c, 0, s.tex)
+ s.c.TexImage2D(gl.TEXTURE_2D, 0, s.format.internalFormat, viewport.X, viewport.Y, s.format.format, s.format.typ)
+ s.state.bindFramebuffer(s.c, gl.FRAMEBUFFER, s.fbo)
+ s.c.FramebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, s.tex, 0)
+ if st := s.c.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE {
+ return fmt.Errorf("sRGB framebuffer incomplete (%dx%d), status: %#x error: %x", viewport.X, viewport.Y, st, s.c.GetError())
+ }
+
+ if runtime.GOOS == "js" {
+ // With macOS Safari, rendering to and then reading from a SRGB8_ALPHA8
+ // texture result in twice gamma corrected colors. Using a plain RGBA
+ // texture seems to work.
+ s.state.setClearColor(s.c, .5, .5, .5, 1.0)
+ s.c.Clear(gl.COLOR_BUFFER_BIT)
+ var pixel [4]byte
+ s.c.ReadPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel[:])
+ if pixel[0] == 128 { // Correct sRGB color value is ~188
+ s.c.TexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, viewport.X, viewport.Y, gl.RGBA, gl.UNSIGNED_BYTE)
+ if st := s.c.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE {
+ return fmt.Errorf("fallback RGBA framebuffer incomplete (%dx%d), status: %#x error: %x", viewport.X, viewport.Y, st, s.c.GetError())
+ }
+ }
+ }
+
+ return nil
+}
+
+func (s *SRGBFBO) Release() {
+ s.state.deleteFramebuffer(s.c, s.fbo)
+ s.state.deleteTexture(s.c, s.tex)
+ if s.blitted {
+ s.state.deleteBuffer(s.c, s.quad)
+ s.state.deleteProgram(s.c, s.prog)
+ }
+ s.c = nil
+}
+
+const (
+ blitVSrc = `
+#version 100
+
+precision highp float;
+
+attribute vec2 pos;
+attribute vec2 uv;
+
+varying vec2 vUV;
+
+void main() {
+ gl_Position = vec4(pos, 0, 1);
+ vUV = uv;
+}
+`
+ blitFSrc = `
+#version 100
+
+precision mediump float;
+
+uniform sampler2D tex;
+varying vec2 vUV;
+
+vec3 gamma(vec3 rgb) {
+ vec3 exp = vec3(1.055)*pow(rgb, vec3(0.41666)) - vec3(0.055);
+ vec3 lin = rgb * vec3(12.92);
+ bvec3 cut = lessThan(rgb, vec3(0.0031308));
+ return vec3(cut.r ? lin.r : exp.r, cut.g ? lin.g : exp.g, cut.b ? lin.b : exp.b);
+}
+
+void main() {
+ vec4 col = texture2D(tex, vUV);
+ vec3 rgb = col.rgb;
+ rgb = gamma(rgb);
+ gl_FragColor = vec4(rgb, col.a);
+}
+`
+)
diff --git a/vendor/gioui.org/gpu/internal/vulkan/vulkan.go b/vendor/gioui.org/gpu/internal/vulkan/vulkan.go
new file mode 100644
index 0000000..7d3791e
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/vulkan/vulkan.go
@@ -0,0 +1,1121 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build (linux || freebsd) && !novulkan
+// +build linux freebsd
+// +build !novulkan
+
+package vulkan
+
+import (
+ "errors"
+ "fmt"
+ "image"
+
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/internal/vk"
+ "gioui.org/shader"
+)
+
+type Backend struct {
+ physDev vk.PhysicalDevice
+ dev vk.Device
+ queue vk.Queue
+ cmdPool struct {
+ current vk.CommandBuffer
+ pool vk.CommandPool
+ used int
+ buffers []vk.CommandBuffer
+ }
+ outFormat vk.Format
+ staging struct {
+ buf *Buffer
+ mem []byte
+ size int
+ cap int
+ }
+ defers []func(d vk.Device)
+ frameSig vk.Semaphore
+ waitSems []vk.Semaphore
+ waitStages []vk.PipelineStageFlags
+ sigSems []vk.Semaphore
+ fence vk.Fence
+
+ allPipes []*Pipeline
+
+ pipe *Pipeline
+
+ passes map[passKey]vk.RenderPass
+
+ // bindings and offset are temporary storage for BindVertexBuffer.
+ bindings []vk.Buffer
+ offsets []vk.DeviceSize
+
+ desc struct {
+ dirty bool
+ texBinds [texUnits]*Texture
+ bufBinds [storageUnits]*Buffer
+ }
+
+ caps driver.Features
+}
+
+type passKey struct {
+ fmt vk.Format
+ loadAct vk.AttachmentLoadOp
+ initLayout vk.ImageLayout
+ finalLayout vk.ImageLayout
+}
+
+type Texture struct {
+ backend *Backend
+ img vk.Image
+ mem vk.DeviceMemory
+ view vk.ImageView
+ sampler vk.Sampler
+ fbo vk.Framebuffer
+ format vk.Format
+ layout vk.ImageLayout
+ passLayout vk.ImageLayout
+ width int
+ height int
+ acquire vk.Semaphore
+ foreign bool
+
+ scope struct {
+ stage vk.PipelineStageFlags
+ access vk.AccessFlags
+ }
+}
+
+type Shader struct {
+ dev vk.Device
+ module vk.ShaderModule
+ pushRange vk.PushConstantRange
+ src shader.Sources
+}
+
+type Pipeline struct {
+ backend *Backend
+ pipe vk.Pipeline
+ pushRanges []vk.PushConstantRange
+ ninputs int
+ desc *descPool
+}
+
+type descPool struct {
+ layout vk.PipelineLayout
+ descLayout vk.DescriptorSetLayout
+ pool vk.DescriptorPool
+ size int
+ cap int
+ texBinds []int
+ imgBinds []int
+ bufBinds []int
+}
+
+type Buffer struct {
+ backend *Backend
+ buf vk.Buffer
+ store []byte
+ mem vk.DeviceMemory
+ usage vk.BufferUsageFlags
+
+ scope struct {
+ stage vk.PipelineStageFlags
+ access vk.AccessFlags
+ }
+}
+
+const (
+ texUnits = 4
+ storageUnits = 4
+)
+
+func init() {
+ driver.NewVulkanDevice = newVulkanDevice
+}
+
+func newVulkanDevice(api driver.Vulkan) (driver.Device, error) {
+ b := &Backend{
+ physDev: vk.PhysicalDevice(api.PhysDevice),
+ dev: vk.Device(api.Device),
+ outFormat: vk.Format(api.Format),
+ caps: driver.FeatureCompute,
+ passes: make(map[passKey]vk.RenderPass),
+ }
+ b.queue = vk.GetDeviceQueue(b.dev, api.QueueFamily, api.QueueIndex)
+ cmdPool, err := vk.CreateCommandPool(b.dev, api.QueueFamily)
+ if err != nil {
+ return nil, err
+ }
+ b.cmdPool.pool = cmdPool
+ props := vk.GetPhysicalDeviceFormatProperties(b.physDev, vk.FORMAT_R16_SFLOAT)
+ reqs := vk.FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | vk.FORMAT_FEATURE_SAMPLED_IMAGE_BIT
+ if props&reqs == reqs {
+ b.caps |= driver.FeatureFloatRenderTargets
+ }
+ reqs = vk.FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT | vk.FORMAT_FEATURE_SAMPLED_IMAGE_BIT
+ props = vk.GetPhysicalDeviceFormatProperties(b.physDev, vk.FORMAT_R8G8B8A8_SRGB)
+ if props&reqs == reqs {
+ b.caps |= driver.FeatureSRGB
+ }
+ fence, err := vk.CreateFence(b.dev)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ b.fence = fence
+ return b, nil
+}
+
+func (b *Backend) BeginFrame(target driver.RenderTarget, clear bool, viewport image.Point) driver.Texture {
+ vk.QueueWaitIdle(b.queue)
+ b.staging.size = 0
+ b.cmdPool.used = 0
+ b.runDefers()
+ b.resetPipes()
+
+ if target == nil {
+ return nil
+ }
+ switch t := target.(type) {
+ case driver.VulkanRenderTarget:
+ layout := vk.IMAGE_LAYOUT_UNDEFINED
+ if !clear {
+ layout = vk.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
+ }
+ b.frameSig = vk.Semaphore(t.SignalSem)
+ tex := &Texture{
+ img: vk.Image(t.Image),
+ fbo: vk.Framebuffer(t.Framebuffer),
+ width: viewport.X,
+ height: viewport.Y,
+ layout: layout,
+ passLayout: vk.IMAGE_LAYOUT_PRESENT_SRC_KHR,
+ format: b.outFormat,
+ acquire: vk.Semaphore(t.WaitSem),
+ foreign: true,
+ }
+ return tex
+ case *Texture:
+ return t
+ default:
+ panic(fmt.Sprintf("vulkan: unsupported render target type: %T", t))
+ }
+}
+
+func (b *Backend) deferFunc(f func(d vk.Device)) {
+ b.defers = append(b.defers, f)
+}
+
+func (b *Backend) runDefers() {
+ for _, f := range b.defers {
+ f(b.dev)
+ }
+ b.defers = b.defers[:0]
+}
+
+func (b *Backend) resetPipes() {
+ for i := len(b.allPipes) - 1; i >= 0; i-- {
+ p := b.allPipes[i]
+ if p.pipe == 0 {
+ // Released pipeline.
+ b.allPipes = append(b.allPipes[:i], b.allPipes[:i+1]...)
+ continue
+ }
+ if p.desc.size > 0 {
+ vk.ResetDescriptorPool(b.dev, p.desc.pool)
+ p.desc.size = 0
+ }
+ }
+}
+
+func (b *Backend) EndFrame() {
+ if b.frameSig != 0 {
+ b.sigSems = append(b.sigSems, b.frameSig)
+ b.frameSig = 0
+ }
+ b.submitCmdBuf(false)
+}
+
+func (b *Backend) Caps() driver.Caps {
+ return driver.Caps{
+ MaxTextureSize: 4096,
+ Features: b.caps,
+ }
+}
+
+func (b *Backend) NewTimer() driver.Timer {
+ panic("timers not supported")
+}
+
+func (b *Backend) IsTimeContinuous() bool {
+ panic("timers not supported")
+}
+
+func (b *Backend) Release() {
+ vk.DeviceWaitIdle(b.dev)
+ if buf := b.staging.buf; buf != nil {
+ vk.UnmapMemory(b.dev, b.staging.buf.mem)
+ buf.Release()
+ }
+ b.runDefers()
+ for _, rp := range b.passes {
+ vk.DestroyRenderPass(b.dev, rp)
+ }
+ vk.DestroyFence(b.dev, b.fence)
+ vk.FreeCommandBuffers(b.dev, b.cmdPool.pool, b.cmdPool.buffers...)
+ vk.DestroyCommandPool(b.dev, b.cmdPool.pool)
+ *b = Backend{}
+}
+
+func (b *Backend) NewTexture(format driver.TextureFormat, width, height int, minFilter, magFilter driver.TextureFilter, bindings driver.BufferBinding) (driver.Texture, error) {
+ vkfmt := formatFor(format)
+ usage := vk.IMAGE_USAGE_TRANSFER_DST_BIT | vk.IMAGE_USAGE_TRANSFER_SRC_BIT
+ passLayout := vk.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
+ if bindings&driver.BufferBindingTexture != 0 {
+ usage |= vk.IMAGE_USAGE_SAMPLED_BIT
+ passLayout = vk.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
+ }
+ if bindings&driver.BufferBindingFramebuffer != 0 {
+ usage |= vk.IMAGE_USAGE_COLOR_ATTACHMENT_BIT
+ }
+ if bindings&(driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite) != 0 {
+ usage |= vk.IMAGE_USAGE_STORAGE_BIT
+ }
+ filterFor := func(f driver.TextureFilter) vk.Filter {
+ switch minFilter {
+ case driver.FilterLinear:
+ return vk.FILTER_LINEAR
+ case driver.FilterNearest:
+ return vk.FILTER_NEAREST
+ }
+ panic("unknown filter")
+ }
+ sampler, err := vk.CreateSampler(b.dev, filterFor(minFilter), filterFor(magFilter))
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ img, mem, err := vk.CreateImage(b.physDev, b.dev, vkfmt, width, height, usage)
+ if err != nil {
+ vk.DestroySampler(b.dev, sampler)
+ return nil, mapErr(err)
+ }
+ view, err := vk.CreateImageView(b.dev, img, vkfmt)
+ if err != nil {
+ vk.DestroySampler(b.dev, sampler)
+ vk.DestroyImage(b.dev, img)
+ vk.FreeMemory(b.dev, mem)
+ return nil, mapErr(err)
+ }
+ t := &Texture{backend: b, img: img, mem: mem, view: view, sampler: sampler, layout: vk.IMAGE_LAYOUT_UNDEFINED, passLayout: passLayout, width: width, height: height, format: vkfmt}
+ if bindings&driver.BufferBindingFramebuffer != 0 {
+ pass, err := vk.CreateRenderPass(b.dev, vkfmt, vk.ATTACHMENT_LOAD_OP_DONT_CARE,
+ vk.IMAGE_LAYOUT_UNDEFINED, vk.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, nil)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ defer vk.DestroyRenderPass(b.dev, pass)
+ fbo, err := vk.CreateFramebuffer(b.dev, pass, view, width, height)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ t.fbo = fbo
+ }
+ return t, nil
+}
+
+func (b *Backend) NewBuffer(bindings driver.BufferBinding, size int) (driver.Buffer, error) {
+ if bindings&driver.BufferBindingUniforms != 0 {
+ // Implement uniform buffers as inline push constants.
+ return &Buffer{store: make([]byte, size)}, nil
+ }
+ usage := vk.BUFFER_USAGE_TRANSFER_DST_BIT | vk.BUFFER_USAGE_TRANSFER_SRC_BIT
+ if bindings&driver.BufferBindingIndices != 0 {
+ usage |= vk.BUFFER_USAGE_INDEX_BUFFER_BIT
+ }
+ if bindings&(driver.BufferBindingShaderStorageRead|driver.BufferBindingShaderStorageWrite) != 0 {
+ usage |= vk.BUFFER_USAGE_STORAGE_BUFFER_BIT
+ }
+ if bindings&driver.BufferBindingVertices != 0 {
+ usage |= vk.BUFFER_USAGE_VERTEX_BUFFER_BIT
+ }
+ buf, err := b.newBuffer(size, usage, vk.MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
+ return buf, mapErr(err)
+}
+
+func (b *Backend) newBuffer(size int, usage vk.BufferUsageFlags, props vk.MemoryPropertyFlags) (*Buffer, error) {
+ buf, mem, err := vk.CreateBuffer(b.physDev, b.dev, size, usage, props)
+ return &Buffer{backend: b, buf: buf, mem: mem, usage: usage}, err
+}
+
+func (b *Backend) NewImmutableBuffer(typ driver.BufferBinding, data []byte) (driver.Buffer, error) {
+ buf, err := b.NewBuffer(typ, len(data))
+ if err != nil {
+ return nil, err
+ }
+ buf.Upload(data)
+ return buf, nil
+}
+
+func (b *Backend) NewVertexShader(src shader.Sources) (driver.VertexShader, error) {
+ sh, err := b.newShader(src, vk.SHADER_STAGE_VERTEX_BIT)
+ return sh, mapErr(err)
+}
+
+func (b *Backend) NewFragmentShader(src shader.Sources) (driver.FragmentShader, error) {
+ sh, err := b.newShader(src, vk.SHADER_STAGE_FRAGMENT_BIT)
+ return sh, mapErr(err)
+}
+
+func (b *Backend) NewPipeline(desc driver.PipelineDesc) (driver.Pipeline, error) {
+ vs := desc.VertexShader.(*Shader)
+ fs := desc.FragmentShader.(*Shader)
+ var ranges []vk.PushConstantRange
+ if r := vs.pushRange; r != (vk.PushConstantRange{}) {
+ ranges = append(ranges, r)
+ }
+ if r := fs.pushRange; r != (vk.PushConstantRange{}) {
+ ranges = append(ranges, r)
+ }
+ descPool, err := createPipelineLayout(b.dev, fs.src, ranges)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ blend := desc.BlendDesc
+ factorFor := func(f driver.BlendFactor) vk.BlendFactor {
+ switch f {
+ case driver.BlendFactorZero:
+ return vk.BLEND_FACTOR_ZERO
+ case driver.BlendFactorOne:
+ return vk.BLEND_FACTOR_ONE
+ case driver.BlendFactorOneMinusSrcAlpha:
+ return vk.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
+ case driver.BlendFactorDstColor:
+ return vk.BLEND_FACTOR_DST_COLOR
+ default:
+ panic("unknown blend factor")
+ }
+ }
+ var top vk.PrimitiveTopology
+ switch desc.Topology {
+ case driver.TopologyTriangles:
+ top = vk.PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
+ case driver.TopologyTriangleStrip:
+ top = vk.PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
+ default:
+ panic("unknown topology")
+ }
+ var binds []vk.VertexInputBindingDescription
+ var attrs []vk.VertexInputAttributeDescription
+ inputs := desc.VertexLayout.Inputs
+ for i, inp := range inputs {
+ binds = append(binds, vk.VertexInputBindingDescription{
+ Binding: i,
+ Stride: desc.VertexLayout.Stride,
+ })
+ attrs = append(attrs, vk.VertexInputAttributeDescription{
+ Binding: i,
+ Location: vs.src.Inputs[i].Location,
+ Format: vertFormatFor(vs.src.Inputs[i]),
+ Offset: inp.Offset,
+ })
+ }
+ fmt := b.outFormat
+ if f := desc.PixelFormat; f != driver.TextureFormatOutput {
+ fmt = formatFor(f)
+ }
+ pass, err := vk.CreateRenderPass(b.dev, fmt, vk.ATTACHMENT_LOAD_OP_DONT_CARE,
+ vk.IMAGE_LAYOUT_UNDEFINED, vk.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, nil)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ defer vk.DestroyRenderPass(b.dev, pass)
+ pipe, err := vk.CreateGraphicsPipeline(b.dev, pass, vs.module, fs.module, blend.Enable, factorFor(blend.SrcFactor), factorFor(blend.DstFactor), top, binds, attrs, descPool.layout)
+ if err != nil {
+ descPool.release(b.dev)
+ return nil, mapErr(err)
+ }
+ p := &Pipeline{backend: b, pipe: pipe, desc: descPool, pushRanges: ranges, ninputs: len(inputs)}
+ b.allPipes = append(b.allPipes, p)
+ return p, nil
+}
+
+func (b *Backend) NewComputeProgram(src shader.Sources) (driver.Program, error) {
+ sh, err := b.newShader(src, vk.SHADER_STAGE_COMPUTE_BIT)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ defer sh.Release()
+ descPool, err := createPipelineLayout(b.dev, src, nil)
+ if err != nil {
+ return nil, mapErr(err)
+ }
+ pipe, err := vk.CreateComputePipeline(b.dev, sh.module, descPool.layout)
+ if err != nil {
+ descPool.release(b.dev)
+ return nil, mapErr(err)
+ }
+ return &Pipeline{backend: b, pipe: pipe, desc: descPool}, nil
+}
+
+func vertFormatFor(f shader.InputLocation) vk.Format {
+ t := f.Type
+ s := f.Size
+ switch {
+ case t == shader.DataTypeFloat && s == 1:
+ return vk.FORMAT_R32_SFLOAT
+ case t == shader.DataTypeFloat && s == 2:
+ return vk.FORMAT_R32G32_SFLOAT
+ case t == shader.DataTypeFloat && s == 3:
+ return vk.FORMAT_R32G32B32_SFLOAT
+ case t == shader.DataTypeFloat && s == 4:
+ return vk.FORMAT_R32G32B32A32_SFLOAT
+ default:
+ panic("unsupported data type")
+ }
+}
+
+func createPipelineLayout(d vk.Device, src shader.Sources, ranges []vk.PushConstantRange) (*descPool, error) {
+ var (
+ descLayouts []vk.DescriptorSetLayout
+ descLayout vk.DescriptorSetLayout
+ )
+ texBinds := make([]int, len(src.Textures))
+ imgBinds := make([]int, len(src.Images))
+ bufBinds := make([]int, len(src.StorageBuffers))
+ var descBinds []vk.DescriptorSetLayoutBinding
+ for i, t := range src.Textures {
+ descBinds = append(descBinds, vk.DescriptorSetLayoutBinding{
+ Binding: t.Binding,
+ StageFlags: vk.SHADER_STAGE_FRAGMENT_BIT,
+ DescriptorType: vk.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
+ })
+ texBinds[i] = t.Binding
+ }
+ for i, img := range src.Images {
+ descBinds = append(descBinds, vk.DescriptorSetLayoutBinding{
+ Binding: img.Binding,
+ StageFlags: vk.SHADER_STAGE_COMPUTE_BIT,
+ DescriptorType: vk.DESCRIPTOR_TYPE_STORAGE_IMAGE,
+ })
+ imgBinds[i] = img.Binding
+ }
+ for i, buf := range src.StorageBuffers {
+ descBinds = append(descBinds, vk.DescriptorSetLayoutBinding{
+ Binding: buf.Binding,
+ StageFlags: vk.SHADER_STAGE_COMPUTE_BIT,
+ DescriptorType: vk.DESCRIPTOR_TYPE_STORAGE_BUFFER,
+ })
+ bufBinds[i] = buf.Binding
+ }
+ if len(descBinds) > 0 {
+ var err error
+ descLayout, err = vk.CreateDescriptorSetLayout(d, descBinds)
+ if err != nil {
+ return nil, err
+ }
+ descLayouts = append(descLayouts, descLayout)
+ }
+ layout, err := vk.CreatePipelineLayout(d, ranges, descLayouts)
+ if err != nil {
+ if descLayout != 0 {
+ vk.DestroyDescriptorSetLayout(d, descLayout)
+ }
+ return nil, err
+ }
+ descPool := &descPool{
+ texBinds: texBinds,
+ bufBinds: bufBinds,
+ imgBinds: imgBinds,
+ layout: layout,
+ descLayout: descLayout,
+ }
+ return descPool, nil
+}
+
+func (b *Backend) newShader(src shader.Sources, stage vk.ShaderStageFlags) (*Shader, error) {
+ mod, err := vk.CreateShaderModule(b.dev, src.SPIRV)
+ if err != nil {
+ return nil, err
+ }
+
+ sh := &Shader{dev: b.dev, module: mod, src: src}
+ if locs := src.Uniforms.Locations; len(locs) > 0 {
+ pushOffset := 0x7fffffff
+ for _, l := range locs {
+ if l.Offset < pushOffset {
+ pushOffset = l.Offset
+ }
+ }
+ sh.pushRange = vk.BuildPushConstantRange(stage, pushOffset, src.Uniforms.Size)
+ }
+ return sh, nil
+}
+
+func (b *Backend) CopyTexture(dstTex driver.Texture, dorig image.Point, srcFBO driver.Texture, srect image.Rectangle) {
+ dst := dstTex.(*Texture)
+ src := srcFBO.(*Texture)
+ cmdBuf := b.ensureCmdBuf()
+ op := vk.BuildImageCopy(srect.Min.X, srect.Min.Y, dorig.X, dorig.Y, srect.Dx(), srect.Dy())
+ src.imageBarrier(cmdBuf,
+ vk.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
+ vk.PIPELINE_STAGE_TRANSFER_BIT,
+ vk.ACCESS_TRANSFER_READ_BIT,
+ )
+ dst.imageBarrier(cmdBuf,
+ vk.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ vk.PIPELINE_STAGE_TRANSFER_BIT,
+ vk.ACCESS_TRANSFER_WRITE_BIT,
+ )
+ vk.CmdCopyImage(cmdBuf, src.img, src.layout, dst.img, dst.layout, []vk.ImageCopy{op})
+}
+
+func (b *Backend) Viewport(x, y, width, height int) {
+ cmdBuf := b.currentCmdBuf()
+ vp := vk.BuildViewport(float32(x), float32(y), float32(width), float32(height))
+ vk.CmdSetViewport(cmdBuf, 0, vp)
+}
+
+func (b *Backend) DrawArrays(off, count int) {
+ cmdBuf := b.currentCmdBuf()
+ if b.desc.dirty {
+ b.pipe.desc.bindDescriptorSet(b, cmdBuf, vk.PIPELINE_BIND_POINT_GRAPHICS, b.desc.texBinds, b.desc.bufBinds)
+ b.desc.dirty = false
+ }
+ vk.CmdDraw(cmdBuf, count, 1, off, 0)
+}
+
+func (b *Backend) DrawElements(off, count int) {
+ cmdBuf := b.currentCmdBuf()
+ if b.desc.dirty {
+ b.pipe.desc.bindDescriptorSet(b, cmdBuf, vk.PIPELINE_BIND_POINT_GRAPHICS, b.desc.texBinds, b.desc.bufBinds)
+ b.desc.dirty = false
+ }
+ vk.CmdDrawIndexed(cmdBuf, count, 1, off, 0, 0)
+}
+
+func (b *Backend) BindImageTexture(unit int, tex driver.Texture) {
+ t := tex.(*Texture)
+ b.desc.texBinds[unit] = t
+ b.desc.dirty = true
+ t.imageBarrier(b.currentCmdBuf(),
+ vk.IMAGE_LAYOUT_GENERAL,
+ vk.PIPELINE_STAGE_COMPUTE_SHADER_BIT,
+ vk.ACCESS_SHADER_READ_BIT|vk.ACCESS_SHADER_WRITE_BIT,
+ )
+}
+
+func (b *Backend) DispatchCompute(x, y, z int) {
+ cmdBuf := b.currentCmdBuf()
+ if b.desc.dirty {
+ b.pipe.desc.bindDescriptorSet(b, cmdBuf, vk.PIPELINE_BIND_POINT_COMPUTE, b.desc.texBinds, b.desc.bufBinds)
+ b.desc.dirty = false
+ }
+ vk.CmdDispatch(cmdBuf, x, y, z)
+}
+
+func (t *Texture) Upload(offset, size image.Point, pixels []byte, stride int) {
+ if stride == 0 {
+ stride = size.X * 4
+ }
+ cmdBuf := t.backend.ensureCmdBuf()
+ dstStride := size.X * 4
+ n := size.Y * dstStride
+ stage, mem, off := t.backend.stagingBuffer(n)
+ var srcOff, dstOff int
+ for y := 0; y < size.Y; y++ {
+ srcRow := pixels[srcOff : srcOff+dstStride]
+ dstRow := mem[dstOff : dstOff+dstStride]
+ copy(dstRow, srcRow)
+ dstOff += dstStride
+ srcOff += stride
+ }
+ op := vk.BuildBufferImageCopy(off, dstStride/4, offset.X, offset.Y, size.X, size.Y)
+ t.imageBarrier(cmdBuf,
+ vk.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ vk.PIPELINE_STAGE_TRANSFER_BIT,
+ vk.ACCESS_TRANSFER_WRITE_BIT,
+ )
+ vk.CmdCopyBufferToImage(cmdBuf, stage.buf, t.img, t.layout, op)
+}
+
+func (t *Texture) Release() {
+ if t.foreign {
+ panic("external textures cannot be released")
+ }
+ freet := *t
+ t.backend.deferFunc(func(d vk.Device) {
+ if freet.fbo != 0 {
+ vk.DestroyFramebuffer(d, freet.fbo)
+ }
+ vk.DestroySampler(d, freet.sampler)
+ vk.DestroyImageView(d, freet.view)
+ vk.DestroyImage(d, freet.img)
+ vk.FreeMemory(d, freet.mem)
+ })
+ *t = Texture{}
+}
+
+func (p *Pipeline) Release() {
+ freep := *p
+ p.backend.deferFunc(func(d vk.Device) {
+ freep.desc.release(d)
+ vk.DestroyPipeline(d, freep.pipe)
+ })
+ *p = Pipeline{}
+}
+
+func (p *descPool) release(d vk.Device) {
+ if p := p.pool; p != 0 {
+ vk.DestroyDescriptorPool(d, p)
+ }
+ if l := p.descLayout; l != 0 {
+ vk.DestroyDescriptorSetLayout(d, l)
+ }
+ vk.DestroyPipelineLayout(d, p.layout)
+}
+
+func (p *descPool) bindDescriptorSet(b *Backend, cmdBuf vk.CommandBuffer, bindPoint vk.PipelineBindPoint, texBinds [texUnits]*Texture, bufBinds [storageUnits]*Buffer) {
+ realloced := false
+ destroyPool := func() {
+ if pool := p.pool; pool != 0 {
+ b.deferFunc(func(d vk.Device) {
+ vk.DestroyDescriptorPool(d, pool)
+ })
+ }
+ p.pool = 0
+ p.cap = 0
+ }
+ for {
+ if p.size == p.cap {
+ if realloced {
+ panic("vulkan: vkAllocateDescriptorSet failed on a newly allocated descriptor pool")
+ }
+ destroyPool()
+ realloced = true
+ newCap := p.cap * 2
+ const initialPoolSize = 100
+ if newCap < initialPoolSize {
+ newCap = initialPoolSize
+ }
+ var poolSizes []vk.DescriptorPoolSize
+ if n := len(p.texBinds); n > 0 {
+ poolSizes = append(poolSizes, vk.BuildDescriptorPoolSize(vk.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, newCap*n))
+ }
+ if n := len(p.imgBinds); n > 0 {
+ poolSizes = append(poolSizes, vk.BuildDescriptorPoolSize(vk.DESCRIPTOR_TYPE_STORAGE_IMAGE, newCap*n))
+ }
+ if n := len(p.bufBinds); n > 0 {
+ poolSizes = append(poolSizes, vk.BuildDescriptorPoolSize(vk.DESCRIPTOR_TYPE_STORAGE_BUFFER, newCap*n))
+ }
+ pool, err := vk.CreateDescriptorPool(b.dev, newCap, poolSizes)
+ if err != nil {
+ panic(fmt.Errorf("vulkan: failed to allocate descriptor pool with %d descriptors", newCap))
+ }
+ p.pool = pool
+ p.cap = newCap
+ p.size = 0
+ }
+ l := p.descLayout
+ if l == 0 {
+ panic("vulkan: descriptor set is dirty, but pipeline has empty layout")
+ }
+ descSet, err := vk.AllocateDescriptorSet(b.dev, p.pool, l)
+ if err != nil {
+ destroyPool()
+ continue
+ }
+ p.size++
+ for _, bind := range p.texBinds {
+ tex := texBinds[bind]
+ write := vk.BuildWriteDescriptorSetImage(descSet, bind, vk.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, tex.sampler, tex.view, vk.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)
+ vk.UpdateDescriptorSet(b.dev, write)
+ }
+ for _, bind := range p.imgBinds {
+ tex := texBinds[bind]
+ write := vk.BuildWriteDescriptorSetImage(descSet, bind, vk.DESCRIPTOR_TYPE_STORAGE_IMAGE, 0, tex.view, vk.IMAGE_LAYOUT_GENERAL)
+ vk.UpdateDescriptorSet(b.dev, write)
+ }
+ for _, bind := range p.bufBinds {
+ buf := bufBinds[bind]
+ write := vk.BuildWriteDescriptorSetBuffer(descSet, bind, vk.DESCRIPTOR_TYPE_STORAGE_BUFFER, buf.buf)
+ vk.UpdateDescriptorSet(b.dev, write)
+ }
+ vk.CmdBindDescriptorSets(cmdBuf, bindPoint, p.layout, 0, []vk.DescriptorSet{descSet})
+ break
+ }
+}
+
+func (t *Texture) imageBarrier(cmdBuf vk.CommandBuffer, layout vk.ImageLayout, stage vk.PipelineStageFlags, access vk.AccessFlags) {
+ srcStage := t.scope.stage
+ if srcStage == 0 && t.layout == layout {
+ t.scope.stage = stage
+ t.scope.access = access
+ return
+ }
+ if srcStage == 0 {
+ srcStage = vk.PIPELINE_STAGE_TOP_OF_PIPE_BIT
+ }
+ b := vk.BuildImageMemoryBarrier(
+ t.img,
+ t.scope.access, access,
+ t.layout, layout,
+ )
+ vk.CmdPipelineBarrier(cmdBuf, srcStage, stage, vk.DEPENDENCY_BY_REGION_BIT, nil, nil, []vk.ImageMemoryBarrier{b})
+ t.layout = layout
+ t.scope.stage = stage
+ t.scope.access = access
+}
+
+func (b *Backend) PrepareTexture(tex driver.Texture) {
+ t := tex.(*Texture)
+ cmdBuf := b.ensureCmdBuf()
+ t.imageBarrier(cmdBuf,
+ vk.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
+ vk.PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
+ vk.ACCESS_SHADER_READ_BIT,
+ )
+}
+
+func (b *Backend) BindTexture(unit int, tex driver.Texture) {
+ t := tex.(*Texture)
+ b.desc.texBinds[unit] = t
+ b.desc.dirty = true
+}
+
+func (b *Backend) BindPipeline(pipe driver.Pipeline) {
+ b.bindPipeline(pipe.(*Pipeline), vk.PIPELINE_BIND_POINT_GRAPHICS)
+}
+
+func (b *Backend) BindProgram(prog driver.Program) {
+ b.bindPipeline(prog.(*Pipeline), vk.PIPELINE_BIND_POINT_COMPUTE)
+}
+
+func (b *Backend) bindPipeline(p *Pipeline, point vk.PipelineBindPoint) {
+ b.pipe = p
+ b.desc.dirty = p.desc.descLayout != 0
+ cmdBuf := b.currentCmdBuf()
+ vk.CmdBindPipeline(cmdBuf, point, p.pipe)
+}
+
+func (s *Shader) Release() {
+ vk.DestroyShaderModule(s.dev, s.module)
+ *s = Shader{}
+}
+
+func (b *Backend) BindStorageBuffer(binding int, buffer driver.Buffer) {
+ buf := buffer.(*Buffer)
+ b.desc.bufBinds[binding] = buf
+ b.desc.dirty = true
+ buf.barrier(b.currentCmdBuf(),
+ vk.PIPELINE_STAGE_COMPUTE_SHADER_BIT,
+ vk.ACCESS_SHADER_READ_BIT|vk.ACCESS_SHADER_WRITE_BIT,
+ )
+}
+
+func (b *Backend) BindUniforms(buffer driver.Buffer) {
+ buf := buffer.(*Buffer)
+ cmdBuf := b.currentCmdBuf()
+ for _, s := range b.pipe.pushRanges {
+ off := s.Offset()
+ vk.CmdPushConstants(cmdBuf, b.pipe.desc.layout, s.StageFlags(), off, buf.store[off:off+s.Size()])
+ }
+}
+
+func (b *Backend) BindVertexBuffer(buffer driver.Buffer, offset int) {
+ buf := buffer.(*Buffer)
+ cmdBuf := b.currentCmdBuf()
+ b.bindings = b.bindings[:0]
+ b.offsets = b.offsets[:0]
+ for i := 0; i < b.pipe.ninputs; i++ {
+ b.bindings = append(b.bindings, buf.buf)
+ b.offsets = append(b.offsets, vk.DeviceSize(offset))
+ }
+ vk.CmdBindVertexBuffers(cmdBuf, 0, b.bindings, b.offsets)
+}
+
+func (b *Backend) BindIndexBuffer(buffer driver.Buffer) {
+ buf := buffer.(*Buffer)
+ cmdBuf := b.currentCmdBuf()
+ vk.CmdBindIndexBuffer(cmdBuf, buf.buf, 0, vk.INDEX_TYPE_UINT16)
+}
+
+func (b *Buffer) Download(data []byte) error {
+ if b.buf == 0 {
+ copy(data, b.store)
+ return nil
+ }
+ stage, mem, off := b.backend.stagingBuffer(len(data))
+ cmdBuf := b.backend.ensureCmdBuf()
+ b.barrier(cmdBuf,
+ vk.PIPELINE_STAGE_TRANSFER_BIT,
+ vk.ACCESS_TRANSFER_READ_BIT,
+ )
+ vk.CmdCopyBuffer(cmdBuf, b.buf, stage.buf, 0, off, len(data))
+ stage.scope.stage = vk.PIPELINE_STAGE_TRANSFER_BIT
+ stage.scope.access = vk.ACCESS_TRANSFER_WRITE_BIT
+ stage.barrier(cmdBuf,
+ vk.PIPELINE_STAGE_HOST_BIT,
+ vk.ACCESS_HOST_READ_BIT,
+ )
+ b.backend.submitCmdBuf(true)
+ copy(data, mem)
+ return nil
+}
+
+func (b *Buffer) Upload(data []byte) {
+ if b.buf == 0 {
+ copy(b.store, data)
+ return
+ }
+ stage, mem, off := b.backend.stagingBuffer(len(data))
+ copy(mem, data)
+ cmdBuf := b.backend.ensureCmdBuf()
+ b.barrier(cmdBuf,
+ vk.PIPELINE_STAGE_TRANSFER_BIT,
+ vk.ACCESS_TRANSFER_WRITE_BIT,
+ )
+ vk.CmdCopyBuffer(cmdBuf, stage.buf, b.buf, off, 0, len(data))
+ var access vk.AccessFlags
+ if b.usage&vk.BUFFER_USAGE_INDEX_BUFFER_BIT != 0 {
+ access |= vk.ACCESS_INDEX_READ_BIT
+ }
+ if b.usage&vk.BUFFER_USAGE_VERTEX_BUFFER_BIT != 0 {
+ access |= vk.ACCESS_VERTEX_ATTRIBUTE_READ_BIT
+ }
+ if access != 0 {
+ b.barrier(cmdBuf,
+ vk.PIPELINE_STAGE_VERTEX_INPUT_BIT,
+ access,
+ )
+ }
+}
+
+func (b *Buffer) barrier(cmdBuf vk.CommandBuffer, stage vk.PipelineStageFlags, access vk.AccessFlags) {
+ srcStage := b.scope.stage
+ if srcStage == 0 {
+ b.scope.stage = stage
+ b.scope.access = access
+ return
+ }
+ barrier := vk.BuildBufferMemoryBarrier(
+ b.buf,
+ b.scope.access, access,
+ )
+ vk.CmdPipelineBarrier(cmdBuf, srcStage, stage, vk.DEPENDENCY_BY_REGION_BIT, nil, []vk.BufferMemoryBarrier{barrier}, nil)
+ b.scope.stage = stage
+ b.scope.access = access
+}
+
+func (b *Buffer) Release() {
+ freeb := *b
+ if freeb.buf != 0 {
+ b.backend.deferFunc(func(d vk.Device) {
+ vk.DestroyBuffer(d, freeb.buf)
+ vk.FreeMemory(d, freeb.mem)
+ })
+ }
+ *b = Buffer{}
+}
+
+func (t *Texture) ReadPixels(src image.Rectangle, pixels []byte, stride int) error {
+ if len(pixels) == 0 {
+ return nil
+ }
+ sz := src.Size()
+ stageStride := sz.X * 4
+ n := sz.Y * stageStride
+ stage, mem, off := t.backend.stagingBuffer(n)
+ cmdBuf := t.backend.ensureCmdBuf()
+ region := vk.BuildBufferImageCopy(off, stageStride/4, src.Min.X, src.Min.Y, sz.X, sz.Y)
+ t.imageBarrier(cmdBuf,
+ vk.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
+ vk.PIPELINE_STAGE_TRANSFER_BIT,
+ vk.ACCESS_TRANSFER_READ_BIT,
+ )
+ vk.CmdCopyImageToBuffer(cmdBuf, t.img, t.layout, stage.buf, []vk.BufferImageCopy{region})
+ stage.scope.stage = vk.PIPELINE_STAGE_TRANSFER_BIT
+ stage.scope.access = vk.ACCESS_TRANSFER_WRITE_BIT
+ stage.barrier(cmdBuf,
+ vk.PIPELINE_STAGE_HOST_BIT,
+ vk.ACCESS_HOST_READ_BIT,
+ )
+ t.backend.submitCmdBuf(true)
+ var srcOff, dstOff int
+ for y := 0; y < sz.Y; y++ {
+ dstRow := pixels[srcOff : srcOff+stageStride]
+ srcRow := mem[dstOff : dstOff+stageStride]
+ copy(dstRow, srcRow)
+ dstOff += stageStride
+ srcOff += stride
+ }
+ return nil
+}
+
+func (b *Backend) currentCmdBuf() vk.CommandBuffer {
+ cur := b.cmdPool.current
+ if cur == nil {
+ panic("vulkan: invalid operation outside a render or compute pass")
+ }
+ return cur
+}
+
+func (b *Backend) ensureCmdBuf() vk.CommandBuffer {
+ if b.cmdPool.current != nil {
+ return b.cmdPool.current
+ }
+ if b.cmdPool.used < len(b.cmdPool.buffers) {
+ buf := b.cmdPool.buffers[b.cmdPool.used]
+ b.cmdPool.current = buf
+ } else {
+ buf, err := vk.AllocateCommandBuffer(b.dev, b.cmdPool.pool)
+ if err != nil {
+ panic(err)
+ }
+ b.cmdPool.buffers = append(b.cmdPool.buffers, buf)
+ b.cmdPool.current = buf
+ }
+ b.cmdPool.used++
+ buf := b.cmdPool.current
+ if err := vk.BeginCommandBuffer(buf); err != nil {
+ panic(err)
+ }
+ return buf
+}
+
+func (b *Backend) BeginRenderPass(tex driver.Texture, d driver.LoadDesc) {
+ t := tex.(*Texture)
+ var vkop vk.AttachmentLoadOp
+ switch d.Action {
+ case driver.LoadActionClear:
+ vkop = vk.ATTACHMENT_LOAD_OP_CLEAR
+ case driver.LoadActionInvalidate:
+ vkop = vk.ATTACHMENT_LOAD_OP_DONT_CARE
+ case driver.LoadActionKeep:
+ vkop = vk.ATTACHMENT_LOAD_OP_LOAD
+ }
+ cmdBuf := b.ensureCmdBuf()
+ if sem := t.acquire; sem != 0 {
+ // The render pass targets a framebuffer that has an associated acquire semaphore.
+ // Wait for it by forming an execution barrier.
+ b.waitSems = append(b.waitSems, sem)
+ b.waitStages = append(b.waitStages, vk.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT)
+ // But only for the first pass in a frame.
+ t.acquire = 0
+ }
+ t.imageBarrier(cmdBuf,
+ vk.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
+ vk.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
+ vk.ACCESS_COLOR_ATTACHMENT_READ_BIT|vk.ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
+ )
+ pass := b.lookupPass(t.format, vkop, t.layout, t.passLayout)
+ col := d.ClearColor
+ vk.CmdBeginRenderPass(cmdBuf, pass, t.fbo, t.width, t.height, [4]float32{col.R, col.G, col.B, col.A})
+ t.layout = t.passLayout
+ // If the render pass describes an automatic image layout transition to its final layout, there
+ // is an implicit image barrier with destination PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT. Make
+ // sure any subsequent barrier includes the transition.
+ // See also https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkSubpassDependency.
+ t.scope.stage |= vk.PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
+}
+
+func (b *Backend) EndRenderPass() {
+ vk.CmdEndRenderPass(b.cmdPool.current)
+}
+
+func (b *Backend) BeginCompute() {
+ b.ensureCmdBuf()
+}
+
+func (b *Backend) EndCompute() {
+}
+
+func (b *Backend) lookupPass(fmt vk.Format, loadAct vk.AttachmentLoadOp, initLayout, finalLayout vk.ImageLayout) vk.RenderPass {
+ key := passKey{fmt: fmt, loadAct: loadAct, initLayout: initLayout, finalLayout: finalLayout}
+ if pass, ok := b.passes[key]; ok {
+ return pass
+ }
+ pass, err := vk.CreateRenderPass(b.dev, fmt, loadAct, initLayout, finalLayout, nil)
+ if err != nil {
+ panic(err)
+ }
+ b.passes[key] = pass
+ return pass
+}
+
+func (b *Backend) submitCmdBuf(sync bool) {
+ buf := b.cmdPool.current
+ if buf == nil {
+ return
+ }
+ b.cmdPool.current = nil
+ if err := vk.EndCommandBuffer(buf); err != nil {
+ panic(err)
+ }
+ var fence vk.Fence
+ if sync {
+ fence = b.fence
+ }
+ if err := vk.QueueSubmit(b.queue, buf, b.waitSems, b.waitStages, b.sigSems, fence); err != nil {
+ panic(err)
+ }
+ b.waitSems = b.waitSems[:0]
+ b.sigSems = b.sigSems[:0]
+ b.waitStages = b.waitStages[:0]
+ if sync {
+ vk.WaitForFences(b.dev, b.fence)
+ vk.ResetFences(b.dev, b.fence)
+ }
+}
+
+func (b *Backend) stagingBuffer(size int) (*Buffer, []byte, int) {
+ if b.staging.size+size > b.staging.cap {
+ if b.staging.buf != nil {
+ vk.UnmapMemory(b.dev, b.staging.buf.mem)
+ b.staging.buf.Release()
+ b.staging.cap = 0
+ }
+ cap := 2 * (b.staging.size + size)
+ buf, err := b.newBuffer(cap, vk.BUFFER_USAGE_TRANSFER_SRC_BIT|vk.BUFFER_USAGE_TRANSFER_DST_BIT,
+ vk.MEMORY_PROPERTY_HOST_VISIBLE_BIT|vk.MEMORY_PROPERTY_HOST_COHERENT_BIT)
+ if err != nil {
+ panic(err)
+ }
+ mem, err := vk.MapMemory(b.dev, buf.mem, 0, cap)
+ if err != nil {
+ buf.Release()
+ panic(err)
+ }
+ b.staging.buf = buf
+ b.staging.mem = mem
+ b.staging.size = 0
+ b.staging.cap = cap
+ }
+ off := b.staging.size
+ b.staging.size += size
+ mem := b.staging.mem[off : off+size]
+ return b.staging.buf, mem, off
+}
+
+func formatFor(format driver.TextureFormat) vk.Format {
+ switch format {
+ case driver.TextureFormatRGBA8:
+ return vk.FORMAT_R8G8B8A8_UNORM
+ case driver.TextureFormatSRGBA:
+ return vk.FORMAT_R8G8B8A8_SRGB
+ case driver.TextureFormatFloat:
+ return vk.FORMAT_R16_SFLOAT
+ default:
+ panic("unsupported texture format")
+ }
+}
+
+func mapErr(err error) error {
+ var vkErr vk.Error
+ if errors.As(err, &vkErr) && vkErr == vk.ERROR_DEVICE_LOST {
+ return driver.ErrDeviceLost
+ }
+ return err
+}
+
+func (f *Texture) ImplementsRenderTarget() {}
diff --git a/vendor/gioui.org/gpu/internal/vulkan/vulkan_nosupport.go b/vendor/gioui.org/gpu/internal/vulkan/vulkan_nosupport.go
new file mode 100644
index 0000000..4364a43
--- /dev/null
+++ b/vendor/gioui.org/gpu/internal/vulkan/vulkan_nosupport.go
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package vulkan
+
+// Empty file to avoid the build error for platforms without Vulkan support.
diff --git a/vendor/gioui.org/gpu/pack.go b/vendor/gioui.org/gpu/pack.go
index c4dbaad..3f8c925 100644
--- a/vendor/gioui.org/gpu/pack.go
+++ b/vendor/gioui.org/gpu/pack.go
@@ -9,8 +9,8 @@ import (
// packer packs a set of many smaller rectangles into
// much fewer larger atlases.
type packer struct {
- maxDim int
- spaces []image.Rectangle
+ maxDims image.Point
+ spaces []image.Rectangle
sizes []image.Point
pos image.Point
@@ -41,45 +41,65 @@ func (p *packer) newPage() {
p.sizes = append(p.sizes, image.Point{})
p.spaces = p.spaces[:0]
p.spaces = append(p.spaces, image.Rectangle{
- Max: image.Point{X: p.maxDim, Y: p.maxDim},
+ Max: image.Point{X: 1e6, Y: 1e6},
})
}
func (p *packer) tryAdd(s image.Point) (placement, bool) {
- // Go backwards to prioritize smaller spaces first.
- for i := len(p.spaces) - 1; i >= 0; i-- {
- space := p.spaces[i]
+ var (
+ bestIdx = -1
+ bestSpace image.Rectangle
+ bestSize = p.maxDims
+ )
+ // Go backwards to prioritize smaller spaces.
+ for i, space := range p.spaces {
rightSpace := space.Dx() - s.X
bottomSpace := space.Dy() - s.Y
- if rightSpace >= 0 && bottomSpace >= 0 {
- // Remove space.
- p.spaces[i] = p.spaces[len(p.spaces)-1]
- p.spaces = p.spaces[:len(p.spaces)-1]
- // Put s in the top left corner and add the (at most)
- // two smaller spaces.
- pos := space.Min
- if bottomSpace > 0 {
- p.spaces = append(p.spaces, image.Rectangle{
- Min: image.Point{X: pos.X, Y: pos.Y + s.Y},
- Max: image.Point{X: space.Max.X, Y: space.Max.Y},
- })
- }
- if rightSpace > 0 {
- p.spaces = append(p.spaces, image.Rectangle{
- Min: image.Point{X: pos.X + s.X, Y: pos.Y},
- Max: image.Point{X: space.Max.X, Y: pos.Y + s.Y},
- })
- }
- idx := len(p.sizes) - 1
- size := &p.sizes[idx]
- if x := pos.X + s.X; x > size.X {
- size.X = x
+ if rightSpace < 0 || bottomSpace < 0 {
+ continue
+ }
+ idx := len(p.sizes) - 1
+ size := p.sizes[idx]
+ if x := space.Min.X + s.X; x > size.X {
+ if x > p.maxDims.X {
+ continue
}
- if y := pos.Y + s.Y; y > size.Y {
- size.Y = y
+ size.X = x
+ }
+ if y := space.Min.Y + s.Y; y > size.Y {
+ if y > p.maxDims.Y {
+ continue
}
- return placement{Idx: idx, Pos: pos}, true
+ size.Y = y
}
+ if size.X*size.Y < bestSize.X*bestSize.Y {
+ bestIdx = i
+ bestSpace = space
+ bestSize = size
+ }
+ }
+ if bestIdx == -1 {
+ return placement{}, false
+ }
+ // Remove space.
+ p.spaces[bestIdx] = p.spaces[len(p.spaces)-1]
+ p.spaces = p.spaces[:len(p.spaces)-1]
+ // Put s in the top left corner and add the (at most)
+ // two smaller spaces.
+ pos := bestSpace.Min
+ if rem := bestSpace.Dy() - s.Y; rem > 0 {
+ p.spaces = append(p.spaces, image.Rectangle{
+ Min: image.Point{X: pos.X, Y: pos.Y + s.Y},
+ Max: image.Point{X: bestSpace.Max.X, Y: bestSpace.Max.Y},
+ })
+ }
+ if rem := bestSpace.Dx() - s.X; rem > 0 {
+ p.spaces = append(p.spaces, image.Rectangle{
+ Min: image.Point{X: pos.X + s.X, Y: pos.Y},
+ Max: image.Point{X: bestSpace.Max.X, Y: pos.Y + s.Y},
+ })
}
- return placement{}, false
+ idx := len(p.sizes) - 1
+ p.sizes[idx] = bestSize
+ return placement{Idx: idx, Pos: pos}, true
}
diff --git a/vendor/gioui.org/gpu/path.go b/vendor/gioui.org/gpu/path.go
index 2dd5875..5fd73cf 100644
--- a/vendor/gioui.org/gpu/path.go
+++ b/vendor/gioui.org/gpu/path.go
@@ -12,13 +12,15 @@ import (
"unsafe"
"gioui.org/f32"
- "gioui.org/gpu/backend"
+ "gioui.org/gpu/internal/driver"
+ "gioui.org/internal/byteslice"
"gioui.org/internal/f32color"
- gunsafe "gioui.org/internal/unsafe"
+ "gioui.org/shader"
+ "gioui.org/shader/gio"
)
type pather struct {
- ctx backend.Device
+ ctx driver.Device
viewport image.Point
@@ -27,28 +29,28 @@ type pather struct {
}
type coverer struct {
- ctx backend.Device
- prog [2]*program
- texUniforms *coverTexUniforms
- colUniforms *coverColUniforms
- layout backend.InputLayout
+ ctx driver.Device
+ pipelines [3]*pipeline
+ texUniforms *coverTexUniforms
+ colUniforms *coverColUniforms
+ linearGradientUniforms *coverLinearGradientUniforms
}
type coverTexUniforms struct {
- vert struct {
- coverUniforms
- _ [12]byte // Padding to multiple of 16.
- }
+ coverUniforms
+ _ [12]byte // Padding to multiple of 16.
}
type coverColUniforms struct {
- vert struct {
- coverUniforms
- _ [12]byte // Padding to multiple of 16.
- }
- frag struct {
- colorUniforms
- }
+ coverUniforms
+ _ [128 - unsafe.Sizeof(coverUniforms{}) - unsafe.Sizeof(colorUniforms{})]byte // Padding to 128 bytes.
+ colorUniforms
+}
+
+type coverLinearGradientUniforms struct {
+ coverUniforms
+ _ [128 - unsafe.Sizeof(coverUniforms{}) - unsafe.Sizeof(gradientUniforms{})]byte // Padding to 128.
+ gradientUniforms
}
type coverUniforms struct {
@@ -60,28 +62,24 @@ type coverUniforms struct {
}
type stenciler struct {
- ctx backend.Device
- prog struct {
- prog *program
+ ctx driver.Device
+ pipeline struct {
+ pipeline *pipeline
uniforms *stencilUniforms
- layout backend.InputLayout
}
- iprog struct {
- prog *program
+ ipipeline struct {
+ pipeline *pipeline
uniforms *intersectUniforms
- layout backend.InputLayout
}
fbos fboSet
intersections fboSet
- indexBuf backend.Buffer
+ indexBuf driver.Buffer
}
type stencilUniforms struct {
- vert struct {
- transform [4]float32
- pathOffset [2]float32
- _ [8]byte // Padding to multiple of 16.
- }
+ transform [4]float32
+ pathOffset [2]float32
+ _ [8]byte // Padding to multiple of 16.
}
type intersectUniforms struct {
@@ -97,13 +95,12 @@ type fboSet struct {
type stencilFBO struct {
size image.Point
- fbo backend.Framebuffer
- tex backend.Texture
+ tex driver.Texture
}
type pathData struct {
ncurves int
- data backend.Buffer
+ data driver.Buffer
}
// vertex data suitable for passing to vertex programs.
@@ -132,10 +129,10 @@ const (
// Number of path quads per draw batch.
pathBatchSize = 10000
// Size of a vertex as sent to gpu
- vertStride = 7*4 + 2*2
+ vertStride = 8 * 4
)
-func newPather(ctx backend.Device) *pather {
+func newPather(ctx driver.Device) *pather {
return &pather{
ctx: ctx,
stenciler: newStenciler(ctx),
@@ -143,25 +140,24 @@ func newPather(ctx backend.Device) *pather {
}
}
-func newCoverer(ctx backend.Device) *coverer {
+func newCoverer(ctx driver.Device) *coverer {
c := &coverer{
ctx: ctx,
}
c.colUniforms = new(coverColUniforms)
c.texUniforms = new(coverTexUniforms)
- prog, layout, err := createColorPrograms(ctx, shader_cover_vert, shader_cover_frag,
- [2]interface{}{&c.colUniforms.vert, &c.texUniforms.vert},
- [2]interface{}{&c.colUniforms.frag, nil},
+ c.linearGradientUniforms = new(coverLinearGradientUniforms)
+ pipelines, err := createColorPrograms(ctx, gio.Shader_cover_vert, gio.Shader_cover_frag,
+ [3]interface{}{c.colUniforms, c.linearGradientUniforms, c.texUniforms},
)
if err != nil {
panic(err)
}
- c.prog = prog
- c.layout = layout
+ c.pipelines = pipelines
return c
}
-func newStenciler(ctx backend.Device) *stenciler {
+func newStenciler(ctx driver.Device) *stenciler {
// Allocate a suitably large index buffer for drawing paths.
indices := make([]uint16, pathBatchSize*6)
for i := 0; i < pathBatchSize; i++ {
@@ -173,51 +169,80 @@ func newStenciler(ctx backend.Device) *stenciler {
indices[i*6+4] = i*4 + 1
indices[i*6+5] = i*4 + 3
}
- indexBuf, err := ctx.NewImmutableBuffer(backend.BufferBindingIndices, gunsafe.BytesView(indices))
+ indexBuf, err := ctx.NewImmutableBuffer(driver.BufferBindingIndices, byteslice.Slice(indices))
if err != nil {
panic(err)
}
- progLayout, err := ctx.NewInputLayout(shader_stencil_vert, []backend.InputDesc{
- {Type: backend.DataTypeFloat, Size: 1, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).Corner))},
- {Type: backend.DataTypeFloat, Size: 1, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).MaxY))},
- {Type: backend.DataTypeFloat, Size: 2, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).FromX))},
- {Type: backend.DataTypeFloat, Size: 2, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).CtrlX))},
- {Type: backend.DataTypeFloat, Size: 2, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).ToX))},
- })
- if err != nil {
- panic(err)
+ progLayout := driver.VertexLayout{
+ Inputs: []driver.InputDesc{
+ {Type: shader.DataTypeFloat, Size: 1, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).Corner))},
+ {Type: shader.DataTypeFloat, Size: 1, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).MaxY))},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).FromX))},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).CtrlX))},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: int(unsafe.Offsetof((*(*vertex)(nil)).ToX))},
+ },
+ Stride: vertStride,
}
- iprogLayout, err := ctx.NewInputLayout(shader_intersect_vert, []backend.InputDesc{
- {Type: backend.DataTypeFloat, Size: 2, Offset: 0},
- {Type: backend.DataTypeFloat, Size: 2, Offset: 4 * 2},
- })
- if err != nil {
- panic(err)
+ iprogLayout := driver.VertexLayout{
+ Inputs: []driver.InputDesc{
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 0},
+ {Type: shader.DataTypeFloat, Size: 2, Offset: 4 * 2},
+ },
+ Stride: 4 * 4,
}
st := &stenciler{
ctx: ctx,
indexBuf: indexBuf,
}
- prog, err := ctx.NewProgram(shader_stencil_vert, shader_stencil_frag)
+ vsh, fsh, err := newShaders(ctx, gio.Shader_stencil_vert, gio.Shader_stencil_frag)
if err != nil {
panic(err)
}
- st.prog.uniforms = new(stencilUniforms)
- vertUniforms := newUniformBuffer(ctx, &st.prog.uniforms.vert)
- st.prog.prog = newProgram(prog, vertUniforms, nil)
- st.prog.layout = progLayout
- iprog, err := ctx.NewProgram(shader_intersect_vert, shader_intersect_frag)
+ defer vsh.Release()
+ defer fsh.Release()
+ st.pipeline.uniforms = new(stencilUniforms)
+ vertUniforms := newUniformBuffer(ctx, st.pipeline.uniforms)
+ pipe, err := st.ctx.NewPipeline(driver.PipelineDesc{
+ VertexShader: vsh,
+ FragmentShader: fsh,
+ VertexLayout: progLayout,
+ BlendDesc: driver.BlendDesc{
+ Enable: true,
+ SrcFactor: driver.BlendFactorOne,
+ DstFactor: driver.BlendFactorOne,
+ },
+ PixelFormat: driver.TextureFormatFloat,
+ Topology: driver.TopologyTriangles,
+ })
+ st.pipeline.pipeline = &pipeline{pipe, vertUniforms}
+ if err != nil {
+ panic(err)
+ }
+ vsh, fsh, err = newShaders(ctx, gio.Shader_intersect_vert, gio.Shader_intersect_frag)
if err != nil {
panic(err)
}
- st.iprog.uniforms = new(intersectUniforms)
- vertUniforms = newUniformBuffer(ctx, &st.iprog.uniforms.vert)
- st.iprog.prog = newProgram(iprog, vertUniforms, nil)
- st.iprog.layout = iprogLayout
+ defer vsh.Release()
+ defer fsh.Release()
+ st.ipipeline.uniforms = new(intersectUniforms)
+ vertUniforms = newUniformBuffer(ctx, &st.ipipeline.uniforms.vert)
+ ipipe, err := st.ctx.NewPipeline(driver.PipelineDesc{
+ VertexShader: vsh,
+ FragmentShader: fsh,
+ VertexLayout: iprogLayout,
+ BlendDesc: driver.BlendDesc{
+ Enable: true,
+ SrcFactor: driver.BlendFactorDstColor,
+ DstFactor: driver.BlendFactorZero,
+ },
+ PixelFormat: driver.TextureFormatFloat,
+ Topology: driver.TopologyTriangleStrip,
+ })
+ st.ipipeline.pipeline = &pipeline{ipipe, vertUniforms}
return st
}
-func (s *fboSet) resize(ctx backend.Device, sizes []image.Point) {
+func (s *fboSet) resize(ctx driver.Device, sizes []image.Point) {
// Add fbos.
for i := len(s.fbos); i < len(sizes); i++ {
s.fbos = append(s.fbos, stencilFBO{})
@@ -231,38 +256,25 @@ func (s *fboSet) resize(ctx backend.Device, sizes []image.Point) {
waste := float32(sz.X*sz.Y) / float32(f.size.X*f.size.Y)
resize = resize || waste > 1.2
if resize {
- if f.fbo != nil {
- f.fbo.Release()
+ if f.tex != nil {
f.tex.Release()
}
- tex, err := ctx.NewTexture(backend.TextureFormatFloat, sz.X, sz.Y, backend.FilterNearest, backend.FilterNearest,
- backend.BufferBindingTexture|backend.BufferBindingFramebuffer)
- if err != nil {
- panic(err)
- }
- fbo, err := ctx.NewFramebuffer(tex, 0)
+ tex, err := ctx.NewTexture(driver.TextureFormatFloat, sz.X, sz.Y, driver.FilterNearest, driver.FilterNearest,
+ driver.BufferBindingTexture|driver.BufferBindingFramebuffer)
if err != nil {
panic(err)
}
f.size = sz
f.tex = tex
- f.fbo = fbo
}
}
// Delete extra fbos.
s.delete(ctx, len(sizes))
}
-func (s *fboSet) invalidate(ctx backend.Device) {
- for _, f := range s.fbos {
- f.fbo.Invalidate()
- }
-}
-
-func (s *fboSet) delete(ctx backend.Device, idx int) {
+func (s *fboSet) delete(ctx driver.Device, idx int) {
for i := idx; i < len(s.fbos); i++ {
f := s.fbos[i]
- f.fbo.Release()
f.tex.Release()
}
s.fbos = s.fbos[:idx]
@@ -270,10 +282,9 @@ func (s *fboSet) delete(ctx backend.Device, idx int) {
func (s *stenciler) release() {
s.fbos.delete(s.ctx, 0)
- s.prog.layout.Release()
- s.prog.prog.Release()
- s.iprog.layout.Release()
- s.iprog.prog.Release()
+ s.intersections.delete(s.ctx, 0)
+ s.pipeline.pipeline.Release()
+ s.ipipeline.pipeline.Release()
s.indexBuf.Release()
}
@@ -283,14 +294,13 @@ func (p *pather) release() {
}
func (c *coverer) release() {
- for _, p := range c.prog {
+ for _, p := range c.pipelines {
p.Release()
}
- c.layout.Release()
}
-func buildPath(ctx backend.Device, p []byte) pathData {
- buf, err := ctx.NewImmutableBuffer(backend.BufferBindingVertices, p)
+func buildPath(ctx driver.Device, p []byte) pathData {
+ buf, err := ctx.NewImmutableBuffer(driver.BufferBindingVertices, p)
if err != nil {
panic(err)
}
@@ -313,17 +323,10 @@ func (p *pather) stencilPath(bounds image.Rectangle, offset f32.Point, uv image.
}
func (s *stenciler) beginIntersect(sizes []image.Point) {
- s.ctx.BlendFunc(backend.BlendFactorDstColor, backend.BlendFactorZero)
// 8 bit coverage is enough, but OpenGL ES only supports single channel
// floating point formats. Replace with GL_RGB+GL_UNSIGNED_BYTE if
// no floating point support is available.
s.intersections.resize(s.ctx, sizes)
- s.ctx.BindProgram(s.iprog.prog.prog)
-}
-
-func (s *stenciler) invalidateFBO() {
- s.intersections.invalidate(s.ctx)
- s.fbos.invalidate(s.ctx)
}
func (s *stenciler) cover(idx int) stencilFBO {
@@ -331,11 +334,7 @@ func (s *stenciler) cover(idx int) stencilFBO {
}
func (s *stenciler) begin(sizes []image.Point) {
- s.ctx.BlendFunc(backend.BlendFactorOne, backend.BlendFactorOne)
s.fbos.resize(s.ctx, sizes)
- s.ctx.BindProgram(s.prog.prog.prog)
- s.ctx.BindInputLayout(s.prog.layout)
- s.ctx.BindIndexBuffer(s.indexBuf)
}
func (s *stenciler) stencilPath(bounds image.Rectangle, offset f32.Point, uv image.Point, data pathData) {
@@ -344,9 +343,9 @@ func (s *stenciler) stencilPath(bounds image.Rectangle, offset f32.Point, uv ima
texSize := f32.Point{X: float32(bounds.Dx()), Y: float32(bounds.Dy())}
scale := f32.Point{X: 2 / texSize.X, Y: 2 / texSize.Y}
orig := f32.Point{X: -1 - float32(bounds.Min.X)*2/texSize.X, Y: -1 - float32(bounds.Min.Y)*2/texSize.Y}
- s.prog.uniforms.vert.transform = [4]float32{scale.X, scale.Y, orig.X, orig.Y}
- s.prog.uniforms.vert.pathOffset = [2]float32{offset.X, offset.Y}
- s.prog.prog.UploadUniforms()
+ s.pipeline.uniforms.transform = [4]float32{scale.X, scale.Y, orig.X, orig.Y}
+ s.pipeline.uniforms.pathOffset = [2]float32{offset.X, offset.Y}
+ s.pipeline.pipeline.UploadUniforms(s.ctx)
// Draw in batches that fit in uint16 indices.
start := 0
nquads := data.ncurves / 4
@@ -356,35 +355,40 @@ func (s *stenciler) stencilPath(bounds image.Rectangle, offset f32.Point, uv ima
batch = max
}
off := vertStride * start * 4
- s.ctx.BindVertexBuffer(data.data, vertStride, off)
- s.ctx.DrawElements(backend.DrawModeTriangles, 0, batch*6)
+ s.ctx.BindVertexBuffer(data.data, off)
+ s.ctx.DrawElements(0, batch*6)
start += batch
}
}
-func (p *pather) cover(z float32, mat materialType, col f32color.RGBA, scale, off f32.Point, uvTrans f32.Affine2D, coverScale, coverOff f32.Point) {
- p.coverer.cover(z, mat, col, scale, off, uvTrans, coverScale, coverOff)
+func (p *pather) cover(mat materialType, col f32color.RGBA, col1, col2 f32color.RGBA, scale, off f32.Point, uvTrans f32.Affine2D, coverScale, coverOff f32.Point) {
+ p.coverer.cover(mat, col, col1, col2, scale, off, uvTrans, coverScale, coverOff)
}
-func (c *coverer) cover(z float32, mat materialType, col f32color.RGBA, scale, off f32.Point, uvTrans f32.Affine2D, coverScale, coverOff f32.Point) {
- p := c.prog[mat]
- c.ctx.BindProgram(p.prog)
+func (c *coverer) cover(mat materialType, col f32color.RGBA, col1, col2 f32color.RGBA, scale, off f32.Point, uvTrans f32.Affine2D, coverScale, coverOff f32.Point) {
var uniforms *coverUniforms
switch mat {
case materialColor:
- c.colUniforms.frag.color = col
- uniforms = &c.colUniforms.vert.coverUniforms
+ c.colUniforms.color = col
+ uniforms = &c.colUniforms.coverUniforms
+ case materialLinearGradient:
+ c.linearGradientUniforms.color1 = col1
+ c.linearGradientUniforms.color2 = col2
+
+ t1, t2, t3, t4, t5, t6 := uvTrans.Elems()
+ c.linearGradientUniforms.uvTransformR1 = [4]float32{t1, t2, t3, 0}
+ c.linearGradientUniforms.uvTransformR2 = [4]float32{t4, t5, t6, 0}
+ uniforms = &c.linearGradientUniforms.coverUniforms
case materialTexture:
t1, t2, t3, t4, t5, t6 := uvTrans.Elems()
- c.texUniforms.vert.uvTransformR1 = [4]float32{t1, t2, t3, 0}
- c.texUniforms.vert.uvTransformR2 = [4]float32{t4, t5, t6, 0}
- uniforms = &c.texUniforms.vert.coverUniforms
+ c.texUniforms.uvTransformR1 = [4]float32{t1, t2, t3, 0}
+ c.texUniforms.uvTransformR2 = [4]float32{t4, t5, t6, 0}
+ uniforms = &c.texUniforms.coverUniforms
}
- uniforms.z = z
uniforms.transform = [4]float32{scale.X, scale.Y, off.X, off.Y}
uniforms.uvCoverTransform = [4]float32{coverScale.X, coverScale.Y, coverOff.X, coverOff.Y}
- p.UploadUniforms()
- c.ctx.DrawArrays(backend.DrawModeTriangleStrip, 0, 4)
+ c.pipelines[mat].UploadUniforms(c.ctx)
+ c.ctx.DrawArrays(0, 4)
}
func init() {
diff --git a/vendor/gioui.org/gpu/shaders.go b/vendor/gioui.org/gpu/shaders.go
deleted file mode 100644
index d8e8435..0000000
--- a/vendor/gioui.org/gpu/shaders.go
+++ /dev/null
@@ -1,657 +0,0 @@
-// Code generated by build.go. DO NOT EDIT.
-
-package gpu
-
-import "gioui.org/gpu/backend"
-
-var (
- shader_blit_frag = [...]backend.ShaderSources{
- {
- Uniforms: backend.UniformsReflection{
- Blocks: []backend.UniformBlock{{Name: "Color", Binding: 0}},
- Locations: []backend.UniformLocation{{Name: "_12._color", Type: 0x0, Size: 4, Offset: 0}},
- Size: 16,
- },
- GLSL100ES: "precision mediump float;\nprecision highp int;\n\nstruct Color\n{\n vec4 _color;\n};\n\nuniform Color _12;\n\nvarying vec2 vUV;\n\nvoid main()\n{\n gl_FragData[0] = _12._color;\n}\n\n",
- GLSL300ES: "#version 300 es\nprecision mediump float;\nprecision highp int;\n\nlayout(std140) uniform Color\n{\n vec4 _color;\n} _12;\n\nlayout(location = 0) out vec4 fragColor;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = _12._color;\n}\n\n",
- GLSL130: "#version 130\n\nstruct Color\n{\n vec4 _color;\n};\n\nuniform Color _12;\n\nout vec4 fragColor;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = _12._color;\n}\n\n",
- GLSL150: "#version 150\n\nstruct Color\n{\n vec4 _color;\n};\n\nuniform Color _12;\n\nout vec4 fragColor;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = _12._color;\n}\n\n",
- /*
- cbuffer Color : register(b0)
- {
- float4 _12_color : packoffset(c0);
- };
-
-
- static float4 fragColor;
- static float2 vUV;
-
- struct SPIRV_Cross_Input
- {
- float2 vUV : TEXCOORD0;
- };
-
- struct SPIRV_Cross_Output
- {
- float4 fragColor : SV_Target0;
- };
-
- void frag_main()
- {
- fragColor = _12_color;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- vUV = stage_input.vUV;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.fragColor = fragColor;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0xc6, 0x4a, 0x23, 0x81, 0x87, 0xab, 0xe3, 0xca, 0x12, 0x9, 0x7e, 0x2f, 0x5e, 0x2, 0x62, 0x14, 0x1, 0x0, 0x0, 0x0, 0x70, 0x2, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x84, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x48, 0x1, 0x0, 0x0, 0x8, 0x2, 0x0, 0x0, 0x3c, 0x2, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0x44, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x14, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x1, 0x0, 0x0, 0x2, 0x0, 0x8, 0xf, 0x80, 0x0, 0x0, 0xe4, 0xa0, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x40, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x4, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x6, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0xb8, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x0, 0x1, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x0, 0xab, 0xab, 0x3c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x74, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x31, 0x32, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x0, 0xab, 0xab, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x0, 0xab, 0xab},
- },
- {
- Textures: []backend.TextureBinding{{Name: "tex", Binding: 0}},
- GLSL100ES: "precision mediump float;\nprecision highp int;\n\nuniform mediump sampler2D tex;\n\nvarying vec2 vUV;\n\nvoid main()\n{\n gl_FragData[0] = texture2D(tex, vUV);\n}\n\n",
- GLSL300ES: "#version 300 es\nprecision mediump float;\nprecision highp int;\n\nuniform mediump sampler2D tex;\n\nlayout(location = 0) out vec4 fragColor;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = texture(tex, vUV);\n}\n\n",
- GLSL130: "#version 130\n\nuniform sampler2D tex;\n\nout vec4 fragColor;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = texture(tex, vUV);\n}\n\n",
- GLSL150: "#version 150\n\nuniform sampler2D tex;\n\nout vec4 fragColor;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = texture(tex, vUV);\n}\n\n",
- /*
- Texture2D<float4> tex : register(t0);
- SamplerState _tex_sampler : register(s0);
-
- static float4 fragColor;
- static float2 vUV;
-
- struct SPIRV_Cross_Input
- {
- float2 vUV : TEXCOORD0;
- };
-
- struct SPIRV_Cross_Output
- {
- float4 fragColor : SV_Target0;
- };
-
- void frag_main()
- {
- fragColor = tex.Sample(_tex_sampler, vUV);
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- vUV = stage_input.vUV;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.fragColor = fragColor;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0xb7, 0x3f, 0x1d, 0xb1, 0x80, 0xcd, 0x80, 0xa3, 0x57, 0x9, 0xfb, 0x5a, 0x9f, 0x56, 0xd6, 0xda, 0x1, 0x0, 0x0, 0x0, 0x94, 0x2, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0xa4, 0x0, 0x0, 0x0, 0x10, 0x1, 0x0, 0x0, 0x8c, 0x1, 0x0, 0x0, 0x2c, 0x2, 0x0, 0x0, 0x60, 0x2, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0x64, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x3c, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x28, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x3, 0xb0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x90, 0x0, 0x8, 0xf, 0xa0, 0x42, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0x80, 0x0, 0x0, 0xe4, 0xb0, 0x0, 0x8, 0xe4, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x8, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x64, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x19, 0x0, 0x0, 0x0, 0x5a, 0x0, 0x0, 0x3, 0x0, 0x60, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x58, 0x18, 0x0, 0x4, 0x0, 0x70, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x55, 0x55, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x9, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x7e, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x60, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0x98, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x0, 0x1, 0x0, 0x0, 0x6d, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x69, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0x5f, 0x74, 0x65, 0x78, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x0, 0x74, 0x65, 0x78, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x0, 0xab, 0xab},
- },
- }
- shader_blit_vert = backend.ShaderSources{
- Inputs: []backend.InputLocation{{Name: "pos", Location: 0, Semantic: "POSITION", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "NORMAL", SemanticIndex: 0, Type: 0x0, Size: 2}},
- Uniforms: backend.UniformsReflection{
- Blocks: []backend.UniformBlock{{Name: "Block", Binding: 0}},
- Locations: []backend.UniformLocation{{Name: "_52.transform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_52.uvTransformR1", Type: 0x0, Size: 4, Offset: 16}, {Name: "_52.uvTransformR2", Type: 0x0, Size: 4, Offset: 32}, {Name: "_52.z", Type: 0x0, Size: 1, Offset: 48}},
- Size: 52,
- },
- GLSL100ES: "\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 transform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n};\n\nuniform Block _52;\n\nattribute vec2 pos;\nvarying vec2 vUV;\nattribute vec2 uv;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec2 p = (pos * _52.transform.xy) + _52.transform.zw;\n vec4 param = vec4(p, _52.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_52.uvTransformR1.xyz, _52.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n}\n\n",
- GLSL300ES: "#version 300 es\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nlayout(std140) uniform Block\n{\n vec4 transform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n} _52;\n\nlayout(location = 0) in vec2 pos;\nout vec2 vUV;\nlayout(location = 1) in vec2 uv;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec2 p = (pos * _52.transform.xy) + _52.transform.zw;\n vec4 param = vec4(p, _52.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_52.uvTransformR1.xyz, _52.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n}\n\n",
- GLSL130: "#version 130\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 transform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n};\n\nuniform Block _52;\n\nin vec2 pos;\nout vec2 vUV;\nin vec2 uv;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec2 p = (pos * _52.transform.xy) + _52.transform.zw;\n vec4 param = vec4(p, _52.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_52.uvTransformR1.xyz, _52.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n}\n\n",
- GLSL150: "#version 150\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 transform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n};\n\nuniform Block _52;\n\nin vec2 pos;\nout vec2 vUV;\nin vec2 uv;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec2 p = (pos * _52.transform.xy) + _52.transform.zw;\n vec4 param = vec4(p, _52.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_52.uvTransformR1.xyz, _52.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n}\n\n",
- /*
- struct m3x2
- {
- float3 r0;
- float3 r1;
- };
-
- static const m3x2 _116 = { float3(1.0f, 0.0f, 0.0f), float3(0.0f, -1.0f, 1.0f) };
- static const m3x2 _118 = { float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f) };
-
- cbuffer Block : register(b0)
- {
- float4 _69_transform : packoffset(c0);
- float4 _69_uvTransformR1 : packoffset(c1);
- float4 _69_uvTransformR2 : packoffset(c2);
- float _69_z : packoffset(c3);
- };
-
-
- static float4 gl_Position;
- static float2 pos;
- static float2 vUV;
- static float2 uv;
-
- struct SPIRV_Cross_Input
- {
- float2 pos : POSITION;
- float2 uv : NORMAL;
- };
-
- struct SPIRV_Cross_Output
- {
- float2 vUV : TEXCOORD0;
- float4 gl_Position : SV_Position;
- };
-
- float4 toClipSpace(float4 pos_1)
- {
- return float4(pos_1.xy, (pos_1.z + pos_1.w) * 0.5f, pos_1.w);
- }
-
- float3 transform3x2(m3x2 t, float3 v)
- {
- return float3(dot(t.r0, v), dot(t.r1, v), dot(float3(0.0f, 0.0f, 1.0f), v));
- }
-
- void vert_main()
- {
- float2 p = (pos * _69_transform.xy) + _69_transform.zw;
- float4 param = float4(p, _69_z, 1.0f);
- gl_Position = toClipSpace(param);
- m3x2 _103 = { _69_uvTransformR1.xyz, _69_uvTransformR2.xyz };
- m3x2 param_1 = _103;
- float3 param_2 = float3(uv, 1.0f);
- vUV = transform3x2(param_1, param_2).xy;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- pos = stage_input.pos;
- uv = stage_input.uv;
- vert_main();
- SPIRV_Cross_Output stage_output;
- stage_output.gl_Position = gl_Position;
- stage_output.vUV = vUV;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0x57, 0x0, 0x34, 0xa, 0xf6, 0x3b, 0x1b, 0xc4, 0x28, 0xa1, 0x26, 0x75, 0x95, 0x95, 0xc4, 0x27, 0x1, 0x0, 0x0, 0x0, 0xc0, 0x4, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x24, 0x1, 0x0, 0x0, 0x54, 0x2, 0x0, 0x0, 0xd0, 0x2, 0x0, 0x0, 0x18, 0x4, 0x0, 0x0, 0x68, 0x4, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0xe4, 0x0, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x24, 0x0, 0x1, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0x51, 0x0, 0x0, 0x5, 0x5, 0x0, 0xf, 0xa0, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x1, 0x80, 0x1, 0x0, 0xf, 0x90, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x7, 0x80, 0x1, 0x0, 0xc4, 0x90, 0x5, 0x0, 0xd0, 0xa0, 0x5, 0x0, 0xc5, 0xa0, 0x8, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0xe0, 0x2, 0x0, 0xe4, 0xa0, 0x0, 0x0, 0xe4, 0x80, 0x8, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0xe0, 0x3, 0x0, 0xe4, 0xa0, 0x0, 0x0, 0xe4, 0x80, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0x90, 0x1, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0xee, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x3, 0xc0, 0x0, 0x0, 0xe4, 0x80, 0x0, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0x7, 0x80, 0x5, 0x0, 0xe4, 0xa0, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0xc, 0xc0, 0x4, 0x0, 0x0, 0xa0, 0x0, 0x0, 0x64, 0x80, 0x0, 0x0, 0x24, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x28, 0x1, 0x0, 0x0, 0x40, 0x0, 0x1, 0x0, 0x4a, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x4, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0x32, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x67, 0x0, 0x0, 0x4, 0xf2, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x1, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x32, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x42, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x10, 0x0, 0x0, 0x8, 0x12, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x82, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x2, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x8, 0x22, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x82, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x46, 0x2, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xb, 0x32, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0x8a, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xa, 0x42, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x36, 0x0, 0x0, 0x5, 0x82, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0x40, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xfe, 0xff, 0x0, 0x1, 0x0, 0x0, 0x18, 0x1, 0x0, 0x0, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x0, 0xab, 0xab, 0x3c, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdc, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xee, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x36, 0x39, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x0, 0xab, 0xab, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x36, 0x39, 0x5f, 0x75, 0x76, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x31, 0x0, 0x5f, 0x36, 0x39, 0x5f, 0x75, 0x76, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x32, 0x0, 0x5f, 0x36, 0x39, 0x5f, 0x7a, 0x0, 0xab, 0xab, 0x0, 0x0, 0x3, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x0, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x0, 0x4f, 0x53, 0x47, 0x4e, 0x50, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x0, 0xab, 0xab, 0xab},
- }
- shader_cover_frag = [...]backend.ShaderSources{
- {
- Uniforms: backend.UniformsReflection{
- Blocks: []backend.UniformBlock{{Name: "Color", Binding: 0}},
- Locations: []backend.UniformLocation{{Name: "_12._color", Type: 0x0, Size: 4, Offset: 0}},
- Size: 16,
- },
- Textures: []backend.TextureBinding{{Name: "cover", Binding: 1}},
- GLSL100ES: "precision mediump float;\nprecision highp int;\n\nstruct Color\n{\n vec4 _color;\n};\n\nuniform Color _12;\n\nuniform mediump sampler2D cover;\n\nvarying highp vec2 vCoverUV;\nvarying vec2 vUV;\n\nvoid main()\n{\n gl_FragData[0] = _12._color;\n float cover_1 = abs(texture2D(cover, vCoverUV).x);\n gl_FragData[0] *= cover_1;\n}\n\n",
- GLSL300ES: "#version 300 es\nprecision mediump float;\nprecision highp int;\n\nlayout(std140) uniform Color\n{\n vec4 _color;\n} _12;\n\nuniform mediump sampler2D cover;\n\nlayout(location = 0) out vec4 fragColor;\nin highp vec2 vCoverUV;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = _12._color;\n float cover_1 = abs(texture(cover, vCoverUV).x);\n fragColor *= cover_1;\n}\n\n",
- GLSL130: "#version 130\n\nstruct Color\n{\n vec4 _color;\n};\n\nuniform Color _12;\n\nuniform sampler2D cover;\n\nout vec4 fragColor;\nin vec2 vCoverUV;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = _12._color;\n float cover_1 = abs(texture(cover, vCoverUV).x);\n fragColor *= cover_1;\n}\n\n",
- GLSL150: "#version 150\n\nstruct Color\n{\n vec4 _color;\n};\n\nuniform Color _12;\n\nuniform sampler2D cover;\n\nout vec4 fragColor;\nin vec2 vCoverUV;\nin vec2 vUV;\n\nvoid main()\n{\n fragColor = _12._color;\n float cover_1 = abs(texture(cover, vCoverUV).x);\n fragColor *= cover_1;\n}\n\n",
- /*
- cbuffer Color : register(b0)
- {
- float4 _12_color : packoffset(c0);
- };
-
- Texture2D<float4> cover : register(t1);
- SamplerState _cover_sampler : register(s1);
-
- static float4 fragColor;
- static float2 vCoverUV;
- static float2 vUV;
-
- struct SPIRV_Cross_Input
- {
- float2 vCoverUV : TEXCOORD0;
- float2 vUV : TEXCOORD1;
- };
-
- struct SPIRV_Cross_Output
- {
- float4 fragColor : SV_Target0;
- };
-
- void frag_main()
- {
- fragColor = _12_color;
- float cover_1 = abs(cover.Sample(_cover_sampler, vCoverUV).x);
- fragColor *= cover_1;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- vCoverUV = stage_input.vCoverUV;
- vUV = stage_input.vUV;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.fragColor = fragColor;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0x94, 0xe9, 0xc3, 0x12, 0xd8, 0xfb, 0xb, 0x3b, 0xe, 0xda, 0x43, 0x25, 0xcb, 0x53, 0x1c, 0x9d, 0x1, 0x0, 0x0, 0x0, 0x84, 0x3, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x74, 0x1, 0x0, 0x0, 0xf0, 0x1, 0x0, 0x0, 0x4, 0x3, 0x0, 0x0, 0x50, 0x3, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0x8c, 0x0, 0x0, 0x0, 0x8c, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x58, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x1, 0x0, 0x28, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x34, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x34, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0xb0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x90, 0x0, 0x8, 0xf, 0xa0, 0x42, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0x80, 0x0, 0x0, 0xe4, 0xb0, 0x0, 0x8, 0xe4, 0xa0, 0x23, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x8, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0xa0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x4, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5a, 0x0, 0x0, 0x3, 0x0, 0x60, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x58, 0x18, 0x0, 0x4, 0x0, 0x70, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x55, 0x55, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x1, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x9, 0xf2, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x7e, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x60, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x9, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x10, 0x80, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0xc, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x98, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x0, 0x1, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x0, 0x7c, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8b, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0x91, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5f, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x0, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x0, 0xab, 0x91, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x31, 0x32, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x0, 0xab, 0xab, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0x49, 0x53, 0x47, 0x4e, 0x44, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x0, 0xab, 0xab},
- },
- {
- Textures: []backend.TextureBinding{{Name: "tex", Binding: 0}, {Name: "cover", Binding: 1}},
- GLSL100ES: "precision mediump float;\nprecision highp int;\n\nuniform mediump sampler2D tex;\nuniform mediump sampler2D cover;\n\nvarying vec2 vUV;\nvarying highp vec2 vCoverUV;\n\nvoid main()\n{\n gl_FragData[0] = texture2D(tex, vUV);\n float cover_1 = abs(texture2D(cover, vCoverUV).x);\n gl_FragData[0] *= cover_1;\n}\n\n",
- GLSL300ES: "#version 300 es\nprecision mediump float;\nprecision highp int;\n\nuniform mediump sampler2D tex;\nuniform mediump sampler2D cover;\n\nlayout(location = 0) out vec4 fragColor;\nin vec2 vUV;\nin highp vec2 vCoverUV;\n\nvoid main()\n{\n fragColor = texture(tex, vUV);\n float cover_1 = abs(texture(cover, vCoverUV).x);\n fragColor *= cover_1;\n}\n\n",
- GLSL130: "#version 130\n\nuniform sampler2D tex;\nuniform sampler2D cover;\n\nout vec4 fragColor;\nin vec2 vUV;\nin vec2 vCoverUV;\n\nvoid main()\n{\n fragColor = texture(tex, vUV);\n float cover_1 = abs(texture(cover, vCoverUV).x);\n fragColor *= cover_1;\n}\n\n",
- GLSL150: "#version 150\n\nuniform sampler2D tex;\nuniform sampler2D cover;\n\nout vec4 fragColor;\nin vec2 vUV;\nin vec2 vCoverUV;\n\nvoid main()\n{\n fragColor = texture(tex, vUV);\n float cover_1 = abs(texture(cover, vCoverUV).x);\n fragColor *= cover_1;\n}\n\n",
- /*
- Texture2D<float4> tex : register(t0);
- SamplerState _tex_sampler : register(s0);
- Texture2D<float4> cover : register(t1);
- SamplerState _cover_sampler : register(s1);
-
- static float4 fragColor;
- static float2 vUV;
- static float2 vCoverUV;
-
- struct SPIRV_Cross_Input
- {
- float2 vCoverUV : TEXCOORD0;
- float2 vUV : TEXCOORD1;
- };
-
- struct SPIRV_Cross_Output
- {
- float4 fragColor : SV_Target0;
- };
-
- void frag_main()
- {
- fragColor = tex.Sample(_tex_sampler, vUV);
- float cover_1 = abs(cover.Sample(_cover_sampler, vCoverUV).x);
- fragColor *= cover_1;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- vUV = stage_input.vUV;
- vCoverUV = stage_input.vCoverUV;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.fragColor = fragColor;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0xcb, 0xa0, 0xb0, 0x5b, 0x6e, 0x48, 0xa6, 0x5a, 0x1c, 0x34, 0x50, 0xfe, 0xd4, 0x6f, 0x72, 0xb5, 0x1, 0x0, 0x0, 0x0, 0xbc, 0x3, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0xec, 0x0, 0x0, 0x0, 0xcc, 0x1, 0x0, 0x0, 0x48, 0x2, 0x0, 0x0, 0x3c, 0x3, 0x0, 0x0, 0x88, 0x3, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0xac, 0x0, 0x0, 0x0, 0xac, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0x2c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2c, 0x0, 0x0, 0x0, 0x2c, 0x0, 0x0, 0x0, 0x2c, 0x0, 0x2, 0x0, 0x24, 0x0, 0x0, 0x0, 0x2c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x0, 0x0, 0x2, 0xff, 0xff, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0xb0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x90, 0x0, 0x8, 0xf, 0xa0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x90, 0x1, 0x8, 0xf, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0x1b, 0xb0, 0x42, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x0, 0x8, 0xe4, 0xa0, 0x42, 0x0, 0x0, 0x3, 0x1, 0x0, 0xf, 0x80, 0x0, 0x0, 0xe4, 0xb0, 0x1, 0x8, 0xe4, 0xa0, 0x23, 0x0, 0x0, 0x2, 0x1, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x1, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x2, 0x0, 0x8, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0xd8, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x0, 0x5a, 0x0, 0x0, 0x3, 0x0, 0x60, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5a, 0x0, 0x0, 0x3, 0x0, 0x60, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x58, 0x18, 0x0, 0x4, 0x0, 0x70, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x55, 0x55, 0x0, 0x0, 0x58, 0x18, 0x0, 0x4, 0x0, 0x70, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x55, 0x55, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0xc2, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x9, 0xf2, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0x1a, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x7e, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x60, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x9, 0xf2, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x7e, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x60, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x8, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0xe, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x10, 0x80, 0x81, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0xec, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x0, 0x1, 0x0, 0x0, 0xc2, 0x0, 0x0, 0x0, 0x9c, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa9, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb8, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0xbc, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0x5f, 0x74, 0x65, 0x78, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x0, 0x5f, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x0, 0x74, 0x65, 0x78, 0x0, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x44, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0xc, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x0, 0xab, 0xab},
- },
- }
- shader_cover_vert = backend.ShaderSources{
- Inputs: []backend.InputLocation{{Name: "pos", Location: 0, Semantic: "POSITION", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "NORMAL", SemanticIndex: 0, Type: 0x0, Size: 2}},
- Uniforms: backend.UniformsReflection{
- Blocks: []backend.UniformBlock{{Name: "Block", Binding: 0}},
- Locations: []backend.UniformLocation{{Name: "_53.transform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_53.uvCoverTransform", Type: 0x0, Size: 4, Offset: 16}, {Name: "_53.uvTransformR1", Type: 0x0, Size: 4, Offset: 32}, {Name: "_53.uvTransformR2", Type: 0x0, Size: 4, Offset: 48}, {Name: "_53.z", Type: 0x0, Size: 1, Offset: 64}},
- Size: 68,
- },
- GLSL100ES: "\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 transform;\n vec4 uvCoverTransform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n};\n\nuniform Block _53;\n\nattribute vec2 pos;\nvarying vec2 vUV;\nattribute vec2 uv;\nvarying vec2 vCoverUV;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec4 param = vec4((pos * _53.transform.xy) + _53.transform.zw, _53.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_53.uvTransformR1.xyz, _53.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n m3x2 param_3 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_4 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_3, param_4);\n vCoverUV = ((uv3 * vec3(_53.uvCoverTransform.xy, 1.0)) + vec3(_53.uvCoverTransform.zw, 0.0)).xy;\n}\n\n",
- GLSL300ES: "#version 300 es\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nlayout(std140) uniform Block\n{\n vec4 transform;\n vec4 uvCoverTransform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n} _53;\n\nlayout(location = 0) in vec2 pos;\nout vec2 vUV;\nlayout(location = 1) in vec2 uv;\nout vec2 vCoverUV;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec4 param = vec4((pos * _53.transform.xy) + _53.transform.zw, _53.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_53.uvTransformR1.xyz, _53.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n m3x2 param_3 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_4 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_3, param_4);\n vCoverUV = ((uv3 * vec3(_53.uvCoverTransform.xy, 1.0)) + vec3(_53.uvCoverTransform.zw, 0.0)).xy;\n}\n\n",
- GLSL130: "#version 130\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 transform;\n vec4 uvCoverTransform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n};\n\nuniform Block _53;\n\nin vec2 pos;\nout vec2 vUV;\nin vec2 uv;\nout vec2 vCoverUV;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec4 param = vec4((pos * _53.transform.xy) + _53.transform.zw, _53.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_53.uvTransformR1.xyz, _53.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n m3x2 param_3 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_4 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_3, param_4);\n vCoverUV = ((uv3 * vec3(_53.uvCoverTransform.xy, 1.0)) + vec3(_53.uvCoverTransform.zw, 0.0)).xy;\n}\n\n",
- GLSL150: "#version 150\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 transform;\n vec4 uvCoverTransform;\n vec4 uvTransformR1;\n vec4 uvTransformR2;\n float z;\n};\n\nuniform Block _53;\n\nin vec2 pos;\nout vec2 vUV;\nin vec2 uv;\nout vec2 vCoverUV;\n\nvec4 toClipSpace(vec4 pos_1)\n{\n return pos_1;\n}\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n vec4 param = vec4((pos * _53.transform.xy) + _53.transform.zw, _53.z, 1.0);\n gl_Position = toClipSpace(param);\n m3x2 param_1 = m3x2(_53.uvTransformR1.xyz, _53.uvTransformR2.xyz);\n vec3 param_2 = vec3(uv, 1.0);\n vUV = transform3x2(param_1, param_2).xy;\n m3x2 param_3 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_4 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_3, param_4);\n vCoverUV = ((uv3 * vec3(_53.uvCoverTransform.xy, 1.0)) + vec3(_53.uvCoverTransform.zw, 0.0)).xy;\n}\n\n",
- /*
- struct m3x2
- {
- float3 r0;
- float3 r1;
- };
-
- static const m3x2 _115 = { float3(1.0f, 0.0f, 0.0f), float3(0.0f, -1.0f, 1.0f) };
- static const m3x2 _141 = { float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f) };
-
- cbuffer Block : register(b0)
- {
- float4 _70_transform : packoffset(c0);
- float4 _70_uvCoverTransform : packoffset(c1);
- float4 _70_uvTransformR1 : packoffset(c2);
- float4 _70_uvTransformR2 : packoffset(c3);
- float _70_z : packoffset(c4);
- };
-
-
- static float4 gl_Position;
- static float2 pos;
- static float2 vUV;
- static float2 uv;
- static float2 vCoverUV;
-
- struct SPIRV_Cross_Input
- {
- float2 pos : POSITION;
- float2 uv : NORMAL;
- };
-
- struct SPIRV_Cross_Output
- {
- float2 vCoverUV : TEXCOORD0;
- float2 vUV : TEXCOORD1;
- float4 gl_Position : SV_Position;
- };
-
- float4 toClipSpace(float4 pos_1)
- {
- return float4(pos_1.xy, (pos_1.z + pos_1.w) * 0.5f, pos_1.w);
- }
-
- float3 transform3x2(m3x2 t, float3 v)
- {
- return float3(dot(t.r0, v), dot(t.r1, v), dot(float3(0.0f, 0.0f, 1.0f), v));
- }
-
- void vert_main()
- {
- float4 param = float4((pos * _70_transform.xy) + _70_transform.zw, _70_z, 1.0f);
- gl_Position = toClipSpace(param);
- m3x2 _101 = { _70_uvTransformR1.xyz, _70_uvTransformR2.xyz };
- m3x2 param_1 = _101;
- float3 param_2 = float3(uv, 1.0f);
- vUV = transform3x2(param_1, param_2).xy;
- m3x2 param_3 = _115;
- float3 param_4 = float3(uv, 1.0f);
- float3 uv3 = transform3x2(param_3, param_4);
- vCoverUV = ((uv3 * float3(_70_uvCoverTransform.xy, 1.0f)) + float3(_70_uvCoverTransform.zw, 0.0f)).xy;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- pos = stage_input.pos;
- uv = stage_input.uv;
- vert_main();
- SPIRV_Cross_Output stage_output;
- stage_output.gl_Position = gl_Position;
- stage_output.vUV = vUV;
- stage_output.vCoverUV = vCoverUV;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0xb3, 0x71, 0x8c, 0x9f, 0x3e, 0x4f, 0x8b, 0x50, 0xb7, 0xa2, 0x4b, 0xfb, 0xad, 0x7d, 0xc8, 0x71, 0x1, 0x0, 0x0, 0x0, 0xcc, 0x5, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x78, 0x1, 0x0, 0x0, 0x1c, 0x3, 0x0, 0x0, 0x98, 0x3, 0x0, 0x0, 0xc, 0x5, 0x0, 0x0, 0x5c, 0x5, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0x38, 0x1, 0x0, 0x0, 0x38, 0x1, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0x4, 0x1, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x24, 0x0, 0x1, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0x51, 0x0, 0x0, 0x5, 0x6, 0x0, 0xf, 0xa0, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x3f, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x1, 0x80, 0x1, 0x0, 0xf, 0x90, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x7, 0x80, 0x1, 0x0, 0xc4, 0x90, 0x6, 0x0, 0xd0, 0xa0, 0x6, 0x0, 0xc5, 0xa0, 0x8, 0x0, 0x0, 0x3, 0x0, 0x0, 0x8, 0xe0, 0x3, 0x0, 0xe4, 0xa0, 0x0, 0x0, 0xe4, 0x80, 0x8, 0x0, 0x0, 0x3, 0x0, 0x0, 0x4, 0xe0, 0x4, 0x0, 0xe4, 0xa0, 0x0, 0x0, 0xe4, 0x80, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0x80, 0x1, 0x0, 0xe1, 0x90, 0x6, 0x0, 0xe4, 0xa0, 0x6, 0x0, 0xe1, 0xa0, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x6, 0x0, 0xe2, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0x90, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0xe0, 0x0, 0x0, 0xe4, 0x80, 0x2, 0x0, 0xe4, 0xa0, 0x2, 0x0, 0xee, 0xa0, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0x90, 0x1, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0xee, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x3, 0xc0, 0x0, 0x0, 0xe4, 0x80, 0x0, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0xb, 0x80, 0x6, 0x0, 0xe4, 0xa0, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0xc, 0xc0, 0x5, 0x0, 0x0, 0xa0, 0x0, 0x0, 0x74, 0x80, 0x0, 0x0, 0x34, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x9c, 0x1, 0x0, 0x0, 0x40, 0x0, 0x1, 0x0, 0x67, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x4, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0x32, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xc2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x67, 0x0, 0x0, 0x4, 0xf2, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x32, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x42, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xf, 0x0, 0x0, 0xa, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x96, 0x5, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xb, 0x32, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xe6, 0x8a, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x8, 0x42, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x82, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x46, 0x2, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x8, 0x82, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x82, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x46, 0x2, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xb, 0x32, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0x8a, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xa, 0x42, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x36, 0x0, 0x0, 0x5, 0x82, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0x6c, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xfe, 0xff, 0x0, 0x1, 0x0, 0x0, 0x44, 0x1, 0x0, 0x0, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x0, 0xab, 0xab, 0x3c, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x1, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0x1, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, 0x1, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x37, 0x30, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x0, 0xab, 0xab, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x37, 0x30, 0x5f, 0x75, 0x76, 0x43, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x0, 0x5f, 0x37, 0x30, 0x5f, 0x75, 0x76, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x31, 0x0, 0x5f, 0x37, 0x30, 0x5f, 0x75, 0x76, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x32, 0x0, 0x5f, 0x37, 0x30, 0x5f, 0x7a, 0x0, 0xab, 0x0, 0x0, 0x3, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x0, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x0, 0x4f, 0x53, 0x47, 0x4e, 0x68, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x0, 0xab, 0xab, 0xab},
- }
- shader_intersect_frag = backend.ShaderSources{
- Textures: []backend.TextureBinding{{Name: "cover", Binding: 0}},
- GLSL100ES: "precision mediump float;\nprecision highp int;\n\nuniform mediump sampler2D cover;\n\nvarying highp vec2 vUV;\n\nvoid main()\n{\n float cover_1 = abs(texture2D(cover, vUV).x);\n gl_FragData[0].x = cover_1;\n}\n\n",
- GLSL300ES: "#version 300 es\nprecision mediump float;\nprecision highp int;\n\nuniform mediump sampler2D cover;\n\nin highp vec2 vUV;\nlayout(location = 0) out vec4 fragColor;\n\nvoid main()\n{\n float cover_1 = abs(texture(cover, vUV).x);\n fragColor.x = cover_1;\n}\n\n",
- GLSL130: "#version 130\n\nuniform sampler2D cover;\n\nin vec2 vUV;\nout vec4 fragColor;\n\nvoid main()\n{\n float cover_1 = abs(texture(cover, vUV).x);\n fragColor.x = cover_1;\n}\n\n",
- GLSL150: "#version 150\n\nuniform sampler2D cover;\n\nin vec2 vUV;\nout vec4 fragColor;\n\nvoid main()\n{\n float cover_1 = abs(texture(cover, vUV).x);\n fragColor.x = cover_1;\n}\n\n",
- /*
- Texture2D<float4> cover : register(t0);
- SamplerState _cover_sampler : register(s0);
-
- static float2 vUV;
- static float4 fragColor;
-
- struct SPIRV_Cross_Input
- {
- float2 vUV : TEXCOORD0;
- };
-
- struct SPIRV_Cross_Output
- {
- float4 fragColor : SV_Target0;
- };
-
- void frag_main()
- {
- float cover_1 = abs(cover.Sample(_cover_sampler, vUV).x);
- fragColor.x = cover_1;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- vUV = stage_input.vUV;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.fragColor = fragColor;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0xe0, 0xe4, 0x3, 0x8c, 0xac, 0x56, 0x46, 0x82, 0x6c, 0xe7, 0x7c, 0xc3, 0x54, 0xa6, 0x27, 0xef, 0x1, 0x0, 0x0, 0x0, 0x8, 0x3, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0xfc, 0x1, 0x0, 0x0, 0xa0, 0x2, 0x0, 0x0, 0xd4, 0x2, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0x94, 0x0, 0x0, 0x0, 0x94, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x6c, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x28, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x51, 0x0, 0x0, 0x5, 0x0, 0x0, 0xf, 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x3, 0xb0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x90, 0x0, 0x8, 0xf, 0xa0, 0x42, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0x80, 0x0, 0x0, 0xe4, 0xb0, 0x0, 0x8, 0xe4, 0xa0, 0x23, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0xe, 0x80, 0x0, 0x0, 0x0, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x8, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0xa4, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x29, 0x0, 0x0, 0x0, 0x5a, 0x0, 0x0, 0x3, 0x0, 0x60, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x58, 0x18, 0x0, 0x4, 0x0, 0x70, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x55, 0x55, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x1, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x9, 0xf2, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x7e, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x60, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x6, 0x12, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x80, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x8, 0xe2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0x9c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x0, 0x1, 0x0, 0x0, 0x71, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6b, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0x5f, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x0, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x0, 0xab, 0xab},
- }
- shader_intersect_vert = backend.ShaderSources{
- Inputs: []backend.InputLocation{{Name: "pos", Location: 0, Semantic: "POSITION", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "NORMAL", SemanticIndex: 0, Type: 0x0, Size: 2}},
- Uniforms: backend.UniformsReflection{
- Blocks: []backend.UniformBlock{{Name: "Block", Binding: 0}},
- Locations: []backend.UniformLocation{{Name: "_78.uvTransform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_78.subUVTransform", Type: 0x0, Size: 4, Offset: 16}},
- Size: 32,
- },
- GLSL100ES: "\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 uvTransform;\n vec4 subUVTransform;\n};\n\nuniform Block _78;\n\nattribute vec2 pos;\nattribute vec2 uv;\nvarying vec2 vUV;\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));\n vec3 param_1 = vec3(pos, 1.0);\n vec3 p = transform3x2(param, param_1);\n gl_Position = vec4(p, 1.0);\n m3x2 param_2 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_3 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_2, param_3);\n vUV = (uv3.xy * _78.subUVTransform.xy) + _78.subUVTransform.zw;\n m3x2 param_4 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_5 = vec3(vUV, 1.0);\n vUV = transform3x2(param_4, param_5).xy;\n vUV = (vUV * _78.uvTransform.xy) + _78.uvTransform.zw;\n}\n\n",
- GLSL300ES: "#version 300 es\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nlayout(std140) uniform Block\n{\n vec4 uvTransform;\n vec4 subUVTransform;\n} _78;\n\nlayout(location = 0) in vec2 pos;\nlayout(location = 1) in vec2 uv;\nout vec2 vUV;\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));\n vec3 param_1 = vec3(pos, 1.0);\n vec3 p = transform3x2(param, param_1);\n gl_Position = vec4(p, 1.0);\n m3x2 param_2 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_3 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_2, param_3);\n vUV = (uv3.xy * _78.subUVTransform.xy) + _78.subUVTransform.zw;\n m3x2 param_4 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_5 = vec3(vUV, 1.0);\n vUV = transform3x2(param_4, param_5).xy;\n vUV = (vUV * _78.uvTransform.xy) + _78.uvTransform.zw;\n}\n\n",
- GLSL130: "#version 130\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 uvTransform;\n vec4 subUVTransform;\n};\n\nuniform Block _78;\n\nin vec2 pos;\nin vec2 uv;\nout vec2 vUV;\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));\n vec3 param_1 = vec3(pos, 1.0);\n vec3 p = transform3x2(param, param_1);\n gl_Position = vec4(p, 1.0);\n m3x2 param_2 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_3 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_2, param_3);\n vUV = (uv3.xy * _78.subUVTransform.xy) + _78.subUVTransform.zw;\n m3x2 param_4 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_5 = vec3(vUV, 1.0);\n vUV = transform3x2(param_4, param_5).xy;\n vUV = (vUV * _78.uvTransform.xy) + _78.uvTransform.zw;\n}\n\n",
- GLSL150: "#version 150\n\nstruct m3x2\n{\n vec3 r0;\n vec3 r1;\n};\n\nstruct Block\n{\n vec4 uvTransform;\n vec4 subUVTransform;\n};\n\nuniform Block _78;\n\nin vec2 pos;\nin vec2 uv;\nout vec2 vUV;\n\nvec3 transform3x2(m3x2 t, vec3 v)\n{\n return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));\n}\n\nvoid main()\n{\n m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));\n vec3 param_1 = vec3(pos, 1.0);\n vec3 p = transform3x2(param, param_1);\n gl_Position = vec4(p, 1.0);\n m3x2 param_2 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_3 = vec3(uv, 1.0);\n vec3 uv3 = transform3x2(param_2, param_3);\n vUV = (uv3.xy * _78.subUVTransform.xy) + _78.subUVTransform.zw;\n m3x2 param_4 = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));\n vec3 param_5 = vec3(vUV, 1.0);\n vUV = transform3x2(param_4, param_5).xy;\n vUV = (vUV * _78.uvTransform.xy) + _78.uvTransform.zw;\n}\n\n",
- /*
- struct m3x2
- {
- float3 r0;
- float3 r1;
- };
-
- static const m3x2 _38 = { float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f) };
- static const m3x2 _63 = { float3(1.0f, 0.0f, 0.0f), float3(0.0f, -1.0f, 1.0f) };
-
- cbuffer Block : register(b0)
- {
- float4 _78_uvTransform : packoffset(c0);
- float4 _78_subUVTransform : packoffset(c1);
- };
-
-
- static float4 gl_Position;
- static float2 pos;
- static float2 uv;
- static float2 vUV;
-
- struct SPIRV_Cross_Input
- {
- float2 pos : POSITION;
- float2 uv : NORMAL;
- };
-
- struct SPIRV_Cross_Output
- {
- float2 vUV : TEXCOORD0;
- float4 gl_Position : SV_Position;
- };
-
- float3 transform3x2(m3x2 t, float3 v)
- {
- return float3(dot(t.r0, v), dot(t.r1, v), dot(float3(0.0f, 0.0f, 1.0f), v));
- }
-
- void vert_main()
- {
- m3x2 param = _38;
- float3 param_1 = float3(pos, 1.0f);
- float3 p = transform3x2(param, param_1);
- gl_Position = float4(p, 1.0f);
- m3x2 param_2 = _63;
- float3 param_3 = float3(uv, 1.0f);
- float3 uv3 = transform3x2(param_2, param_3);
- vUV = (uv3.xy * _78_subUVTransform.xy) + _78_subUVTransform.zw;
- m3x2 param_4 = _63;
- float3 param_5 = float3(vUV, 1.0f);
- vUV = transform3x2(param_4, param_5).xy;
- vUV = (vUV * _78_uvTransform.xy) + _78_uvTransform.zw;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- pos = stage_input.pos;
- uv = stage_input.uv;
- vert_main();
- SPIRV_Cross_Output stage_output;
- stage_output.gl_Position = gl_Position;
- stage_output.vUV = vUV;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0x27, 0x8, 0x9f, 0xbf, 0x30, 0xa, 0x5b, 0x38, 0xe, 0x78, 0x0, 0x22, 0xdb, 0x3b, 0x30, 0x54, 0x1, 0x0, 0x0, 0x0, 0xd8, 0x4, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x4c, 0x1, 0x0, 0x0, 0xc4, 0x2, 0x0, 0x0, 0x40, 0x3, 0x0, 0x0, 0x30, 0x4, 0x0, 0x0, 0x80, 0x4, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0xc, 0x1, 0x0, 0x0, 0xc, 0x1, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0xd8, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x24, 0x0, 0x1, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0x51, 0x0, 0x0, 0x5, 0x3, 0x0, 0xf, 0xa0, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x1, 0x80, 0x1, 0x0, 0xf, 0x90, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0x80, 0x1, 0x0, 0x55, 0x90, 0x3, 0x0, 0xe4, 0xa0, 0x3, 0x0, 0xe1, 0xa0, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x3, 0x0, 0xe2, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0x90, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x2, 0x0, 0xe4, 0xa0, 0x2, 0x0, 0xee, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0x4, 0x80, 0x3, 0x0, 0x0, 0xa0, 0x8, 0x0, 0x0, 0x3, 0x0, 0x0, 0x8, 0x80, 0x3, 0x0, 0xc9, 0xa0, 0x0, 0x0, 0xe4, 0x80, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0xe0, 0x0, 0x0, 0xec, 0x80, 0x1, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0xee, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x3, 0xc0, 0x0, 0x0, 0xe4, 0x90, 0x0, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0xc, 0xc0, 0x3, 0x0, 0x0, 0xa0, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x70, 0x1, 0x0, 0x0, 0x40, 0x0, 0x1, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x4, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0x32, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x67, 0x0, 0x0, 0x4, 0xf2, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x1, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x36, 0x0, 0x0, 0x5, 0x52, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x56, 0x14, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xa, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xb, 0x32, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0xa, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xe6, 0x8a, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x42, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xf, 0x0, 0x0, 0xa, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x96, 0x5, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xb, 0x32, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0x8a, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x32, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x8, 0xc2, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0xe8, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xfe, 0xff, 0x0, 0x1, 0x0, 0x0, 0xbf, 0x0, 0x0, 0x0, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x0, 0xab, 0xab, 0x3c, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x9c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xac, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x9c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x37, 0x38, 0x5f, 0x75, 0x76, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x0, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x37, 0x38, 0x5f, 0x73, 0x75, 0x62, 0x55, 0x56, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x0, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x0, 0x4f, 0x53, 0x47, 0x4e, 0x50, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x0, 0xab, 0xab, 0xab},
- }
- shader_stencil_frag = backend.ShaderSources{
- GLSL100ES: "precision mediump float;\nprecision highp int;\n\nvarying vec2 vTo;\nvarying vec2 vFrom;\nvarying vec2 vCtrl;\n\nvoid main()\n{\n float dx = vTo.x - vFrom.x;\n bool increasing = vTo.x >= vFrom.x;\n bvec2 _35 = bvec2(increasing);\n vec2 left = vec2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);\n bvec2 _41 = bvec2(increasing);\n vec2 right = vec2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);\n vec2 extent = clamp(vec2(vFrom.x, vTo.x), vec2(-0.5), vec2(0.5));\n float midx = mix(extent.x, extent.y, 0.5);\n float x0 = midx - left.x;\n vec2 p1 = vCtrl - left;\n vec2 v = right - vCtrl;\n float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));\n float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);\n vec2 d_half = mix(p1, v, vec2(t));\n float dy = d_half.y / d_half.x;\n float width = extent.y - extent.x;\n dy = abs(dy * width);\n vec4 sides = vec4((dy * 0.5) + y, (dy * (-0.5)) + y, (0.5 - y) / dy, ((-0.5) - y) / dy);\n sides = clamp(sides + vec4(0.5), vec4(0.0), vec4(1.0));\n float area = 0.5 * ((((sides.z - (sides.z * sides.y)) + 1.0) - sides.x) + (sides.x * sides.w));\n area *= width;\n if (width == 0.0)\n {\n area = 0.0;\n }\n gl_FragData[0].x = area;\n}\n\n",
- GLSL300ES: "#version 300 es\nprecision mediump float;\nprecision highp int;\n\nin vec2 vTo;\nin vec2 vFrom;\nin vec2 vCtrl;\nlayout(location = 0) out vec4 fragCover;\n\nvoid main()\n{\n float dx = vTo.x - vFrom.x;\n bool increasing = vTo.x >= vFrom.x;\n bvec2 _35 = bvec2(increasing);\n vec2 left = vec2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);\n bvec2 _41 = bvec2(increasing);\n vec2 right = vec2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);\n vec2 extent = clamp(vec2(vFrom.x, vTo.x), vec2(-0.5), vec2(0.5));\n float midx = mix(extent.x, extent.y, 0.5);\n float x0 = midx - left.x;\n vec2 p1 = vCtrl - left;\n vec2 v = right - vCtrl;\n float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));\n float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);\n vec2 d_half = mix(p1, v, vec2(t));\n float dy = d_half.y / d_half.x;\n float width = extent.y - extent.x;\n dy = abs(dy * width);\n vec4 sides = vec4((dy * 0.5) + y, (dy * (-0.5)) + y, (0.5 - y) / dy, ((-0.5) - y) / dy);\n sides = clamp(sides + vec4(0.5), vec4(0.0), vec4(1.0));\n float area = 0.5 * ((((sides.z - (sides.z * sides.y)) + 1.0) - sides.x) + (sides.x * sides.w));\n area *= width;\n if (width == 0.0)\n {\n area = 0.0;\n }\n fragCover.x = area;\n}\n\n",
- GLSL130: "#version 130\n\nin vec2 vTo;\nin vec2 vFrom;\nin vec2 vCtrl;\nout vec4 fragCover;\n\nvoid main()\n{\n float dx = vTo.x - vFrom.x;\n bool increasing = vTo.x >= vFrom.x;\n bvec2 _35 = bvec2(increasing);\n vec2 left = vec2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);\n bvec2 _41 = bvec2(increasing);\n vec2 right = vec2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);\n vec2 extent = clamp(vec2(vFrom.x, vTo.x), vec2(-0.5), vec2(0.5));\n float midx = mix(extent.x, extent.y, 0.5);\n float x0 = midx - left.x;\n vec2 p1 = vCtrl - left;\n vec2 v = right - vCtrl;\n float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));\n float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);\n vec2 d_half = mix(p1, v, vec2(t));\n float dy = d_half.y / d_half.x;\n float width = extent.y - extent.x;\n dy = abs(dy * width);\n vec4 sides = vec4((dy * 0.5) + y, (dy * (-0.5)) + y, (0.5 - y) / dy, ((-0.5) - y) / dy);\n sides = clamp(sides + vec4(0.5), vec4(0.0), vec4(1.0));\n float area = 0.5 * ((((sides.z - (sides.z * sides.y)) + 1.0) - sides.x) + (sides.x * sides.w));\n area *= width;\n if (width == 0.0)\n {\n area = 0.0;\n }\n fragCover.x = area;\n}\n\n",
- GLSL150: "#version 150\n\nin vec2 vTo;\nin vec2 vFrom;\nin vec2 vCtrl;\nout vec4 fragCover;\n\nvoid main()\n{\n float dx = vTo.x - vFrom.x;\n bool increasing = vTo.x >= vFrom.x;\n bvec2 _35 = bvec2(increasing);\n vec2 left = vec2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);\n bvec2 _41 = bvec2(increasing);\n vec2 right = vec2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);\n vec2 extent = clamp(vec2(vFrom.x, vTo.x), vec2(-0.5), vec2(0.5));\n float midx = mix(extent.x, extent.y, 0.5);\n float x0 = midx - left.x;\n vec2 p1 = vCtrl - left;\n vec2 v = right - vCtrl;\n float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));\n float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);\n vec2 d_half = mix(p1, v, vec2(t));\n float dy = d_half.y / d_half.x;\n float width = extent.y - extent.x;\n dy = abs(dy * width);\n vec4 sides = vec4((dy * 0.5) + y, (dy * (-0.5)) + y, (0.5 - y) / dy, ((-0.5) - y) / dy);\n sides = clamp(sides + vec4(0.5), vec4(0.0), vec4(1.0));\n float area = 0.5 * ((((sides.z - (sides.z * sides.y)) + 1.0) - sides.x) + (sides.x * sides.w));\n area *= width;\n if (width == 0.0)\n {\n area = 0.0;\n }\n fragCover.x = area;\n}\n\n",
- /*
- static float2 vTo;
- static float2 vFrom;
- static float2 vCtrl;
- static float4 fragCover;
-
- struct SPIRV_Cross_Input
- {
- float2 vFrom : TEXCOORD0;
- float2 vCtrl : TEXCOORD1;
- float2 vTo : TEXCOORD2;
- };
-
- struct SPIRV_Cross_Output
- {
- float4 fragCover : SV_Target0;
- };
-
- void frag_main()
- {
- float dx = vTo.x - vFrom.x;
- bool increasing = vTo.x >= vFrom.x;
- bool2 _35 = increasing.xx;
- float2 left = float2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);
- bool2 _41 = increasing.xx;
- float2 right = float2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);
- float2 extent = clamp(float2(vFrom.x, vTo.x), (-0.5f).xx, 0.5f.xx);
- float midx = lerp(extent.x, extent.y, 0.5f);
- float x0 = midx - left.x;
- float2 p1 = vCtrl - left;
- float2 v = right - vCtrl;
- float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));
- float y = lerp(lerp(left.y, vCtrl.y, t), lerp(vCtrl.y, right.y, t), t);
- float2 d_half = lerp(p1, v, t.xx);
- float dy = d_half.y / d_half.x;
- float width = extent.y - extent.x;
- dy = abs(dy * width);
- float4 sides = float4((dy * 0.5f) + y, (dy * (-0.5f)) + y, (0.5f - y) / dy, ((-0.5f) - y) / dy);
- sides = clamp(sides + 0.5f.xxxx, 0.0f.xxxx, 1.0f.xxxx);
- float area = 0.5f * ((((sides.z - (sides.z * sides.y)) + 1.0f) - sides.x) + (sides.x * sides.w));
- area *= width;
- if (width == 0.0f)
- {
- area = 0.0f;
- }
- fragCover.x = area;
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- vTo = stage_input.vTo;
- vFrom = stage_input.vFrom;
- vCtrl = stage_input.vCtrl;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.fragCover = fragCover;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0x94, 0x21, 0xb9, 0x13, 0x4c, 0xba, 0xd, 0x11, 0x8f, 0xc7, 0xce, 0xe, 0x41, 0x73, 0xec, 0xe1, 0x1, 0x0, 0x0, 0x0, 0x5c, 0xa, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x9c, 0x3, 0x0, 0x0, 0xfc, 0x8, 0x0, 0x0, 0x78, 0x9, 0x0, 0x0, 0xc4, 0x9, 0x0, 0x0, 0x28, 0xa, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0x5c, 0x3, 0x0, 0x0, 0x5c, 0x3, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x38, 0x3, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x2, 0xff, 0xff, 0x51, 0x0, 0x0, 0x5, 0x0, 0x0, 0xf, 0xa0, 0x0, 0x0, 0x0, 0xbf, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0xb0, 0x1f, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x80, 0x1, 0x0, 0x3, 0xb0, 0xb, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0xb0, 0x0, 0x0, 0x0, 0xa0, 0xb, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x1, 0x0, 0x0, 0xb0, 0x0, 0x0, 0x0, 0xa0, 0xa, 0x0, 0x0, 0x3, 0x1, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x0, 0x0, 0x55, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0x81, 0x1, 0x0, 0x55, 0x80, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x55, 0xa0, 0x1, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x2, 0x1, 0x0, 0x3, 0x80, 0x0, 0x0, 0xe4, 0xb0, 0xa, 0x0, 0x0, 0x3, 0x2, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0xb0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x2, 0x0, 0x0, 0x81, 0xb, 0x0, 0x0, 0x3, 0x3, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0xb0, 0x1, 0x0, 0x0, 0x80, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x4, 0x80, 0x1, 0x0, 0x0, 0x81, 0x1, 0x0, 0x0, 0xb0, 0x58, 0x0, 0x0, 0x4, 0x3, 0x0, 0x2, 0x80, 0x0, 0x0, 0xaa, 0x80, 0x1, 0x0, 0x55, 0xb0, 0x1, 0x0, 0x55, 0x80, 0x58, 0x0, 0x0, 0x4, 0x2, 0x0, 0x2, 0x80, 0x0, 0x0, 0xaa, 0x80, 0x1, 0x0, 0x55, 0x80, 0x1, 0x0, 0x55, 0xb0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0xc, 0x80, 0x3, 0x0, 0x1b, 0x80, 0x0, 0x0, 0xe4, 0xb1, 0x2, 0x0, 0x0, 0x3, 0x1, 0x0, 0x3, 0x80, 0x2, 0x0, 0xe4, 0x81, 0x0, 0x0, 0x1b, 0xb0, 0x2, 0x0, 0x0, 0x3, 0x1, 0x0, 0x4, 0x80, 0x0, 0x0, 0xff, 0x80, 0x1, 0x0, 0x0, 0x81, 0x5, 0x0, 0x0, 0x3, 0x1, 0x0, 0x4, 0x80, 0x0, 0x0, 0x55, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x4, 0x0, 0x0, 0x4, 0x1, 0x0, 0x4, 0x80, 0x1, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x7, 0x0, 0x0, 0x2, 0x1, 0x0, 0x4, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x6, 0x0, 0x0, 0x2, 0x1, 0x0, 0x4, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x2, 0x0, 0x0, 0x3, 0x1, 0x0, 0x4, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x1, 0x0, 0x0, 0x80, 0x6, 0x0, 0x0, 0x2, 0x1, 0x0, 0x4, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x4, 0x0, 0x0, 0x4, 0x1, 0x0, 0x4, 0x80, 0x0, 0x0, 0x55, 0x80, 0x1, 0x0, 0x55, 0x80, 0x2, 0x0, 0x55, 0x80, 0x12, 0x0, 0x0, 0x4, 0x2, 0x0, 0x3, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x1b, 0x80, 0x1, 0x0, 0xe4, 0x80, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x4, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0xaa, 0x80, 0x0, 0x0, 0xaa, 0xb0, 0x12, 0x0, 0x0, 0x4, 0x2, 0x0, 0x4, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0xaa, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x6, 0x0, 0x0, 0x2, 0x0, 0x0, 0x2, 0x80, 0x2, 0x0, 0x0, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x2, 0x0, 0x55, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x55, 0x80, 0x23, 0x0, 0x0, 0x2, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x4, 0x0, 0x0, 0x4, 0x1, 0x0, 0x1, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x55, 0xa0, 0x2, 0x0, 0xaa, 0x80, 0x4, 0x0, 0x0, 0x4, 0x1, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x0, 0xa0, 0x2, 0x0, 0xaa, 0x80, 0x6, 0x0, 0x0, 0x2, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0xc, 0x80, 0x2, 0x0, 0xaa, 0x81, 0x0, 0x0, 0x1b, 0xa0, 0x5, 0x0, 0x0, 0x3, 0x1, 0x0, 0x8, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0xff, 0x80, 0x5, 0x0, 0x0, 0x3, 0x1, 0x0, 0x4, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0xaa, 0x80, 0x2, 0x0, 0x0, 0x3, 0x1, 0x0, 0x1f, 0x80, 0x1, 0x0, 0xe4, 0x80, 0x0, 0x0, 0x55, 0xa0, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x2, 0x80, 0x1, 0x0, 0xaa, 0x80, 0x1, 0x0, 0x55, 0x81, 0x1, 0x0, 0xaa, 0x80, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0xaa, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x1, 0x0, 0x0, 0x81, 0x0, 0x0, 0x55, 0x80, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x2, 0x80, 0x1, 0x0, 0x0, 0x80, 0x1, 0x0, 0xff, 0x80, 0x0, 0x0, 0x55, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x0, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x5, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x0, 0x0, 0x55, 0xa0, 0x58, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0x81, 0x0, 0x0, 0xff, 0xa0, 0x0, 0x0, 0x55, 0x80, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0xe, 0x80, 0x0, 0x0, 0xff, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x8, 0xf, 0x80, 0x0, 0x0, 0xe4, 0x80, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x58, 0x5, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x56, 0x1, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0xc2, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x62, 0x10, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x3, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x5, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0xa, 0x32, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0x0, 0x0, 0x0, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x0, 0x0, 0xa, 0x32, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x0, 0x0, 0x7, 0x32, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x7, 0x32, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1d, 0x0, 0x0, 0x7, 0x42, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x37, 0x0, 0x0, 0x9, 0x42, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1a, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x37, 0x0, 0x0, 0x9, 0x42, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x72, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x46, 0x2, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0xa6, 0x1b, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xc2, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x56, 0x9, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa6, 0x1e, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xb2, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa6, 0xe, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x8, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0x12, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x4b, 0x0, 0x0, 0x5, 0x12, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0x12, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0xc2, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x56, 0xd, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa6, 0xe, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x7, 0x42, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x7, 0x42, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x3a, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x32, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xd, 0x32, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0xa6, 0xa, 0x10, 0x80, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x8, 0xc2, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x4, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa6, 0xa, 0x10, 0x80, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0xa, 0xf2, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0xe, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x3f, 0x32, 0x0, 0x0, 0xa, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x8, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x9, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x0, 0x7, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x37, 0x0, 0x0, 0x9, 0x12, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x8, 0xe2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x29, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0x44, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x0, 0x1, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0x49, 0x53, 0x47, 0x4e, 0x5c, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0xc, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x0, 0xab, 0xab},
- }
- shader_stencil_vert = backend.ShaderSources{
- Inputs: []backend.InputLocation{{Name: "corner", Location: 0, Semantic: "POSITION", SemanticIndex: 0, Type: 0x0, Size: 1}, {Name: "maxy", Location: 1, Semantic: "NORMAL", SemanticIndex: 0, Type: 0x0, Size: 1}, {Name: "from", Location: 2, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "ctrl", Location: 3, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}, {Name: "to", Location: 4, Semantic: "TEXCOORD", SemanticIndex: 2, Type: 0x0, Size: 2}},
- Uniforms: backend.UniformsReflection{
- Blocks: []backend.UniformBlock{{Name: "Block", Binding: 0}},
- Locations: []backend.UniformLocation{{Name: "_16.transform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_16.pathOffset", Type: 0x0, Size: 2, Offset: 16}},
- Size: 24,
- },
- GLSL100ES: "\nstruct Block\n{\n vec4 transform;\n vec2 pathOffset;\n};\n\nuniform Block _16;\n\nattribute vec2 from;\nattribute vec2 ctrl;\nattribute vec2 to;\nattribute float maxy;\nattribute float corner;\nvarying vec2 vFrom;\nvarying vec2 vCtrl;\nvarying vec2 vTo;\n\nvoid main()\n{\n vec2 from_1 = from + _16.pathOffset;\n vec2 ctrl_1 = ctrl + _16.pathOffset;\n vec2 to_1 = to + _16.pathOffset;\n float maxy_1 = maxy + _16.pathOffset.y;\n float c = corner;\n vec2 pos;\n if (c >= 0.375)\n {\n c -= 0.5;\n pos.y = maxy_1 + 1.0;\n }\n else\n {\n pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0;\n }\n if (c >= 0.125)\n {\n pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0;\n }\n else\n {\n pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0;\n }\n vFrom = from_1 - pos;\n vCtrl = ctrl_1 - pos;\n vTo = to_1 - pos;\n pos = (pos * _16.transform.xy) + _16.transform.zw;\n gl_Position = vec4(pos, 1.0, 1.0);\n}\n\n",
- GLSL300ES: "#version 300 es\n\nlayout(std140) uniform Block\n{\n vec4 transform;\n vec2 pathOffset;\n} _16;\n\nlayout(location = 2) in vec2 from;\nlayout(location = 3) in vec2 ctrl;\nlayout(location = 4) in vec2 to;\nlayout(location = 1) in float maxy;\nlayout(location = 0) in float corner;\nout vec2 vFrom;\nout vec2 vCtrl;\nout vec2 vTo;\n\nvoid main()\n{\n vec2 from_1 = from + _16.pathOffset;\n vec2 ctrl_1 = ctrl + _16.pathOffset;\n vec2 to_1 = to + _16.pathOffset;\n float maxy_1 = maxy + _16.pathOffset.y;\n float c = corner;\n vec2 pos;\n if (c >= 0.375)\n {\n c -= 0.5;\n pos.y = maxy_1 + 1.0;\n }\n else\n {\n pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0;\n }\n if (c >= 0.125)\n {\n pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0;\n }\n else\n {\n pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0;\n }\n vFrom = from_1 - pos;\n vCtrl = ctrl_1 - pos;\n vTo = to_1 - pos;\n pos = (pos * _16.transform.xy) + _16.transform.zw;\n gl_Position = vec4(pos, 1.0, 1.0);\n}\n\n",
- GLSL130: "#version 130\n\nstruct Block\n{\n vec4 transform;\n vec2 pathOffset;\n};\n\nuniform Block _16;\n\nin vec2 from;\nin vec2 ctrl;\nin vec2 to;\nin float maxy;\nin float corner;\nout vec2 vFrom;\nout vec2 vCtrl;\nout vec2 vTo;\n\nvoid main()\n{\n vec2 from_1 = from + _16.pathOffset;\n vec2 ctrl_1 = ctrl + _16.pathOffset;\n vec2 to_1 = to + _16.pathOffset;\n float maxy_1 = maxy + _16.pathOffset.y;\n float c = corner;\n vec2 pos;\n if (c >= 0.375)\n {\n c -= 0.5;\n pos.y = maxy_1 + 1.0;\n }\n else\n {\n pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0;\n }\n if (c >= 0.125)\n {\n pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0;\n }\n else\n {\n pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0;\n }\n vFrom = from_1 - pos;\n vCtrl = ctrl_1 - pos;\n vTo = to_1 - pos;\n pos = (pos * _16.transform.xy) + _16.transform.zw;\n gl_Position = vec4(pos, 1.0, 1.0);\n}\n\n",
- GLSL150: "#version 150\n\nstruct Block\n{\n vec4 transform;\n vec2 pathOffset;\n};\n\nuniform Block _16;\n\nin vec2 from;\nin vec2 ctrl;\nin vec2 to;\nin float maxy;\nin float corner;\nout vec2 vFrom;\nout vec2 vCtrl;\nout vec2 vTo;\n\nvoid main()\n{\n vec2 from_1 = from + _16.pathOffset;\n vec2 ctrl_1 = ctrl + _16.pathOffset;\n vec2 to_1 = to + _16.pathOffset;\n float maxy_1 = maxy + _16.pathOffset.y;\n float c = corner;\n vec2 pos;\n if (c >= 0.375)\n {\n c -= 0.5;\n pos.y = maxy_1 + 1.0;\n }\n else\n {\n pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0;\n }\n if (c >= 0.125)\n {\n pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0;\n }\n else\n {\n pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0;\n }\n vFrom = from_1 - pos;\n vCtrl = ctrl_1 - pos;\n vTo = to_1 - pos;\n pos = (pos * _16.transform.xy) + _16.transform.zw;\n gl_Position = vec4(pos, 1.0, 1.0);\n}\n\n",
- /*
- cbuffer Block : register(b0)
- {
- float4 _16_transform : packoffset(c0);
- float2 _16_pathOffset : packoffset(c1);
- };
-
-
- static float4 gl_Position;
- static float2 from;
- static float2 ctrl;
- static float2 to;
- static float maxy;
- static float corner;
- static float2 vFrom;
- static float2 vCtrl;
- static float2 vTo;
-
- struct SPIRV_Cross_Input
- {
- float corner : POSITION;
- float maxy : NORMAL;
- float2 from : TEXCOORD0;
- float2 ctrl : TEXCOORD1;
- float2 to : TEXCOORD2;
- };
-
- struct SPIRV_Cross_Output
- {
- float2 vFrom : TEXCOORD0;
- float2 vCtrl : TEXCOORD1;
- float2 vTo : TEXCOORD2;
- float4 gl_Position : SV_Position;
- };
-
- void vert_main()
- {
- float2 from_1 = from + _16_pathOffset;
- float2 ctrl_1 = ctrl + _16_pathOffset;
- float2 to_1 = to + _16_pathOffset;
- float maxy_1 = maxy + _16_pathOffset.y;
- float c = corner;
- float2 pos;
- if (c >= 0.375f)
- {
- c -= 0.5f;
- pos.y = maxy_1 + 1.0f;
- }
- else
- {
- pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0f;
- }
- if (c >= 0.125f)
- {
- pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0f;
- }
- else
- {
- pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0f;
- }
- vFrom = from_1 - pos;
- vCtrl = ctrl_1 - pos;
- vTo = to_1 - pos;
- pos = (pos * _16_transform.xy) + _16_transform.zw;
- gl_Position = float4(pos, 1.0f, 1.0f);
- }
-
- SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
- {
- from = stage_input.from;
- ctrl = stage_input.ctrl;
- to = stage_input.to;
- maxy = stage_input.maxy;
- corner = stage_input.corner;
- vert_main();
- SPIRV_Cross_Output stage_output;
- stage_output.gl_Position = gl_Position;
- stage_output.vFrom = vFrom;
- stage_output.vCtrl = vCtrl;
- stage_output.vTo = vTo;
- return stage_output;
- }
-
- */
- HLSL: []byte{0x44, 0x58, 0x42, 0x43, 0x99, 0xea, 0x97, 0xb5, 0xa8, 0xd5, 0x84, 0x5e, 0x4b, 0x12, 0x14, 0x56, 0xdd, 0xee, 0xfc, 0x44, 0x1, 0x0, 0x0, 0x0, 0x18, 0x8, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x4c, 0x2, 0x0, 0x0, 0x74, 0x5, 0x0, 0x0, 0xf0, 0x5, 0x0, 0x0, 0xec, 0x6, 0x0, 0x0, 0x90, 0x7, 0x0, 0x0, 0x41, 0x6f, 0x6e, 0x39, 0xc, 0x2, 0x0, 0x0, 0xc, 0x2, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0xd8, 0x1, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x1, 0x0, 0x24, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x24, 0x0, 0x1, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xfe, 0xff, 0x51, 0x0, 0x0, 0x5, 0x3, 0x0, 0xf, 0xa0, 0x0, 0x0, 0xc0, 0x3e, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0xbf, 0x51, 0x0, 0x0, 0x5, 0x4, 0x0, 0xf, 0xa0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x0, 0x80, 0x0, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x1, 0x80, 0x1, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x2, 0x80, 0x2, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x3, 0x80, 0x3, 0x0, 0xf, 0x90, 0x1f, 0x0, 0x0, 0x2, 0x5, 0x0, 0x4, 0x80, 0x4, 0x0, 0xf, 0x90, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x80, 0x1, 0x0, 0x0, 0x90, 0x2, 0x0, 0x55, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x4, 0x80, 0x0, 0x0, 0x0, 0x80, 0x3, 0x0, 0x55, 0xa0, 0xd, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0x90, 0x3, 0x0, 0x0, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x1, 0x0, 0x4, 0x80, 0x0, 0x0, 0x0, 0x90, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x0, 0x90, 0x3, 0x0, 0xff, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x2, 0x0, 0x3, 0x80, 0x2, 0x0, 0xe4, 0x90, 0x2, 0x0, 0xe4, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x2, 0x0, 0xc, 0x80, 0x3, 0x0, 0x14, 0x90, 0x2, 0x0, 0x14, 0xa0, 0xa, 0x0, 0x0, 0x3, 0x3, 0x0, 0x3, 0x80, 0x2, 0x0, 0xee, 0x80, 0x2, 0x0, 0xe1, 0x80, 0x2, 0x0, 0x0, 0x3, 0x3, 0x0, 0xc, 0x80, 0x4, 0x0, 0x44, 0x90, 0x2, 0x0, 0x44, 0xa0, 0xa, 0x0, 0x0, 0x3, 0x3, 0x0, 0x3, 0x80, 0x3, 0x0, 0xeb, 0x80, 0x3, 0x0, 0xe4, 0x80, 0x2, 0x0, 0x0, 0x3, 0x1, 0x0, 0x3, 0x80, 0x3, 0x0, 0xe4, 0x80, 0x3, 0x0, 0xaa, 0xa0, 0x12, 0x0, 0x0, 0x4, 0x4, 0x0, 0x6, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0xe4, 0x80, 0x1, 0x0, 0xc8, 0x80, 0xd, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x80, 0x4, 0x0, 0x55, 0x80, 0x4, 0x0, 0x0, 0xa0, 0xb, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x2, 0x0, 0xff, 0x80, 0x2, 0x0, 0x0, 0x80, 0xb, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x3, 0x0, 0xaa, 0x80, 0x0, 0x0, 0x55, 0x80, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, 0x55, 0x80, 0x3, 0x0, 0x55, 0xa0, 0x12, 0x0, 0x0, 0x4, 0x4, 0x0, 0x1, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x55, 0x80, 0x1, 0x0, 0x55, 0x80, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0xf, 0xe0, 0x2, 0x0, 0xe4, 0x80, 0x4, 0x0, 0x28, 0x81, 0x2, 0x0, 0x0, 0x3, 0x1, 0x0, 0x3, 0xe0, 0x3, 0x0, 0xee, 0x80, 0x4, 0x0, 0xe8, 0x81, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, 0x3, 0x80, 0x4, 0x0, 0xe8, 0x80, 0x1, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0xee, 0xa0, 0x2, 0x0, 0x0, 0x3, 0x0, 0x0, 0x3, 0xc0, 0x0, 0x0, 0xe4, 0x80, 0x0, 0x0, 0xe4, 0xa0, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0xc, 0xc0, 0x3, 0x0, 0x55, 0xa0, 0xff, 0xff, 0x0, 0x0, 0x53, 0x48, 0x44, 0x52, 0x20, 0x3, 0x0, 0x0, 0x40, 0x0, 0x1, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x4, 0x46, 0x8e, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x12, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x12, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x3, 0x32, 0x10, 0x10, 0x0, 0x4, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0x32, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0xc2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x3, 0x32, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x67, 0x0, 0x0, 0x4, 0xf2, 0x20, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x2, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1a, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x42, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x1d, 0x0, 0x0, 0x7, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0xc0, 0x3e, 0x0, 0x0, 0x0, 0x7, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0x36, 0x0, 0x0, 0x5, 0x42, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x32, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x46, 0x10, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xc2, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x14, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x6, 0x84, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x33, 0x0, 0x0, 0x7, 0x32, 0x0, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0xb6, 0xf, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x16, 0x5, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xc2, 0x0, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x6, 0x14, 0x10, 0x0, 0x4, 0x0, 0x0, 0x0, 0x6, 0x84, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x33, 0x0, 0x0, 0x7, 0x32, 0x0, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0xb6, 0xf, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x46, 0x0, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x32, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x46, 0x0, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x37, 0x0, 0x0, 0x9, 0x62, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x56, 0x6, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa6, 0x8, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1d, 0x0, 0x0, 0x7, 0x22, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x34, 0x0, 0x0, 0x7, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0xa, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x7, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x82, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x37, 0x0, 0x0, 0x9, 0x12, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xf2, 0x20, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x86, 0x8, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0xe, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x32, 0x20, 0x10, 0x0, 0x1, 0x0, 0x0, 0x0, 0x86, 0x0, 0x10, 0x80, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0xa, 0x10, 0x0, 0x3, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0xb, 0x32, 0x20, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x86, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x80, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0x8a, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x0, 0x0, 0x8, 0xc2, 0x20, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0, 0x2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x3e, 0x0, 0x0, 0x1, 0x53, 0x54, 0x41, 0x54, 0x74, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x44, 0x45, 0x46, 0xf4, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x4, 0xfe, 0xff, 0x0, 0x1, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x0, 0xab, 0xab, 0x3c, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x9c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xac, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xbc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x31, 0x36, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x0, 0xab, 0xab, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x31, 0x36, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x0, 0xab, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x0, 0x49, 0x53, 0x47, 0x4e, 0x9c, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x89, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x0, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x80, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0xc, 0x0, 0x0, 0x71, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x0, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x0, 0xab, 0xab, 0xab},
- }
-)
diff --git a/vendor/gioui.org/gpu/timer.go b/vendor/gioui.org/gpu/timer.go
index a1da948..c1e3227 100644
--- a/vendor/gioui.org/gpu/timer.go
+++ b/vendor/gioui.org/gpu/timer.go
@@ -5,18 +5,18 @@ package gpu
import (
"time"
- "gioui.org/gpu/backend"
+ "gioui.org/gpu/internal/driver"
)
type timers struct {
- backend backend.Device
+ backend driver.Device
timers []*timer
}
type timer struct {
Elapsed time.Duration
- backend backend.Device
- timer backend.Timer
+ backend driver.Device
+ timer driver.Timer
state timerState
}
@@ -28,7 +28,7 @@ const (
timerWaiting
)
-func newTimers(b backend.Device) *timers {
+func newTimers(b driver.Device) *timers {
return &timers{
backend: b,
}
@@ -83,7 +83,7 @@ func (t *timers) ready() bool {
return t.backend.IsTimeContinuous()
}
-func (t *timers) release() {
+func (t *timers) Release() {
if t == nil {
return
}
diff --git a/vendor/gioui.org/internal/byteslice/byteslice.go b/vendor/gioui.org/internal/byteslice/byteslice.go
new file mode 100644
index 0000000..26ebdb2
--- /dev/null
+++ b/vendor/gioui.org/internal/byteslice/byteslice.go
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// Package byteslice provides byte slice views of other Go values such as
+// slices and structs.
+package byteslice
+
+import (
+ "reflect"
+ "unsafe"
+)
+
+// Struct returns a byte slice view of a struct.
+func Struct(s interface{}) []byte {
+ v := reflect.ValueOf(s).Elem()
+ sz := int(v.Type().Size())
+ var res []byte
+ h := (*reflect.SliceHeader)(unsafe.Pointer(&res))
+ h.Data = uintptr(unsafe.Pointer(v.UnsafeAddr()))
+ h.Cap = sz
+ h.Len = sz
+ return res
+}
+
+// Uint32 returns a byte slice view of a uint32 slice.
+func Uint32(s []uint32) []byte {
+ n := len(s)
+ if n == 0 {
+ return nil
+ }
+ blen := n * int(unsafe.Sizeof(s[0]))
+ return (*[1 << 30]byte)(unsafe.Pointer(&s[0]))[:blen:blen]
+}
+
+// Slice returns a byte slice view of a slice.
+func Slice(s interface{}) []byte {
+ v := reflect.ValueOf(s)
+ first := v.Index(0)
+ sz := int(first.Type().Size())
+ var res []byte
+ h := (*reflect.SliceHeader)(unsafe.Pointer(&res))
+ h.Data = first.UnsafeAddr()
+ h.Cap = v.Cap() * sz
+ h.Len = v.Len() * sz
+ return res
+}
diff --git a/vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go b/vendor/gioui.org/internal/cocoainit/cocoa_darwin.go
index 2a34e57..2a34e57 100644
--- a/vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go
+++ b/vendor/gioui.org/internal/cocoainit/cocoa_darwin.go
diff --git a/vendor/gioui.org/app/internal/d3d11/d3d11_windows.go b/vendor/gioui.org/internal/d3d11/d3d11_windows.go
index 3dd2138..450fde1 100644
--- a/vendor/gioui.org/app/internal/d3d11/d3d11_windows.go
+++ b/vendor/gioui.org/internal/d3d11/d3d11_windows.go
@@ -13,9 +13,9 @@ import (
"golang.org/x/sys/windows"
)
-type _DXGI_SWAP_CHAIN_DESC struct {
- BufferDesc _DXGI_MODE_DESC
- SampleDesc _DXGI_SAMPLE_DESC
+type DXGI_SWAP_CHAIN_DESC struct {
+ BufferDesc DXGI_MODE_DESC
+ SampleDesc DXGI_SAMPLE_DESC
BufferUsage uint32
BufferCount uint32
OutputWindow windows.Handle
@@ -24,39 +24,39 @@ type _DXGI_SWAP_CHAIN_DESC struct {
Flags uint32
}
-type _DXGI_SAMPLE_DESC struct {
+type DXGI_SAMPLE_DESC struct {
Count uint32
Quality uint32
}
-type _DXGI_MODE_DESC struct {
+type DXGI_MODE_DESC struct {
Width uint32
Height uint32
- RefreshRate _DXGI_RATIONAL
+ RefreshRate DXGI_RATIONAL
Format uint32
ScanlineOrdering uint32
Scaling uint32
}
-type _DXGI_RATIONAL struct {
+type DXGI_RATIONAL struct {
Numerator uint32
Denominator uint32
}
-type _D3D11_TEXTURE2D_DESC struct {
+type TEXTURE2D_DESC struct {
Width uint32
Height uint32
MipLevels uint32
ArraySize uint32
Format uint32
- SampleDesc _DXGI_SAMPLE_DESC
+ SampleDesc DXGI_SAMPLE_DESC
Usage uint32
BindFlags uint32
CPUAccessFlags uint32
MiscFlags uint32
}
-type _D3D11_SAMPLER_DESC struct {
+type SAMPLER_DESC struct {
Filter uint32
AddressU uint32
AddressV uint32
@@ -69,22 +69,58 @@ type _D3D11_SAMPLER_DESC struct {
MaxLOD float32
}
-type _D3D11_SHADER_RESOURCE_VIEW_DESC_TEX2D struct {
- _D3D11_SHADER_RESOURCE_VIEW_DESC
- Texture2D _D3D11_TEX2D_SRV
+type SHADER_RESOURCE_VIEW_DESC_TEX2D struct {
+ SHADER_RESOURCE_VIEW_DESC
+ Texture2D TEX2D_SRV
}
-type _D3D11_SHADER_RESOURCE_VIEW_DESC struct {
+type SHADER_RESOURCE_VIEW_DESC_BUFFEREX struct {
+ SHADER_RESOURCE_VIEW_DESC
+ Buffer BUFFEREX_SRV
+}
+
+type UNORDERED_ACCESS_VIEW_DESC_TEX2D struct {
+ UNORDERED_ACCESS_VIEW_DESC
+ Texture2D TEX2D_UAV
+}
+
+type UNORDERED_ACCESS_VIEW_DESC_BUFFER struct {
+ UNORDERED_ACCESS_VIEW_DESC
+ Buffer BUFFER_UAV
+}
+
+type SHADER_RESOURCE_VIEW_DESC struct {
Format uint32
ViewDimension uint32
}
-type _D3D11_TEX2D_SRV struct {
+type UNORDERED_ACCESS_VIEW_DESC struct {
+ Format uint32
+ ViewDimension uint32
+}
+
+type TEX2D_SRV struct {
MostDetailedMip uint32
MipLevels uint32
}
-type _D3D11_INPUT_ELEMENT_DESC struct {
+type BUFFEREX_SRV struct {
+ FirstElement uint32
+ NumElements uint32
+ Flags uint32
+}
+
+type TEX2D_UAV struct {
+ MipSlice uint32
+}
+
+type BUFFER_UAV struct {
+ FirstElement uint32
+ NumElements uint32
+ Flags uint32
+}
+
+type INPUT_ELEMENT_DESC struct {
SemanticName *byte
SemanticIndex uint32
Format uint32
@@ -94,8 +130,8 @@ type _D3D11_INPUT_ELEMENT_DESC struct {
InstanceDataStepRate uint32
}
-type _IDXGISwapChain struct {
- vtbl *struct {
+type IDXGISwapChain struct {
+ Vtbl *struct {
_IUnknownVTbl
SetPrivateData uintptr
SetPrivateDataInterface uintptr
@@ -115,8 +151,23 @@ type _IDXGISwapChain struct {
}
}
-type _ID3D11Device struct {
- vtbl *struct {
+type Debug struct {
+ Vtbl *struct {
+ _IUnknownVTbl
+ SetFeatureMask uintptr
+ GetFeatureMask uintptr
+ SetPresentPerRenderOpDelay uintptr
+ GetPresentPerRenderOpDelay uintptr
+ SetSwapChain uintptr
+ GetSwapChain uintptr
+ ValidateContext uintptr
+ ReportLiveDeviceObjects uintptr
+ ValidateContextForDispatch uintptr
+ }
+}
+
+type Device struct {
+ Vtbl *struct {
_IUnknownVTbl
CreateBuffer uintptr
CreateTexture1D uintptr
@@ -161,8 +212,8 @@ type _ID3D11Device struct {
}
}
-type _ID3D11DeviceContext struct {
- vtbl *struct {
+type DeviceContext struct {
+ Vtbl *struct {
_IUnknownVTbl
GetDevice uintptr
GetPrivateData uintptr
@@ -279,122 +330,134 @@ type _ID3D11DeviceContext struct {
}
}
-type _ID3D11RenderTargetView struct {
- vtbl *struct {
+type RenderTargetView struct {
+ Vtbl *struct {
+ _IUnknownVTbl
+ }
+}
+
+type Resource struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11Resource struct {
- vtbl *struct {
+type Texture2D struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11Texture2D struct {
- vtbl *struct {
+type Buffer struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11Buffer struct {
- vtbl *struct {
+type SamplerState struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11SamplerState struct {
- vtbl *struct {
+type PixelShader struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11PixelShader struct {
- vtbl *struct {
+type ShaderResourceView struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11ShaderResourceView struct {
- vtbl *struct {
+type UnorderedAccessView struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11DepthStencilView struct {
- vtbl *struct {
+type DepthStencilView struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11BlendState struct {
- vtbl *struct {
+type BlendState struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11DepthStencilState struct {
- vtbl *struct {
+type DepthStencilState struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11VertexShader struct {
- vtbl *struct {
+type VertexShader struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11RasterizerState struct {
- vtbl *struct {
+type ComputeShader struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
-type _ID3D11InputLayout struct {
- vtbl *struct {
+type RasterizerState struct {
+ Vtbl *struct {
+ _IUnknownVTbl
+ }
+}
+
+type InputLayout struct {
+ Vtbl *struct {
_IUnknownVTbl
GetBufferPointer uintptr
GetBufferSize uintptr
}
}
-type _D3D11_DEPTH_STENCIL_DESC struct {
+type DEPTH_STENCIL_DESC struct {
DepthEnable uint32
DepthWriteMask uint32
DepthFunc uint32
StencilEnable uint32
StencilReadMask uint8
StencilWriteMask uint8
- FrontFace _D3D11_DEPTH_STENCILOP_DESC
- BackFace _D3D11_DEPTH_STENCILOP_DESC
+ FrontFace DEPTH_STENCILOP_DESC
+ BackFace DEPTH_STENCILOP_DESC
}
-type _D3D11_DEPTH_STENCILOP_DESC struct {
+type DEPTH_STENCILOP_DESC struct {
StencilFailOp uint32
StencilDepthFailOp uint32
StencilPassOp uint32
StencilFunc uint32
}
-type _D3D11_DEPTH_STENCIL_VIEW_DESC_TEX2D struct {
+type DEPTH_STENCIL_VIEW_DESC_TEX2D struct {
Format uint32
ViewDimension uint32
Flags uint32
- Texture2D _D3D11_TEX2D_DSV
+ Texture2D TEX2D_DSV
}
-type _D3D11_TEX2D_DSV struct {
+type TEX2D_DSV struct {
MipSlice uint32
}
-type _D3D11_BLEND_DESC struct {
+type BLEND_DESC struct {
AlphaToCoverageEnable uint32
IndependentBlendEnable uint32
- RenderTarget [8]_D3D11_RENDER_TARGET_BLEND_DESC
+ RenderTarget [8]RENDER_TARGET_BLEND_DESC
}
-type _D3D11_RENDER_TARGET_BLEND_DESC struct {
+type RENDER_TARGET_BLEND_DESC struct {
BlendEnable uint32
SrcBlend uint32
DestBlend uint32
@@ -405,8 +468,8 @@ type _D3D11_RENDER_TARGET_BLEND_DESC struct {
RenderTargetWriteMask uint8
}
-type _IDXGIObject struct {
- vtbl *struct {
+type IDXGIObject struct {
+ Vtbl *struct {
_IUnknownVTbl
SetPrivateData uintptr
SetPrivateDataInterface uintptr
@@ -415,8 +478,8 @@ type _IDXGIObject struct {
}
}
-type _IDXGIAdapter struct {
- vtbl *struct {
+type IDXGIAdapter struct {
+ Vtbl *struct {
_IUnknownVTbl
SetPrivateData uintptr
SetPrivateDataInterface uintptr
@@ -429,8 +492,8 @@ type _IDXGIAdapter struct {
}
}
-type _IDXGIFactory struct {
- vtbl *struct {
+type IDXGIFactory struct {
+ Vtbl *struct {
_IUnknownVTbl
SetPrivateData uintptr
SetPrivateDataInterface uintptr
@@ -444,8 +507,15 @@ type _IDXGIFactory struct {
}
}
-type _IDXGIDevice struct {
- vtbl *struct {
+type IDXGIDebug struct {
+ Vtbl *struct {
+ _IUnknownVTbl
+ ReportLiveObjects uintptr
+ }
+}
+
+type IDXGIDevice struct {
+ Vtbl *struct {
_IUnknownVTbl
SetPrivateData uintptr
SetPrivateDataInterface uintptr
@@ -459,8 +529,8 @@ type _IDXGIDevice struct {
}
}
-type _IUnknown struct {
- vtbl *struct {
+type IUnknown struct {
+ Vtbl *struct {
_IUnknownVTbl
}
}
@@ -471,7 +541,7 @@ type _IUnknownVTbl struct {
Release uintptr
}
-type _D3D11_BUFFER_DESC struct {
+type BUFFER_DESC struct {
ByteWidth uint32
Usage uint32
BindFlags uint32
@@ -480,7 +550,7 @@ type _D3D11_BUFFER_DESC struct {
StructureByteStride uint32
}
-type _GUID struct {
+type GUID struct {
Data1 uint32
Data2 uint16
Data3 uint16
@@ -494,7 +564,7 @@ type _GUID struct {
Data4_7 uint8
}
-type _D3D11_VIEWPORT struct {
+type VIEWPORT struct {
TopLeftX float32
TopLeftY float32
Width float32
@@ -503,21 +573,21 @@ type _D3D11_VIEWPORT struct {
MaxDepth float32
}
-type _D3D11_SUBRESOURCE_DATA struct {
+type SUBRESOURCE_DATA struct {
pSysMem *byte
}
-type _D3D11_BOX struct {
- left uint32
- top uint32
- front uint32
- right uint32
- bottom uint32
- back uint32
+type BOX struct {
+ Left uint32
+ Top uint32
+ Front uint32
+ Right uint32
+ Bottom uint32
+ Back uint32
}
-type _D3D11_MAPPED_SUBRESOURCE struct {
- pData uintptr
+type MAPPED_SUBRESOURCE struct {
+ PData uintptr
RowPitch uint32
DepthPitch uint32
}
@@ -527,7 +597,7 @@ type ErrorCode struct {
Code uint32
}
-type _D3D11_RASTERIZER_DESC struct {
+type RASTERIZER_DESC struct {
FillMode uint32
CullMode uint32
FrontCounterClockwise uint32
@@ -541,118 +611,146 @@ type _D3D11_RASTERIZER_DESC struct {
}
var (
- _IID_ID3D11Texture2D = _GUID{0x6f15aaf2, 0xd208, 0x4e89, 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c}
- _IID_IDXGIDevice = _GUID{0x54ec77fa, 0x1377, 0x44e6, 0x8c, 0x32, 0x88, 0xfd, 0x5f, 0x44, 0xc8, 0x4c}
- _IID_IDXGIFactory = _GUID{0x7b7166ec, 0x21c7, 0x44ae, 0xb2, 0x1a, 0xc9, 0xae, 0x32, 0x1a, 0xe3, 0x69}
+ IID_Texture2D = GUID{0x6f15aaf2, 0xd208, 0x4e89, 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c}
+ IID_IDXGIDebug = GUID{0x119E7452, 0xDE9E, 0x40fe, 0x88, 0x06, 0x88, 0xF9, 0x0C, 0x12, 0xB4, 0x41}
+ IID_IDXGIDevice = GUID{0x54ec77fa, 0x1377, 0x44e6, 0x8c, 0x32, 0x88, 0xfd, 0x5f, 0x44, 0xc8, 0x4c}
+ IID_IDXGIFactory = GUID{0x7b7166ec, 0x21c7, 0x44ae, 0xb2, 0x1a, 0xc9, 0xae, 0x32, 0x1a, 0xe3, 0x69}
+ IID_ID3D11Debug = GUID{0x79cf2233, 0x7536, 0x4948, 0x9d, 0x36, 0x1e, 0x46, 0x92, 0xdc, 0x57, 0x60}
+
+ DXGI_DEBUG_ALL = GUID{0xe48ae283, 0xda80, 0x490b, 0x87, 0xe6, 0x43, 0xe9, 0xa9, 0xcf, 0xda, 0x8}
)
var (
d3d11 = windows.NewLazySystemDLL("d3d11.dll")
- __D3D11CreateDevice = d3d11.NewProc("D3D11CreateDevice")
- __D3D11CreateDeviceAndSwapChain = d3d11.NewProc("D3D11CreateDeviceAndSwapChain")
+ _D3D11CreateDevice = d3d11.NewProc("D3D11CreateDevice")
+ _D3D11CreateDeviceAndSwapChain = d3d11.NewProc("D3D11CreateDeviceAndSwapChain")
+
+ dxgi = windows.NewLazySystemDLL("dxgi.dll")
+
+ _DXGIGetDebugInterface1 = dxgi.NewProc("DXGIGetDebugInterface1")
)
const (
- _D3D11_SDK_VERSION = 7
- _D3D_DRIVER_TYPE_HARDWARE = 1
+ SDK_VERSION = 7
+ DRIVER_TYPE_HARDWARE = 1
- _DXGI_FORMAT_UNKNOWN = 0
- _DXGI_FORMAT_R16_FLOAT = 54
- _DXGI_FORMAT_R32_FLOAT = 41
- _DXGI_FORMAT_R32G32_FLOAT = 16
- _DXGI_FORMAT_R32G32B32_FLOAT = 6
- _DXGI_FORMAT_R32G32B32A32_FLOAT = 2
- _DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29
- _DXGI_FORMAT_R16_SINT = 59
- _DXGI_FORMAT_R16G16_SINT = 38
- _DXGI_FORMAT_R16_UINT = 57
- _DXGI_FORMAT_D24_UNORM_S8_UINT = 45
- _DXGI_FORMAT_R16G16_FLOAT = 34
- _DXGI_FORMAT_R16G16B16A16_FLOAT = 10
+ DXGI_FORMAT_UNKNOWN = 0
+ DXGI_FORMAT_R16_FLOAT = 54
+ DXGI_FORMAT_R32_FLOAT = 41
+ DXGI_FORMAT_R32_TYPELESS = 39
+ DXGI_FORMAT_R32G32_FLOAT = 16
+ DXGI_FORMAT_R32G32B32_FLOAT = 6
+ DXGI_FORMAT_R32G32B32A32_FLOAT = 2
+ DXGI_FORMAT_R8G8B8A8_UNORM = 28
+ DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29
+ DXGI_FORMAT_R16_SINT = 59
+ DXGI_FORMAT_R16G16_SINT = 38
+ DXGI_FORMAT_R16_UINT = 57
+ DXGI_FORMAT_D24_UNORM_S8_UINT = 45
+ DXGI_FORMAT_R16G16_FLOAT = 34
+ DXGI_FORMAT_R16G16B16A16_FLOAT = 10
- _D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x20
- _D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x4000
+ DXGI_DEBUG_RLO_SUMMARY = 0x1
+ DXGI_DEBUG_RLO_DETAIL = 0x2
+ DXGI_DEBUG_RLO_IGNORE_INTERNAL = 0x4
- _DXGI_USAGE_RENDER_TARGET_OUTPUT = 1 << (1 + 4)
+ FORMAT_SUPPORT_TEXTURE2D = 0x20
+ FORMAT_SUPPORT_RENDER_TARGET = 0x4000
- _D3D11_CPU_ACCESS_READ = 0x20000
+ DXGI_USAGE_RENDER_TARGET_OUTPUT = 1 << (1 + 4)
- _D3D11_MAP_READ = 1
+ CPU_ACCESS_READ = 0x20000
- _DXGI_SWAP_EFFECT_DISCARD = 0
+ MAP_READ = 1
- _D3D_FEATURE_LEVEL_9_1 = 0x9100
- _D3D_FEATURE_LEVEL_9_3 = 0x9300
- _D3D_FEATURE_LEVEL_11_0 = 0xb000
+ DXGI_SWAP_EFFECT_DISCARD = 0
- _D3D11_USAGE_IMMUTABLE = 1
- _D3D11_USAGE_STAGING = 3
+ FEATURE_LEVEL_9_1 = 0x9100
+ FEATURE_LEVEL_9_3 = 0x9300
+ FEATURE_LEVEL_11_0 = 0xb000
- _D3D11_BIND_VERTEX_BUFFER = 0x1
- _D3D11_BIND_INDEX_BUFFER = 0x2
- _D3D11_BIND_CONSTANT_BUFFER = 0x4
- _D3D11_BIND_SHADER_RESOURCE = 0x8
- _D3D11_BIND_RENDER_TARGET = 0x20
- _D3D11_BIND_DEPTH_STENCIL = 0x40
+ USAGE_IMMUTABLE = 1
+ USAGE_STAGING = 3
- _D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4
- _D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5
+ BIND_VERTEX_BUFFER = 0x1
+ BIND_INDEX_BUFFER = 0x2
+ BIND_CONSTANT_BUFFER = 0x4
+ BIND_SHADER_RESOURCE = 0x8
+ BIND_RENDER_TARGET = 0x20
+ BIND_DEPTH_STENCIL = 0x40
+ BIND_UNORDERED_ACCESS = 0x80
- _D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14
- _D3D11_FILTER_MIN_MAG_MIP_POINT = 0
+ PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4
+ PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5
- _D3D11_TEXTURE_ADDRESS_MIRROR = 2
- _D3D11_TEXTURE_ADDRESS_CLAMP = 3
- _D3D11_TEXTURE_ADDRESS_WRAP = 1
+ FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14
+ FILTER_MIN_MAG_MIP_POINT = 0
- _D3D11_SRV_DIMENSION_TEXTURE2D = 4
+ TEXTURE_ADDRESS_MIRROR = 2
+ TEXTURE_ADDRESS_CLAMP = 3
+ TEXTURE_ADDRESS_WRAP = 1
- _D3D11_CREATE_DEVICE_DEBUG = 0x2
+ SRV_DIMENSION_BUFFER = 1
+ UAV_DIMENSION_BUFFER = 1
+ SRV_DIMENSION_BUFFEREX = 11
+ SRV_DIMENSION_TEXTURE2D = 4
+ UAV_DIMENSION_TEXTURE2D = 4
- _D3D11_FILL_SOLID = 3
+ BUFFER_UAV_FLAG_RAW = 0x1
+ BUFFEREX_SRV_FLAG_RAW = 0x1
- _D3D11_CULL_NONE = 1
+ RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20
- _D3D11_CLEAR_DEPTH = 0x1
- _D3D11_CLEAR_STENCIL = 0x2
+ CREATE_DEVICE_DEBUG = 0x2
- _D3D11_DSV_DIMENSION_TEXTURE2D = 3
+ FILL_SOLID = 3
- _D3D11_DEPTH_WRITE_MASK_ALL = 1
+ CULL_NONE = 1
- _D3D11_COMPARISON_GREATER = 5
- _D3D11_COMPARISON_GREATER_EQUAL = 7
+ CLEAR_DEPTH = 0x1
+ CLEAR_STENCIL = 0x2
- _D3D11_BLEND_OP_ADD = 1
- _D3D11_BLEND_ONE = 2
- _D3D11_BLEND_INV_SRC_ALPHA = 6
- _D3D11_BLEND_ZERO = 1
- _D3D11_BLEND_DEST_COLOR = 9
- _D3D11_BLEND_DEST_ALPHA = 7
+ DSV_DIMENSION_TEXTURE2D = 3
- _D3D11_COLOR_WRITE_ENABLE_ALL = 1 | 2 | 4 | 8
+ DEPTH_WRITE_MASK_ALL = 1
+
+ COMPARISON_GREATER = 5
+ COMPARISON_GREATER_EQUAL = 7
+
+ BLEND_OP_ADD = 1
+ BLEND_ONE = 2
+ BLEND_INV_SRC_ALPHA = 6
+ BLEND_ZERO = 1
+ BLEND_DEST_COLOR = 9
+ BLEND_DEST_ALPHA = 7
+
+ COLOR_WRITE_ENABLE_ALL = 1 | 2 | 4 | 8
DXGI_STATUS_OCCLUDED = 0x087A0001
DXGI_ERROR_DEVICE_RESET = 0x887A0007
DXGI_ERROR_DEVICE_REMOVED = 0x887A0005
D3DDDIERR_DEVICEREMOVED = 1<<31 | 0x876<<16 | 2160
+
+ RLDO_SUMMARY = 1
+ RLDO_DETAIL = 2
+ RLDO_IGNORE_INTERNAL = 4
)
-func _D3D11CreateDevice(driverType uint32, flags uint32) (*_ID3D11Device, *_ID3D11DeviceContext, uint32, error) {
+func CreateDevice(driverType uint32, flags uint32) (*Device, *DeviceContext, uint32, error) {
var (
- dev *_ID3D11Device
- ctx *_ID3D11DeviceContext
+ dev *Device
+ ctx *DeviceContext
featLvl uint32
)
- r, _, _ := __D3D11CreateDevice.Call(
+ r, _, _ := _D3D11CreateDevice.Call(
0, // pAdapter
uintptr(driverType), // driverType
0, // Software
uintptr(flags), // Flags
0, // pFeatureLevels
0, // FeatureLevels
- _D3D11_SDK_VERSION, // SDKVersion
+ SDK_VERSION, // SDKVersion
uintptr(unsafe.Pointer(&dev)), // ppDevice
uintptr(unsafe.Pointer(&featLvl)), // pFeatureLevel
uintptr(unsafe.Pointer(&ctx)), // ppImmediateContext
@@ -663,21 +761,21 @@ func _D3D11CreateDevice(driverType uint32, flags uint32) (*_ID3D11Device, *_ID3D
return dev, ctx, featLvl, nil
}
-func _D3D11CreateDeviceAndSwapChain(driverType uint32, flags uint32, swapDesc *_DXGI_SWAP_CHAIN_DESC) (*_ID3D11Device, *_ID3D11DeviceContext, *_IDXGISwapChain, uint32, error) {
+func CreateDeviceAndSwapChain(driverType uint32, flags uint32, swapDesc *DXGI_SWAP_CHAIN_DESC) (*Device, *DeviceContext, *IDXGISwapChain, uint32, error) {
var (
- dev *_ID3D11Device
- ctx *_ID3D11DeviceContext
- swchain *_IDXGISwapChain
+ dev *Device
+ ctx *DeviceContext
+ swchain *IDXGISwapChain
featLvl uint32
)
- r, _, _ := __D3D11CreateDeviceAndSwapChain.Call(
+ r, _, _ := _D3D11CreateDeviceAndSwapChain.Call(
0, // pAdapter
uintptr(driverType), // driverType
0, // Software
uintptr(flags), // Flags
0, // pFeatureLevels
0, // FeatureLevels
- _D3D11_SDK_VERSION, // SDKVersion
+ SDK_VERSION, // SDKVersion
uintptr(unsafe.Pointer(swapDesc)), // pSwapChainDesc
uintptr(unsafe.Pointer(&swchain)), // ppSwapChain
uintptr(unsafe.Pointer(&dev)), // ppDevice
@@ -690,31 +788,67 @@ func _D3D11CreateDeviceAndSwapChain(driverType uint32, flags uint32, swapDesc *_
return dev, ctx, swchain, featLvl, nil
}
-func (d *_ID3D11Device) CheckFormatSupport(format uint32) (uint32, error) {
+func DXGIGetDebugInterface1() (*IDXGIDebug, error) {
+ var dbg *IDXGIDebug
+ r, _, _ := _DXGIGetDebugInterface1.Call(
+ 0, // Flags
+ uintptr(unsafe.Pointer(&IID_IDXGIDebug)),
+ uintptr(unsafe.Pointer(&dbg)),
+ )
+ if r != 0 {
+ return nil, ErrorCode{Name: "DXGIGetDebugInterface1", Code: uint32(r)}
+ }
+ return dbg, nil
+}
+
+func ReportLiveObjects() error {
+ dxgi, err := DXGIGetDebugInterface1()
+ if err != nil {
+ return err
+ }
+ defer IUnknownRelease(unsafe.Pointer(dxgi), dxgi.Vtbl.Release)
+ dxgi.ReportLiveObjects(&DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_DETAIL|DXGI_DEBUG_RLO_IGNORE_INTERNAL)
+ return nil
+}
+
+func (d *IDXGIDebug) ReportLiveObjects(guid *GUID, flags uint32) {
+ syscall.Syscall6(
+ d.Vtbl.ReportLiveObjects,
+ 3,
+ uintptr(unsafe.Pointer(d)),
+ uintptr(unsafe.Pointer(guid)),
+ uintptr(flags),
+ 0,
+ 0,
+ 0,
+ )
+}
+
+func (d *Device) CheckFormatSupport(format uint32) (uint32, error) {
var support uint32
r, _, _ := syscall.Syscall(
- d.vtbl.CheckFormatSupport,
+ d.Vtbl.CheckFormatSupport,
3,
uintptr(unsafe.Pointer(d)),
uintptr(format),
uintptr(unsafe.Pointer(&support)),
)
if r != 0 {
- return 0, ErrorCode{Name: "ID3D11DeviceCheckFormatSupport", Code: uint32(r)}
+ return 0, ErrorCode{Name: "DeviceCheckFormatSupport", Code: uint32(r)}
}
return support, nil
}
-func (d *_ID3D11Device) CreateBuffer(desc *_D3D11_BUFFER_DESC, data []byte) (*_ID3D11Buffer, error) {
- var dataDesc *_D3D11_SUBRESOURCE_DATA
+func (d *Device) CreateBuffer(desc *BUFFER_DESC, data []byte) (*Buffer, error) {
+ var dataDesc *SUBRESOURCE_DATA
if len(data) > 0 {
- dataDesc = &_D3D11_SUBRESOURCE_DATA{
+ dataDesc = &SUBRESOURCE_DATA{
pSysMem: &data[0],
}
}
- var buf *_ID3D11Buffer
+ var buf *Buffer
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateBuffer,
+ d.Vtbl.CreateBuffer,
4,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(desc)),
@@ -723,15 +857,15 @@ func (d *_ID3D11Device) CreateBuffer(desc *_D3D11_BUFFER_DESC, data []byte) (*_I
0, 0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateBuffer", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateBuffer", Code: uint32(r)}
}
return buf, nil
}
-func (d *_ID3D11Device) CreateDepthStencilViewTEX2D(res *_ID3D11Resource, desc *_D3D11_DEPTH_STENCIL_VIEW_DESC_TEX2D) (*_ID3D11DepthStencilView, error) {
- var view *_ID3D11DepthStencilView
+func (d *Device) CreateDepthStencilViewTEX2D(res *Resource, desc *DEPTH_STENCIL_VIEW_DESC_TEX2D) (*DepthStencilView, error) {
+ var view *DepthStencilView
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateDepthStencilView,
+ d.Vtbl.CreateDepthStencilView,
4,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(res)),
@@ -740,15 +874,33 @@ func (d *_ID3D11Device) CreateDepthStencilViewTEX2D(res *_ID3D11Resource, desc *
0, 0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateDepthStencilView", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateDepthStencilView", Code: uint32(r)}
}
return view, nil
}
-func (d *_ID3D11Device) CreatePixelShader(bytecode []byte) (*_ID3D11PixelShader, error) {
- var shader *_ID3D11PixelShader
+func (d *Device) CreatePixelShader(bytecode []byte) (*PixelShader, error) {
+ var shader *PixelShader
+ r, _, _ := syscall.Syscall6(
+ d.Vtbl.CreatePixelShader,
+ 5,
+ uintptr(unsafe.Pointer(d)),
+ uintptr(unsafe.Pointer(&bytecode[0])),
+ uintptr(len(bytecode)),
+ 0, // pClassLinkage
+ uintptr(unsafe.Pointer(&shader)),
+ 0,
+ )
+ if r != 0 {
+ return nil, ErrorCode{Name: "DeviceCreatePixelShader", Code: uint32(r)}
+ }
+ return shader, nil
+}
+
+func (d *Device) CreateVertexShader(bytecode []byte) (*VertexShader, error) {
+ var shader *VertexShader
r, _, _ := syscall.Syscall6(
- d.vtbl.CreatePixelShader,
+ d.Vtbl.CreateVertexShader,
5,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(&bytecode[0])),
@@ -758,15 +910,15 @@ func (d *_ID3D11Device) CreatePixelShader(bytecode []byte) (*_ID3D11PixelShader,
0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreatePixelShader", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateVertexShader", Code: uint32(r)}
}
return shader, nil
}
-func (d *_ID3D11Device) CreateVertexShader(bytecode []byte) (*_ID3D11VertexShader, error) {
- var shader *_ID3D11VertexShader
+func (d *Device) CreateComputeShader(bytecode []byte) (*ComputeShader, error) {
+ var shader *ComputeShader
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateVertexShader,
+ d.Vtbl.CreateComputeShader,
5,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(&bytecode[0])),
@@ -776,51 +928,68 @@ func (d *_ID3D11Device) CreateVertexShader(bytecode []byte) (*_ID3D11VertexShade
0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateVertexShader", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateComputeShader", Code: uint32(r)}
}
return shader, nil
}
-func (d *_ID3D11Device) CreateShaderResourceViewTEX2D(res *_ID3D11Resource, desc *_D3D11_SHADER_RESOURCE_VIEW_DESC_TEX2D) (*_ID3D11ShaderResourceView, error) {
- var resView *_ID3D11ShaderResourceView
+func (d *Device) CreateShaderResourceView(res *Resource, desc unsafe.Pointer) (*ShaderResourceView, error) {
+ var resView *ShaderResourceView
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateShaderResourceView,
+ d.Vtbl.CreateShaderResourceView,
4,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(res)),
- uintptr(unsafe.Pointer(desc)),
+ uintptr(desc),
uintptr(unsafe.Pointer(&resView)),
0, 0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateShaderResourceView", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateShaderResourceView", Code: uint32(r)}
}
return resView, nil
}
-func (d *_ID3D11Device) CreateRasterizerState(desc *_D3D11_RASTERIZER_DESC) (*_ID3D11RasterizerState, error) {
- var state *_ID3D11RasterizerState
+func (d *Device) CreateUnorderedAccessView(res *Resource, desc unsafe.Pointer) (*UnorderedAccessView, error) {
+ var uaView *UnorderedAccessView
+ r, _, _ := syscall.Syscall6(
+ d.Vtbl.CreateUnorderedAccessView,
+ 4,
+ uintptr(unsafe.Pointer(d)),
+ uintptr(unsafe.Pointer(res)),
+ uintptr(desc),
+ uintptr(unsafe.Pointer(&uaView)),
+ 0, 0,
+ )
+ if r != 0 {
+ return nil, ErrorCode{Name: "DeviceCreateUnorderedAccessView", Code: uint32(r)}
+ }
+ return uaView, nil
+}
+
+func (d *Device) CreateRasterizerState(desc *RASTERIZER_DESC) (*RasterizerState, error) {
+ var state *RasterizerState
r, _, _ := syscall.Syscall(
- d.vtbl.CreateRasterizerState,
+ d.Vtbl.CreateRasterizerState,
3,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(desc)),
uintptr(unsafe.Pointer(&state)),
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateRasterizerState", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateRasterizerState", Code: uint32(r)}
}
return state, nil
}
-func (d *_ID3D11Device) CreateInputLayout(descs []_D3D11_INPUT_ELEMENT_DESC, bytecode []byte) (*_ID3D11InputLayout, error) {
- var pdesc *_D3D11_INPUT_ELEMENT_DESC
+func (d *Device) CreateInputLayout(descs []INPUT_ELEMENT_DESC, bytecode []byte) (*InputLayout, error) {
+ var pdesc *INPUT_ELEMENT_DESC
if len(descs) > 0 {
pdesc = &descs[0]
}
- var layout *_ID3D11InputLayout
+ var layout *InputLayout
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateInputLayout,
+ d.Vtbl.CreateInputLayout,
6,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(pdesc)),
@@ -830,30 +999,30 @@ func (d *_ID3D11Device) CreateInputLayout(descs []_D3D11_INPUT_ELEMENT_DESC, byt
uintptr(unsafe.Pointer(&layout)),
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateInputLayout", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateInputLayout", Code: uint32(r)}
}
return layout, nil
}
-func (d *_ID3D11Device) CreateSamplerState(desc *_D3D11_SAMPLER_DESC) (*_ID3D11SamplerState, error) {
- var sampler *_ID3D11SamplerState
+func (d *Device) CreateSamplerState(desc *SAMPLER_DESC) (*SamplerState, error) {
+ var sampler *SamplerState
r, _, _ := syscall.Syscall(
- d.vtbl.CreateSamplerState,
+ d.Vtbl.CreateSamplerState,
3,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(desc)),
uintptr(unsafe.Pointer(&sampler)),
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateSamplerState", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateSamplerState", Code: uint32(r)}
}
return sampler, nil
}
-func (d *_ID3D11Device) CreateTexture2D(desc *_D3D11_TEXTURE2D_DESC) (*_ID3D11Texture2D, error) {
- var tex *_ID3D11Texture2D
+func (d *Device) CreateTexture2D(desc *TEXTURE2D_DESC) (*Texture2D, error) {
+ var tex *Texture2D
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateTexture2D,
+ d.Vtbl.CreateTexture2D,
4,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(desc)),
@@ -862,15 +1031,15 @@ func (d *_ID3D11Device) CreateTexture2D(desc *_D3D11_TEXTURE2D_DESC) (*_ID3D11Te
0, 0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11CreateTexture2D", Code: uint32(r)}
+ return nil, ErrorCode{Name: "CreateTexture2D", Code: uint32(r)}
}
return tex, nil
}
-func (d *_ID3D11Device) CreateRenderTargetView(res *_ID3D11Resource) (*_ID3D11RenderTargetView, error) {
- var target *_ID3D11RenderTargetView
+func (d *Device) CreateRenderTargetView(res *Resource) (*RenderTargetView, error) {
+ var target *RenderTargetView
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateRenderTargetView,
+ d.Vtbl.CreateRenderTargetView,
4,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(res)),
@@ -879,59 +1048,102 @@ func (d *_ID3D11Device) CreateRenderTargetView(res *_ID3D11Resource) (*_ID3D11Re
0, 0,
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateRenderTargetView", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateRenderTargetView", Code: uint32(r)}
}
return target, nil
}
-func (d *_ID3D11Device) CreateBlendState(desc *_D3D11_BLEND_DESC) (*_ID3D11BlendState, error) {
- var state *_ID3D11BlendState
+func (d *Device) CreateBlendState(desc *BLEND_DESC) (*BlendState, error) {
+ var state *BlendState
r, _, _ := syscall.Syscall(
- d.vtbl.CreateBlendState,
+ d.Vtbl.CreateBlendState,
3,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(desc)),
uintptr(unsafe.Pointer(&state)),
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateBlendState", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateBlendState", Code: uint32(r)}
}
return state, nil
}
-func (d *_ID3D11Device) CreateDepthStencilState(desc *_D3D11_DEPTH_STENCIL_DESC) (*_ID3D11DepthStencilState, error) {
- var state *_ID3D11DepthStencilState
+func (d *Device) CreateDepthStencilState(desc *DEPTH_STENCIL_DESC) (*DepthStencilState, error) {
+ var state *DepthStencilState
r, _, _ := syscall.Syscall(
- d.vtbl.CreateDepthStencilState,
+ d.Vtbl.CreateDepthStencilState,
3,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(desc)),
uintptr(unsafe.Pointer(&state)),
)
if r != 0 {
- return nil, ErrorCode{Name: "ID3D11DeviceCreateDepthStencilState", Code: uint32(r)}
+ return nil, ErrorCode{Name: "DeviceCreateDepthStencilState", Code: uint32(r)}
}
return state, nil
}
-func (s *_IDXGISwapChain) GetDesc() (_DXGI_SWAP_CHAIN_DESC, error) {
- var desc _DXGI_SWAP_CHAIN_DESC
+func (d *Device) GetFeatureLevel() int {
+ lvl, _, _ := syscall.Syscall(
+ d.Vtbl.GetFeatureLevel,
+ 1,
+ uintptr(unsafe.Pointer(d)),
+ 0, 0,
+ )
+ return int(lvl)
+}
+
+func (d *Device) GetImmediateContext() *DeviceContext {
+ var ctx *DeviceContext
+ syscall.Syscall(
+ d.Vtbl.GetImmediateContext,
+ 2,
+ uintptr(unsafe.Pointer(d)),
+ uintptr(unsafe.Pointer(&ctx)),
+ 0,
+ )
+ return ctx
+}
+
+func (d *Device) ReportLiveDeviceObjects() error {
+ intf, err := IUnknownQueryInterface(unsafe.Pointer(d), d.Vtbl.QueryInterface, &IID_ID3D11Debug)
+ if err != nil {
+ return fmt.Errorf("ReportLiveObjects: failed to query ID3D11Debug interface: %v", err)
+ }
+ defer IUnknownRelease(unsafe.Pointer(intf), intf.Vtbl.Release)
+ dbg := (*Debug)(unsafe.Pointer(intf))
+ dbg.ReportLiveDeviceObjects(RLDO_DETAIL | RLDO_IGNORE_INTERNAL)
+ return nil
+}
+
+func (d *Debug) ReportLiveDeviceObjects(flags uint32) {
+ syscall.Syscall(
+ d.Vtbl.ReportLiveDeviceObjects,
+ 2,
+ uintptr(unsafe.Pointer(d)),
+ uintptr(flags),
+ 0,
+ )
+}
+
+func (s *IDXGISwapChain) GetDesc() (DXGI_SWAP_CHAIN_DESC, error) {
+ var desc DXGI_SWAP_CHAIN_DESC
r, _, _ := syscall.Syscall(
- s.vtbl.GetDesc,
+ s.Vtbl.GetDesc,
2,
uintptr(unsafe.Pointer(s)),
uintptr(unsafe.Pointer(&desc)),
0,
)
if r != 0 {
- return _DXGI_SWAP_CHAIN_DESC{}, ErrorCode{Name: "IDXGISwapChainGetDesc", Code: uint32(r)}
+ return DXGI_SWAP_CHAIN_DESC{}, ErrorCode{Name: "IDXGISwapChainGetDesc", Code: uint32(r)}
}
return desc, nil
}
-func (s *_IDXGISwapChain) ResizeBuffers(buffers, width, height, newFormat, flags uint32) error {
+func (s *IDXGISwapChain) ResizeBuffers(buffers, width, height, newFormat, flags uint32) error {
r, _, _ := syscall.Syscall6(
- s.vtbl.ResizeBuffers,
+ s.Vtbl.ResizeBuffers,
6,
uintptr(unsafe.Pointer(s)),
uintptr(buffers),
@@ -946,9 +1158,9 @@ func (s *_IDXGISwapChain) ResizeBuffers(buffers, width, height, newFormat, flags
return nil
}
-func (s *_IDXGISwapChain) Present(SyncInterval int, Flags uint32) error {
+func (s *IDXGISwapChain) Present(SyncInterval int, Flags uint32) error {
r, _, _ := syscall.Syscall(
- s.vtbl.Present,
+ s.Vtbl.Present,
3,
uintptr(unsafe.Pointer(s)),
uintptr(SyncInterval),
@@ -960,10 +1172,10 @@ func (s *_IDXGISwapChain) Present(SyncInterval int, Flags uint32) error {
return nil
}
-func (s *_IDXGISwapChain) GetBuffer(index int, riid *_GUID) (*_IUnknown, error) {
- var buf *_IUnknown
+func (s *IDXGISwapChain) GetBuffer(index int, riid *GUID) (*IUnknown, error) {
+ var buf *IUnknown
r, _, _ := syscall.Syscall6(
- s.vtbl.GetBuffer,
+ s.Vtbl.GetBuffer,
4,
uintptr(unsafe.Pointer(s)),
uintptr(index),
@@ -978,9 +1190,9 @@ func (s *_IDXGISwapChain) GetBuffer(index int, riid *_GUID) (*_IUnknown, error)
return buf, nil
}
-func (c *_ID3D11DeviceContext) Unmap(resource *_ID3D11Resource, subResource uint32) {
+func (c *DeviceContext) Unmap(resource *Resource, subResource uint32) {
syscall.Syscall(
- c.vtbl.Unmap,
+ c.Vtbl.Unmap,
3,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(resource)),
@@ -988,10 +1200,10 @@ func (c *_ID3D11DeviceContext) Unmap(resource *_ID3D11Resource, subResource uint
)
}
-func (c *_ID3D11DeviceContext) Map(resource *_ID3D11Resource, subResource, mapType, mapFlags uint32) (_D3D11_MAPPED_SUBRESOURCE, error) {
- var resMap _D3D11_MAPPED_SUBRESOURCE
+func (c *DeviceContext) Map(resource *Resource, subResource, mapType, mapFlags uint32) (MAPPED_SUBRESOURCE, error) {
+ var resMap MAPPED_SUBRESOURCE
r, _, _ := syscall.Syscall6(
- c.vtbl.Map,
+ c.Vtbl.Map,
6,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(resource)),
@@ -1001,14 +1213,14 @@ func (c *_ID3D11DeviceContext) Map(resource *_ID3D11Resource, subResource, mapTy
uintptr(unsafe.Pointer(&resMap)),
)
if r != 0 {
- return resMap, ErrorCode{Name: "ID3D11DeviceContextMap", Code: uint32(r)}
+ return resMap, ErrorCode{Name: "DeviceContextMap", Code: uint32(r)}
}
return resMap, nil
}
-func (c *_ID3D11DeviceContext) CopySubresourceRegion(dst *_ID3D11Resource, dstSubresource, dstX, dstY, dstZ uint32, src *_ID3D11Resource, srcSubresource uint32, srcBox *_D3D11_BOX) {
+func (c *DeviceContext) CopySubresourceRegion(dst *Resource, dstSubresource, dstX, dstY, dstZ uint32, src *Resource, srcSubresource uint32, srcBox *BOX) {
syscall.Syscall9(
- c.vtbl.CopySubresourceRegion,
+ c.Vtbl.CopySubresourceRegion,
9,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(dst)),
@@ -1022,9 +1234,9 @@ func (c *_ID3D11DeviceContext) CopySubresourceRegion(dst *_ID3D11Resource, dstSu
)
}
-func (c *_ID3D11DeviceContext) ClearDepthStencilView(target *_ID3D11DepthStencilView, flags uint32, depth float32, stencil uint8) {
+func (c *DeviceContext) ClearDepthStencilView(target *DepthStencilView, flags uint32, depth float32, stencil uint8) {
syscall.Syscall6(
- c.vtbl.ClearDepthStencilView,
+ c.Vtbl.ClearDepthStencilView,
5,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(target)),
@@ -1035,9 +1247,9 @@ func (c *_ID3D11DeviceContext) ClearDepthStencilView(target *_ID3D11DepthStencil
)
}
-func (c *_ID3D11DeviceContext) ClearRenderTargetView(target *_ID3D11RenderTargetView, color *[4]float32) {
+func (c *DeviceContext) ClearRenderTargetView(target *RenderTargetView, color *[4]float32) {
syscall.Syscall(
- c.vtbl.ClearRenderTargetView,
+ c.Vtbl.ClearRenderTargetView,
3,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(target)),
@@ -1045,9 +1257,45 @@ func (c *_ID3D11DeviceContext) ClearRenderTargetView(target *_ID3D11RenderTarget
)
}
-func (c *_ID3D11DeviceContext) RSSetViewports(viewport *_D3D11_VIEWPORT) {
+func (c *DeviceContext) CSSetShaderResources(startSlot uint32, s *ShaderResourceView) {
+ syscall.Syscall6(
+ c.Vtbl.CSSetShaderResources,
+ 4,
+ uintptr(unsafe.Pointer(c)),
+ uintptr(startSlot),
+ 1, // NumViews
+ uintptr(unsafe.Pointer(&s)),
+ 0, 0,
+ )
+}
+
+func (c *DeviceContext) CSSetUnorderedAccessViews(startSlot uint32, v *UnorderedAccessView) {
+ syscall.Syscall6(
+ c.Vtbl.CSSetUnorderedAccessViews,
+ 4,
+ uintptr(unsafe.Pointer(c)),
+ uintptr(startSlot),
+ 1, // NumViews
+ uintptr(unsafe.Pointer(&v)),
+ 0, 0,
+ )
+}
+
+func (c *DeviceContext) CSSetShader(s *ComputeShader) {
+ syscall.Syscall6(
+ c.Vtbl.CSSetShader,
+ 4,
+ uintptr(unsafe.Pointer(c)),
+ uintptr(unsafe.Pointer(s)),
+ 0, // ppClassInstances
+ 0, // NumClassInstances
+ 0, 0,
+ )
+}
+
+func (c *DeviceContext) RSSetViewports(viewport *VIEWPORT) {
syscall.Syscall(
- c.vtbl.RSSetViewports,
+ c.Vtbl.RSSetViewports,
3,
uintptr(unsafe.Pointer(c)),
1, // NumViewports
@@ -1055,9 +1303,9 @@ func (c *_ID3D11DeviceContext) RSSetViewports(viewport *_D3D11_VIEWPORT) {
)
}
-func (c *_ID3D11DeviceContext) VSSetShader(s *_ID3D11VertexShader) {
+func (c *DeviceContext) VSSetShader(s *VertexShader) {
syscall.Syscall6(
- c.vtbl.VSSetShader,
+ c.Vtbl.VSSetShader,
4,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(s)),
@@ -1067,9 +1315,9 @@ func (c *_ID3D11DeviceContext) VSSetShader(s *_ID3D11VertexShader) {
)
}
-func (c *_ID3D11DeviceContext) VSSetConstantBuffers(b *_ID3D11Buffer) {
+func (c *DeviceContext) VSSetConstantBuffers(b *Buffer) {
syscall.Syscall6(
- c.vtbl.VSSetConstantBuffers,
+ c.Vtbl.VSSetConstantBuffers,
4,
uintptr(unsafe.Pointer(c)),
0, // StartSlot
@@ -1079,9 +1327,9 @@ func (c *_ID3D11DeviceContext) VSSetConstantBuffers(b *_ID3D11Buffer) {
)
}
-func (c *_ID3D11DeviceContext) PSSetConstantBuffers(b *_ID3D11Buffer) {
+func (c *DeviceContext) PSSetConstantBuffers(b *Buffer) {
syscall.Syscall6(
- c.vtbl.PSSetConstantBuffers,
+ c.Vtbl.PSSetConstantBuffers,
4,
uintptr(unsafe.Pointer(c)),
0, // StartSlot
@@ -1091,9 +1339,9 @@ func (c *_ID3D11DeviceContext) PSSetConstantBuffers(b *_ID3D11Buffer) {
)
}
-func (c *_ID3D11DeviceContext) PSSetShaderResources(startSlot uint32, s *_ID3D11ShaderResourceView) {
+func (c *DeviceContext) PSSetShaderResources(startSlot uint32, s *ShaderResourceView) {
syscall.Syscall6(
- c.vtbl.PSSetShaderResources,
+ c.Vtbl.PSSetShaderResources,
4,
uintptr(unsafe.Pointer(c)),
uintptr(startSlot),
@@ -1103,9 +1351,9 @@ func (c *_ID3D11DeviceContext) PSSetShaderResources(startSlot uint32, s *_ID3D11
)
}
-func (c *_ID3D11DeviceContext) PSSetSamplers(startSlot uint32, s *_ID3D11SamplerState) {
+func (c *DeviceContext) PSSetSamplers(startSlot uint32, s *SamplerState) {
syscall.Syscall6(
- c.vtbl.PSSetSamplers,
+ c.Vtbl.PSSetSamplers,
4,
uintptr(unsafe.Pointer(c)),
uintptr(startSlot),
@@ -1115,9 +1363,9 @@ func (c *_ID3D11DeviceContext) PSSetSamplers(startSlot uint32, s *_ID3D11Sampler
)
}
-func (c *_ID3D11DeviceContext) PSSetShader(s *_ID3D11PixelShader) {
+func (c *DeviceContext) PSSetShader(s *PixelShader) {
syscall.Syscall6(
- c.vtbl.PSSetShader,
+ c.Vtbl.PSSetShader,
4,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(s)),
@@ -1127,14 +1375,14 @@ func (c *_ID3D11DeviceContext) PSSetShader(s *_ID3D11PixelShader) {
)
}
-func (c *_ID3D11DeviceContext) UpdateSubresource(res *_ID3D11Resource, rowPitch, depthPitch uint32, data []byte) {
+func (c *DeviceContext) UpdateSubresource(res *Resource, dstBox *BOX, rowPitch, depthPitch uint32, data []byte) {
syscall.Syscall9(
- c.vtbl.UpdateSubresource,
+ c.Vtbl.UpdateSubresource,
7,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(res)),
0, // DstSubresource
- 0, // pDstBox
+ uintptr(unsafe.Pointer(dstBox)),
uintptr(unsafe.Pointer(&data[0])),
uintptr(rowPitch),
uintptr(depthPitch),
@@ -1142,9 +1390,9 @@ func (c *_ID3D11DeviceContext) UpdateSubresource(res *_ID3D11Resource, rowPitch,
)
}
-func (c *_ID3D11DeviceContext) RSSetState(state *_ID3D11RasterizerState) {
+func (c *DeviceContext) RSSetState(state *RasterizerState) {
syscall.Syscall(
- c.vtbl.RSSetState,
+ c.Vtbl.RSSetState,
2,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(state)),
@@ -1152,9 +1400,9 @@ func (c *_ID3D11DeviceContext) RSSetState(state *_ID3D11RasterizerState) {
)
}
-func (c *_ID3D11DeviceContext) IASetInputLayout(layout *_ID3D11InputLayout) {
+func (c *DeviceContext) IASetInputLayout(layout *InputLayout) {
syscall.Syscall(
- c.vtbl.IASetInputLayout,
+ c.Vtbl.IASetInputLayout,
2,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(layout)),
@@ -1162,9 +1410,9 @@ func (c *_ID3D11DeviceContext) IASetInputLayout(layout *_ID3D11InputLayout) {
)
}
-func (c *_ID3D11DeviceContext) IASetIndexBuffer(buf *_ID3D11Buffer, format, offset uint32) {
+func (c *DeviceContext) IASetIndexBuffer(buf *Buffer, format, offset uint32) {
syscall.Syscall6(
- c.vtbl.IASetIndexBuffer,
+ c.Vtbl.IASetIndexBuffer,
4,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(buf)),
@@ -1174,9 +1422,9 @@ func (c *_ID3D11DeviceContext) IASetIndexBuffer(buf *_ID3D11Buffer, format, offs
)
}
-func (c *_ID3D11DeviceContext) IASetVertexBuffers(buf *_ID3D11Buffer, stride, offset uint32) {
+func (c *DeviceContext) IASetVertexBuffers(buf *Buffer, stride, offset uint32) {
syscall.Syscall6(
- c.vtbl.IASetVertexBuffers,
+ c.Vtbl.IASetVertexBuffers,
6,
uintptr(unsafe.Pointer(c)),
0, // StartSlot
@@ -1187,9 +1435,9 @@ func (c *_ID3D11DeviceContext) IASetVertexBuffers(buf *_ID3D11Buffer, stride, of
)
}
-func (c *_ID3D11DeviceContext) IASetPrimitiveTopology(mode uint32) {
+func (c *DeviceContext) IASetPrimitiveTopology(mode uint32) {
syscall.Syscall(
- c.vtbl.IASetPrimitiveTopology,
+ c.Vtbl.IASetPrimitiveTopology,
2,
uintptr(unsafe.Pointer(c)),
uintptr(mode),
@@ -1197,23 +1445,26 @@ func (c *_ID3D11DeviceContext) IASetPrimitiveTopology(mode uint32) {
)
}
-func (c *_ID3D11DeviceContext) OMGetRenderTargets() *_ID3D11RenderTargetView {
- var target *_ID3D11RenderTargetView
+func (c *DeviceContext) OMGetRenderTargets() (*RenderTargetView, *DepthStencilView) {
+ var (
+ target *RenderTargetView
+ depthStencilView *DepthStencilView
+ )
syscall.Syscall6(
- c.vtbl.OMGetRenderTargets,
+ c.Vtbl.OMGetRenderTargets,
4,
uintptr(unsafe.Pointer(c)),
1, // NumViews
uintptr(unsafe.Pointer(&target)),
- 0, // pDepthStencilView
+ uintptr(unsafe.Pointer(&depthStencilView)),
0, 0,
)
- return target
+ return target, depthStencilView
}
-func (c *_ID3D11DeviceContext) OMSetRenderTargets(target *_ID3D11RenderTargetView, depthStencil *_ID3D11DepthStencilView) {
+func (c *DeviceContext) OMSetRenderTargets(target *RenderTargetView, depthStencil *DepthStencilView) {
syscall.Syscall6(
- c.vtbl.OMSetRenderTargets,
+ c.Vtbl.OMSetRenderTargets,
4,
uintptr(unsafe.Pointer(c)),
1, // NumViews
@@ -1223,9 +1474,9 @@ func (c *_ID3D11DeviceContext) OMSetRenderTargets(target *_ID3D11RenderTargetVie
)
}
-func (c *_ID3D11DeviceContext) Draw(count, start uint32) {
+func (c *DeviceContext) Draw(count, start uint32) {
syscall.Syscall(
- c.vtbl.Draw,
+ c.Vtbl.Draw,
3,
uintptr(unsafe.Pointer(c)),
uintptr(count),
@@ -1233,9 +1484,9 @@ func (c *_ID3D11DeviceContext) Draw(count, start uint32) {
)
}
-func (c *_ID3D11DeviceContext) DrawIndexed(count, start uint32, base int32) {
+func (c *DeviceContext) DrawIndexed(count, start uint32, base int32) {
syscall.Syscall6(
- c.vtbl.DrawIndexed,
+ c.Vtbl.DrawIndexed,
4,
uintptr(unsafe.Pointer(c)),
uintptr(count),
@@ -1245,9 +1496,21 @@ func (c *_ID3D11DeviceContext) DrawIndexed(count, start uint32, base int32) {
)
}
-func (c *_ID3D11DeviceContext) OMSetBlendState(state *_ID3D11BlendState, factor *f32color.RGBA, sampleMask uint32) {
+func (c *DeviceContext) Dispatch(x, y, z uint32) {
+ syscall.Syscall6(
+ c.Vtbl.Dispatch,
+ 4,
+ uintptr(unsafe.Pointer(c)),
+ uintptr(x),
+ uintptr(y),
+ uintptr(z),
+ 0, 0,
+ )
+}
+
+func (c *DeviceContext) OMSetBlendState(state *BlendState, factor *f32color.RGBA, sampleMask uint32) {
syscall.Syscall6(
- c.vtbl.OMSetBlendState,
+ c.Vtbl.OMSetBlendState,
4,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(state)),
@@ -1257,9 +1520,9 @@ func (c *_ID3D11DeviceContext) OMSetBlendState(state *_ID3D11BlendState, factor
)
}
-func (c *_ID3D11DeviceContext) OMSetDepthStencilState(state *_ID3D11DepthStencilState, stencilRef uint32) {
+func (c *DeviceContext) OMSetDepthStencilState(state *DepthStencilState, stencilRef uint32) {
syscall.Syscall(
- c.vtbl.OMSetDepthStencilState,
+ c.Vtbl.OMSetDepthStencilState,
3,
uintptr(unsafe.Pointer(c)),
uintptr(unsafe.Pointer(state)),
@@ -1267,10 +1530,10 @@ func (c *_ID3D11DeviceContext) OMSetDepthStencilState(state *_ID3D11DepthStencil
)
}
-func (d *_IDXGIObject) GetParent(guid *_GUID) (*_IDXGIObject, error) {
- var parent *_IDXGIObject
+func (d *IDXGIObject) GetParent(guid *GUID) (*IDXGIObject, error) {
+ var parent *IDXGIObject
r, _, _ := syscall.Syscall(
- d.vtbl.GetParent,
+ d.Vtbl.GetParent,
3,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(guid)),
@@ -1282,10 +1545,10 @@ func (d *_IDXGIObject) GetParent(guid *_GUID) (*_IDXGIObject, error) {
return parent, nil
}
-func (d *_IDXGIFactory) CreateSwapChain(device *_IUnknown, desc *_DXGI_SWAP_CHAIN_DESC) (*_IDXGISwapChain, error) {
- var swchain *_IDXGISwapChain
+func (d *IDXGIFactory) CreateSwapChain(device *IUnknown, desc *DXGI_SWAP_CHAIN_DESC) (*IDXGISwapChain, error) {
+ var swchain *IDXGISwapChain
r, _, _ := syscall.Syscall6(
- d.vtbl.CreateSwapChain,
+ d.Vtbl.CreateSwapChain,
4,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(device)),
@@ -1299,10 +1562,10 @@ func (d *_IDXGIFactory) CreateSwapChain(device *_IUnknown, desc *_DXGI_SWAP_CHAI
return swchain, nil
}
-func (d *_IDXGIDevice) GetAdapter() (*_IDXGIAdapter, error) {
- var adapter *_IDXGIAdapter
+func (d *IDXGIDevice) GetAdapter() (*IDXGIAdapter, error) {
+ var adapter *IDXGIAdapter
r, _, _ := syscall.Syscall(
- d.vtbl.GetAdapter,
+ d.Vtbl.GetAdapter,
2,
uintptr(unsafe.Pointer(d)),
uintptr(unsafe.Pointer(&adapter)),
@@ -1314,8 +1577,8 @@ func (d *_IDXGIDevice) GetAdapter() (*_IDXGIAdapter, error) {
return adapter, nil
}
-func _IUnknownQueryInterface(obj unsafe.Pointer, queryInterfaceMethod uintptr, guid *_GUID) (*_IUnknown, error) {
- var ref *_IUnknown
+func IUnknownQueryInterface(obj unsafe.Pointer, queryInterfaceMethod uintptr, guid *GUID) (*IUnknown, error) {
+ var ref *IUnknown
r, _, _ := syscall.Syscall(
queryInterfaceMethod,
3,
@@ -1329,7 +1592,17 @@ func _IUnknownQueryInterface(obj unsafe.Pointer, queryInterfaceMethod uintptr, g
return ref, nil
}
-func _IUnknownRelease(obj unsafe.Pointer, releaseMethod uintptr) {
+func IUnknownAddRef(obj unsafe.Pointer, addRefMethod uintptr) {
+ syscall.Syscall(
+ addRefMethod,
+ 1,
+ uintptr(obj),
+ 0,
+ 0,
+ )
+}
+
+func IUnknownRelease(obj unsafe.Pointer, releaseMethod uintptr) {
syscall.Syscall(
releaseMethod,
1,
@@ -1342,3 +1615,68 @@ func _IUnknownRelease(obj unsafe.Pointer, releaseMethod uintptr) {
func (e ErrorCode) Error() string {
return fmt.Sprintf("%s: %#x", e.Name, e.Code)
}
+
+func CreateSwapChain(dev *Device, hwnd windows.Handle) (*IDXGISwapChain, error) {
+ dxgiDev, err := IUnknownQueryInterface(unsafe.Pointer(dev), dev.Vtbl.QueryInterface, &IID_IDXGIDevice)
+ if err != nil {
+ return nil, fmt.Errorf("NewContext: %v", err)
+ }
+ adapter, err := (*IDXGIDevice)(unsafe.Pointer(dxgiDev)).GetAdapter()
+ IUnknownRelease(unsafe.Pointer(dxgiDev), dxgiDev.Vtbl.Release)
+ if err != nil {
+ return nil, fmt.Errorf("NewContext: %v", err)
+ }
+ dxgiFactory, err := (*IDXGIObject)(unsafe.Pointer(adapter)).GetParent(&IID_IDXGIFactory)
+ IUnknownRelease(unsafe.Pointer(adapter), adapter.Vtbl.Release)
+ if err != nil {
+ return nil, fmt.Errorf("NewContext: %v", err)
+ }
+ swchain, err := (*IDXGIFactory)(unsafe.Pointer(dxgiFactory)).CreateSwapChain(
+ (*IUnknown)(unsafe.Pointer(dev)),
+ &DXGI_SWAP_CHAIN_DESC{
+ BufferDesc: DXGI_MODE_DESC{
+ Format: DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
+ },
+ SampleDesc: DXGI_SAMPLE_DESC{
+ Count: 1,
+ },
+ BufferUsage: DXGI_USAGE_RENDER_TARGET_OUTPUT,
+ BufferCount: 1,
+ OutputWindow: hwnd,
+ Windowed: 1,
+ SwapEffect: DXGI_SWAP_EFFECT_DISCARD,
+ },
+ )
+ IUnknownRelease(unsafe.Pointer(dxgiFactory), dxgiFactory.Vtbl.Release)
+ if err != nil {
+ return nil, fmt.Errorf("NewContext: %v", err)
+ }
+ return swchain, nil
+}
+
+func CreateDepthView(d *Device, width, height, depthBits int) (*DepthStencilView, error) {
+ depthTex, err := d.CreateTexture2D(&TEXTURE2D_DESC{
+ Width: uint32(width),
+ Height: uint32(height),
+ MipLevels: 1,
+ ArraySize: 1,
+ Format: DXGI_FORMAT_D24_UNORM_S8_UINT,
+ SampleDesc: DXGI_SAMPLE_DESC{
+ Count: 1,
+ Quality: 0,
+ },
+ BindFlags: BIND_DEPTH_STENCIL,
+ })
+ if err != nil {
+ return nil, err
+ }
+ depthView, err := d.CreateDepthStencilViewTEX2D(
+ (*Resource)(unsafe.Pointer(depthTex)),
+ &DEPTH_STENCIL_VIEW_DESC_TEX2D{
+ Format: DXGI_FORMAT_D24_UNORM_S8_UINT,
+ ViewDimension: DSV_DIMENSION_TEXTURE2D,
+ },
+ )
+ IUnknownRelease(unsafe.Pointer(depthTex), depthTex.Vtbl.Release)
+ return depthView, err
+}
diff --git a/vendor/gioui.org/app/internal/egl/egl.go b/vendor/gioui.org/internal/egl/egl.go
index f1d2595..7d7b551 100644
--- a/vendor/gioui.org/app/internal/egl/egl.go
+++ b/vendor/gioui.org/internal/egl/egl.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build linux || windows || freebsd || openbsd
// +build linux windows freebsd openbsd
package egl
@@ -10,21 +11,14 @@ import (
"runtime"
"strings"
- "gioui.org/app/internal/glimpl"
- "gioui.org/app/internal/srgb"
- "gioui.org/gpu/backend"
- "gioui.org/gpu/gl"
+ "gioui.org/gpu"
)
type Context struct {
- c *glimpl.Functions
disp _EGLDisplay
eglCtx *eglContext
eglSurf _EGLSurface
width, height int
- refreshFBO bool
- // For sRGB emulation.
- srgbFBO *srgb.FBO
}
type eglContext struct {
@@ -63,30 +57,18 @@ const (
)
func (c *Context) Release() {
- if c.srgbFBO != nil {
- c.srgbFBO.Release()
- c.srgbFBO = nil
- }
c.ReleaseSurface()
if c.eglCtx != nil {
eglDestroyContext(c.disp, c.eglCtx.ctx)
- eglTerminate(c.disp)
- eglReleaseThread()
c.eglCtx = nil
}
c.disp = nilEGLDisplay
}
func (c *Context) Present() error {
- if c.srgbFBO != nil {
- c.srgbFBO.Blit()
- }
if !eglSwapBuffers(c.disp, c.eglSurf) {
return fmt.Errorf("eglSwapBuffers failed (%x)", eglGetError())
}
- if c.srgbFBO != nil {
- c.srgbFBO.AfterPresent()
- }
return nil
}
@@ -111,17 +93,16 @@ func NewContext(disp NativeDisplayType) (*Context, error) {
c := &Context{
disp: eglDisp,
eglCtx: eglCtx,
- c: new(glimpl.Functions),
}
return c, nil
}
-func (c *Context) Functions() *glimpl.Functions {
- return c.c
+func (c *Context) RenderTarget() (gpu.RenderTarget, error) {
+ return gpu.OpenGLRenderTarget{}, nil
}
-func (c *Context) Backend() (backend.Device, error) {
- return gl.NewBackend(c.c)
+func (c *Context) API() gpu.API {
+ return gpu.OpenGL{}
}
func (c *Context) ReleaseSurface() {
@@ -129,7 +110,7 @@ func (c *Context) ReleaseSurface() {
return
}
// Make sure any in-flight GL commands are complete.
- c.c.Finish()
+ eglWaitClient()
c.ReleaseCurrent()
eglDestroySurface(c.disp, c.eglSurf)
c.eglSurf = nilEGLSurface
@@ -144,7 +125,6 @@ func (c *Context) CreateSurface(win NativeWindowType, width, height int) error {
c.eglSurf = eglSurf
c.width = width
c.height = height
- c.refreshFBO = true
return err
}
@@ -155,26 +135,15 @@ func (c *Context) ReleaseCurrent() {
}
func (c *Context) MakeCurrent() error {
+ // OpenGL contexts are implicit and thread-local. Lock the OS thread.
+ runtime.LockOSThread()
+
if c.eglSurf == nilEGLSurface && !c.eglCtx.surfaceless {
return errors.New("no surface created yet EGL_KHR_surfaceless_context is not supported")
}
if !eglMakeCurrent(c.disp, c.eglSurf, c.eglSurf, c.eglCtx.ctx) {
return fmt.Errorf("eglMakeCurrent error 0x%x", eglGetError())
}
- if c.eglCtx.srgb || c.eglSurf == nilEGLSurface {
- return nil
- }
- if c.srgbFBO == nil {
- var err error
- c.srgbFBO, err = srgb.New(c.c)
- if err != nil {
- return err
- }
- }
- if c.refreshFBO {
- c.refreshFBO = false
- return c.srgbFBO.Refresh(c.width, c.height)
- }
return nil
}
@@ -216,11 +185,9 @@ func createContext(disp _EGLDisplay) (*eglContext, error) {
// Some Mesa drivers crash if an sRGB framebuffer is requested without alpha.
// https://bugs.freedesktop.org/show_bug.cgi?id=107782.
//
- // Also, some Android devices (Samsung S9) needs alpha for sRGB to work.
- attribs = append(attribs, _EGL_ALPHA_SIZE, 1)
+ // Also, some Android devices (Samsung S9) need alpha for sRGB to work.
+ attribs = append(attribs, _EGL_ALPHA_SIZE, 8)
}
- // Only request a depth buffer if we're going to render directly to the framebuffer.
- attribs = append(attribs, _EGL_DEPTH_SIZE, 16)
}
attribs = append(attribs, _EGL_NONE)
eglCfg, ret := eglChooseConfig(disp, attribs)
@@ -228,11 +195,18 @@ func createContext(disp _EGLDisplay) (*eglContext, error) {
return nil, fmt.Errorf("eglChooseConfig failed: 0x%x", eglGetError())
}
if eglCfg == nilEGLConfig {
- return nil, errors.New("eglChooseConfig returned 0 configs")
+ supportsNoCfg := hasExtension(exts, "EGL_KHR_no_config_context")
+ if !supportsNoCfg {
+ return nil, errors.New("eglChooseConfig returned no configs")
+ }
}
- visID, ret := eglGetConfigAttrib(disp, eglCfg, _EGL_NATIVE_VISUAL_ID)
- if !ret {
- return nil, errors.New("newContext: eglGetConfigAttrib for _EGL_NATIVE_VISUAL_ID failed")
+ var visID _EGLint
+ if eglCfg != nilEGLConfig {
+ var ok bool
+ visID, ok = eglGetConfigAttrib(disp, eglCfg, _EGL_NATIVE_VISUAL_ID)
+ if !ok {
+ return nil, errors.New("newContext: eglGetConfigAttrib for _EGL_NATIVE_VISUAL_ID failed")
+ }
}
ctxAttribs := []_EGLint{
_EGL_CONTEXT_CLIENT_VERSION, 3,
@@ -267,7 +241,7 @@ func createSurface(disp _EGLDisplay, eglCtx *eglContext, win NativeWindowType) (
surfAttribs = append(surfAttribs, _EGL_NONE)
eglSurf := eglCreateWindowSurface(disp, eglCtx.config, win, surfAttribs)
if eglSurf == nilEGLSurface && eglCtx.srgb {
- // Try again without sRGB
+ // Try again without sRGB.
eglCtx.srgb = false
surfAttribs = []_EGLint{_EGL_NONE}
eglSurf = eglCreateWindowSurface(disp, eglCtx.config, win, surfAttribs)
diff --git a/vendor/gioui.org/app/internal/egl/egl_unix.go b/vendor/gioui.org/internal/egl/egl_unix.go
index 0c6734f..bd3efa5 100644
--- a/vendor/gioui.org/app/internal/egl/egl_unix.go
+++ b/vendor/gioui.org/internal/egl/egl_unix.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build linux || freebsd || openbsd
// +build linux freebsd openbsd
package egl
@@ -11,7 +12,7 @@ package egl
#cgo freebsd LDFLAGS: -L/usr/local/lib
#cgo openbsd CFLAGS: -I/usr/X11R6/include
#cgo openbsd LDFLAGS: -L/usr/X11R6/lib
-#cgo CFLAGS: -DMESA_EGL_NO_X11_HEADERS
+#cgo CFLAGS: -DEGL_NO_X11
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -102,3 +103,7 @@ func eglCreateWindowSurface(disp _EGLDisplay, conf _EGLConfig, win NativeWindowT
eglSurf := C.eglCreateWindowSurface(disp, conf, win, &attribs[0])
return eglSurf
}
+
+func eglWaitClient() bool {
+ return C.eglWaitClient() == C.EGL_TRUE
+}
diff --git a/vendor/gioui.org/app/internal/egl/egl_windows.go b/vendor/gioui.org/internal/egl/egl_windows.go
index 5d9a4fe..4433dd7 100644
--- a/vendor/gioui.org/app/internal/egl/egl_windows.go
+++ b/vendor/gioui.org/internal/egl/egl_windows.go
@@ -10,8 +10,7 @@ import (
syscall "golang.org/x/sys/windows"
- "gioui.org/app/internal/glimpl"
- gunsafe "gioui.org/internal/unsafe"
+ "gioui.org/internal/gl"
)
type (
@@ -41,6 +40,7 @@ var (
_eglSwapBuffers = libEGL.NewProc("eglSwapBuffers")
_eglTerminate = libEGL.NewProc("eglTerminate")
_eglQueryString = libEGL.NewProc("eglQueryString")
+ _eglWaitClient = libEGL.NewProc("eglWaitClient")
)
var loadOnce sync.Once
@@ -57,7 +57,7 @@ func loadDLLs() error {
if err := loadDLL(libEGL, "libEGL.dll"); err != nil {
return err
}
- if err := loadDLL(glimpl.LibGLESv2, "libGLESv2.dll"); err != nil {
+ if err := loadDLL(gl.LibGLESv2, "libGLESv2.dll"); err != nil {
return err
}
// d3dcompiler_47.dll is needed internally for shader compilation to function.
@@ -154,7 +154,12 @@ func eglTerminate(disp _EGLDisplay) bool {
func eglQueryString(disp _EGLDisplay, name _EGLint) string {
r, _, _ := _eglQueryString.Call(uintptr(disp), uintptr(name))
- return gunsafe.GoString(gunsafe.SliceOf(r))
+ return syscall.BytePtrToString((*byte)(unsafe.Pointer(r)))
+}
+
+func eglWaitClient() bool {
+ r, _, _ := _eglWaitClient.Call()
+ return r != 0
}
// issue34474KeepAlive calls runtime.KeepAlive as a
diff --git a/vendor/gioui.org/internal/f32color/rgba.go b/vendor/gioui.org/internal/f32color/rgba.go
index efaa1fb..eecf018 100644
--- a/vendor/gioui.org/internal/f32color/rgba.go
+++ b/vendor/gioui.org/internal/f32color/rgba.go
@@ -7,7 +7,7 @@ import (
"math"
)
-// RGBA is a 32 bit floating point linear space color.
+// RGBA is a 32 bit floating point linear premultiplied color space.
type RGBA struct {
R, G, B, A float32
}
@@ -23,30 +23,90 @@ func (col RGBA) Float32() (r, g, b, a float32) {
}
// SRGBA converts from linear to sRGB color space.
-func (col RGBA) SRGB() color.RGBA {
- return color.RGBA{
- R: uint8(linearTosRGB(col.R)*255 + .5),
- G: uint8(linearTosRGB(col.G)*255 + .5),
- B: uint8(linearTosRGB(col.B)*255 + .5),
+func (col RGBA) SRGB() color.NRGBA {
+ if col.A == 0 {
+ return color.NRGBA{}
+ }
+ return color.NRGBA{
+ R: uint8(linearTosRGB(col.R/col.A)*255 + .5),
+ G: uint8(linearTosRGB(col.G/col.A)*255 + .5),
+ B: uint8(linearTosRGB(col.B/col.A)*255 + .5),
A: uint8(col.A*255 + .5),
}
}
+// Luminance calculates the relative luminance of a linear RGBA color.
+// Normalized to 0 for black and 1 for white.
+//
+// See https://www.w3.org/TR/WCAG20/#relativeluminancedef for more details
+func (col RGBA) Luminance() float32 {
+ return 0.2126*col.R + 0.7152*col.G + 0.0722*col.B
+}
+
// Opaque returns the color without alpha component.
func (col RGBA) Opaque() RGBA {
col.A = 1.0
return col
}
-// RGBAFromSRGB converts from SRGBA to RGBA.
-func RGBAFromSRGB(col color.RGBA) RGBA {
- r, g, b, a := col.RGBA()
+// LinearFromSRGB converts from col in the sRGB colorspace to RGBA.
+func LinearFromSRGB(col color.NRGBA) RGBA {
+ af := float32(col.A) / 0xFF
return RGBA{
- R: sRGBToLinear(float32(r) / 0xffff),
- G: sRGBToLinear(float32(g) / 0xffff),
- B: sRGBToLinear(float32(b) / 0xffff),
- A: float32(a) / 0xFFFF,
+ R: sRGBToLinear(float32(col.R)/0xff) * af,
+ G: sRGBToLinear(float32(col.G)/0xff) * af,
+ B: sRGBToLinear(float32(col.B)/0xff) * af,
+ A: af,
+ }
+}
+
+// NRGBAToRGBA converts from non-premultiplied sRGB color to premultiplied sRGB color.
+//
+// Each component in the result is `sRGBToLinear(c * alpha)`, where `c`
+// is the linear color.
+func NRGBAToRGBA(col color.NRGBA) color.RGBA {
+ if col.A == 0xFF {
+ return color.RGBA(col)
+ }
+ c := LinearFromSRGB(col)
+ return color.RGBA{
+ R: uint8(linearTosRGB(c.R)*255 + .5),
+ G: uint8(linearTosRGB(c.G)*255 + .5),
+ B: uint8(linearTosRGB(c.B)*255 + .5),
+ A: col.A,
+ }
+}
+
+// NRGBAToLinearRGBA converts from non-premultiplied sRGB color to premultiplied linear RGBA color.
+//
+// Each component in the result is `c * alpha`, where `c` is the linear color.
+func NRGBAToLinearRGBA(col color.NRGBA) color.RGBA {
+ if col.A == 0xFF {
+ return color.RGBA(col)
+ }
+ c := LinearFromSRGB(col)
+ return color.RGBA{
+ R: uint8(c.R*255 + .5),
+ G: uint8(c.G*255 + .5),
+ B: uint8(c.B*255 + .5),
+ A: col.A,
+ }
+}
+
+// RGBAToNRGBA converts from premultiplied sRGB color to non-premultiplied sRGB color.
+func RGBAToNRGBA(col color.RGBA) color.NRGBA {
+ if col.A == 0xFF {
+ return color.NRGBA(col)
+ }
+
+ linear := RGBA{
+ R: sRGBToLinear(float32(col.R) / 0xff),
+ G: sRGBToLinear(float32(col.G) / 0xff),
+ B: sRGBToLinear(float32(col.B) / 0xff),
+ A: float32(col.A) / 0xff,
}
+
+ return linear.SRGB()
}
// linearTosRGB transforms color value from linear to sRGB.
@@ -73,3 +133,45 @@ func sRGBToLinear(c float32) float32 {
return float32(math.Pow(float64((c+0.055)/1.055), 2.4))
}
}
+
+// MulAlpha applies the alpha to the color.
+func MulAlpha(c color.NRGBA, alpha uint8) color.NRGBA {
+ c.A = uint8(uint32(c.A) * uint32(alpha) / 0xFF)
+ return c
+}
+
+// Disabled blends color towards the luminance and multiplies alpha.
+// Blending towards luminance will desaturate the color.
+// Multiplying alpha blends the color together more with the background.
+func Disabled(c color.NRGBA) (d color.NRGBA) {
+ const r = 80 // blend ratio
+ lum := approxLuminance(c)
+ return color.NRGBA{
+ R: byte((int(c.R)*r + int(lum)*(256-r)) / 256),
+ G: byte((int(c.G)*r + int(lum)*(256-r)) / 256),
+ B: byte((int(c.B)*r + int(lum)*(256-r)) / 256),
+ A: byte(int(c.A) * (128 + 32) / 256),
+ }
+}
+
+// Hovered blends color towards a brighter color.
+func Hovered(c color.NRGBA) (d color.NRGBA) {
+ const r = 0x20 // lighten ratio
+ return color.NRGBA{
+ R: byte(255 - int(255-c.R)*(255-r)/256),
+ G: byte(255 - int(255-c.G)*(255-r)/256),
+ B: byte(255 - int(255-c.B)*(255-r)/256),
+ A: c.A,
+ }
+}
+
+// approxLuminance is a fast approximate version of RGBA.Luminance.
+func approxLuminance(c color.NRGBA) byte {
+ const (
+ r = 13933 // 0.2126 * 256 * 256
+ g = 46871 // 0.7152 * 256 * 256
+ b = 4732 // 0.0722 * 256 * 256
+ t = r + g + b
+ )
+ return byte((r*int(c.R) + g*int(c.G) + b*int(c.B)) / t)
+}
diff --git a/vendor/gioui.org/gpu/gl/gl.go b/vendor/gioui.org/internal/gl/gl.go
index 350f60f..a9e378a 100644
--- a/vendor/gioui.org/gpu/gl/gl.go
+++ b/vendor/gioui.org/internal/gl/gl.go
@@ -8,20 +8,38 @@ type (
)
const (
+ ACTIVE_TEXTURE = 0x84E0
+ ALL_BARRIER_BITS = 0xffffffff
ARRAY_BUFFER = 0x8892
+ ARRAY_BUFFER_BINDING = 0x8894
+ BACK = 0x0405
BLEND = 0xbe2
+ BLEND_DST_RGB = 0x80C8
+ BLEND_SRC_RGB = 0x80C9
+ BLEND_DST_ALPHA = 0x80CA
+ BLEND_SRC_ALPHA = 0x80CB
CLAMP_TO_EDGE = 0x812f
COLOR_ATTACHMENT0 = 0x8ce0
COLOR_BUFFER_BIT = 0x4000
+ COLOR_CLEAR_VALUE = 0x0C22
COMPILE_STATUS = 0x8b81
- DEPTH_BUFFER_BIT = 0x100
+ COMPUTE_SHADER = 0x91B9
+ CURRENT_PROGRAM = 0x8B8D
DEPTH_ATTACHMENT = 0x8d00
+ DEPTH_BUFFER_BIT = 0x100
+ DEPTH_CLEAR_VALUE = 0x0B73
DEPTH_COMPONENT16 = 0x81a5
DEPTH_COMPONENT24 = 0x81A6
DEPTH_COMPONENT32F = 0x8CAC
+ DEPTH_FUNC = 0x0B74
DEPTH_TEST = 0xb71
+ DEPTH_WRITEMASK = 0x0B72
+ DRAW_FRAMEBUFFER = 0x8CA9
DST_COLOR = 0x306
+ DYNAMIC_DRAW = 0x88E8
+ DYNAMIC_READ = 0x88E9
ELEMENT_ARRAY_BUFFER = 0x8893
+ ELEMENT_ARRAY_BUFFER_BINDING = 0x8895
EXTENSIONS = 0x1f03
FALSE = 0
FLOAT = 0x1406
@@ -30,6 +48,7 @@ const (
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210
FRAMEBUFFER_BINDING = 0x8ca6
FRAMEBUFFER_COMPLETE = 0x8cd5
+ FRAMEBUFFER_SRGB = 0x8db9
HALF_FLOAT = 0x140b
HALF_FLOAT_OES = 0x8d61
INFO_LOG_LENGTH = 0x8B84
@@ -39,17 +58,23 @@ const (
LINEAR = 0x2601
LINK_STATUS = 0x8b82
LUMINANCE = 0x1909
+ MAP_READ_BIT = 0x0001
MAX_TEXTURE_SIZE = 0xd33
NEAREST = 0x2600
NO_ERROR = 0x0
NUM_EXTENSIONS = 0x821D
ONE = 0x1
ONE_MINUS_SRC_ALPHA = 0x303
+ PACK_ROW_LENGTH = 0x0D02
+ PROGRAM_BINARY_LENGTH = 0x8741
QUERY_RESULT = 0x8866
QUERY_RESULT_AVAILABLE = 0x8867
R16F = 0x822d
R8 = 0x8229
READ_FRAMEBUFFER = 0x8ca8
+ READ_FRAMEBUFFER_BINDING = 0x8CAA
+ READ_ONLY = 0x88B8
+ READ_WRITE = 0x88BA
RED = 0x1903
RENDERER = 0x1F01
RENDERBUFFER = 0x8d41
@@ -59,13 +84,17 @@ const (
RGB = 0x1907
RGBA = 0x1908
RGBA8 = 0x8058
+ SHADER_STORAGE_BUFFER = 0x90D2
+ SHADER_STORAGE_BUFFER_BINDING = 0x90D3
SHORT = 0x1402
SRGB = 0x8c40
SRGB_ALPHA_EXT = 0x8c42
SRGB8 = 0x8c41
SRGB8_ALPHA8 = 0x8c43
STATIC_DRAW = 0x88e4
+ STENCIL_BUFFER_BIT = 0x00000400
TEXTURE_2D = 0xde1
+ TEXTURE_BINDING_2D = 0x8069
TEXTURE_MAG_FILTER = 0x2800
TEXTURE_MIN_FILTER = 0x2801
TEXTURE_WRAP_S = 0x2802
@@ -76,86 +105,26 @@ const (
TRIANGLES = 0x4
TRUE = 1
UNIFORM_BUFFER = 0x8A11
+ UNIFORM_BUFFER_BINDING = 0x8A28
UNPACK_ALIGNMENT = 0xcf5
+ UNPACK_ROW_LENGTH = 0x0CF2
UNSIGNED_BYTE = 0x1401
UNSIGNED_SHORT = 0x1403
+ VIEWPORT = 0x0BA2
VERSION = 0x1f02
+ VERTEX_ARRAY_BINDING = 0x85B5
VERTEX_SHADER = 0x8b31
+ VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F
+ VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622
+ VERTEX_ATTRIB_ARRAY_POINTER = 0x8645
+ VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A
+ VERTEX_ATTRIB_ARRAY_SIZE = 0x8623
+ VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624
+ VERTEX_ATTRIB_ARRAY_TYPE = 0x8625
+ WRITE_ONLY = 0x88B9
ZERO = 0x0
// EXT_disjoint_timer_query
TIME_ELAPSED_EXT = 0x88BF
GPU_DISJOINT_EXT = 0x8FBB
)
-
-type Functions interface {
- ActiveTexture(texture Enum)
- AttachShader(p Program, s Shader)
- BeginQuery(target Enum, query Query)
- BindAttribLocation(p Program, a Attrib, name string)
- BindBuffer(target Enum, b Buffer)
- BindBufferBase(target Enum, index int, buffer Buffer)
- BindFramebuffer(target Enum, fb Framebuffer)
- BindRenderbuffer(target Enum, fb Renderbuffer)
- BindTexture(target Enum, t Texture)
- BlendEquation(mode Enum)
- BlendFunc(sfactor, dfactor Enum)
- BufferData(target Enum, src []byte, usage Enum)
- CheckFramebufferStatus(target Enum) Enum
- Clear(mask Enum)
- ClearColor(red, green, blue, alpha float32)
- ClearDepthf(d float32)
- CompileShader(s Shader)
- CreateBuffer() Buffer
- CreateFramebuffer() Framebuffer
- CreateProgram() Program
- CreateQuery() Query
- CreateRenderbuffer() Renderbuffer
- CreateShader(ty Enum) Shader
- CreateTexture() Texture
- DeleteBuffer(v Buffer)
- DeleteFramebuffer(v Framebuffer)
- DeleteProgram(p Program)
- DeleteQuery(query Query)
- DeleteRenderbuffer(r Renderbuffer)
- DeleteShader(s Shader)
- DeleteTexture(v Texture)
- DepthFunc(f Enum)
- DepthMask(mask bool)
- DisableVertexAttribArray(a Attrib)
- Disable(cap Enum)
- DrawArrays(mode Enum, first, count int)
- DrawElements(mode Enum, count int, ty Enum, offset int)
- Enable(cap Enum)
- EnableVertexAttribArray(a Attrib)
- EndQuery(target Enum)
- FramebufferTexture2D(target, attachment, texTarget Enum, t Texture, level int)
- FramebufferRenderbuffer(target, attachment, renderbuffertarget Enum, renderbuffer Renderbuffer)
- GetBinding(pname Enum) Object
- GetError() Enum
- GetInteger(pname Enum) int
- GetProgrami(p Program, pname Enum) int
- GetProgramInfoLog(p Program) string
- GetQueryObjectuiv(query Query, pname Enum) uint
- GetShaderi(s Shader, pname Enum) int
- GetShaderInfoLog(s Shader) string
- GetString(pname Enum) string
- GetUniformBlockIndex(p Program, name string) uint
- GetUniformLocation(p Program, name string) Uniform
- InvalidateFramebuffer(target, attachment Enum)
- LinkProgram(p Program)
- ReadPixels(x, y, width, height int, format, ty Enum, data []byte)
- RenderbufferStorage(target, internalformat Enum, width, height int)
- ShaderSource(s Shader, src string)
- TexImage2D(target Enum, level int, internalFormat int, width, height int, format, ty Enum, data []byte)
- TexParameteri(target, pname Enum, param int)
- UniformBlockBinding(p Program, uniformBlockIndex uint, uniformBlockBinding uint)
- Uniform1f(dst Uniform, v float32)
- Uniform1i(dst Uniform, v int)
- Uniform2f(dst Uniform, v0, v1 float32)
- Uniform3f(dst Uniform, v0, v1, v2 float32)
- Uniform4f(dst Uniform, v0, v1, v2, v3 float32)
- UseProgram(p Program)
- VertexAttribPointer(dst Attrib, size int, ty Enum, normalized bool, stride, offset int)
- Viewport(x, y, width, height int)
-}
diff --git a/vendor/gioui.org/internal/gl/gl_js.go b/vendor/gioui.org/internal/gl/gl_js.go
new file mode 100644
index 0000000..2c7976e
--- /dev/null
+++ b/vendor/gioui.org/internal/gl/gl_js.go
@@ -0,0 +1,458 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gl
+
+import (
+ "errors"
+ "strings"
+ "syscall/js"
+)
+
+type Functions struct {
+ Ctx js.Value
+ EXT_disjoint_timer_query js.Value
+ EXT_disjoint_timer_query_webgl2 js.Value
+
+ // Cached reference to the Uint8Array JS type.
+ uint8Array js.Value
+
+ // Cached JS arrays.
+ arrayBuf js.Value
+ int32Buf js.Value
+
+ isWebGL2 bool
+}
+
+type Context js.Value
+
+func NewFunctions(ctx Context, forceES bool) (*Functions, error) {
+ f := &Functions{
+ Ctx: js.Value(ctx),
+ uint8Array: js.Global().Get("Uint8Array"),
+ }
+ if err := f.Init(); err != nil {
+ return nil, err
+ }
+ return f, nil
+}
+
+func (f *Functions) Init() error {
+ webgl2Class := js.Global().Get("WebGL2RenderingContext")
+ f.isWebGL2 = !webgl2Class.IsUndefined() && f.Ctx.InstanceOf(webgl2Class)
+ if !f.isWebGL2 {
+ f.EXT_disjoint_timer_query = f.getExtension("EXT_disjoint_timer_query")
+ if f.getExtension("OES_texture_half_float").IsNull() && f.getExtension("OES_texture_float").IsNull() {
+ return errors.New("gl: no support for neither OES_texture_half_float nor OES_texture_float")
+ }
+ if f.getExtension("EXT_sRGB").IsNull() {
+ return errors.New("gl: EXT_sRGB not supported")
+ }
+ } else {
+ // WebGL2 extensions.
+ f.EXT_disjoint_timer_query_webgl2 = f.getExtension("EXT_disjoint_timer_query_webgl2")
+ if f.getExtension("EXT_color_buffer_half_float").IsNull() && f.getExtension("EXT_color_buffer_float").IsNull() {
+ return errors.New("gl: no support for neither EXT_color_buffer_half_float nor EXT_color_buffer_float")
+ }
+ }
+ return nil
+}
+
+func (f *Functions) getExtension(name string) js.Value {
+ return f.Ctx.Call("getExtension", name)
+}
+
+func (f *Functions) ActiveTexture(t Enum) {
+ f.Ctx.Call("activeTexture", int(t))
+}
+func (f *Functions) AttachShader(p Program, s Shader) {
+ f.Ctx.Call("attachShader", js.Value(p), js.Value(s))
+}
+func (f *Functions) BeginQuery(target Enum, query Query) {
+ if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
+ f.Ctx.Call("beginQuery", int(target), js.Value(query))
+ } else {
+ f.EXT_disjoint_timer_query.Call("beginQueryEXT", int(target), js.Value(query))
+ }
+}
+func (f *Functions) BindAttribLocation(p Program, a Attrib, name string) {
+ f.Ctx.Call("bindAttribLocation", js.Value(p), int(a), name)
+}
+func (f *Functions) BindBuffer(target Enum, b Buffer) {
+ f.Ctx.Call("bindBuffer", int(target), js.Value(b))
+}
+func (f *Functions) BindBufferBase(target Enum, index int, b Buffer) {
+ f.Ctx.Call("bindBufferBase", int(target), index, js.Value(b))
+}
+func (f *Functions) BindFramebuffer(target Enum, fb Framebuffer) {
+ f.Ctx.Call("bindFramebuffer", int(target), js.Value(fb))
+}
+func (f *Functions) BindRenderbuffer(target Enum, rb Renderbuffer) {
+ f.Ctx.Call("bindRenderbuffer", int(target), js.Value(rb))
+}
+func (f *Functions) BindTexture(target Enum, t Texture) {
+ f.Ctx.Call("bindTexture", int(target), js.Value(t))
+}
+func (f *Functions) BindImageTexture(unit int, t Texture, level int, layered bool, layer int, access, format Enum) {
+ panic("not implemented")
+}
+func (f *Functions) BindVertexArray(a VertexArray) {
+ panic("not supported")
+}
+func (f *Functions) BlendEquation(mode Enum) {
+ f.Ctx.Call("blendEquation", int(mode))
+}
+func (f *Functions) BlendFuncSeparate(srcRGB, dstRGB, srcA, dstA Enum) {
+ f.Ctx.Call("blendFunc", int(srcRGB), int(dstRGB), int(srcA), int(dstA))
+}
+func (f *Functions) BufferData(target Enum, size int, usage Enum, data []byte) {
+ if data == nil {
+ f.Ctx.Call("bufferData", int(target), size, int(usage))
+ } else {
+ if len(data) != size {
+ panic("size mismatch")
+ }
+ f.Ctx.Call("bufferData", int(target), f.byteArrayOf(data), int(usage))
+ }
+}
+func (f *Functions) BufferSubData(target Enum, offset int, src []byte) {
+ f.Ctx.Call("bufferSubData", int(target), offset, f.byteArrayOf(src))
+}
+func (f *Functions) CheckFramebufferStatus(target Enum) Enum {
+ return Enum(f.Ctx.Call("checkFramebufferStatus", int(target)).Int())
+}
+func (f *Functions) Clear(mask Enum) {
+ f.Ctx.Call("clear", int(mask))
+}
+func (f *Functions) ClearColor(red, green, blue, alpha float32) {
+ f.Ctx.Call("clearColor", red, green, blue, alpha)
+}
+func (f *Functions) ClearDepthf(d float32) {
+ f.Ctx.Call("clearDepth", d)
+}
+func (f *Functions) CompileShader(s Shader) {
+ f.Ctx.Call("compileShader", js.Value(s))
+}
+func (f *Functions) CopyTexSubImage2D(target Enum, level, xoffset, yoffset, x, y, width, height int) {
+ f.Ctx.Call("copyTexSubImage2D", int(target), level, xoffset, yoffset, x, y, width, height)
+}
+func (f *Functions) CreateBuffer() Buffer {
+ return Buffer(f.Ctx.Call("createBuffer"))
+}
+func (f *Functions) CreateFramebuffer() Framebuffer {
+ return Framebuffer(f.Ctx.Call("createFramebuffer"))
+}
+func (f *Functions) CreateProgram() Program {
+ return Program(f.Ctx.Call("createProgram"))
+}
+func (f *Functions) CreateQuery() Query {
+ return Query(f.Ctx.Call("createQuery"))
+}
+func (f *Functions) CreateRenderbuffer() Renderbuffer {
+ return Renderbuffer(f.Ctx.Call("createRenderbuffer"))
+}
+func (f *Functions) CreateShader(ty Enum) Shader {
+ return Shader(f.Ctx.Call("createShader", int(ty)))
+}
+func (f *Functions) CreateTexture() Texture {
+ return Texture(f.Ctx.Call("createTexture"))
+}
+func (f *Functions) CreateVertexArray() VertexArray {
+ panic("not supported")
+}
+func (f *Functions) DeleteBuffer(v Buffer) {
+ f.Ctx.Call("deleteBuffer", js.Value(v))
+}
+func (f *Functions) DeleteFramebuffer(v Framebuffer) {
+ f.Ctx.Call("deleteFramebuffer", js.Value(v))
+}
+func (f *Functions) DeleteProgram(p Program) {
+ f.Ctx.Call("deleteProgram", js.Value(p))
+}
+func (f *Functions) DeleteQuery(query Query) {
+ if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
+ f.Ctx.Call("deleteQuery", js.Value(query))
+ } else {
+ f.EXT_disjoint_timer_query.Call("deleteQueryEXT", js.Value(query))
+ }
+}
+func (f *Functions) DeleteShader(s Shader) {
+ f.Ctx.Call("deleteShader", js.Value(s))
+}
+func (f *Functions) DeleteRenderbuffer(v Renderbuffer) {
+ f.Ctx.Call("deleteRenderbuffer", js.Value(v))
+}
+func (f *Functions) DeleteTexture(v Texture) {
+ f.Ctx.Call("deleteTexture", js.Value(v))
+}
+func (f *Functions) DeleteVertexArray(a VertexArray) {
+ panic("not implemented")
+}
+func (f *Functions) DepthFunc(fn Enum) {
+ f.Ctx.Call("depthFunc", int(fn))
+}
+func (f *Functions) DepthMask(mask bool) {
+ f.Ctx.Call("depthMask", mask)
+}
+func (f *Functions) DisableVertexAttribArray(a Attrib) {
+ f.Ctx.Call("disableVertexAttribArray", int(a))
+}
+func (f *Functions) Disable(cap Enum) {
+ f.Ctx.Call("disable", int(cap))
+}
+func (f *Functions) DrawArrays(mode Enum, first, count int) {
+ f.Ctx.Call("drawArrays", int(mode), first, count)
+}
+func (f *Functions) DrawElements(mode Enum, count int, ty Enum, offset int) {
+ f.Ctx.Call("drawElements", int(mode), count, int(ty), offset)
+}
+func (f *Functions) DispatchCompute(x, y, z int) {
+ panic("not implemented")
+}
+func (f *Functions) Enable(cap Enum) {
+ f.Ctx.Call("enable", int(cap))
+}
+func (f *Functions) EnableVertexAttribArray(a Attrib) {
+ f.Ctx.Call("enableVertexAttribArray", int(a))
+}
+func (f *Functions) EndQuery(target Enum) {
+ if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
+ f.Ctx.Call("endQuery", int(target))
+ } else {
+ f.EXT_disjoint_timer_query.Call("endQueryEXT", int(target))
+ }
+}
+func (f *Functions) Finish() {
+ f.Ctx.Call("finish")
+}
+func (f *Functions) Flush() {
+ f.Ctx.Call("flush")
+}
+func (f *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget Enum, renderbuffer Renderbuffer) {
+ f.Ctx.Call("framebufferRenderbuffer", int(target), int(attachment), int(renderbuffertarget), js.Value(renderbuffer))
+}
+func (f *Functions) FramebufferTexture2D(target, attachment, texTarget Enum, t Texture, level int) {
+ f.Ctx.Call("framebufferTexture2D", int(target), int(attachment), int(texTarget), js.Value(t), level)
+}
+func (f *Functions) GetError() Enum {
+ // Avoid slow getError calls. See gio#179.
+ return 0
+}
+func (f *Functions) GetRenderbufferParameteri(target, pname Enum) int {
+ return paramVal(f.Ctx.Call("getRenderbufferParameteri", int(pname)))
+}
+func (f *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname Enum) int {
+ if !f.isWebGL2 && pname == FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING {
+ // FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING is only available on WebGL 2
+ return LINEAR
+ }
+ return paramVal(f.Ctx.Call("getFramebufferAttachmentParameter", int(target), int(attachment), int(pname)))
+}
+func (f *Functions) GetBinding(pname Enum) Object {
+ obj := f.Ctx.Call("getParameter", int(pname))
+ if !obj.Truthy() {
+ return Object{}
+ }
+ return Object(obj)
+}
+func (f *Functions) GetBindingi(pname Enum, idx int) Object {
+ obj := f.Ctx.Call("getIndexedParameter", int(pname), idx)
+ if !obj.Truthy() {
+ return Object{}
+ }
+ return Object(obj)
+}
+func (f *Functions) GetInteger(pname Enum) int {
+ if !f.isWebGL2 {
+ switch pname {
+ case PACK_ROW_LENGTH, UNPACK_ROW_LENGTH:
+ return 0 // PACK_ROW_LENGTH and UNPACK_ROW_LENGTH is only available on WebGL 2
+ }
+ }
+ return paramVal(f.Ctx.Call("getParameter", int(pname)))
+}
+func (f *Functions) GetFloat(pname Enum) float32 {
+ return float32(f.Ctx.Call("getParameter", int(pname)).Float())
+}
+func (f *Functions) GetInteger4(pname Enum) [4]int {
+ arr := f.Ctx.Call("getParameter", int(pname))
+ var res [4]int
+ for i := range res {
+ res[i] = arr.Index(i).Int()
+ }
+ return res
+}
+func (f *Functions) GetFloat4(pname Enum) [4]float32 {
+ arr := f.Ctx.Call("getParameter", int(pname))
+ var res [4]float32
+ for i := range res {
+ res[i] = float32(arr.Index(i).Float())
+ }
+ return res
+}
+func (f *Functions) GetProgrami(p Program, pname Enum) int {
+ return paramVal(f.Ctx.Call("getProgramParameter", js.Value(p), int(pname)))
+}
+func (f *Functions) GetProgramInfoLog(p Program) string {
+ return f.Ctx.Call("getProgramInfoLog", js.Value(p)).String()
+}
+func (f *Functions) GetQueryObjectuiv(query Query, pname Enum) uint {
+ if !f.EXT_disjoint_timer_query_webgl2.IsNull() {
+ return uint(paramVal(f.Ctx.Call("getQueryParameter", js.Value(query), int(pname))))
+ } else {
+ return uint(paramVal(f.EXT_disjoint_timer_query.Call("getQueryObjectEXT", js.Value(query), int(pname))))
+ }
+}
+func (f *Functions) GetShaderi(s Shader, pname Enum) int {
+ return paramVal(f.Ctx.Call("getShaderParameter", js.Value(s), int(pname)))
+}
+func (f *Functions) GetShaderInfoLog(s Shader) string {
+ return f.Ctx.Call("getShaderInfoLog", js.Value(s)).String()
+}
+func (f *Functions) GetString(pname Enum) string {
+ switch pname {
+ case EXTENSIONS:
+ extsjs := f.Ctx.Call("getSupportedExtensions")
+ var exts []string
+ for i := 0; i < extsjs.Length(); i++ {
+ exts = append(exts, "GL_"+extsjs.Index(i).String())
+ }
+ return strings.Join(exts, " ")
+ default:
+ return f.Ctx.Call("getParameter", int(pname)).String()
+ }
+}
+func (f *Functions) GetUniformBlockIndex(p Program, name string) uint {
+ return uint(paramVal(f.Ctx.Call("getUniformBlockIndex", js.Value(p), name)))
+}
+func (f *Functions) GetUniformLocation(p Program, name string) Uniform {
+ return Uniform(f.Ctx.Call("getUniformLocation", js.Value(p), name))
+}
+func (f *Functions) GetVertexAttrib(index int, pname Enum) int {
+ return paramVal(f.Ctx.Call("getVertexAttrib", index, int(pname)))
+}
+func (f *Functions) GetVertexAttribBinding(index int, pname Enum) Object {
+ obj := f.Ctx.Call("getVertexAttrib", index, int(pname))
+ if !obj.Truthy() {
+ return Object{}
+ }
+ return Object(obj)
+}
+func (f *Functions) GetVertexAttribPointer(index int, pname Enum) uintptr {
+ return uintptr(f.Ctx.Call("getVertexAttribOffset", index, int(pname)).Int())
+}
+func (f *Functions) InvalidateFramebuffer(target, attachment Enum) {
+ fn := f.Ctx.Get("invalidateFramebuffer")
+ if !fn.IsUndefined() {
+ if f.int32Buf.IsUndefined() {
+ f.int32Buf = js.Global().Get("Int32Array").New(1)
+ }
+ f.int32Buf.SetIndex(0, int32(attachment))
+ f.Ctx.Call("invalidateFramebuffer", int(target), f.int32Buf)
+ }
+}
+func (f *Functions) IsEnabled(cap Enum) bool {
+ return f.Ctx.Call("isEnabled", int(cap)).Truthy()
+}
+func (f *Functions) LinkProgram(p Program) {
+ f.Ctx.Call("linkProgram", js.Value(p))
+}
+func (f *Functions) PixelStorei(pname Enum, param int) {
+ f.Ctx.Call("pixelStorei", int(pname), param)
+}
+func (f *Functions) MemoryBarrier(barriers Enum) {
+ panic("not implemented")
+}
+func (f *Functions) MapBufferRange(target Enum, offset, length int, access Enum) []byte {
+ panic("not implemented")
+}
+func (f *Functions) RenderbufferStorage(target, internalformat Enum, width, height int) {
+ f.Ctx.Call("renderbufferStorage", int(target), int(internalformat), width, height)
+}
+func (f *Functions) ReadPixels(x, y, width, height int, format, ty Enum, data []byte) {
+ ba := f.byteArrayOf(data)
+ f.Ctx.Call("readPixels", x, y, width, height, int(format), int(ty), ba)
+ js.CopyBytesToGo(data, ba)
+}
+func (f *Functions) Scissor(x, y, width, height int32) {
+ f.Ctx.Call("scissor", x, y, width, height)
+}
+func (f *Functions) ShaderSource(s Shader, src string) {
+ f.Ctx.Call("shaderSource", js.Value(s), src)
+}
+func (f *Functions) TexImage2D(target Enum, level int, internalFormat Enum, width, height int, format, ty Enum) {
+ f.Ctx.Call("texImage2D", int(target), int(level), int(internalFormat), int(width), int(height), 0, int(format), int(ty), nil)
+}
+func (f *Functions) TexStorage2D(target Enum, levels int, internalFormat Enum, width, height int) {
+ f.Ctx.Call("texStorage2D", int(target), levels, int(internalFormat), width, height)
+}
+func (f *Functions) TexSubImage2D(target Enum, level int, x, y, width, height int, format, ty Enum, data []byte) {
+ f.Ctx.Call("texSubImage2D", int(target), level, x, y, width, height, int(format), int(ty), f.byteArrayOf(data))
+}
+func (f *Functions) TexParameteri(target, pname Enum, param int) {
+ f.Ctx.Call("texParameteri", int(target), int(pname), int(param))
+}
+func (f *Functions) UniformBlockBinding(p Program, uniformBlockIndex uint, uniformBlockBinding uint) {
+ f.Ctx.Call("uniformBlockBinding", js.Value(p), int(uniformBlockIndex), int(uniformBlockBinding))
+}
+func (f *Functions) Uniform1f(dst Uniform, v float32) {
+ f.Ctx.Call("uniform1f", js.Value(dst), v)
+}
+func (f *Functions) Uniform1i(dst Uniform, v int) {
+ f.Ctx.Call("uniform1i", js.Value(dst), v)
+}
+func (f *Functions) Uniform2f(dst Uniform, v0, v1 float32) {
+ f.Ctx.Call("uniform2f", js.Value(dst), v0, v1)
+}
+func (f *Functions) Uniform3f(dst Uniform, v0, v1, v2 float32) {
+ f.Ctx.Call("uniform3f", js.Value(dst), v0, v1, v2)
+}
+func (f *Functions) Uniform4f(dst Uniform, v0, v1, v2, v3 float32) {
+ f.Ctx.Call("uniform4f", js.Value(dst), v0, v1, v2, v3)
+}
+func (f *Functions) UseProgram(p Program) {
+ f.Ctx.Call("useProgram", js.Value(p))
+}
+func (f *Functions) UnmapBuffer(target Enum) bool {
+ panic("not implemented")
+}
+func (f *Functions) VertexAttribPointer(dst Attrib, size int, ty Enum, normalized bool, stride, offset int) {
+ f.Ctx.Call("vertexAttribPointer", int(dst), size, int(ty), normalized, stride, offset)
+}
+func (f *Functions) Viewport(x, y, width, height int) {
+ f.Ctx.Call("viewport", x, y, width, height)
+}
+
+func (f *Functions) byteArrayOf(data []byte) js.Value {
+ if len(data) == 0 {
+ return js.Null()
+ }
+ f.resizeByteBuffer(len(data))
+ ba := f.uint8Array.New(f.arrayBuf, int(0), int(len(data)))
+ js.CopyBytesToJS(ba, data)
+ return ba
+}
+
+func (f *Functions) resizeByteBuffer(n int) {
+ if n == 0 {
+ return
+ }
+ if !f.arrayBuf.IsUndefined() && f.arrayBuf.Length() >= n {
+ return
+ }
+ f.arrayBuf = js.Global().Get("ArrayBuffer").New(n)
+}
+
+func paramVal(v js.Value) int {
+ switch v.Type() {
+ case js.TypeBoolean:
+ if b := v.Bool(); b {
+ return 1
+ } else {
+ return 0
+ }
+ case js.TypeNumber:
+ return v.Int()
+ default:
+ panic("unknown parameter type")
+ }
+}
diff --git a/vendor/gioui.org/internal/gl/gl_unix.go b/vendor/gioui.org/internal/gl/gl_unix.go
new file mode 100644
index 0000000..f223ced
--- /dev/null
+++ b/vendor/gioui.org/internal/gl/gl_unix.go
@@ -0,0 +1,1222 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build darwin || linux || freebsd || openbsd
+// +build darwin linux freebsd openbsd
+
+package gl
+
+import (
+ "fmt"
+ "runtime"
+ "strings"
+ "unsafe"
+)
+
+/*
+#cgo CFLAGS: -Werror
+#cgo linux freebsd LDFLAGS: -ldl
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#define __USE_GNU
+#include <dlfcn.h>
+
+typedef unsigned int GLenum;
+typedef unsigned int GLuint;
+typedef char GLchar;
+typedef float GLfloat;
+typedef ssize_t GLsizeiptr;
+typedef intptr_t GLintptr;
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef uint8_t GLubyte;
+
+typedef struct {
+ void (*glActiveTexture)(GLenum texture);
+ void (*glAttachShader)(GLuint program, GLuint shader);
+ void (*glBindAttribLocation)(GLuint program, GLuint index, const GLchar *name);
+ void (*glBindBuffer)(GLenum target, GLuint buffer);
+ void (*glBindFramebuffer)(GLenum target, GLuint framebuffer);
+ void (*glBindRenderbuffer)(GLenum target, GLuint renderbuffer);
+ void (*glBindTexture)(GLenum target, GLuint texture);
+ void (*glBlendEquation)(GLenum mode);
+ void (*glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA);
+ void (*glBufferData)(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+ void (*glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+ GLenum (*glCheckFramebufferStatus)(GLenum target);
+ void (*glClear)(GLbitfield mask);
+ void (*glClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void (*glClearDepthf)(GLfloat d);
+ void (*glCompileShader)(GLuint shader);
+ void (*glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ GLuint (*glCreateProgram)(void);
+ GLuint (*glCreateShader)(GLenum type);
+ void (*glDeleteBuffers)(GLsizei n, const GLuint *buffers);
+ void (*glDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers);
+ void (*glDeleteProgram)(GLuint program);
+ void (*glDeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers);
+ void (*glDeleteShader)(GLuint shader);
+ void (*glDeleteTextures)(GLsizei n, const GLuint *textures);
+ void (*glDepthFunc)(GLenum func);
+ void (*glDepthMask)(GLboolean flag);
+ void (*glDisable)(GLenum cap);
+ void (*glDisableVertexAttribArray)(GLuint index);
+ void (*glDrawArrays)(GLenum mode, GLint first, GLsizei count);
+ void (*glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices);
+ void (*glEnable)(GLenum cap);
+ void (*glEnableVertexAttribArray)(GLuint index);
+ void (*glFinish)(void);
+ void (*glFlush)(void);
+ void (*glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void (*glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ void (*glGenBuffers)(GLsizei n, GLuint *buffers);
+ void (*glGenFramebuffers)(GLsizei n, GLuint *framebuffers);
+ void (*glGenRenderbuffers)(GLsizei n, GLuint *renderbuffers);
+ void (*glGenTextures)(GLsizei n, GLuint *textures);
+ GLenum (*glGetError)(void);
+ void (*glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+ void (*glGetFloatv)(GLenum pname, GLfloat *data);
+ void (*glGetIntegerv)(GLenum pname, GLint *data);
+ void (*glGetIntegeri_v)(GLenum pname, GLuint idx, GLint *data);
+ void (*glGetProgramiv)(GLuint program, GLenum pname, GLint *params);
+ void (*glGetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void (*glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params);
+ void (*glGetShaderiv)(GLuint shader, GLenum pname, GLint *params);
+ void (*glGetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ const GLubyte *(*glGetString)(GLenum name);
+ GLint (*glGetUniformLocation)(GLuint program, const GLchar *name);
+ void (*glGetVertexAttribiv)(GLuint index, GLenum pname, GLint *params);
+ void (*glGetVertexAttribPointerv)(GLuint index, GLenum pname, void **params);
+ GLboolean (*glIsEnabled)(GLenum cap);
+ void (*glLinkProgram)(GLuint program);
+ void (*glPixelStorei)(GLenum pname, GLint param);
+ void (*glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+ void (*glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+ void (*glScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
+ void (*glShaderSource)(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
+ void (*glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+ void (*glTexParameteri)(GLenum target, GLenum pname, GLint param);
+ void (*glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void (*glUniform1f)(GLint location, GLfloat v0);
+ void (*glUniform1i)(GLint location, GLint v0);
+ void (*glUniform2f)(GLint location, GLfloat v0, GLfloat v1);
+ void (*glUniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void (*glUniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void (*glUseProgram)(GLuint program);
+ void (*glVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+ void (*glViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
+
+ void (*glBindVertexArray)(GLuint array);
+ void (*glBindBufferBase)(GLenum target, GLuint index, GLuint buffer);
+ GLuint (*glGetUniformBlockIndex)(GLuint program, const GLchar *uniformBlockName);
+ void (*glUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+ void (*glInvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+ void (*glBeginQuery)(GLenum target, GLuint id);
+ void (*glDeleteQueries)(GLsizei n, const GLuint *ids);
+ void (*glDeleteVertexArrays)(GLsizei n, const GLuint *ids);
+ void (*glEndQuery)(GLenum target);
+ void (*glGenQueries)(GLsizei n, GLuint *ids);
+ void (*glGenVertexArrays)(GLsizei n, GLuint *ids);
+ void (*glGetProgramBinary)(GLuint program, GLsizei bufsize, GLsizei *length, GLenum *binaryFormat, void *binary);
+ void (*glGetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params);
+ const GLubyte* (*glGetStringi)(GLenum name, GLuint index);
+ void (*glDispatchCompute)(GLuint x, GLuint y, GLuint z);
+ void (*glMemoryBarrier)(GLbitfield barriers);
+ void* (*glMapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+ GLboolean (*glUnmapBuffer)(GLenum target);
+ void (*glBindImageTexture)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+ void (*glTexStorage2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void (*glBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+} glFunctions;
+
+static void glActiveTexture(glFunctions *f, GLenum texture) {
+ f->glActiveTexture(texture);
+}
+
+static void glAttachShader(glFunctions *f, GLuint program, GLuint shader) {
+ f->glAttachShader(program, shader);
+}
+
+static void glBindAttribLocation(glFunctions *f, GLuint program, GLuint index, const GLchar *name) {
+ f->glBindAttribLocation(program, index, name);
+}
+
+static void glBindBuffer(glFunctions *f, GLenum target, GLuint buffer) {
+ f->glBindBuffer(target, buffer);
+}
+
+static void glBindFramebuffer(glFunctions *f, GLenum target, GLuint framebuffer) {
+ f->glBindFramebuffer(target, framebuffer);
+}
+
+static void glBindRenderbuffer(glFunctions *f, GLenum target, GLuint renderbuffer) {
+ f->glBindRenderbuffer(target, renderbuffer);
+}
+
+static void glBindTexture(glFunctions *f, GLenum target, GLuint texture) {
+ f->glBindTexture(target, texture);
+}
+
+static void glBindVertexArray(glFunctions *f, GLuint array) {
+ f->glBindVertexArray(array);
+}
+
+static void glBlendEquation(glFunctions *f, GLenum mode) {
+ f->glBlendEquation(mode);
+}
+
+static void glBlendFuncSeparate(glFunctions *f, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA) {
+ f->glBlendFuncSeparate(srcRGB, dstRGB, srcA, dstA);
+}
+
+static void glBufferData(glFunctions *f, GLenum target, GLsizeiptr size, const void *data, GLenum usage) {
+ f->glBufferData(target, size, data, usage);
+}
+
+static void glBufferSubData(glFunctions *f, GLenum target, GLintptr offset, GLsizeiptr size, const void *data) {
+ f->glBufferSubData(target, offset, size, data);
+}
+
+static GLenum glCheckFramebufferStatus(glFunctions *f, GLenum target) {
+ return f->glCheckFramebufferStatus(target);
+}
+
+static void glClear(glFunctions *f, GLbitfield mask) {
+ f->glClear(mask);
+}
+
+static void glClearColor(glFunctions *f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
+ f->glClearColor(red, green, blue, alpha);
+}
+
+static void glClearDepthf(glFunctions *f, GLfloat d) {
+ f->glClearDepthf(d);
+}
+
+static void glCompileShader(glFunctions *f, GLuint shader) {
+ f->glCompileShader(shader);
+}
+
+static void glCopyTexSubImage2D(glFunctions *f, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
+ f->glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+static GLuint glCreateProgram(glFunctions *f) {
+ return f->glCreateProgram();
+}
+
+static GLuint glCreateShader(glFunctions *f, GLenum type) {
+ return f->glCreateShader(type);
+}
+
+static void glDeleteBuffers(glFunctions *f, GLsizei n, const GLuint *buffers) {
+ f->glDeleteBuffers(n, buffers);
+}
+
+static void glDeleteFramebuffers(glFunctions *f, GLsizei n, const GLuint *framebuffers) {
+ f->glDeleteFramebuffers(n, framebuffers);
+}
+
+static void glDeleteProgram(glFunctions *f, GLuint program) {
+ f->glDeleteProgram(program);
+}
+
+static void glDeleteRenderbuffers(glFunctions *f, GLsizei n, const GLuint *renderbuffers) {
+ f->glDeleteRenderbuffers(n, renderbuffers);
+}
+
+static void glDeleteShader(glFunctions *f, GLuint shader) {
+ f->glDeleteShader(shader);
+}
+
+static void glDeleteTextures(glFunctions *f, GLsizei n, const GLuint *textures) {
+ f->glDeleteTextures(n, textures);
+}
+
+static void glDepthFunc(glFunctions *f, GLenum func) {
+ f->glDepthFunc(func);
+}
+
+static void glDepthMask(glFunctions *f, GLboolean flag) {
+ f->glDepthMask(flag);
+}
+
+static void glDisable(glFunctions *f, GLenum cap) {
+ f->glDisable(cap);
+}
+
+static void glDisableVertexAttribArray(glFunctions *f, GLuint index) {
+ f->glDisableVertexAttribArray(index);
+}
+
+static void glDrawArrays(glFunctions *f, GLenum mode, GLint first, GLsizei count) {
+ f->glDrawArrays(mode, first, count);
+}
+
+// offset is defined as an uintptr_t to omit Cgo pointer checks.
+static void glDrawElements(glFunctions *f, GLenum mode, GLsizei count, GLenum type, const uintptr_t offset) {
+ f->glDrawElements(mode, count, type, (const void *)offset);
+}
+
+static void glEnable(glFunctions *f, GLenum cap) {
+ f->glEnable(cap);
+}
+
+static void glEnableVertexAttribArray(glFunctions *f, GLuint index) {
+ f->glEnableVertexAttribArray(index);
+}
+
+static void glFinish(glFunctions *f) {
+ f->glFinish();
+}
+
+static void glFlush(glFunctions *f) {
+ f->glFlush();
+}
+
+static void glFramebufferRenderbuffer(glFunctions *f, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
+ f->glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+static void glFramebufferTexture2D(glFunctions *f, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
+ f->glFramebufferTexture2D(target, attachment, textarget, texture, level);
+}
+
+static void glGenBuffers(glFunctions *f, GLsizei n, GLuint *buffers) {
+ f->glGenBuffers(n, buffers);
+}
+
+static void glGenFramebuffers(glFunctions *f, GLsizei n, GLuint *framebuffers) {
+ f->glGenFramebuffers(n, framebuffers);
+}
+
+static void glGenRenderbuffers(glFunctions *f, GLsizei n, GLuint *renderbuffers) {
+ f->glGenRenderbuffers(n, renderbuffers);
+}
+
+static void glGenTextures(glFunctions *f, GLsizei n, GLuint *textures) {
+ f->glGenTextures(n, textures);
+}
+
+static GLenum glGetError(glFunctions *f) {
+ return f->glGetError();
+}
+
+static void glGetFramebufferAttachmentParameteriv(glFunctions *f, GLenum target, GLenum attachment, GLenum pname, GLint *params) {
+ f->glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+}
+
+static void glGetIntegerv(glFunctions *f, GLenum pname, GLint *data) {
+ f->glGetIntegerv(pname, data);
+}
+
+static void glGetFloatv(glFunctions *f, GLenum pname, GLfloat *data) {
+ f->glGetFloatv(pname, data);
+}
+
+static void glGetIntegeri_v(glFunctions *f, GLenum pname, GLuint idx, GLint *data) {
+ f->glGetIntegeri_v(pname, idx, data);
+}
+
+static void glGetProgramiv(glFunctions *f, GLuint program, GLenum pname, GLint *params) {
+ f->glGetProgramiv(program, pname, params);
+}
+
+static void glGetProgramInfoLog(glFunctions *f, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
+ f->glGetProgramInfoLog(program, bufSize, length, infoLog);
+}
+
+static void glGetRenderbufferParameteriv(glFunctions *f, GLenum target, GLenum pname, GLint *params) {
+ f->glGetRenderbufferParameteriv(target, pname, params);
+}
+
+static void glGetShaderiv(glFunctions *f, GLuint shader, GLenum pname, GLint *params) {
+ f->glGetShaderiv(shader, pname, params);
+}
+
+static void glGetShaderInfoLog(glFunctions *f, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
+ f->glGetShaderInfoLog(shader, bufSize, length, infoLog);
+}
+
+static const GLubyte *glGetString(glFunctions *f, GLenum name) {
+ return f->glGetString(name);
+}
+
+static GLint glGetUniformLocation(glFunctions *f, GLuint program, const GLchar *name) {
+ return f->glGetUniformLocation(program, name);
+}
+
+static void glGetVertexAttribiv(glFunctions *f, GLuint index, GLenum pname, GLint *data) {
+ f->glGetVertexAttribiv(index, pname, data);
+}
+
+// Return uintptr_t to avoid Cgo pointer check.
+static uintptr_t glGetVertexAttribPointerv(glFunctions *f, GLuint index, GLenum pname) {
+ void *ptrs;
+ f->glGetVertexAttribPointerv(index, pname, &ptrs);
+ return (uintptr_t)ptrs;
+}
+
+static GLboolean glIsEnabled(glFunctions *f, GLenum cap) {
+ return f->glIsEnabled(cap);
+}
+
+static void glLinkProgram(glFunctions *f, GLuint program) {
+ f->glLinkProgram(program);
+}
+
+static void glPixelStorei(glFunctions *f, GLenum pname, GLint param) {
+ f->glPixelStorei(pname, param);
+}
+
+static void glReadPixels(glFunctions *f, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels) {
+ f->glReadPixels(x, y, width, height, format, type, pixels);
+}
+
+static void glRenderbufferStorage(glFunctions *f, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
+ f->glRenderbufferStorage(target, internalformat, width, height);
+}
+
+static void glScissor(glFunctions *f, GLint x, GLint y, GLsizei width, GLsizei height) {
+ f->glScissor(x, y, width, height);
+}
+
+static void glShaderSource(glFunctions *f, GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length) {
+ f->glShaderSource(shader, count, string, length);
+}
+
+static void glTexImage2D(glFunctions *f, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) {
+ f->glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+static void glTexParameteri(glFunctions *f, GLenum target, GLenum pname, GLint param) {
+ f->glTexParameteri(target, pname, param);
+}
+
+static void glTexSubImage2D(glFunctions *f, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) {
+ f->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+static void glUniform1f(glFunctions *f, GLint location, GLfloat v0) {
+ f->glUniform1f(location, v0);
+}
+
+static void glUniform1i(glFunctions *f, GLint location, GLint v0) {
+ f->glUniform1i(location, v0);
+}
+
+static void glUniform2f(glFunctions *f, GLint location, GLfloat v0, GLfloat v1) {
+ f->glUniform2f(location, v0, v1);
+}
+
+static void glUniform3f(glFunctions *f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
+ f->glUniform3f(location, v0, v1, v2);
+}
+
+static void glUniform4f(glFunctions *f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
+ f->glUniform4f(location, v0, v1, v2, v3);
+}
+
+static void glUseProgram(glFunctions *f, GLuint program) {
+ f->glUseProgram(program);
+}
+
+// offset is defined as an uintptr_t to omit Cgo pointer checks.
+static void glVertexAttribPointer(glFunctions *f, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uintptr_t offset) {
+ f->glVertexAttribPointer(index, size, type, normalized, stride, (const void *)offset);
+}
+
+static void glViewport(glFunctions *f, GLint x, GLint y, GLsizei width, GLsizei height) {
+ f->glViewport(x, y, width, height);
+}
+
+static void glBindBufferBase(glFunctions *f, GLenum target, GLuint index, GLuint buffer) {
+ f->glBindBufferBase(target, index, buffer);
+}
+
+static void glUniformBlockBinding(glFunctions *f, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
+ f->glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+static GLuint glGetUniformBlockIndex(glFunctions *f, GLuint program, const GLchar *uniformBlockName) {
+ return f->glGetUniformBlockIndex(program, uniformBlockName);
+}
+
+static void glInvalidateFramebuffer(glFunctions *f, GLenum target, GLenum attachment) {
+ // Framebuffer invalidation is just a hint and can safely be ignored.
+ if (f->glInvalidateFramebuffer != NULL) {
+ f->glInvalidateFramebuffer(target, 1, &attachment);
+ }
+}
+
+static void glBeginQuery(glFunctions *f, GLenum target, GLenum attachment) {
+ f->glBeginQuery(target, attachment);
+}
+
+static void glDeleteQueries(glFunctions *f, GLsizei n, const GLuint *ids) {
+ f->glDeleteQueries(n, ids);
+}
+
+static void glDeleteVertexArrays(glFunctions *f, GLsizei n, const GLuint *ids) {
+ f->glDeleteVertexArrays(n, ids);
+}
+
+static void glEndQuery(glFunctions *f, GLenum target) {
+ f->glEndQuery(target);
+}
+
+static const GLubyte* glGetStringi(glFunctions *f, GLenum name, GLuint index) {
+ return f->glGetStringi(name, index);
+}
+
+static void glGenQueries(glFunctions *f, GLsizei n, GLuint *ids) {
+ f->glGenQueries(n, ids);
+}
+
+static void glGenVertexArrays(glFunctions *f, GLsizei n, GLuint *ids) {
+ f->glGenVertexArrays(n, ids);
+}
+
+static void glGetProgramBinary(glFunctions *f, GLuint program, GLsizei bufsize, GLsizei *length, GLenum *binaryFormat, void *binary) {
+ f->glGetProgramBinary(program, bufsize, length, binaryFormat, binary);
+}
+
+static void glGetQueryObjectuiv(glFunctions *f, GLuint id, GLenum pname, GLuint *params) {
+ f->glGetQueryObjectuiv(id, pname, params);
+}
+
+static void glMemoryBarrier(glFunctions *f, GLbitfield barriers) {
+ f->glMemoryBarrier(barriers);
+}
+
+static void glDispatchCompute(glFunctions *f, GLuint x, GLuint y, GLuint z) {
+ f->glDispatchCompute(x, y, z);
+}
+
+static void *glMapBufferRange(glFunctions *f, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
+ return f->glMapBufferRange(target, offset, length, access);
+}
+
+static GLboolean glUnmapBuffer(glFunctions *f, GLenum target) {
+ return f->glUnmapBuffer(target);
+}
+
+static void glBindImageTexture(glFunctions *f, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) {
+ f->glBindImageTexture(unit, texture, level, layered, layer, access, format);
+}
+
+static void glTexStorage2D(glFunctions *f, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) {
+ f->glTexStorage2D(target, levels, internalFormat, width, height);
+}
+
+static void glBlitFramebuffer(glFunctions *f, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
+ f->glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+*/
+import "C"
+
+type Context interface{}
+
+type Functions struct {
+ // Query caches.
+ uints [100]C.GLuint
+ ints [100]C.GLint
+ floats [100]C.GLfloat
+
+ f C.glFunctions
+}
+
+func NewFunctions(ctx Context, forceES bool) (*Functions, error) {
+ if ctx != nil {
+ panic("non-nil context")
+ }
+ f := new(Functions)
+ err := f.load(forceES)
+ if err != nil {
+ return nil, err
+ }
+ return f, nil
+}
+
+func dlsym(handle unsafe.Pointer, s string) unsafe.Pointer {
+ cs := C.CString(s)
+ defer C.free(unsafe.Pointer(cs))
+ return C.dlsym(handle, cs)
+}
+
+func dlopen(lib string) unsafe.Pointer {
+ clib := C.CString(lib)
+ defer C.free(unsafe.Pointer(clib))
+ return C.dlopen(clib, C.RTLD_NOW|C.RTLD_LOCAL)
+}
+
+func (f *Functions) load(forceES bool) error {
+ var (
+ loadErr error
+ libNames []string
+ handles []unsafe.Pointer
+ )
+ switch {
+ case runtime.GOOS == "darwin" && !forceES:
+ libNames = []string{"/System/Library/Frameworks/OpenGL.framework/OpenGL"}
+ case runtime.GOOS == "darwin" && forceES:
+ libNames = []string{"libGLESv2.dylib"}
+ case runtime.GOOS == "ios":
+ libNames = []string{"/System/Library/Frameworks/OpenGLES.framework/OpenGLES"}
+ case runtime.GOOS == "android":
+ libNames = []string{"libGLESv2.so", "libGLESv3.so"}
+ default:
+ libNames = []string{"libGLESv2.so.2"}
+ }
+ for _, lib := range libNames {
+ if h := dlopen(lib); h != nil {
+ handles = append(handles, h)
+ }
+ }
+ if len(handles) == 0 {
+ return fmt.Errorf("gl: no OpenGL implementation could be loaded (tried %q)", libNames)
+ }
+ load := func(s string) *[0]byte {
+ for _, h := range handles {
+ if f := dlsym(h, s); f != nil {
+ return (*[0]byte)(f)
+ }
+ }
+ return nil
+ }
+ must := func(s string) *[0]byte {
+ ptr := load(s)
+ if ptr == nil {
+ loadErr = fmt.Errorf("gl: failed to load symbol %q", s)
+ }
+ return ptr
+ }
+ // GL ES 2.0 functions.
+ f.f.glActiveTexture = must("glActiveTexture")
+ f.f.glAttachShader = must("glAttachShader")
+ f.f.glBindAttribLocation = must("glBindAttribLocation")
+ f.f.glBindBuffer = must("glBindBuffer")
+ f.f.glBindFramebuffer = must("glBindFramebuffer")
+ f.f.glBindRenderbuffer = must("glBindRenderbuffer")
+ f.f.glBindTexture = must("glBindTexture")
+ f.f.glBlendEquation = must("glBlendEquation")
+ f.f.glBlendFuncSeparate = must("glBlendFuncSeparate")
+ f.f.glBufferData = must("glBufferData")
+ f.f.glBufferSubData = must("glBufferSubData")
+ f.f.glCheckFramebufferStatus = must("glCheckFramebufferStatus")
+ f.f.glClear = must("glClear")
+ f.f.glClearColor = must("glClearColor")
+ f.f.glClearDepthf = must("glClearDepthf")
+ f.f.glCompileShader = must("glCompileShader")
+ f.f.glCopyTexSubImage2D = must("glCopyTexSubImage2D")
+ f.f.glCreateProgram = must("glCreateProgram")
+ f.f.glCreateShader = must("glCreateShader")
+ f.f.glDeleteBuffers = must("glDeleteBuffers")
+ f.f.glDeleteFramebuffers = must("glDeleteFramebuffers")
+ f.f.glDeleteProgram = must("glDeleteProgram")
+ f.f.glDeleteRenderbuffers = must("glDeleteRenderbuffers")
+ f.f.glDeleteShader = must("glDeleteShader")
+ f.f.glDeleteTextures = must("glDeleteTextures")
+ f.f.glDepthFunc = must("glDepthFunc")
+ f.f.glDepthMask = must("glDepthMask")
+ f.f.glDisable = must("glDisable")
+ f.f.glDisableVertexAttribArray = must("glDisableVertexAttribArray")
+ f.f.glDrawArrays = must("glDrawArrays")
+ f.f.glDrawElements = must("glDrawElements")
+ f.f.glEnable = must("glEnable")
+ f.f.glEnableVertexAttribArray = must("glEnableVertexAttribArray")
+ f.f.glFinish = must("glFinish")
+ f.f.glFlush = must("glFlush")
+ f.f.glFramebufferRenderbuffer = must("glFramebufferRenderbuffer")
+ f.f.glFramebufferTexture2D = must("glFramebufferTexture2D")
+ f.f.glGenBuffers = must("glGenBuffers")
+ f.f.glGenFramebuffers = must("glGenFramebuffers")
+ f.f.glGenRenderbuffers = must("glGenRenderbuffers")
+ f.f.glGenTextures = must("glGenTextures")
+ f.f.glGetError = must("glGetError")
+ f.f.glGetFramebufferAttachmentParameteriv = must("glGetFramebufferAttachmentParameteriv")
+ f.f.glGetIntegerv = must("glGetIntegerv")
+ f.f.glGetFloatv = must("glGetFloatv")
+ f.f.glGetProgramiv = must("glGetProgramiv")
+ f.f.glGetProgramInfoLog = must("glGetProgramInfoLog")
+ f.f.glGetRenderbufferParameteriv = must("glGetRenderbufferParameteriv")
+ f.f.glGetShaderiv = must("glGetShaderiv")
+ f.f.glGetShaderInfoLog = must("glGetShaderInfoLog")
+ f.f.glGetString = must("glGetString")
+ f.f.glGetUniformLocation = must("glGetUniformLocation")
+ f.f.glGetVertexAttribiv = must("glGetVertexAttribiv")
+ f.f.glGetVertexAttribPointerv = must("glGetVertexAttribPointerv")
+ f.f.glIsEnabled = must("glIsEnabled")
+ f.f.glLinkProgram = must("glLinkProgram")
+ f.f.glPixelStorei = must("glPixelStorei")
+ f.f.glReadPixels = must("glReadPixels")
+ f.f.glRenderbufferStorage = must("glRenderbufferStorage")
+ f.f.glScissor = must("glScissor")
+ f.f.glShaderSource = must("glShaderSource")
+ f.f.glTexImage2D = must("glTexImage2D")
+ f.f.glTexParameteri = must("glTexParameteri")
+ f.f.glTexSubImage2D = must("glTexSubImage2D")
+ f.f.glUniform1f = must("glUniform1f")
+ f.f.glUniform1i = must("glUniform1i")
+ f.f.glUniform2f = must("glUniform2f")
+ f.f.glUniform3f = must("glUniform3f")
+ f.f.glUniform4f = must("glUniform4f")
+ f.f.glUseProgram = must("glUseProgram")
+ f.f.glVertexAttribPointer = must("glVertexAttribPointer")
+ f.f.glViewport = must("glViewport")
+
+ // Extensions and GL ES 3 functions.
+ f.f.glBindBufferBase = load("glBindBufferBase")
+ f.f.glBindVertexArray = load("glBindVertexArray")
+ f.f.glGetIntegeri_v = load("glGetIntegeri_v")
+ f.f.glGetUniformBlockIndex = load("glGetUniformBlockIndex")
+ f.f.glUniformBlockBinding = load("glUniformBlockBinding")
+ f.f.glInvalidateFramebuffer = load("glInvalidateFramebuffer")
+ f.f.glGetStringi = load("glGetStringi")
+ // Fall back to EXT_invalidate_framebuffer if available.
+ if f.f.glInvalidateFramebuffer == nil {
+ f.f.glInvalidateFramebuffer = load("glDiscardFramebufferEXT")
+ }
+
+ f.f.glBeginQuery = load("glBeginQuery")
+ if f.f.glBeginQuery == nil {
+ f.f.glBeginQuery = load("glBeginQueryEXT")
+ }
+ f.f.glDeleteQueries = load("glDeleteQueries")
+ if f.f.glDeleteQueries == nil {
+ f.f.glDeleteQueries = load("glDeleteQueriesEXT")
+ }
+ f.f.glEndQuery = load("glEndQuery")
+ if f.f.glEndQuery == nil {
+ f.f.glEndQuery = load("glEndQueryEXT")
+ }
+ f.f.glGenQueries = load("glGenQueries")
+ if f.f.glGenQueries == nil {
+ f.f.glGenQueries = load("glGenQueriesEXT")
+ }
+ f.f.glGetQueryObjectuiv = load("glGetQueryObjectuiv")
+ if f.f.glGetQueryObjectuiv == nil {
+ f.f.glGetQueryObjectuiv = load("glGetQueryObjectuivEXT")
+ }
+
+ f.f.glDeleteVertexArrays = load("glDeleteVertexArrays")
+ f.f.glGenVertexArrays = load("glGenVertexArrays")
+ f.f.glMemoryBarrier = load("glMemoryBarrier")
+ f.f.glDispatchCompute = load("glDispatchCompute")
+ f.f.glMapBufferRange = load("glMapBufferRange")
+ f.f.glUnmapBuffer = load("glUnmapBuffer")
+ f.f.glBindImageTexture = load("glBindImageTexture")
+ f.f.glTexStorage2D = load("glTexStorage2D")
+ f.f.glBlitFramebuffer = load("glBlitFramebuffer")
+ f.f.glGetProgramBinary = load("glGetProgramBinary")
+
+ return loadErr
+}
+
+func (f *Functions) ActiveTexture(texture Enum) {
+ C.glActiveTexture(&f.f, C.GLenum(texture))
+}
+
+func (f *Functions) AttachShader(p Program, s Shader) {
+ C.glAttachShader(&f.f, C.GLuint(p.V), C.GLuint(s.V))
+}
+
+func (f *Functions) BeginQuery(target Enum, query Query) {
+ C.glBeginQuery(&f.f, C.GLenum(target), C.GLenum(query.V))
+}
+
+func (f *Functions) BindAttribLocation(p Program, a Attrib, name string) {
+ cname := C.CString(name)
+ defer C.free(unsafe.Pointer(cname))
+ C.glBindAttribLocation(&f.f, C.GLuint(p.V), C.GLuint(a), cname)
+}
+
+func (f *Functions) BindBufferBase(target Enum, index int, b Buffer) {
+ C.glBindBufferBase(&f.f, C.GLenum(target), C.GLuint(index), C.GLuint(b.V))
+}
+
+func (f *Functions) BindBuffer(target Enum, b Buffer) {
+ C.glBindBuffer(&f.f, C.GLenum(target), C.GLuint(b.V))
+}
+
+func (f *Functions) BindFramebuffer(target Enum, fb Framebuffer) {
+ C.glBindFramebuffer(&f.f, C.GLenum(target), C.GLuint(fb.V))
+}
+
+func (f *Functions) BindRenderbuffer(target Enum, fb Renderbuffer) {
+ C.glBindRenderbuffer(&f.f, C.GLenum(target), C.GLuint(fb.V))
+}
+
+func (f *Functions) BindImageTexture(unit int, t Texture, level int, layered bool, layer int, access, format Enum) {
+ l := C.GLboolean(FALSE)
+ if layered {
+ l = TRUE
+ }
+ C.glBindImageTexture(&f.f, C.GLuint(unit), C.GLuint(t.V), C.GLint(level), l, C.GLint(layer), C.GLenum(access), C.GLenum(format))
+}
+
+func (f *Functions) BindTexture(target Enum, t Texture) {
+ C.glBindTexture(&f.f, C.GLenum(target), C.GLuint(t.V))
+}
+
+func (f *Functions) BindVertexArray(a VertexArray) {
+ C.glBindVertexArray(&f.f, C.GLuint(a.V))
+}
+
+func (f *Functions) BlendEquation(mode Enum) {
+ C.glBlendEquation(&f.f, C.GLenum(mode))
+}
+
+func (f *Functions) BlendFuncSeparate(srcRGB, dstRGB, srcA, dstA Enum) {
+ C.glBlendFuncSeparate(&f.f, C.GLenum(srcRGB), C.GLenum(dstRGB), C.GLenum(srcA), C.GLenum(dstA))
+}
+
+func (f *Functions) BlitFramebuffer(sx0, sy0, sx1, sy1, dx0, dy0, dx1, dy1 int, mask Enum, filter Enum) {
+ C.glBlitFramebuffer(&f.f,
+ C.GLint(sx0), C.GLint(sy0), C.GLint(sx1), C.GLint(sy1),
+ C.GLint(dx0), C.GLint(dy0), C.GLint(dx1), C.GLint(dy1),
+ C.GLenum(mask), C.GLenum(filter),
+ )
+}
+
+func (f *Functions) BufferData(target Enum, size int, usage Enum, data []byte) {
+ var p unsafe.Pointer
+ if len(data) > 0 {
+ p = unsafe.Pointer(&data[0])
+ }
+ C.glBufferData(&f.f, C.GLenum(target), C.GLsizeiptr(size), p, C.GLenum(usage))
+}
+
+func (f *Functions) BufferSubData(target Enum, offset int, src []byte) {
+ var p unsafe.Pointer
+ if len(src) > 0 {
+ p = unsafe.Pointer(&src[0])
+ }
+ C.glBufferSubData(&f.f, C.GLenum(target), C.GLintptr(offset), C.GLsizeiptr(len(src)), p)
+}
+
+func (f *Functions) CheckFramebufferStatus(target Enum) Enum {
+ return Enum(C.glCheckFramebufferStatus(&f.f, C.GLenum(target)))
+}
+
+func (f *Functions) Clear(mask Enum) {
+ C.glClear(&f.f, C.GLbitfield(mask))
+}
+
+func (f *Functions) ClearColor(red float32, green float32, blue float32, alpha float32) {
+ C.glClearColor(&f.f, C.GLfloat(red), C.GLfloat(green), C.GLfloat(blue), C.GLfloat(alpha))
+}
+
+func (f *Functions) ClearDepthf(d float32) {
+ C.glClearDepthf(&f.f, C.GLfloat(d))
+}
+
+func (f *Functions) CompileShader(s Shader) {
+ C.glCompileShader(&f.f, C.GLuint(s.V))
+}
+
+func (f *Functions) CopyTexSubImage2D(target Enum, level, xoffset, yoffset, x, y, width, height int) {
+ C.glCopyTexSubImage2D(&f.f, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
+}
+
+func (f *Functions) CreateBuffer() Buffer {
+ C.glGenBuffers(&f.f, 1, &f.uints[0])
+ return Buffer{uint(f.uints[0])}
+}
+
+func (f *Functions) CreateFramebuffer() Framebuffer {
+ C.glGenFramebuffers(&f.f, 1, &f.uints[0])
+ return Framebuffer{uint(f.uints[0])}
+}
+
+func (f *Functions) CreateProgram() Program {
+ return Program{uint(C.glCreateProgram(&f.f))}
+}
+
+func (f *Functions) CreateQuery() Query {
+ C.glGenQueries(&f.f, 1, &f.uints[0])
+ return Query{uint(f.uints[0])}
+}
+
+func (f *Functions) CreateRenderbuffer() Renderbuffer {
+ C.glGenRenderbuffers(&f.f, 1, &f.uints[0])
+ return Renderbuffer{uint(f.uints[0])}
+}
+
+func (f *Functions) CreateShader(ty Enum) Shader {
+ return Shader{uint(C.glCreateShader(&f.f, C.GLenum(ty)))}
+}
+
+func (f *Functions) CreateTexture() Texture {
+ C.glGenTextures(&f.f, 1, &f.uints[0])
+ return Texture{uint(f.uints[0])}
+}
+
+func (f *Functions) CreateVertexArray() VertexArray {
+ C.glGenVertexArrays(&f.f, 1, &f.uints[0])
+ return VertexArray{uint(f.uints[0])}
+}
+
+func (f *Functions) DeleteBuffer(v Buffer) {
+ f.uints[0] = C.GLuint(v.V)
+ C.glDeleteBuffers(&f.f, 1, &f.uints[0])
+}
+
+func (f *Functions) DeleteFramebuffer(v Framebuffer) {
+ f.uints[0] = C.GLuint(v.V)
+ C.glDeleteFramebuffers(&f.f, 1, &f.uints[0])
+}
+
+func (f *Functions) DeleteProgram(p Program) {
+ C.glDeleteProgram(&f.f, C.GLuint(p.V))
+}
+
+func (f *Functions) DeleteQuery(query Query) {
+ f.uints[0] = C.GLuint(query.V)
+ C.glDeleteQueries(&f.f, 1, &f.uints[0])
+}
+
+func (f *Functions) DeleteVertexArray(array VertexArray) {
+ f.uints[0] = C.GLuint(array.V)
+ C.glDeleteVertexArrays(&f.f, 1, &f.uints[0])
+}
+
+func (f *Functions) DeleteRenderbuffer(v Renderbuffer) {
+ f.uints[0] = C.GLuint(v.V)
+ C.glDeleteRenderbuffers(&f.f, 1, &f.uints[0])
+}
+
+func (f *Functions) DeleteShader(s Shader) {
+ C.glDeleteShader(&f.f, C.GLuint(s.V))
+}
+
+func (f *Functions) DeleteTexture(v Texture) {
+ f.uints[0] = C.GLuint(v.V)
+ C.glDeleteTextures(&f.f, 1, &f.uints[0])
+}
+
+func (f *Functions) DepthFunc(v Enum) {
+ C.glDepthFunc(&f.f, C.GLenum(v))
+}
+
+func (f *Functions) DepthMask(mask bool) {
+ m := C.GLboolean(FALSE)
+ if mask {
+ m = C.GLboolean(TRUE)
+ }
+ C.glDepthMask(&f.f, m)
+}
+
+func (f *Functions) DisableVertexAttribArray(a Attrib) {
+ C.glDisableVertexAttribArray(&f.f, C.GLuint(a))
+}
+
+func (f *Functions) Disable(cap Enum) {
+ C.glDisable(&f.f, C.GLenum(cap))
+}
+
+func (f *Functions) DrawArrays(mode Enum, first int, count int) {
+ C.glDrawArrays(&f.f, C.GLenum(mode), C.GLint(first), C.GLsizei(count))
+}
+
+func (f *Functions) DrawElements(mode Enum, count int, ty Enum, offset int) {
+ C.glDrawElements(&f.f, C.GLenum(mode), C.GLsizei(count), C.GLenum(ty), C.uintptr_t(offset))
+}
+
+func (f *Functions) DispatchCompute(x, y, z int) {
+ C.glDispatchCompute(&f.f, C.GLuint(x), C.GLuint(y), C.GLuint(z))
+}
+
+func (f *Functions) Enable(cap Enum) {
+ C.glEnable(&f.f, C.GLenum(cap))
+}
+
+func (f *Functions) EndQuery(target Enum) {
+ C.glEndQuery(&f.f, C.GLenum(target))
+}
+
+func (f *Functions) EnableVertexAttribArray(a Attrib) {
+ C.glEnableVertexAttribArray(&f.f, C.GLuint(a))
+}
+
+func (f *Functions) Finish() {
+ C.glFinish(&f.f)
+}
+
+func (f *Functions) Flush() {
+ C.glFlush(&f.f)
+}
+
+func (f *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget Enum, renderbuffer Renderbuffer) {
+ C.glFramebufferRenderbuffer(&f.f, C.GLenum(target), C.GLenum(attachment), C.GLenum(renderbuffertarget), C.GLuint(renderbuffer.V))
+}
+
+func (f *Functions) FramebufferTexture2D(target, attachment, texTarget Enum, t Texture, level int) {
+ C.glFramebufferTexture2D(&f.f, C.GLenum(target), C.GLenum(attachment), C.GLenum(texTarget), C.GLuint(t.V), C.GLint(level))
+}
+
+func (c *Functions) GetBinding(pname Enum) Object {
+ return Object{uint(c.GetInteger(pname))}
+}
+
+func (c *Functions) GetBindingi(pname Enum, idx int) Object {
+ return Object{uint(c.GetIntegeri(pname, idx))}
+}
+
+func (f *Functions) GetError() Enum {
+ return Enum(C.glGetError(&f.f))
+}
+
+func (f *Functions) GetRenderbufferParameteri(target, pname Enum) int {
+ C.glGetRenderbufferParameteriv(&f.f, C.GLenum(target), C.GLenum(pname), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname Enum) int {
+ C.glGetFramebufferAttachmentParameteriv(&f.f, C.GLenum(target), C.GLenum(attachment), C.GLenum(pname), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetFloat4(pname Enum) [4]float32 {
+ C.glGetFloatv(&f.f, C.GLenum(pname), &f.floats[0])
+ var r [4]float32
+ for i := range r {
+ r[i] = float32(f.floats[i])
+ }
+ return r
+}
+
+func (f *Functions) GetFloat(pname Enum) float32 {
+ C.glGetFloatv(&f.f, C.GLenum(pname), &f.floats[0])
+ return float32(f.floats[0])
+}
+
+func (f *Functions) GetInteger4(pname Enum) [4]int {
+ C.glGetIntegerv(&f.f, C.GLenum(pname), &f.ints[0])
+ var r [4]int
+ for i := range r {
+ r[i] = int(f.ints[i])
+ }
+ return r
+}
+
+func (f *Functions) GetInteger(pname Enum) int {
+ C.glGetIntegerv(&f.f, C.GLenum(pname), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetIntegeri(pname Enum, idx int) int {
+ C.glGetIntegeri_v(&f.f, C.GLenum(pname), C.GLuint(idx), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetProgrami(p Program, pname Enum) int {
+ C.glGetProgramiv(&f.f, C.GLuint(p.V), C.GLenum(pname), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetProgramBinary(p Program) []byte {
+ sz := f.GetProgrami(p, PROGRAM_BINARY_LENGTH)
+ if sz == 0 {
+ return nil
+ }
+ buf := make([]byte, sz)
+ var format C.GLenum
+ C.glGetProgramBinary(&f.f, C.GLuint(p.V), C.GLsizei(sz), nil, &format, unsafe.Pointer(&buf[0]))
+ return buf
+}
+
+func (f *Functions) GetProgramInfoLog(p Program) string {
+ n := f.GetProgrami(p, INFO_LOG_LENGTH)
+ buf := make([]byte, n)
+ C.glGetProgramInfoLog(&f.f, C.GLuint(p.V), C.GLsizei(len(buf)), nil, (*C.GLchar)(unsafe.Pointer(&buf[0])))
+ return string(buf)
+}
+
+func (f *Functions) GetQueryObjectuiv(query Query, pname Enum) uint {
+ C.glGetQueryObjectuiv(&f.f, C.GLuint(query.V), C.GLenum(pname), &f.uints[0])
+ return uint(f.uints[0])
+}
+
+func (f *Functions) GetShaderi(s Shader, pname Enum) int {
+ C.glGetShaderiv(&f.f, C.GLuint(s.V), C.GLenum(pname), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetShaderInfoLog(s Shader) string {
+ n := f.GetShaderi(s, INFO_LOG_LENGTH)
+ buf := make([]byte, n)
+ C.glGetShaderInfoLog(&f.f, C.GLuint(s.V), C.GLsizei(len(buf)), nil, (*C.GLchar)(unsafe.Pointer(&buf[0])))
+ return string(buf)
+}
+
+func (f *Functions) getStringi(pname Enum, index int) string {
+ str := C.glGetStringi(&f.f, C.GLenum(pname), C.GLuint(index))
+ if str == nil {
+ return ""
+ }
+ return C.GoString((*C.char)(unsafe.Pointer(str)))
+}
+
+func (f *Functions) GetString(pname Enum) string {
+ switch {
+ case runtime.GOOS == "darwin" && pname == EXTENSIONS:
+ // macOS OpenGL 3 core profile doesn't support glGetString(GL_EXTENSIONS).
+ // Use glGetStringi(GL_EXTENSIONS, <index>).
+ var exts []string
+ nexts := f.GetInteger(NUM_EXTENSIONS)
+ for i := 0; i < nexts; i++ {
+ ext := f.getStringi(EXTENSIONS, i)
+ exts = append(exts, ext)
+ }
+ return strings.Join(exts, " ")
+ default:
+ str := C.glGetString(&f.f, C.GLenum(pname))
+ return C.GoString((*C.char)(unsafe.Pointer(str)))
+ }
+}
+
+func (f *Functions) GetUniformBlockIndex(p Program, name string) uint {
+ cname := C.CString(name)
+ defer C.free(unsafe.Pointer(cname))
+ return uint(C.glGetUniformBlockIndex(&f.f, C.GLuint(p.V), cname))
+}
+
+func (f *Functions) GetUniformLocation(p Program, name string) Uniform {
+ cname := C.CString(name)
+ defer C.free(unsafe.Pointer(cname))
+ return Uniform{int(C.glGetUniformLocation(&f.f, C.GLuint(p.V), cname))}
+}
+
+func (f *Functions) GetVertexAttrib(index int, pname Enum) int {
+ C.glGetVertexAttribiv(&f.f, C.GLuint(index), C.GLenum(pname), &f.ints[0])
+ return int(f.ints[0])
+}
+
+func (f *Functions) GetVertexAttribBinding(index int, pname Enum) Object {
+ return Object{uint(f.GetVertexAttrib(index, pname))}
+}
+
+func (f *Functions) GetVertexAttribPointer(index int, pname Enum) uintptr {
+ ptr := C.glGetVertexAttribPointerv(&f.f, C.GLuint(index), C.GLenum(pname))
+ return uintptr(ptr)
+}
+
+func (f *Functions) InvalidateFramebuffer(target, attachment Enum) {
+ C.glInvalidateFramebuffer(&f.f, C.GLenum(target), C.GLenum(attachment))
+}
+
+func (f *Functions) IsEnabled(cap Enum) bool {
+ return C.glIsEnabled(&f.f, C.GLenum(cap)) == TRUE
+}
+
+func (f *Functions) LinkProgram(p Program) {
+ C.glLinkProgram(&f.f, C.GLuint(p.V))
+}
+
+func (f *Functions) PixelStorei(pname Enum, param int) {
+ C.glPixelStorei(&f.f, C.GLenum(pname), C.GLint(param))
+}
+
+func (f *Functions) MemoryBarrier(barriers Enum) {
+ C.glMemoryBarrier(&f.f, C.GLbitfield(barriers))
+}
+
+func (f *Functions) MapBufferRange(target Enum, offset, length int, access Enum) []byte {
+ p := C.glMapBufferRange(&f.f, C.GLenum(target), C.GLintptr(offset), C.GLsizeiptr(length), C.GLbitfield(access))
+ if p == nil {
+ return nil
+ }
+ return (*[1 << 30]byte)(p)[:length:length]
+}
+
+func (f *Functions) Scissor(x, y, width, height int32) {
+ C.glScissor(&f.f, C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
+}
+
+func (f *Functions) ReadPixels(x, y, width, height int, format, ty Enum, data []byte) {
+ var p unsafe.Pointer
+ if len(data) > 0 {
+ p = unsafe.Pointer(&data[0])
+ }
+ C.glReadPixels(&f.f, C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(ty), p)
+}
+
+func (f *Functions) RenderbufferStorage(target, internalformat Enum, width, height int) {
+ C.glRenderbufferStorage(&f.f, C.GLenum(target), C.GLenum(internalformat), C.GLsizei(width), C.GLsizei(height))
+}
+
+func (f *Functions) ShaderSource(s Shader, src string) {
+ csrc := C.CString(src)
+ defer C.free(unsafe.Pointer(csrc))
+ strlen := C.GLint(len(src))
+ C.glShaderSource(&f.f, C.GLuint(s.V), 1, &csrc, &strlen)
+}
+
+func (f *Functions) TexImage2D(target Enum, level int, internalFormat Enum, width int, height int, format Enum, ty Enum) {
+ C.glTexImage2D(&f.f, C.GLenum(target), C.GLint(level), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), 0, C.GLenum(format), C.GLenum(ty), nil)
+}
+
+func (f *Functions) TexStorage2D(target Enum, levels int, internalFormat Enum, width, height int) {
+ C.glTexStorage2D(&f.f, C.GLenum(target), C.GLsizei(levels), C.GLenum(internalFormat), C.GLsizei(width), C.GLsizei(height))
+}
+
+func (f *Functions) TexSubImage2D(target Enum, level int, x int, y int, width int, height int, format Enum, ty Enum, data []byte) {
+ var p unsafe.Pointer
+ if len(data) > 0 {
+ p = unsafe.Pointer(&data[0])
+ }
+ C.glTexSubImage2D(&f.f, C.GLenum(target), C.GLint(level), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(ty), p)
+}
+
+func (f *Functions) TexParameteri(target, pname Enum, param int) {
+ C.glTexParameteri(&f.f, C.GLenum(target), C.GLenum(pname), C.GLint(param))
+}
+
+func (f *Functions) UniformBlockBinding(p Program, uniformBlockIndex uint, uniformBlockBinding uint) {
+ C.glUniformBlockBinding(&f.f, C.GLuint(p.V), C.GLuint(uniformBlockIndex), C.GLuint(uniformBlockBinding))
+}
+
+func (f *Functions) Uniform1f(dst Uniform, v float32) {
+ C.glUniform1f(&f.f, C.GLint(dst.V), C.GLfloat(v))
+}
+
+func (f *Functions) Uniform1i(dst Uniform, v int) {
+ C.glUniform1i(&f.f, C.GLint(dst.V), C.GLint(v))
+}
+
+func (f *Functions) Uniform2f(dst Uniform, v0 float32, v1 float32) {
+ C.glUniform2f(&f.f, C.GLint(dst.V), C.GLfloat(v0), C.GLfloat(v1))
+}
+
+func (f *Functions) Uniform3f(dst Uniform, v0 float32, v1 float32, v2 float32) {
+ C.glUniform3f(&f.f, C.GLint(dst.V), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2))
+}
+
+func (f *Functions) Uniform4f(dst Uniform, v0 float32, v1 float32, v2 float32, v3 float32) {
+ C.glUniform4f(&f.f, C.GLint(dst.V), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2), C.GLfloat(v3))
+}
+
+func (f *Functions) UseProgram(p Program) {
+ C.glUseProgram(&f.f, C.GLuint(p.V))
+}
+
+func (f *Functions) UnmapBuffer(target Enum) bool {
+ r := C.glUnmapBuffer(&f.f, C.GLenum(target))
+ return r == TRUE
+}
+
+func (f *Functions) VertexAttribPointer(dst Attrib, size int, ty Enum, normalized bool, stride int, offset int) {
+ var n C.GLboolean = FALSE
+ if normalized {
+ n = TRUE
+ }
+ C.glVertexAttribPointer(&f.f, C.GLuint(dst), C.GLint(size), C.GLenum(ty), n, C.GLsizei(stride), C.uintptr_t(offset))
+}
+
+func (f *Functions) Viewport(x int, y int, width int, height int) {
+ C.glViewport(&f.f, C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
+}
diff --git a/vendor/gioui.org/internal/gl/gl_windows.go b/vendor/gioui.org/internal/gl/gl_windows.go
new file mode 100644
index 0000000..99b1694
--- /dev/null
+++ b/vendor/gioui.org/internal/gl/gl_windows.go
@@ -0,0 +1,502 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gl
+
+import (
+ "math"
+ "runtime"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var (
+ LibGLESv2 = windows.NewLazyDLL("libGLESv2.dll")
+ _glActiveTexture = LibGLESv2.NewProc("glActiveTexture")
+ _glAttachShader = LibGLESv2.NewProc("glAttachShader")
+ _glBeginQuery = LibGLESv2.NewProc("glBeginQuery")
+ _glBindAttribLocation = LibGLESv2.NewProc("glBindAttribLocation")
+ _glBindBuffer = LibGLESv2.NewProc("glBindBuffer")
+ _glBindBufferBase = LibGLESv2.NewProc("glBindBufferBase")
+ _glBindFramebuffer = LibGLESv2.NewProc("glBindFramebuffer")
+ _glBindRenderbuffer = LibGLESv2.NewProc("glBindRenderbuffer")
+ _glBindTexture = LibGLESv2.NewProc("glBindTexture")
+ _glBindVertexArray = LibGLESv2.NewProc("glBindVertexArray")
+ _glBlendEquation = LibGLESv2.NewProc("glBlendEquation")
+ _glBlendFuncSeparate = LibGLESv2.NewProc("glBlendFuncSeparate")
+ _glBufferData = LibGLESv2.NewProc("glBufferData")
+ _glBufferSubData = LibGLESv2.NewProc("glBufferSubData")
+ _glCheckFramebufferStatus = LibGLESv2.NewProc("glCheckFramebufferStatus")
+ _glClear = LibGLESv2.NewProc("glClear")
+ _glClearColor = LibGLESv2.NewProc("glClearColor")
+ _glClearDepthf = LibGLESv2.NewProc("glClearDepthf")
+ _glDeleteQueries = LibGLESv2.NewProc("glDeleteQueries")
+ _glDeleteVertexArrays = LibGLESv2.NewProc("glDeleteVertexArrays")
+ _glCompileShader = LibGLESv2.NewProc("glCompileShader")
+ _glCopyTexSubImage2D = LibGLESv2.NewProc("glCopyTexSubImage2D")
+ _glGenBuffers = LibGLESv2.NewProc("glGenBuffers")
+ _glGenFramebuffers = LibGLESv2.NewProc("glGenFramebuffers")
+ _glGenVertexArrays = LibGLESv2.NewProc("glGenVertexArrays")
+ _glGetUniformBlockIndex = LibGLESv2.NewProc("glGetUniformBlockIndex")
+ _glCreateProgram = LibGLESv2.NewProc("glCreateProgram")
+ _glGenRenderbuffers = LibGLESv2.NewProc("glGenRenderbuffers")
+ _glCreateShader = LibGLESv2.NewProc("glCreateShader")
+ _glGenTextures = LibGLESv2.NewProc("glGenTextures")
+ _glDeleteBuffers = LibGLESv2.NewProc("glDeleteBuffers")
+ _glDeleteFramebuffers = LibGLESv2.NewProc("glDeleteFramebuffers")
+ _glDeleteProgram = LibGLESv2.NewProc("glDeleteProgram")
+ _glDeleteShader = LibGLESv2.NewProc("glDeleteShader")
+ _glDeleteRenderbuffers = LibGLESv2.NewProc("glDeleteRenderbuffers")
+ _glDeleteTextures = LibGLESv2.NewProc("glDeleteTextures")
+ _glDepthFunc = LibGLESv2.NewProc("glDepthFunc")
+ _glDepthMask = LibGLESv2.NewProc("glDepthMask")
+ _glDisableVertexAttribArray = LibGLESv2.NewProc("glDisableVertexAttribArray")
+ _glDisable = LibGLESv2.NewProc("glDisable")
+ _glDrawArrays = LibGLESv2.NewProc("glDrawArrays")
+ _glDrawElements = LibGLESv2.NewProc("glDrawElements")
+ _glEnable = LibGLESv2.NewProc("glEnable")
+ _glEnableVertexAttribArray = LibGLESv2.NewProc("glEnableVertexAttribArray")
+ _glEndQuery = LibGLESv2.NewProc("glEndQuery")
+ _glFinish = LibGLESv2.NewProc("glFinish")
+ _glFlush = LibGLESv2.NewProc("glFlush")
+ _glFramebufferRenderbuffer = LibGLESv2.NewProc("glFramebufferRenderbuffer")
+ _glFramebufferTexture2D = LibGLESv2.NewProc("glFramebufferTexture2D")
+ _glGenQueries = LibGLESv2.NewProc("glGenQueries")
+ _glGetError = LibGLESv2.NewProc("glGetError")
+ _glGetRenderbufferParameteriv = LibGLESv2.NewProc("glGetRenderbufferParameteriv")
+ _glGetFloatv = LibGLESv2.NewProc("glGetFloatv")
+ _glGetFramebufferAttachmentParameteriv = LibGLESv2.NewProc("glGetFramebufferAttachmentParameteriv")
+ _glGetIntegerv = LibGLESv2.NewProc("glGetIntegerv")
+ _glGetIntegeri_v = LibGLESv2.NewProc("glGetIntegeri_v")
+ _glGetProgramiv = LibGLESv2.NewProc("glGetProgramiv")
+ _glGetProgramInfoLog = LibGLESv2.NewProc("glGetProgramInfoLog")
+ _glGetQueryObjectuiv = LibGLESv2.NewProc("glGetQueryObjectuiv")
+ _glGetShaderiv = LibGLESv2.NewProc("glGetShaderiv")
+ _glGetShaderInfoLog = LibGLESv2.NewProc("glGetShaderInfoLog")
+ _glGetString = LibGLESv2.NewProc("glGetString")
+ _glGetUniformLocation = LibGLESv2.NewProc("glGetUniformLocation")
+ _glGetVertexAttribiv = LibGLESv2.NewProc("glGetVertexAttribiv")
+ _glGetVertexAttribPointerv = LibGLESv2.NewProc("glGetVertexAttribPointerv")
+ _glInvalidateFramebuffer = LibGLESv2.NewProc("glInvalidateFramebuffer")
+ _glIsEnabled = LibGLESv2.NewProc("glIsEnabled")
+ _glLinkProgram = LibGLESv2.NewProc("glLinkProgram")
+ _glPixelStorei = LibGLESv2.NewProc("glPixelStorei")
+ _glReadPixels = LibGLESv2.NewProc("glReadPixels")
+ _glRenderbufferStorage = LibGLESv2.NewProc("glRenderbufferStorage")
+ _glScissor = LibGLESv2.NewProc("glScissor")
+ _glShaderSource = LibGLESv2.NewProc("glShaderSource")
+ _glTexImage2D = LibGLESv2.NewProc("glTexImage2D")
+ _glTexStorage2D = LibGLESv2.NewProc("glTexStorage2D")
+ _glTexSubImage2D = LibGLESv2.NewProc("glTexSubImage2D")
+ _glTexParameteri = LibGLESv2.NewProc("glTexParameteri")
+ _glUniformBlockBinding = LibGLESv2.NewProc("glUniformBlockBinding")
+ _glUniform1f = LibGLESv2.NewProc("glUniform1f")
+ _glUniform1i = LibGLESv2.NewProc("glUniform1i")
+ _glUniform2f = LibGLESv2.NewProc("glUniform2f")
+ _glUniform3f = LibGLESv2.NewProc("glUniform3f")
+ _glUniform4f = LibGLESv2.NewProc("glUniform4f")
+ _glUseProgram = LibGLESv2.NewProc("glUseProgram")
+ _glVertexAttribPointer = LibGLESv2.NewProc("glVertexAttribPointer")
+ _glViewport = LibGLESv2.NewProc("glViewport")
+)
+
+type Functions struct {
+ // Query caches.
+ int32s [100]int32
+ float32s [100]float32
+ uintptrs [100]uintptr
+}
+
+type Context interface{}
+
+func NewFunctions(ctx Context, forceES bool) (*Functions, error) {
+ if ctx != nil {
+ panic("non-nil context")
+ }
+ return new(Functions), nil
+}
+
+func (c *Functions) ActiveTexture(t Enum) {
+ syscall.Syscall(_glActiveTexture.Addr(), 1, uintptr(t), 0, 0)
+}
+func (c *Functions) AttachShader(p Program, s Shader) {
+ syscall.Syscall(_glAttachShader.Addr(), 2, uintptr(p.V), uintptr(s.V), 0)
+}
+func (f *Functions) BeginQuery(target Enum, query Query) {
+ syscall.Syscall(_glBeginQuery.Addr(), 2, uintptr(target), uintptr(query.V), 0)
+}
+func (c *Functions) BindAttribLocation(p Program, a Attrib, name string) {
+ cname := cString(name)
+ c0 := &cname[0]
+ syscall.Syscall(_glBindAttribLocation.Addr(), 3, uintptr(p.V), uintptr(a), uintptr(unsafe.Pointer(c0)))
+ issue34474KeepAlive(c)
+}
+func (c *Functions) BindBuffer(target Enum, b Buffer) {
+ syscall.Syscall(_glBindBuffer.Addr(), 2, uintptr(target), uintptr(b.V), 0)
+}
+func (c *Functions) BindBufferBase(target Enum, index int, b Buffer) {
+ syscall.Syscall(_glBindBufferBase.Addr(), 3, uintptr(target), uintptr(index), uintptr(b.V))
+}
+func (c *Functions) BindFramebuffer(target Enum, fb Framebuffer) {
+ syscall.Syscall(_glBindFramebuffer.Addr(), 2, uintptr(target), uintptr(fb.V), 0)
+}
+func (c *Functions) BindRenderbuffer(target Enum, rb Renderbuffer) {
+ syscall.Syscall(_glBindRenderbuffer.Addr(), 2, uintptr(target), uintptr(rb.V), 0)
+}
+func (f *Functions) BindImageTexture(unit int, t Texture, level int, layered bool, layer int, access, format Enum) {
+ panic("not implemented")
+}
+func (c *Functions) BindTexture(target Enum, t Texture) {
+ syscall.Syscall(_glBindTexture.Addr(), 2, uintptr(target), uintptr(t.V), 0)
+}
+func (c *Functions) BindVertexArray(a VertexArray) {
+ syscall.Syscall(_glBindVertexArray.Addr(), 1, uintptr(a.V), 0, 0)
+}
+func (c *Functions) BlendEquation(mode Enum) {
+ syscall.Syscall(_glBlendEquation.Addr(), 1, uintptr(mode), 0, 0)
+}
+func (c *Functions) BlendFuncSeparate(srcRGB, dstRGB, srcA, dstA Enum) {
+ syscall.Syscall6(_glBlendFuncSeparate.Addr(), 4, uintptr(srcRGB), uintptr(dstRGB), uintptr(srcA), uintptr(dstA), 0, 0)
+}
+func (c *Functions) BufferData(target Enum, size int, usage Enum, data []byte) {
+ var p unsafe.Pointer
+ if len(data) > 0 {
+ p = unsafe.Pointer(&data[0])
+ }
+ syscall.Syscall6(_glBufferData.Addr(), 4, uintptr(target), uintptr(size), uintptr(p), uintptr(usage), 0, 0)
+}
+func (f *Functions) BufferSubData(target Enum, offset int, src []byte) {
+ if n := len(src); n > 0 {
+ s0 := &src[0]
+ syscall.Syscall6(_glBufferSubData.Addr(), 4, uintptr(target), uintptr(offset), uintptr(n), uintptr(unsafe.Pointer(s0)), 0, 0)
+ issue34474KeepAlive(s0)
+ }
+}
+func (c *Functions) CheckFramebufferStatus(target Enum) Enum {
+ s, _, _ := syscall.Syscall(_glCheckFramebufferStatus.Addr(), 1, uintptr(target), 0, 0)
+ return Enum(s)
+}
+func (c *Functions) Clear(mask Enum) {
+ syscall.Syscall(_glClear.Addr(), 1, uintptr(mask), 0, 0)
+}
+func (c *Functions) ClearColor(red, green, blue, alpha float32) {
+ syscall.Syscall6(_glClearColor.Addr(), 4, uintptr(math.Float32bits(red)), uintptr(math.Float32bits(green)), uintptr(math.Float32bits(blue)), uintptr(math.Float32bits(alpha)), 0, 0)
+}
+func (c *Functions) ClearDepthf(d float32) {
+ syscall.Syscall(_glClearDepthf.Addr(), 1, uintptr(math.Float32bits(d)), 0, 0)
+}
+func (c *Functions) CompileShader(s Shader) {
+ syscall.Syscall(_glCompileShader.Addr(), 1, uintptr(s.V), 0, 0)
+}
+func (f *Functions) CopyTexSubImage2D(target Enum, level, xoffset, yoffset, x, y, width, height int) {
+ syscall.Syscall9(_glCopyTexSubImage2D.Addr(), 8, uintptr(target), uintptr(level), uintptr(xoffset), uintptr(yoffset), uintptr(x), uintptr(y), uintptr(width), uintptr(height), 0)
+}
+func (c *Functions) CreateBuffer() Buffer {
+ var buf uintptr
+ syscall.Syscall(_glGenBuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&buf)), 0)
+ return Buffer{uint(buf)}
+}
+func (c *Functions) CreateFramebuffer() Framebuffer {
+ var fb uintptr
+ syscall.Syscall(_glGenFramebuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&fb)), 0)
+ return Framebuffer{uint(fb)}
+}
+func (c *Functions) CreateProgram() Program {
+ p, _, _ := syscall.Syscall(_glCreateProgram.Addr(), 0, 0, 0, 0)
+ return Program{uint(p)}
+}
+func (f *Functions) CreateQuery() Query {
+ var q uintptr
+ syscall.Syscall(_glGenQueries.Addr(), 2, 1, uintptr(unsafe.Pointer(&q)), 0)
+ return Query{uint(q)}
+}
+func (c *Functions) CreateRenderbuffer() Renderbuffer {
+ var rb uintptr
+ syscall.Syscall(_glGenRenderbuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&rb)), 0)
+ return Renderbuffer{uint(rb)}
+}
+func (c *Functions) CreateShader(ty Enum) Shader {
+ s, _, _ := syscall.Syscall(_glCreateShader.Addr(), 1, uintptr(ty), 0, 0)
+ return Shader{uint(s)}
+}
+func (c *Functions) CreateTexture() Texture {
+ var t uintptr
+ syscall.Syscall(_glGenTextures.Addr(), 2, 1, uintptr(unsafe.Pointer(&t)), 0)
+ return Texture{uint(t)}
+}
+func (c *Functions) CreateVertexArray() VertexArray {
+ var t uintptr
+ syscall.Syscall(_glGenVertexArrays.Addr(), 2, 1, uintptr(unsafe.Pointer(&t)), 0)
+ return VertexArray{uint(t)}
+}
+func (c *Functions) DeleteBuffer(v Buffer) {
+ syscall.Syscall(_glDeleteBuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&v)), 0)
+}
+func (c *Functions) DeleteFramebuffer(v Framebuffer) {
+ syscall.Syscall(_glDeleteFramebuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&v.V)), 0)
+}
+func (c *Functions) DeleteProgram(p Program) {
+ syscall.Syscall(_glDeleteProgram.Addr(), 1, uintptr(p.V), 0, 0)
+}
+func (f *Functions) DeleteQuery(query Query) {
+ syscall.Syscall(_glDeleteQueries.Addr(), 2, 1, uintptr(unsafe.Pointer(&query.V)), 0)
+}
+func (c *Functions) DeleteShader(s Shader) {
+ syscall.Syscall(_glDeleteShader.Addr(), 1, uintptr(s.V), 0, 0)
+}
+func (c *Functions) DeleteRenderbuffer(v Renderbuffer) {
+ syscall.Syscall(_glDeleteRenderbuffers.Addr(), 2, 1, uintptr(unsafe.Pointer(&v.V)), 0)
+}
+func (c *Functions) DeleteTexture(v Texture) {
+ syscall.Syscall(_glDeleteTextures.Addr(), 2, 1, uintptr(unsafe.Pointer(&v.V)), 0)
+}
+func (f *Functions) DeleteVertexArray(array VertexArray) {
+ syscall.Syscall(_glDeleteVertexArrays.Addr(), 2, 1, uintptr(unsafe.Pointer(&array.V)), 0)
+}
+func (c *Functions) DepthFunc(f Enum) {
+ syscall.Syscall(_glDepthFunc.Addr(), 1, uintptr(f), 0, 0)
+}
+func (c *Functions) DepthMask(mask bool) {
+ var m uintptr
+ if mask {
+ m = 1
+ }
+ syscall.Syscall(_glDepthMask.Addr(), 1, m, 0, 0)
+}
+func (c *Functions) DisableVertexAttribArray(a Attrib) {
+ syscall.Syscall(_glDisableVertexAttribArray.Addr(), 1, uintptr(a), 0, 0)
+}
+func (c *Functions) Disable(cap Enum) {
+ syscall.Syscall(_glDisable.Addr(), 1, uintptr(cap), 0, 0)
+}
+func (c *Functions) DrawArrays(mode Enum, first, count int) {
+ syscall.Syscall(_glDrawArrays.Addr(), 3, uintptr(mode), uintptr(first), uintptr(count))
+}
+func (c *Functions) DrawElements(mode Enum, count int, ty Enum, offset int) {
+ syscall.Syscall6(_glDrawElements.Addr(), 4, uintptr(mode), uintptr(count), uintptr(ty), uintptr(offset), 0, 0)
+}
+func (f *Functions) DispatchCompute(x, y, z int) {
+ panic("not implemented")
+}
+func (c *Functions) Enable(cap Enum) {
+ syscall.Syscall(_glEnable.Addr(), 1, uintptr(cap), 0, 0)
+}
+func (c *Functions) EnableVertexAttribArray(a Attrib) {
+ syscall.Syscall(_glEnableVertexAttribArray.Addr(), 1, uintptr(a), 0, 0)
+}
+func (f *Functions) EndQuery(target Enum) {
+ syscall.Syscall(_glEndQuery.Addr(), 1, uintptr(target), 0, 0)
+}
+func (c *Functions) Finish() {
+ syscall.Syscall(_glFinish.Addr(), 0, 0, 0, 0)
+}
+func (c *Functions) Flush() {
+ syscall.Syscall(_glFlush.Addr(), 0, 0, 0, 0)
+}
+func (c *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget Enum, renderbuffer Renderbuffer) {
+ syscall.Syscall6(_glFramebufferRenderbuffer.Addr(), 4, uintptr(target), uintptr(attachment), uintptr(renderbuffertarget), uintptr(renderbuffer.V), 0, 0)
+}
+func (c *Functions) FramebufferTexture2D(target, attachment, texTarget Enum, t Texture, level int) {
+ syscall.Syscall6(_glFramebufferTexture2D.Addr(), 5, uintptr(target), uintptr(attachment), uintptr(texTarget), uintptr(t.V), uintptr(level), 0)
+}
+func (f *Functions) GetUniformBlockIndex(p Program, name string) uint {
+ cname := cString(name)
+ c0 := &cname[0]
+ u, _, _ := syscall.Syscall(_glGetUniformBlockIndex.Addr(), 2, uintptr(p.V), uintptr(unsafe.Pointer(c0)), 0)
+ issue34474KeepAlive(c0)
+ return uint(u)
+}
+func (c *Functions) GetBinding(pname Enum) Object {
+ return Object{uint(c.GetInteger(pname))}
+}
+func (c *Functions) GetBindingi(pname Enum, idx int) Object {
+ return Object{uint(c.GetIntegeri(pname, idx))}
+}
+func (c *Functions) GetError() Enum {
+ e, _, _ := syscall.Syscall(_glGetError.Addr(), 0, 0, 0, 0)
+ return Enum(e)
+}
+func (c *Functions) GetRenderbufferParameteri(target, pname Enum) int {
+ syscall.Syscall(_glGetRenderbufferParameteriv.Addr(), 3, uintptr(target), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
+ return int(c.int32s[0])
+}
+func (c *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname Enum) int {
+ syscall.Syscall6(_glGetFramebufferAttachmentParameteriv.Addr(), 4, uintptr(target), uintptr(attachment), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])), 0, 0)
+ return int(c.int32s[0])
+}
+func (c *Functions) GetInteger4(pname Enum) [4]int {
+ syscall.Syscall(_glGetIntegerv.Addr(), 2, uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])), 0)
+ var r [4]int
+ for i := range r {
+ r[i] = int(c.int32s[i])
+ }
+ return r
+}
+func (c *Functions) GetInteger(pname Enum) int {
+ syscall.Syscall(_glGetIntegerv.Addr(), 2, uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])), 0)
+ return int(c.int32s[0])
+}
+func (c *Functions) GetIntegeri(pname Enum, idx int) int {
+ syscall.Syscall(_glGetIntegeri_v.Addr(), 3, uintptr(pname), uintptr(idx), uintptr(unsafe.Pointer(&c.int32s[0])))
+ return int(c.int32s[0])
+}
+func (c *Functions) GetFloat(pname Enum) float32 {
+ syscall.Syscall(_glGetFloatv.Addr(), 2, uintptr(pname), uintptr(unsafe.Pointer(&c.float32s[0])), 0)
+ return c.float32s[0]
+}
+func (c *Functions) GetFloat4(pname Enum) [4]float32 {
+ syscall.Syscall(_glGetFloatv.Addr(), 2, uintptr(pname), uintptr(unsafe.Pointer(&c.float32s[0])), 0)
+ var r [4]float32
+ copy(r[:], c.float32s[:])
+ return r
+}
+func (c *Functions) GetProgrami(p Program, pname Enum) int {
+ syscall.Syscall(_glGetProgramiv.Addr(), 3, uintptr(p.V), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
+ return int(c.int32s[0])
+}
+func (c *Functions) GetProgramInfoLog(p Program) string {
+ n := c.GetProgrami(p, INFO_LOG_LENGTH)
+ buf := make([]byte, n)
+ syscall.Syscall6(_glGetProgramInfoLog.Addr(), 4, uintptr(p.V), uintptr(len(buf)), 0, uintptr(unsafe.Pointer(&buf[0])), 0, 0)
+ return string(buf)
+}
+func (c *Functions) GetQueryObjectuiv(query Query, pname Enum) uint {
+ syscall.Syscall(_glGetQueryObjectuiv.Addr(), 3, uintptr(query.V), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
+ return uint(c.int32s[0])
+}
+func (c *Functions) GetShaderi(s Shader, pname Enum) int {
+ syscall.Syscall(_glGetShaderiv.Addr(), 3, uintptr(s.V), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
+ return int(c.int32s[0])
+}
+func (c *Functions) GetShaderInfoLog(s Shader) string {
+ n := c.GetShaderi(s, INFO_LOG_LENGTH)
+ buf := make([]byte, n)
+ syscall.Syscall6(_glGetShaderInfoLog.Addr(), 4, uintptr(s.V), uintptr(len(buf)), 0, uintptr(unsafe.Pointer(&buf[0])), 0, 0)
+ return string(buf)
+}
+func (c *Functions) GetString(pname Enum) string {
+ s, _, _ := syscall.Syscall(_glGetString.Addr(), 1, uintptr(pname), 0, 0)
+ return windows.BytePtrToString((*byte)(unsafe.Pointer(s)))
+}
+func (c *Functions) GetUniformLocation(p Program, name string) Uniform {
+ cname := cString(name)
+ c0 := &cname[0]
+ u, _, _ := syscall.Syscall(_glGetUniformLocation.Addr(), 2, uintptr(p.V), uintptr(unsafe.Pointer(c0)), 0)
+ issue34474KeepAlive(c0)
+ return Uniform{int(u)}
+}
+func (c *Functions) GetVertexAttrib(index int, pname Enum) int {
+ syscall.Syscall(_glGetVertexAttribiv.Addr(), 3, uintptr(index), uintptr(pname), uintptr(unsafe.Pointer(&c.int32s[0])))
+ return int(c.int32s[0])
+}
+
+func (c *Functions) GetVertexAttribBinding(index int, pname Enum) Object {
+ return Object{uint(c.GetVertexAttrib(index, pname))}
+}
+
+func (c *Functions) GetVertexAttribPointer(index int, pname Enum) uintptr {
+ syscall.Syscall(_glGetVertexAttribPointerv.Addr(), 3, uintptr(index), uintptr(pname), uintptr(unsafe.Pointer(&c.uintptrs[0])))
+ return c.uintptrs[0]
+}
+func (c *Functions) InvalidateFramebuffer(target, attachment Enum) {
+ addr := _glInvalidateFramebuffer.Addr()
+ if addr == 0 {
+ // InvalidateFramebuffer is just a hint. Skip it if not supported.
+ return
+ }
+ syscall.Syscall(addr, 3, uintptr(target), 1, uintptr(unsafe.Pointer(&attachment)))
+}
+func (f *Functions) IsEnabled(cap Enum) bool {
+ u, _, _ := syscall.Syscall(_glIsEnabled.Addr(), 1, uintptr(cap), 0, 0)
+ return u == TRUE
+}
+func (c *Functions) LinkProgram(p Program) {
+ syscall.Syscall(_glLinkProgram.Addr(), 1, uintptr(p.V), 0, 0)
+}
+func (c *Functions) PixelStorei(pname Enum, param int) {
+ syscall.Syscall(_glPixelStorei.Addr(), 2, uintptr(pname), uintptr(param), 0)
+}
+func (f *Functions) MemoryBarrier(barriers Enum) {
+ panic("not implemented")
+}
+func (f *Functions) MapBufferRange(target Enum, offset, length int, access Enum) []byte {
+ panic("not implemented")
+}
+func (f *Functions) ReadPixels(x, y, width, height int, format, ty Enum, data []byte) {
+ d0 := &data[0]
+ syscall.Syscall9(_glReadPixels.Addr(), 7, uintptr(x), uintptr(y), uintptr(width), uintptr(height), uintptr(format), uintptr(ty), uintptr(unsafe.Pointer(d0)), 0, 0)
+ issue34474KeepAlive(d0)
+}
+func (c *Functions) RenderbufferStorage(target, internalformat Enum, width, height int) {
+ syscall.Syscall6(_glRenderbufferStorage.Addr(), 4, uintptr(target), uintptr(internalformat), uintptr(width), uintptr(height), 0, 0)
+}
+func (c *Functions) Scissor(x, y, width, height int32) {
+ syscall.Syscall6(_glScissor.Addr(), 4, uintptr(x), uintptr(y), uintptr(width), uintptr(height), 0, 0)
+}
+func (c *Functions) ShaderSource(s Shader, src string) {
+ var n uintptr = uintptr(len(src))
+ psrc := &src
+ syscall.Syscall6(_glShaderSource.Addr(), 4, uintptr(s.V), 1, uintptr(unsafe.Pointer(psrc)), uintptr(unsafe.Pointer(&n)), 0, 0)
+ issue34474KeepAlive(psrc)
+}
+func (f *Functions) TexImage2D(target Enum, level int, internalFormat Enum, width int, height int, format Enum, ty Enum) {
+ syscall.Syscall9(_glTexImage2D.Addr(), 9, uintptr(target), uintptr(level), uintptr(internalFormat), uintptr(width), uintptr(height), 0, uintptr(format), uintptr(ty), 0)
+}
+func (f *Functions) TexStorage2D(target Enum, levels int, internalFormat Enum, width, height int) {
+ syscall.Syscall6(_glTexStorage2D.Addr(), 5, uintptr(target), uintptr(levels), uintptr(internalFormat), uintptr(width), uintptr(height), 0)
+}
+func (c *Functions) TexSubImage2D(target Enum, level int, x, y, width, height int, format, ty Enum, data []byte) {
+ d0 := &data[0]
+ syscall.Syscall9(_glTexSubImage2D.Addr(), 9, uintptr(target), uintptr(level), uintptr(x), uintptr(y), uintptr(width), uintptr(height), uintptr(format), uintptr(ty), uintptr(unsafe.Pointer(d0)))
+ issue34474KeepAlive(d0)
+}
+func (c *Functions) TexParameteri(target, pname Enum, param int) {
+ syscall.Syscall(_glTexParameteri.Addr(), 3, uintptr(target), uintptr(pname), uintptr(param))
+}
+func (f *Functions) UniformBlockBinding(p Program, uniformBlockIndex uint, uniformBlockBinding uint) {
+ syscall.Syscall(_glUniformBlockBinding.Addr(), 3, uintptr(p.V), uintptr(uniformBlockIndex), uintptr(uniformBlockBinding))
+}
+func (c *Functions) Uniform1f(dst Uniform, v float32) {
+ syscall.Syscall(_glUniform1f.Addr(), 2, uintptr(dst.V), uintptr(math.Float32bits(v)), 0)
+}
+func (c *Functions) Uniform1i(dst Uniform, v int) {
+ syscall.Syscall(_glUniform1i.Addr(), 2, uintptr(dst.V), uintptr(v), 0)
+}
+func (c *Functions) Uniform2f(dst Uniform, v0, v1 float32) {
+ syscall.Syscall(_glUniform2f.Addr(), 3, uintptr(dst.V), uintptr(math.Float32bits(v0)), uintptr(math.Float32bits(v1)))
+}
+func (c *Functions) Uniform3f(dst Uniform, v0, v1, v2 float32) {
+ syscall.Syscall6(_glUniform3f.Addr(), 4, uintptr(dst.V), uintptr(math.Float32bits(v0)), uintptr(math.Float32bits(v1)), uintptr(math.Float32bits(v2)), 0, 0)
+}
+func (c *Functions) Uniform4f(dst Uniform, v0, v1, v2, v3 float32) {
+ syscall.Syscall6(_glUniform4f.Addr(), 5, uintptr(dst.V), uintptr(math.Float32bits(v0)), uintptr(math.Float32bits(v1)), uintptr(math.Float32bits(v2)), uintptr(math.Float32bits(v3)), 0)
+}
+func (c *Functions) UseProgram(p Program) {
+ syscall.Syscall(_glUseProgram.Addr(), 1, uintptr(p.V), 0, 0)
+}
+func (f *Functions) UnmapBuffer(target Enum) bool {
+ panic("not implemented")
+}
+func (c *Functions) VertexAttribPointer(dst Attrib, size int, ty Enum, normalized bool, stride, offset int) {
+ var norm uintptr
+ if normalized {
+ norm = 1
+ }
+ syscall.Syscall6(_glVertexAttribPointer.Addr(), 6, uintptr(dst), uintptr(size), uintptr(ty), norm, uintptr(stride), uintptr(offset))
+}
+func (c *Functions) Viewport(x, y, width, height int) {
+ syscall.Syscall6(_glViewport.Addr(), 4, uintptr(x), uintptr(y), uintptr(width), uintptr(height), 0, 0)
+}
+
+func cString(s string) []byte {
+ b := make([]byte, len(s)+1)
+ copy(b, s)
+ return b
+}
+
+// issue34474KeepAlive calls runtime.KeepAlive as a
+// workaround for golang.org/issue/34474.
+func issue34474KeepAlive(v interface{}) {
+ runtime.KeepAlive(v)
+}
diff --git a/vendor/gioui.org/internal/gl/types.go b/vendor/gioui.org/internal/gl/types.go
new file mode 100644
index 0000000..dd24963
--- /dev/null
+++ b/vendor/gioui.org/internal/gl/types.go
@@ -0,0 +1,77 @@
+//go:build !js
+// +build !js
+
+package gl
+
+type (
+ Object struct{ V uint }
+ Buffer Object
+ Framebuffer Object
+ Program Object
+ Renderbuffer Object
+ Shader Object
+ Texture Object
+ Query Object
+ Uniform struct{ V int }
+ VertexArray Object
+)
+
+func (o Object) valid() bool {
+ return o.V != 0
+}
+
+func (o Object) equal(o2 Object) bool {
+ return o == o2
+}
+
+func (u Framebuffer) Valid() bool {
+ return Object(u).valid()
+}
+
+func (u Uniform) Valid() bool {
+ return u.V != -1
+}
+
+func (p Program) Valid() bool {
+ return Object(p).valid()
+}
+
+func (s Shader) Valid() bool {
+ return Object(s).valid()
+}
+
+func (a VertexArray) Valid() bool {
+ return Object(a).valid()
+}
+
+func (f Framebuffer) Equal(f2 Framebuffer) bool {
+ return Object(f).equal(Object(f2))
+}
+
+func (p Program) Equal(p2 Program) bool {
+ return Object(p).equal(Object(p2))
+}
+
+func (s Shader) Equal(s2 Shader) bool {
+ return Object(s).equal(Object(s2))
+}
+
+func (u Uniform) Equal(u2 Uniform) bool {
+ return u == u2
+}
+
+func (a VertexArray) Equal(a2 VertexArray) bool {
+ return Object(a).equal(Object(a2))
+}
+
+func (r Renderbuffer) Equal(r2 Renderbuffer) bool {
+ return Object(r).equal(Object(r2))
+}
+
+func (t Texture) Equal(t2 Texture) bool {
+ return Object(t).equal(Object(t2))
+}
+
+func (b Buffer) Equal(b2 Buffer) bool {
+ return Object(b).equal(Object(b2))
+}
diff --git a/vendor/gioui.org/internal/gl/types_js.go b/vendor/gioui.org/internal/gl/types_js.go
new file mode 100644
index 0000000..8d91a6b
--- /dev/null
+++ b/vendor/gioui.org/internal/gl/types_js.go
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gl
+
+import "syscall/js"
+
+type (
+ Object js.Value
+ Buffer Object
+ Framebuffer Object
+ Program Object
+ Renderbuffer Object
+ Shader Object
+ Texture Object
+ Query Object
+ Uniform Object
+ VertexArray Object
+)
+
+func (o Object) valid() bool {
+ return js.Value(o).Truthy()
+}
+
+func (o Object) equal(o2 Object) bool {
+ return js.Value(o).Equal(js.Value(o2))
+}
+
+func (b Buffer) Valid() bool {
+ return Object(b).valid()
+}
+
+func (f Framebuffer) Valid() bool {
+ return Object(f).valid()
+}
+
+func (p Program) Valid() bool {
+ return Object(p).valid()
+}
+
+func (r Renderbuffer) Valid() bool {
+ return Object(r).valid()
+}
+
+func (s Shader) Valid() bool {
+ return Object(s).valid()
+}
+
+func (t Texture) Valid() bool {
+ return Object(t).valid()
+}
+
+func (u Uniform) Valid() bool {
+ return Object(u).valid()
+}
+
+func (a VertexArray) Valid() bool {
+ return Object(a).valid()
+}
+
+func (f Framebuffer) Equal(f2 Framebuffer) bool {
+ return Object(f).equal(Object(f2))
+}
+
+func (p Program) Equal(p2 Program) bool {
+ return Object(p).equal(Object(p2))
+}
+
+func (s Shader) Equal(s2 Shader) bool {
+ return Object(s).equal(Object(s2))
+}
+
+func (u Uniform) Equal(u2 Uniform) bool {
+ return Object(u).equal(Object(u2))
+}
+
+func (a VertexArray) Equal(a2 VertexArray) bool {
+ return Object(a).equal(Object(a2))
+}
+
+func (r Renderbuffer) Equal(r2 Renderbuffer) bool {
+ return Object(r).equal(Object(r2))
+}
+
+func (t Texture) Equal(t2 Texture) bool {
+ return Object(t).equal(Object(t2))
+}
+
+func (b Buffer) Equal(b2 Buffer) bool {
+ return Object(b).equal(Object(b2))
+}
diff --git a/vendor/gioui.org/gpu/gl/util.go b/vendor/gioui.org/internal/gl/util.go
index 65b2155..c696b69 100644
--- a/vendor/gioui.org/gpu/gl/util.go
+++ b/vendor/gioui.org/internal/gl/util.go
@@ -8,19 +8,19 @@ import (
"strings"
)
-func CreateProgram(ctx Functions, vsSrc, fsSrc string, attribs []string) (Program, error) {
- vs, err := createShader(ctx, VERTEX_SHADER, vsSrc)
+func CreateProgram(ctx *Functions, vsSrc, fsSrc string, attribs []string) (Program, error) {
+ vs, err := CreateShader(ctx, VERTEX_SHADER, vsSrc)
if err != nil {
return Program{}, err
}
defer ctx.DeleteShader(vs)
- fs, err := createShader(ctx, FRAGMENT_SHADER, fsSrc)
+ fs, err := CreateShader(ctx, FRAGMENT_SHADER, fsSrc)
if err != nil {
return Program{}, err
}
defer ctx.DeleteShader(fs)
prog := ctx.CreateProgram()
- if !prog.valid() {
+ if !prog.Valid() {
return Program{}, errors.New("glCreateProgram failed")
}
ctx.AttachShader(prog, vs)
@@ -37,17 +37,29 @@ func CreateProgram(ctx Functions, vsSrc, fsSrc string, attribs []string) (Progra
return prog, nil
}
-func GetUniformLocation(ctx Functions, prog Program, name string) Uniform {
- loc := ctx.GetUniformLocation(prog, name)
- if !loc.valid() {
- panic(fmt.Errorf("uniform %s not found", name))
+func CreateComputeProgram(ctx *Functions, src string) (Program, error) {
+ cs, err := CreateShader(ctx, COMPUTE_SHADER, src)
+ if err != nil {
+ return Program{}, err
+ }
+ defer ctx.DeleteShader(cs)
+ prog := ctx.CreateProgram()
+ if !prog.Valid() {
+ return Program{}, errors.New("glCreateProgram failed")
+ }
+ ctx.AttachShader(prog, cs)
+ ctx.LinkProgram(prog)
+ if ctx.GetProgrami(prog, LINK_STATUS) == 0 {
+ log := ctx.GetProgramInfoLog(prog)
+ ctx.DeleteProgram(prog)
+ return Program{}, fmt.Errorf("program link failed: %s", strings.TrimSpace(log))
}
- return loc
+ return prog, nil
}
-func createShader(ctx Functions, typ Enum, src string) (Shader, error) {
+func CreateShader(ctx *Functions, typ Enum, src string) (Shader, error) {
sh := ctx.CreateShader(typ)
- if !sh.valid() {
+ if !sh.Valid() {
return Shader{}, errors.New("glCreateShader failed")
}
ctx.ShaderSource(sh, src)
diff --git a/vendor/gioui.org/internal/opconst/ops.go b/vendor/gioui.org/internal/opconst/ops.go
deleted file mode 100644
index 62365b8..0000000
--- a/vendor/gioui.org/internal/opconst/ops.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package opconst
-
-type OpType byte
-
-// Start at a high number for easier debugging.
-const firstOpIndex = 200
-
-const (
- TypeMacro OpType = iota + firstOpIndex
- TypeCall
- TypeTransform
- TypeLayer
- TypeInvalidate
- TypeImage
- TypePaint
- TypeColor
- TypeArea
- TypePointerInput
- TypePass
- TypeKeyInput
- TypeHideInput
- TypePush
- TypePop
- TypeAux
- TypeClip
- TypeProfile
-)
-
-const (
- TypeMacroLen = 1 + 4 + 4
- TypeCallLen = 1 + 4 + 4
- TypeTransformLen = 1 + 4*6
- TypeLayerLen = 1
- TypeRedrawLen = 1 + 8
- TypeImageLen = 1 + 4*4
- TypePaintLen = 1 + 4*4
- TypeColorLen = 1 + 4
- TypeAreaLen = 1 + 1 + 4*4
- TypePointerInputLen = 1 + 1 + 1
- TypePassLen = 1 + 1
- TypeKeyInputLen = 1 + 1
- TypeHideInputLen = 1
- TypePushLen = 1
- TypePopLen = 1
- TypeAuxLen = 1
- TypeClipLen = 1 + 4*4
- TypeProfileLen = 1
-)
-
-func (t OpType) Size() int {
- return [...]int{
- TypeMacroLen,
- TypeCallLen,
- TypeTransformLen,
- TypeLayerLen,
- TypeRedrawLen,
- TypeImageLen,
- TypePaintLen,
- TypeColorLen,
- TypeAreaLen,
- TypePointerInputLen,
- TypePassLen,
- TypeKeyInputLen,
- TypeHideInputLen,
- TypePushLen,
- TypePopLen,
- TypeAuxLen,
- TypeClipLen,
- TypeProfileLen,
- }[t-firstOpIndex]
-}
-
-func (t OpType) NumRefs() int {
- switch t {
- case TypeKeyInput, TypePointerInput, TypeProfile, TypeCall:
- return 1
- case TypeImage:
- return 2
- default:
- return 0
- }
-}
diff --git a/vendor/gioui.org/internal/ops/ops.go b/vendor/gioui.org/internal/ops/ops.go
index c56b9d6..fece6d6 100644
--- a/vendor/gioui.org/internal/ops/ops.go
+++ b/vendor/gioui.org/internal/ops/ops.go
@@ -4,57 +4,321 @@ package ops
import (
"encoding/binary"
+ "image"
"math"
"gioui.org/f32"
- "gioui.org/internal/opconst"
+ "gioui.org/internal/byteslice"
+ "gioui.org/internal/scene"
)
-const QuadSize = 4 * 2 * 3
+type Ops struct {
+ // version is incremented at each Reset.
+ version int
+ // data contains the serialized operations.
+ data []byte
+ // refs hold external references for operations.
+ refs []interface{}
+ // nextStateID is the id allocated for the next
+ // StateOp.
+ nextStateID int
-type Quad struct {
- From, Ctrl, To f32.Point
+ macroStack stack
+ stacks [5]stack
}
-func (q Quad) Transform(t f32.Affine2D) Quad {
- q.From = t.Transform(q.From)
- q.Ctrl = t.Transform(q.Ctrl)
- q.To = t.Transform(q.To)
- return q
+type OpType byte
+
+type Shape byte
+
+// Start at a high number for easier debugging.
+const firstOpIndex = 200
+
+const (
+ TypeMacro OpType = iota + firstOpIndex
+ TypeCall
+ TypeDefer
+ TypePushTransform
+ TypeTransform
+ TypePopTransform
+ TypeInvalidate
+ TypeImage
+ TypePaint
+ TypeColor
+ TypeLinearGradient
+ TypePass
+ TypePopPass
+ TypePointerInput
+ TypeClipboardRead
+ TypeClipboardWrite
+ TypeSource
+ TypeTarget
+ TypeOffer
+ TypeKeyInput
+ TypeKeyFocus
+ TypeKeySoftKeyboard
+ TypeSave
+ TypeLoad
+ TypeAux
+ TypeClip
+ TypePopClip
+ TypeProfile
+ TypeCursor
+ TypePath
+ TypeStroke
+ TypeSemanticLabel
+ TypeSemanticDesc
+ TypeSemanticClass
+ TypeSemanticSelected
+ TypeSemanticDisabled
+)
+
+type StackID struct {
+ id int
+ prev int
+}
+
+// StateOp represents a saved operation snapshop to be restored
+// later.
+type StateOp struct {
+ id int
+ macroID int
+ ops *Ops
+}
+
+// stack tracks the integer identities of stack operations to ensure correct
+// pairing of their push and pop methods.
+type stack struct {
+ currentID int
+ nextID int
+}
+
+type StackKind uint8
+
+// ClipOp is the shadow of clip.Op.
+type ClipOp struct {
+ Bounds image.Rectangle
+ Outline bool
+ Shape Shape
}
-func EncodeQuad(d []byte, q Quad) {
+const (
+ ClipStack StackKind = iota
+ TransStack
+ PassStack
+ MetaStack
+)
+
+const (
+ Path Shape = iota
+ Ellipse
+ Rect
+)
+
+const (
+ TypeMacroLen = 1 + 4 + 4
+ TypeCallLen = 1 + 4 + 4
+ TypeDeferLen = 1
+ TypePushTransformLen = 1 + 4*6
+ TypeTransformLen = 1 + 1 + 4*6
+ TypePopTransformLen = 1
+ TypeRedrawLen = 1 + 8
+ TypeImageLen = 1
+ TypePaintLen = 1
+ TypeColorLen = 1 + 4
+ TypeLinearGradientLen = 1 + 8*2 + 4*2
+ TypePassLen = 1
+ TypePopPassLen = 1
+ TypePointerInputLen = 1 + 1 + 1*2 + 2*4 + 2*4
+ TypeClipboardReadLen = 1
+ TypeClipboardWriteLen = 1
+ TypeSourceLen = 1
+ TypeTargetLen = 1
+ TypeOfferLen = 1
+ TypeKeyInputLen = 1 + 1
+ TypeKeyFocusLen = 1 + 1
+ TypeKeySoftKeyboardLen = 1 + 1
+ TypeSaveLen = 1 + 4
+ TypeLoadLen = 1 + 4
+ TypeAuxLen = 1
+ TypeClipLen = 1 + 4*4 + 1 + 1
+ TypePopClipLen = 1
+ TypeProfileLen = 1
+ TypeCursorLen = 1 + 1
+ TypePathLen = 8 + 1
+ TypeStrokeLen = 1 + 4
+ TypeSemanticLabelLen = 1
+ TypeSemanticDescLen = 1
+ TypeSemanticClassLen = 2
+ TypeSemanticSelectedLen = 2
+ TypeSemanticDisabledLen = 2
+)
+
+func (op *ClipOp) Decode(data []byte) {
+ if OpType(data[0]) != TypeClip {
+ panic("invalid op")
+ }
bo := binary.LittleEndian
- bo.PutUint32(d[0:], math.Float32bits(q.From.X))
- bo.PutUint32(d[4:], math.Float32bits(q.From.Y))
- bo.PutUint32(d[8:], math.Float32bits(q.Ctrl.X))
- bo.PutUint32(d[12:], math.Float32bits(q.Ctrl.Y))
- bo.PutUint32(d[16:], math.Float32bits(q.To.X))
- bo.PutUint32(d[20:], math.Float32bits(q.To.Y))
+ r := image.Rectangle{
+ Min: image.Point{
+ X: int(int32(bo.Uint32(data[1:]))),
+ Y: int(int32(bo.Uint32(data[5:]))),
+ },
+ Max: image.Point{
+ X: int(int32(bo.Uint32(data[9:]))),
+ Y: int(int32(bo.Uint32(data[13:]))),
+ },
+ }
+ *op = ClipOp{
+ Bounds: r,
+ Outline: data[17] == 1,
+ Shape: Shape(data[18]),
+ }
}
-func DecodeQuad(d []byte) (q Quad) {
+func Reset(o *Ops) {
+ o.macroStack = stack{}
+ for i := range o.stacks {
+ o.stacks[i] = stack{}
+ }
+ // Leave references to the GC.
+ for i := range o.refs {
+ o.refs[i] = nil
+ }
+ o.data = o.data[:0]
+ o.refs = o.refs[:0]
+ o.nextStateID = 0
+ o.version++
+}
+
+func Write(o *Ops, n int) []byte {
+ o.data = append(o.data, make([]byte, n)...)
+ return o.data[len(o.data)-n:]
+}
+
+func PushMacro(o *Ops) StackID {
+ return o.macroStack.push()
+}
+
+func PopMacro(o *Ops, id StackID) {
+ o.macroStack.pop(id)
+}
+
+func FillMacro(o *Ops, startPC PC) {
+ pc := PCFor(o)
+ // Fill out the macro definition reserved in Record.
+ data := o.data[startPC.data:]
+ data = data[:TypeMacroLen]
+ data[0] = byte(TypeMacro)
bo := binary.LittleEndian
- q.From.X = math.Float32frombits(bo.Uint32(d[0:]))
- q.From.Y = math.Float32frombits(bo.Uint32(d[4:]))
- q.Ctrl.X = math.Float32frombits(bo.Uint32(d[8:]))
- q.Ctrl.Y = math.Float32frombits(bo.Uint32(d[12:]))
- q.To.X = math.Float32frombits(bo.Uint32(d[16:]))
- q.To.Y = math.Float32frombits(bo.Uint32(d[20:]))
- return
+ bo.PutUint32(data[1:], uint32(pc.data))
+ bo.PutUint32(data[5:], uint32(pc.refs))
}
-func DecodeTransform(d []byte) (t f32.Affine2D) {
- if opconst.OpType(d[0]) != opconst.TypeTransform {
- panic("invalid op")
+func AddCall(o *Ops, callOps *Ops, pc PC) {
+ data := Write1(o, TypeCallLen, callOps)
+ data[0] = byte(TypeCall)
+ bo := binary.LittleEndian
+ bo.PutUint32(data[1:], uint32(pc.data))
+ bo.PutUint32(data[5:], uint32(pc.refs))
+}
+
+func PushOp(o *Ops, kind StackKind) (StackID, int) {
+ return o.stacks[kind].push(), o.macroStack.currentID
+}
+
+func PopOp(o *Ops, kind StackKind, sid StackID, macroID int) {
+ if o.macroStack.currentID != macroID {
+ panic("stack push and pop must not cross macro boundary")
}
- if len(d) < 1+6*4 {
- panic("too short buffer")
+ o.stacks[kind].pop(sid)
+}
+
+func Write1(o *Ops, n int, ref1 interface{}) []byte {
+ o.data = append(o.data, make([]byte, n)...)
+ o.refs = append(o.refs, ref1)
+ return o.data[len(o.data)-n:]
+}
+
+func Write2(o *Ops, n int, ref1, ref2 interface{}) []byte {
+ o.data = append(o.data, make([]byte, n)...)
+ o.refs = append(o.refs, ref1, ref2)
+ return o.data[len(o.data)-n:]
+}
+
+func Write3(o *Ops, n int, ref1, ref2, ref3 interface{}) []byte {
+ o.data = append(o.data, make([]byte, n)...)
+ o.refs = append(o.refs, ref1, ref2, ref3)
+ return o.data[len(o.data)-n:]
+}
+
+func PCFor(o *Ops) PC {
+ return PC{data: len(o.data), refs: len(o.refs)}
+}
+
+func (s *stack) push() StackID {
+ s.nextID++
+ sid := StackID{
+ id: s.nextID,
+ prev: s.currentID,
}
- return decodeAffine2D(d[1:])
+ s.currentID = s.nextID
+ return sid
+}
+
+func (s *stack) check(sid StackID) {
+ if s.currentID != sid.id {
+ panic("unbalanced operation")
+ }
+}
+
+func (s *stack) pop(sid StackID) {
+ s.check(sid)
+ s.currentID = sid.prev
+}
+
+// Save the effective transformation.
+func Save(o *Ops) StateOp {
+ o.nextStateID++
+ s := StateOp{
+ ops: o,
+ id: o.nextStateID,
+ macroID: o.macroStack.currentID,
+ }
+ bo := binary.LittleEndian
+ data := Write(o, TypeSaveLen)
+ data[0] = byte(TypeSave)
+ bo.PutUint32(data[1:], uint32(s.id))
+ return s
+}
+
+// Load a previously saved operations state given
+// its ID.
+func (s StateOp) Load() {
+ bo := binary.LittleEndian
+ data := Write(s.ops, TypeLoadLen)
+ data[0] = byte(TypeLoad)
+ bo.PutUint32(data[1:], uint32(s.id))
+}
+
+func DecodeCommand(d []byte) scene.Command {
+ var cmd scene.Command
+ copy(byteslice.Uint32(cmd[:]), d)
+ return cmd
+}
+
+func EncodeCommand(out []byte, cmd scene.Command) {
+ copy(out, byteslice.Uint32(cmd[:]))
}
-func decodeAffine2D(data []byte) f32.Affine2D {
+func DecodeTransform(data []byte) (t f32.Affine2D, push bool) {
+ if OpType(data[0]) != TypeTransform {
+ panic("invalid op")
+ }
+ push = data[1] != 0
+ data = data[2:]
+ data = data[:4*6]
+
bo := binary.LittleEndian
a := math.Float32frombits(bo.Uint32(data))
b := math.Float32frombits(bo.Uint32(data[4*1:]))
@@ -62,5 +326,148 @@ func decodeAffine2D(data []byte) f32.Affine2D {
d := math.Float32frombits(bo.Uint32(data[4*3:]))
e := math.Float32frombits(bo.Uint32(data[4*4:]))
f := math.Float32frombits(bo.Uint32(data[4*5:]))
- return f32.NewAffine2D(a, b, c, d, e, f)
+ return f32.NewAffine2D(a, b, c, d, e, f), push
+}
+
+// DecodeSave decodes the state id of a save op.
+func DecodeSave(data []byte) int {
+ if OpType(data[0]) != TypeSave {
+ panic("invalid op")
+ }
+ bo := binary.LittleEndian
+ return int(bo.Uint32(data[1:]))
+}
+
+// DecodeLoad decodes the state id of a load op.
+func DecodeLoad(data []byte) int {
+ if OpType(data[0]) != TypeLoad {
+ panic("invalid op")
+ }
+ bo := binary.LittleEndian
+ return int(bo.Uint32(data[1:]))
+}
+
+func (t OpType) Size() int {
+ return [...]int{
+ TypeMacroLen,
+ TypeCallLen,
+ TypeDeferLen,
+ TypePushTransformLen,
+ TypeTransformLen,
+ TypePopTransformLen,
+ TypeRedrawLen,
+ TypeImageLen,
+ TypePaintLen,
+ TypeColorLen,
+ TypeLinearGradientLen,
+ TypePassLen,
+ TypePopPassLen,
+ TypePointerInputLen,
+ TypeClipboardReadLen,
+ TypeClipboardWriteLen,
+ TypeSourceLen,
+ TypeTargetLen,
+ TypeOfferLen,
+ TypeKeyInputLen,
+ TypeKeyFocusLen,
+ TypeKeySoftKeyboardLen,
+ TypeSaveLen,
+ TypeLoadLen,
+ TypeAuxLen,
+ TypeClipLen,
+ TypePopClipLen,
+ TypeProfileLen,
+ TypeCursorLen,
+ TypePathLen,
+ TypeStrokeLen,
+ TypeSemanticLabelLen,
+ TypeSemanticDescLen,
+ TypeSemanticClassLen,
+ TypeSemanticSelectedLen,
+ TypeSemanticDisabledLen,
+ }[t-firstOpIndex]
+}
+
+func (t OpType) NumRefs() int {
+ switch t {
+ case TypeKeyInput, TypeKeyFocus, TypePointerInput, TypeProfile, TypeCall, TypeClipboardRead, TypeClipboardWrite, TypeCursor, TypeSemanticLabel, TypeSemanticDesc:
+ return 1
+ case TypeImage, TypeSource, TypeTarget:
+ return 2
+ case TypeOffer:
+ return 3
+ default:
+ return 0
+ }
+}
+
+func (t OpType) String() string {
+ switch t {
+ case TypeMacro:
+ return "Macro"
+ case TypeCall:
+ return "Call"
+ case TypeDefer:
+ return "Defer"
+ case TypePushTransform:
+ return "PushTransform"
+ case TypeTransform:
+ return "Transform"
+ case TypePopTransform:
+ return "PopTransform"
+ case TypeInvalidate:
+ return "Invalidate"
+ case TypeImage:
+ return "Image"
+ case TypePaint:
+ return "Paint"
+ case TypeColor:
+ return "Color"
+ case TypeLinearGradient:
+ return "LinearGradient"
+ case TypePass:
+ return "Pass"
+ case TypePopPass:
+ return "PopPass"
+ case TypePointerInput:
+ return "PointerInput"
+ case TypeClipboardRead:
+ return "ClipboardRead"
+ case TypeClipboardWrite:
+ return "ClipboardWrite"
+ case TypeSource:
+ return "Source"
+ case TypeTarget:
+ return "Target"
+ case TypeOffer:
+ return "Offer"
+ case TypeKeyInput:
+ return "KeyInput"
+ case TypeKeyFocus:
+ return "KeyFocus"
+ case TypeKeySoftKeyboard:
+ return "KeySoftKeyboard"
+ case TypeSave:
+ return "Save"
+ case TypeLoad:
+ return "Load"
+ case TypeAux:
+ return "Aux"
+ case TypeClip:
+ return "Clip"
+ case TypePopClip:
+ return "PopClip"
+ case TypeProfile:
+ return "Profile"
+ case TypeCursor:
+ return "Cursor"
+ case TypePath:
+ return "Path"
+ case TypeStroke:
+ return "Stroke"
+ case TypeSemanticLabel:
+ return "SemanticDescription"
+ default:
+ panic("unknown OpType")
+ }
}
diff --git a/vendor/gioui.org/internal/ops/reader.go b/vendor/gioui.org/internal/ops/reader.go
index 5d713db..99b8cb6 100644
--- a/vendor/gioui.org/internal/ops/reader.go
+++ b/vendor/gioui.org/internal/ops/reader.go
@@ -4,17 +4,15 @@ package ops
import (
"encoding/binary"
-
- "gioui.org/f32"
- "gioui.org/internal/opconst"
- "gioui.org/op"
)
// Reader parses an ops list.
type Reader struct {
- pc pc
- stack []macro
- ops *op.Ops
+ pc PC
+ stack []macro
+ ops *Ops
+ deferOps Ops
+ deferDone bool
}
// EncodedOp represents an encoded op returned by
@@ -27,53 +25,52 @@ type EncodedOp struct {
// Key is a unique key for a given op.
type Key struct {
- ops *op.Ops
- pc int
- version int
- sx, hx, sy, hy float32
+ ops *Ops
+ pc int
+ version int
}
// Shadow of op.MacroOp.
type macroOp struct {
- ops *op.Ops
- pc pc
+ ops *Ops
+ pc PC
}
-type pc struct {
+// PC is an instruction counter for an operation list.
+type PC struct {
data int
refs int
}
type macro struct {
- ops *op.Ops
- retPC pc
- endPC pc
+ ops *Ops
+ retPC PC
+ endPC PC
}
type opMacroDef struct {
- endpc pc
+ endpc PC
}
-// Reset start reading from the op list.
-func (r *Reader) Reset(ops *op.Ops) {
- r.stack = r.stack[:0]
- r.pc = pc{}
- r.ops = ops
+// Reset start reading from the beginning of ops.
+func (r *Reader) Reset(ops *Ops) {
+ r.ResetAt(ops, PC{})
}
-func (k Key) SetTransform(t f32.Affine2D) Key {
- sx, hx, _, hy, sy, _ := t.Elems()
- k.sx = sx
- k.hx = hx
- k.hy = hy
- k.sy = sy
- return k
+// ResetAt is like Reset, except it starts reading from pc.
+func (r *Reader) ResetAt(ops *Ops, pc PC) {
+ r.stack = r.stack[:0]
+ Reset(&r.deferOps)
+ r.deferDone = false
+ r.pc = pc
+ r.ops = ops
}
func (r *Reader) Decode() (EncodedOp, bool) {
if r.ops == nil {
return EncodedOp{}, false
}
+ deferring := false
for {
if len(r.stack) > 0 {
b := r.stack[len(r.stack)-1]
@@ -84,35 +81,59 @@ func (r *Reader) Decode() (EncodedOp, bool) {
continue
}
}
- data := r.ops.Data()
+ data := r.ops.data
data = data[r.pc.data:]
+ refs := r.ops.refs
if len(data) == 0 {
- return EncodedOp{}, false
+ if r.deferDone {
+ return EncodedOp{}, false
+ }
+ r.deferDone = true
+ // Execute deferred macros.
+ r.ops = &r.deferOps
+ r.pc = PC{}
+ continue
}
- key := Key{ops: r.ops, pc: r.pc.data, version: r.ops.Version()}
- t := opconst.OpType(data[0])
+ key := Key{ops: r.ops, pc: r.pc.data, version: r.ops.version}
+ t := OpType(data[0])
n := t.Size()
nrefs := t.NumRefs()
data = data[:n]
- refs := r.ops.Refs()
refs = refs[r.pc.refs:]
refs = refs[:nrefs]
switch t {
- case opconst.TypeAux:
+ case TypeDefer:
+ deferring = true
+ r.pc.data += n
+ r.pc.refs += nrefs
+ continue
+ case TypeAux:
// An Aux operations is always wrapped in a macro, and
// its length is the remaining space.
block := r.stack[len(r.stack)-1]
- n += block.endPC.data - r.pc.data - opconst.TypeAuxLen
+ n += block.endPC.data - r.pc.data - TypeAuxLen
data = data[:n]
- case opconst.TypeCall:
+ case TypeCall:
+ if deferring {
+ deferring = false
+ // Copy macro for deferred execution.
+ if t.NumRefs() != 1 {
+ panic("internal error: unexpected number of macro refs")
+ }
+ deferData := Write1(&r.deferOps, t.Size(), refs[0])
+ copy(deferData, data)
+ r.pc.data += n
+ r.pc.refs += nrefs
+ continue
+ }
var op macroOp
op.decode(data, refs)
- macroData := op.ops.Data()[op.pc.data:]
- if opconst.OpType(macroData[0]) != opconst.TypeMacro {
+ macroData := op.ops.data[op.pc.data:]
+ if OpType(macroData[0]) != TypeMacro {
panic("invalid macro reference")
}
var opDef opMacroDef
- opDef.decode(macroData[:opconst.TypeMacro.Size()])
+ opDef.decode(macroData[:TypeMacro.Size()])
retPC := r.pc
retPC.data += n
retPC.refs += nrefs
@@ -123,10 +144,10 @@ func (r *Reader) Decode() (EncodedOp, bool) {
})
r.ops = op.ops
r.pc = op.pc
- r.pc.data += opconst.TypeMacro.Size()
- r.pc.refs += opconst.TypeMacro.NumRefs()
+ r.pc.data += TypeMacro.Size()
+ r.pc.refs += TypeMacro.NumRefs()
continue
- case opconst.TypeMacro:
+ case TypeMacro:
var op opMacroDef
op.decode(data)
r.pc = op.endpc
@@ -139,14 +160,15 @@ func (r *Reader) Decode() (EncodedOp, bool) {
}
func (op *opMacroDef) decode(data []byte) {
- if opconst.OpType(data[0]) != opconst.TypeMacro {
+ if OpType(data[0]) != TypeMacro {
panic("invalid op")
}
bo := binary.LittleEndian
+ data = data[:9]
dataIdx := int(int32(bo.Uint32(data[1:])))
refsIdx := int(int32(bo.Uint32(data[5:])))
*op = opMacroDef{
- endpc: pc{
+ endpc: PC{
data: dataIdx,
refs: refsIdx,
},
@@ -154,15 +176,16 @@ func (op *opMacroDef) decode(data []byte) {
}
func (m *macroOp) decode(data []byte, refs []interface{}) {
- if opconst.OpType(data[0]) != opconst.TypeCall {
+ if OpType(data[0]) != TypeCall {
panic("invalid op")
}
+ data = data[:9]
bo := binary.LittleEndian
dataIdx := int(int32(bo.Uint32(data[1:])))
refsIdx := int(int32(bo.Uint32(data[5:])))
*m = macroOp{
- ops: refs[0].(*op.Ops),
- pc: pc{
+ ops: refs[0].(*Ops),
+ pc: PC{
data: dataIdx,
refs: refsIdx,
},
diff --git a/vendor/gioui.org/internal/scene/scene.go b/vendor/gioui.org/internal/scene/scene.go
new file mode 100644
index 0000000..0358858
--- /dev/null
+++ b/vendor/gioui.org/internal/scene/scene.go
@@ -0,0 +1,251 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// Package scene encodes and decodes graphics commands in the format used by the
+// compute renderer.
+package scene
+
+import (
+ "fmt"
+ "image"
+ "image/color"
+ "math"
+ "unsafe"
+
+ "gioui.org/f32"
+)
+
+type Op uint32
+
+type Command [sceneElemSize / 4]uint32
+
+// GPU commands from piet/scene.h in package gioui.org/shaders.
+const (
+ OpNop Op = iota
+ OpLine
+ OpQuad
+ OpCubic
+ OpFillColor
+ OpLineWidth
+ OpTransform
+ OpBeginClip
+ OpEndClip
+ OpFillImage
+ OpSetFillMode
+ OpGap
+)
+
+// FillModes, from setup.h.
+type FillMode uint32
+
+const (
+ FillModeNonzero = 0
+ FillModeStroke = 1
+)
+
+const CommandSize = int(unsafe.Sizeof(Command{}))
+
+const sceneElemSize = 36
+
+func (c Command) Op() Op {
+ return Op(c[0])
+}
+
+func (c Command) String() string {
+ switch Op(c[0]) {
+ case OpNop:
+ return "nop"
+ case OpLine:
+ from, to := DecodeLine(c)
+ return fmt.Sprintf("line(%v, %v)", from, to)
+ case OpGap:
+ from, to := DecodeLine(c)
+ return fmt.Sprintf("gap(%v, %v)", from, to)
+ case OpQuad:
+ from, ctrl, to := DecodeQuad(c)
+ return fmt.Sprintf("quad(%v, %v, %v)", from, ctrl, to)
+ case OpCubic:
+ from, ctrl0, ctrl1, to := DecodeCubic(c)
+ return fmt.Sprintf("cubic(%v, %v, %v, %v)", from, ctrl0, ctrl1, to)
+ case OpFillColor:
+ return fmt.Sprintf("fillcolor %#.8x", c[1])
+ case OpLineWidth:
+ return "linewidth"
+ case OpTransform:
+ t := f32.NewAffine2D(
+ math.Float32frombits(c[1]),
+ math.Float32frombits(c[3]),
+ math.Float32frombits(c[5]),
+ math.Float32frombits(c[2]),
+ math.Float32frombits(c[4]),
+ math.Float32frombits(c[6]),
+ )
+ return fmt.Sprintf("transform (%v)", t)
+ case OpBeginClip:
+ bounds := f32.Rectangle{
+ Min: f32.Pt(math.Float32frombits(c[1]), math.Float32frombits(c[2])),
+ Max: f32.Pt(math.Float32frombits(c[3]), math.Float32frombits(c[4])),
+ }
+ return fmt.Sprintf("beginclip (%v)", bounds)
+ case OpEndClip:
+ bounds := f32.Rectangle{
+ Min: f32.Pt(math.Float32frombits(c[1]), math.Float32frombits(c[2])),
+ Max: f32.Pt(math.Float32frombits(c[3]), math.Float32frombits(c[4])),
+ }
+ return fmt.Sprintf("endclip (%v)", bounds)
+ case OpFillImage:
+ return "fillimage"
+ case OpSetFillMode:
+ return "setfillmode"
+ default:
+ panic("unreachable")
+ }
+}
+
+func Line(start, end f32.Point) Command {
+ return Command{
+ 0: uint32(OpLine),
+ 1: math.Float32bits(start.X),
+ 2: math.Float32bits(start.Y),
+ 3: math.Float32bits(end.X),
+ 4: math.Float32bits(end.Y),
+ }
+}
+
+func Gap(start, end f32.Point) Command {
+ return Command{
+ 0: uint32(OpGap),
+ 1: math.Float32bits(start.X),
+ 2: math.Float32bits(start.Y),
+ 3: math.Float32bits(end.X),
+ 4: math.Float32bits(end.Y),
+ }
+}
+
+func Cubic(start, ctrl0, ctrl1, end f32.Point) Command {
+ return Command{
+ 0: uint32(OpCubic),
+ 1: math.Float32bits(start.X),
+ 2: math.Float32bits(start.Y),
+ 3: math.Float32bits(ctrl0.X),
+ 4: math.Float32bits(ctrl0.Y),
+ 5: math.Float32bits(ctrl1.X),
+ 6: math.Float32bits(ctrl1.Y),
+ 7: math.Float32bits(end.X),
+ 8: math.Float32bits(end.Y),
+ }
+}
+
+func Quad(start, ctrl, end f32.Point) Command {
+ return Command{
+ 0: uint32(OpQuad),
+ 1: math.Float32bits(start.X),
+ 2: math.Float32bits(start.Y),
+ 3: math.Float32bits(ctrl.X),
+ 4: math.Float32bits(ctrl.Y),
+ 5: math.Float32bits(end.X),
+ 6: math.Float32bits(end.Y),
+ }
+}
+
+func Transform(m f32.Affine2D) Command {
+ sx, hx, ox, hy, sy, oy := m.Elems()
+ return Command{
+ 0: uint32(OpTransform),
+ 1: math.Float32bits(sx),
+ 2: math.Float32bits(hy),
+ 3: math.Float32bits(hx),
+ 4: math.Float32bits(sy),
+ 5: math.Float32bits(ox),
+ 6: math.Float32bits(oy),
+ }
+}
+
+func SetLineWidth(width float32) Command {
+ return Command{
+ 0: uint32(OpLineWidth),
+ 1: math.Float32bits(width),
+ }
+}
+
+func BeginClip(bbox f32.Rectangle) Command {
+ return Command{
+ 0: uint32(OpBeginClip),
+ 1: math.Float32bits(bbox.Min.X),
+ 2: math.Float32bits(bbox.Min.Y),
+ 3: math.Float32bits(bbox.Max.X),
+ 4: math.Float32bits(bbox.Max.Y),
+ }
+}
+
+func EndClip(bbox f32.Rectangle) Command {
+ return Command{
+ 0: uint32(OpEndClip),
+ 1: math.Float32bits(bbox.Min.X),
+ 2: math.Float32bits(bbox.Min.Y),
+ 3: math.Float32bits(bbox.Max.X),
+ 4: math.Float32bits(bbox.Max.Y),
+ }
+}
+
+func FillColor(col color.RGBA) Command {
+ return Command{
+ 0: uint32(OpFillColor),
+ 1: uint32(col.R)<<24 | uint32(col.G)<<16 | uint32(col.B)<<8 | uint32(col.A),
+ }
+}
+
+func FillImage(index int, offset image.Point) Command {
+ x := int16(offset.X)
+ y := int16(offset.Y)
+ return Command{
+ 0: uint32(OpFillImage),
+ 1: uint32(index),
+ 2: uint32(uint16(x)) | uint32(uint16(y))<<16,
+ }
+}
+
+func SetFillMode(mode FillMode) Command {
+ return Command{
+ 0: uint32(OpSetFillMode),
+ 1: uint32(mode),
+ }
+}
+
+func DecodeLine(cmd Command) (from, to f32.Point) {
+ if cmd[0] != uint32(OpLine) {
+ panic("invalid command")
+ }
+ from = f32.Pt(math.Float32frombits(cmd[1]), math.Float32frombits(cmd[2]))
+ to = f32.Pt(math.Float32frombits(cmd[3]), math.Float32frombits(cmd[4]))
+ return
+}
+
+func DecodeGap(cmd Command) (from, to f32.Point) {
+ if cmd[0] != uint32(OpGap) {
+ panic("invalid command")
+ }
+ from = f32.Pt(math.Float32frombits(cmd[1]), math.Float32frombits(cmd[2]))
+ to = f32.Pt(math.Float32frombits(cmd[3]), math.Float32frombits(cmd[4]))
+ return
+}
+
+func DecodeQuad(cmd Command) (from, ctrl, to f32.Point) {
+ if cmd[0] != uint32(OpQuad) {
+ panic("invalid command")
+ }
+ from = f32.Pt(math.Float32frombits(cmd[1]), math.Float32frombits(cmd[2]))
+ ctrl = f32.Pt(math.Float32frombits(cmd[3]), math.Float32frombits(cmd[4]))
+ to = f32.Pt(math.Float32frombits(cmd[5]), math.Float32frombits(cmd[6]))
+ return
+}
+
+func DecodeCubic(cmd Command) (from, ctrl0, ctrl1, to f32.Point) {
+ if cmd[0] != uint32(OpCubic) {
+ panic("invalid command")
+ }
+ from = f32.Pt(math.Float32frombits(cmd[1]), math.Float32frombits(cmd[2]))
+ ctrl0 = f32.Pt(math.Float32frombits(cmd[3]), math.Float32frombits(cmd[4]))
+ ctrl1 = f32.Pt(math.Float32frombits(cmd[5]), math.Float32frombits(cmd[6]))
+ to = f32.Pt(math.Float32frombits(cmd[7]), math.Float32frombits(cmd[8]))
+ return
+}
diff --git a/vendor/gioui.org/internal/stroke/stroke.go b/vendor/gioui.org/internal/stroke/stroke.go
new file mode 100644
index 0000000..47db6ca
--- /dev/null
+++ b/vendor/gioui.org/internal/stroke/stroke.go
@@ -0,0 +1,742 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// Most of the algorithms to compute strokes and their offsets have been
+// extracted, adapted from (and used as a reference implementation):
+// - github.com/tdewolff/canvas (Licensed under MIT)
+//
+// These algorithms have been implemented from:
+// Fast, precise flattening of cubic Bézier path and offset curves
+// Thomas F. Hain, et al.
+//
+// An electronic version is available at:
+// https://seant23.files.wordpress.com/2010/11/fastpreciseflatteningofbeziercurve.pdf
+//
+// Possible improvements (in term of speed and/or accuracy) on these
+// algorithms are:
+//
+// - Polar Stroking: New Theory and Methods for Stroking Paths,
+// M. Kilgard
+// https://arxiv.org/pdf/2007.00308.pdf
+//
+// - https://raphlinus.github.io/graphics/curves/2019/12/23/flatten-quadbez.html
+// R. Levien
+
+// Package stroke implements conversion of strokes to filled outlines. It is used as a
+// fallback for stroke configurations not natively supported by the renderer.
+package stroke
+
+import (
+ "encoding/binary"
+ "math"
+
+ "gioui.org/f32"
+ "gioui.org/internal/ops"
+ "gioui.org/internal/scene"
+)
+
+// The following are copies of types from op/clip to avoid a circular import of
+// that package.
+// TODO: when the old renderer is gone, this package can be merged with
+// op/clip, eliminating the duplicate types.
+type StrokeStyle struct {
+ Width float32
+}
+
+// strokeTolerance is used to reconcile rounding errors arising
+// when splitting quads into smaller and smaller segments to approximate
+// them into straight lines, and when joining back segments.
+//
+// The magic value of 0.01 was found by striking a compromise between
+// aesthetic looking (curves did look like curves, even after linearization)
+// and speed.
+const strokeTolerance = 0.01
+
+type QuadSegment struct {
+ From, Ctrl, To f32.Point
+}
+
+type StrokeQuad struct {
+ Contour uint32
+ Quad QuadSegment
+}
+
+type strokeState struct {
+ p0, p1 f32.Point // p0 is the start point, p1 the end point.
+ n0, n1 f32.Point // n0 is the normal vector at the start point, n1 at the end point.
+ r0, r1 float32 // r0 is the curvature at the start point, r1 at the end point.
+ ctl f32.Point // ctl is the control point of the quadratic Bézier segment.
+}
+
+type StrokeQuads []StrokeQuad
+
+func (qs *StrokeQuads) setContour(n uint32) {
+ for i := range *qs {
+ (*qs)[i].Contour = n
+ }
+}
+
+func (qs *StrokeQuads) pen() f32.Point {
+ return (*qs)[len(*qs)-1].Quad.To
+}
+
+func (qs *StrokeQuads) lineTo(pt f32.Point) {
+ end := qs.pen()
+ *qs = append(*qs, StrokeQuad{
+ Quad: QuadSegment{
+ From: end,
+ Ctrl: end.Add(pt).Mul(0.5),
+ To: pt,
+ },
+ })
+}
+
+func (qs *StrokeQuads) arc(f1, f2 f32.Point, angle float32) {
+ const segments = 16
+ pen := qs.pen()
+ m := ArcTransform(pen, f1.Add(pen), f2.Add(pen), angle, segments)
+ for i := 0; i < segments; i++ {
+ p0 := qs.pen()
+ p1 := m.Transform(p0)
+ p2 := m.Transform(p1)
+ ctl := p1.Mul(2).Sub(p0.Add(p2).Mul(.5))
+ *qs = append(*qs, StrokeQuad{
+ Quad: QuadSegment{
+ From: p0, Ctrl: ctl, To: p2,
+ },
+ })
+ }
+}
+
+// split splits a slice of quads into slices of quads grouped
+// by contours (ie: splitted at move-to boundaries).
+func (qs StrokeQuads) split() []StrokeQuads {
+ if len(qs) == 0 {
+ return nil
+ }
+
+ var (
+ c uint32
+ o []StrokeQuads
+ i = len(o)
+ )
+ for _, q := range qs {
+ if q.Contour != c {
+ c = q.Contour
+ i = len(o)
+ o = append(o, StrokeQuads{})
+ }
+ o[i] = append(o[i], q)
+ }
+
+ return o
+}
+
+func (qs StrokeQuads) stroke(stroke StrokeStyle) StrokeQuads {
+ var (
+ o StrokeQuads
+ hw = 0.5 * stroke.Width
+ )
+
+ for _, ps := range qs.split() {
+ rhs, lhs := ps.offset(hw, stroke)
+ switch lhs {
+ case nil:
+ o = o.append(rhs)
+ default:
+ // Closed path.
+ // Inner path should go opposite direction to cancel outer path.
+ switch {
+ case ps.ccw():
+ lhs = lhs.reverse()
+ o = o.append(rhs)
+ o = o.append(lhs)
+ default:
+ rhs = rhs.reverse()
+ o = o.append(lhs)
+ o = o.append(rhs)
+ }
+ }
+ }
+
+ return o
+}
+
+// offset returns the right-hand and left-hand sides of the path, offset by
+// the half-width hw.
+// The stroke handles how segments are joined and ends are capped.
+func (qs StrokeQuads) offset(hw float32, stroke StrokeStyle) (rhs, lhs StrokeQuads) {
+ var (
+ states []strokeState
+ beg = qs[0].Quad.From
+ end = qs[len(qs)-1].Quad.To
+ closed = beg == end
+ )
+ for i := range qs {
+ q := qs[i].Quad
+
+ var (
+ n0 = strokePathNorm(q.From, q.Ctrl, q.To, 0, hw)
+ n1 = strokePathNorm(q.From, q.Ctrl, q.To, 1, hw)
+ r0 = strokePathCurv(q.From, q.Ctrl, q.To, 0)
+ r1 = strokePathCurv(q.From, q.Ctrl, q.To, 1)
+ )
+ states = append(states, strokeState{
+ p0: q.From,
+ p1: q.To,
+ n0: n0,
+ n1: n1,
+ r0: r0,
+ r1: r1,
+ ctl: q.Ctrl,
+ })
+ }
+
+ for i, state := range states {
+ rhs = rhs.append(strokeQuadBezier(state, +hw, strokeTolerance))
+ lhs = lhs.append(strokeQuadBezier(state, -hw, strokeTolerance))
+
+ // join the current and next segments
+ if hasNext := i+1 < len(states); hasNext || closed {
+ var next strokeState
+ switch {
+ case hasNext:
+ next = states[i+1]
+ case closed:
+ next = states[0]
+ }
+ if state.n1 != next.n0 {
+ strokePathJoin(stroke, &rhs, &lhs, hw, state.p1, state.n1, next.n0, state.r1, next.r0)
+ }
+ }
+ }
+
+ if closed {
+ rhs.close()
+ lhs.close()
+ return rhs, lhs
+ }
+
+ qbeg := &states[0]
+ qend := &states[len(states)-1]
+
+ // Default to counter-clockwise direction.
+ lhs = lhs.reverse()
+ strokePathCap(stroke, &rhs, hw, qend.p1, qend.n1)
+
+ rhs = rhs.append(lhs)
+ strokePathCap(stroke, &rhs, hw, qbeg.p0, qbeg.n0.Mul(-1))
+
+ rhs.close()
+
+ return rhs, nil
+}
+
+func (qs *StrokeQuads) close() {
+ p0 := (*qs)[len(*qs)-1].Quad.To
+ p1 := (*qs)[0].Quad.From
+
+ if p1 == p0 {
+ return
+ }
+
+ *qs = append(*qs, StrokeQuad{
+ Quad: QuadSegment{
+ From: p0,
+ Ctrl: p0.Add(p1).Mul(0.5),
+ To: p1,
+ },
+ })
+}
+
+// ccw returns whether the path is counter-clockwise.
+func (qs StrokeQuads) ccw() bool {
+ // Use the Shoelace formula:
+ // https://en.wikipedia.org/wiki/Shoelace_formula
+ var area float32
+ for _, ps := range qs.split() {
+ for i := 1; i < len(ps); i++ {
+ pi := ps[i].Quad.To
+ pj := ps[i-1].Quad.To
+ area += (pi.X - pj.X) * (pi.Y + pj.Y)
+ }
+ }
+ return area <= 0.0
+}
+
+func (qs StrokeQuads) reverse() StrokeQuads {
+ if len(qs) == 0 {
+ return nil
+ }
+
+ ps := make(StrokeQuads, 0, len(qs))
+ for i := range qs {
+ q := qs[len(qs)-1-i]
+ q.Quad.To, q.Quad.From = q.Quad.From, q.Quad.To
+ ps = append(ps, q)
+ }
+
+ return ps
+}
+
+func (qs StrokeQuads) append(ps StrokeQuads) StrokeQuads {
+ switch {
+ case len(ps) == 0:
+ return qs
+ case len(qs) == 0:
+ return ps
+ }
+
+ // Consolidate quads and smooth out rounding errors.
+ // We need to also check for the strokeTolerance to correctly handle
+ // join/cap points or on-purpose disjoint quads.
+ p0 := qs[len(qs)-1].Quad.To
+ p1 := ps[0].Quad.From
+ if p0 != p1 && lenPt(p0.Sub(p1)) < strokeTolerance {
+ qs = append(qs, StrokeQuad{
+ Quad: QuadSegment{
+ From: p0,
+ Ctrl: p0.Add(p1).Mul(0.5),
+ To: p1,
+ },
+ })
+ }
+ return append(qs, ps...)
+}
+
+func (q QuadSegment) Transform(t f32.Affine2D) QuadSegment {
+ q.From = t.Transform(q.From)
+ q.Ctrl = t.Transform(q.Ctrl)
+ q.To = t.Transform(q.To)
+ return q
+}
+
+// strokePathNorm returns the normal vector at t.
+func strokePathNorm(p0, p1, p2 f32.Point, t, d float32) f32.Point {
+ switch t {
+ case 0:
+ n := p1.Sub(p0)
+ if n.X == 0 && n.Y == 0 {
+ return f32.Point{}
+ }
+ n = rot90CW(n)
+ return normPt(n, d)
+ case 1:
+ n := p2.Sub(p1)
+ if n.X == 0 && n.Y == 0 {
+ return f32.Point{}
+ }
+ n = rot90CW(n)
+ return normPt(n, d)
+ }
+ panic("impossible")
+}
+
+func rot90CW(p f32.Point) f32.Point { return f32.Pt(+p.Y, -p.X) }
+func rot90CCW(p f32.Point) f32.Point { return f32.Pt(-p.Y, +p.X) }
+
+// cosPt returns the cosine of the opening angle between p and q.
+func cosPt(p, q f32.Point) float32 {
+ np := math.Hypot(float64(p.X), float64(p.Y))
+ nq := math.Hypot(float64(q.X), float64(q.Y))
+ return dotPt(p, q) / float32(np*nq)
+}
+
+func normPt(p f32.Point, l float32) f32.Point {
+ d := math.Hypot(float64(p.X), float64(p.Y))
+ l64 := float64(l)
+ if math.Abs(d-l64) < 1e-10 {
+ return f32.Point{}
+ }
+ n := float32(l64 / d)
+ return f32.Point{X: p.X * n, Y: p.Y * n}
+}
+
+func lenPt(p f32.Point) float32 {
+ return float32(math.Hypot(float64(p.X), float64(p.Y)))
+}
+
+func dotPt(p, q f32.Point) float32 {
+ return p.X*q.X + p.Y*q.Y
+}
+
+func perpDot(p, q f32.Point) float32 {
+ return p.X*q.Y - p.Y*q.X
+}
+
+// strokePathCurv returns the curvature at t, along the quadratic Bézier
+// curve defined by the triplet (beg, ctl, end).
+func strokePathCurv(beg, ctl, end f32.Point, t float32) float32 {
+ var (
+ d1p = quadBezierD1(beg, ctl, end, t)
+ d2p = quadBezierD2(beg, ctl, end, t)
+
+ // Negative when bending right, ie: the curve is CW at this point.
+ a = float64(perpDot(d1p, d2p))
+ )
+
+ // We check early that the segment isn't too line-like and
+ // save a costly call to math.Pow that will be discarded by dividing
+ // with a too small 'a'.
+ if math.Abs(a) < 1e-10 {
+ return float32(math.NaN())
+ }
+ return float32(math.Pow(float64(d1p.X*d1p.X+d1p.Y*d1p.Y), 1.5) / a)
+}
+
+// quadBezierSample returns the point on the Bézier curve at t.
+// B(t) = (1-t)^2 P0 + 2(1-t)t P1 + t^2 P2
+func quadBezierSample(p0, p1, p2 f32.Point, t float32) f32.Point {
+ t1 := 1 - t
+ c0 := t1 * t1
+ c1 := 2 * t1 * t
+ c2 := t * t
+
+ o := p0.Mul(c0)
+ o = o.Add(p1.Mul(c1))
+ o = o.Add(p2.Mul(c2))
+ return o
+}
+
+// quadBezierD1 returns the first derivative of the Bézier curve with respect to t.
+// B'(t) = 2(1-t)(P1 - P0) + 2t(P2 - P1)
+func quadBezierD1(p0, p1, p2 f32.Point, t float32) f32.Point {
+ p10 := p1.Sub(p0).Mul(2 * (1 - t))
+ p21 := p2.Sub(p1).Mul(2 * t)
+
+ return p10.Add(p21)
+}
+
+// quadBezierD2 returns the second derivative of the Bézier curve with respect to t:
+// B''(t) = 2(P2 - 2P1 + P0)
+func quadBezierD2(p0, p1, p2 f32.Point, t float32) f32.Point {
+ p := p2.Sub(p1.Mul(2)).Add(p0)
+ return p.Mul(2)
+}
+
+func strokeQuadBezier(state strokeState, d, flatness float32) StrokeQuads {
+ // Gio strokes are only quadratic Bézier curves, w/o any inflection point.
+ // So we just have to flatten them.
+ var qs StrokeQuads
+ return flattenQuadBezier(qs, state.p0, state.ctl, state.p1, d, flatness)
+}
+
+// flattenQuadBezier splits a Bézier quadratic curve into linear sub-segments,
+// themselves also encoded as Bézier (degenerate, flat) quadratic curves.
+func flattenQuadBezier(qs StrokeQuads, p0, p1, p2 f32.Point, d, flatness float32) StrokeQuads {
+ var (
+ t float32
+ flat64 = float64(flatness)
+ )
+ for t < 1 {
+ s2 := float64((p2.X-p0.X)*(p1.Y-p0.Y) - (p2.Y-p0.Y)*(p1.X-p0.X))
+ den := math.Hypot(float64(p1.X-p0.X), float64(p1.Y-p0.Y))
+ if s2*den == 0.0 {
+ break
+ }
+
+ s2 /= den
+ t = 2.0 * float32(math.Sqrt(flat64/3.0/math.Abs(s2)))
+ if t >= 1.0 {
+ break
+ }
+ var q0, q1, q2 f32.Point
+ q0, q1, q2, p0, p1, p2 = quadBezierSplit(p0, p1, p2, t)
+ qs.addLine(q0, q1, q2, 0, d)
+ }
+ qs.addLine(p0, p1, p2, 1, d)
+ return qs
+}
+
+func (qs *StrokeQuads) addLine(p0, ctrl, p1 f32.Point, t, d float32) {
+
+ switch i := len(*qs); i {
+ case 0:
+ p0 = p0.Add(strokePathNorm(p0, ctrl, p1, 0, d))
+ default:
+ // Address possible rounding errors and use previous point.
+ p0 = (*qs)[i-1].Quad.To
+ }
+
+ p1 = p1.Add(strokePathNorm(p0, ctrl, p1, 1, d))
+
+ *qs = append(*qs,
+ StrokeQuad{
+ Quad: QuadSegment{
+ From: p0,
+ Ctrl: p0.Add(p1).Mul(0.5),
+ To: p1,
+ },
+ },
+ )
+}
+
+// quadInterp returns the interpolated point at t.
+func quadInterp(p, q f32.Point, t float32) f32.Point {
+ return f32.Pt(
+ (1-t)*p.X+t*q.X,
+ (1-t)*p.Y+t*q.Y,
+ )
+}
+
+// quadBezierSplit returns the pair of triplets (from,ctrl,to) Bézier curve,
+// split before (resp. after) the provided parametric t value.
+func quadBezierSplit(p0, p1, p2 f32.Point, t float32) (f32.Point, f32.Point, f32.Point, f32.Point, f32.Point, f32.Point) {
+
+ var (
+ b0 = p0
+ b1 = quadInterp(p0, p1, t)
+ b2 = quadBezierSample(p0, p1, p2, t)
+
+ a0 = b2
+ a1 = quadInterp(p1, p2, t)
+ a2 = p2
+ )
+
+ return b0, b1, b2, a0, a1, a2
+}
+
+// strokePathJoin joins the two paths rhs and lhs, according to the provided
+// stroke operation.
+func strokePathJoin(stroke StrokeStyle, rhs, lhs *StrokeQuads, hw float32, pivot, n0, n1 f32.Point, r0, r1 float32) {
+ strokePathRoundJoin(rhs, lhs, hw, pivot, n0, n1, r0, r1)
+}
+
+func strokePathRoundJoin(rhs, lhs *StrokeQuads, hw float32, pivot, n0, n1 f32.Point, r0, r1 float32) {
+ rp := pivot.Add(n1)
+ lp := pivot.Sub(n1)
+ cw := dotPt(rot90CW(n0), n1) >= 0.0
+ switch {
+ case cw:
+ // Path bends to the right, ie. CW (or 180 degree turn).
+ c := pivot.Sub(lhs.pen())
+ angle := -math.Acos(float64(cosPt(n0, n1)))
+ lhs.arc(c, c, float32(angle))
+ lhs.lineTo(lp) // Add a line to accommodate for rounding errors.
+ rhs.lineTo(rp)
+ default:
+ // Path bends to the left, ie. CCW.
+ angle := math.Acos(float64(cosPt(n0, n1)))
+ c := pivot.Sub(rhs.pen())
+ rhs.arc(c, c, float32(angle))
+ rhs.lineTo(rp) // Add a line to accommodate for rounding errors.
+ lhs.lineTo(lp)
+ }
+}
+
+// strokePathCap caps the provided path qs, according to the provided stroke operation.
+func strokePathCap(stroke StrokeStyle, qs *StrokeQuads, hw float32, pivot, n0 f32.Point) {
+ strokePathRoundCap(qs, hw, pivot, n0)
+}
+
+// strokePathRoundCap caps the start or end of a path with a round cap.
+func strokePathRoundCap(qs *StrokeQuads, hw float32, pivot, n0 f32.Point) {
+ c := pivot.Sub(qs.pen())
+ qs.arc(c, c, math.Pi)
+}
+
+// ArcTransform computes a transformation that can be used for generating quadratic bézier
+// curve approximations for an arc.
+//
+// The math is extracted from the following paper:
+// "Drawing an elliptical arc using polylines, quadratic or
+// cubic Bezier curves", L. Maisonobe
+// An electronic version may be found at:
+// http://spaceroots.org/documents/ellipse/elliptical-arc.pdf
+func ArcTransform(p, f1, f2 f32.Point, angle float32, segments int) f32.Affine2D {
+ var rx, ry, alpha float64
+ if f1 == f2 {
+ // degenerate case of a circle.
+ rx = dist(f1, p)
+ ry = rx
+ } else {
+ // semi-major axis: 2a = |PF1| + |PF2|
+ a := 0.5 * (dist(f1, p) + dist(f2, p))
+ // semi-minor axis: c^2 = a^2 - b^2 (c: focal distance)
+ c := dist(f1, f2) * 0.5
+ b := math.Sqrt(a*a - c*c)
+ switch {
+ case a > b:
+ rx = a
+ ry = b
+ default:
+ rx = b
+ ry = a
+ }
+ if f1.X == f2.X {
+ // special case of a "vertical" ellipse.
+ alpha = math.Pi / 2
+ if f1.Y < f2.Y {
+ alpha = -alpha
+ }
+ } else {
+ x := float64(f1.X-f2.X) * 0.5
+ if x < 0 {
+ x = -x
+ }
+ alpha = math.Acos(x / c)
+ }
+ }
+
+ var (
+ θ = angle / float32(segments)
+ ref f32.Affine2D // transform from absolute frame to ellipse-based one
+ rot f32.Affine2D // rotation matrix for each segment
+ inv f32.Affine2D // transform from ellipse-based frame to absolute one
+ )
+ center := f32.Point{
+ X: 0.5 * (f1.X + f2.X),
+ Y: 0.5 * (f1.Y + f2.Y),
+ }
+ ref = ref.Offset(f32.Point{}.Sub(center))
+ ref = ref.Rotate(f32.Point{}, float32(-alpha))
+ ref = ref.Scale(f32.Point{}, f32.Point{
+ X: float32(1 / rx),
+ Y: float32(1 / ry),
+ })
+ inv = ref.Invert()
+ rot = rot.Rotate(f32.Point{}, 0.5*θ)
+
+ // Instead of invoking math.Sincos for every segment, compute a rotation
+ // matrix once and apply for each segment.
+ // Before applying the rotation matrix rot, transform the coordinates
+ // to a frame centered to the ellipse (and warped into a unit circle), then rotate.
+ // Finally, transform back into the original frame.
+ return inv.Mul(rot).Mul(ref)
+}
+
+func dist(p1, p2 f32.Point) float64 {
+ var (
+ x1 = float64(p1.X)
+ y1 = float64(p1.Y)
+ x2 = float64(p2.X)
+ y2 = float64(p2.Y)
+ dx = x2 - x1
+ dy = y2 - y1
+ )
+ return math.Hypot(dx, dy)
+}
+
+func StrokePathCommands(style StrokeStyle, scene []byte) StrokeQuads {
+ quads := decodeToStrokeQuads(scene)
+ return quads.stroke(style)
+}
+
+// decodeToStrokeQuads decodes scene commands to quads ready to stroke.
+func decodeToStrokeQuads(pathData []byte) StrokeQuads {
+ quads := make(StrokeQuads, 0, 2*len(pathData)/(scene.CommandSize+4))
+ for len(pathData) >= scene.CommandSize+4 {
+ contour := binary.LittleEndian.Uint32(pathData)
+ cmd := ops.DecodeCommand(pathData[4:])
+ switch cmd.Op() {
+ case scene.OpLine:
+ var q QuadSegment
+ q.From, q.To = scene.DecodeLine(cmd)
+ q.Ctrl = q.From.Add(q.To).Mul(.5)
+ quad := StrokeQuad{
+ Contour: contour,
+ Quad: q,
+ }
+ quads = append(quads, quad)
+ case scene.OpGap:
+ // Ignore gaps for strokes.
+ case scene.OpQuad:
+ var q QuadSegment
+ q.From, q.Ctrl, q.To = scene.DecodeQuad(cmd)
+ quad := StrokeQuad{
+ Contour: contour,
+ Quad: q,
+ }
+ quads = append(quads, quad)
+ case scene.OpCubic:
+ for _, q := range SplitCubic(scene.DecodeCubic(cmd)) {
+ quad := StrokeQuad{
+ Contour: contour,
+ Quad: q,
+ }
+ quads = append(quads, quad)
+ }
+ default:
+ panic("unsupported scene command")
+ }
+ pathData = pathData[scene.CommandSize+4:]
+ }
+ return quads
+}
+
+func SplitCubic(from, ctrl0, ctrl1, to f32.Point) []QuadSegment {
+ quads := make([]QuadSegment, 0, 10)
+ // Set the maximum distance proportionally to the longest side
+ // of the bounding rectangle.
+ hull := f32.Rectangle{
+ Min: from,
+ Max: ctrl0,
+ }.Canon().Union(f32.Rectangle{
+ Min: ctrl1,
+ Max: to,
+ }.Canon())
+ l := hull.Dx()
+ if h := hull.Dy(); h > l {
+ l = h
+ }
+ approxCubeTo(&quads, 0, l*0.001, from, ctrl0, ctrl1, to)
+ return quads
+}
+
+// approxCubeTo approximates a cubic Bézier by a series of quadratic
+// curves.
+func approxCubeTo(quads *[]QuadSegment, splits int, maxDist float32, from, ctrl0, ctrl1, to f32.Point) int {
+ // The idea is from
+ // https://caffeineowl.com/graphics/2d/vectorial/cubic2quad01.html
+ // where a quadratic approximates a cubic by eliminating its t³ term
+ // from its polynomial expression anchored at the starting point:
+ //
+ // P(t) = pen + 3t(ctrl0 - pen) + 3t²(ctrl1 - 2ctrl0 + pen) + t³(to - 3ctrl1 + 3ctrl0 - pen)
+ //
+ // The control point for the new quadratic Q1 that shares starting point, pen, with P is
+ //
+ // C1 = (3ctrl0 - pen)/2
+ //
+ // The reverse cubic anchored at the end point has the polynomial
+ //
+ // P'(t) = to + 3t(ctrl1 - to) + 3t²(ctrl0 - 2ctrl1 + to) + t³(pen - 3ctrl0 + 3ctrl1 - to)
+ //
+ // The corresponding quadratic Q2 that shares the end point, to, with P has control
+ // point
+ //
+ // C2 = (3ctrl1 - to)/2
+ //
+ // The combined quadratic Bézier, Q, shares both start and end points with its cubic
+ // and use the midpoint between the two curves Q1 and Q2 as control point:
+ //
+ // C = (3ctrl0 - pen + 3ctrl1 - to)/4
+ c := ctrl0.Mul(3).Sub(from).Add(ctrl1.Mul(3)).Sub(to).Mul(1.0 / 4.0)
+ const maxSplits = 32
+ if splits >= maxSplits {
+ *quads = append(*quads, QuadSegment{From: from, Ctrl: c, To: to})
+ return splits
+ }
+ // The maximum distance between the cubic P and its approximation Q given t
+ // can be shown to be
+ //
+ // d = sqrt(3)/36*|to - 3ctrl1 + 3ctrl0 - pen|
+ //
+ // To save a square root, compare d² with the squared tolerance.
+ v := to.Sub(ctrl1.Mul(3)).Add(ctrl0.Mul(3)).Sub(from)
+ d2 := (v.X*v.X + v.Y*v.Y) * 3 / (36 * 36)
+ if d2 <= maxDist*maxDist {
+ *quads = append(*quads, QuadSegment{From: from, Ctrl: c, To: to})
+ return splits
+ }
+ // De Casteljau split the curve and approximate the halves.
+ t := float32(0.5)
+ c0 := from.Add(ctrl0.Sub(from).Mul(t))
+ c1 := ctrl0.Add(ctrl1.Sub(ctrl0).Mul(t))
+ c2 := ctrl1.Add(to.Sub(ctrl1).Mul(t))
+ c01 := c0.Add(c1.Sub(c0).Mul(t))
+ c12 := c1.Add(c2.Sub(c1).Mul(t))
+ c0112 := c01.Add(c12.Sub(c01).Mul(t))
+ splits++
+ splits = approxCubeTo(quads, splits, maxDist, from, c0, c01, c0112)
+ splits = approxCubeTo(quads, splits, maxDist, c0112, c12, c2, to)
+ return splits
+}
diff --git a/vendor/gioui.org/internal/unsafe/unsafe.go b/vendor/gioui.org/internal/unsafe/unsafe.go
deleted file mode 100644
index 5353144..0000000
--- a/vendor/gioui.org/internal/unsafe/unsafe.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// SPDX-License-Identifier: Unlicense OR MIT
-
-package unsafe
-
-import (
- "reflect"
- "unsafe"
-)
-
-// BytesView returns a byte slice view of a slice.
-func BytesView(s interface{}) []byte {
- v := reflect.ValueOf(s)
- first := v.Index(0)
- sz := int(first.Type().Size())
- return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
- Data: uintptr(unsafe.Pointer((*reflect.SliceHeader)(unsafe.Pointer(first.UnsafeAddr())))),
- Len: v.Len() * sz,
- Cap: v.Cap() * sz,
- }))
-}
-
-// SliceOf returns a slice from a (native) pointer.
-func SliceOf(s uintptr) []byte {
- if s == 0 {
- return nil
- }
- sh := reflect.SliceHeader{
- Data: s,
- Len: 1 << 30,
- Cap: 1 << 30,
- }
- return *(*[]byte)(unsafe.Pointer(&sh))
-}
-
-// GoString convert a NUL-terminated C string
-// to a Go string.
-func GoString(s []byte) string {
- i := 0
- for {
- if s[i] == 0 {
- break
- }
- i++
- }
- return string(s[:i])
-}
diff --git a/vendor/gioui.org/internal/vk/vulkan.go b/vendor/gioui.org/internal/vk/vulkan.go
new file mode 100644
index 0000000..f210d40
--- /dev/null
+++ b/vendor/gioui.org/internal/vk/vulkan.go
@@ -0,0 +1,2081 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build linux || freebsd
+// +build linux freebsd
+
+package vk
+
+/*
+#cgo linux freebsd LDFLAGS: -ldl
+#cgo freebsd CFLAGS: -I/usr/local/include
+#cgo CFLAGS: -Werror -Werror=return-type
+
+#define VK_NO_PROTOTYPES 1
+#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#include <vulkan/vulkan.h>
+#define __USE_GNU
+#include <dlfcn.h>
+#include <stdlib.h>
+
+static VkResult vkCreateInstance(PFN_vkCreateInstance f, VkInstanceCreateInfo pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) {
+ return f(&pCreateInfo, pAllocator, pInstance);
+}
+
+static void vkDestroyInstance(PFN_vkDestroyInstance f, VkInstance instance, const VkAllocationCallbacks *pAllocator) {
+ f(instance, pAllocator);
+}
+
+static VkResult vkEnumeratePhysicalDevices(PFN_vkEnumeratePhysicalDevices f, VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) {
+ return f(instance, pPhysicalDeviceCount, pPhysicalDevices);
+}
+
+static void vkGetPhysicalDeviceQueueFamilyProperties(PFN_vkGetPhysicalDeviceQueueFamilyProperties f, VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties) {
+ f(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
+}
+
+static void vkGetPhysicalDeviceFormatProperties(PFN_vkGetPhysicalDeviceFormatProperties f, VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatProperties) {
+ f(physicalDevice, format, pFormatProperties);
+}
+
+static VkResult vkCreateDevice(PFN_vkCreateDevice f, VkPhysicalDevice physicalDevice, VkDeviceCreateInfo pCreateInfo, VkDeviceQueueCreateInfo qinf, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) {
+ pCreateInfo.pQueueCreateInfos = &qinf;
+ return f(physicalDevice, &pCreateInfo, pAllocator, pDevice);
+}
+
+static void vkDestroyDevice(PFN_vkDestroyDevice f, VkDevice device, const VkAllocationCallbacks *pAllocator) {
+ f(device, pAllocator);
+}
+
+static void vkGetDeviceQueue(PFN_vkGetDeviceQueue f, VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) {
+ f(device, queueFamilyIndex, queueIndex, pQueue);
+}
+
+static VkResult vkCreateImageView(PFN_vkCreateImageView f, VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView) {
+ return f(device, pCreateInfo, pAllocator, pView);
+}
+
+static void vkDestroyImageView(PFN_vkDestroyImageView f, VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator) {
+ f(device, imageView, pAllocator);
+}
+
+static VkResult vkCreateFramebuffer(PFN_vkCreateFramebuffer f, VkDevice device, VkFramebufferCreateInfo pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer) {
+ return f(device, &pCreateInfo, pAllocator, pFramebuffer);
+}
+
+static void vkDestroyFramebuffer(PFN_vkDestroyFramebuffer f, VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator) {
+ f(device, framebuffer, pAllocator);
+}
+
+static VkResult vkDeviceWaitIdle(PFN_vkDeviceWaitIdle f, VkDevice device) {
+ return f(device);
+}
+
+static VkResult vkQueueWaitIdle(PFN_vkQueueWaitIdle f, VkQueue queue) {
+ return f(queue);
+}
+
+static VkResult vkCreateSemaphore(PFN_vkCreateSemaphore f, VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore) {
+ return f(device, pCreateInfo, pAllocator, pSemaphore);
+}
+
+static void vkDestroySemaphore(PFN_vkDestroySemaphore f, VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator) {
+ f(device, semaphore, pAllocator);
+}
+
+static VkResult vkCreateRenderPass(PFN_vkCreateRenderPass f, VkDevice device, VkRenderPassCreateInfo pCreateInfo, VkSubpassDescription subpassInf, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) {
+ pCreateInfo.pSubpasses = &subpassInf;
+ return f(device, &pCreateInfo, pAllocator, pRenderPass);
+}
+
+static void vkDestroyRenderPass(PFN_vkDestroyRenderPass f, VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) {
+ f(device, renderPass, pAllocator);
+}
+
+static VkResult vkCreateCommandPool(PFN_vkCreateCommandPool f, VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool) {
+ return f(device, pCreateInfo, pAllocator, pCommandPool);
+}
+
+static void vkDestroyCommandPool(PFN_vkDestroyCommandPool f, VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) {
+ f(device, commandPool, pAllocator);
+}
+
+static VkResult vkAllocateCommandBuffers(PFN_vkAllocateCommandBuffers f, VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) {
+ return f(device, pAllocateInfo, pCommandBuffers);
+}
+
+static void vkFreeCommandBuffers(PFN_vkFreeCommandBuffers f, VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) {
+ f(device, commandPool, commandBufferCount, pCommandBuffers);
+}
+
+static VkResult vkBeginCommandBuffer(PFN_vkBeginCommandBuffer f, VkCommandBuffer commandBuffer, VkCommandBufferBeginInfo pBeginInfo) {
+ return f(commandBuffer, &pBeginInfo);
+}
+
+static VkResult vkEndCommandBuffer(PFN_vkEndCommandBuffer f, VkCommandBuffer commandBuffer) {
+ return f(commandBuffer);
+}
+
+static VkResult vkQueueSubmit(PFN_vkQueueSubmit f, VkQueue queue, VkSubmitInfo pSubmits, VkFence fence) {
+ return f(queue, 1, &pSubmits, fence);
+}
+
+static void vkCmdBeginRenderPass(PFN_vkCmdBeginRenderPass f, VkCommandBuffer commandBuffer, VkRenderPassBeginInfo pRenderPassBegin, VkSubpassContents contents) {
+ f(commandBuffer, &pRenderPassBegin, contents);
+}
+
+static void vkCmdEndRenderPass(PFN_vkCmdEndRenderPass f, VkCommandBuffer commandBuffer) {
+ f(commandBuffer);
+}
+
+static void vkCmdCopyBuffer(PFN_vkCmdCopyBuffer f, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions) {
+ f(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions);
+}
+
+static void vkCmdCopyBufferToImage(PFN_vkCmdCopyBufferToImage f, VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions) {
+ f(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions);
+}
+
+static void vkCmdPipelineBarrier(PFN_vkCmdPipelineBarrier f, VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers) {
+ f(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
+}
+
+static void vkCmdPushConstants(PFN_vkCmdPushConstants f, VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues) {
+ f(commandBuffer, layout, stageFlags, offset, size, pValues);
+}
+
+static void vkCmdBindPipeline(PFN_vkCmdBindPipeline f, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) {
+ f(commandBuffer, pipelineBindPoint, pipeline);
+}
+
+static void vkCmdBindVertexBuffers(PFN_vkCmdBindVertexBuffers f, VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets) {
+ f(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets);
+}
+
+static void vkCmdSetViewport(PFN_vkCmdSetViewport f, VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports) {
+ f(commandBuffer, firstViewport, viewportCount, pViewports);
+}
+
+static void vkCmdBindIndexBuffer(PFN_vkCmdBindIndexBuffer f, VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) {
+ f(commandBuffer, buffer, offset, indexType);
+}
+
+static void vkCmdDraw(PFN_vkCmdDraw f, VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) {
+ f(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance);
+}
+
+static void vkCmdDrawIndexed(PFN_vkCmdDrawIndexed f, VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) {
+ f(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
+}
+
+static void vkCmdBindDescriptorSets(PFN_vkCmdBindDescriptorSets f, VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets) {
+ f(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
+}
+
+static void vkCmdCopyImageToBuffer(PFN_vkCmdCopyImageToBuffer f, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions) {
+ f(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions);
+}
+
+static void vkCmdDispatch(PFN_vkCmdDispatch f, VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) {
+ f(commandBuffer, groupCountX, groupCountY, groupCountZ);
+}
+
+static VkResult vkCreateImage(PFN_vkCreateImage f, VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage) {
+ return f(device, pCreateInfo, pAllocator, pImage);
+}
+
+static void vkDestroyImage(PFN_vkDestroyImage f, VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator) {
+ f(device, image, pAllocator);
+}
+
+static void vkGetImageMemoryRequirements(PFN_vkGetImageMemoryRequirements f, VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements) {
+ f(device, image, pMemoryRequirements);
+}
+
+static VkResult vkAllocateMemory(PFN_vkAllocateMemory f, VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory) {
+ return f(device, pAllocateInfo, pAllocator, pMemory);
+}
+
+static VkResult vkBindImageMemory(PFN_vkBindImageMemory f, VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) {
+ return f(device, image, memory, memoryOffset);
+}
+
+static void vkFreeMemory(PFN_vkFreeMemory f, VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator) {
+ f(device, memory, pAllocator);
+}
+
+static void vkGetPhysicalDeviceMemoryProperties(PFN_vkGetPhysicalDeviceMemoryProperties f, VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties) {
+ f(physicalDevice, pMemoryProperties);
+}
+
+static VkResult vkCreateSampler(PFN_vkCreateSampler f,VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler) {
+ return f(device, pCreateInfo, pAllocator, pSampler);
+}
+
+static void vkDestroySampler(PFN_vkDestroySampler f, VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator) {
+ f(device, sampler, pAllocator);
+}
+
+static VkResult vkCreateBuffer(PFN_vkCreateBuffer f, VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer) {
+ return f(device, pCreateInfo, pAllocator, pBuffer);
+}
+
+static void vkDestroyBuffer(PFN_vkDestroyBuffer f, VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator) {
+ f(device, buffer, pAllocator);
+}
+
+static void vkGetBufferMemoryRequirements(PFN_vkGetBufferMemoryRequirements f, VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements) {
+ f(device, buffer, pMemoryRequirements);
+}
+
+static VkResult vkBindBufferMemory(PFN_vkBindBufferMemory f, VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset) {
+ return f(device, buffer, memory, memoryOffset);
+}
+
+static VkResult vkCreateShaderModule(PFN_vkCreateShaderModule f, VkDevice device, VkShaderModuleCreateInfo pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule) {
+ return f(device, &pCreateInfo, pAllocator, pShaderModule);
+}
+
+static void vkDestroyShaderModule(PFN_vkDestroyShaderModule f, VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator) {
+ f(device, shaderModule, pAllocator);
+}
+
+static VkResult vkCreateGraphicsPipelines(PFN_vkCreateGraphicsPipelines f, VkDevice device, VkPipelineCache pipelineCache, VkGraphicsPipelineCreateInfo pCreateInfo, VkPipelineDynamicStateCreateInfo dynInf, VkPipelineColorBlendStateCreateInfo blendInf, VkPipelineVertexInputStateCreateInfo vertexInf, VkPipelineViewportStateCreateInfo viewportInf, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) {
+ pCreateInfo.pDynamicState = &dynInf;
+ pCreateInfo.pViewportState = &viewportInf;
+ pCreateInfo.pColorBlendState = &blendInf;
+ pCreateInfo.pVertexInputState = &vertexInf;
+ return f(device, pipelineCache, 1, &pCreateInfo, pAllocator, pPipelines);
+}
+
+static void vkDestroyPipeline(PFN_vkDestroyPipeline f, VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator) {
+ f(device, pipeline, pAllocator);
+}
+
+static VkResult vkCreatePipelineLayout(PFN_vkCreatePipelineLayout f, VkDevice device, VkPipelineLayoutCreateInfo pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout) {
+ return f(device, &pCreateInfo, pAllocator, pPipelineLayout);
+}
+
+static void vkDestroyPipelineLayout(PFN_vkDestroyPipelineLayout f, VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks *pAllocator) {
+ f(device, pipelineLayout, pAllocator);
+}
+
+static VkResult vkCreateDescriptorSetLayout(PFN_vkCreateDescriptorSetLayout f, VkDevice device, VkDescriptorSetLayoutCreateInfo pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout) {
+ return f(device, &pCreateInfo, pAllocator, pSetLayout);
+}
+
+static void vkDestroyDescriptorSetLayout(PFN_vkDestroyDescriptorSetLayout f, VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator) {
+ f(device, descriptorSetLayout, pAllocator);
+}
+
+static VkResult vkMapMemory(PFN_vkMapMemory f, VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData) {
+ return f(device, memory, offset, size, flags, ppData);
+}
+
+static void vkUnmapMemory(PFN_vkUnmapMemory f, VkDevice device, VkDeviceMemory memory) {
+ f(device, memory);
+}
+
+static VkResult vkResetCommandBuffer(PFN_vkResetCommandBuffer f, VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) {
+ return f(commandBuffer, flags);
+}
+
+static VkResult vkCreateDescriptorPool(PFN_vkCreateDescriptorPool f, VkDevice device, VkDescriptorPoolCreateInfo pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool) {
+ return f(device, &pCreateInfo, pAllocator, pDescriptorPool);
+}
+
+static void vkDestroyDescriptorPool(PFN_vkDestroyDescriptorPool f, VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator) {
+ f(device, descriptorPool, pAllocator);
+}
+
+static VkResult vkAllocateDescriptorSets(PFN_vkAllocateDescriptorSets f, VkDevice device, VkDescriptorSetAllocateInfo pAllocateInfo, VkDescriptorSet *pDescriptorSets) {
+ return f(device, &pAllocateInfo, pDescriptorSets);
+}
+
+static VkResult vkFreeDescriptorSets(PFN_vkFreeDescriptorSets f, VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets) {
+ return f(device, descriptorPool, descriptorSetCount, pDescriptorSets);
+}
+
+static void vkUpdateDescriptorSets(PFN_vkUpdateDescriptorSets f, VkDevice device, VkWriteDescriptorSet pDescriptorWrite, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies) {
+ f(device, 1, &pDescriptorWrite, descriptorCopyCount, pDescriptorCopies);
+}
+
+static VkResult vkResetDescriptorPool(PFN_vkResetDescriptorPool f, VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) {
+ return f(device, descriptorPool, flags);
+}
+
+static void vkCmdCopyImage(PFN_vkCmdCopyImage f, VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy *pRegions) {
+ f(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
+}
+
+static VkResult vkCreateComputePipelines(PFN_vkCreateComputePipelines f, VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) {
+ return f(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
+}
+
+static VkResult vkCreateFence(PFN_vkCreateFence f, VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence) {
+ return f(device, pCreateInfo, pAllocator, pFence);
+}
+
+static void vkDestroyFence(PFN_vkDestroyFence f, VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator) {
+ f(device, fence, pAllocator);
+}
+
+static VkResult vkWaitForFences(PFN_vkWaitForFences f, VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout) {
+ return f(device, fenceCount, pFences, waitAll, timeout);
+}
+
+static VkResult vkResetFences(PFN_vkResetFences f, VkDevice device, uint32_t fenceCount, const VkFence *pFences) {
+ return f(device, fenceCount, pFences);
+}
+
+static void vkGetPhysicalDeviceProperties(PFN_vkGetPhysicalDeviceProperties f, VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties) {
+ f(physicalDevice, pProperties);
+}
+
+static VkResult vkGetPhysicalDeviceSurfaceSupportKHR(PFN_vkGetPhysicalDeviceSurfaceSupportKHR f, VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported) {
+ return f(physicalDevice, queueFamilyIndex, surface, pSupported);
+}
+
+static void vkDestroySurfaceKHR(PFN_vkDestroySurfaceKHR f, VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) {
+ f(instance, surface, pAllocator);
+}
+
+static VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(PFN_vkGetPhysicalDeviceSurfaceFormatsKHR f, VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) {
+ return f(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats);
+}
+
+static VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(PFN_vkGetPhysicalDeviceSurfacePresentModesKHR f, VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes) {
+ return f(physicalDevice, surface, pPresentModeCount, pPresentModes);
+}
+
+static VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR f, VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) {
+ return f(physicalDevice, surface, pSurfaceCapabilities);
+}
+
+static VkResult vkCreateSwapchainKHR(PFN_vkCreateSwapchainKHR f, VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) {
+ return f(device, pCreateInfo, pAllocator, pSwapchain);
+}
+
+static void vkDestroySwapchainKHR(PFN_vkDestroySwapchainKHR f, VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) {
+ f(device, swapchain, pAllocator);
+}
+
+static VkResult vkGetSwapchainImagesKHR(PFN_vkGetSwapchainImagesKHR f, VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) {
+ return f(device, swapchain, pSwapchainImageCount, pSwapchainImages);
+}
+
+// indexAndResult holds both an integer and a result returned by value, to
+// avoid Go heap allocation of the integer with Vulkan's return style.
+struct intAndResult {
+ uint32_t uint;
+ VkResult res;
+};
+
+static struct intAndResult vkAcquireNextImageKHR(PFN_vkAcquireNextImageKHR f, VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence) {
+ struct intAndResult res;
+ res.res = f(device, swapchain, timeout, semaphore, fence, &res.uint);
+ return res;
+}
+
+static VkResult vkQueuePresentKHR(PFN_vkQueuePresentKHR f, VkQueue queue, const VkPresentInfoKHR pPresentInfo) {
+ return f(queue, &pPresentInfo);
+}
+*/
+import "C"
+import (
+ "errors"
+ "fmt"
+ "image"
+ "math"
+ "reflect"
+ "runtime"
+ "sync"
+ "unsafe"
+)
+
+type (
+ AttachmentLoadOp = C.VkAttachmentLoadOp
+ AccessFlags = C.VkAccessFlags
+ BlendFactor = C.VkBlendFactor
+ Buffer = C.VkBuffer
+ BufferImageCopy = C.VkBufferImageCopy
+ BufferMemoryBarrier = C.VkBufferMemoryBarrier
+ BufferUsageFlags = C.VkBufferUsageFlags
+ CommandPool = C.VkCommandPool
+ CommandBuffer = C.VkCommandBuffer
+ DependencyFlags = C.VkDependencyFlags
+ DescriptorPool = C.VkDescriptorPool
+ DescriptorPoolSize = C.VkDescriptorPoolSize
+ DescriptorSet = C.VkDescriptorSet
+ DescriptorSetLayout = C.VkDescriptorSetLayout
+ DescriptorType = C.VkDescriptorType
+ Device = C.VkDevice
+ DeviceMemory = C.VkDeviceMemory
+ DeviceSize = C.VkDeviceSize
+ Fence = C.VkFence
+ Queue = C.VkQueue
+ IndexType = C.VkIndexType
+ Image = C.VkImage
+ ImageCopy = C.VkImageCopy
+ ImageLayout = C.VkImageLayout
+ ImageMemoryBarrier = C.VkImageMemoryBarrier
+ ImageUsageFlags = C.VkImageUsageFlags
+ ImageView = C.VkImageView
+ Instance = C.VkInstance
+ Filter = C.VkFilter
+ Format = C.VkFormat
+ FormatFeatureFlags = C.VkFormatFeatureFlags
+ Framebuffer = C.VkFramebuffer
+ MemoryBarrier = C.VkMemoryBarrier
+ MemoryPropertyFlags = C.VkMemoryPropertyFlags
+ Pipeline = C.VkPipeline
+ PipelineBindPoint = C.VkPipelineBindPoint
+ PipelineLayout = C.VkPipelineLayout
+ PipelineStageFlags = C.VkPipelineStageFlags
+ PhysicalDevice = C.VkPhysicalDevice
+ PrimitiveTopology = C.VkPrimitiveTopology
+ PushConstantRange = C.VkPushConstantRange
+ QueueFamilyProperties = C.VkQueueFamilyProperties
+ QueueFlags = C.VkQueueFlags
+ RenderPass = C.VkRenderPass
+ Sampler = C.VkSampler
+ SamplerMipmapMode = C.VkSamplerMipmapMode
+ Semaphore = C.VkSemaphore
+ ShaderModule = C.VkShaderModule
+ ShaderStageFlags = C.VkShaderStageFlags
+ SubpassDependency = C.VkSubpassDependency
+ Viewport = C.VkViewport
+ WriteDescriptorSet = C.VkWriteDescriptorSet
+
+ Surface = C.VkSurfaceKHR
+ SurfaceCapabilities = C.VkSurfaceCapabilitiesKHR
+
+ Swapchain = C.VkSwapchainKHR
+)
+
+type VertexInputBindingDescription struct {
+ Binding int
+ Stride int
+}
+
+type VertexInputAttributeDescription struct {
+ Location int
+ Binding int
+ Format Format
+ Offset int
+}
+
+type DescriptorSetLayoutBinding struct {
+ Binding int
+ DescriptorType DescriptorType
+ StageFlags ShaderStageFlags
+}
+
+type Error C.VkResult
+
+const (
+ FORMAT_R8G8B8A8_UNORM Format = C.VK_FORMAT_R8G8B8A8_UNORM
+ FORMAT_B8G8R8A8_SRGB Format = C.VK_FORMAT_B8G8R8A8_SRGB
+ FORMAT_R8G8B8A8_SRGB Format = C.VK_FORMAT_R8G8B8A8_SRGB
+ FORMAT_R16_SFLOAT Format = C.VK_FORMAT_R16_SFLOAT
+ FORMAT_R32_SFLOAT Format = C.VK_FORMAT_R32_SFLOAT
+ FORMAT_R32G32_SFLOAT Format = C.VK_FORMAT_R32G32_SFLOAT
+ FORMAT_R32G32B32_SFLOAT Format = C.VK_FORMAT_R32G32B32_SFLOAT
+ FORMAT_R32G32B32A32_SFLOAT Format = C.VK_FORMAT_R32G32B32A32_SFLOAT
+
+ FORMAT_FEATURE_COLOR_ATTACHMENT_BIT FormatFeatureFlags = C.VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
+ FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FormatFeatureFlags = C.VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
+ FORMAT_FEATURE_SAMPLED_IMAGE_BIT FormatFeatureFlags = C.VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
+
+ IMAGE_USAGE_SAMPLED_BIT ImageUsageFlags = C.VK_IMAGE_USAGE_SAMPLED_BIT
+ IMAGE_USAGE_COLOR_ATTACHMENT_BIT ImageUsageFlags = C.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
+ IMAGE_USAGE_STORAGE_BIT ImageUsageFlags = C.VK_IMAGE_USAGE_STORAGE_BIT
+ IMAGE_USAGE_TRANSFER_DST_BIT ImageUsageFlags = C.VK_IMAGE_USAGE_TRANSFER_DST_BIT
+ IMAGE_USAGE_TRANSFER_SRC_BIT ImageUsageFlags = C.VK_IMAGE_USAGE_TRANSFER_SRC_BIT
+
+ FILTER_NEAREST Filter = C.VK_FILTER_NEAREST
+ FILTER_LINEAR Filter = C.VK_FILTER_LINEAR
+
+ ATTACHMENT_LOAD_OP_CLEAR AttachmentLoadOp = C.VK_ATTACHMENT_LOAD_OP_CLEAR
+ ATTACHMENT_LOAD_OP_DONT_CARE AttachmentLoadOp = C.VK_ATTACHMENT_LOAD_OP_DONT_CARE
+ ATTACHMENT_LOAD_OP_LOAD AttachmentLoadOp = C.VK_ATTACHMENT_LOAD_OP_LOAD
+
+ IMAGE_LAYOUT_UNDEFINED ImageLayout = C.VK_IMAGE_LAYOUT_UNDEFINED
+ IMAGE_LAYOUT_PRESENT_SRC_KHR ImageLayout = C.VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
+ IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ImageLayout = C.VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
+ IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL ImageLayout = C.VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
+ IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL ImageLayout = C.VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
+ IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL ImageLayout = C.VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
+ IMAGE_LAYOUT_GENERAL ImageLayout = C.VK_IMAGE_LAYOUT_GENERAL
+
+ BUFFER_USAGE_TRANSFER_DST_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_TRANSFER_DST_BIT
+ BUFFER_USAGE_TRANSFER_SRC_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_TRANSFER_SRC_BIT
+ BUFFER_USAGE_UNIFORM_BUFFER_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
+ BUFFER_USAGE_STORAGE_BUFFER_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_STORAGE_BUFFER_BIT
+ BUFFER_USAGE_INDEX_BUFFER_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_INDEX_BUFFER_BIT
+ BUFFER_USAGE_VERTEX_BUFFER_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_VERTEX_BUFFER_BIT
+
+ ERROR_OUT_OF_DATE_KHR = Error(C.VK_ERROR_OUT_OF_DATE_KHR)
+ ERROR_SURFACE_LOST_KHR = Error(C.VK_ERROR_SURFACE_LOST_KHR)
+ ERROR_DEVICE_LOST = Error(C.VK_ERROR_DEVICE_LOST)
+ SUBOPTIMAL_KHR = Error(C.VK_SUBOPTIMAL_KHR)
+
+ BLEND_FACTOR_ZERO BlendFactor = C.VK_BLEND_FACTOR_ZERO
+ BLEND_FACTOR_ONE BlendFactor = C.VK_BLEND_FACTOR_ONE
+ BLEND_FACTOR_ONE_MINUS_SRC_ALPHA BlendFactor = C.VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
+ BLEND_FACTOR_DST_COLOR BlendFactor = C.VK_BLEND_FACTOR_DST_COLOR
+
+ PRIMITIVE_TOPOLOGY_TRIANGLE_LIST PrimitiveTopology = C.VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
+ PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP PrimitiveTopology = C.VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
+
+ SHADER_STAGE_VERTEX_BIT ShaderStageFlags = C.VK_SHADER_STAGE_VERTEX_BIT
+ SHADER_STAGE_FRAGMENT_BIT ShaderStageFlags = C.VK_SHADER_STAGE_FRAGMENT_BIT
+ SHADER_STAGE_COMPUTE_BIT ShaderStageFlags = C.VK_SHADER_STAGE_COMPUTE_BIT
+
+ DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER DescriptorType = C.VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
+ DESCRIPTOR_TYPE_UNIFORM_BUFFER DescriptorType = C.VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
+ DESCRIPTOR_TYPE_STORAGE_BUFFER DescriptorType = C.VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
+ DESCRIPTOR_TYPE_STORAGE_IMAGE DescriptorType = C.VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
+
+ MEMORY_PROPERTY_DEVICE_LOCAL_BIT MemoryPropertyFlags = C.VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
+ MEMORY_PROPERTY_HOST_VISIBLE_BIT MemoryPropertyFlags = C.VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
+ MEMORY_PROPERTY_HOST_COHERENT_BIT MemoryPropertyFlags = C.VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
+
+ DEPENDENCY_BY_REGION_BIT DependencyFlags = C.VK_DEPENDENCY_BY_REGION_BIT
+
+ PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
+ PIPELINE_STAGE_TRANSFER_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_TRANSFER_BIT
+ PIPELINE_STAGE_FRAGMENT_SHADER_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
+ PIPELINE_STAGE_COMPUTE_SHADER_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT
+ PIPELINE_STAGE_TOP_OF_PIPE_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
+ PIPELINE_STAGE_HOST_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_HOST_BIT
+ PIPELINE_STAGE_VERTEX_INPUT_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_VERTEX_INPUT_BIT
+ PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
+
+ ACCESS_MEMORY_READ_BIT AccessFlags = C.VK_ACCESS_MEMORY_READ_BIT
+ ACCESS_MEMORY_WRITE_BIT AccessFlags = C.VK_ACCESS_MEMORY_WRITE_BIT
+ ACCESS_TRANSFER_READ_BIT AccessFlags = C.VK_ACCESS_TRANSFER_READ_BIT
+ ACCESS_TRANSFER_WRITE_BIT AccessFlags = C.VK_ACCESS_TRANSFER_WRITE_BIT
+ ACCESS_SHADER_READ_BIT AccessFlags = C.VK_ACCESS_SHADER_READ_BIT
+ ACCESS_SHADER_WRITE_BIT AccessFlags = C.VK_ACCESS_SHADER_WRITE_BIT
+ ACCESS_COLOR_ATTACHMENT_READ_BIT AccessFlags = C.VK_ACCESS_COLOR_ATTACHMENT_READ_BIT
+ ACCESS_COLOR_ATTACHMENT_WRITE_BIT AccessFlags = C.VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
+ ACCESS_HOST_READ_BIT AccessFlags = C.VK_ACCESS_HOST_READ_BIT
+ ACCESS_HOST_WRITE_BIT AccessFlags = C.VK_ACCESS_HOST_WRITE_BIT
+ ACCESS_VERTEX_ATTRIBUTE_READ_BIT AccessFlags = C.VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT
+ ACCESS_INDEX_READ_BIT AccessFlags = C.VK_ACCESS_INDEX_READ_BIT
+
+ PIPELINE_BIND_POINT_COMPUTE PipelineBindPoint = C.VK_PIPELINE_BIND_POINT_COMPUTE
+ PIPELINE_BIND_POINT_GRAPHICS PipelineBindPoint = C.VK_PIPELINE_BIND_POINT_GRAPHICS
+
+ INDEX_TYPE_UINT16 IndexType = C.VK_INDEX_TYPE_UINT16
+ INDEX_TYPE_UINT32 IndexType = C.VK_INDEX_TYPE_UINT32
+
+ QUEUE_GRAPHICS_BIT QueueFlags = C.VK_QUEUE_GRAPHICS_BIT
+ QUEUE_COMPUTE_BIT QueueFlags = C.VK_QUEUE_COMPUTE_BIT
+)
+
+var (
+ once sync.Once
+ loadErr error
+
+ loadFuncs []func(dlopen func(name string) *[0]byte)
+)
+
+var funcs struct {
+ vkCreateInstance C.PFN_vkCreateInstance
+ vkDestroyInstance C.PFN_vkDestroyInstance
+ vkEnumeratePhysicalDevices C.PFN_vkEnumeratePhysicalDevices
+ vkGetPhysicalDeviceQueueFamilyProperties C.PFN_vkGetPhysicalDeviceQueueFamilyProperties
+ vkGetPhysicalDeviceFormatProperties C.PFN_vkGetPhysicalDeviceFormatProperties
+ vkCreateDevice C.PFN_vkCreateDevice
+ vkDestroyDevice C.PFN_vkDestroyDevice
+ vkGetDeviceQueue C.PFN_vkGetDeviceQueue
+ vkCreateImageView C.PFN_vkCreateImageView
+ vkDestroyImageView C.PFN_vkDestroyImageView
+ vkCreateFramebuffer C.PFN_vkCreateFramebuffer
+ vkDestroyFramebuffer C.PFN_vkDestroyFramebuffer
+ vkDeviceWaitIdle C.PFN_vkDeviceWaitIdle
+ vkQueueWaitIdle C.PFN_vkQueueWaitIdle
+ vkCreateSemaphore C.PFN_vkCreateSemaphore
+ vkDestroySemaphore C.PFN_vkDestroySemaphore
+ vkCreateRenderPass C.PFN_vkCreateRenderPass
+ vkDestroyRenderPass C.PFN_vkDestroyRenderPass
+ vkCreateCommandPool C.PFN_vkCreateCommandPool
+ vkDestroyCommandPool C.PFN_vkDestroyCommandPool
+ vkAllocateCommandBuffers C.PFN_vkAllocateCommandBuffers
+ vkFreeCommandBuffers C.PFN_vkFreeCommandBuffers
+ vkBeginCommandBuffer C.PFN_vkBeginCommandBuffer
+ vkEndCommandBuffer C.PFN_vkEndCommandBuffer
+ vkQueueSubmit C.PFN_vkQueueSubmit
+ vkCmdBeginRenderPass C.PFN_vkCmdBeginRenderPass
+ vkCmdEndRenderPass C.PFN_vkCmdEndRenderPass
+ vkCmdCopyBuffer C.PFN_vkCmdCopyBuffer
+ vkCmdCopyBufferToImage C.PFN_vkCmdCopyBufferToImage
+ vkCmdPipelineBarrier C.PFN_vkCmdPipelineBarrier
+ vkCmdPushConstants C.PFN_vkCmdPushConstants
+ vkCmdBindPipeline C.PFN_vkCmdBindPipeline
+ vkCmdBindVertexBuffers C.PFN_vkCmdBindVertexBuffers
+ vkCmdSetViewport C.PFN_vkCmdSetViewport
+ vkCmdBindIndexBuffer C.PFN_vkCmdBindIndexBuffer
+ vkCmdDraw C.PFN_vkCmdDraw
+ vkCmdDrawIndexed C.PFN_vkCmdDrawIndexed
+ vkCmdBindDescriptorSets C.PFN_vkCmdBindDescriptorSets
+ vkCmdCopyImageToBuffer C.PFN_vkCmdCopyImageToBuffer
+ vkCmdDispatch C.PFN_vkCmdDispatch
+ vkCreateImage C.PFN_vkCreateImage
+ vkDestroyImage C.PFN_vkDestroyImage
+ vkGetImageMemoryRequirements C.PFN_vkGetImageMemoryRequirements
+ vkAllocateMemory C.PFN_vkAllocateMemory
+ vkBindImageMemory C.PFN_vkBindImageMemory
+ vkFreeMemory C.PFN_vkFreeMemory
+ vkGetPhysicalDeviceMemoryProperties C.PFN_vkGetPhysicalDeviceMemoryProperties
+ vkCreateSampler C.PFN_vkCreateSampler
+ vkDestroySampler C.PFN_vkDestroySampler
+ vkCreateBuffer C.PFN_vkCreateBuffer
+ vkDestroyBuffer C.PFN_vkDestroyBuffer
+ vkGetBufferMemoryRequirements C.PFN_vkGetBufferMemoryRequirements
+ vkBindBufferMemory C.PFN_vkBindBufferMemory
+ vkCreateShaderModule C.PFN_vkCreateShaderModule
+ vkDestroyShaderModule C.PFN_vkDestroyShaderModule
+ vkCreateGraphicsPipelines C.PFN_vkCreateGraphicsPipelines
+ vkDestroyPipeline C.PFN_vkDestroyPipeline
+ vkCreatePipelineLayout C.PFN_vkCreatePipelineLayout
+ vkDestroyPipelineLayout C.PFN_vkDestroyPipelineLayout
+ vkCreateDescriptorSetLayout C.PFN_vkCreateDescriptorSetLayout
+ vkDestroyDescriptorSetLayout C.PFN_vkDestroyDescriptorSetLayout
+ vkMapMemory C.PFN_vkMapMemory
+ vkUnmapMemory C.PFN_vkUnmapMemory
+ vkResetCommandBuffer C.PFN_vkResetCommandBuffer
+ vkCreateDescriptorPool C.PFN_vkCreateDescriptorPool
+ vkDestroyDescriptorPool C.PFN_vkDestroyDescriptorPool
+ vkAllocateDescriptorSets C.PFN_vkAllocateDescriptorSets
+ vkFreeDescriptorSets C.PFN_vkFreeDescriptorSets
+ vkUpdateDescriptorSets C.PFN_vkUpdateDescriptorSets
+ vkResetDescriptorPool C.PFN_vkResetDescriptorPool
+ vkCmdCopyImage C.PFN_vkCmdCopyImage
+ vkCreateComputePipelines C.PFN_vkCreateComputePipelines
+ vkCreateFence C.PFN_vkCreateFence
+ vkDestroyFence C.PFN_vkDestroyFence
+ vkWaitForFences C.PFN_vkWaitForFences
+ vkResetFences C.PFN_vkResetFences
+ vkGetPhysicalDeviceProperties C.PFN_vkGetPhysicalDeviceProperties
+
+ vkGetPhysicalDeviceSurfaceSupportKHR C.PFN_vkGetPhysicalDeviceSurfaceSupportKHR
+ vkDestroySurfaceKHR C.PFN_vkDestroySurfaceKHR
+ vkGetPhysicalDeviceSurfaceFormatsKHR C.PFN_vkGetPhysicalDeviceSurfaceFormatsKHR
+ vkGetPhysicalDeviceSurfacePresentModesKHR C.PFN_vkGetPhysicalDeviceSurfacePresentModesKHR
+ vkGetPhysicalDeviceSurfaceCapabilitiesKHR C.PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
+
+ vkCreateSwapchainKHR C.PFN_vkCreateSwapchainKHR
+ vkDestroySwapchainKHR C.PFN_vkDestroySwapchainKHR
+ vkGetSwapchainImagesKHR C.PFN_vkGetSwapchainImagesKHR
+ vkAcquireNextImageKHR C.PFN_vkAcquireNextImageKHR
+ vkQueuePresentKHR C.PFN_vkQueuePresentKHR
+}
+
+var (
+ nilSurface C.VkSurfaceKHR
+ nilSwapchain C.VkSwapchainKHR
+ nilSemaphore C.VkSemaphore
+ nilImageView C.VkImageView
+ nilRenderPass C.VkRenderPass
+ nilFramebuffer C.VkFramebuffer
+ nilCommandPool C.VkCommandPool
+ nilImage C.VkImage
+ nilDeviceMemory C.VkDeviceMemory
+ nilSampler C.VkSampler
+ nilBuffer C.VkBuffer
+ nilShaderModule C.VkShaderModule
+ nilPipeline C.VkPipeline
+ nilPipelineCache C.VkPipelineCache
+ nilPipelineLayout C.VkPipelineLayout
+ nilDescriptorSetLayout C.VkDescriptorSetLayout
+ nilDescriptorPool C.VkDescriptorPool
+ nilDescriptorSet C.VkDescriptorSet
+ nilFence C.VkFence
+)
+
+func vkInit() error {
+ once.Do(func() {
+ var libName string
+ switch {
+ case runtime.GOOS == "android":
+ libName = "libvulkan.so"
+ default:
+ libName = "libvulkan.so.1"
+ }
+ lib := dlopen(libName)
+ if lib == nil {
+ loadErr = fmt.Errorf("vulkan: %s", C.GoString(C.dlerror()))
+ return
+ }
+ dlopen := func(name string) *[0]byte {
+ return (*[0]byte)(dlsym(lib, name))
+ }
+ must := func(name string) *[0]byte {
+ ptr := dlopen(name)
+ if ptr != nil {
+ return ptr
+ }
+ if loadErr == nil {
+ loadErr = fmt.Errorf("vulkan: function %q not found: %s", name, C.GoString(C.dlerror()))
+ }
+ return nil
+ }
+ funcs.vkCreateInstance = must("vkCreateInstance")
+ funcs.vkDestroyInstance = must("vkDestroyInstance")
+ funcs.vkEnumeratePhysicalDevices = must("vkEnumeratePhysicalDevices")
+ funcs.vkGetPhysicalDeviceQueueFamilyProperties = must("vkGetPhysicalDeviceQueueFamilyProperties")
+ funcs.vkGetPhysicalDeviceFormatProperties = must("vkGetPhysicalDeviceFormatProperties")
+ funcs.vkCreateDevice = must("vkCreateDevice")
+ funcs.vkDestroyDevice = must("vkDestroyDevice")
+ funcs.vkGetDeviceQueue = must("vkGetDeviceQueue")
+ funcs.vkCreateImageView = must("vkCreateImageView")
+ funcs.vkDestroyImageView = must("vkDestroyImageView")
+ funcs.vkCreateFramebuffer = must("vkCreateFramebuffer")
+ funcs.vkDestroyFramebuffer = must("vkDestroyFramebuffer")
+ funcs.vkDeviceWaitIdle = must("vkDeviceWaitIdle")
+ funcs.vkQueueWaitIdle = must("vkQueueWaitIdle")
+ funcs.vkCreateSemaphore = must("vkCreateSemaphore")
+ funcs.vkDestroySemaphore = must("vkDestroySemaphore")
+ funcs.vkCreateRenderPass = must("vkCreateRenderPass")
+ funcs.vkDestroyRenderPass = must("vkDestroyRenderPass")
+ funcs.vkCreateCommandPool = must("vkCreateCommandPool")
+ funcs.vkDestroyCommandPool = must("vkDestroyCommandPool")
+ funcs.vkAllocateCommandBuffers = must("vkAllocateCommandBuffers")
+ funcs.vkFreeCommandBuffers = must("vkFreeCommandBuffers")
+ funcs.vkBeginCommandBuffer = must("vkBeginCommandBuffer")
+ funcs.vkEndCommandBuffer = must("vkEndCommandBuffer")
+ funcs.vkQueueSubmit = must("vkQueueSubmit")
+ funcs.vkCmdBeginRenderPass = must("vkCmdBeginRenderPass")
+ funcs.vkCmdEndRenderPass = must("vkCmdEndRenderPass")
+ funcs.vkCmdCopyBuffer = must("vkCmdCopyBuffer")
+ funcs.vkCmdCopyBufferToImage = must("vkCmdCopyBufferToImage")
+ funcs.vkCmdPipelineBarrier = must("vkCmdPipelineBarrier")
+ funcs.vkCmdPushConstants = must("vkCmdPushConstants")
+ funcs.vkCmdBindPipeline = must("vkCmdBindPipeline")
+ funcs.vkCmdBindVertexBuffers = must("vkCmdBindVertexBuffers")
+ funcs.vkCmdSetViewport = must("vkCmdSetViewport")
+ funcs.vkCmdBindIndexBuffer = must("vkCmdBindIndexBuffer")
+ funcs.vkCmdDraw = must("vkCmdDraw")
+ funcs.vkCmdDrawIndexed = must("vkCmdDrawIndexed")
+ funcs.vkCmdBindDescriptorSets = must("vkCmdBindDescriptorSets")
+ funcs.vkCmdCopyImageToBuffer = must("vkCmdCopyImageToBuffer")
+ funcs.vkCmdDispatch = must("vkCmdDispatch")
+ funcs.vkCreateImage = must("vkCreateImage")
+ funcs.vkDestroyImage = must("vkDestroyImage")
+ funcs.vkGetImageMemoryRequirements = must("vkGetImageMemoryRequirements")
+ funcs.vkAllocateMemory = must("vkAllocateMemory")
+ funcs.vkBindImageMemory = must("vkBindImageMemory")
+ funcs.vkFreeMemory = must("vkFreeMemory")
+ funcs.vkGetPhysicalDeviceMemoryProperties = must("vkGetPhysicalDeviceMemoryProperties")
+ funcs.vkCreateSampler = must("vkCreateSampler")
+ funcs.vkDestroySampler = must("vkDestroySampler")
+ funcs.vkCreateBuffer = must("vkCreateBuffer")
+ funcs.vkDestroyBuffer = must("vkDestroyBuffer")
+ funcs.vkGetBufferMemoryRequirements = must("vkGetBufferMemoryRequirements")
+ funcs.vkBindBufferMemory = must("vkBindBufferMemory")
+ funcs.vkCreateShaderModule = must("vkCreateShaderModule")
+ funcs.vkDestroyShaderModule = must("vkDestroyShaderModule")
+ funcs.vkCreateGraphicsPipelines = must("vkCreateGraphicsPipelines")
+ funcs.vkDestroyPipeline = must("vkDestroyPipeline")
+ funcs.vkCreatePipelineLayout = must("vkCreatePipelineLayout")
+ funcs.vkDestroyPipelineLayout = must("vkDestroyPipelineLayout")
+ funcs.vkCreateDescriptorSetLayout = must("vkCreateDescriptorSetLayout")
+ funcs.vkDestroyDescriptorSetLayout = must("vkDestroyDescriptorSetLayout")
+ funcs.vkMapMemory = must("vkMapMemory")
+ funcs.vkUnmapMemory = must("vkUnmapMemory")
+ funcs.vkResetCommandBuffer = must("vkResetCommandBuffer")
+ funcs.vkCreateDescriptorPool = must("vkCreateDescriptorPool")
+ funcs.vkDestroyDescriptorPool = must("vkDestroyDescriptorPool")
+ funcs.vkAllocateDescriptorSets = must("vkAllocateDescriptorSets")
+ funcs.vkFreeDescriptorSets = must("vkFreeDescriptorSets")
+ funcs.vkUpdateDescriptorSets = must("vkUpdateDescriptorSets")
+ funcs.vkResetDescriptorPool = must("vkResetDescriptorPool")
+ funcs.vkCmdCopyImage = must("vkCmdCopyImage")
+ funcs.vkCreateComputePipelines = must("vkCreateComputePipelines")
+ funcs.vkCreateFence = must("vkCreateFence")
+ funcs.vkDestroyFence = must("vkDestroyFence")
+ funcs.vkWaitForFences = must("vkWaitForFences")
+ funcs.vkResetFences = must("vkResetFences")
+ funcs.vkGetPhysicalDeviceProperties = must("vkGetPhysicalDeviceProperties")
+
+ funcs.vkGetPhysicalDeviceSurfaceSupportKHR = dlopen("vkGetPhysicalDeviceSurfaceSupportKHR")
+ funcs.vkDestroySurfaceKHR = dlopen("vkDestroySurfaceKHR")
+ funcs.vkGetPhysicalDeviceSurfaceFormatsKHR = dlopen("vkGetPhysicalDeviceSurfaceFormatsKHR")
+ funcs.vkGetPhysicalDeviceSurfacePresentModesKHR = dlopen("vkGetPhysicalDeviceSurfacePresentModesKHR")
+ funcs.vkGetPhysicalDeviceSurfaceCapabilitiesKHR = dlopen("vkGetPhysicalDeviceSurfaceCapabilitiesKHR")
+
+ funcs.vkCreateSwapchainKHR = dlopen("vkCreateSwapchainKHR")
+ funcs.vkDestroySwapchainKHR = dlopen("vkDestroySwapchainKHR")
+ funcs.vkGetSwapchainImagesKHR = dlopen("vkGetSwapchainImagesKHR")
+ funcs.vkAcquireNextImageKHR = dlopen("vkAcquireNextImageKHR")
+ funcs.vkQueuePresentKHR = dlopen("vkQueuePresentKHR")
+
+ for _, f := range loadFuncs {
+ f(dlopen)
+ }
+ })
+ return loadErr
+}
+
+func CreateInstance(exts ...string) (Instance, error) {
+ if err := vkInit(); err != nil {
+ return nil, err
+ }
+ inf := C.VkInstanceCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
+ }
+ if len(exts) > 0 {
+ cexts := mallocCStringArr(exts)
+ defer freeCStringArr(cexts)
+ inf.enabledExtensionCount = C.uint32_t(len(exts))
+ inf.ppEnabledExtensionNames = &cexts[0]
+ }
+ var inst Instance
+ if err := vkErr(C.vkCreateInstance(funcs.vkCreateInstance, inf, nil, &inst)); err != nil {
+ return nil, fmt.Errorf("vulkan: vkCreateInstance: %w", err)
+ }
+ return inst, nil
+}
+
+func mallocCStringArr(s []string) []*C.char {
+ carr := make([]*C.char, len(s))
+ for i, ext := range s {
+ carr[i] = C.CString(ext)
+ }
+ return carr
+}
+
+func freeCStringArr(s []*C.char) {
+ for i := range s {
+ C.free(unsafe.Pointer(s[i]))
+ s[i] = nil
+ }
+}
+
+func DestroyInstance(inst Instance) {
+ C.vkDestroyInstance(funcs.vkDestroyInstance, inst, nil)
+}
+
+func GetPhysicalDeviceQueueFamilyProperties(pd PhysicalDevice) []QueueFamilyProperties {
+ var count C.uint32_t
+ C.vkGetPhysicalDeviceQueueFamilyProperties(funcs.vkGetPhysicalDeviceQueueFamilyProperties, pd, &count, nil)
+ if count == 0 {
+ return nil
+ }
+ queues := make([]C.VkQueueFamilyProperties, count)
+ C.vkGetPhysicalDeviceQueueFamilyProperties(funcs.vkGetPhysicalDeviceQueueFamilyProperties, pd, &count, &queues[0])
+ return queues
+}
+
+func EnumeratePhysicalDevices(inst Instance) ([]PhysicalDevice, error) {
+ var count C.uint32_t
+ if err := vkErr(C.vkEnumeratePhysicalDevices(funcs.vkEnumeratePhysicalDevices, inst, &count, nil)); err != nil {
+ return nil, fmt.Errorf("vulkan: vkEnumeratePhysicalDevices: %w", err)
+ }
+ if count == 0 {
+ return nil, nil
+ }
+ devs := make([]C.VkPhysicalDevice, count)
+ if err := vkErr(C.vkEnumeratePhysicalDevices(funcs.vkEnumeratePhysicalDevices, inst, &count, &devs[0])); err != nil {
+ return nil, fmt.Errorf("vulkan: vkEnumeratePhysicalDevices: %w", err)
+ }
+ return devs, nil
+}
+
+func ChoosePhysicalDevice(inst Instance, surf Surface) (PhysicalDevice, int, error) {
+ devs, err := EnumeratePhysicalDevices(inst)
+ if err != nil {
+ return nil, 0, err
+ }
+ for _, pd := range devs {
+ var props C.VkPhysicalDeviceProperties
+ C.vkGetPhysicalDeviceProperties(funcs.vkGetPhysicalDeviceProperties, pd, &props)
+ // The lavapipe software implementation doesn't work well rendering to a surface.
+ // See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5473.
+ if surf != 0 && props.deviceType == C.VK_PHYSICAL_DEVICE_TYPE_CPU {
+ continue
+ }
+ const caps = C.VK_QUEUE_GRAPHICS_BIT | C.VK_QUEUE_COMPUTE_BIT
+ queueIdx, ok, err := chooseQueue(pd, surf, caps)
+ if err != nil {
+ return nil, 0, err
+ }
+ if !ok {
+ continue
+ }
+ if surf != nilSurface {
+ _, fmtFound, err := chooseFormat(pd, surf)
+ if err != nil {
+ return nil, 0, err
+ }
+ _, modFound, err := choosePresentMode(pd, surf)
+ if err != nil {
+ return nil, 0, err
+ }
+ if !fmtFound || !modFound {
+ continue
+ }
+ }
+ return pd, queueIdx, nil
+ }
+ return nil, 0, errors.New("vulkan: no suitable device found")
+}
+
+func CreateDeviceAndQueue(pd C.VkPhysicalDevice, queueIdx int, exts ...string) (Device, error) {
+ priority := C.float(1.0)
+ qinf := C.VkDeviceQueueCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
+ queueCount: 1,
+ queueFamilyIndex: C.uint32_t(queueIdx),
+ pQueuePriorities: &priority,
+ }
+ inf := C.VkDeviceCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
+ queueCreateInfoCount: 1,
+ enabledExtensionCount: C.uint32_t(len(exts)),
+ }
+ if len(exts) > 0 {
+ cexts := mallocCStringArr(exts)
+ defer freeCStringArr(cexts)
+ inf.ppEnabledExtensionNames = &cexts[0]
+ }
+ var dev Device
+ if err := vkErr(C.vkCreateDevice(funcs.vkCreateDevice, pd, inf, qinf, nil, &dev)); err != nil {
+ return nil, fmt.Errorf("vulkan: vkCreateDevice: %w", err)
+ }
+ return dev, nil
+}
+
+func GetDeviceQueue(d Device, queueFamily, queueIndex int) Queue {
+ var queue Queue
+ C.vkGetDeviceQueue(funcs.vkGetDeviceQueue, d, C.uint32_t(queueFamily), C.uint32_t(queueIndex), &queue)
+ return queue
+}
+
+func GetPhysicalDeviceSurfaceCapabilities(pd PhysicalDevice, surf Surface) (SurfaceCapabilities, error) {
+ var caps C.VkSurfaceCapabilitiesKHR
+ err := vkErr(C.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(funcs.vkGetPhysicalDeviceSurfaceCapabilitiesKHR, pd, surf, &caps))
+ if err != nil {
+ return SurfaceCapabilities{}, fmt.Errorf("vulkan: vkGetPhysicalDeviceSurfaceCapabilitiesKHR: %w", err)
+ }
+ return caps, nil
+}
+
+func CreateSwapchain(pd PhysicalDevice, d Device, surf Surface, width, height int, old Swapchain) (Swapchain, []Image, Format, error) {
+ caps, err := GetPhysicalDeviceSurfaceCapabilities(pd, surf)
+ if err != nil {
+ return nilSwapchain, nil, 0, err
+ }
+ mode, modeOK, err := choosePresentMode(pd, surf)
+ if err != nil {
+ return nilSwapchain, nil, 0, err
+ }
+ format, fmtOK, err := chooseFormat(pd, surf)
+ if err != nil {
+ return nilSwapchain, nil, 0, err
+ }
+ if !modeOK || !fmtOK {
+ // This shouldn't happen because CreateDeviceAndQueue found at least
+ // one valid format and present mode.
+ return nilSwapchain, nil, 0, errors.New("vulkan: no valid format and present mode found")
+ }
+ // Find supported alpha composite mode. It doesn't matter which one, because rendering is
+ // always opaque.
+ alphaComp := C.VkCompositeAlphaFlagBitsKHR(1)
+ for caps.supportedCompositeAlpha&C.VkCompositeAlphaFlagsKHR(alphaComp) == 0 {
+ alphaComp <<= 1
+ }
+ trans := C.VkSurfaceTransformFlagBitsKHR(C.VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR)
+ if caps.supportedTransforms&C.VkSurfaceTransformFlagsKHR(trans) == 0 {
+ return nilSwapchain, nil, 0, errors.New("vulkan: VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR not supported")
+ }
+ inf := C.VkSwapchainCreateInfoKHR{
+ sType: C.VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
+ surface: surf,
+ minImageCount: caps.minImageCount,
+ imageFormat: format.format,
+ imageColorSpace: format.colorSpace,
+ imageExtent: C.VkExtent2D{width: C.uint32_t(width), height: C.uint32_t(height)},
+ imageArrayLayers: 1,
+ imageUsage: C.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
+ imageSharingMode: C.VK_SHARING_MODE_EXCLUSIVE,
+ preTransform: trans,
+ presentMode: mode,
+ compositeAlpha: C.VkCompositeAlphaFlagBitsKHR(alphaComp),
+ clipped: C.VK_TRUE,
+ oldSwapchain: old,
+ }
+ var swchain Swapchain
+ if err := vkErr(C.vkCreateSwapchainKHR(funcs.vkCreateSwapchainKHR, d, &inf, nil, &swchain)); err != nil {
+ return nilSwapchain, nil, 0, fmt.Errorf("vulkan: vkCreateSwapchainKHR: %w", err)
+ }
+ var count C.uint32_t
+ if err := vkErr(C.vkGetSwapchainImagesKHR(funcs.vkGetSwapchainImagesKHR, d, swchain, &count, nil)); err != nil {
+ DestroySwapchain(d, swchain)
+ return nilSwapchain, nil, 0, fmt.Errorf("vulkan: vkGetSwapchainImagesKHR: %w", err)
+ }
+ if count == 0 {
+ DestroySwapchain(d, swchain)
+ return nilSwapchain, nil, 0, errors.New("vulkan: vkGetSwapchainImagesKHR returned no images")
+ }
+ imgs := make([]Image, count)
+ if err := vkErr(C.vkGetSwapchainImagesKHR(funcs.vkGetSwapchainImagesKHR, d, swchain, &count, &imgs[0])); err != nil {
+ DestroySwapchain(d, swchain)
+ return nilSwapchain, nil, 0, fmt.Errorf("vulkan: vkGetSwapchainImagesKHR: %w", err)
+ }
+ return swchain, imgs, format.format, nil
+}
+
+func DestroySwapchain(d Device, swchain Swapchain) {
+ C.vkDestroySwapchainKHR(funcs.vkDestroySwapchainKHR, d, swchain, nil)
+}
+
+func AcquireNextImage(d Device, swchain Swapchain, sem Semaphore, fence Fence) (int, error) {
+ res := C.vkAcquireNextImageKHR(funcs.vkAcquireNextImageKHR, d, swchain, math.MaxUint64, sem, fence)
+ if err := vkErr(res.res); err != nil {
+ return 0, fmt.Errorf("vulkan: vkAcquireNextImageKHR: %w", err)
+ }
+ return int(res.uint), nil
+}
+
+func PresentQueue(q Queue, swchain Swapchain, sem Semaphore, imgIdx int) error {
+ cidx := C.uint32_t(imgIdx)
+ inf := C.VkPresentInfoKHR{
+ sType: C.VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,
+ swapchainCount: 1,
+ pSwapchains: &swchain,
+ pImageIndices: &cidx,
+ }
+ if sem != nilSemaphore {
+ inf.waitSemaphoreCount = 1
+ inf.pWaitSemaphores = &sem
+ }
+ if err := vkErr(C.vkQueuePresentKHR(funcs.vkQueuePresentKHR, q, inf)); err != nil {
+ return fmt.Errorf("vulkan: vkQueuePresentKHR: %w", err)
+ }
+ return nil
+}
+
+func CreateImageView(d Device, img Image, format Format) (ImageView, error) {
+ inf := C.VkImageViewCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
+ image: img,
+ viewType: C.VK_IMAGE_VIEW_TYPE_2D,
+ format: format,
+ subresourceRange: C.VkImageSubresourceRange{
+ aspectMask: C.VK_IMAGE_ASPECT_COLOR_BIT,
+ levelCount: C.VK_REMAINING_MIP_LEVELS,
+ layerCount: C.VK_REMAINING_ARRAY_LAYERS,
+ },
+ }
+ var view C.VkImageView
+ if err := vkErr(C.vkCreateImageView(funcs.vkCreateImageView, d, &inf, nil, &view)); err != nil {
+ return nilImageView, fmt.Errorf("vulkan: vkCreateImageView: %w", err)
+ }
+ return view, nil
+}
+
+func DestroyImageView(d Device, view ImageView) {
+ C.vkDestroyImageView(funcs.vkDestroyImageView, d, view, nil)
+}
+
+func CreateRenderPass(d Device, format Format, loadOp AttachmentLoadOp, initialLayout, finalLayout ImageLayout, passDeps []SubpassDependency) (RenderPass, error) {
+ att := C.VkAttachmentDescription{
+ format: format,
+ samples: C.VK_SAMPLE_COUNT_1_BIT,
+ loadOp: loadOp,
+ storeOp: C.VK_ATTACHMENT_STORE_OP_STORE,
+ stencilLoadOp: C.VK_ATTACHMENT_LOAD_OP_DONT_CARE,
+ stencilStoreOp: C.VK_ATTACHMENT_STORE_OP_DONT_CARE,
+ initialLayout: initialLayout,
+ finalLayout: finalLayout,
+ }
+
+ ref := C.VkAttachmentReference{
+ attachment: 0,
+ layout: C.VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
+ }
+
+ sub := C.VkSubpassDescription{
+ pipelineBindPoint: C.VK_PIPELINE_BIND_POINT_GRAPHICS,
+ colorAttachmentCount: 1,
+ pColorAttachments: &ref,
+ }
+
+ inf := C.VkRenderPassCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
+ attachmentCount: 1,
+ pAttachments: &att,
+ subpassCount: 1,
+ }
+ if n := len(passDeps); n > 0 {
+ inf.dependencyCount = C.uint32_t(n)
+ inf.pDependencies = &passDeps[0]
+ }
+
+ var pass RenderPass
+ if err := vkErr(C.vkCreateRenderPass(funcs.vkCreateRenderPass, d, inf, sub, nil, &pass)); err != nil {
+ return nilRenderPass, fmt.Errorf("vulkan: vkCreateRenderPass: %w", err)
+ }
+ return pass, nil
+}
+
+func DestroyRenderPass(d Device, r RenderPass) {
+ C.vkDestroyRenderPass(funcs.vkDestroyRenderPass, d, r, nil)
+}
+
+func CreateFramebuffer(d Device, rp RenderPass, view ImageView, width, height int) (Framebuffer, error) {
+ inf := C.VkFramebufferCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
+ renderPass: rp,
+ attachmentCount: 1,
+ pAttachments: &view,
+ width: C.uint32_t(width),
+ height: C.uint32_t(height),
+ layers: 1,
+ }
+ var fbo Framebuffer
+ if err := vkErr(C.vkCreateFramebuffer(funcs.vkCreateFramebuffer, d, inf, nil, &fbo)); err != nil {
+ return nilFramebuffer, fmt.Errorf("vulkan: vkCreateFramebuffer: %w", err)
+ }
+ return fbo, nil
+
+}
+
+func DestroyFramebuffer(d Device, f Framebuffer) {
+ C.vkDestroyFramebuffer(funcs.vkDestroyFramebuffer, d, f, nil)
+}
+
+func DeviceWaitIdle(d Device) error {
+ if err := vkErr(C.vkDeviceWaitIdle(funcs.vkDeviceWaitIdle, d)); err != nil {
+ return fmt.Errorf("vulkan: vkDeviceWaitIdle: %w", err)
+ }
+ return nil
+}
+
+func QueueWaitIdle(q Queue) error {
+ if err := vkErr(C.vkQueueWaitIdle(funcs.vkQueueWaitIdle, q)); err != nil {
+ return fmt.Errorf("vulkan: vkQueueWaitIdle: %w", err)
+ }
+ return nil
+}
+
+func CreateSemaphore(d Device) (Semaphore, error) {
+ inf := C.VkSemaphoreCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,
+ }
+ var sem Semaphore
+ err := vkErr(C.vkCreateSemaphore(funcs.vkCreateSemaphore, d, &inf, nil, &sem))
+ if err != nil {
+ return nilSemaphore, fmt.Errorf("vulkan: vkCreateSemaphore: %w", err)
+ }
+ return sem, err
+}
+
+func DestroySemaphore(d Device, sem Semaphore) {
+ C.vkDestroySemaphore(funcs.vkDestroySemaphore, d, sem, nil)
+}
+
+func DestroyDevice(dev Device) {
+ C.vkDestroyDevice(funcs.vkDestroyDevice, dev, nil)
+}
+
+func DestroySurface(inst Instance, s Surface) {
+ C.vkDestroySurfaceKHR(funcs.vkDestroySurfaceKHR, inst, s, nil)
+}
+
+func CreateCommandPool(d Device, queueIndex int) (CommandPool, error) {
+ inf := C.VkCommandPoolCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
+ queueFamilyIndex: C.uint32_t(queueIndex),
+ flags: C.VK_COMMAND_POOL_CREATE_TRANSIENT_BIT | C.VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
+ }
+
+ var pool CommandPool
+ if err := vkErr(C.vkCreateCommandPool(funcs.vkCreateCommandPool, d, &inf, nil, &pool)); err != nil {
+ return nilCommandPool, fmt.Errorf("vulkan: vkCreateCommandPool: %w", err)
+ }
+ return pool, nil
+}
+
+func DestroyCommandPool(d Device, pool CommandPool) {
+ C.vkDestroyCommandPool(funcs.vkDestroyCommandPool, d, pool, nil)
+}
+
+func AllocateCommandBuffer(d Device, pool CommandPool) (CommandBuffer, error) {
+ inf := C.VkCommandBufferAllocateInfo{
+ sType: C.VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,
+ commandPool: pool,
+ level: C.VK_COMMAND_BUFFER_LEVEL_PRIMARY,
+ commandBufferCount: 1,
+ }
+
+ var buf CommandBuffer
+ if err := vkErr(C.vkAllocateCommandBuffers(funcs.vkAllocateCommandBuffers, d, &inf, &buf)); err != nil {
+ return nil, fmt.Errorf("vulkan: vkAllocateCommandBuffers: %w", err)
+ }
+ return buf, nil
+}
+
+func FreeCommandBuffers(d Device, pool CommandPool, bufs ...CommandBuffer) {
+ if len(bufs) == 0 {
+ return
+ }
+ C.vkFreeCommandBuffers(funcs.vkFreeCommandBuffers, d, pool, C.uint32_t(len(bufs)), &bufs[0])
+}
+
+func BeginCommandBuffer(buf CommandBuffer) error {
+ inf := C.VkCommandBufferBeginInfo{
+ sType: C.VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
+ flags: C.VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
+ }
+ if err := vkErr(C.vkBeginCommandBuffer(funcs.vkBeginCommandBuffer, buf, inf)); err != nil {
+ return fmt.Errorf("vulkan: vkBeginCommandBuffer: %w", err)
+ }
+ return nil
+}
+
+func EndCommandBuffer(buf CommandBuffer) error {
+ if err := vkErr(C.vkEndCommandBuffer(funcs.vkEndCommandBuffer, buf)); err != nil {
+ return fmt.Errorf("vulkan: vkEndCommandBuffer: %w", err)
+ }
+ return nil
+}
+
+func QueueSubmit(q Queue, buf CommandBuffer, waitSems []Semaphore, waitStages []PipelineStageFlags, sigSems []Semaphore, fence Fence) error {
+ inf := C.VkSubmitInfo{
+ sType: C.VK_STRUCTURE_TYPE_SUBMIT_INFO,
+ commandBufferCount: 1,
+ pCommandBuffers: &buf,
+ }
+ if len(waitSems) > 0 {
+ if len(waitSems) != len(waitStages) {
+ panic("len(waitSems) != len(waitStages)")
+ }
+ inf.waitSemaphoreCount = C.uint32_t(len(waitSems))
+ inf.pWaitSemaphores = &waitSems[0]
+ inf.pWaitDstStageMask = &waitStages[0]
+ }
+ if len(sigSems) > 0 {
+ inf.signalSemaphoreCount = C.uint32_t(len(sigSems))
+ inf.pSignalSemaphores = &sigSems[0]
+ }
+ if err := vkErr(C.vkQueueSubmit(funcs.vkQueueSubmit, q, inf, fence)); err != nil {
+ return fmt.Errorf("vulkan: vkQueueSubmit: %w", err)
+ }
+ return nil
+}
+
+func CmdBeginRenderPass(buf CommandBuffer, rp RenderPass, fbo Framebuffer, width, height int, clearCol [4]float32) {
+ cclearCol := [4]C.float{C.float(clearCol[0]), C.float(clearCol[1]), C.float(clearCol[2]), C.float(clearCol[3])}
+ inf := C.VkRenderPassBeginInfo{
+ sType: C.VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
+ renderPass: rp,
+ framebuffer: fbo,
+ renderArea: C.VkRect2D{extent: C.VkExtent2D{width: C.uint32_t(width), height: C.uint32_t(height)}},
+ clearValueCount: 1,
+ pClearValues: (*C.VkClearValue)(unsafe.Pointer(&cclearCol)),
+ }
+ C.vkCmdBeginRenderPass(funcs.vkCmdBeginRenderPass, buf, inf, C.VK_SUBPASS_CONTENTS_INLINE)
+}
+
+func CmdEndRenderPass(buf CommandBuffer) {
+ C.vkCmdEndRenderPass(funcs.vkCmdEndRenderPass, buf)
+}
+
+func CmdCopyBuffer(cmdBuf CommandBuffer, src, dst Buffer, srcOff, dstOff, size int) {
+ C.vkCmdCopyBuffer(funcs.vkCmdCopyBuffer, cmdBuf, src, dst, 1, &C.VkBufferCopy{
+ srcOffset: C.VkDeviceSize(srcOff),
+ dstOffset: C.VkDeviceSize(dstOff),
+ size: C.VkDeviceSize(size),
+ })
+}
+
+func CmdCopyBufferToImage(cmdBuf CommandBuffer, src Buffer, dst Image, layout ImageLayout, copy BufferImageCopy) {
+ C.vkCmdCopyBufferToImage(funcs.vkCmdCopyBufferToImage, cmdBuf, src, dst, layout, 1, &copy)
+}
+
+func CmdPipelineBarrier(cmdBuf CommandBuffer, srcStage, dstStage PipelineStageFlags, flags DependencyFlags, memBarriers []MemoryBarrier, bufBarriers []BufferMemoryBarrier, imgBarriers []ImageMemoryBarrier) {
+ var memPtr *MemoryBarrier
+ if len(memBarriers) > 0 {
+ memPtr = &memBarriers[0]
+ }
+ var bufPtr *BufferMemoryBarrier
+ if len(bufBarriers) > 0 {
+ bufPtr = &bufBarriers[0]
+ }
+ var imgPtr *ImageMemoryBarrier
+ if len(imgBarriers) > 0 {
+ imgPtr = &imgBarriers[0]
+ }
+ C.vkCmdPipelineBarrier(funcs.vkCmdPipelineBarrier, cmdBuf, srcStage, dstStage, flags,
+ C.uint32_t(len(memBarriers)), memPtr,
+ C.uint32_t(len(bufBarriers)), bufPtr,
+ C.uint32_t(len(imgBarriers)), imgPtr)
+}
+
+func CmdPushConstants(cmdBuf CommandBuffer, layout PipelineLayout, stages ShaderStageFlags, offset int, data []byte) {
+ if len(data) == 0 {
+ return
+ }
+ C.vkCmdPushConstants(funcs.vkCmdPushConstants, cmdBuf, layout, stages, C.uint32_t(offset), C.uint32_t(len(data)), unsafe.Pointer(&data[0]))
+}
+
+func CmdBindPipeline(cmdBuf CommandBuffer, bindPoint PipelineBindPoint, pipe Pipeline) {
+ C.vkCmdBindPipeline(funcs.vkCmdBindPipeline, cmdBuf, bindPoint, pipe)
+}
+
+func CmdBindVertexBuffers(cmdBuf CommandBuffer, first int, buffers []Buffer, sizes []DeviceSize) {
+ if len(buffers) == 0 {
+ return
+ }
+ C.vkCmdBindVertexBuffers(funcs.vkCmdBindVertexBuffers, cmdBuf, C.uint32_t(first), C.uint32_t(len(buffers)), &buffers[0], &sizes[0])
+}
+
+func CmdSetViewport(cmdBuf CommandBuffer, first int, viewports ...Viewport) {
+ if len(viewports) == 0 {
+ return
+ }
+ C.vkCmdSetViewport(funcs.vkCmdSetViewport, cmdBuf, C.uint32_t(first), C.uint32_t(len(viewports)), &viewports[0])
+}
+
+func CmdBindIndexBuffer(cmdBuf CommandBuffer, buffer Buffer, offset int, typ IndexType) {
+ C.vkCmdBindIndexBuffer(funcs.vkCmdBindIndexBuffer, cmdBuf, buffer, C.VkDeviceSize(offset), typ)
+}
+
+func CmdDraw(cmdBuf CommandBuffer, vertCount, instCount, firstVert, firstInst int) {
+ C.vkCmdDraw(funcs.vkCmdDraw, cmdBuf, C.uint32_t(vertCount), C.uint32_t(instCount), C.uint32_t(firstVert), C.uint32_t(firstInst))
+}
+
+func CmdDrawIndexed(cmdBuf CommandBuffer, idxCount, instCount, firstIdx, vertOff, firstInst int) {
+ C.vkCmdDrawIndexed(funcs.vkCmdDrawIndexed, cmdBuf, C.uint32_t(idxCount), C.uint32_t(instCount), C.uint32_t(firstIdx), C.int32_t(vertOff), C.uint32_t(firstInst))
+}
+
+func GetPhysicalDeviceFormatProperties(physDev PhysicalDevice, format Format) FormatFeatureFlags {
+ var props C.VkFormatProperties
+ C.vkGetPhysicalDeviceFormatProperties(funcs.vkGetPhysicalDeviceFormatProperties, physDev, format, &props)
+ return FormatFeatureFlags(props.optimalTilingFeatures)
+}
+
+func CmdBindDescriptorSets(cmdBuf CommandBuffer, point PipelineBindPoint, layout PipelineLayout, firstSet int, sets []DescriptorSet) {
+ C.vkCmdBindDescriptorSets(funcs.vkCmdBindDescriptorSets, cmdBuf, point, layout, C.uint32_t(firstSet), C.uint32_t(len(sets)), &sets[0], 0, nil)
+}
+
+func CmdCopyImage(cmdBuf CommandBuffer, src Image, srcLayout ImageLayout, dst Image, dstLayout ImageLayout, regions []ImageCopy) {
+ if len(regions) == 0 {
+ return
+ }
+ C.vkCmdCopyImage(funcs.vkCmdCopyImage, cmdBuf, src, srcLayout, dst, dstLayout, C.uint32_t(len(regions)), &regions[0])
+}
+
+func CmdCopyImageToBuffer(cmdBuf CommandBuffer, src Image, srcLayout ImageLayout, dst Buffer, regions []BufferImageCopy) {
+ if len(regions) == 0 {
+ return
+ }
+ C.vkCmdCopyImageToBuffer(funcs.vkCmdCopyImageToBuffer, cmdBuf, src, srcLayout, dst, C.uint32_t(len(regions)), &regions[0])
+}
+
+func CmdDispatch(cmdBuf CommandBuffer, x, y, z int) {
+ C.vkCmdDispatch(funcs.vkCmdDispatch, cmdBuf, C.uint32_t(x), C.uint32_t(y), C.uint32_t(z))
+}
+
+func CreateImage(pd PhysicalDevice, d Device, format Format, width, height int, usage ImageUsageFlags) (Image, DeviceMemory, error) {
+ inf := C.VkImageCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
+ imageType: C.VK_IMAGE_TYPE_2D,
+ format: format,
+ extent: C.VkExtent3D{
+ width: C.uint32_t(width),
+ height: C.uint32_t(height),
+ depth: 1,
+ },
+ mipLevels: 1,
+ arrayLayers: 1,
+ samples: C.VK_SAMPLE_COUNT_1_BIT,
+ tiling: C.VK_IMAGE_TILING_OPTIMAL,
+ usage: usage,
+ initialLayout: C.VK_IMAGE_LAYOUT_UNDEFINED,
+ }
+ var img C.VkImage
+ if err := vkErr(C.vkCreateImage(funcs.vkCreateImage, d, &inf, nil, &img)); err != nil {
+ return nilImage, nilDeviceMemory, fmt.Errorf("vulkan: vkCreateImage: %w", err)
+ }
+ var memReqs C.VkMemoryRequirements
+ C.vkGetImageMemoryRequirements(funcs.vkGetImageMemoryRequirements, d, img, &memReqs)
+
+ memIdx, found := findMemoryTypeIndex(pd, memReqs.memoryTypeBits, C.VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
+ if !found {
+ DestroyImage(d, img)
+ return nilImage, nilDeviceMemory, errors.New("vulkan: no memory type suitable for images found")
+ }
+
+ memInf := C.VkMemoryAllocateInfo{
+ sType: C.VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ allocationSize: memReqs.size,
+ memoryTypeIndex: C.uint32_t(memIdx),
+ }
+ var imgMem C.VkDeviceMemory
+ if err := vkErr(C.vkAllocateMemory(funcs.vkAllocateMemory, d, &memInf, nil, &imgMem)); err != nil {
+ DestroyImage(d, img)
+ return nilImage, nilDeviceMemory, fmt.Errorf("vulkan: vkAllocateMemory: %w", err)
+ }
+
+ if err := vkErr(C.vkBindImageMemory(funcs.vkBindImageMemory, d, img, imgMem, 0)); err != nil {
+ FreeMemory(d, imgMem)
+ DestroyImage(d, img)
+ return nilImage, nilDeviceMemory, fmt.Errorf("vulkan: vkBindImageMemory: %w", err)
+ }
+ return img, imgMem, nil
+}
+
+func DestroyImage(d Device, img Image) {
+ C.vkDestroyImage(funcs.vkDestroyImage, d, img, nil)
+}
+
+func FreeMemory(d Device, mem DeviceMemory) {
+ C.vkFreeMemory(funcs.vkFreeMemory, d, mem, nil)
+}
+
+func CreateSampler(d Device, minFilter, magFilter Filter) (Sampler, error) {
+ inf := C.VkSamplerCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
+ minFilter: minFilter,
+ magFilter: magFilter,
+ addressModeU: C.VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
+ addressModeV: C.VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
+ }
+ var s C.VkSampler
+ if err := vkErr(C.vkCreateSampler(funcs.vkCreateSampler, d, &inf, nil, &s)); err != nil {
+ return nilSampler, fmt.Errorf("vulkan: vkCreateSampler: %w", err)
+ }
+ return s, nil
+}
+
+func DestroySampler(d Device, sampler Sampler) {
+ C.vkDestroySampler(funcs.vkDestroySampler, d, sampler, nil)
+}
+
+func CreateBuffer(pd PhysicalDevice, d Device, size int, usage BufferUsageFlags, props MemoryPropertyFlags) (Buffer, DeviceMemory, error) {
+ inf := C.VkBufferCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
+ size: C.VkDeviceSize(size),
+ usage: usage,
+ }
+ var buf C.VkBuffer
+ if err := vkErr(C.vkCreateBuffer(funcs.vkCreateBuffer, d, &inf, nil, &buf)); err != nil {
+ return nilBuffer, nilDeviceMemory, fmt.Errorf("vulkan: vkCreateBuffer: %w", err)
+ }
+
+ var memReqs C.VkMemoryRequirements
+ C.vkGetBufferMemoryRequirements(funcs.vkGetBufferMemoryRequirements, d, buf, &memReqs)
+
+ memIdx, found := findMemoryTypeIndex(pd, memReqs.memoryTypeBits, props)
+ if !found {
+ DestroyBuffer(d, buf)
+ return nilBuffer, nilDeviceMemory, errors.New("vulkan: no memory suitable for buffers found")
+ }
+ memInf := C.VkMemoryAllocateInfo{
+ sType: C.VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ allocationSize: memReqs.size,
+ memoryTypeIndex: C.uint32_t(memIdx),
+ }
+
+ var mem C.VkDeviceMemory
+ if err := vkErr(C.vkAllocateMemory(funcs.vkAllocateMemory, d, &memInf, nil, &mem)); err != nil {
+ DestroyBuffer(d, buf)
+ return nilBuffer, nilDeviceMemory, fmt.Errorf("vulkan: vkAllocateMemory: %w", err)
+ }
+
+ if err := vkErr(C.vkBindBufferMemory(funcs.vkBindBufferMemory, d, buf, mem, 0)); err != nil {
+ FreeMemory(d, mem)
+ DestroyBuffer(d, buf)
+ return nilBuffer, nilDeviceMemory, fmt.Errorf("vulkan: vkBindBufferMemory: %w", err)
+ }
+ return buf, mem, nil
+}
+
+func DestroyBuffer(d Device, buf Buffer) {
+ C.vkDestroyBuffer(funcs.vkDestroyBuffer, d, buf, nil)
+}
+
+func CreateShaderModule(d Device, spirv string) (ShaderModule, error) {
+ ptr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&spirv)).Data)
+ inf := C.VkShaderModuleCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
+ codeSize: C.size_t(len(spirv)),
+ pCode: (*C.uint32_t)(ptr),
+ }
+
+ var mod C.VkShaderModule
+ if err := vkErr(C.vkCreateShaderModule(funcs.vkCreateShaderModule, d, inf, nil, &mod)); err != nil {
+ return nilShaderModule, fmt.Errorf("vulkan: vkCreateShaderModule: %w", err)
+ }
+ return mod, nil
+}
+
+func DestroyShaderModule(d Device, mod ShaderModule) {
+ C.vkDestroyShaderModule(funcs.vkDestroyShaderModule, d, mod, nil)
+}
+
+func CreateGraphicsPipeline(d Device, pass RenderPass, vmod, fmod ShaderModule, blend bool, srcFactor, dstFactor BlendFactor, topology PrimitiveTopology, bindings []VertexInputBindingDescription, attrs []VertexInputAttributeDescription, layout PipelineLayout) (Pipeline, error) {
+ main := C.CString("main")
+ defer C.free(unsafe.Pointer(main))
+ stages := []C.VkPipelineShaderStageCreateInfo{
+ {
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
+ stage: C.VK_SHADER_STAGE_VERTEX_BIT,
+ module: vmod,
+ pName: main,
+ },
+ {
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
+ stage: C.VK_SHADER_STAGE_FRAGMENT_BIT,
+ module: fmod,
+ pName: main,
+ },
+ }
+ dynStates := []C.VkDynamicState{C.VK_DYNAMIC_STATE_VIEWPORT}
+ dynInf := C.VkPipelineDynamicStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO,
+ dynamicStateCount: C.uint32_t(len(dynStates)),
+ pDynamicStates: &dynStates[0],
+ }
+ const maxDim = 0x7fffffff
+ scissors := []C.VkRect2D{{extent: C.VkExtent2D{width: maxDim, height: maxDim}}}
+ viewportInf := C.VkPipelineViewportStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO,
+ viewportCount: 1,
+ scissorCount: C.uint32_t(len(scissors)),
+ pScissors: &scissors[0],
+ }
+ enable := C.VkBool32(0)
+ if blend {
+ enable = 1
+ }
+ attBlendInf := C.VkPipelineColorBlendAttachmentState{
+ blendEnable: enable,
+ srcColorBlendFactor: srcFactor,
+ srcAlphaBlendFactor: srcFactor,
+ dstColorBlendFactor: dstFactor,
+ dstAlphaBlendFactor: dstFactor,
+ colorBlendOp: C.VK_BLEND_OP_ADD,
+ alphaBlendOp: C.VK_BLEND_OP_ADD,
+ colorWriteMask: C.VK_COLOR_COMPONENT_R_BIT | C.VK_COLOR_COMPONENT_G_BIT | C.VK_COLOR_COMPONENT_B_BIT | C.VK_COLOR_COMPONENT_A_BIT,
+ }
+ blendInf := C.VkPipelineColorBlendStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
+ attachmentCount: 1,
+ pAttachments: &attBlendInf,
+ }
+ var vkBinds []C.VkVertexInputBindingDescription
+ var vkAttrs []C.VkVertexInputAttributeDescription
+ for _, b := range bindings {
+ vkBinds = append(vkBinds, C.VkVertexInputBindingDescription{
+ binding: C.uint32_t(b.Binding),
+ stride: C.uint32_t(b.Stride),
+ })
+ }
+ for _, a := range attrs {
+ vkAttrs = append(vkAttrs, C.VkVertexInputAttributeDescription{
+ location: C.uint32_t(a.Location),
+ binding: C.uint32_t(a.Binding),
+ format: a.Format,
+ offset: C.uint32_t(a.Offset),
+ })
+ }
+ vertexInf := C.VkPipelineVertexInputStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
+ }
+ if n := len(vkBinds); n > 0 {
+ vertexInf.vertexBindingDescriptionCount = C.uint32_t(n)
+ vertexInf.pVertexBindingDescriptions = &vkBinds[0]
+ }
+ if n := len(vkAttrs); n > 0 {
+ vertexInf.vertexAttributeDescriptionCount = C.uint32_t(n)
+ vertexInf.pVertexAttributeDescriptions = &vkAttrs[0]
+ }
+ inf := C.VkGraphicsPipelineCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
+ stageCount: C.uint32_t(len(stages)),
+ pStages: &stages[0],
+ renderPass: pass,
+ layout: layout,
+ pRasterizationState: &C.VkPipelineRasterizationStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
+ lineWidth: 1.0,
+ },
+ pMultisampleState: &C.VkPipelineMultisampleStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
+ rasterizationSamples: C.VK_SAMPLE_COUNT_1_BIT,
+ },
+ pInputAssemblyState: &C.VkPipelineInputAssemblyStateCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
+ topology: topology,
+ },
+ }
+
+ var pipe C.VkPipeline
+ if err := vkErr(C.vkCreateGraphicsPipelines(funcs.vkCreateGraphicsPipelines, d, nilPipelineCache, inf, dynInf, blendInf, vertexInf, viewportInf, nil, &pipe)); err != nil {
+ return nilPipeline, fmt.Errorf("vulkan: vkCreateGraphicsPipelines: %w", err)
+ }
+ return pipe, nil
+}
+
+func DestroyPipeline(d Device, p Pipeline) {
+ C.vkDestroyPipeline(funcs.vkDestroyPipeline, d, p, nil)
+}
+
+func CreatePipelineLayout(d Device, pushRanges []PushConstantRange, sets []DescriptorSetLayout) (PipelineLayout, error) {
+ inf := C.VkPipelineLayoutCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
+ }
+ if n := len(sets); n > 0 {
+ inf.setLayoutCount = C.uint32_t(n)
+ inf.pSetLayouts = &sets[0]
+ }
+ if n := len(pushRanges); n > 0 {
+ inf.pushConstantRangeCount = C.uint32_t(n)
+ inf.pPushConstantRanges = &pushRanges[0]
+ }
+ var l C.VkPipelineLayout
+ if err := vkErr(C.vkCreatePipelineLayout(funcs.vkCreatePipelineLayout, d, inf, nil, &l)); err != nil {
+ return nilPipelineLayout, fmt.Errorf("vulkan: vkCreatePipelineLayout: %w", err)
+ }
+ return l, nil
+}
+
+func DestroyPipelineLayout(d Device, l PipelineLayout) {
+ C.vkDestroyPipelineLayout(funcs.vkDestroyPipelineLayout, d, l, nil)
+}
+
+func CreateDescriptorSetLayout(d Device, bindings []DescriptorSetLayoutBinding) (DescriptorSetLayout, error) {
+ var vkbinds []C.VkDescriptorSetLayoutBinding
+ for _, b := range bindings {
+ vkbinds = append(vkbinds, C.VkDescriptorSetLayoutBinding{
+ binding: C.uint32_t(b.Binding),
+ descriptorType: b.DescriptorType,
+ descriptorCount: 1,
+ stageFlags: b.StageFlags,
+ })
+ }
+ inf := C.VkDescriptorSetLayoutCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
+ }
+ if n := len(vkbinds); n > 0 {
+ inf.bindingCount = C.uint32_t(len(vkbinds))
+ inf.pBindings = &vkbinds[0]
+ }
+ var l C.VkDescriptorSetLayout
+ if err := vkErr(C.vkCreateDescriptorSetLayout(funcs.vkCreateDescriptorSetLayout, d, inf, nil, &l)); err != nil {
+ return nilDescriptorSetLayout, fmt.Errorf("vulkan: vkCreateDescriptorSetLayout: %w", err)
+ }
+ return l, nil
+}
+
+func DestroyDescriptorSetLayout(d Device, l DescriptorSetLayout) {
+ C.vkDestroyDescriptorSetLayout(funcs.vkDestroyDescriptorSetLayout, d, l, nil)
+}
+
+func MapMemory(d Device, mem DeviceMemory, offset, size int) ([]byte, error) {
+ var ptr unsafe.Pointer
+ if err := vkErr(C.vkMapMemory(funcs.vkMapMemory, d, mem, C.VkDeviceSize(offset), C.VkDeviceSize(size), 0, &ptr)); err != nil {
+ return nil, fmt.Errorf("vulkan: vkMapMemory: %w", err)
+ }
+ return ((*[1 << 30]byte)(ptr))[:size:size], nil
+}
+
+func UnmapMemory(d Device, mem DeviceMemory) {
+ C.vkUnmapMemory(funcs.vkUnmapMemory, d, mem)
+}
+
+func ResetCommandBuffer(buf CommandBuffer) error {
+ if err := vkErr(C.vkResetCommandBuffer(funcs.vkResetCommandBuffer, buf, 0)); err != nil {
+ return fmt.Errorf("vulkan: vkResetCommandBuffer. %w", err)
+ }
+ return nil
+}
+
+func CreateDescriptorPool(d Device, maxSets int, sizes []DescriptorPoolSize) (DescriptorPool, error) {
+ inf := C.VkDescriptorPoolCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
+ maxSets: C.uint32_t(maxSets),
+ poolSizeCount: C.uint32_t(len(sizes)),
+ pPoolSizes: &sizes[0],
+ }
+ var pool C.VkDescriptorPool
+ if err := vkErr(C.vkCreateDescriptorPool(funcs.vkCreateDescriptorPool, d, inf, nil, &pool)); err != nil {
+ return nilDescriptorPool, fmt.Errorf("vulkan: vkCreateDescriptorPool: %w", err)
+ }
+ return pool, nil
+}
+
+func DestroyDescriptorPool(d Device, pool DescriptorPool) {
+ C.vkDestroyDescriptorPool(funcs.vkDestroyDescriptorPool, d, pool, nil)
+}
+
+func ResetDescriptorPool(d Device, pool DescriptorPool) error {
+ if err := vkErr(C.vkResetDescriptorPool(funcs.vkResetDescriptorPool, d, pool, 0)); err != nil {
+ return fmt.Errorf("vulkan: vkResetDescriptorPool: %w", err)
+ }
+ return nil
+}
+
+func UpdateDescriptorSet(d Device, write WriteDescriptorSet) {
+ C.vkUpdateDescriptorSets(funcs.vkUpdateDescriptorSets, d, write, 0, nil)
+}
+
+func AllocateDescriptorSet(d Device, pool DescriptorPool, layout DescriptorSetLayout) (DescriptorSet, error) {
+ inf := C.VkDescriptorSetAllocateInfo{
+ sType: C.VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
+ descriptorPool: pool,
+ descriptorSetCount: 1,
+ pSetLayouts: &layout,
+ }
+ var set C.VkDescriptorSet
+ if err := vkErr(C.vkAllocateDescriptorSets(funcs.vkAllocateDescriptorSets, d, inf, &set)); err != nil {
+ return nilDescriptorSet, fmt.Errorf("vulkan: vkAllocateDescriptorSets: %w", err)
+ }
+ return set, nil
+}
+
+func CreateComputePipeline(d Device, mod ShaderModule, layout PipelineLayout) (Pipeline, error) {
+ main := C.CString("main")
+ defer C.free(unsafe.Pointer(main))
+ inf := C.VkComputePipelineCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
+ stage: C.VkPipelineShaderStageCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
+ stage: C.VK_SHADER_STAGE_COMPUTE_BIT,
+ module: mod,
+ pName: main,
+ },
+ layout: layout,
+ }
+ var pipe C.VkPipeline
+ if err := vkErr(C.vkCreateComputePipelines(funcs.vkCreateComputePipelines, d, nilPipelineCache, 1, &inf, nil, &pipe)); err != nil {
+ return nilPipeline, fmt.Errorf("vulkan: vkCreateComputePipelines: %w", err)
+ }
+ return pipe, nil
+}
+
+func CreateFence(d Device) (Fence, error) {
+ inf := C.VkFenceCreateInfo{
+ sType: C.VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
+ }
+ var f C.VkFence
+ if err := vkErr(C.vkCreateFence(funcs.vkCreateFence, d, &inf, nil, &f)); err != nil {
+ return nilFence, fmt.Errorf("vulkan: vkCreateFence: %w", err)
+ }
+ return f, nil
+}
+
+func DestroyFence(d Device, f Fence) {
+ C.vkDestroyFence(funcs.vkDestroyFence, d, f, nil)
+}
+
+func WaitForFences(d Device, fences ...Fence) error {
+ if len(fences) == 0 {
+ return nil
+ }
+ err := vkErr(C.vkWaitForFences(funcs.vkWaitForFences, d, C.uint32_t(len(fences)), &fences[0], C.VK_TRUE, 0xffffffffffffffff))
+ if err != nil {
+ return fmt.Errorf("vulkan: vkWaitForFences: %w", err)
+ }
+ return nil
+}
+
+func ResetFences(d Device, fences ...Fence) error {
+ if len(fences) == 0 {
+ return nil
+ }
+ err := vkErr(C.vkResetFences(funcs.vkResetFences, d, C.uint32_t(len(fences)), &fences[0]))
+ if err != nil {
+ return fmt.Errorf("vulkan: vkResetFences: %w", err)
+ }
+ return nil
+}
+
+func BuildSubpassDependency(srcStage, dstStage PipelineStageFlags, srcMask, dstMask AccessFlags, flags DependencyFlags) SubpassDependency {
+ return C.VkSubpassDependency{
+ srcSubpass: C.VK_SUBPASS_EXTERNAL,
+ srcStageMask: srcStage,
+ srcAccessMask: srcMask,
+ dstSubpass: 0,
+ dstStageMask: dstStage,
+ dstAccessMask: dstMask,
+ dependencyFlags: flags,
+ }
+}
+
+func BuildPushConstantRange(stages ShaderStageFlags, offset, size int) PushConstantRange {
+ return C.VkPushConstantRange{
+ stageFlags: stages,
+ offset: C.uint32_t(offset),
+ size: C.uint32_t(size),
+ }
+}
+
+func BuildDescriptorPoolSize(typ DescriptorType, count int) DescriptorPoolSize {
+ return C.VkDescriptorPoolSize{
+ _type: typ,
+ descriptorCount: C.uint32_t(count),
+ }
+}
+
+func BuildWriteDescriptorSetImage(set DescriptorSet, binding int, typ DescriptorType, sampler Sampler, view ImageView, layout ImageLayout) WriteDescriptorSet {
+ return C.VkWriteDescriptorSet{
+ sType: C.VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ dstSet: set,
+ dstBinding: C.uint32_t(binding),
+ descriptorCount: 1,
+ descriptorType: typ,
+ pImageInfo: &C.VkDescriptorImageInfo{
+ sampler: sampler,
+ imageView: view,
+ imageLayout: layout,
+ },
+ }
+}
+
+func BuildWriteDescriptorSetBuffer(set DescriptorSet, binding int, typ DescriptorType, buf Buffer) WriteDescriptorSet {
+ return C.VkWriteDescriptorSet{
+ sType: C.VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
+ dstSet: set,
+ dstBinding: C.uint32_t(binding),
+ descriptorCount: 1,
+ descriptorType: typ,
+ pBufferInfo: &C.VkDescriptorBufferInfo{
+ buffer: buf,
+ _range: C.VK_WHOLE_SIZE,
+ },
+ }
+}
+
+func (r PushConstantRange) StageFlags() ShaderStageFlags {
+ return r.stageFlags
+}
+
+func (r PushConstantRange) Offset() int {
+ return int(r.offset)
+}
+
+func (r PushConstantRange) Size() int {
+ return int(r.size)
+}
+
+func (p QueueFamilyProperties) Flags() QueueFlags {
+ return p.queueFlags
+}
+
+func (c SurfaceCapabilities) MinExtent() image.Point {
+ return image.Pt(int(c.minImageExtent.width), int(c.minImageExtent.height))
+}
+
+func (c SurfaceCapabilities) MaxExtent() image.Point {
+ return image.Pt(int(c.maxImageExtent.width), int(c.maxImageExtent.height))
+}
+
+func BuildViewport(x, y, width, height float32) Viewport {
+ return C.VkViewport{
+ x: C.float(x),
+ y: C.float(y),
+ width: C.float(width),
+ height: C.float(height),
+ maxDepth: 1.0,
+ }
+}
+
+func BuildImageMemoryBarrier(img Image, srcMask, dstMask AccessFlags, oldLayout, newLayout ImageLayout) ImageMemoryBarrier {
+ return C.VkImageMemoryBarrier{
+ sType: C.VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
+ srcAccessMask: srcMask,
+ dstAccessMask: dstMask,
+ oldLayout: oldLayout,
+ newLayout: newLayout,
+ image: img,
+ subresourceRange: C.VkImageSubresourceRange{
+ aspectMask: C.VK_IMAGE_ASPECT_COLOR_BIT,
+ levelCount: C.VK_REMAINING_MIP_LEVELS,
+ layerCount: C.VK_REMAINING_ARRAY_LAYERS,
+ },
+ }
+}
+
+func BuildBufferMemoryBarrier(buf Buffer, srcMask, dstMask AccessFlags) BufferMemoryBarrier {
+ return C.VkBufferMemoryBarrier{
+ sType: C.VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER,
+ srcAccessMask: srcMask,
+ dstAccessMask: dstMask,
+ buffer: buf,
+ size: C.VK_WHOLE_SIZE,
+ }
+}
+
+func BuildMemoryBarrier(srcMask, dstMask AccessFlags) MemoryBarrier {
+ return C.VkMemoryBarrier{
+ sType: C.VK_STRUCTURE_TYPE_MEMORY_BARRIER,
+ srcAccessMask: srcMask,
+ dstAccessMask: dstMask,
+ }
+}
+
+func BuildBufferImageCopy(bufOff, bufStride, x, y, width, height int) BufferImageCopy {
+ return C.VkBufferImageCopy{
+ bufferOffset: C.VkDeviceSize(bufOff),
+ bufferRowLength: C.uint32_t(bufStride),
+ imageSubresource: C.VkImageSubresourceLayers{
+ aspectMask: C.VK_IMAGE_ASPECT_COLOR_BIT,
+ layerCount: 1,
+ },
+ imageOffset: C.VkOffset3D{
+ x: C.int32_t(x), y: C.int32_t(y), z: 0,
+ },
+ imageExtent: C.VkExtent3D{
+ width: C.uint32_t(width), height: C.uint32_t(height), depth: 1,
+ },
+ }
+}
+
+func BuildImageCopy(srcX, srcY, dstX, dstY, width, height int) ImageCopy {
+ return C.VkImageCopy{
+ srcSubresource: C.VkImageSubresourceLayers{
+ aspectMask: C.VK_IMAGE_ASPECT_COLOR_BIT,
+ layerCount: 1,
+ },
+ srcOffset: C.VkOffset3D{
+ x: C.int32_t(srcX),
+ y: C.int32_t(srcY),
+ },
+ dstSubresource: C.VkImageSubresourceLayers{
+ aspectMask: C.VK_IMAGE_ASPECT_COLOR_BIT,
+ layerCount: 1,
+ },
+ dstOffset: C.VkOffset3D{
+ x: C.int32_t(dstX),
+ y: C.int32_t(dstY),
+ },
+ extent: C.VkExtent3D{
+ width: C.uint32_t(width),
+ height: C.uint32_t(height),
+ depth: 1,
+ },
+ }
+}
+
+func findMemoryTypeIndex(pd C.VkPhysicalDevice, constraints C.uint32_t, wantProps C.VkMemoryPropertyFlags) (int, bool) {
+ var memProps C.VkPhysicalDeviceMemoryProperties
+ C.vkGetPhysicalDeviceMemoryProperties(funcs.vkGetPhysicalDeviceMemoryProperties, pd, &memProps)
+
+ for i := 0; i < int(memProps.memoryTypeCount); i++ {
+ if (constraints & (1 << i)) == 0 {
+ continue
+ }
+ if (memProps.memoryTypes[i].propertyFlags & wantProps) != wantProps {
+ continue
+ }
+ return i, true
+ }
+
+ return 0, false
+}
+
+func choosePresentMode(pd C.VkPhysicalDevice, surf Surface) (C.VkPresentModeKHR, bool, error) {
+ var count C.uint32_t
+ err := vkErr(C.vkGetPhysicalDeviceSurfacePresentModesKHR(funcs.vkGetPhysicalDeviceSurfacePresentModesKHR, pd, surf, &count, nil))
+ if err != nil {
+ return 0, false, fmt.Errorf("vulkan: vkGetPhysicalDeviceSurfacePresentModesKHR: %w", err)
+ }
+ if count == 0 {
+ return 0, false, nil
+ }
+ modes := make([]C.VkPresentModeKHR, count)
+ err = vkErr(C.vkGetPhysicalDeviceSurfacePresentModesKHR(funcs.vkGetPhysicalDeviceSurfacePresentModesKHR, pd, surf, &count, &modes[0]))
+ if err != nil {
+ return 0, false, fmt.Errorf("vulkan: kGetPhysicalDeviceSurfacePresentModesKHR: %w", err)
+ }
+ for _, m := range modes {
+ if m == C.VK_PRESENT_MODE_MAILBOX_KHR || m == C.VK_PRESENT_MODE_FIFO_KHR {
+ return m, true, nil
+ }
+ }
+ return 0, false, nil
+}
+
+func chooseFormat(pd C.VkPhysicalDevice, surf Surface) (C.VkSurfaceFormatKHR, bool, error) {
+ var count C.uint32_t
+ err := vkErr(C.vkGetPhysicalDeviceSurfaceFormatsKHR(funcs.vkGetPhysicalDeviceSurfaceFormatsKHR, pd, surf, &count, nil))
+ if err != nil {
+ return C.VkSurfaceFormatKHR{}, false, fmt.Errorf("vulkan: vkGetPhysicalDeviceSurfaceFormatsKHR: %w", err)
+ }
+ if count == 0 {
+ return C.VkSurfaceFormatKHR{}, false, nil
+ }
+ formats := make([]C.VkSurfaceFormatKHR, count)
+ err = vkErr(C.vkGetPhysicalDeviceSurfaceFormatsKHR(funcs.vkGetPhysicalDeviceSurfaceFormatsKHR, pd, surf, &count, &formats[0]))
+ if err != nil {
+ return C.VkSurfaceFormatKHR{}, false, fmt.Errorf("vulkan: vkGetPhysicalDeviceSurfaceFormatsKHR: %w", err)
+ }
+ // Query for format with sRGB support.
+ // TODO: Support devices without sRGB.
+ for _, f := range formats {
+ if f.colorSpace != C.VK_COLOR_SPACE_SRGB_NONLINEAR_KHR {
+ continue
+ }
+ switch f.format {
+ case C.VK_FORMAT_B8G8R8A8_SRGB, C.VK_FORMAT_R8G8B8A8_SRGB:
+ return f, true, nil
+ }
+ }
+ return C.VkSurfaceFormatKHR{}, false, nil
+}
+
+func chooseQueue(pd C.VkPhysicalDevice, surf Surface, flags C.VkQueueFlags) (int, bool, error) {
+ queues := GetPhysicalDeviceQueueFamilyProperties(pd)
+ for i, q := range queues {
+ // Check for presentation and feature support.
+ if q.queueFlags&flags != flags {
+ continue
+ }
+ if surf != nilSurface {
+ // Check for presentation support. It is possible that a device has no
+ // queue with both rendering and presentation support, but not in reality.
+ // See https://github.com/KhronosGroup/Vulkan-Docs/issues/1234.
+ var support C.VkBool32
+ if err := vkErr(C.vkGetPhysicalDeviceSurfaceSupportKHR(funcs.vkGetPhysicalDeviceSurfaceSupportKHR, pd, C.uint32_t(i), surf, &support)); err != nil {
+ return 0, false, fmt.Errorf("vulkan: vkGetPhysicalDeviceSurfaceSupportKHR: %w", err)
+ }
+ if support != C.VK_TRUE {
+ continue
+ }
+ }
+ return i, true, nil
+ }
+ return 0, false, nil
+}
+
+func dlsym(handle unsafe.Pointer, s string) unsafe.Pointer {
+ cs := C.CString(s)
+ defer C.free(unsafe.Pointer(cs))
+ return C.dlsym(handle, cs)
+}
+
+func dlopen(lib string) unsafe.Pointer {
+ clib := C.CString(lib)
+ defer C.free(unsafe.Pointer(clib))
+ return C.dlopen(clib, C.RTLD_NOW|C.RTLD_LOCAL)
+}
+
+func vkErr(res C.VkResult) error {
+ switch res {
+ case C.VK_SUCCESS:
+ return nil
+ default:
+ return Error(res)
+ }
+}
+
+func (e Error) Error() string {
+ return fmt.Sprintf("error %d", e)
+}
diff --git a/vendor/gioui.org/internal/vk/vulkan_android.go b/vendor/gioui.org/internal/vk/vulkan_android.go
new file mode 100644
index 0000000..143146e
--- /dev/null
+++ b/vendor/gioui.org/internal/vk/vulkan_android.go
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build !nowayland
+// +build !nowayland
+
+package vk
+
+/*
+#define VK_USE_PLATFORM_ANDROID_KHR
+#define VK_NO_PROTOTYPES 1
+#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#include <android/native_window.h>
+#include <vulkan/vulkan.h>
+
+static VkResult vkCreateAndroidSurfaceKHR(PFN_vkCreateAndroidSurfaceKHR f, VkInstance instance, const VkAndroidSurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
+ return f(instance, pCreateInfo, pAllocator, pSurface);
+}
+*/
+import "C"
+import (
+ "fmt"
+ "unsafe"
+)
+
+var wlFuncs struct {
+ vkCreateAndroidSurfaceKHR C.PFN_vkCreateAndroidSurfaceKHR
+}
+
+func init() {
+ loadFuncs = append(loadFuncs, func(dlopen func(name string) *[0]byte) {
+ wlFuncs.vkCreateAndroidSurfaceKHR = dlopen("vkCreateAndroidSurfaceKHR")
+ })
+}
+
+func CreateAndroidSurface(inst Instance, window unsafe.Pointer) (Surface, error) {
+ inf := C.VkAndroidSurfaceCreateInfoKHR{
+ sType: C.VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR,
+ window: (*C.ANativeWindow)(window),
+ }
+ var surf Surface
+ if err := vkErr(C.vkCreateAndroidSurfaceKHR(wlFuncs.vkCreateAndroidSurfaceKHR, inst, &inf, nil, &surf)); err != nil {
+ return 0, fmt.Errorf("vulkan: vkCreateAndroidSurfaceKHR: %w", err)
+ }
+ return surf, nil
+}
diff --git a/vendor/gioui.org/internal/vk/vulkan_wayland.go b/vendor/gioui.org/internal/vk/vulkan_wayland.go
new file mode 100644
index 0000000..cb057bc
--- /dev/null
+++ b/vendor/gioui.org/internal/vk/vulkan_wayland.go
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build ((linux && !android) || freebsd) && !nowayland
+// +build linux,!android freebsd
+// +build !nowayland
+
+package vk
+
+/*
+#define VK_USE_PLATFORM_WAYLAND_KHR
+#define VK_NO_PROTOTYPES 1
+#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#include <vulkan/vulkan.h>
+
+static VkResult vkCreateWaylandSurfaceKHR(PFN_vkCreateWaylandSurfaceKHR f, VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
+ return f(instance, pCreateInfo, pAllocator, pSurface);
+}
+*/
+import "C"
+import (
+ "fmt"
+ "unsafe"
+)
+
+var wlFuncs struct {
+ vkCreateWaylandSurfaceKHR C.PFN_vkCreateWaylandSurfaceKHR
+}
+
+func init() {
+ loadFuncs = append(loadFuncs, func(dlopen func(name string) *[0]byte) {
+ wlFuncs.vkCreateWaylandSurfaceKHR = dlopen("vkCreateWaylandSurfaceKHR")
+ })
+}
+
+func CreateWaylandSurface(inst Instance, disp unsafe.Pointer, wlSurf unsafe.Pointer) (Surface, error) {
+ inf := C.VkWaylandSurfaceCreateInfoKHR{
+ sType: C.VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR,
+ display: (*C.struct_wl_display)(disp),
+ surface: (*C.struct_wl_surface)(wlSurf),
+ }
+ var surf Surface
+ if err := vkErr(C.vkCreateWaylandSurfaceKHR(wlFuncs.vkCreateWaylandSurfaceKHR, inst, &inf, nil, &surf)); err != nil {
+ return 0, fmt.Errorf("vulkan: vkCreateWaylandSurfaceKHR: %w", err)
+ }
+ return surf, nil
+}
diff --git a/vendor/gioui.org/internal/vk/vulkan_x11.go b/vendor/gioui.org/internal/vk/vulkan_x11.go
new file mode 100644
index 0000000..780a5d5
--- /dev/null
+++ b/vendor/gioui.org/internal/vk/vulkan_x11.go
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build ((linux && !android) || freebsd) && !nox11
+// +build linux,!android freebsd
+// +build !nox11
+
+package vk
+
+/*
+#define VK_USE_PLATFORM_XLIB_KHR
+#define VK_NO_PROTOTYPES 1
+#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#include <vulkan/vulkan.h>
+
+static VkResult vkCreateXlibSurfaceKHR(PFN_vkCreateXlibSurfaceKHR f, VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
+ return f(instance, pCreateInfo, pAllocator, pSurface);
+}
+*/
+import "C"
+import (
+ "fmt"
+ "unsafe"
+)
+
+var x11Funcs struct {
+ vkCreateXlibSurfaceKHR C.PFN_vkCreateXlibSurfaceKHR
+}
+
+func init() {
+ loadFuncs = append(loadFuncs, func(dlopen func(name string) *[0]byte) {
+ x11Funcs.vkCreateXlibSurfaceKHR = dlopen("vkCreateXlibSurfaceKHR")
+ })
+}
+
+func CreateXlibSurface(inst Instance, dpy unsafe.Pointer, window uintptr) (Surface, error) {
+ inf := C.VkXlibSurfaceCreateInfoKHR{
+ sType: C.VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR,
+ dpy: (*C.Display)(dpy),
+ window: (C.Window)(window),
+ }
+ var surf Surface
+ if err := vkErr(C.vkCreateXlibSurfaceKHR(x11Funcs.vkCreateXlibSurfaceKHR, inst, &inf, nil, &surf)); err != nil {
+ return 0, fmt.Errorf("vulkan: vkCreateXlibSurfaceKHR: %w", err)
+ }
+ return surf, nil
+}
diff --git a/vendor/gioui.org/io/clipboard/clipboard.go b/vendor/gioui.org/io/clipboard/clipboard.go
new file mode 100644
index 0000000..ae4a435
--- /dev/null
+++ b/vendor/gioui.org/io/clipboard/clipboard.go
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package clipboard
+
+import (
+ "gioui.org/internal/ops"
+ "gioui.org/io/event"
+ "gioui.org/op"
+)
+
+// Event is generated when the clipboard content is requested.
+type Event struct {
+ Text string
+}
+
+// ReadOp requests the text of the clipboard, delivered to
+// the current handler through an Event.
+type ReadOp struct {
+ Tag event.Tag
+}
+
+// WriteOp copies Text to the clipboard.
+type WriteOp struct {
+ Text string
+}
+
+func (h ReadOp) Add(o *op.Ops) {
+ data := ops.Write1(&o.Internal, ops.TypeClipboardReadLen, h.Tag)
+ data[0] = byte(ops.TypeClipboardRead)
+}
+
+func (h WriteOp) Add(o *op.Ops) {
+ data := ops.Write1(&o.Internal, ops.TypeClipboardWriteLen, &h.Text)
+ data[0] = byte(ops.TypeClipboardWrite)
+}
+
+func (Event) ImplementsEvent() {}
diff --git a/vendor/gioui.org/io/key/key.go b/vendor/gioui.org/io/key/key.go
index 5729ae4..b6af2a4 100644
--- a/vendor/gioui.org/io/key/key.go
+++ b/vendor/gioui.org/io/key/key.go
@@ -10,25 +10,35 @@ events.
package key
import (
+ "fmt"
"strings"
- "gioui.org/internal/opconst"
+ "gioui.org/internal/ops"
"gioui.org/io/event"
"gioui.org/op"
)
// InputOp declares a handler ready for key events.
// Key events are in general only delivered to the
-// focused key handler. Set the Focus flag to request
-// the focus.
+// focused key handler.
type InputOp struct {
- Tag event.Tag
- Focus bool
+ Tag event.Tag
+ Hint InputHint
}
-// HideInputOp request that any on screen text input
-// be hidden.
-type HideInputOp struct{}
+// SoftKeyboardOp shows or hide the on-screen keyboard, if available.
+// It replaces any previous SoftKeyboardOp.
+type SoftKeyboardOp struct {
+ Show bool
+}
+
+// FocusOp sets or clears the keyboard focus. It replaces any previous
+// FocusOp in the same frame.
+type FocusOp struct {
+ // Tag is the new focus. The focus is cleared if Tag is nil, or if Tag
+ // has no InputOp in the same frame.
+ Tag event.Tag
+}
// A FocusEvent is generated when a handler gains or loses
// focus.
@@ -46,6 +56,8 @@ type Event struct {
Name string
// Modifiers is the set of active modifiers when the key was pressed.
Modifiers Modifiers
+ // State is the state of the key when the event was fired.
+ State State
}
// An EditEvent is generated when text is input.
@@ -53,6 +65,38 @@ type EditEvent struct {
Text string
}
+// InputHint changes the on-screen-keyboard type. That hints the
+// type of data that might be entered by the user.
+type InputHint uint8
+
+const (
+ // HintAny hints that any input is expected.
+ HintAny InputHint = iota
+ // HintText hints that text input is expected. It may activate auto-correction and suggestions.
+ HintText
+ // HintNumeric hints that numeric input is expected. It may activate shortcuts for 0-9, "." and ",".
+ HintNumeric
+ // HintEmail hints that email input is expected. It may activate shortcuts for common email characters, such as "@" and ".com".
+ HintEmail
+ // HintURL hints that URL input is expected. It may activate shortcuts for common URL fragments such as "/" and ".com".
+ HintURL
+ // HintTelephone hints that telephone number input is expected. It may activate shortcuts for 0-9, "#" and "*".
+ HintTelephone
+)
+
+// State is the state of a key during an event.
+type State uint8
+
+const (
+ // Press is the state of a pressed key.
+ Press State = iota
+ // Release is the state of a key that has been released.
+ //
+ // Note: release events are only implemented on the following platforms:
+ // macOS, Linux, Windows, WebAssembly.
+ Release
+)
+
// Modifiers
type Modifiers uint32
@@ -88,6 +132,7 @@ const (
NamePageUp = "⇞"
NamePageDown = "⇟"
NameTab = "⇥"
+ NameSpace = "Space"
)
// Contain reports whether m contains all modifiers
@@ -97,16 +142,25 @@ func (m Modifiers) Contain(m2 Modifiers) bool {
}
func (h InputOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypeKeyInputLen, h.Tag)
- data[0] = byte(opconst.TypeKeyInput)
- if h.Focus {
+ if h.Tag == nil {
+ panic("Tag must be non-nil")
+ }
+ data := ops.Write1(&o.Internal, ops.TypeKeyInputLen, h.Tag)
+ data[0] = byte(ops.TypeKeyInput)
+ data[1] = byte(h.Hint)
+}
+
+func (h SoftKeyboardOp) Add(o *op.Ops) {
+ data := ops.Write(&o.Internal, ops.TypeKeySoftKeyboardLen)
+ data[0] = byte(ops.TypeKeySoftKeyboard)
+ if h.Show {
data[1] = 1
}
}
-func (h HideInputOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypeHideInputLen)
- data[0] = byte(opconst.TypeHideInput)
+func (h FocusOp) Add(o *op.Ops) {
+ data := ops.Write1(&o.Internal, ops.TypeKeyFocusLen, h.Tag)
+ data[0] = byte(ops.TypeKeyFocus)
}
func (EditEvent) ImplementsEvent() {}
@@ -114,25 +168,36 @@ func (Event) ImplementsEvent() {}
func (FocusEvent) ImplementsEvent() {}
func (e Event) String() string {
- return "{" + string(e.Name) + " " + e.Modifiers.String() + "}"
+ return fmt.Sprintf("%v %v %v}", e.Name, e.Modifiers, e.State)
}
func (m Modifiers) String() string {
var strs []string
if m.Contain(ModCtrl) {
- strs = append(strs, "ModCtrl")
+ strs = append(strs, "Ctrl")
}
if m.Contain(ModCommand) {
- strs = append(strs, "ModCommand")
+ strs = append(strs, "Command")
}
if m.Contain(ModShift) {
- strs = append(strs, "ModShift")
+ strs = append(strs, "Shift")
}
if m.Contain(ModAlt) {
- strs = append(strs, "ModAlt")
+ strs = append(strs, "Alt")
}
if m.Contain(ModSuper) {
- strs = append(strs, "ModSuper")
+ strs = append(strs, "Super")
}
return strings.Join(strs, "|")
}
+
+func (s State) String() string {
+ switch s {
+ case Press:
+ return "Press"
+ case Release:
+ return "Release"
+ default:
+ panic("invalid State")
+ }
+}
diff --git a/vendor/gioui.org/io/key/mod.go b/vendor/gioui.org/io/key/mod.go
index c5db56c..4b23d32 100644
--- a/vendor/gioui.org/io/key/mod.go
+++ b/vendor/gioui.org/io/key/mod.go
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
+//go:build !darwin
// +build !darwin
package key
diff --git a/vendor/gioui.org/io/pointer/doc.go b/vendor/gioui.org/io/pointer/doc.go
index b99d97d..2f521c2 100644
--- a/vendor/gioui.org/io/pointer/doc.go
+++ b/vendor/gioui.org/io/pointer/doc.go
@@ -25,63 +25,67 @@ Leave, or Scroll):
Cancel events are always delivered.
-Areas
+Hit areas
-The area operations are used for specifying the area where
-subsequent InputOp are active.
+Clip operations from package op/clip are used for specifying
+hit areas where subsequent InputOps are active.
-For example, to set up a rectangular hit area:
+For example, to set up a handler with a rectangular hit area:
r := image.Rectangle{...}
- pointer.Rect(r).Add(ops)
+ area := clip.Rect(r).Push(ops)
pointer.InputOp{Tag: h}.Add(ops)
+ area.Pop()
-Note that areas compound: the effective area of multiple area
-operations is the intersection of the areas.
+Note that hit areas behave similar to painting: the effective area of a stack
+of multiple area operations is the intersection of the areas.
+
+BUG: Clip operations other than clip.Rect and clip.Ellipse are approximated
+with their bounding boxes.
Matching events
-StackOp operations and input handlers form an implicit tree.
-Each stack operation is a node, and each input handler is associated
-with the most recent node.
+Areas form an implicit tree, with input handlers as leaves. The children of
+an area is every area and handler added between its Push and corresponding Pop.
For example:
ops := new(op.Ops)
- var stack op.StackOp
var h1, h2 *Handler
- stack := op.Push(ops)
+ area := clip.Rect(...).Push(ops)
pointer.InputOp{Tag: h1}.Add(Ops)
- stack.Pop()
+ area.Pop()
- stack = op.Push(ops)
+ area := clip.Rect(...).Push(ops)
pointer.InputOp{Tag: h2}.Add(ops)
- stack.Pop()
+ area.Pop()
+
+implies a tree of two inner nodes, each with one pointer handler attached.
-implies a tree of two inner nodes, each with one pointer handler.
+The matching proceeds as follows.
-When determining which handlers match an Event, only handlers whose
-areas contain the event position are considered. The matching
-proceeds as follows.
+First, the foremost area that contains the event is found. Only areas whose
+parent areas all contain the event is considered.
-First, the foremost matching handler is included. If the handler
-has pass-through enabled, this step is repeated.
+Then, every handler attached to the area is matched with the event.
-Then, all matching handlers from the current node and all parent
-nodes are included.
+If all attached handlers are marked pass-through or if no handlers are
+attached, the matching repeats with the next foremost (sibling) area. Otherwise
+the matching repeats with the parent area.
-In the example above, all events will go to h2 only even though both
-handlers have the same area (the entire screen).
+In the example above, all events will go to h2 because it and h1 are siblings
+and none are pass-through.
Pass-through
-The PassOp operations controls the pass-through setting. A handler's
-pass-through setting is recorded along with the InputOp.
+The PassOp operations controls the pass-through setting. All handlers added
+inside one or more PassOp scopes are marked pass-through.
-Pass-through handlers are useful for overlay widgets such as a hidden
-side drawer. When the user touches the side, both the (transparent)
-drawer handle and the interface below should receive pointer events.
+Pass-through is useful for overlay widgets. Consider a hidden side drawer: when
+the user touches the side, both the (transparent) drawer handle and the
+interface below should receive pointer events. This effect is achieved by
+marking the drawer handle pass-through.
Disambiguation
diff --git a/vendor/gioui.org/io/pointer/pointer.go b/vendor/gioui.org/io/pointer/pointer.go
index 3344d6b..97987f7 100644
--- a/vendor/gioui.org/io/pointer/pointer.go
+++ b/vendor/gioui.org/io/pointer/pointer.go
@@ -4,12 +4,13 @@ package pointer
import (
"encoding/binary"
+ "fmt"
"image"
"strings"
"time"
"gioui.org/f32"
- "gioui.org/internal/opconst"
+ "gioui.org/internal/ops"
"gioui.org/io/event"
"gioui.org/io/key"
"gioui.org/op"
@@ -41,12 +42,21 @@ type Event struct {
Modifiers key.Modifiers
}
-// AreaOp updates the hit area to the intersection of the current
-// hit area and the area. The area is transformed before applying
-// it.
-type AreaOp struct {
- kind areaKind
- rect image.Rectangle
+// PassOp sets the pass-through mode. InputOps added while the pass-through
+// mode is set don't block events to siblings.
+type PassOp struct {
+}
+
+// PassStack represents a PassOp on the pass stack.
+type PassStack struct {
+ ops *ops.Ops
+ id ops.StackID
+ macroID int
+}
+
+// CursorNameOp sets the cursor for the current area.
+type CursorNameOp struct {
+ Name CursorName
}
// InputOp declares an input handler ready for pointer
@@ -58,17 +68,18 @@ type InputOp struct {
Grab bool
// Types is a bitwise-or of event types to receive.
Types Type
-}
-
-// PassOp sets the pass-through mode.
-type PassOp struct {
- Pass bool
+ // ScrollBounds describe the maximum scrollable distances in both
+ // axes. Specifically, any Event e delivered to Tag will satisfy
+ //
+ // ScrollBounds.Min.X <= e.Scroll.X <= ScrollBounds.Max.X (horizontal axis)
+ // ScrollBounds.Min.Y <= e.Scroll.Y <= ScrollBounds.Max.Y (vertical axis)
+ ScrollBounds image.Rectangle
}
type ID uint16
// Type of an Event.
-type Type uint8
+type Type uint
// Priority of an Event.
type Priority uint8
@@ -79,8 +90,27 @@ type Source uint8
// Buttons is a set of mouse buttons
type Buttons uint8
-// Must match app/internal/input.areaKind
-type areaKind uint8
+// CursorName is the name of a cursor.
+type CursorName string
+
+const (
+ // CursorDefault is the default cursor.
+ CursorDefault CursorName = ""
+ // CursorText is the cursor for text.
+ CursorText CursorName = "text"
+ // CursorPointer is the cursor for a link.
+ CursorPointer CursorName = "pointer"
+ // CursorCrossHair is the cursor for precise location.
+ CursorCrossHair CursorName = "crosshair"
+ // CursorColResize is the cursor for vertical resize.
+ CursorColResize CursorName = "col-resize"
+ // CursorRowResize is the cursor for horizontal resize.
+ CursorRowResize CursorName = "row-resize"
+ // CursorGrab is the cursor for moving object in any direction.
+ CursorGrab CursorName = "grab"
+ // CursorNone hides the cursor. To show it again, use any other cursor.
+ CursorNone CursorName = "none"
+)
const (
// A Cancel event is generated when the current gesture is
@@ -121,61 +151,90 @@ const (
)
const (
- ButtonLeft Buttons = 1 << iota
- ButtonRight
- ButtonMiddle
-)
-
-const (
- areaRect areaKind = iota
- areaEllipse
+ // ButtonPrimary is the primary button, usually the left button for a
+ // right-handed user.
+ ButtonPrimary Buttons = 1 << iota
+ // ButtonSecondary is the secondary button, usually the right button for a
+ // right-handed user.
+ ButtonSecondary
+ // ButtonTertiary is the tertiary button, usually the middle button.
+ ButtonTertiary
)
-// Rect constructs a rectangular hit area.
-func Rect(size image.Rectangle) AreaOp {
- return AreaOp{
- kind: areaRect,
- rect: size,
+// frect converts a rectangle to a f32.Rectangle.
+func frect(r image.Rectangle) f32.Rectangle {
+ return f32.Rectangle{
+ Min: fpt(r.Min), Max: fpt(r.Max),
}
}
-// Ellipse constructs an ellipsoid hit area.
-func Ellipse(size image.Rectangle) AreaOp {
- return AreaOp{
- kind: areaEllipse,
- rect: size,
+// fpt converts an point to a f32.Point.
+func fpt(p image.Point) f32.Point {
+ return f32.Point{
+ X: float32(p.X), Y: float32(p.Y),
}
}
-func (op AreaOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypeAreaLen)
- data[0] = byte(opconst.TypeArea)
- data[1] = byte(op.kind)
- bo := binary.LittleEndian
- bo.PutUint32(data[2:], uint32(op.rect.Min.X))
- bo.PutUint32(data[6:], uint32(op.rect.Min.Y))
- bo.PutUint32(data[10:], uint32(op.rect.Max.X))
- bo.PutUint32(data[14:], uint32(op.rect.Max.Y))
+// Push the current pass mode to the pass stack and set the pass mode.
+func (p PassOp) Push(o *op.Ops) PassStack {
+ id, mid := ops.PushOp(&o.Internal, ops.PassStack)
+ data := ops.Write(&o.Internal, ops.TypePassLen)
+ data[0] = byte(ops.TypePass)
+ return PassStack{ops: &o.Internal, id: id, macroID: mid}
}
-func (h InputOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypePointerInputLen, h.Tag)
- data[0] = byte(opconst.TypePointerInput)
- if h.Grab {
- data[1] = 1
- }
- data[2] = byte(h.Types)
+func (p PassStack) Pop() {
+ ops.PopOp(p.ops, ops.PassStack, p.id, p.macroID)
+ data := ops.Write(p.ops, ops.TypePopPassLen)
+ data[0] = byte(ops.TypePopPass)
+}
+
+func (op CursorNameOp) Add(o *op.Ops) {
+ data := ops.Write1(&o.Internal, ops.TypeCursorLen, op.Name)
+ data[0] = byte(ops.TypeCursor)
}
-func (op PassOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypePassLen)
- data[0] = byte(opconst.TypePass)
- if op.Pass {
+// Add panics if the scroll range does not contain zero.
+func (op InputOp) Add(o *op.Ops) {
+ if op.Tag == nil {
+ panic("Tag must be non-nil")
+ }
+ if b := op.ScrollBounds; b.Min.X > 0 || b.Max.X < 0 || b.Min.Y > 0 || b.Max.Y < 0 {
+ panic(fmt.Errorf("invalid scroll range value %v", b))
+ }
+ if op.Types>>16 > 0 {
+ panic(fmt.Errorf("value in Types overflows uint16"))
+ }
+ data := ops.Write1(&o.Internal, ops.TypePointerInputLen, op.Tag)
+ data[0] = byte(ops.TypePointerInput)
+ if op.Grab {
data[1] = 1
}
+ bo := binary.LittleEndian
+ bo.PutUint16(data[2:], uint16(op.Types))
+ bo.PutUint32(data[4:], uint32(op.ScrollBounds.Min.X))
+ bo.PutUint32(data[8:], uint32(op.ScrollBounds.Min.Y))
+ bo.PutUint32(data[12:], uint32(op.ScrollBounds.Max.X))
+ bo.PutUint32(data[16:], uint32(op.ScrollBounds.Max.Y))
}
func (t Type) String() string {
+ if t == Cancel {
+ return "Cancel"
+ }
+ var buf strings.Builder
+ for tt := Type(1); tt > 0; tt <<= 1 {
+ if t&tt > 0 {
+ if buf.Len() > 0 {
+ buf.WriteByte('|')
+ }
+ buf.WriteString((t & tt).string())
+ }
+ }
+ return buf.String()
+}
+
+func (t Type) string() string {
switch t {
case Press:
return "Press"
@@ -230,16 +289,23 @@ func (b Buttons) Contain(buttons Buttons) bool {
func (b Buttons) String() string {
var strs []string
- if b.Contain(ButtonLeft) {
- strs = append(strs, "ButtonLeft")
+ if b.Contain(ButtonPrimary) {
+ strs = append(strs, "ButtonPrimary")
}
- if b.Contain(ButtonRight) {
- strs = append(strs, "ButtonRight")
+ if b.Contain(ButtonSecondary) {
+ strs = append(strs, "ButtonSecondary")
}
- if b.Contain(ButtonMiddle) {
- strs = append(strs, "ButtonMiddle")
+ if b.Contain(ButtonTertiary) {
+ strs = append(strs, "ButtonTertiary")
}
return strings.Join(strs, "|")
}
+func (c CursorName) String() string {
+ if c == CursorDefault {
+ return "default"
+ }
+ return string(c)
+}
+
func (Event) ImplementsEvent() {}
diff --git a/vendor/gioui.org/io/profile/profile.go b/vendor/gioui.org/io/profile/profile.go
index 24bf52b..b9a4476 100644
--- a/vendor/gioui.org/io/profile/profile.go
+++ b/vendor/gioui.org/io/profile/profile.go
@@ -5,7 +5,7 @@
package profile
import (
- "gioui.org/internal/opconst"
+ "gioui.org/internal/ops"
"gioui.org/io/event"
"gioui.org/op"
)
@@ -24,8 +24,8 @@ type Event struct {
}
func (p Op) Add(o *op.Ops) {
- data := o.Write(opconst.TypeProfileLen, p.Tag)
- data[0] = byte(opconst.TypeProfile)
+ data := ops.Write1(&o.Internal, ops.TypeProfileLen, p.Tag)
+ data[0] = byte(ops.TypeProfile)
}
func (p Event) ImplementsEvent() {}
diff --git a/vendor/gioui.org/io/router/clipboard.go b/vendor/gioui.org/io/router/clipboard.go
new file mode 100644
index 0000000..5f1623c
--- /dev/null
+++ b/vendor/gioui.org/io/router/clipboard.go
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package router
+
+import (
+ "gioui.org/io/event"
+)
+
+type clipboardQueue struct {
+ receivers map[event.Tag]struct{}
+ // request avoid read clipboard every frame while waiting.
+ requested bool
+ text *string
+}
+
+// WriteClipboard returns the most recent text to be copied
+// to the clipboard, if any.
+func (q *clipboardQueue) WriteClipboard() (string, bool) {
+ if q.text == nil {
+ return "", false
+ }
+ text := *q.text
+ q.text = nil
+ return text, true
+}
+
+// ReadClipboard reports if any new handler is waiting
+// to read the clipboard.
+func (q *clipboardQueue) ReadClipboard() bool {
+ if len(q.receivers) == 0 || q.requested {
+ return false
+ }
+ q.requested = true
+ return true
+}
+
+func (q *clipboardQueue) Push(e event.Event, events *handlerEvents) {
+ for r := range q.receivers {
+ events.Add(r, e)
+ delete(q.receivers, r)
+ }
+}
+
+func (q *clipboardQueue) ProcessWriteClipboard(refs []interface{}) {
+ q.text = refs[0].(*string)
+}
+
+func (q *clipboardQueue) ProcessReadClipboard(refs []interface{}) {
+ if q.receivers == nil {
+ q.receivers = make(map[event.Tag]struct{})
+ }
+ tag := refs[0].(event.Tag)
+ if _, ok := q.receivers[tag]; !ok {
+ q.receivers[tag] = struct{}{}
+ q.requested = false
+ }
+}
diff --git a/vendor/gioui.org/io/router/key.go b/vendor/gioui.org/io/router/key.go
index a64544b..9fef7dc 100644
--- a/vendor/gioui.org/io/router/key.go
+++ b/vendor/gioui.org/io/router/key.go
@@ -3,11 +3,8 @@
package router
import (
- "gioui.org/internal/opconst"
- "gioui.org/internal/ops"
"gioui.org/io/event"
"gioui.org/io/key"
- "gioui.org/op"
)
type TextInputState uint8
@@ -15,22 +12,25 @@ type TextInputState uint8
type keyQueue struct {
focus event.Tag
handlers map[event.Tag]*keyHandler
- reader ops.Reader
state TextInputState
+ hint key.InputHint
}
type keyHandler struct {
- active bool
+ // visible will be true if the InputOp is present
+ // in the current frame.
+ visible bool
+ new bool
+ hint key.InputHint
}
-type listenerPriority uint8
-
-const (
- priNone listenerPriority = iota
- priDefault
- priCurrentFocus
- priNewFocus
-)
+// keyCollector tracks state required to update a keyQueue
+// from key ops.
+type keyCollector struct {
+ q *keyQueue
+ focus event.Tag
+ changed bool
+}
const (
TextInputKeep TextInputState = iota
@@ -44,43 +44,60 @@ func (q *keyQueue) InputState() TextInputState {
return q.state
}
-func (q *keyQueue) Frame(root *op.Ops, events *handlerEvents) {
+// InputHint returns the input mode from the most recent key.InputOp.
+func (q *keyQueue) InputHint() (key.InputHint, bool) {
+ if q.focus == nil {
+ return q.hint, false
+ }
+ focused, ok := q.handlers[q.focus]
+ if !ok {
+ return q.hint, false
+ }
+ old := q.hint
+ q.hint = focused.hint
+ return q.hint, old != q.hint
+}
+
+func (q *keyQueue) Reset() {
if q.handlers == nil {
q.handlers = make(map[event.Tag]*keyHandler)
}
for _, h := range q.handlers {
- h.active = false
+ h.visible, h.new = false, false
}
- q.reader.Reset(root)
- focus, pri, hide := q.resolveFocus(events)
+ q.state = TextInputKeep
+}
+
+func (q *keyQueue) Frame(events *handlerEvents, collector keyCollector) {
for k, h := range q.handlers {
- if !h.active {
+ if !h.visible {
delete(q.handlers, k)
if q.focus == k {
+ // Remove the focus from the handler that is no longer visible.
q.focus = nil
- hide = true
+ q.state = TextInputClose
}
+ } else if h.new && k != collector.focus {
+ // Reset the handler on (each) first appearance, but don't trigger redraw.
+ events.AddNoRedraw(k, key.FocusEvent{Focus: false})
+ }
+ }
+ if collector.changed && collector.focus != nil {
+ if _, exists := q.handlers[collector.focus]; !exists {
+ collector.focus = nil
}
}
- if focus != q.focus {
+ if collector.changed && collector.focus != q.focus {
if q.focus != nil {
events.Add(q.focus, key.FocusEvent{Focus: false})
}
- q.focus = focus
+ q.focus = collector.focus
if q.focus != nil {
events.Add(q.focus, key.FocusEvent{Focus: true})
} else {
- hide = true
+ q.state = TextInputClose
}
}
- switch {
- case pri == priNewFocus:
- q.state = TextInputOpen
- case hide:
- q.state = TextInputClose
- default:
- q.state = TextInputKeep
- }
}
func (q *keyQueue) Push(e event.Event, events *handlerEvents) {
@@ -89,62 +106,38 @@ func (q *keyQueue) Push(e event.Event, events *handlerEvents) {
}
}
-func (q *keyQueue) resolveFocus(events *handlerEvents) (event.Tag, listenerPriority, bool) {
- var k event.Tag
- var pri listenerPriority
- var hide bool
-loop:
- for encOp, ok := q.reader.Decode(); ok; encOp, ok = q.reader.Decode() {
- switch opconst.OpType(encOp.Data[0]) {
- case opconst.TypeKeyInput:
- op := decodeKeyInputOp(encOp.Data, encOp.Refs)
- var newPri listenerPriority
- switch {
- case op.Focus:
- newPri = priNewFocus
- case op.Tag == q.focus:
- newPri = priCurrentFocus
- default:
- newPri = priDefault
- }
- // Switch focus if higher priority or if focus requested.
- if newPri.replaces(pri) {
- k, pri = op.Tag, newPri
- }
- h, ok := q.handlers[op.Tag]
- if !ok {
- h = new(keyHandler)
- q.handlers[op.Tag] = h
- // Reset the handler on (each) first appearance.
- events.Add(op.Tag, key.FocusEvent{Focus: false})
- }
- h.active = true
- case opconst.TypeHideInput:
- hide = true
- case opconst.TypePush:
- newK, newPri, h := q.resolveFocus(events)
- hide = hide || h
- if newPri.replaces(pri) {
- k, pri = newK, newPri
- }
- case opconst.TypePop:
- break loop
- }
- }
- return k, pri, hide
+func (k *keyCollector) focusOp(tag event.Tag) {
+ k.focus = tag
+ k.changed = true
}
-func (p listenerPriority) replaces(p2 listenerPriority) bool {
- // Favor earliest default focus or latest requested focus.
- return p > p2 || p == p2 && p == priNewFocus
+func (k *keyCollector) softKeyboard(show bool) {
+ if show {
+ k.q.state = TextInputOpen
+ } else {
+ k.q.state = TextInputClose
+ }
}
-func decodeKeyInputOp(d []byte, refs []interface{}) key.InputOp {
- if opconst.OpType(d[0]) != opconst.TypeKeyInput {
- panic("invalid op")
+func (k *keyCollector) inputOp(op key.InputOp) {
+ h, ok := k.q.handlers[op.Tag]
+ if !ok {
+ h = &keyHandler{new: true}
+ k.q.handlers[op.Tag] = h
}
- return key.InputOp{
- Tag: refs[0].(event.Tag),
- Focus: d[1] != 0,
+ h.visible = true
+ h.hint = op.Hint
+}
+
+func (t TextInputState) String() string {
+ switch t {
+ case TextInputKeep:
+ return "Keep"
+ case TextInputClose:
+ return "Close"
+ case TextInputOpen:
+ return "Open"
+ default:
+ panic("unexpected value")
}
}
diff --git a/vendor/gioui.org/io/router/pointer.go b/vendor/gioui.org/io/router/pointer.go
index 0d0977f..cb30f63 100644
--- a/vendor/gioui.org/io/router/pointer.go
+++ b/vendor/gioui.org/io/router/pointer.go
@@ -3,44 +3,65 @@
package router
import (
- "encoding/binary"
"image"
+ "io"
"gioui.org/f32"
- "gioui.org/internal/opconst"
"gioui.org/internal/ops"
"gioui.org/io/event"
"gioui.org/io/pointer"
- "gioui.org/op"
+ "gioui.org/io/semantic"
+ "gioui.org/io/transfer"
)
type pointerQueue struct {
- hitTree []hitNode
- areas []areaNode
- handlers map[event.Tag]*pointerHandler
- pointers []pointerInfo
- reader ops.Reader
+ hitTree []hitNode
+ areas []areaNode
+ cursors []cursorNode
+ cursor pointer.CursorName
+ handlers map[event.Tag]*pointerHandler
+ pointers []pointerInfo
+ transfers []io.ReadCloser // pending data transfers
scratch []event.Tag
+
+ semantic struct {
+ idsAssigned bool
+ lastID SemanticID
+ // contentIDs maps semantic content to a list of semantic IDs
+ // previously assigned. It is used to maintain stable IDs across
+ // frames.
+ contentIDs map[semanticContent][]semanticID
+ }
}
type hitNode struct {
next int
area int
- // Pass tracks the most recent PassOp mode.
- pass bool
// For handler nodes.
- tag event.Tag
+ tag event.Tag
+ pass bool
+}
+
+type cursorNode struct {
+ name pointer.CursorName
+ area int
}
type pointerInfo struct {
id pointer.ID
pressed bool
handlers []event.Tag
+ // last tracks the last pointer event received,
+ // used while processing frame events.
+ last pointer.Event
// entered tracks the tags that contain the pointer.
entered []event.Tag
+
+ dataSource event.Tag // dragging source tag
+ dataTarget event.Tag // dragging target tag
}
type pointerHandler struct {
@@ -48,80 +69,381 @@ type pointerHandler struct {
active bool
wantsGrab bool
types pointer.Type
+ // min and max horizontal/vertical scroll
+ scrollRange image.Rectangle
+
+ sourceMimes []string
+ targetMimes []string
+ offeredMime string
+ data io.ReadCloser
}
type areaOp struct {
kind areaKind
- rect image.Rectangle
+ rect f32.Rectangle
}
type areaNode struct {
trans f32.Affine2D
- next int
area areaOp
+
+ // Tree indices, with -1 being the sentinel.
+ parent int
+ firstChild int
+ lastChild int
+ sibling int
+
+ semantic struct {
+ valid bool
+ id SemanticID
+ content semanticContent
+ }
}
type areaKind uint8
+// collectState represents the state for pointerCollector.
+type collectState struct {
+ t f32.Affine2D
+ // nodePlusOne is the current node index, plus one to
+ // make the zero value collectState the initial state.
+ nodePlusOne int
+ pass int
+}
+
+// pointerCollector tracks the state needed to update an pointerQueue
+// from pointer ops.
+type pointerCollector struct {
+ q *pointerQueue
+ state collectState
+ nodeStack []int
+}
+
+type semanticContent struct {
+ tag event.Tag
+ label string
+ desc string
+ class semantic.ClassOp
+ gestures SemanticGestures
+ selected bool
+ disabled bool
+}
+
+type semanticID struct {
+ id SemanticID
+ used bool
+}
+
const (
areaRect areaKind = iota
areaEllipse
)
-func (q *pointerQueue) collectHandlers(r *ops.Reader, events *handlerEvents, t f32.Affine2D, area, node int, pass bool) {
- for encOp, ok := r.Decode(); ok; encOp, ok = r.Decode() {
- switch opconst.OpType(encOp.Data[0]) {
- case opconst.TypePush:
- q.collectHandlers(r, events, t, area, node, pass)
- case opconst.TypePop:
- return
- case opconst.TypePass:
- op := decodePassOp(encOp.Data)
- pass = op.Pass
- case opconst.TypeArea:
- var op areaOp
- op.Decode(encOp.Data)
- q.areas = append(q.areas, areaNode{trans: t, next: area, area: op})
- area = len(q.areas) - 1
- q.hitTree = append(q.hitTree, hitNode{
- next: node,
- area: area,
- pass: pass,
- })
- node = len(q.hitTree) - 1
- case opconst.TypeTransform:
- dop := ops.DecodeTransform(encOp.Data)
- t = t.Mul(dop)
- case opconst.TypePointerInput:
- op := decodePointerInputOp(encOp.Data, encOp.Refs)
- q.hitTree = append(q.hitTree, hitNode{
- next: node,
- area: area,
- pass: pass,
- tag: op.Tag,
- })
- node = len(q.hitTree) - 1
- h, ok := q.handlers[op.Tag]
- if !ok {
- h = new(pointerHandler)
- q.handlers[op.Tag] = h
- events.Add(op.Tag, pointer.Event{Type: pointer.Cancel})
- }
- h.active = true
- h.area = area
- h.wantsGrab = h.wantsGrab || op.Grab
- h.types = h.types | op.Types
+func (c *pointerCollector) resetState() {
+ c.state = collectState{}
+}
+
+func (c *pointerCollector) setTrans(t f32.Affine2D) {
+ c.state.t = t
+}
+
+func (c *pointerCollector) clip(op ops.ClipOp) {
+ kind := areaRect
+ if op.Shape == ops.Ellipse {
+ kind = areaEllipse
+ }
+ c.pushArea(kind, frect(op.Bounds))
+}
+
+func (c *pointerCollector) pushArea(kind areaKind, bounds f32.Rectangle) {
+ parentID := c.currentArea()
+ areaID := len(c.q.areas)
+ areaOp := areaOp{kind: kind, rect: bounds}
+ if parentID != -1 {
+ parent := &c.q.areas[parentID]
+ if parent.firstChild == -1 {
+ parent.firstChild = areaID
+ }
+ if siblingID := parent.lastChild; siblingID != -1 {
+ c.q.areas[siblingID].sibling = areaID
+ }
+ parent.lastChild = areaID
+ }
+ an := areaNode{
+ trans: c.state.t,
+ area: areaOp,
+ parent: parentID,
+ sibling: -1,
+ firstChild: -1,
+ lastChild: -1,
+ }
+
+ c.q.areas = append(c.q.areas, an)
+ c.nodeStack = append(c.nodeStack, c.state.nodePlusOne-1)
+ c.addHitNode(hitNode{
+ area: areaID,
+ pass: true,
+ })
+}
+
+// frect converts a rectangle to a f32.Rectangle.
+func frect(r image.Rectangle) f32.Rectangle {
+ return f32.Rectangle{
+ Min: fpt(r.Min), Max: fpt(r.Max),
+ }
+}
+
+// fpt converts a point to a f32.Point.
+func fpt(p image.Point) f32.Point {
+ return f32.Point{
+ X: float32(p.X), Y: float32(p.Y),
+ }
+}
+
+func (c *pointerCollector) popArea() {
+ n := len(c.nodeStack)
+ c.state.nodePlusOne = c.nodeStack[n-1] + 1
+ c.nodeStack = c.nodeStack[:n-1]
+}
+
+func (c *pointerCollector) pass() {
+ c.state.pass++
+}
+
+func (c *pointerCollector) popPass() {
+ c.state.pass--
+}
+
+func (c *pointerCollector) currentArea() int {
+ if i := c.state.nodePlusOne - 1; i != -1 {
+ n := c.q.hitTree[i]
+ return n.area
+ }
+ return -1
+}
+
+func (c *pointerCollector) addHitNode(n hitNode) {
+ n.next = c.state.nodePlusOne - 1
+ c.q.hitTree = append(c.q.hitTree, n)
+ c.state.nodePlusOne = len(c.q.hitTree) - 1 + 1
+}
+
+// newHandler returns the current handler or a new one for tag.
+func (c *pointerCollector) newHandler(tag event.Tag, events *handlerEvents) *pointerHandler {
+ areaID := c.currentArea()
+ c.addHitNode(hitNode{
+ area: areaID,
+ tag: tag,
+ pass: c.state.pass > 0,
+ })
+ h, ok := c.q.handlers[tag]
+ if !ok {
+ h = new(pointerHandler)
+ c.q.handlers[tag] = h
+ // Cancel handlers on (each) first appearance, but don't
+ // trigger redraw.
+ events.AddNoRedraw(tag, pointer.Event{Type: pointer.Cancel})
+ }
+ h.active = true
+ h.area = areaID
+ return h
+}
+
+func (c *pointerCollector) inputOp(op pointer.InputOp, events *handlerEvents) {
+ areaID := c.currentArea()
+ area := &c.q.areas[areaID]
+ area.semantic.content.tag = op.Tag
+ if op.Types&(pointer.Press|pointer.Release) != 0 {
+ area.semantic.content.gestures |= ClickGesture
+ }
+ area.semantic.valid = area.semantic.content.gestures != 0
+ h := c.newHandler(op.Tag, events)
+ h.wantsGrab = h.wantsGrab || op.Grab
+ h.types = h.types | op.Types
+ h.scrollRange = op.ScrollBounds
+}
+
+func (c *pointerCollector) semanticLabel(lbl string) {
+ areaID := c.currentArea()
+ area := &c.q.areas[areaID]
+ area.semantic.valid = true
+ area.semantic.content.label = lbl
+}
+
+func (c *pointerCollector) semanticDesc(desc string) {
+ areaID := c.currentArea()
+ area := &c.q.areas[areaID]
+ area.semantic.valid = true
+ area.semantic.content.desc = desc
+}
+
+func (c *pointerCollector) semanticClass(class semantic.ClassOp) {
+ areaID := c.currentArea()
+ area := &c.q.areas[areaID]
+ area.semantic.valid = true
+ area.semantic.content.class = class
+}
+
+func (c *pointerCollector) semanticSelected(selected bool) {
+ areaID := c.currentArea()
+ area := &c.q.areas[areaID]
+ area.semantic.valid = true
+ area.semantic.content.selected = selected
+}
+
+func (c *pointerCollector) semanticDisabled(disabled bool) {
+ areaID := c.currentArea()
+ area := &c.q.areas[areaID]
+ area.semantic.valid = true
+ area.semantic.content.disabled = disabled
+}
+
+func (c *pointerCollector) cursor(name pointer.CursorName) {
+ c.q.cursors = append(c.q.cursors, cursorNode{
+ name: name,
+ area: len(c.q.areas) - 1,
+ })
+}
+
+func (c *pointerCollector) sourceOp(op transfer.SourceOp, events *handlerEvents) {
+ h := c.newHandler(op.Tag, events)
+ h.sourceMimes = append(h.sourceMimes, op.Type)
+}
+
+func (c *pointerCollector) targetOp(op transfer.TargetOp, events *handlerEvents) {
+ h := c.newHandler(op.Tag, events)
+ h.targetMimes = append(h.targetMimes, op.Type)
+}
+
+func (c *pointerCollector) offerOp(op transfer.OfferOp, events *handlerEvents) {
+ h := c.newHandler(op.Tag, events)
+ h.offeredMime = op.Type
+ h.data = op.Data
+}
+
+func (c *pointerCollector) reset() {
+ c.q.reset()
+ c.resetState()
+ c.nodeStack = c.nodeStack[:0]
+ c.ensureRoot()
+}
+
+// Ensure implicit root area for semantic descriptions to hang onto.
+func (c *pointerCollector) ensureRoot() {
+ if len(c.q.areas) > 0 {
+ return
+ }
+ c.pushArea(areaRect, f32.Rect(-1e6, -1e6, 1e6, 1e6))
+ // Make it semantic to ensure a single semantic root.
+ c.q.areas[0].semantic.valid = true
+}
+
+func (q *pointerQueue) assignSemIDs() {
+ if q.semantic.idsAssigned {
+ return
+ }
+ q.semantic.idsAssigned = true
+ for i, a := range q.areas {
+ if a.semantic.valid {
+ q.areas[i].semantic.id = q.semanticIDFor(a.semantic.content)
}
}
}
-func (q *pointerQueue) opHit(handlers *[]event.Tag, pos f32.Point) {
+func (q *pointerQueue) AppendSemantics(nodes []SemanticNode) []SemanticNode {
+ q.assignSemIDs()
+ nodes = q.appendSemanticChildren(nodes, 0)
+ nodes = q.appendSemanticArea(nodes, 0, 0)
+ return nodes
+}
+
+func (q *pointerQueue) appendSemanticArea(nodes []SemanticNode, parentID SemanticID, nodeIdx int) []SemanticNode {
+ areaIdx := nodes[nodeIdx].areaIdx
+ a := q.areas[areaIdx]
+ childStart := len(nodes)
+ nodes = q.appendSemanticChildren(nodes, a.firstChild)
+ childEnd := len(nodes)
+ for i := childStart; i < childEnd; i++ {
+ nodes = q.appendSemanticArea(nodes, a.semantic.id, i)
+ }
+ n := &nodes[nodeIdx]
+ n.ParentID = parentID
+ n.Children = nodes[childStart:childEnd]
+ return nodes
+}
+
+func (q *pointerQueue) appendSemanticChildren(nodes []SemanticNode, areaIdx int) []SemanticNode {
+ if areaIdx == -1 {
+ return nodes
+ }
+ a := q.areas[areaIdx]
+ if semID := a.semantic.id; semID != 0 {
+ cnt := a.semantic.content
+ nodes = append(nodes, SemanticNode{
+ ID: semID,
+ Desc: SemanticDesc{
+ Bounds: f32.Rectangle{
+ Min: a.trans.Transform(a.area.rect.Min),
+ Max: a.trans.Transform(a.area.rect.Max),
+ },
+ Label: cnt.label,
+ Description: cnt.desc,
+ Class: cnt.class,
+ Gestures: cnt.gestures,
+ Selected: cnt.selected,
+ Disabled: cnt.disabled,
+ },
+ areaIdx: areaIdx,
+ })
+ } else {
+ nodes = q.appendSemanticChildren(nodes, a.firstChild)
+ }
+ return q.appendSemanticChildren(nodes, a.sibling)
+}
+
+func (q *pointerQueue) semanticIDFor(content semanticContent) SemanticID {
+ ids := q.semantic.contentIDs[content]
+ for i, id := range ids {
+ if !id.used {
+ ids[i].used = true
+ return id.id
+ }
+ }
+ // No prior assigned ID; allocate a new one.
+ q.semantic.lastID++
+ id := semanticID{id: q.semantic.lastID, used: true}
+ if q.semantic.contentIDs == nil {
+ q.semantic.contentIDs = make(map[semanticContent][]semanticID)
+ }
+ q.semantic.contentIDs[content] = append(q.semantic.contentIDs[content], id)
+ return id.id
+}
+
+func (q *pointerQueue) SemanticAt(pos f32.Point) (SemanticID, bool) {
+ q.assignSemIDs()
+ for i := len(q.hitTree) - 1; i >= 0; i-- {
+ n := &q.hitTree[i]
+ hit := q.hit(n.area, pos)
+ if !hit {
+ continue
+ }
+ area := q.areas[n.area]
+ if area.semantic.id != 0 {
+ return area.semantic.id, true
+ }
+ }
+ return 0, false
+}
+
+func (q *pointerQueue) opHit(pos f32.Point) []event.Tag {
// Track whether we're passing through hits.
pass := true
+ hits := q.scratch[:0]
idx := len(q.hitTree) - 1
for idx >= 0 {
n := &q.hitTree[idx]
- if !q.hit(n.area, pos) {
+ hit := q.hit(n.area, pos)
+ if !hit {
idx--
continue
}
@@ -133,10 +455,12 @@ func (q *pointerQueue) opHit(handlers *[]event.Tag, pos f32.Point) {
}
if n.tag != nil {
if _, exists := q.handlers[n.tag]; exists {
- *handlers = append(*handlers, n.tag)
+ hits = addHandler(hits, n.tag)
}
}
}
+ q.scratch = hits[:0]
+ return hits
}
func (q *pointerQueue) invTransform(areaIdx int, p f32.Point) f32.Point {
@@ -153,32 +477,53 @@ func (q *pointerQueue) hit(areaIdx int, p f32.Point) bool {
if !a.area.Hit(p) {
return false
}
- areaIdx = a.next
+ areaIdx = a.parent
}
return true
}
-func (q *pointerQueue) init() {
+func (q *pointerQueue) reset() {
if q.handlers == nil {
q.handlers = make(map[event.Tag]*pointerHandler)
}
-}
-
-func (q *pointerQueue) Frame(root *op.Ops, events *handlerEvents) {
- q.init()
for _, h := range q.handlers {
// Reset handler.
h.active = false
h.wantsGrab = false
h.types = 0
+ h.sourceMimes = h.sourceMimes[:0]
+ h.targetMimes = h.targetMimes[:0]
}
q.hitTree = q.hitTree[:0]
q.areas = q.areas[:0]
- q.reader.Reset(root)
- q.collectHandlers(&q.reader, events, f32.Affine2D{}, -1, -1, false)
+ q.cursors = q.cursors[:0]
+ q.semantic.idsAssigned = false
+ for k, ids := range q.semantic.contentIDs {
+ for i := len(ids) - 1; i >= 0; i-- {
+ if !ids[i].used {
+ ids = append(ids[:i], ids[i+1:]...)
+ } else {
+ ids[i].used = false
+ }
+ }
+ if len(ids) > 0 {
+ q.semantic.contentIDs[k] = ids
+ } else {
+ delete(q.semantic.contentIDs, k)
+ }
+ }
+ for _, rc := range q.transfers {
+ if rc != nil {
+ rc.Close()
+ }
+ }
+ q.transfers = nil
+}
+
+func (q *pointerQueue) Frame(events *handlerEvents) {
for k, h := range q.handlers {
if !h.active {
- q.dropHandlers(events, k)
+ q.dropHandler(nil, k)
delete(q.handlers, k)
}
if h.wantsGrab {
@@ -189,86 +534,93 @@ func (q *pointerQueue) Frame(root *op.Ops, events *handlerEvents) {
for i, k2 := range p.handlers {
if k2 == k {
// Drop other handlers that lost their grab.
- q.dropHandlers(events, p.handlers[i+1:]...)
- q.dropHandlers(events, p.handlers[:i]...)
+ dropped := q.scratch[:0]
+ dropped = append(dropped, p.handlers[:i]...)
+ dropped = append(dropped, p.handlers[i+1:]...)
+ for _, tag := range dropped {
+ q.dropHandler(events, tag)
+ }
break
}
}
}
}
}
+ for i := range q.pointers {
+ p := &q.pointers[i]
+ q.deliverEnterLeaveEvents(p, events, p.last)
+ q.deliverTransferDataEvent(p, events)
+ }
}
-func (q *pointerQueue) dropHandlers(events *handlerEvents, tags ...event.Tag) {
- for _, k := range tags {
- events.Add(k, pointer.Event{Type: pointer.Cancel})
- for i := range q.pointers {
- p := &q.pointers[i]
- for i := len(p.handlers) - 1; i >= 0; i-- {
- if p.handlers[i] == k {
- p.handlers = append(p.handlers[:i], p.handlers[i+1:]...)
- }
+func (q *pointerQueue) dropHandler(events *handlerEvents, tag event.Tag) {
+ if events != nil {
+ events.Add(tag, pointer.Event{Type: pointer.Cancel})
+ }
+ for i := range q.pointers {
+ p := &q.pointers[i]
+ for i := len(p.handlers) - 1; i >= 0; i-- {
+ if p.handlers[i] == tag {
+ p.handlers = append(p.handlers[:i], p.handlers[i+1:]...)
}
- for i := len(p.entered) - 1; i >= 0; i-- {
- if p.entered[i] == k {
- p.entered = append(p.entered[:i], p.entered[i+1:]...)
- }
+ }
+ for i := len(p.entered) - 1; i >= 0; i-- {
+ if p.entered[i] == tag {
+ p.entered = append(p.entered[:i], p.entered[i+1:]...)
}
}
}
}
+// pointerOf returns the pointerInfo index corresponding to the pointer in e.
+func (q *pointerQueue) pointerOf(e pointer.Event) int {
+ for i, p := range q.pointers {
+ if p.id == e.PointerID {
+ return i
+ }
+ }
+ q.pointers = append(q.pointers, pointerInfo{id: e.PointerID})
+ return len(q.pointers) - 1
+}
+
func (q *pointerQueue) Push(e pointer.Event, events *handlerEvents) {
- q.init()
if e.Type == pointer.Cancel {
q.pointers = q.pointers[:0]
for k := range q.handlers {
- q.dropHandlers(events, k)
+ q.dropHandler(events, k)
}
return
}
- pidx := -1
- for i, p := range q.pointers {
- if p.id == e.PointerID {
- pidx = i
- break
- }
- }
- if pidx == -1 {
- q.pointers = append(q.pointers, pointerInfo{id: e.PointerID})
- pidx = len(q.pointers) - 1
- }
+ pidx := q.pointerOf(e)
p := &q.pointers[pidx]
+ p.last = e
- if e.Type == pointer.Move && p.pressed {
- e.Type = pointer.Drag
- }
-
- if e.Type == pointer.Release {
+ switch e.Type {
+ case pointer.Press:
+ q.deliverEnterLeaveEvents(p, events, e)
+ p.pressed = true
q.deliverEvent(p, events, e)
- p.pressed = false
- }
- q.scratch = q.scratch[:0]
- q.opHit(&q.scratch, e.Position)
- if p.pressed {
- // Filter out non-participating handlers.
- for i := len(q.scratch) - 1; i >= 0; i-- {
- if _, found := searchTag(p.handlers, q.scratch[i]); !found {
- q.scratch = append(q.scratch[:i], q.scratch[i+1:]...)
- }
+ case pointer.Move:
+ if p.pressed {
+ e.Type = pointer.Drag
}
- }
- q.deliverEnterLeaveEvents(p, q.scratch, events, e)
-
- if !p.pressed {
- p.handlers = append(p.handlers[:0], q.scratch...)
- }
- if e.Type == pointer.Press {
- p.pressed = true
- }
- if e.Type != pointer.Release {
+ q.deliverEnterLeaveEvents(p, events, e)
q.deliverEvent(p, events, e)
+ if p.pressed {
+ q.deliverDragEvent(p, events)
+ }
+ case pointer.Release:
+ q.deliverEvent(p, events, e)
+ p.pressed = false
+ q.deliverEnterLeaveEvents(p, events, e)
+ q.deliverDropEvent(p, events)
+ case pointer.Scroll:
+ q.deliverEnterLeaveEvents(p, events, e)
+ q.deliverScrollEvent(p, events, e)
+ default:
+ panic("unsupported pointer event type")
}
+
if !p.pressed && len(p.entered) == 0 {
// No longer need to track pointer.
q.pointers = append(q.pointers[:pidx], q.pointers[pidx+1:]...)
@@ -277,28 +629,77 @@ func (q *pointerQueue) Push(e pointer.Event, events *handlerEvents) {
func (q *pointerQueue) deliverEvent(p *pointerInfo, events *handlerEvents, e pointer.Event) {
foremost := true
+ if p.pressed && len(p.handlers) == 1 {
+ e.Priority = pointer.Grabbed
+ foremost = false
+ }
for _, k := range p.handlers {
h := q.handlers[k]
+ if e.Type&h.types == 0 {
+ continue
+ }
e := e
- if p.pressed && len(p.handlers) == 1 {
- e.Priority = pointer.Grabbed
- } else if foremost {
+ if foremost {
+ foremost = false
e.Priority = pointer.Foremost
}
-
e.Position = q.invTransform(h.area, e.Position)
+ events.Add(k, e)
+ }
+}
- if e.Type&h.types == e.Type {
+func (q *pointerQueue) deliverScrollEvent(p *pointerInfo, events *handlerEvents, e pointer.Event) {
+ foremost := true
+ if p.pressed && len(p.handlers) == 1 {
+ e.Priority = pointer.Grabbed
+ foremost = false
+ }
+ var sx, sy = e.Scroll.X, e.Scroll.Y
+ for _, k := range p.handlers {
+ if sx == 0 && sy == 0 {
+ return
+ }
+ h := q.handlers[k]
+ // Distribute the scroll to the handler based on its ScrollRange.
+ sx, e.Scroll.X = setScrollEvent(sx, h.scrollRange.Min.X, h.scrollRange.Max.X)
+ sy, e.Scroll.Y = setScrollEvent(sy, h.scrollRange.Min.Y, h.scrollRange.Max.Y)
+ e := e
+ if foremost {
foremost = false
- events.Add(k, e)
+ e.Priority = pointer.Foremost
}
+ e.Position = q.invTransform(h.area, e.Position)
+ events.Add(k, e)
}
}
-func (q *pointerQueue) deliverEnterLeaveEvents(p *pointerInfo, hits []event.Tag, events *handlerEvents, e pointer.Event) {
+func (q *pointerQueue) deliverEnterLeaveEvents(p *pointerInfo, events *handlerEvents, e pointer.Event) {
+ var hits []event.Tag
if e.Source != pointer.Mouse && !p.pressed && e.Type != pointer.Press {
// Consider non-mouse pointers leaving when they're released.
- hits = nil
+ } else {
+ hits = q.opHit(e.Position)
+ if p.pressed {
+ // Filter out non-participating handlers,
+ // except potential transfer targets when a transfer has been initiated.
+ var hitsHaveTarget bool
+ if p.dataSource != nil {
+ transferSource := q.handlers[p.dataSource]
+ for _, hit := range hits {
+ if _, ok := firstMimeMatch(transferSource, q.handlers[hit]); ok {
+ hitsHaveTarget = true
+ break
+ }
+ }
+ }
+ for i := len(hits) - 1; i >= 0; i-- {
+ if _, found := searchTag(p.handlers, hits[i]); !found && !hitsHaveTarget {
+ hits = append(hits[:i], hits[i+1:]...)
+ }
+ }
+ } else {
+ p.handlers = append(p.handlers[:0], hits...)
+ }
}
// Deliver Leave events.
for _, k := range p.entered {
@@ -307,28 +708,116 @@ func (q *pointerQueue) deliverEnterLeaveEvents(p *pointerInfo, hits []event.Tag,
}
h := q.handlers[k]
e.Type = pointer.Leave
- e.Position = q.invTransform(h.area, e.Position)
- if e.Type&h.types == e.Type {
+ if e.Type&h.types != 0 {
+ e.Position = q.invTransform(h.area, e.Position)
events.Add(k, e)
}
}
- // Deliver Enter events.
+ // Deliver Enter events and update cursor.
+ q.cursor = pointer.CursorDefault
for _, k := range hits {
+ h := q.handlers[k]
+ for i := len(q.cursors) - 1; i >= 0; i-- {
+ if c := q.cursors[i]; c.area == h.area {
+ q.cursor = c.name
+ break
+ }
+ }
if _, found := searchTag(p.entered, k); found {
continue
}
- h := q.handlers[k]
e.Type = pointer.Enter
- e.Position = q.invTransform(h.area, e.Position)
- if e.Type&h.types == e.Type {
+ if e.Type&h.types != 0 {
+ e.Position = q.invTransform(h.area, e.Position)
events.Add(k, e)
}
}
p.entered = append(p.entered[:0], hits...)
}
+func (q *pointerQueue) deliverDragEvent(p *pointerInfo, events *handlerEvents) {
+ if p.dataSource != nil {
+ return
+ }
+ // Identify the data source.
+ for _, k := range p.entered {
+ src := q.handlers[k]
+ if len(src.sourceMimes) == 0 {
+ continue
+ }
+ // One data source handler per pointer.
+ p.dataSource = k
+ // Notify all potential targets.
+ for k, tgt := range q.handlers {
+ if _, ok := firstMimeMatch(src, tgt); ok {
+ events.Add(k, transfer.InitiateEvent{})
+ }
+ }
+ break
+ }
+}
+
+func (q *pointerQueue) deliverDropEvent(p *pointerInfo, events *handlerEvents) {
+ if p.dataSource == nil {
+ return
+ }
+ // Request data from the source.
+ src := q.handlers[p.dataSource]
+ for _, k := range p.entered {
+ h := q.handlers[k]
+ if m, ok := firstMimeMatch(src, h); ok {
+ p.dataTarget = k
+ events.Add(p.dataSource, transfer.RequestEvent{Type: m})
+ return
+ }
+ }
+ // No valid target found, abort.
+ q.deliverTransferCancelEvent(p, events)
+}
+
+func (q *pointerQueue) deliverTransferDataEvent(p *pointerInfo, events *handlerEvents) {
+ if p.dataSource == nil {
+ return
+ }
+ src := q.handlers[p.dataSource]
+ if src.data == nil {
+ // Data not received yet.
+ return
+ }
+ if p.dataTarget == nil {
+ q.deliverTransferCancelEvent(p, events)
+ return
+ }
+ // Send the offered data to the target.
+ transferIdx := len(q.transfers)
+ events.Add(p.dataTarget, transfer.DataEvent{
+ Type: src.offeredMime,
+ Open: func() io.ReadCloser {
+ q.transfers[transferIdx] = nil
+ return src.data
+ },
+ })
+ q.transfers = append(q.transfers, src.data)
+ p.dataTarget = nil
+}
+
+func (q *pointerQueue) deliverTransferCancelEvent(p *pointerInfo, events *handlerEvents) {
+ events.Add(p.dataSource, transfer.CancelEvent{})
+ // Cancel all potential targets.
+ src := q.handlers[p.dataSource]
+ for k, h := range q.handlers {
+ if _, ok := firstMimeMatch(src, h); ok {
+ events.Add(k, transfer.CancelEvent{})
+ }
+ }
+ src.offeredMime = ""
+ src.data = nil
+ p.dataSource = nil
+ p.dataTarget = nil
+}
+
func searchTag(tags []event.Tag, tag event.Tag) (int, bool) {
for i, t := range tags {
if t == tag {
@@ -338,41 +827,38 @@ func searchTag(tags []event.Tag, tag event.Tag) (int, bool) {
return 0, false
}
-func (op *areaOp) Decode(d []byte) {
- if opconst.OpType(d[0]) != opconst.TypeArea {
- panic("invalid op")
- }
- bo := binary.LittleEndian
- rect := image.Rectangle{
- Min: image.Point{
- X: int(int32(bo.Uint32(d[2:]))),
- Y: int(int32(bo.Uint32(d[6:]))),
- },
- Max: image.Point{
- X: int(int32(bo.Uint32(d[10:]))),
- Y: int(int32(bo.Uint32(d[14:]))),
- },
+// addHandler adds tag to the slice if not present.
+func addHandler(tags []event.Tag, tag event.Tag) []event.Tag {
+ for _, t := range tags {
+ if t == tag {
+ return tags
+ }
}
- *op = areaOp{
- kind: areaKind(d[1]),
- rect: rect,
+ return append(tags, tag)
+}
+
+// firstMimeMatch returns the first type match between src and tgt.
+func firstMimeMatch(src, tgt *pointerHandler) (first string, matched bool) {
+ for _, m1 := range tgt.targetMimes {
+ for _, m2 := range src.sourceMimes {
+ if m1 == m2 {
+ return m1, true
+ }
+ }
}
+ return "", false
}
func (op *areaOp) Hit(pos f32.Point) bool {
- min := f32.Point{
- X: float32(op.rect.Min.X),
- Y: float32(op.rect.Min.Y),
- }
- pos = pos.Sub(min)
+ pos = pos.Sub(op.rect.Min)
size := op.rect.Size()
switch op.kind {
case areaRect:
- return 0 <= pos.X && pos.X < float32(size.X) &&
- 0 <= pos.Y && pos.Y < float32(size.Y)
+ return 0 <= pos.X && pos.X < size.X &&
+ 0 <= pos.Y && pos.Y < size.Y
case areaEllipse:
- rx := float32(size.X) / 2
- ry := float32(size.Y) / 2
+ rx := size.X / 2
+ ry := size.Y / 2
xh := pos.X - rx
yk := pos.Y - ry
// The ellipse function works in all cases because
@@ -383,22 +869,12 @@ func (op *areaOp) Hit(pos f32.Point) bool {
}
}
-func decodePointerInputOp(d []byte, refs []interface{}) pointer.InputOp {
- if opconst.OpType(d[0]) != opconst.TypePointerInput {
- panic("invalid op")
- }
- return pointer.InputOp{
- Tag: refs[0].(event.Tag),
- Grab: d[1] != 0,
- Types: pointer.Type(d[2]),
- }
-}
-
-func decodePassOp(d []byte) pointer.PassOp {
- if opconst.OpType(d[0]) != opconst.TypePass {
- panic("invalid op")
+func setScrollEvent(scroll float32, min, max int) (left, scrolled float32) {
+ if v := float32(max); scroll > v {
+ return scroll - v, v
}
- return pointer.PassOp{
- Pass: d[1] != 0,
+ if v := float32(min); scroll < v {
+ return scroll - v, v
}
+ return 0, scroll
}
diff --git a/vendor/gioui.org/io/router/router.go b/vendor/gioui.org/io/router/router.go
index d24d214..a02f0f6 100644
--- a/vendor/gioui.org/io/router/router.go
+++ b/vendor/gioui.org/io/router/router.go
@@ -12,22 +12,37 @@ package router
import (
"encoding/binary"
+ "image"
+ "io"
+ "strings"
"time"
- "gioui.org/internal/opconst"
+ "gioui.org/f32"
"gioui.org/internal/ops"
+ "gioui.org/io/clipboard"
"gioui.org/io/event"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/profile"
+ "gioui.org/io/semantic"
+ "gioui.org/io/transfer"
"gioui.org/op"
)
// Router is a Queue implementation that routes events
// to handlers declared in operation lists.
type Router struct {
- pqueue pointerQueue
- kqueue keyQueue
+ savedTrans []f32.Affine2D
+ transStack []f32.Affine2D
+ pointer struct {
+ queue pointerQueue
+ collector pointerCollector
+ }
+ key struct {
+ queue keyQueue
+ collector keyCollector
+ }
+ cqueue clipboardQueue
handlers handlerEvents
@@ -38,11 +53,44 @@ type Router struct {
wakeupTime time.Time
// ProfileOp summary.
- profiling bool
profHandlers map[event.Tag]struct{}
profile profile.Event
}
+// SemanticNode represents a node in the tree describing the components
+// contained in a frame.
+type SemanticNode struct {
+ ID SemanticID
+ ParentID SemanticID
+ Children []SemanticNode
+ Desc SemanticDesc
+
+ areaIdx int
+}
+
+// SemanticDesc provides a semantic description of a UI component.
+type SemanticDesc struct {
+ Class semantic.ClassOp
+ Description string
+ Label string
+ Selected bool
+ Disabled bool
+ Gestures SemanticGestures
+ Bounds f32.Rectangle
+}
+
+// SemanticGestures is a bit-set of supported gestures.
+type SemanticGestures int
+
+const (
+ ClickGesture SemanticGestures = 1 << iota
+)
+
+// SemanticID uniquely identifies a SemanticDescription.
+//
+// By convention, the zero value denotes the non-existent ID.
+type SemanticID uint64
+
type handlerEvents struct {
handlers map[event.Tag][]event.Event
hadEvents bool
@@ -61,33 +109,39 @@ func (q *Router) Events(k event.Tag) []event.Event {
// Frame replaces the declared handlers from the supplied
// operation list. The text input state, wakeup time and whether
// there are active profile handlers is also saved.
-func (q *Router) Frame(ops *op.Ops) {
+func (q *Router) Frame(frame *op.Ops) {
q.handlers.Clear()
q.wakeup = false
- q.profiling = false
for k := range q.profHandlers {
delete(q.profHandlers, k)
}
+ var ops *ops.Ops
+ if frame != nil {
+ ops = &frame.Internal
+ }
q.reader.Reset(ops)
q.collect()
- q.pqueue.Frame(ops, &q.handlers)
- q.kqueue.Frame(ops, &q.handlers)
+ q.pointer.queue.Frame(&q.handlers)
+ q.key.queue.Frame(&q.handlers, q.key.collector)
if q.handlers.HadEvents() {
q.wakeup = true
q.wakeupTime = time.Time{}
}
}
-func (q *Router) Add(events ...event.Event) bool {
+// Queue an event and report whether at least one handler had an event queued.
+func (q *Router) Queue(events ...event.Event) bool {
for _, e := range events {
switch e := e.(type) {
case profile.Event:
q.profile = e
case pointer.Event:
- q.pqueue.Push(e, &q.handlers)
+ q.pointer.queue.Push(e, &q.handlers)
case key.EditEvent, key.Event, key.FocusEvent:
- q.kqueue.Push(e, &q.handlers)
+ q.key.queue.Push(e, &q.handlers)
+ case clipboard.Event:
+ q.cqueue.Push(e, &q.handlers)
}
}
return q.handlers.HadEvents()
@@ -96,25 +150,189 @@ func (q *Router) Add(events ...event.Event) bool {
// TextInputState returns the input state from the most recent
// call to Frame.
func (q *Router) TextInputState() TextInputState {
- return q.kqueue.InputState()
+ return q.key.queue.InputState()
+}
+
+// TextInputHint returns the input mode from the most recent key.InputOp.
+func (q *Router) TextInputHint() (key.InputHint, bool) {
+ return q.key.queue.InputHint()
+}
+
+// WriteClipboard returns the most recent text to be copied
+// to the clipboard, if any.
+func (q *Router) WriteClipboard() (string, bool) {
+ return q.cqueue.WriteClipboard()
+}
+
+// ReadClipboard reports if any new handler is waiting
+// to read the clipboard.
+func (q *Router) ReadClipboard() bool {
+ return q.cqueue.ReadClipboard()
+}
+
+// Cursor returns the last cursor set.
+func (q *Router) Cursor() pointer.CursorName {
+ return q.pointer.queue.cursor
+}
+
+// SemanticAt returns the first semantic description under pos, if any.
+func (q *Router) SemanticAt(pos f32.Point) (SemanticID, bool) {
+ return q.pointer.queue.SemanticAt(pos)
+}
+
+// AppendSemantics appends the semantic tree to nodes, and returns the result.
+// The root node is the first added.
+func (q *Router) AppendSemantics(nodes []SemanticNode) []SemanticNode {
+ q.pointer.collector.q = &q.pointer.queue
+ q.pointer.collector.ensureRoot()
+ return q.pointer.queue.AppendSemantics(nodes)
}
func (q *Router) collect() {
+ q.transStack = q.transStack[:0]
+ pc := &q.pointer.collector
+ pc.q = &q.pointer.queue
+ pc.reset()
+ kc := &q.key.collector
+ *kc = keyCollector{q: &q.key.queue}
+ q.key.queue.Reset()
+ var t f32.Affine2D
for encOp, ok := q.reader.Decode(); ok; encOp, ok = q.reader.Decode() {
- switch opconst.OpType(encOp.Data[0]) {
- case opconst.TypeInvalidate:
+ switch ops.OpType(encOp.Data[0]) {
+ case ops.TypeInvalidate:
op := decodeInvalidateOp(encOp.Data)
if !q.wakeup || op.At.Before(q.wakeupTime) {
q.wakeup = true
q.wakeupTime = op.At
}
- case opconst.TypeProfile:
+ case ops.TypeProfile:
op := decodeProfileOp(encOp.Data, encOp.Refs)
if q.profHandlers == nil {
q.profHandlers = make(map[event.Tag]struct{})
}
- q.profiling = true
q.profHandlers[op.Tag] = struct{}{}
+ case ops.TypeClipboardRead:
+ q.cqueue.ProcessReadClipboard(encOp.Refs)
+ case ops.TypeClipboardWrite:
+ q.cqueue.ProcessWriteClipboard(encOp.Refs)
+ case ops.TypeSave:
+ id := ops.DecodeSave(encOp.Data)
+ if extra := id - len(q.savedTrans) + 1; extra > 0 {
+ q.savedTrans = append(q.savedTrans, make([]f32.Affine2D, extra)...)
+ }
+ q.savedTrans[id] = t
+ case ops.TypeLoad:
+ id := ops.DecodeLoad(encOp.Data)
+ t = q.savedTrans[id]
+ pc.resetState()
+ pc.setTrans(t)
+
+ case ops.TypeClip:
+ var op ops.ClipOp
+ op.Decode(encOp.Data)
+ pc.clip(op)
+ case ops.TypePopClip:
+ pc.popArea()
+ case ops.TypeTransform:
+ t2, push := ops.DecodeTransform(encOp.Data)
+ if push {
+ q.transStack = append(q.transStack, t)
+ }
+ t = t.Mul(t2)
+ pc.setTrans(t)
+ case ops.TypePopTransform:
+ n := len(q.transStack)
+ t = q.transStack[n-1]
+ q.transStack = q.transStack[:n-1]
+ pc.setTrans(t)
+
+ // Pointer ops.
+ case ops.TypePass:
+ pc.pass()
+ case ops.TypePopPass:
+ pc.popPass()
+ case ops.TypePointerInput:
+ bo := binary.LittleEndian
+ op := pointer.InputOp{
+ Tag: encOp.Refs[0].(event.Tag),
+ Grab: encOp.Data[1] != 0,
+ Types: pointer.Type(bo.Uint16(encOp.Data[2:])),
+ ScrollBounds: image.Rectangle{
+ Min: image.Point{
+ X: int(int32(bo.Uint32(encOp.Data[4:]))),
+ Y: int(int32(bo.Uint32(encOp.Data[8:]))),
+ },
+ Max: image.Point{
+ X: int(int32(bo.Uint32(encOp.Data[12:]))),
+ Y: int(int32(bo.Uint32(encOp.Data[16:]))),
+ },
+ },
+ }
+ pc.inputOp(op, &q.handlers)
+ case ops.TypeCursor:
+ name := encOp.Refs[0].(pointer.CursorName)
+ pc.cursor(name)
+ case ops.TypeSource:
+ op := transfer.SourceOp{
+ Tag: encOp.Refs[0].(event.Tag),
+ Type: encOp.Refs[1].(string),
+ }
+ pc.sourceOp(op, &q.handlers)
+ case ops.TypeTarget:
+ op := transfer.TargetOp{
+ Tag: encOp.Refs[0].(event.Tag),
+ Type: encOp.Refs[1].(string),
+ }
+ pc.targetOp(op, &q.handlers)
+ case ops.TypeOffer:
+ op := transfer.OfferOp{
+ Tag: encOp.Refs[0].(event.Tag),
+ Type: encOp.Refs[1].(string),
+ Data: encOp.Refs[2].(io.ReadCloser),
+ }
+ pc.offerOp(op, &q.handlers)
+
+ // Key ops.
+ case ops.TypeKeyFocus:
+ tag, _ := encOp.Refs[0].(event.Tag)
+ op := key.FocusOp{
+ Tag: tag,
+ }
+ kc.focusOp(op.Tag)
+ case ops.TypeKeySoftKeyboard:
+ op := key.SoftKeyboardOp{
+ Show: encOp.Data[1] != 0,
+ }
+ kc.softKeyboard(op.Show)
+ case ops.TypeKeyInput:
+ op := key.InputOp{
+ Tag: encOp.Refs[0].(event.Tag),
+ Hint: key.InputHint(encOp.Data[1]),
+ }
+ kc.inputOp(op)
+
+ // Semantic ops.
+ case ops.TypeSemanticLabel:
+ lbl := encOp.Refs[0].(*string)
+ pc.semanticLabel(*lbl)
+ case ops.TypeSemanticDesc:
+ desc := encOp.Refs[0].(*string)
+ pc.semanticDesc(*desc)
+ case ops.TypeSemanticClass:
+ class := semantic.ClassOp(encOp.Data[1])
+ pc.semanticClass(class)
+ case ops.TypeSemanticSelected:
+ if encOp.Data[1] != 0 {
+ pc.semanticSelected(true)
+ } else {
+ pc.semanticSelected(false)
+ }
+ case ops.TypeSemanticDisabled:
+ if encOp.Data[1] != 0 {
+ pc.semanticDisabled(true)
+ } else {
+ pc.semanticDisabled(false)
+ }
}
}
}
@@ -122,7 +340,7 @@ func (q *Router) collect() {
// Profiling reports whether there was profile handlers in the
// most recent Frame call.
func (q *Router) Profiling() bool {
- return q.profiling
+ return len(q.profHandlers) > 0
}
// WakeupTime returns the most recent time for doing another frame,
@@ -137,9 +355,13 @@ func (h *handlerEvents) init() {
}
}
-func (h *handlerEvents) Add(k event.Tag, e event.Event) {
+func (h *handlerEvents) AddNoRedraw(k event.Tag, e event.Event) {
h.init()
h.handlers[k] = append(h.handlers[k], e)
+}
+
+func (h *handlerEvents) Add(k event.Tag, e event.Event) {
+ h.AddNoRedraw(k, e)
h.hadEvents = true
}
@@ -174,7 +396,7 @@ func (h *handlerEvents) Clear() {
}
func decodeProfileOp(d []byte, refs []interface{}) profile.Op {
- if opconst.OpType(d[0]) != opconst.TypeProfile {
+ if ops.OpType(d[0]) != ops.TypeProfile {
panic("invalid op")
}
return profile.Op{
@@ -184,7 +406,7 @@ func decodeProfileOp(d []byte, refs []interface{}) profile.Op {
func decodeInvalidateOp(d []byte) op.InvalidateOp {
bo := binary.LittleEndian
- if opconst.OpType(d[0]) != opconst.TypeInvalidate {
+ if ops.OpType(d[0]) != ops.TypeInvalidate {
panic("invalid op")
}
var o op.InvalidateOp
@@ -193,3 +415,11 @@ func decodeInvalidateOp(d []byte) op.InvalidateOp {
}
return o
}
+
+func (s SemanticGestures) String() string {
+ var gestures []string
+ if s&ClickGesture != 0 {
+ gestures = append(gestures, "Click")
+ }
+ return strings.Join(gestures, ",")
+}
diff --git a/vendor/gioui.org/io/semantic/semantic.go b/vendor/gioui.org/io/semantic/semantic.go
new file mode 100644
index 0000000..7499fc8
--- /dev/null
+++ b/vendor/gioui.org/io/semantic/semantic.go
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+// Package semantic provides operations for semantic descriptions of a user
+// interface, to facilitate presentation and interaction in external software
+// such as screen readers.
+//
+// Semantic descriptions are organized in a tree, with clip operations as
+// nodes. Operations in this package are associated with the current semantic
+// node, that is the most recent pushed clip operation.
+package semantic
+
+import (
+ "gioui.org/internal/ops"
+ "gioui.org/op"
+)
+
+// LabelOp provides the content of a textual component.
+type LabelOp string
+
+// DescriptionOp describes a component.
+type DescriptionOp string
+
+// ClassOp provides the component class.
+type ClassOp int
+
+const (
+ Unknown ClassOp = iota
+ Button
+ CheckBox
+ Editor
+ RadioButton
+ Switch
+)
+
+// SelectedOp describes the selected state for components that have
+// boolean state.
+type SelectedOp bool
+
+// DisabledOp describes the disabled state.
+type DisabledOp bool
+
+func (l LabelOp) Add(o *op.Ops) {
+ s := string(l)
+ data := ops.Write1(&o.Internal, ops.TypeSemanticLabelLen, &s)
+ data[0] = byte(ops.TypeSemanticLabel)
+}
+
+func (d DescriptionOp) Add(o *op.Ops) {
+ s := string(d)
+ data := ops.Write1(&o.Internal, ops.TypeSemanticDescLen, &s)
+ data[0] = byte(ops.TypeSemanticDesc)
+}
+
+func (c ClassOp) Add(o *op.Ops) {
+ data := ops.Write(&o.Internal, ops.TypeSemanticClassLen)
+ data[0] = byte(ops.TypeSemanticClass)
+ data[1] = byte(c)
+}
+
+func (s SelectedOp) Add(o *op.Ops) {
+ data := ops.Write(&o.Internal, ops.TypeSemanticSelectedLen)
+ data[0] = byte(ops.TypeSemanticSelected)
+ if s {
+ data[1] = 1
+ }
+}
+
+func (d DisabledOp) Add(o *op.Ops) {
+ data := ops.Write(&o.Internal, ops.TypeSemanticDisabledLen)
+ data[0] = byte(ops.TypeSemanticDisabled)
+ if d {
+ data[1] = 1
+ }
+}
+
+func (c ClassOp) String() string {
+ switch c {
+ case Unknown:
+ return "Unknown"
+ case Button:
+ return "Button"
+ case CheckBox:
+ return "CheckBox"
+ case Editor:
+ return "Editor"
+ case RadioButton:
+ return "RadioButton"
+ case Switch:
+ return "Switch"
+ default:
+ panic("invalid ClassOp")
+ }
+}
diff --git a/vendor/gioui.org/io/system/system.go b/vendor/gioui.org/io/system/system.go
index 8abac6d..e145825 100644
--- a/vendor/gioui.org/io/system/system.go
+++ b/vendor/gioui.org/io/system/system.go
@@ -26,27 +26,8 @@ type FrameEvent struct {
Size image.Point
// Insets is the insets to apply.
Insets Insets
- // Frame is the callback to supply the list of
- // operations to complete the FrameEvent.
- //
- // Note that the operation list and the operations themselves
- // may not be mutated until another FrameEvent is received from
- // the same event source.
- // That means that calls to frame.Reset and changes to referenced
- // data such as ImageOp backing images should happen between
- // receiving a FrameEvent and calling Frame.
- //
- // Example:
- //
- // var w *app.Window
- // var frame *op.Ops
- // for e := range w.Events() {
- // if e, ok := e.(system.FrameEvent); ok {
- // // Call frame.Reset and manipulate images for ImageOps
- // // here.
- // e.Frame(frame)
- // }
- // }
+ // Frame completes the FrameEvent by drawing the graphical operations
+ // from ops into the window.
Frame func(frame *op.Ops)
// Queue supplies the events for event handlers.
Queue event.Queue
@@ -60,12 +41,6 @@ type DestroyEvent struct {
Err error
}
-// ClipboardEvent is sent once for each request for the
-// clipboard content.
-type ClipboardEvent struct {
- Text string
-}
-
// Insets is the space taken up by
// system decoration such as translucent
// system bars and software keyboards.
@@ -79,10 +54,11 @@ type StageEvent struct {
Stage Stage
}
-// CommandEvent is a system event.
+// CommandEvent is a system event. Unlike most other events, CommandEvent is
+// delivered as a pointer to allow Cancel to suppress it.
type CommandEvent struct {
Type CommandType
- // Suppress the default action of the command.
+ // Cancel suppress the default action of the command.
Cancel bool
}
@@ -117,8 +93,7 @@ func (l Stage) String() string {
}
}
-func (FrameEvent) ImplementsEvent() {}
-func (StageEvent) ImplementsEvent() {}
-func (*CommandEvent) ImplementsEvent() {}
-func (DestroyEvent) ImplementsEvent() {}
-func (ClipboardEvent) ImplementsEvent() {}
+func (FrameEvent) ImplementsEvent() {}
+func (StageEvent) ImplementsEvent() {}
+func (*CommandEvent) ImplementsEvent() {}
+func (DestroyEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/io/transfer/transfer.go b/vendor/gioui.org/io/transfer/transfer.go
new file mode 100644
index 0000000..85ab68c
--- /dev/null
+++ b/vendor/gioui.org/io/transfer/transfer.go
@@ -0,0 +1,109 @@
+// Package transfer contains operations and events for brokering data transfers.
+//
+// The transfer protocol is as follows:
+//
+// - Data sources are registered with SourceOps, data targets with TargetOps.
+// - A data source receives a RequestEvent when a transfer is initiated.
+// It must respond with an OfferOp.
+// - The target receives a DataEvent when transferring to it. It must close
+// the event data after use.
+//
+// When a user initiates a pointer-guided drag and drop transfer, the
+// source as well as all potential targets receive an InitiateEvent.
+// Potential targets are targets with at least one MIME type in common
+// with the source. When a drag gesture completes, a CancelEvent is sent
+// to the source and all potential targets.
+//
+// Note that the RequestEvent is sent to the source upon drop.
+package transfer
+
+import (
+ "io"
+
+ "gioui.org/internal/ops"
+ "gioui.org/io/event"
+ "gioui.org/op"
+)
+
+// SourceOp registers a tag as a data source for a MIME type.
+// Use multiple SourceOps if a tag supports multiple types.
+type SourceOp struct {
+ Tag event.Tag
+ // Type is the MIME type supported by this source.
+ Type string
+}
+
+// TargetOp registers a tag as a data target.
+// Use multiple TargetOps if a tag supports multiple types.
+type TargetOp struct {
+ Tag event.Tag
+ // Type is the MIME type accepted by this target.
+ Type string
+}
+
+// OfferOp is used by data sources as a response to a RequestEvent.
+type OfferOp struct {
+ Tag event.Tag
+ // Type is the MIME type of Data.
+ // It must be the Type from the corresponding RequestEvent.
+ Type string
+ // Data contains the offered data. It is closed when the
+ // transfer is complete or cancelled.
+ // Data must be kept valid until closed, and it may be used from
+ // a goroutine separate from the one processing the frame..
+ Data io.ReadCloser
+}
+
+func (op SourceOp) Add(o *op.Ops) {
+ data := ops.Write2(&o.Internal, ops.TypeSourceLen, op.Tag, op.Type)
+ data[0] = byte(ops.TypeSource)
+}
+
+func (op TargetOp) Add(o *op.Ops) {
+ data := ops.Write2(&o.Internal, ops.TypeTargetLen, op.Tag, op.Type)
+ data[0] = byte(ops.TypeTarget)
+}
+
+// Add the offer to the list of operations.
+// It panics if the Data field is not set.
+func (op OfferOp) Add(o *op.Ops) {
+ if op.Data == nil {
+ panic("invalid nil data in OfferOp")
+ }
+ data := ops.Write3(&o.Internal, ops.TypeOfferLen, op.Tag, op.Type, op.Data)
+ data[0] = byte(ops.TypeOffer)
+}
+
+// RequestEvent requests data from a data source. The source must
+// respond with an OfferOp.
+type RequestEvent struct {
+ // Type is the first matched type between the source and the target.
+ Type string
+}
+
+func (RequestEvent) ImplementsEvent() {}
+
+// InitiateEvent is sent to a data source when a drag-and-drop
+// transfer gesture is initiated.
+//
+// Potential data targets also receive the event.
+type InitiateEvent struct{}
+
+func (InitiateEvent) ImplementsEvent() {}
+
+// CancelEvent is sent to data sources and targets to cancel the
+// effects of an InitiateEvent.
+type CancelEvent struct{}
+
+func (CancelEvent) ImplementsEvent() {}
+
+// DataEvent is sent to the target receiving the transfer.
+type DataEvent struct {
+ // Type is the MIME type of Data.
+ Type string
+ // Open returns the transfer data. It is only valid to call Open in the frame
+ // the DataEvent is received. The caller must close the return value after use.
+ Open func() io.ReadCloser
+}
+
+func (DataEvent) ImplementsEvent() {}
diff --git a/vendor/gioui.org/layout/context.go b/vendor/gioui.org/layout/context.go
index f47233b..5d31496 100644
--- a/vendor/gioui.org/layout/context.go
+++ b/vendor/gioui.org/layout/context.go
@@ -5,6 +5,7 @@ package layout
import (
"time"
+ "gioui.org/f32"
"gioui.org/io/event"
"gioui.org/io/system"
"gioui.org/op"
@@ -39,15 +40,30 @@ type Context struct {
// Constraints: Exact(e.Size),
// }
//
-// NewContext calls ops.Reset.
+// NewContext calls ops.Reset and adjusts ops for e.Insets.
func NewContext(ops *op.Ops, e system.FrameEvent) Context {
ops.Reset()
+
+ size := e.Size
+
+ if e.Insets != (system.Insets{}) {
+ left := e.Metric.Px(e.Insets.Left)
+ top := e.Metric.Px(e.Insets.Top)
+ op.Offset(f32.Point{
+ X: float32(left),
+ Y: float32(top),
+ }).Add(ops)
+
+ size.X -= left + e.Metric.Px(e.Insets.Right)
+ size.Y -= top + e.Metric.Px(e.Insets.Bottom)
+ }
+
return Context{
Ops: ops,
Now: e.Now,
Queue: e.Queue,
Metric: e.Metric,
- Constraints: Exact(e.Size),
+ Constraints: Exact(size),
}
}
diff --git a/vendor/gioui.org/layout/doc.go b/vendor/gioui.org/layout/doc.go
index d318765..3824084 100644
--- a/vendor/gioui.org/layout/doc.go
+++ b/vendor/gioui.org/layout/doc.go
@@ -37,7 +37,7 @@ This example both aligns and insets a child:
inset := layout.Inset{...}
inset.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
- align := layout.Align(...)
+ align := layout.Alignment(...)
return align.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
return widget.Layout(gtx, ...)
})
diff --git a/vendor/gioui.org/layout/flex.go b/vendor/gioui.org/layout/flex.go
index fe85b64..7d66f8f 100644
--- a/vendor/gioui.org/layout/flex.go
+++ b/vendor/gioui.org/layout/flex.go
@@ -65,9 +65,10 @@ func Rigid(widget Widget) FlexChild {
}
}
-// Flexed returns a Flex child forced to take up w fraction of the
-// of the space left over from Rigid children. The fraction is weight
-// divided by the weight sum of all Flexed children.
+// Flexed returns a Flex child forced to take up weight fraction of the
+// space left over from Rigid children. The fraction is weight
+// divided by either the weight sum of all Flexed children or the Flex
+// WeightSum if non zero.
func Flexed(weight float32, widget Widget) FlexChild {
return FlexChild{
flex: true,
@@ -82,10 +83,11 @@ func Flexed(weight float32, widget Widget) FlexChild {
func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
size := 0
cs := gtx.Constraints
- mainMin, mainMax := axisMainConstraint(f.Axis, cs)
- crossMin, crossMax := axisCrossConstraint(f.Axis, cs)
+ mainMin, mainMax := f.Axis.mainConstraint(cs)
+ crossMin, crossMax := f.Axis.crossConstraint(cs)
remaining := mainMax
var totalWeight float32
+ cgtx := gtx
// Lay out Rigid children.
for i, child := range children {
if child.flex {
@@ -93,11 +95,10 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
continue
}
macro := op.Record(gtx.Ops)
- gtx := gtx
- gtx.Constraints = axisConstraints(f.Axis, 0, remaining, crossMin, crossMax)
- dims := child.widget(gtx)
+ cgtx.Constraints = f.Axis.constraints(0, remaining, crossMin, crossMax)
+ dims := child.widget(cgtx)
c := macro.Stop()
- sz := axisMain(f.Axis, dims.Size)
+ sz := f.Axis.Convert(dims.Size).X
size += sz
remaining -= sz
if remaining < 0 {
@@ -129,11 +130,10 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
}
}
macro := op.Record(gtx.Ops)
- gtx := gtx
- gtx.Constraints = axisConstraints(f.Axis, flexSize, flexSize, crossMin, crossMax)
- dims := child.widget(gtx)
+ cgtx.Constraints = f.Axis.constraints(flexSize, flexSize, crossMin, crossMax)
+ dims := child.widget(cgtx)
c := macro.Stop()
- sz := axisMain(f.Axis, dims.Size)
+ sz := f.Axis.Convert(dims.Size).X
size += sz
remaining -= sz
if remaining < 0 {
@@ -145,7 +145,7 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
var maxCross int
var maxBaseline int
for _, child := range children {
- if c := axisCross(f.Axis, child.dims.Size); c > maxCross {
+ if c := f.Axis.Convert(child.dims.Size).Y; c > maxCross {
maxCross = c
}
if b := child.dims.Size.Y - child.dims.Baseline; b > maxBaseline {
@@ -165,7 +165,9 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
case SpaceEvenly:
mainSize += space / (1 + len(children))
case SpaceAround:
- mainSize += space / (len(children) * 2)
+ if len(children) > 0 {
+ mainSize += space / (len(children) * 2)
+ }
}
for i, child := range children {
dims := child.dims
@@ -173,27 +175,31 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
var cross int
switch f.Alignment {
case End:
- cross = maxCross - axisCross(f.Axis, dims.Size)
+ cross = maxCross - f.Axis.Convert(dims.Size).Y
case Middle:
- cross = (maxCross - axisCross(f.Axis, dims.Size)) / 2
+ cross = (maxCross - f.Axis.Convert(dims.Size).Y) / 2
case Baseline:
if f.Axis == Horizontal {
cross = maxBaseline - b
}
}
- stack := op.Push(gtx.Ops)
- op.Offset(FPt(axisPoint(f.Axis, mainSize, cross))).Add(gtx.Ops)
+ pt := f.Axis.Convert(image.Pt(mainSize, cross))
+ trans := op.Offset(FPt(pt)).Push(gtx.Ops)
child.call.Add(gtx.Ops)
- stack.Pop()
- mainSize += axisMain(f.Axis, dims.Size)
+ trans.Pop()
+ mainSize += f.Axis.Convert(dims.Size).X
if i < len(children)-1 {
switch f.Spacing {
case SpaceEvenly:
mainSize += space / (1 + len(children))
case SpaceAround:
- mainSize += space / len(children)
+ if len(children) > 0 {
+ mainSize += space / len(children)
+ }
case SpaceBetween:
- mainSize += space / (len(children) - 1)
+ if len(children) > 1 {
+ mainSize += space / (len(children) - 1)
+ }
}
}
}
@@ -205,60 +211,14 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
case SpaceEvenly:
mainSize += space / (1 + len(children))
case SpaceAround:
- mainSize += space / (len(children) * 2)
+ if len(children) > 0 {
+ mainSize += space / (len(children) * 2)
+ }
}
- sz := axisPoint(f.Axis, mainSize, maxCross)
+ sz := f.Axis.Convert(image.Pt(mainSize, maxCross))
return Dimensions{Size: sz, Baseline: sz.Y - maxBaseline}
}
-func axisPoint(a Axis, main, cross int) image.Point {
- if a == Horizontal {
- return image.Point{main, cross}
- } else {
- return image.Point{cross, main}
- }
-}
-
-func axisMain(a Axis, sz image.Point) int {
- if a == Horizontal {
- return sz.X
- } else {
- return sz.Y
- }
-}
-
-func axisCross(a Axis, sz image.Point) int {
- if a == Horizontal {
- return sz.Y
- } else {
- return sz.X
- }
-}
-
-func axisMainConstraint(a Axis, cs Constraints) (int, int) {
- if a == Horizontal {
- return cs.Min.X, cs.Max.X
- } else {
- return cs.Min.Y, cs.Max.Y
- }
-}
-
-func axisCrossConstraint(a Axis, cs Constraints) (int, int) {
- if a == Horizontal {
- return cs.Min.Y, cs.Max.Y
- } else {
- return cs.Min.X, cs.Max.X
- }
-}
-
-func axisConstraints(a Axis, mainMin, mainMax, crossMin, crossMax int) Constraints {
- if a == Horizontal {
- return Constraints{Min: image.Pt(mainMin, crossMin), Max: image.Pt(mainMax, crossMax)}
- } else {
- return Constraints{Min: image.Pt(crossMin, mainMin), Max: image.Pt(crossMax, mainMax)}
- }
-}
-
func (s Spacing) String() string {
switch s {
case SpaceEnd:
diff --git a/vendor/gioui.org/layout/layout.go b/vendor/gioui.org/layout/layout.go
index 112c45d..2318c22 100644
--- a/vendor/gioui.org/layout/layout.go
+++ b/vendor/gioui.org/layout/layout.go
@@ -23,6 +23,10 @@ type Constraints struct {
}
// Dimensions are the resolved size and baseline for a widget.
+//
+// Baseline is the distance from the bottom of a widget to the baseline of
+// any text it contains (or 0). The purpose is to be able to align text
+// that span multiple widgets.
type Dimensions struct {
Size image.Point
Baseline int
@@ -105,7 +109,9 @@ func (c Constraints) Constrain(size image.Point) image.Point {
return size
}
-// Inset adds space around a widget.
+// Inset adds space around a widget by decreasing its maximum
+// constraints. The minimum constraints will be adjusted to ensure
+// they do not exceed the maximum.
type Inset struct {
Top, Right, Bottom, Left unit.Value
}
@@ -135,11 +141,10 @@ func (in Inset) Layout(gtx Context, w Widget) Dimensions {
if mcs.Min.Y > mcs.Max.Y {
mcs.Min.Y = mcs.Max.Y
}
- stack := op.Push(gtx.Ops)
- op.Offset(FPt(image.Point{X: left, Y: top})).Add(gtx.Ops)
gtx.Constraints = mcs
+ trans := op.Offset(FPt(image.Point{X: left, Y: top})).Push(gtx.Ops)
dims := w(gtx)
- stack.Pop()
+ trans.Pop()
return Dimensions{
Size: dims.Size.Add(image.Point{X: right + left, Y: top + bottom}),
Baseline: dims.Baseline + bottom,
@@ -153,39 +158,70 @@ func UniformInset(v unit.Value) Inset {
}
// Layout a widget according to the direction.
-func (a Direction) Layout(gtx Context, w Widget) Dimensions {
+// The widget is called with the context constraints minimum cleared.
+func (d Direction) Layout(gtx Context, w Widget) Dimensions {
macro := op.Record(gtx.Ops)
- cs := gtx.Constraints
- gtx.Constraints.Min = image.Point{}
+ csn := gtx.Constraints.Min
+ switch d {
+ case N, S:
+ gtx.Constraints.Min.Y = 0
+ case E, W:
+ gtx.Constraints.Min.X = 0
+ default:
+ gtx.Constraints.Min = image.Point{}
+ }
dims := w(gtx)
call := macro.Stop()
sz := dims.Size
- if sz.X < cs.Min.X {
- sz.X = cs.Min.X
+ if sz.X < csn.X {
+ sz.X = csn.X
+ }
+ if sz.Y < csn.Y {
+ sz.Y = csn.Y
}
- if sz.Y < cs.Min.Y {
- sz.Y = cs.Min.Y
+
+ p := d.Position(dims.Size, sz)
+ defer op.Offset(FPt(p)).Push(gtx.Ops).Pop()
+ call.Add(gtx.Ops)
+
+ return Dimensions{
+ Size: sz,
+ Baseline: dims.Baseline + sz.Y - dims.Size.Y - p.Y,
}
+}
+
+// Position calculates widget position according to the direction.
+func (d Direction) Position(widget, bounds image.Point) image.Point {
var p image.Point
- switch Direction(a) {
+
+ switch d {
case N, S, Center:
- p.X = (sz.X - dims.Size.X) / 2
+ p.X = (bounds.X - widget.X) / 2
case NE, SE, E:
- p.X = sz.X - dims.Size.X
+ p.X = bounds.X - widget.X
}
- switch Direction(a) {
+
+ switch d {
case W, Center, E:
- p.Y = (sz.Y - dims.Size.Y) / 2
+ p.Y = (bounds.Y - widget.Y) / 2
case SW, S, SE:
- p.Y = sz.Y - dims.Size.Y
+ p.Y = bounds.Y - widget.Y
}
- stack := op.Push(gtx.Ops)
- op.Offset(FPt(p)).Add(gtx.Ops)
- call.Add(gtx.Ops)
- stack.Pop()
+
+ return p
+}
+
+// Spacer adds space between widgets.
+type Spacer struct {
+ Width, Height unit.Value
+}
+
+func (s Spacer) Layout(gtx Context) Dimensions {
return Dimensions{
- Size: sz,
- Baseline: dims.Baseline + sz.Y - dims.Size.Y - p.Y,
+ Size: image.Point{
+ X: gtx.Px(s.Width),
+ Y: gtx.Px(s.Height),
+ },
}
}
@@ -204,6 +240,50 @@ func (a Alignment) String() string {
}
}
+// Convert a point in (x, y) coordinates to (main, cross) coordinates,
+// or vice versa. Specifically, Convert((x, y)) returns (x, y) unchanged
+// for the horizontal axis, or (y, x) for the vertical axis.
+func (a Axis) Convert(pt image.Point) image.Point {
+ if a == Horizontal {
+ return pt
+ }
+ return image.Pt(pt.Y, pt.X)
+}
+
+// FConvert a point in (x, y) coordinates to (main, cross) coordinates,
+// or vice versa. Specifically, FConvert((x, y)) returns (x, y) unchanged
+// for the horizontal axis, or (y, x) for the vertical axis.
+func (a Axis) FConvert(pt f32.Point) f32.Point {
+ if a == Horizontal {
+ return pt
+ }
+ return f32.Pt(pt.Y, pt.X)
+}
+
+// mainConstraint returns the min and max main constraints for axis a.
+func (a Axis) mainConstraint(cs Constraints) (int, int) {
+ if a == Horizontal {
+ return cs.Min.X, cs.Max.X
+ }
+ return cs.Min.Y, cs.Max.Y
+}
+
+// crossConstraint returns the min and max cross constraints for axis a.
+func (a Axis) crossConstraint(cs Constraints) (int, int) {
+ if a == Horizontal {
+ return cs.Min.Y, cs.Max.Y
+ }
+ return cs.Min.X, cs.Max.X
+}
+
+// constraints returns the constraints for axis a.
+func (a Axis) constraints(mainMin, mainMax, crossMin, crossMax int) Constraints {
+ if a == Horizontal {
+ return Constraints{Min: image.Pt(mainMin, crossMin), Max: image.Pt(mainMax, crossMax)}
+ }
+ return Constraints{Min: image.Pt(crossMin, mainMin), Max: image.Pt(crossMax, mainMax)}
+}
+
func (a Axis) String() string {
switch a {
case Horizontal:
diff --git a/vendor/gioui.org/layout/list.go b/vendor/gioui.org/layout/list.go
index 68b63f7..aa78f1b 100644
--- a/vendor/gioui.org/layout/list.go
+++ b/vendor/gioui.org/layout/list.go
@@ -6,7 +6,6 @@ import (
"image"
"gioui.org/gesture"
- "gioui.org/io/pointer"
"gioui.org/op"
"gioui.org/op/clip"
)
@@ -29,15 +28,13 @@ type List struct {
// Alignment is the cross axis alignment of list elements.
Alignment Alignment
- ctx Context
- macro op.MacroOp
- child op.MacroOp
+ cs Constraints
scroll gesture.Scroll
scrollDelta int
// Position is updated during Layout. To save the list scroll position,
// just save Position after Layout finishes. To scroll the list
- // programatically, update Position (e.g. restore it from a saved value)
+ // programmatically, update Position (e.g. restore it from a saved value)
// before calling Layout.
Position Position
@@ -71,6 +68,13 @@ type Position struct {
// Offset is the distance in pixels from the top edge to the child at index
// First.
Offset int
+ // OffsetLast is the signed distance in pixels from the bottom edge to the
+ // bottom edge of the child at index First+Count.
+ OffsetLast int
+ // Count is the number of visible children.
+ Count int
+ // Length is the estimated total size of all children, measured in pixels.
+ Length int
}
const (
@@ -86,29 +90,41 @@ func (l *List) init(gtx Context, len int) {
if l.more() {
panic("unfinished child")
}
- l.ctx = gtx
+ l.cs = gtx.Constraints
l.maxSize = 0
l.children = l.children[:0]
l.len = len
- l.update()
+ l.update(gtx)
if l.scrollToEnd() || l.Position.First > len {
l.Position.Offset = 0
l.Position.First = len
}
- l.macro = op.Record(gtx.Ops)
- l.next()
}
// Layout the List.
func (l *List) Layout(gtx Context, len int, w ListElement) Dimensions {
- for l.init(gtx, len); l.more(); l.next() {
- crossMin, crossMax := axisCrossConstraint(l.Axis, l.ctx.Constraints)
- cs := axisConstraints(l.Axis, 0, inf, crossMin, crossMax)
- i := l.index()
- gtx.Constraints = cs
- l.end(w(gtx, i))
+ l.init(gtx, len)
+ crossMin, crossMax := l.Axis.crossConstraint(gtx.Constraints)
+ gtx.Constraints = l.Axis.constraints(0, inf, crossMin, crossMax)
+ macro := op.Record(gtx.Ops)
+ laidOutTotalLength := 0
+ numLaidOut := 0
+
+ for l.next(); l.more(); l.next() {
+ child := op.Record(gtx.Ops)
+ dims := w(gtx, l.index())
+ call := child.Stop()
+ l.end(dims, call)
+ laidOutTotalLength += l.Axis.Convert(dims.Size).X
+ numLaidOut++
+ }
+
+ if numLaidOut > 0 {
+ l.Position.Length = laidOutTotalLength * len / numLaidOut
+ } else {
+ l.Position.Length = 0
}
- return l.layout()
+ return l.layout(gtx.Ops, macro)
}
func (l *List) scrollToEnd() bool {
@@ -120,8 +136,8 @@ func (l *List) Dragging() bool {
return l.scroll.State() == gesture.StateDragging
}
-func (l *List) update() {
- d := l.scroll.Scroll(l.ctx.Metric, l.ctx, l.ctx.Now, gesture.Axis(l.Axis))
+func (l *List) update(gtx Context) {
+ d := l.scroll.Scroll(gtx.Metric, gtx, gtx.Now, gesture.Axis(l.Axis))
l.scrollDelta = d
l.Position.Offset += d
}
@@ -136,9 +152,6 @@ func (l *List) next() {
l.Position.Offset += l.scrollDelta
l.dir = l.nextDir()
}
- if l.more() {
- l.child = op.Record(l.ctx.Ops)
- }
}
// index is current child's position in the underlying list.
@@ -159,7 +172,7 @@ func (l *List) more() bool {
}
func (l *List) nextDir() iterationDir {
- _, vsize := axisMainConstraint(l.Axis, l.ctx.Constraints)
+ _, vsize := l.Axis.mainConstraint(l.cs)
last := l.Position.First + len(l.children)
// Clamp offset.
if l.maxSize-l.Position.Offset < vsize && last == l.len {
@@ -180,16 +193,17 @@ func (l *List) nextDir() iterationDir {
}
// End the current child by specifying its dimensions.
-func (l *List) end(dims Dimensions) {
- call := l.child.Stop()
+func (l *List) end(dims Dimensions, call op.CallOp) {
child := scrollChild{dims.Size, call}
- mainSize := axisMain(l.Axis, child.size)
+ mainSize := l.Axis.Convert(child.size).X
l.maxSize += mainSize
switch l.dir {
case iterateForward:
l.children = append(l.children, child)
case iterateBackward:
- l.children = append([]scrollChild{child}, l.children...)
+ l.children = append(l.children, scrollChild{})
+ copy(l.children[1:], l.children)
+ l.children[0] = child
l.Position.First--
l.Position.Offset += mainSize
default:
@@ -199,17 +213,18 @@ func (l *List) end(dims Dimensions) {
}
// Layout the List and return its dimensions.
-func (l *List) layout() Dimensions {
+func (l *List) layout(ops *op.Ops, macro op.MacroOp) Dimensions {
if l.more() {
panic("unfinished child")
}
- mainMin, mainMax := axisMainConstraint(l.Axis, l.ctx.Constraints)
+ mainMin, mainMax := l.Axis.mainConstraint(l.cs)
children := l.children
// Skip invisible children
for len(children) > 0 {
sz := children[0].size
- mainSize := axisMain(l.Axis, sz)
- if l.Position.Offset <= mainSize {
+ mainSize := l.Axis.Convert(sz).X
+ if l.Position.Offset < mainSize {
+ // First child is partially visible.
break
}
l.Position.First++
@@ -219,32 +234,33 @@ func (l *List) layout() Dimensions {
size := -l.Position.Offset
var maxCross int
for i, child := range children {
- sz := child.size
- if c := axisCross(l.Axis, sz); c > maxCross {
+ sz := l.Axis.Convert(child.size)
+ if c := sz.Y; c > maxCross {
maxCross = c
}
- size += axisMain(l.Axis, sz)
+ size += sz.X
if size >= mainMax {
children = children[:i+1]
break
}
}
- ops := l.ctx.Ops
+ l.Position.Count = len(children)
+ l.Position.OffsetLast = mainMax - size
pos := -l.Position.Offset
// ScrollToEnd lists are end aligned.
- if space := mainMax - size; l.ScrollToEnd && space > 0 {
+ if space := l.Position.OffsetLast; l.ScrollToEnd && space > 0 {
pos += space
}
for _, child := range children {
- sz := child.size
+ sz := l.Axis.Convert(child.size)
var cross int
switch l.Alignment {
case End:
- cross = maxCross - axisCross(l.Axis, sz)
+ cross = maxCross - sz.Y
case Middle:
- cross = (maxCross - axisCross(l.Axis, sz)) / 2
+ cross = (maxCross - sz.Y) / 2
}
- childSize := axisMain(l.Axis, sz)
+ childSize := sz.X
max := childSize + pos
if max > mainMax {
max = mainMax
@@ -254,14 +270,15 @@ func (l *List) layout() Dimensions {
min = 0
}
r := image.Rectangle{
- Min: axisPoint(l.Axis, min, -inf),
- Max: axisPoint(l.Axis, max, inf),
+ Min: l.Axis.Convert(image.Pt(min, -inf)),
+ Max: l.Axis.Convert(image.Pt(max, inf)),
}
- stack := op.Push(ops)
- clip.Rect{Rect: FRect(r)}.Op(ops).Add(ops)
- op.Offset(FPt(axisPoint(l.Axis, pos, cross))).Add(ops)
+ cl := clip.Rect(r).Push(ops)
+ pt := l.Axis.Convert(image.Pt(pos, cross))
+ trans := op.Offset(FPt(pt)).Push(ops)
child.call.Add(ops)
- stack.Pop()
+ trans.Pop()
+ cl.Pop()
pos += childSize
}
atStart := l.Position.First == 0 && l.Position.Offset <= 0
@@ -276,11 +293,33 @@ func (l *List) layout() Dimensions {
if pos > mainMax {
pos = mainMax
}
- dims := axisPoint(l.Axis, pos, maxCross)
- call := l.macro.Stop()
- defer op.Push(l.ctx.Ops).Pop()
- pointer.Rect(image.Rectangle{Max: dims}).Add(ops)
- l.scroll.Add(ops)
+ if crossMin, crossMax := l.Axis.crossConstraint(l.cs); maxCross < crossMin {
+ maxCross = crossMin
+ } else if maxCross > crossMax {
+ maxCross = crossMax
+ }
+ dims := l.Axis.Convert(image.Pt(pos, maxCross))
+ call := macro.Stop()
+ defer clip.Rect(image.Rectangle{Max: dims}).Push(ops).Pop()
+
+ var min, max int
+ if o := l.Position.Offset; o > 0 {
+ // Use the size of the invisible part as scroll boundary.
+ min = -o
+ } else if l.Position.First > 0 {
+ min = -inf
+ }
+ if o := l.Position.OffsetLast; o < 0 {
+ max = -o
+ } else if l.Position.First+l.Position.Count < l.len {
+ max = inf
+ }
+ scrollRange := image.Rectangle{
+ Min: l.Axis.Convert(image.Pt(min, 0)),
+ Max: l.Axis.Convert(image.Pt(max, 0)),
+ }
+ l.scroll.Add(ops, scrollRange)
+
call.Add(ops)
return Dimensions{Size: dims}
}
diff --git a/vendor/gioui.org/layout/stack.go b/vendor/gioui.org/layout/stack.go
index 0de43df..fb8b8ac 100644
--- a/vendor/gioui.org/layout/stack.go
+++ b/vendor/gioui.org/layout/stack.go
@@ -50,14 +50,14 @@ func Expanded(w Widget) StackChild {
func (s Stack) Layout(gtx Context, children ...StackChild) Dimensions {
var maxSZ image.Point
// First lay out Stacked children.
+ cgtx := gtx
+ cgtx.Constraints.Min = image.Point{}
for i, w := range children {
if w.expanded {
continue
}
macro := op.Record(gtx.Ops)
- gtx := gtx
- gtx.Constraints.Min = image.Pt(0, 0)
- dims := w.widget(gtx)
+ dims := w.widget(cgtx)
call := macro.Stop()
if w := dims.Size.X; w > maxSZ.X {
maxSZ.X = w
@@ -74,11 +74,8 @@ func (s Stack) Layout(gtx Context, children ...StackChild) Dimensions {
continue
}
macro := op.Record(gtx.Ops)
- gtx := gtx
- gtx.Constraints = Constraints{
- Min: maxSZ, Max: gtx.Constraints.Max,
- }
- dims := w.widget(gtx)
+ cgtx.Constraints.Min = maxSZ
+ dims := w.widget(cgtx)
call := macro.Stop()
if w := dims.Size.X; w > maxSZ.X {
maxSZ.X = w
@@ -107,10 +104,9 @@ func (s Stack) Layout(gtx Context, children ...StackChild) Dimensions {
case SW, S, SE:
p.Y = maxSZ.Y - sz.Y
}
- stack := op.Push(gtx.Ops)
- op.Offset(FPt(p)).Add(gtx.Ops)
+ trans := op.Offset(FPt(p)).Push(gtx.Ops)
ch.call.Add(gtx.Ops)
- stack.Pop()
+ trans.Pop()
if baseline == 0 {
if b := ch.dims.Baseline; b != 0 {
baseline = b + maxSZ.Y - sz.Y - p.Y
diff --git a/vendor/gioui.org/op/clip/clip.go b/vendor/gioui.org/op/clip/clip.go
index 59554b5..5b4dad0 100644
--- a/vendor/gioui.org/op/clip/clip.go
+++ b/vendor/gioui.org/op/clip/clip.go
@@ -4,85 +4,240 @@ package clip
import (
"encoding/binary"
+ "hash/maphash"
"image"
"math"
"gioui.org/f32"
- "gioui.org/internal/opconst"
"gioui.org/internal/ops"
+ "gioui.org/internal/scene"
+ "gioui.org/internal/stroke"
"gioui.org/op"
)
+// Op represents a clip area. Op intersects the current clip area with
+// itself.
+type Op struct {
+ path PathSpec
+
+ outline bool
+ width float32
+}
+
+// Stack represents an Op pushed on the clip stack.
+type Stack struct {
+ ops *ops.Ops
+ id ops.StackID
+ macroID int
+}
+
+var pathSeed maphash.Seed
+
+func init() {
+ pathSeed = maphash.MakeSeed()
+}
+
+// Push saves the current clip state on the stack and updates the current
+// state to the intersection of the current p.
+func (p Op) Push(o *op.Ops) Stack {
+ id, macroID := ops.PushOp(&o.Internal, ops.ClipStack)
+ p.add(o)
+ return Stack{ops: &o.Internal, id: id, macroID: macroID}
+}
+
+func (p Op) add(o *op.Ops) {
+ path := p.path
+
+ bo := binary.LittleEndian
+ if path.hasSegments {
+ data := ops.Write(&o.Internal, ops.TypePathLen)
+ data[0] = byte(ops.TypePath)
+ bo.PutUint64(data[1:], path.hash)
+ path.spec.Add(o)
+ }
+
+ bounds := path.bounds
+ if p.width > 0 {
+ // Expand bounds to cover stroke.
+ half := int(p.width*.5 + .5)
+ bounds.Min.X -= half
+ bounds.Min.Y -= half
+ bounds.Max.X += half
+ bounds.Max.Y += half
+ data := ops.Write(&o.Internal, ops.TypeStrokeLen)
+ data[0] = byte(ops.TypeStroke)
+ bo := binary.LittleEndian
+ bo.PutUint32(data[1:], math.Float32bits(p.width))
+ }
+
+ data := ops.Write(&o.Internal, ops.TypeClipLen)
+ data[0] = byte(ops.TypeClip)
+ bo.PutUint32(data[1:], uint32(bounds.Min.X))
+ bo.PutUint32(data[5:], uint32(bounds.Min.Y))
+ bo.PutUint32(data[9:], uint32(bounds.Max.X))
+ bo.PutUint32(data[13:], uint32(bounds.Max.Y))
+ if p.outline {
+ data[17] = byte(1)
+ }
+ data[18] = byte(path.shape)
+}
+
+func (s Stack) Pop() {
+ ops.PopOp(s.ops, ops.ClipStack, s.id, s.macroID)
+ data := ops.Write(s.ops, ops.TypePopClipLen)
+ data[0] = byte(ops.TypePopClip)
+}
+
+type PathSpec struct {
+ spec op.CallOp
+ // hasSegments tracks whether there are any segments in the path.
+ hasSegments bool
+ bounds image.Rectangle
+ shape ops.Shape
+ hash uint64
+}
+
// Path constructs a Op clip path described by lines and
// Bézier curves, where drawing outside the Path is discarded.
-// The inside-ness of a pixel is determines by the even-odd rule,
+// The inside-ness of a pixel is determines by the non-zero winding rule,
// similar to the SVG rule of the same name.
//
// Path generates no garbage and can be used for dynamic paths; path
// data is stored directly in the Ops list supplied to Begin.
type Path struct {
- ops *op.Ops
- contour int
- pen f32.Point
- macro op.MacroOp
- start f32.Point
+ ops *ops.Ops
+ contour int
+ pen f32.Point
+ macro op.MacroOp
+ start f32.Point
+ hasSegments bool
+ bounds f32.Rectangle
+ hash maphash.Hash
}
-// Op sets the current clip to the intersection of
-// the existing clip with this clip.
-//
-// If you need to reset the clip to its previous values after
-// applying a Op, use op.StackOp.
-type Op struct {
- call op.CallOp
- bounds f32.Rectangle
+// Pos returns the current pen position.
+func (p *Path) Pos() f32.Point { return p.pen }
+
+// Begin the path, storing the path data and final Op into ops.
+func (p *Path) Begin(o *op.Ops) {
+ *p = Path{
+ ops: &o.Internal,
+ macro: op.Record(o),
+ contour: 1,
+ }
+ p.hash.SetSeed(pathSeed)
+ data := ops.Write(p.ops, ops.TypeAuxLen)
+ data[0] = byte(ops.TypeAux)
}
-func (p Op) Add(o *op.Ops) {
- p.call.Add(o)
- data := o.Write(opconst.TypeClipLen)
- data[0] = byte(opconst.TypeClip)
- bo := binary.LittleEndian
- bo.PutUint32(data[1:], math.Float32bits(p.bounds.Min.X))
- bo.PutUint32(data[5:], math.Float32bits(p.bounds.Min.Y))
- bo.PutUint32(data[9:], math.Float32bits(p.bounds.Max.X))
- bo.PutUint32(data[13:], math.Float32bits(p.bounds.Max.Y))
+// End returns a PathSpec ready to use in clipping operations.
+func (p *Path) End() PathSpec {
+ p.gap()
+ c := p.macro.Stop()
+ return PathSpec{
+ spec: c,
+ hasSegments: p.hasSegments,
+ bounds: boundRectF(p.bounds),
+ hash: p.hash.Sum64(),
+ }
}
-// Begin the path, storing the path data and final Op into ops.
-func (p *Path) Begin(ops *op.Ops) {
- p.ops = ops
- p.macro = op.Record(ops)
- // Write the TypeAux opcode
- data := ops.Write(opconst.TypeAuxLen)
- data[0] = byte(opconst.TypeAux)
+// Move moves the pen by the amount specified by delta.
+func (p *Path) Move(delta f32.Point) {
+ to := delta.Add(p.pen)
+ p.MoveTo(to)
}
-// MoveTo moves the pen to the given position.
-func (p *Path) Move(to f32.Point) {
- to = to.Add(p.pen)
+// MoveTo moves the pen to the specified absolute coordinate.
+func (p *Path) MoveTo(to f32.Point) {
+ if p.pen == to {
+ return
+ }
+ p.gap()
p.end()
p.pen = to
p.start = to
}
-// end completes the current contour.
-func (p *Path) end() {
+func (p *Path) gap() {
if p.pen != p.start {
- p.lineTo(p.start)
+ // A closed contour starts and ends in the same point.
+ // This move creates a gap in the contour, register it.
+ data := ops.Write(p.ops, scene.CommandSize+4)
+ bo := binary.LittleEndian
+ bo.PutUint32(data[0:], uint32(p.contour))
+ p.cmd(data[4:], scene.Gap(p.pen, p.start))
}
+}
+
+// end completes the current contour.
+func (p *Path) end() {
p.contour++
}
// Line moves the pen by the amount specified by delta, recording a line.
func (p *Path) Line(delta f32.Point) {
to := delta.Add(p.pen)
- p.lineTo(to)
+ p.LineTo(to)
}
-func (p *Path) lineTo(to f32.Point) {
- // Model lines as degenerate quadratic Béziers.
- p.quadTo(to.Add(p.pen).Mul(.5), to)
+// LineTo moves the pen to the absolute point specified, recording a line.
+func (p *Path) LineTo(to f32.Point) {
+ data := ops.Write(p.ops, scene.CommandSize+4)
+ bo := binary.LittleEndian
+ bo.PutUint32(data[0:], uint32(p.contour))
+ p.cmd(data[4:], scene.Line(p.pen, to))
+ p.pen = to
+ p.expand(to)
+}
+
+func (p *Path) cmd(data []byte, c scene.Command) {
+ ops.EncodeCommand(data, c)
+ p.hash.Write(data)
+}
+
+func (p *Path) expand(pt f32.Point) {
+ if !p.hasSegments {
+ p.hasSegments = true
+ p.bounds = f32.Rectangle{Min: pt, Max: pt}
+ } else {
+ b := p.bounds
+ if pt.X < b.Min.X {
+ b.Min.X = pt.X
+ }
+ if pt.Y < b.Min.Y {
+ b.Min.Y = pt.Y
+ }
+ if pt.X > b.Max.X {
+ b.Max.X = pt.X
+ }
+ if pt.Y > b.Max.Y {
+ b.Max.Y = pt.Y
+ }
+ p.bounds = b
+ }
+}
+
+// boundRectF returns a bounding image.Rectangle for a f32.Rectangle.
+func boundRectF(r f32.Rectangle) image.Rectangle {
+ return image.Rectangle{
+ Min: image.Point{
+ X: int(floor(r.Min.X)),
+ Y: int(floor(r.Min.Y)),
+ },
+ Max: image.Point{
+ X: int(ceil(r.Max.X)),
+ Y: int(ceil(r.Max.Y)),
+ },
+ }
+}
+
+func ceil(v float32) int {
+ return int(math.Ceil(float64(v)))
+}
+
+func floor(v float32) int {
+ return int(math.Floor(float64(v)))
}
// Quad records a quadratic Bézier from the pen to end
@@ -90,174 +245,101 @@ func (p *Path) lineTo(to f32.Point) {
func (p *Path) Quad(ctrl, to f32.Point) {
ctrl = ctrl.Add(p.pen)
to = to.Add(p.pen)
- p.quadTo(ctrl, to)
+ p.QuadTo(ctrl, to)
}
-func (p *Path) quadTo(ctrl, to f32.Point) {
- data := p.ops.Write(ops.QuadSize + 4)
+// QuadTo records a quadratic Bézier from the pen to end
+// with the control point ctrl, with absolute coordinates.
+func (p *Path) QuadTo(ctrl, to f32.Point) {
+ data := ops.Write(p.ops, scene.CommandSize+4)
bo := binary.LittleEndian
bo.PutUint32(data[0:], uint32(p.contour))
- ops.EncodeQuad(data[4:], ops.Quad{
- From: p.pen,
- Ctrl: ctrl,
- To: to,
- })
+ p.cmd(data[4:], scene.Quad(p.pen, ctrl, to))
p.pen = to
+ p.expand(ctrl)
+ p.expand(to)
+}
+
+// ArcTo adds an elliptical arc to the path. The implied ellipse is defined
+// by its focus points f1 and f2.
+// The arc starts in the current point and ends angle radians along the ellipse boundary.
+// The sign of angle determines the direction; positive being counter-clockwise,
+// negative clockwise.
+func (p *Path) ArcTo(f1, f2 f32.Point, angle float32) {
+ const segments = 16
+ m := stroke.ArcTransform(p.pen, f1, f2, angle, segments)
+
+ for i := 0; i < segments; i++ {
+ p0 := p.pen
+ p1 := m.Transform(p0)
+ p2 := m.Transform(p1)
+ ctl := p1.Mul(2).Sub(p0.Add(p2).Mul(.5))
+ p.QuadTo(ctl, p2)
+ }
+}
+
+// Arc is like ArcTo where f1 and f2 are relative to the current position.
+func (p *Path) Arc(f1, f2 f32.Point, angle float32) {
+ f1 = f1.Add(p.pen)
+ f2 = f2.Add(p.pen)
+ p.ArcTo(f1, f2, angle)
}
// Cube records a cubic Bézier from the pen through
// two control points ending in to.
func (p *Path) Cube(ctrl0, ctrl1, to f32.Point) {
- ctrl0 = ctrl0.Add(p.pen)
- ctrl1 = ctrl1.Add(p.pen)
- to = to.Add(p.pen)
- // Set the maximum distance proportionally to the longest side
- // of the bounding rectangle.
- hull := f32.Rectangle{
- Min: p.pen,
- Max: ctrl0,
- }.Canon().Add(ctrl1).Add(to)
- l := hull.Dx()
- if h := hull.Dy(); h > l {
- l = h
- }
- p.approxCubeTo(0, l*0.001, ctrl0, ctrl1, to)
-}
-
-// approxCube approximates a cubic Bézier by a series of quadratic
-// curves.
-func (p *Path) approxCubeTo(splits int, maxDist float32, ctrl0, ctrl1, to f32.Point) int {
- // The idea is from
- // https://caffeineowl.com/graphics/2d/vectorial/cubic2quad01.html
- // where a quadratic approximates a cubic by eliminating its t³ term
- // from its polynomial expression anchored at the starting point:
- //
- // P(t) = pen + 3t(ctrl0 - pen) + 3t²(ctrl1 - 2ctrl0 + pen) + t³(to - 3ctrl1 + 3ctrl0 - pen)
- //
- // The control point for the new quadratic Q1 that shares starting point, pen, with P is
- //
- // C1 = (3ctrl0 - pen)/2
- //
- // The reverse cubic anchored at the end point has the polynomial
- //
- // P'(t) = to + 3t(ctrl1 - to) + 3t²(ctrl0 - 2ctrl1 + to) + t³(pen - 3ctrl0 + 3ctrl1 - to)
- //
- // The corresponding quadratic Q2 that shares the end point, to, with P has control
- // point
- //
- // C2 = (3ctrl1 - to)/2
- //
- // The combined quadratic Bézier, Q, shares both start and end points with its cubic
- // and use the midpoint between the two curves Q1 and Q2 as control point:
- //
- // C = (3ctrl0 - pen + 3ctrl1 - to)/4
- c := ctrl0.Mul(3).Sub(p.pen).Add(ctrl1.Mul(3)).Sub(to).Mul(1.0 / 4.0)
- const maxSplits = 32
- if splits >= maxSplits {
- p.quadTo(c, to)
- return splits
+ p.CubeTo(p.pen.Add(ctrl0), p.pen.Add(ctrl1), p.pen.Add(to))
+}
+
+// CubeTo records a cubic Bézier from the pen through
+// two control points ending in to, with absolute coordinates.
+func (p *Path) CubeTo(ctrl0, ctrl1, to f32.Point) {
+ if ctrl0 == p.pen && ctrl1 == p.pen && to == p.pen {
+ return
}
- // The maximum distance between the cubic P and its approximation Q given t
- // can be shown to be
- //
- // d = sqrt(3)/36*|to - 3ctrl1 + 3ctrl0 - pen|
- //
- // To save a square root, compare d² with the squared tolerance.
- v := to.Sub(ctrl1.Mul(3)).Add(ctrl0.Mul(3)).Sub(p.pen)
- d2 := (v.X*v.X + v.Y*v.Y) * 3 / (36 * 36)
- if d2 <= maxDist*maxDist {
- p.quadTo(c, to)
- return splits
+ data := ops.Write(p.ops, scene.CommandSize+4)
+ bo := binary.LittleEndian
+ bo.PutUint32(data[0:], uint32(p.contour))
+ p.cmd(data[4:], scene.Cubic(p.pen, ctrl0, ctrl1, to))
+ p.pen = to
+ p.expand(ctrl0)
+ p.expand(ctrl1)
+ p.expand(to)
+}
+
+// Close closes the path contour.
+func (p *Path) Close() {
+ if p.pen != p.start {
+ p.LineTo(p.start)
}
- // De Casteljau split the curve and approximate the halves.
- t := float32(0.5)
- c0 := p.pen.Add(ctrl0.Sub(p.pen).Mul(t))
- c1 := ctrl0.Add(ctrl1.Sub(ctrl0).Mul(t))
- c2 := ctrl1.Add(to.Sub(ctrl1).Mul(t))
- c01 := c0.Add(c1.Sub(c0).Mul(t))
- c12 := c1.Add(c2.Sub(c1).Mul(t))
- c0112 := c01.Add(c12.Sub(c01).Mul(t))
- splits++
- splits = p.approxCubeTo(splits, maxDist, c0, c01, c0112)
- splits = p.approxCubeTo(splits, maxDist, c12, c2, to)
- return splits
-}
-
-// End the path and return a clip operation that represents it.
-func (p *Path) End() Op {
p.end()
- c := p.macro.Stop()
+}
+
+// Stroke represents a stroked path.
+type Stroke struct {
+ Path PathSpec
+ // Width of the stroked path.
+ Width float32
+}
+
+// Op returns a clip operation representing the stroke.
+func (s Stroke) Op() Op {
return Op{
- call: c,
+ path: s.Path,
+ width: s.Width,
}
}
-// Rect represents the clip area of a rectangle with rounded
-// corners.The origin is in the upper left
-// corner.
-// Specify a square with corner radii equal to half the square size to
-// construct a circular clip area.
-type Rect struct {
- Rect f32.Rectangle
- // The corner radii.
- SE, SW, NW, NE float32
-}
-
-// Op returns the Op for the rectangle.
-func (rr Rect) Op(ops *op.Ops) Op {
- r := rr.Rect
- // Optimize for the common pixel aligned rectangle with no
- // corner rounding.
- if rr.SE == 0 && rr.SW == 0 && rr.NW == 0 && rr.NE == 0 {
- ri := image.Rectangle{
- Min: image.Point{X: int(r.Min.X), Y: int(r.Min.Y)},
- Max: image.Point{X: int(r.Max.X), Y: int(r.Max.Y)},
- }
- // Optimize pixel-aligned rectangles to just its bounds.
- if r == fRect(ri) {
- return Op{bounds: r}
- }
- }
- return roundRect(ops, r, rr.SE, rr.SW, rr.NW, rr.NE)
-}
-
-// Add is a shorthand for Op(ops).Add(ops).
-func (rr Rect) Add(ops *op.Ops) {
- rr.Op(ops).Add(ops)
-}
-
-// roundRect returns the clip area of a rectangle with rounded
-// corners defined by their radii.
-func roundRect(ops *op.Ops, r f32.Rectangle, se, sw, nw, ne float32) Op {
- size := r.Size()
- // https://pomax.github.io/bezierinfo/#circles_cubic.
- w, h := float32(size.X), float32(size.Y)
- const c = 0.55228475 // 4*(sqrt(2)-1)/3
- var p Path
- p.Begin(ops)
- p.Move(r.Min)
-
- p.Move(f32.Point{X: w, Y: h - se})
- p.Cube(f32.Point{X: 0, Y: se * c}, f32.Point{X: -se + se*c, Y: se}, f32.Point{X: -se, Y: se}) // SE
- p.Line(f32.Point{X: sw - w + se, Y: 0})
- p.Cube(f32.Point{X: -sw * c, Y: 0}, f32.Point{X: -sw, Y: -sw + sw*c}, f32.Point{X: -sw, Y: -sw}) // SW
- p.Line(f32.Point{X: 0, Y: nw - h + sw})
- p.Cube(f32.Point{X: 0, Y: -nw * c}, f32.Point{X: nw - nw*c, Y: -nw}, f32.Point{X: nw, Y: -nw}) // NW
- p.Line(f32.Point{X: w - ne - nw, Y: 0})
- p.Cube(f32.Point{X: ne * c, Y: 0}, f32.Point{X: ne, Y: ne - ne*c}, f32.Point{X: ne, Y: ne}) // NE
- return p.End()
-}
-
-// fRect converts a rectangle to a f32.Rectangle.
-func fRect(r image.Rectangle) f32.Rectangle {
- return f32.Rectangle{
- Min: fPt(r.Min), Max: fPt(r.Max),
- }
+// Outline represents the area inside of a path, according to the
+// non-zero winding rule.
+type Outline struct {
+ Path PathSpec
}
-// fPt converts an point to a f32.Point.
-func fPt(p image.Point) f32.Point {
- return f32.Point{
- X: float32(p.X), Y: float32(p.Y),
+// Op returns a clip operation representing the outline.
+func (o Outline) Op() Op {
+ return Op{
+ path: o.Path,
+ outline: true,
}
}
diff --git a/vendor/gioui.org/op/clip/doc.go b/vendor/gioui.org/op/clip/doc.go
index 6ba5546..894cffd 100644
--- a/vendor/gioui.org/op/clip/doc.go
+++ b/vendor/gioui.org/op/clip/doc.go
@@ -1,16 +1,14 @@
// SPDX-License-Identifier: Unlicense OR MIT
/*
-Package clip provides operations for clipping paint operations.
-Drawing outside the current clip area is ignored.
+Package clip provides operations for defining areas that applies to operations
+such as paints and pointer handlers.
-The current clip is initially the infinite set. An Op sets the clip
-to the intersection of the current clip and the clip area it
-represents. If you need to reset the current clip to its value
-before applying an Op, use op.StackOp.
+The current clip is initially the infinite set. Pushing an Op sets the clip
+to the intersection of the current clip and pushed clip area. Popping the
+area restores the clip to its state before pushing.
-General clipping areas are constructed with Path. Simpler special
-cases such as rectangular clip areas also exist as convenient
-constructors.
+General clipping areas are constructed with Path. Common cases such as
+rectangular clip areas also exist as convenient constructors.
*/
package clip
diff --git a/vendor/gioui.org/op/clip/shapes.go b/vendor/gioui.org/op/clip/shapes.go
new file mode 100644
index 0000000..30609e5
--- /dev/null
+++ b/vendor/gioui.org/op/clip/shapes.go
@@ -0,0 +1,185 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package clip
+
+import (
+ "image"
+ "math"
+
+ "gioui.org/f32"
+ "gioui.org/internal/ops"
+ "gioui.org/op"
+)
+
+// Rect represents the clip area of a pixel-aligned rectangle.
+type Rect image.Rectangle
+
+// Op returns the op for the rectangle.
+func (r Rect) Op() Op {
+ return Op{
+ outline: true,
+ path: r.Path(),
+ }
+}
+
+// Push the clip operation on the clip stack.
+func (r Rect) Push(ops *op.Ops) Stack {
+ return r.Op().Push(ops)
+}
+
+// Path returns the PathSpec for the rectangle.
+func (r Rect) Path() PathSpec {
+ return PathSpec{
+ shape: ops.Rect,
+ bounds: image.Rectangle(r),
+ }
+}
+
+// UniformRRect returns an RRect with all corner radii set to the
+// provided radius.
+func UniformRRect(rect f32.Rectangle, radius float32) RRect {
+ return RRect{
+ Rect: rect,
+ SE: radius,
+ SW: radius,
+ NE: radius,
+ NW: radius,
+ }
+}
+
+// RRect represents the clip area of a rectangle with rounded
+// corners.
+//
+// Specify a square with corner radii equal to half the square size to
+// construct a circular clip area.
+type RRect struct {
+ Rect f32.Rectangle
+ // The corner radii.
+ SE, SW, NW, NE float32
+}
+
+// Op returns the op for the rounded rectangle.
+func (rr RRect) Op(ops *op.Ops) Op {
+ if rr.SE == 0 && rr.SW == 0 && rr.NW == 0 && rr.NE == 0 {
+ r := image.Rectangle{
+ Min: image.Point{X: int(rr.Rect.Min.X), Y: int(rr.Rect.Min.Y)},
+ Max: image.Point{X: int(rr.Rect.Max.X), Y: int(rr.Rect.Max.Y)},
+ }
+ // Only use Rect if rr is pixel-aligned, as Rect is guaranteed to be.
+ if fPt(r.Min) == rr.Rect.Min && fPt(r.Max) == rr.Rect.Max {
+ return Rect(r).Op()
+ }
+ }
+ return Outline{Path: rr.Path(ops)}.Op()
+}
+
+// Push the rectangle clip on the clip stack.
+func (rr RRect) Push(ops *op.Ops) Stack {
+ return rr.Op(ops).Push(ops)
+}
+
+// Path returns the PathSpec for the rounded rectangle.
+func (rr RRect) Path(ops *op.Ops) PathSpec {
+ var p Path
+ p.Begin(ops)
+
+ // https://pomax.github.io/bezierinfo/#circles_cubic.
+ const q = 4 * (math.Sqrt2 - 1) / 3
+ const iq = 1 - q
+
+ se, sw, nw, ne := rr.SE, rr.SW, rr.NW, rr.NE
+ w, n, e, s := rr.Rect.Min.X, rr.Rect.Min.Y, rr.Rect.Max.X, rr.Rect.Max.Y
+
+ p.MoveTo(f32.Point{X: w + nw, Y: n})
+ p.LineTo(f32.Point{X: e - ne, Y: n}) // N
+ p.CubeTo( // NE
+ f32.Point{X: e - ne*iq, Y: n},
+ f32.Point{X: e, Y: n + ne*iq},
+ f32.Point{X: e, Y: n + ne})
+ p.LineTo(f32.Point{X: e, Y: s - se}) // E
+ p.CubeTo( // SE
+ f32.Point{X: e, Y: s - se*iq},
+ f32.Point{X: e - se*iq, Y: s},
+ f32.Point{X: e - se, Y: s})
+ p.LineTo(f32.Point{X: w + sw, Y: s}) // S
+ p.CubeTo( // SW
+ f32.Point{X: w + sw*iq, Y: s},
+ f32.Point{X: w, Y: s - sw*iq},
+ f32.Point{X: w, Y: s - sw})
+ p.LineTo(f32.Point{X: w, Y: n + nw}) // W
+ p.CubeTo( // NW
+ f32.Point{X: w, Y: n + nw*iq},
+ f32.Point{X: w + nw*iq, Y: n},
+ f32.Point{X: w + nw, Y: n})
+
+ return p.End()
+}
+
+// Ellipse represents the largest axis-aligned ellipse that
+// is contained in its bounds.
+type Ellipse f32.Rectangle
+
+// Op returns the op for the filled ellipse.
+func (e Ellipse) Op(ops *op.Ops) Op {
+ return Outline{Path: e.Path(ops)}.Op()
+}
+
+// Push the filled ellipse clip op on the clip stack.
+func (e Ellipse) Push(ops *op.Ops) Stack {
+ return e.Op(ops).Push(ops)
+}
+
+// Path constructs a path for the ellipse.
+func (e Ellipse) Path(o *op.Ops) PathSpec {
+ bounds := f32.Rectangle(e)
+ if bounds.Dx() == 0 || bounds.Dy() == 0 {
+ return PathSpec{shape: ops.Rect}
+ }
+
+ var p Path
+ p.Begin(o)
+
+ center := bounds.Max.Add(bounds.Min).Mul(.5)
+ diam := bounds.Dx()
+ r := diam * .5
+ // We'll model the ellipse as a circle scaled in the Y
+ // direction.
+ scale := bounds.Dy() / diam
+
+ // https://pomax.github.io/bezierinfo/#circles_cubic.
+ const q = 4 * (math.Sqrt2 - 1) / 3
+
+ curve := r * q
+ top := f32.Point{X: center.X, Y: center.Y - r*scale}
+
+ p.MoveTo(top)
+ p.CubeTo(
+ f32.Point{X: center.X + curve, Y: center.Y - r*scale},
+ f32.Point{X: center.X + r, Y: center.Y - curve*scale},
+ f32.Point{X: center.X + r, Y: center.Y},
+ )
+ p.CubeTo(
+ f32.Point{X: center.X + r, Y: center.Y + curve*scale},
+ f32.Point{X: center.X + curve, Y: center.Y + r*scale},
+ f32.Point{X: center.X, Y: center.Y + r*scale},
+ )
+ p.CubeTo(
+ f32.Point{X: center.X - curve, Y: center.Y + r*scale},
+ f32.Point{X: center.X - r, Y: center.Y + curve*scale},
+ f32.Point{X: center.X - r, Y: center.Y},
+ )
+ p.CubeTo(
+ f32.Point{X: center.X - r, Y: center.Y - curve*scale},
+ f32.Point{X: center.X - curve, Y: center.Y - r*scale},
+ top,
+ )
+ ellipse := p.End()
+ ellipse.shape = ops.Ellipse
+ return ellipse
+}
+
+func fPt(p image.Point) f32.Point {
+ return f32.Point{
+ X: float32(p.X), Y: float32(p.Y),
+ }
+}
diff --git a/vendor/gioui.org/op/op.go b/vendor/gioui.org/op/op.go
index 174d318..f0b2620 100644
--- a/vendor/gioui.org/op/op.go
+++ b/vendor/gioui.org/op/op.go
@@ -30,25 +30,25 @@ Drawing a colored square:
State
-An Ops list can be viewed as a very simple virtual machine: it has an implicit
-mutable state stack and execution flow can be controlled with macros.
+An Ops list can be viewed as a very simple virtual machine: it has state such
+as transformation and color and execution flow can be controlled with macros.
-The StackOp saves the current state to the state stack and restores it later:
+Some state, such as the current color, is modified directly by operations with
+Add methods. Other state, such as transformation and clip shape, are
+represented by stacks.
+
+This example sets the simple color state and pushes an offset to the
+transformation stack.
ops := new(op.Ops)
- // Save the current state, in particular the transform.
- stack := op.Push(ops)
- // Apply a transform to subsequent operations.
- op.Offset(...).Add(ops)
+ // Set the color.
+ paint.ColorOp{...}.Add(ops)
+ // Apply an offset to subsequent operations.
+ stack := op.Offset(...).Push(ops)
...
- // Restore the previous transform.
+ // Undo the offset transformation.
stack.Pop()
-You can also use this one-line to save the current state and restore it at the
-end of a function :
-
- defer op.Push(ops).Pop()
-
The MacroOp records a list of operations to be executed later:
ops := new(op.Ops)
@@ -71,44 +71,29 @@ import (
"time"
"gioui.org/f32"
- "gioui.org/internal/opconst"
+ "gioui.org/internal/ops"
)
// Ops holds a list of operations. Operations are stored in
// serialized form to avoid garbage during construction of
// the ops list.
type Ops struct {
- // version is incremented at each Reset.
- version int
- // data contains the serialized operations.
- data []byte
- // External references for operations.
- refs []interface{}
-
- stackStack stack
- macroStack stack
-}
-
-// StackOp saves and restores the operation state
-// in a stack-like manner.
-type StackOp struct {
- id stackID
- macroID int
- ops *Ops
+ // Internal is for internal use, despite being exported.
+ Internal ops.Ops
}
// MacroOp records a list of operations for later use.
type MacroOp struct {
- ops *Ops
- id stackID
- pc pc
+ ops *ops.Ops
+ id ops.StackID
+ pc ops.PC
}
// CallOp invokes the operations recorded by Record.
type CallOp struct {
// Ops is the list of operations to invoke.
- ops *Ops
- pc pc
+ ops *ops.Ops
+ pc ops.PC
}
// InvalidateOp requests a redraw at the given time. Use
@@ -117,100 +102,58 @@ type InvalidateOp struct {
At time.Time
}
-// TransformOp applies a transform to the current transform. The zero value
-// for TransformOp represents the identity transform.
+// TransformOp represents a transformation that can be pushed on the
+// transformation stack.
type TransformOp struct {
t f32.Affine2D
}
-// stack tracks the integer identities of StackOp and MacroOp
-// operations to ensure correct pairing of Push/Pop and Record/End.
-type stack struct {
- currentID int
- nextID int
-}
-
-type stackID struct {
- id int
- prev int
-}
-
-type pc struct {
- data int
- refs int
-}
-
-// Push (save) the current operations state.
-func Push(o *Ops) StackOp {
- s := StackOp{
- ops: o,
- id: o.stackStack.push(),
- macroID: o.macroStack.currentID,
- }
- data := o.Write(opconst.TypePushLen)
- data[0] = byte(opconst.TypePush)
- return s
+// TransformStack represents a TransformOp pushed on the transformation stack.
+type TransformStack struct {
+ id ops.StackID
+ macroID int
+ ops *ops.Ops
}
-// Pop (restore) a previously Pushed operations state.
-func (s StackOp) Pop() {
- if s.ops.macroStack.currentID != s.macroID {
- panic("pop in a different macro than push")
+// Defer executes c after all other operations have completed, including
+// previously deferred operations.
+// Defer saves the transformation stack and pushes it prior to executing
+// c. All other operation state is reset.
+//
+// Note that deferred operations are executed in first-in-first-out order,
+// unlike the Go facility of the same name.
+func Defer(o *Ops, c CallOp) {
+ if c.ops == nil {
+ return
}
- s.ops.stackStack.pop(s.id)
- data := s.ops.Write(opconst.TypePopLen)
- data[0] = byte(opconst.TypePop)
+ state := ops.Save(&o.Internal)
+ // Wrap c in a macro that loads the saved state before execution.
+ m := Record(o)
+ state.Load()
+ c.Add(o)
+ c = m.Stop()
+ // A Defer is recorded as a TypeDefer followed by the
+ // wrapped macro.
+ data := ops.Write(&o.Internal, ops.TypeDeferLen)
+ data[0] = byte(ops.TypeDefer)
+ c.Add(o)
}
// Reset the Ops, preparing it for re-use. Reset invalidates
// any recorded macros.
func (o *Ops) Reset() {
- o.stackStack = stack{}
- o.macroStack = stack{}
- // Leave references to the GC.
- for i := range o.refs {
- o.refs[i] = nil
- }
- o.data = o.data[:0]
- o.refs = o.refs[:0]
- o.version++
-}
-
-// Data is for internal use only.
-func (o *Ops) Data() []byte {
- return o.data
-}
-
-// Refs is for internal use only.
-func (o *Ops) Refs() []interface{} {
- return o.refs
-}
-
-// Version is for internal use only.
-func (o *Ops) Version() int {
- return o.version
-}
-
-// Write is for internal use only.
-func (o *Ops) Write(n int, refs ...interface{}) []byte {
- o.data = append(o.data, make([]byte, n)...)
- o.refs = append(o.refs, refs...)
- return o.data[len(o.data)-n:]
-}
-
-func (o *Ops) pc() pc {
- return pc{data: len(o.data), refs: len(o.refs)}
+ ops.Reset(&o.Internal)
}
// Record a macro of operations.
func Record(o *Ops) MacroOp {
m := MacroOp{
- ops: o,
- id: o.macroStack.push(),
- pc: o.pc(),
+ ops: &o.Internal,
+ id: ops.PushMacro(&o.Internal),
+ pc: ops.PCFor(&o.Internal),
}
// Reserve room for a macro definition. Updated in Stop.
- m.ops.Write(opconst.TypeMacroLen)
+ ops.Write(m.ops, ops.TypeMacroLen)
m.fill()
return m
}
@@ -218,7 +161,7 @@ func Record(o *Ops) MacroOp {
// Stop ends a previously started recording and returns an
// operation for replaying it.
func (m MacroOp) Stop() CallOp {
- m.ops.macroStack.pop(m.id)
+ ops.PopMacro(m.ops, m.id)
m.fill()
return CallOp{
ops: m.ops,
@@ -227,14 +170,7 @@ func (m MacroOp) Stop() CallOp {
}
func (m MacroOp) fill() {
- pc := m.ops.pc()
- // Fill out the macro definition reserved in Record.
- data := m.ops.data[m.pc.data:]
- data = data[:opconst.TypeMacroLen]
- data[0] = byte(opconst.TypeMacro)
- bo := binary.LittleEndian
- bo.PutUint32(data[1:], uint32(pc.data))
- bo.PutUint32(data[5:], uint32(pc.refs))
+ ops.FillMacro(m.ops, m.pc)
}
// Add the recorded list of operations. Add
@@ -244,16 +180,12 @@ func (c CallOp) Add(o *Ops) {
if c.ops == nil {
return
}
- data := o.Write(opconst.TypeCallLen, c.ops)
- data[0] = byte(opconst.TypeCall)
- bo := binary.LittleEndian
- bo.PutUint32(data[1:], uint32(c.pc.data))
- bo.PutUint32(data[5:], uint32(c.pc.refs))
+ ops.AddCall(&o.Internal, c.ops, c.pc)
}
func (r InvalidateOp) Add(o *Ops) {
- data := o.Write(opconst.TypeRedrawLen)
- data[0] = byte(opconst.TypeInvalidate)
+ data := ops.Write(&o.Internal, ops.TypeRedrawLen)
+ data[0] = byte(ops.TypeInvalidate)
bo := binary.LittleEndian
// UnixNano cannot represent the zero time.
if t := r.At; !t.IsZero() {
@@ -274,36 +206,38 @@ func Affine(a f32.Affine2D) TransformOp {
return TransformOp{t: a}
}
-func (t TransformOp) Add(o *Ops) {
- data := o.Write(opconst.TypeTransformLen)
- data[0] = byte(opconst.TypeTransform)
- bo := binary.LittleEndian
- a, b, c, d, e, f := t.t.Elems()
- bo.PutUint32(data[1:], math.Float32bits(a))
- bo.PutUint32(data[1+4*1:], math.Float32bits(b))
- bo.PutUint32(data[1+4*2:], math.Float32bits(c))
- bo.PutUint32(data[1+4*3:], math.Float32bits(d))
- bo.PutUint32(data[1+4*4:], math.Float32bits(e))
- bo.PutUint32(data[1+4*5:], math.Float32bits(f))
+// Push the current transformation to the stack and then multiply the
+// current transformation with t.
+func (t TransformOp) Push(o *Ops) TransformStack {
+ id, macroID := ops.PushOp(&o.Internal, ops.TransStack)
+ t.add(o, true)
+ return TransformStack{ops: &o.Internal, id: id, macroID: macroID}
}
-func (s *stack) push() stackID {
- s.nextID++
- sid := stackID{
- id: s.nextID,
- prev: s.currentID,
- }
- s.currentID = s.nextID
- return sid
+// Add is like Push except it doesn't push the current transformation to the
+// stack.
+func (t TransformOp) Add(o *Ops) {
+ t.add(o, false)
}
-func (s *stack) check(sid stackID) {
- if s.currentID != sid.id {
- panic("unbalanced operation")
+func (t TransformOp) add(o *Ops, push bool) {
+ data := ops.Write(&o.Internal, ops.TypeTransformLen)
+ data[0] = byte(ops.TypeTransform)
+ if push {
+ data[1] = 1
}
-}
-
-func (s *stack) pop(sid stackID) {
- s.check(sid)
- s.currentID = sid.prev
+ bo := binary.LittleEndian
+ a, b, c, d, e, f := t.t.Elems()
+ bo.PutUint32(data[2:], math.Float32bits(a))
+ bo.PutUint32(data[2+4*1:], math.Float32bits(b))
+ bo.PutUint32(data[2+4*2:], math.Float32bits(c))
+ bo.PutUint32(data[2+4*3:], math.Float32bits(d))
+ bo.PutUint32(data[2+4*4:], math.Float32bits(e))
+ bo.PutUint32(data[2+4*5:], math.Float32bits(f))
+}
+
+func (t TransformStack) Pop() {
+ ops.PopOp(t.ops, ops.TransStack, t.id, t.macroID)
+ data := ops.Write(t.ops, ops.TypePopTransformLen)
+ data[0] = byte(ops.TypePopTransform)
}
diff --git a/vendor/gioui.org/op/paint/doc.go b/vendor/gioui.org/op/paint/doc.go
index b7b569a..bbec006 100644
--- a/vendor/gioui.org/op/paint/doc.go
+++ b/vendor/gioui.org/op/paint/doc.go
@@ -3,10 +3,13 @@
/*
Package paint provides drawing operations for 2D graphics.
-The PaintOp operation draws the current brush into a rectangular
-area, taking the current clip path and transformation into account.
+The PaintOp operation fills the current clip with the current brush, taking the
+current transformation into account. Drawing outside the current clip area is
+ignored.
The current brush is set by either a ColorOp for a constant color, or
-ImageOp for an image.
+ImageOp for an image, or LinearGradientOp for gradients.
+
+All color.NRGBA values are in the sRGB color space.
*/
package paint
diff --git a/vendor/gioui.org/op/paint/paint.go b/vendor/gioui.org/op/paint/paint.go
index b4a9a56..1c99297 100644
--- a/vendor/gioui.org/op/paint/paint.go
+++ b/vendor/gioui.org/op/paint/paint.go
@@ -10,20 +10,15 @@ import (
"math"
"gioui.org/f32"
- "gioui.org/internal/opconst"
+ "gioui.org/internal/ops"
"gioui.org/op"
+ "gioui.org/op/clip"
)
// ImageOp sets the brush to an image.
-//
-// Note: the ImageOp may keep a reference to the backing image.
-// See NewImageOp for details.
type ImageOp struct {
- // Rect is the section if the backing image to use.
- Rect image.Rectangle
-
uniform bool
- color color.RGBA
+ color color.NRGBA
src *image.RGBA
// handle is a key to uniquely identify this ImageOp
@@ -33,20 +28,23 @@ type ImageOp struct {
// ColorOp sets the brush to a constant color.
type ColorOp struct {
- Color color.RGBA
+ Color color.NRGBA
}
-// PaintOp fills an area with the current brush, respecting the
-// current clip path and transformation.
+// LinearGradientOp sets the brush to a gradient starting at stop1 with color1 and
+// ending at stop2 with color2.
+type LinearGradientOp struct {
+ Stop1 f32.Point
+ Color1 color.NRGBA
+ Stop2 f32.Point
+ Color2 color.NRGBA
+}
+
+// PaintOp fills the current clip area with the current brush.
type PaintOp struct {
- // Rect is the destination area to paint. If necessary, the brush is
- // scaled to cover the rectangle area.
- Rect f32.Rectangle
}
-// NewImageOp creates an ImageOp backed by src. See
-// gioui.org/io/system.FrameEvent for a description of when data
-// referenced by operations is safe to re-use.
+// NewImageOp creates an ImageOp backed by src.
//
// NewImageOp assumes the backing image is immutable, and may cache a
// copy of its contents in a GPU-friendly way. Create new ImageOps to
@@ -55,19 +53,15 @@ type PaintOp struct {
func NewImageOp(src image.Image) ImageOp {
switch src := src.(type) {
case *image.Uniform:
- col := color.RGBAModel.Convert(src.C).(color.RGBA)
+ col := color.NRGBAModel.Convert(src.C).(color.NRGBA)
return ImageOp{
uniform: true,
color: col,
}
case *image.RGBA:
- bounds := src.Bounds()
- if bounds.Min == (image.Point{}) && src.Stride == bounds.Dx()*4 {
- return ImageOp{
- Rect: src.Bounds(),
- src: src,
- handle: new(int),
- }
+ return ImageOp{
+ src: src,
+ handle: new(int),
}
}
@@ -78,7 +72,6 @@ func NewImageOp(src image.Image) ImageOp {
})
draw.Draw(dst, dst.Bounds(), src, src.Bounds().Min, draw.Src)
return ImageOp{
- Rect: dst.Bounds(),
src: dst,
handle: new(int),
}
@@ -97,31 +90,58 @@ func (i ImageOp) Add(o *op.Ops) {
Color: i.color,
}.Add(o)
return
+ } else if i.src == nil || i.src.Bounds().Empty() {
+ return
}
- data := o.Write(opconst.TypeImageLen, i.src, i.handle)
- data[0] = byte(opconst.TypeImage)
- bo := binary.LittleEndian
- bo.PutUint32(data[1:], uint32(i.Rect.Min.X))
- bo.PutUint32(data[5:], uint32(i.Rect.Min.Y))
- bo.PutUint32(data[9:], uint32(i.Rect.Max.X))
- bo.PutUint32(data[13:], uint32(i.Rect.Max.Y))
+ data := ops.Write2(&o.Internal, ops.TypeImageLen, i.src, i.handle)
+ data[0] = byte(ops.TypeImage)
}
func (c ColorOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypeColorLen)
- data[0] = byte(opconst.TypeColor)
+ data := ops.Write(&o.Internal, ops.TypeColorLen)
+ data[0] = byte(ops.TypeColor)
data[1] = c.Color.R
data[2] = c.Color.G
data[3] = c.Color.B
data[4] = c.Color.A
}
-func (d PaintOp) Add(o *op.Ops) {
- data := o.Write(opconst.TypePaintLen)
- data[0] = byte(opconst.TypePaint)
+func (c LinearGradientOp) Add(o *op.Ops) {
+ data := ops.Write(&o.Internal, ops.TypeLinearGradientLen)
+ data[0] = byte(ops.TypeLinearGradient)
+
bo := binary.LittleEndian
- bo.PutUint32(data[1:], math.Float32bits(d.Rect.Min.X))
- bo.PutUint32(data[5:], math.Float32bits(d.Rect.Min.Y))
- bo.PutUint32(data[9:], math.Float32bits(d.Rect.Max.X))
- bo.PutUint32(data[13:], math.Float32bits(d.Rect.Max.Y))
+ bo.PutUint32(data[1:], math.Float32bits(c.Stop1.X))
+ bo.PutUint32(data[5:], math.Float32bits(c.Stop1.Y))
+ bo.PutUint32(data[9:], math.Float32bits(c.Stop2.X))
+ bo.PutUint32(data[13:], math.Float32bits(c.Stop2.Y))
+
+ data[17+0] = c.Color1.R
+ data[17+1] = c.Color1.G
+ data[17+2] = c.Color1.B
+ data[17+3] = c.Color1.A
+ data[21+0] = c.Color2.R
+ data[21+1] = c.Color2.G
+ data[21+2] = c.Color2.B
+ data[21+3] = c.Color2.A
+}
+
+func (d PaintOp) Add(o *op.Ops) {
+ data := ops.Write(&o.Internal, ops.TypePaintLen)
+ data[0] = byte(ops.TypePaint)
+}
+
+// FillShape fills the clip shape with a color.
+func FillShape(ops *op.Ops, c color.NRGBA, shape clip.Op) {
+ defer shape.Push(ops).Pop()
+ Fill(ops, c)
+}
+
+// Fill paints an infinitely large plane with the provided color. It
+// is intended to be used with a clip.Op already in place to limit
+// the painted area. Use FillShape unless you need to paint several
+// times within the same clip.Op.
+func Fill(ops *op.Ops, c color.NRGBA) {
+ ColorOp{Color: c}.Add(ops)
+ PaintOp{}.Add(ops)
}
diff --git a/vendor/gioui.org/shader/LICENSE b/vendor/gioui.org/shader/LICENSE
new file mode 100644
index 0000000..81f4733
--- /dev/null
+++ b/vendor/gioui.org/shader/LICENSE
@@ -0,0 +1,63 @@
+This project is provided under the terms of the UNLICENSE or
+the MIT license denoted by the following SPDX identifier:
+
+SPDX-License-Identifier: Unlicense OR MIT
+
+You may use the project under the terms of either license.
+
+Both licenses are reproduced below.
+
+----
+The MIT License (MIT)
+
+Copyright (c) 2019 The Gio authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+---
+
+
+
+---
+The UNLICENSE
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <https://unlicense.org/>
+---
diff --git a/vendor/gioui.org/shader/README.md b/vendor/gioui.org/shader/README.md
new file mode 100644
index 0000000..4ea4867
--- /dev/null
+++ b/vendor/gioui.org/shader/README.md
@@ -0,0 +1,18 @@
+# GPU programs for the Gio project
+
+This repository contains the source code for the [Gio](https://gioui.org)
+project. It also contains the generators and dereived versions for use with the
+GPU APIs supported by Gio.
+
+# Generating CPU fallbacks
+
+The `piet/gencpu.sh` script updates the piet-gpu binaries:
+
+```
+$ cd piet
+$ ./gencpu.sh
+```
+
+## Issues and contributions
+
+See the [Gio contribution guide](https://gioui.org/doc/contribute).
diff --git a/vendor/gioui.org/shader/gio/blit.frag b/vendor/gioui.org/shader/gio/blit.frag
new file mode 100644
index 0000000..a88f4dc
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/blit.frag
@@ -0,0 +1,15 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+layout(location=0) in highp vec2 vUV;
+
+{{.Header}}
+
+layout(location = 0) out vec4 fragColor;
+
+void main() {
+ fragColor = {{.FetchColorExpr}};
+}
diff --git a/vendor/gioui.org/shader/gio/blit.vert b/vendor/gioui.org/shader/gio/blit.vert
new file mode 100644
index 0000000..83d041f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/blit.vert
@@ -0,0 +1,27 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(push_constant) uniform Block {
+ vec4 transform;
+ vec4 uvTransformR1;
+ vec4 uvTransformR2;
+} _block;
+
+layout(location = 0) in vec2 pos;
+
+layout(location = 1) in vec2 uv;
+
+layout(location = 0) out vec2 vUV;
+
+void main() {
+ vec2 p = pos*_block.transform.xy + _block.transform.zw;
+ gl_Position = vec4(transform3x2(windowTransform, vec3(p, 0)), 1);
+ vUV = transform3x2(m3x2(_block.uvTransformR1.xyz, _block.uvTransformR2.xyz), vec3(uv,1)).xy;
+}
diff --git a/vendor/gioui.org/shader/gio/common.h b/vendor/gioui.org/shader/gio/common.h
new file mode 100644
index 0000000..9b6dc59
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/common.h
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+struct m3x2 {
+ vec3 r0;
+ vec3 r1;
+};
+
+// fboTransform is the transformation that cancels the implied transformation
+// between the clip space and the framebuffer. Only two rows are returned. The
+// last is implied to be [0, 0, 1].
+const m3x2 fboTransform = m3x2(
+#if defined(LANG_HLSL) || defined(LANG_MSL) || defined(LANG_MSLIOS)
+ vec3(1.0, 0.0, 0.0),
+ vec3(0.0, -1.0, 0.0)
+#else
+ vec3(1.0, 0.0, 0.0),
+ vec3(0.0, 1.0, 0.0)
+#endif
+);
+
+// windowTransform is the transformation that cancels the implied transformation
+// between framebuffer space and window system coordinates.
+const m3x2 windowTransform = m3x2(
+#if defined(LANG_VULKAN)
+ vec3(1.0, 0.0, 0.0),
+ vec3(0.0, 1.0, 0.0)
+#else
+ vec3(1.0, 0.0, 0.0),
+ vec3(0.0, -1.0, 0.0)
+#endif
+);
+
+vec3 transform3x2(m3x2 t, vec3 v) {
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
diff --git a/vendor/gioui.org/shader/gio/copy.frag b/vendor/gioui.org/shader/gio/copy.frag
new file mode 100644
index 0000000..048d9e7
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/copy.frag
@@ -0,0 +1,24 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+layout(binding = 0) uniform sampler2D tex;
+
+layout(location = 0) in highp vec2 vUV;
+
+layout(location = 0) out vec4 fragColor;
+
+vec3 sRGBtoRGB(vec3 rgb) {
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.04045));
+ vec3 below = rgb/vec3(12.92);
+ vec3 above = pow((rgb + vec3(0.055))/vec3(1.055), vec3(2.4));
+ return mix(below, above, cutoff);
+}
+
+void main() {
+ vec4 texel = texture(tex, vUV);
+ texel.rgb = sRGBtoRGB(texel.rgb);
+ fragColor = texel;
+}
diff --git a/vendor/gioui.org/shader/gio/copy.vert b/vendor/gioui.org/shader/gio/copy.vert
new file mode 100644
index 0000000..c079b96
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/copy.vert
@@ -0,0 +1,26 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(push_constant) uniform Block {
+ vec2 scale;
+ vec2 pos;
+ vec2 uvScale;
+} _block;
+
+layout(location = 0) in vec2 pos;
+layout(location = 1) in vec2 uv;
+
+layout(location = 0) out vec2 vUV;
+
+void main() {
+ vUV = vec2(uv*_block.uvScale);
+ vec2 p = vec2(pos*_block.scale + _block.pos);
+ gl_Position = vec4(transform3x2(windowTransform, vec3(p, 0)), 1);
+}
diff --git a/vendor/gioui.org/shader/gio/cover.frag b/vendor/gioui.org/shader/gio/cover.frag
new file mode 100644
index 0000000..34c5e4c
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/cover.frag
@@ -0,0 +1,20 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+{{.Header}}
+
+layout(location = 0) in highp vec2 vCoverUV;
+layout(location = 1) in highp vec2 vUV;
+
+layout(binding = 1) uniform sampler2D cover;
+
+layout(location = 0) out vec4 fragColor;
+
+void main() {
+ fragColor = {{.FetchColorExpr}};
+ float c = min(abs(texture(cover, vCoverUV).r), 1.0);
+ fragColor *= c;
+}
diff --git a/vendor/gioui.org/shader/gio/cover.vert b/vendor/gioui.org/shader/gio/cover.vert
new file mode 100644
index 0000000..02fae50
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/cover.vert
@@ -0,0 +1,31 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(push_constant) uniform Block {
+ vec4 transform;
+ vec4 uvCoverTransform;
+ vec4 uvTransformR1;
+ vec4 uvTransformR2;
+} _block;
+
+layout(location = 0) in vec2 pos;
+
+layout(location = 0) out vec2 vCoverUV;
+
+layout(location = 1) in vec2 uv;
+layout(location = 1) out vec2 vUV;
+
+void main() {
+ vec2 p = vec2(pos*_block.transform.xy + _block.transform.zw);
+ gl_Position = vec4(transform3x2(windowTransform, vec3(p, 0)), 1);
+ vUV = transform3x2(m3x2(_block.uvTransformR1.xyz, _block.uvTransformR2.xyz), vec3(uv,1)).xy;
+ vec3 uv3 = vec3(uv, 1.0);
+ vCoverUV = (uv3*vec3(_block.uvCoverTransform.xy, 1.0)+vec3(_block.uvCoverTransform.zw, 0.0)).xy;
+}
diff --git a/vendor/gioui.org/shader/gio/gen.go b/vendor/gioui.org/shader/gio/gen.go
new file mode 100644
index 0000000..f26056a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/gen.go
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package gio
+
+//go:generate go run ../cmd/convertshaders -package gio -dir .
diff --git a/vendor/gioui.org/shader/gio/input.vert b/vendor/gioui.org/shader/gio/input.vert
new file mode 100644
index 0000000..3d0cd50
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/input.vert
@@ -0,0 +1,15 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(location=0) in vec4 position;
+
+void main() {
+ gl_Position = vec4(transform3x2(windowTransform, position.xyz), position.w);
+}
diff --git a/vendor/gioui.org/shader/gio/intersect.frag b/vendor/gioui.org/shader/gio/intersect.frag
new file mode 100644
index 0000000..21a126f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/intersect.frag
@@ -0,0 +1,15 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+layout(location = 0) in highp vec2 vUV;
+
+layout(binding = 0) uniform sampler2D cover;
+
+layout(location = 0) out vec4 fragColor;
+
+void main() {
+ fragColor.r = abs(texture(cover, vUV).r);
+}
diff --git a/vendor/gioui.org/shader/gio/intersect.vert b/vendor/gioui.org/shader/gio/intersect.vert
new file mode 100644
index 0000000..e7ee2fe
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/intersect.vert
@@ -0,0 +1,26 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(location = 0) in vec2 pos;
+layout(location = 1) in vec2 uv;
+
+layout(push_constant) uniform Block {
+ vec4 uvTransform;
+ vec4 subUVTransform;
+} _block;
+
+layout(location = 0) out vec2 vUV;
+
+void main() {
+ vec3 p = transform3x2(fboTransform, vec3(pos, 1.0));
+ gl_Position = vec4(p, 1);
+ vUV = uv.xy*_block.subUVTransform.xy + _block.subUVTransform.zw;
+ vUV = vUV*_block.uvTransform.xy + _block.uvTransform.zw;
+}
diff --git a/vendor/gioui.org/shader/gio/material.frag b/vendor/gioui.org/shader/gio/material.frag
new file mode 100644
index 0000000..489461e
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/material.frag
@@ -0,0 +1,32 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+layout(binding = 0) uniform sampler2D tex;
+
+layout(location = 0) in highp vec2 vUV;
+
+layout(location = 0) out vec4 fragColor;
+
+layout(push_constant) uniform Color {
+ // If emulateSRGB is set (!= 0), the input texels are sRGB encoded. We save the
+ // conversion step below, at the cost of texture filtering in sRGB space.
+ layout(offset=16) float emulateSRGB;
+} _color;
+
+vec3 RGBtosRGB(vec3 rgb) {
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.0031308));
+ vec3 below = vec3(12.92)*rgb;
+ vec3 above = vec3(1.055)*pow(rgb, vec3(0.41666)) - vec3(0.055);
+ return mix(below, above, cutoff);
+}
+
+void main() {
+ vec4 texel = texture(tex, vUV);
+ if (_color.emulateSRGB == 0.0) {
+ texel.rgb = RGBtosRGB(texel.rgb);
+ }
+ fragColor = texel;
+}
diff --git a/vendor/gioui.org/shader/gio/material.vert b/vendor/gioui.org/shader/gio/material.vert
new file mode 100644
index 0000000..22c41a0
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/material.vert
@@ -0,0 +1,25 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(push_constant) uniform Block {
+ vec2 scale;
+ vec2 pos;
+} _block;
+
+layout(location = 0) in vec2 pos;
+layout(location = 1) in vec2 uv;
+
+layout(location = 0) out vec2 vUV;
+
+void main() {
+ vUV = uv;
+ vec2 p = vec2(pos*_block.scale + _block.pos);
+ gl_Position = vec4(transform3x2(fboTransform, vec3(p, 0)), 1);
+}
diff --git a/vendor/gioui.org/shader/gio/shaders.go b/vendor/gioui.org/shader/gio/shaders.go
new file mode 100644
index 0000000..1166c1c
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/shaders.go
@@ -0,0 +1,796 @@
+// Code generated by build.go. DO NOT EDIT.
+
+package gio
+
+import (
+ _ "embed"
+ "runtime"
+
+ "gioui.org/shader"
+)
+
+var (
+ Shader_blit_frag = [...]shader.Sources{
+ {
+ Name: "blit.frag",
+ Inputs: []shader.InputLocation{{Name: "vUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_color.color", Type: 0x0, Size: 4, Offset: 112}},
+ Size: 16,
+ },
+ },
+ {
+ Name: "blit.frag",
+ Inputs: []shader.InputLocation{{Name: "vUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_gradient.color1", Type: 0x0, Size: 4, Offset: 96}, {Name: "_gradient.color2", Type: 0x0, Size: 4, Offset: 112}},
+ Size: 32,
+ },
+ },
+ {
+ Name: "blit.frag",
+ Inputs: []shader.InputLocation{{Name: "vUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}},
+ Textures: []shader.TextureBinding{{Name: "tex", Binding: 0}},
+ },
+ }
+ //go:embed zblit.frag.0.spirv
+ zblit_frag_0_spirv string
+ //go:embed zblit.frag.0.glsl100es
+ zblit_frag_0_glsl100es string
+ //go:embed zblit.frag.0.glsl150
+ zblit_frag_0_glsl150 string
+ //go:embed zblit.frag.0.dxbc
+ zblit_frag_0_dxbc string
+ //go:embed zblit.frag.0.metallibmacos
+ zblit_frag_0_metallibmacos string
+ //go:embed zblit.frag.0.metallibios
+ zblit_frag_0_metallibios string
+ //go:embed zblit.frag.0.metallibiossimulator
+ zblit_frag_0_metallibiossimulator string
+ //go:embed zblit.frag.1.spirv
+ zblit_frag_1_spirv string
+ //go:embed zblit.frag.1.glsl100es
+ zblit_frag_1_glsl100es string
+ //go:embed zblit.frag.1.glsl150
+ zblit_frag_1_glsl150 string
+ //go:embed zblit.frag.1.dxbc
+ zblit_frag_1_dxbc string
+ //go:embed zblit.frag.1.metallibmacos
+ zblit_frag_1_metallibmacos string
+ //go:embed zblit.frag.1.metallibios
+ zblit_frag_1_metallibios string
+ //go:embed zblit.frag.1.metallibiossimulator
+ zblit_frag_1_metallibiossimulator string
+ //go:embed zblit.frag.2.spirv
+ zblit_frag_2_spirv string
+ //go:embed zblit.frag.2.glsl100es
+ zblit_frag_2_glsl100es string
+ //go:embed zblit.frag.2.glsl150
+ zblit_frag_2_glsl150 string
+ //go:embed zblit.frag.2.dxbc
+ zblit_frag_2_dxbc string
+ //go:embed zblit.frag.2.metallibmacos
+ zblit_frag_2_metallibmacos string
+ //go:embed zblit.frag.2.metallibios
+ zblit_frag_2_metallibios string
+ //go:embed zblit.frag.2.metallibiossimulator
+ zblit_frag_2_metallibiossimulator string
+ Shader_blit_vert = shader.Sources{
+ Name: "blit.vert",
+ Inputs: []shader.InputLocation{{Name: "pos", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_block.transform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_block.uvTransformR1", Type: 0x0, Size: 4, Offset: 16}, {Name: "_block.uvTransformR2", Type: 0x0, Size: 4, Offset: 32}},
+ Size: 48,
+ },
+ }
+ //go:embed zblit.vert.0.spirv
+ zblit_vert_0_spirv string
+ //go:embed zblit.vert.0.glsl100es
+ zblit_vert_0_glsl100es string
+ //go:embed zblit.vert.0.glsl150
+ zblit_vert_0_glsl150 string
+ //go:embed zblit.vert.0.dxbc
+ zblit_vert_0_dxbc string
+ //go:embed zblit.vert.0.metallibmacos
+ zblit_vert_0_metallibmacos string
+ //go:embed zblit.vert.0.metallibios
+ zblit_vert_0_metallibios string
+ //go:embed zblit.vert.0.metallibiossimulator
+ zblit_vert_0_metallibiossimulator string
+ Shader_copy_frag = shader.Sources{
+ Name: "copy.frag",
+ Inputs: []shader.InputLocation{{Name: "vUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}},
+ Textures: []shader.TextureBinding{{Name: "tex", Binding: 0}},
+ }
+ //go:embed zcopy.frag.0.spirv
+ zcopy_frag_0_spirv string
+ //go:embed zcopy.frag.0.glsl100es
+ zcopy_frag_0_glsl100es string
+ //go:embed zcopy.frag.0.glsl150
+ zcopy_frag_0_glsl150 string
+ //go:embed zcopy.frag.0.dxbc
+ zcopy_frag_0_dxbc string
+ //go:embed zcopy.frag.0.metallibmacos
+ zcopy_frag_0_metallibmacos string
+ //go:embed zcopy.frag.0.metallibios
+ zcopy_frag_0_metallibios string
+ //go:embed zcopy.frag.0.metallibiossimulator
+ zcopy_frag_0_metallibiossimulator string
+ Shader_copy_vert = shader.Sources{
+ Name: "copy.vert",
+ Inputs: []shader.InputLocation{{Name: "pos", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_block.scale", Type: 0x0, Size: 2, Offset: 0}, {Name: "_block.pos", Type: 0x0, Size: 2, Offset: 8}, {Name: "_block.uvScale", Type: 0x0, Size: 2, Offset: 16}},
+ Size: 24,
+ },
+ }
+ //go:embed zcopy.vert.0.spirv
+ zcopy_vert_0_spirv string
+ //go:embed zcopy.vert.0.glsl100es
+ zcopy_vert_0_glsl100es string
+ //go:embed zcopy.vert.0.glsl150
+ zcopy_vert_0_glsl150 string
+ //go:embed zcopy.vert.0.dxbc
+ zcopy_vert_0_dxbc string
+ //go:embed zcopy.vert.0.metallibmacos
+ zcopy_vert_0_metallibmacos string
+ //go:embed zcopy.vert.0.metallibios
+ zcopy_vert_0_metallibios string
+ //go:embed zcopy.vert.0.metallibiossimulator
+ zcopy_vert_0_metallibiossimulator string
+ Shader_cover_frag = [...]shader.Sources{
+ {
+ Name: "cover.frag",
+ Inputs: []shader.InputLocation{{Name: "vCoverUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "vUV", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_color.color", Type: 0x0, Size: 4, Offset: 112}},
+ Size: 16,
+ },
+ Textures: []shader.TextureBinding{{Name: "cover", Binding: 1}},
+ },
+ {
+ Name: "cover.frag",
+ Inputs: []shader.InputLocation{{Name: "vCoverUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "vUV", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_gradient.color1", Type: 0x0, Size: 4, Offset: 96}, {Name: "_gradient.color2", Type: 0x0, Size: 4, Offset: 112}},
+ Size: 32,
+ },
+ Textures: []shader.TextureBinding{{Name: "cover", Binding: 1}},
+ },
+ {
+ Name: "cover.frag",
+ Inputs: []shader.InputLocation{{Name: "vCoverUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "vUV", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Textures: []shader.TextureBinding{{Name: "tex", Binding: 0}, {Name: "cover", Binding: 1}},
+ },
+ }
+ //go:embed zcover.frag.0.spirv
+ zcover_frag_0_spirv string
+ //go:embed zcover.frag.0.glsl100es
+ zcover_frag_0_glsl100es string
+ //go:embed zcover.frag.0.glsl150
+ zcover_frag_0_glsl150 string
+ //go:embed zcover.frag.0.dxbc
+ zcover_frag_0_dxbc string
+ //go:embed zcover.frag.0.metallibmacos
+ zcover_frag_0_metallibmacos string
+ //go:embed zcover.frag.0.metallibios
+ zcover_frag_0_metallibios string
+ //go:embed zcover.frag.0.metallibiossimulator
+ zcover_frag_0_metallibiossimulator string
+ //go:embed zcover.frag.1.spirv
+ zcover_frag_1_spirv string
+ //go:embed zcover.frag.1.glsl100es
+ zcover_frag_1_glsl100es string
+ //go:embed zcover.frag.1.glsl150
+ zcover_frag_1_glsl150 string
+ //go:embed zcover.frag.1.dxbc
+ zcover_frag_1_dxbc string
+ //go:embed zcover.frag.1.metallibmacos
+ zcover_frag_1_metallibmacos string
+ //go:embed zcover.frag.1.metallibios
+ zcover_frag_1_metallibios string
+ //go:embed zcover.frag.1.metallibiossimulator
+ zcover_frag_1_metallibiossimulator string
+ //go:embed zcover.frag.2.spirv
+ zcover_frag_2_spirv string
+ //go:embed zcover.frag.2.glsl100es
+ zcover_frag_2_glsl100es string
+ //go:embed zcover.frag.2.glsl150
+ zcover_frag_2_glsl150 string
+ //go:embed zcover.frag.2.dxbc
+ zcover_frag_2_dxbc string
+ //go:embed zcover.frag.2.metallibmacos
+ zcover_frag_2_metallibmacos string
+ //go:embed zcover.frag.2.metallibios
+ zcover_frag_2_metallibios string
+ //go:embed zcover.frag.2.metallibiossimulator
+ zcover_frag_2_metallibiossimulator string
+ Shader_cover_vert = shader.Sources{
+ Name: "cover.vert",
+ Inputs: []shader.InputLocation{{Name: "pos", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_block.transform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_block.uvCoverTransform", Type: 0x0, Size: 4, Offset: 16}, {Name: "_block.uvTransformR1", Type: 0x0, Size: 4, Offset: 32}, {Name: "_block.uvTransformR2", Type: 0x0, Size: 4, Offset: 48}},
+ Size: 64,
+ },
+ }
+ //go:embed zcover.vert.0.spirv
+ zcover_vert_0_spirv string
+ //go:embed zcover.vert.0.glsl100es
+ zcover_vert_0_glsl100es string
+ //go:embed zcover.vert.0.glsl150
+ zcover_vert_0_glsl150 string
+ //go:embed zcover.vert.0.dxbc
+ zcover_vert_0_dxbc string
+ //go:embed zcover.vert.0.metallibmacos
+ zcover_vert_0_metallibmacos string
+ //go:embed zcover.vert.0.metallibios
+ zcover_vert_0_metallibios string
+ //go:embed zcover.vert.0.metallibiossimulator
+ zcover_vert_0_metallibiossimulator string
+ Shader_input_vert = shader.Sources{
+ Name: "input.vert",
+ Inputs: []shader.InputLocation{{Name: "position", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 4}},
+ }
+ //go:embed zinput.vert.0.spirv
+ zinput_vert_0_spirv string
+ //go:embed zinput.vert.0.glsl100es
+ zinput_vert_0_glsl100es string
+ //go:embed zinput.vert.0.glsl150
+ zinput_vert_0_glsl150 string
+ //go:embed zinput.vert.0.dxbc
+ zinput_vert_0_dxbc string
+ //go:embed zinput.vert.0.metallibmacos
+ zinput_vert_0_metallibmacos string
+ //go:embed zinput.vert.0.metallibios
+ zinput_vert_0_metallibios string
+ //go:embed zinput.vert.0.metallibiossimulator
+ zinput_vert_0_metallibiossimulator string
+ Shader_intersect_frag = shader.Sources{
+ Name: "intersect.frag",
+ Inputs: []shader.InputLocation{{Name: "vUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}},
+ Textures: []shader.TextureBinding{{Name: "cover", Binding: 0}},
+ }
+ //go:embed zintersect.frag.0.spirv
+ zintersect_frag_0_spirv string
+ //go:embed zintersect.frag.0.glsl100es
+ zintersect_frag_0_glsl100es string
+ //go:embed zintersect.frag.0.glsl150
+ zintersect_frag_0_glsl150 string
+ //go:embed zintersect.frag.0.dxbc
+ zintersect_frag_0_dxbc string
+ //go:embed zintersect.frag.0.metallibmacos
+ zintersect_frag_0_metallibmacos string
+ //go:embed zintersect.frag.0.metallibios
+ zintersect_frag_0_metallibios string
+ //go:embed zintersect.frag.0.metallibiossimulator
+ zintersect_frag_0_metallibiossimulator string
+ Shader_intersect_vert = shader.Sources{
+ Name: "intersect.vert",
+ Inputs: []shader.InputLocation{{Name: "pos", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_block.uvTransform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_block.subUVTransform", Type: 0x0, Size: 4, Offset: 16}},
+ Size: 32,
+ },
+ }
+ //go:embed zintersect.vert.0.spirv
+ zintersect_vert_0_spirv string
+ //go:embed zintersect.vert.0.glsl100es
+ zintersect_vert_0_glsl100es string
+ //go:embed zintersect.vert.0.glsl150
+ zintersect_vert_0_glsl150 string
+ //go:embed zintersect.vert.0.dxbc
+ zintersect_vert_0_dxbc string
+ //go:embed zintersect.vert.0.metallibmacos
+ zintersect_vert_0_metallibmacos string
+ //go:embed zintersect.vert.0.metallibios
+ zintersect_vert_0_metallibios string
+ //go:embed zintersect.vert.0.metallibiossimulator
+ zintersect_vert_0_metallibiossimulator string
+ Shader_material_frag = shader.Sources{
+ Name: "material.frag",
+ Inputs: []shader.InputLocation{{Name: "vUV", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_color.emulateSRGB", Type: 0x0, Size: 1, Offset: 16}},
+ Size: 4,
+ },
+ Textures: []shader.TextureBinding{{Name: "tex", Binding: 0}},
+ }
+ //go:embed zmaterial.frag.0.spirv
+ zmaterial_frag_0_spirv string
+ //go:embed zmaterial.frag.0.glsl100es
+ zmaterial_frag_0_glsl100es string
+ //go:embed zmaterial.frag.0.glsl150
+ zmaterial_frag_0_glsl150 string
+ //go:embed zmaterial.frag.0.dxbc
+ zmaterial_frag_0_dxbc string
+ //go:embed zmaterial.frag.0.metallibmacos
+ zmaterial_frag_0_metallibmacos string
+ //go:embed zmaterial.frag.0.metallibios
+ zmaterial_frag_0_metallibios string
+ //go:embed zmaterial.frag.0.metallibiossimulator
+ zmaterial_frag_0_metallibiossimulator string
+ Shader_material_vert = shader.Sources{
+ Name: "material.vert",
+ Inputs: []shader.InputLocation{{Name: "pos", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "uv", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_block.scale", Type: 0x0, Size: 2, Offset: 0}, {Name: "_block.pos", Type: 0x0, Size: 2, Offset: 8}},
+ Size: 16,
+ },
+ }
+ //go:embed zmaterial.vert.0.spirv
+ zmaterial_vert_0_spirv string
+ //go:embed zmaterial.vert.0.glsl100es
+ zmaterial_vert_0_glsl100es string
+ //go:embed zmaterial.vert.0.glsl150
+ zmaterial_vert_0_glsl150 string
+ //go:embed zmaterial.vert.0.dxbc
+ zmaterial_vert_0_dxbc string
+ //go:embed zmaterial.vert.0.metallibmacos
+ zmaterial_vert_0_metallibmacos string
+ //go:embed zmaterial.vert.0.metallibios
+ zmaterial_vert_0_metallibios string
+ //go:embed zmaterial.vert.0.metallibiossimulator
+ zmaterial_vert_0_metallibiossimulator string
+ Shader_simple_frag = shader.Sources{
+ Name: "simple.frag",
+ }
+ //go:embed zsimple.frag.0.spirv
+ zsimple_frag_0_spirv string
+ //go:embed zsimple.frag.0.glsl100es
+ zsimple_frag_0_glsl100es string
+ //go:embed zsimple.frag.0.glsl150
+ zsimple_frag_0_glsl150 string
+ //go:embed zsimple.frag.0.dxbc
+ zsimple_frag_0_dxbc string
+ //go:embed zsimple.frag.0.metallibmacos
+ zsimple_frag_0_metallibmacos string
+ //go:embed zsimple.frag.0.metallibios
+ zsimple_frag_0_metallibios string
+ //go:embed zsimple.frag.0.metallibiossimulator
+ zsimple_frag_0_metallibiossimulator string
+ Shader_stencil_frag = shader.Sources{
+ Name: "stencil.frag",
+ Inputs: []shader.InputLocation{{Name: "vFrom", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 2}, {Name: "vCtrl", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 2}, {Name: "vTo", Location: 2, Semantic: "TEXCOORD", SemanticIndex: 2, Type: 0x0, Size: 2}},
+ }
+ //go:embed zstencil.frag.0.spirv
+ zstencil_frag_0_spirv string
+ //go:embed zstencil.frag.0.glsl100es
+ zstencil_frag_0_glsl100es string
+ //go:embed zstencil.frag.0.glsl150
+ zstencil_frag_0_glsl150 string
+ //go:embed zstencil.frag.0.dxbc
+ zstencil_frag_0_dxbc string
+ //go:embed zstencil.frag.0.metallibmacos
+ zstencil_frag_0_metallibmacos string
+ //go:embed zstencil.frag.0.metallibios
+ zstencil_frag_0_metallibios string
+ //go:embed zstencil.frag.0.metallibiossimulator
+ zstencil_frag_0_metallibiossimulator string
+ Shader_stencil_vert = shader.Sources{
+ Name: "stencil.vert",
+ Inputs: []shader.InputLocation{{Name: "corner", Location: 0, Semantic: "TEXCOORD", SemanticIndex: 0, Type: 0x0, Size: 1}, {Name: "maxy", Location: 1, Semantic: "TEXCOORD", SemanticIndex: 1, Type: 0x0, Size: 1}, {Name: "from", Location: 2, Semantic: "TEXCOORD", SemanticIndex: 2, Type: 0x0, Size: 2}, {Name: "ctrl", Location: 3, Semantic: "TEXCOORD", SemanticIndex: 3, Type: 0x0, Size: 2}, {Name: "to", Location: 4, Semantic: "TEXCOORD", SemanticIndex: 4, Type: 0x0, Size: 2}},
+ Uniforms: shader.UniformsReflection{
+ Locations: []shader.UniformLocation{{Name: "_block.transform", Type: 0x0, Size: 4, Offset: 0}, {Name: "_block.pathOffset", Type: 0x0, Size: 2, Offset: 16}},
+ Size: 24,
+ },
+ }
+ //go:embed zstencil.vert.0.spirv
+ zstencil_vert_0_spirv string
+ //go:embed zstencil.vert.0.glsl100es
+ zstencil_vert_0_glsl100es string
+ //go:embed zstencil.vert.0.glsl150
+ zstencil_vert_0_glsl150 string
+ //go:embed zstencil.vert.0.dxbc
+ zstencil_vert_0_dxbc string
+ //go:embed zstencil.vert.0.metallibmacos
+ zstencil_vert_0_metallibmacos string
+ //go:embed zstencil.vert.0.metallibios
+ zstencil_vert_0_metallibios string
+ //go:embed zstencil.vert.0.metallibiossimulator
+ zstencil_vert_0_metallibiossimulator string
+)
+
+func init() {
+ const (
+ opengles = runtime.GOOS == "linux" || runtime.GOOS == "freebsd" || runtime.GOOS == "openbsd" || runtime.GOOS == "windows" || runtime.GOOS == "js" || runtime.GOOS == "android" || runtime.GOOS == "darwin" || runtime.GOOS == "ios"
+ opengl = runtime.GOOS == "darwin"
+ d3d11 = runtime.GOOS == "windows"
+ vulkan = runtime.GOOS == "linux" || runtime.GOOS == "android"
+ )
+ if vulkan {
+ Shader_blit_frag[0].SPIRV = zblit_frag_0_spirv
+ }
+ if opengles {
+ Shader_blit_frag[0].GLSL100ES = zblit_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_blit_frag[0].GLSL150 = zblit_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_blit_frag[0].DXBC = zblit_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_blit_frag[0].MetalLib = zblit_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_blit_frag[0].MetalLib = zblit_frag_0_metallibiossimulator
+ } else {
+ Shader_blit_frag[0].MetalLib = zblit_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_blit_frag[1].SPIRV = zblit_frag_1_spirv
+ }
+ if opengles {
+ Shader_blit_frag[1].GLSL100ES = zblit_frag_1_glsl100es
+ }
+ if opengl {
+ Shader_blit_frag[1].GLSL150 = zblit_frag_1_glsl150
+ }
+ if d3d11 {
+ Shader_blit_frag[1].DXBC = zblit_frag_1_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_blit_frag[1].MetalLib = zblit_frag_1_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_blit_frag[1].MetalLib = zblit_frag_1_metallibiossimulator
+ } else {
+ Shader_blit_frag[1].MetalLib = zblit_frag_1_metallibios
+ }
+ }
+ if vulkan {
+ Shader_blit_frag[2].SPIRV = zblit_frag_2_spirv
+ }
+ if opengles {
+ Shader_blit_frag[2].GLSL100ES = zblit_frag_2_glsl100es
+ }
+ if opengl {
+ Shader_blit_frag[2].GLSL150 = zblit_frag_2_glsl150
+ }
+ if d3d11 {
+ Shader_blit_frag[2].DXBC = zblit_frag_2_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_blit_frag[2].MetalLib = zblit_frag_2_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_blit_frag[2].MetalLib = zblit_frag_2_metallibiossimulator
+ } else {
+ Shader_blit_frag[2].MetalLib = zblit_frag_2_metallibios
+ }
+ }
+ if vulkan {
+ Shader_blit_vert.SPIRV = zblit_vert_0_spirv
+ }
+ if opengles {
+ Shader_blit_vert.GLSL100ES = zblit_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_blit_vert.GLSL150 = zblit_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_blit_vert.DXBC = zblit_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_blit_vert.MetalLib = zblit_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_blit_vert.MetalLib = zblit_vert_0_metallibiossimulator
+ } else {
+ Shader_blit_vert.MetalLib = zblit_vert_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_copy_frag.SPIRV = zcopy_frag_0_spirv
+ }
+ if opengles {
+ Shader_copy_frag.GLSL100ES = zcopy_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_copy_frag.GLSL150 = zcopy_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_copy_frag.DXBC = zcopy_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_copy_frag.MetalLib = zcopy_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_copy_frag.MetalLib = zcopy_frag_0_metallibiossimulator
+ } else {
+ Shader_copy_frag.MetalLib = zcopy_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_copy_vert.SPIRV = zcopy_vert_0_spirv
+ }
+ if opengles {
+ Shader_copy_vert.GLSL100ES = zcopy_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_copy_vert.GLSL150 = zcopy_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_copy_vert.DXBC = zcopy_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_copy_vert.MetalLib = zcopy_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_copy_vert.MetalLib = zcopy_vert_0_metallibiossimulator
+ } else {
+ Shader_copy_vert.MetalLib = zcopy_vert_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_cover_frag[0].SPIRV = zcover_frag_0_spirv
+ }
+ if opengles {
+ Shader_cover_frag[0].GLSL100ES = zcover_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_cover_frag[0].GLSL150 = zcover_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_cover_frag[0].DXBC = zcover_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_cover_frag[0].MetalLib = zcover_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_cover_frag[0].MetalLib = zcover_frag_0_metallibiossimulator
+ } else {
+ Shader_cover_frag[0].MetalLib = zcover_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_cover_frag[1].SPIRV = zcover_frag_1_spirv
+ }
+ if opengles {
+ Shader_cover_frag[1].GLSL100ES = zcover_frag_1_glsl100es
+ }
+ if opengl {
+ Shader_cover_frag[1].GLSL150 = zcover_frag_1_glsl150
+ }
+ if d3d11 {
+ Shader_cover_frag[1].DXBC = zcover_frag_1_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_cover_frag[1].MetalLib = zcover_frag_1_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_cover_frag[1].MetalLib = zcover_frag_1_metallibiossimulator
+ } else {
+ Shader_cover_frag[1].MetalLib = zcover_frag_1_metallibios
+ }
+ }
+ if vulkan {
+ Shader_cover_frag[2].SPIRV = zcover_frag_2_spirv
+ }
+ if opengles {
+ Shader_cover_frag[2].GLSL100ES = zcover_frag_2_glsl100es
+ }
+ if opengl {
+ Shader_cover_frag[2].GLSL150 = zcover_frag_2_glsl150
+ }
+ if d3d11 {
+ Shader_cover_frag[2].DXBC = zcover_frag_2_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_cover_frag[2].MetalLib = zcover_frag_2_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_cover_frag[2].MetalLib = zcover_frag_2_metallibiossimulator
+ } else {
+ Shader_cover_frag[2].MetalLib = zcover_frag_2_metallibios
+ }
+ }
+ if vulkan {
+ Shader_cover_vert.SPIRV = zcover_vert_0_spirv
+ }
+ if opengles {
+ Shader_cover_vert.GLSL100ES = zcover_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_cover_vert.GLSL150 = zcover_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_cover_vert.DXBC = zcover_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_cover_vert.MetalLib = zcover_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_cover_vert.MetalLib = zcover_vert_0_metallibiossimulator
+ } else {
+ Shader_cover_vert.MetalLib = zcover_vert_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_input_vert.SPIRV = zinput_vert_0_spirv
+ }
+ if opengles {
+ Shader_input_vert.GLSL100ES = zinput_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_input_vert.GLSL150 = zinput_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_input_vert.DXBC = zinput_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_input_vert.MetalLib = zinput_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_input_vert.MetalLib = zinput_vert_0_metallibiossimulator
+ } else {
+ Shader_input_vert.MetalLib = zinput_vert_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_intersect_frag.SPIRV = zintersect_frag_0_spirv
+ }
+ if opengles {
+ Shader_intersect_frag.GLSL100ES = zintersect_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_intersect_frag.GLSL150 = zintersect_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_intersect_frag.DXBC = zintersect_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_intersect_frag.MetalLib = zintersect_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_intersect_frag.MetalLib = zintersect_frag_0_metallibiossimulator
+ } else {
+ Shader_intersect_frag.MetalLib = zintersect_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_intersect_vert.SPIRV = zintersect_vert_0_spirv
+ }
+ if opengles {
+ Shader_intersect_vert.GLSL100ES = zintersect_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_intersect_vert.GLSL150 = zintersect_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_intersect_vert.DXBC = zintersect_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_intersect_vert.MetalLib = zintersect_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_intersect_vert.MetalLib = zintersect_vert_0_metallibiossimulator
+ } else {
+ Shader_intersect_vert.MetalLib = zintersect_vert_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_material_frag.SPIRV = zmaterial_frag_0_spirv
+ }
+ if opengles {
+ Shader_material_frag.GLSL100ES = zmaterial_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_material_frag.GLSL150 = zmaterial_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_material_frag.DXBC = zmaterial_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_material_frag.MetalLib = zmaterial_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_material_frag.MetalLib = zmaterial_frag_0_metallibiossimulator
+ } else {
+ Shader_material_frag.MetalLib = zmaterial_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_material_vert.SPIRV = zmaterial_vert_0_spirv
+ }
+ if opengles {
+ Shader_material_vert.GLSL100ES = zmaterial_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_material_vert.GLSL150 = zmaterial_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_material_vert.DXBC = zmaterial_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_material_vert.MetalLib = zmaterial_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_material_vert.MetalLib = zmaterial_vert_0_metallibiossimulator
+ } else {
+ Shader_material_vert.MetalLib = zmaterial_vert_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_simple_frag.SPIRV = zsimple_frag_0_spirv
+ }
+ if opengles {
+ Shader_simple_frag.GLSL100ES = zsimple_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_simple_frag.GLSL150 = zsimple_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_simple_frag.DXBC = zsimple_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_simple_frag.MetalLib = zsimple_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_simple_frag.MetalLib = zsimple_frag_0_metallibiossimulator
+ } else {
+ Shader_simple_frag.MetalLib = zsimple_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_stencil_frag.SPIRV = zstencil_frag_0_spirv
+ }
+ if opengles {
+ Shader_stencil_frag.GLSL100ES = zstencil_frag_0_glsl100es
+ }
+ if opengl {
+ Shader_stencil_frag.GLSL150 = zstencil_frag_0_glsl150
+ }
+ if d3d11 {
+ Shader_stencil_frag.DXBC = zstencil_frag_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_stencil_frag.MetalLib = zstencil_frag_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_stencil_frag.MetalLib = zstencil_frag_0_metallibiossimulator
+ } else {
+ Shader_stencil_frag.MetalLib = zstencil_frag_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_stencil_vert.SPIRV = zstencil_vert_0_spirv
+ }
+ if opengles {
+ Shader_stencil_vert.GLSL100ES = zstencil_vert_0_glsl100es
+ }
+ if opengl {
+ Shader_stencil_vert.GLSL150 = zstencil_vert_0_glsl150
+ }
+ if d3d11 {
+ Shader_stencil_vert.DXBC = zstencil_vert_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_stencil_vert.MetalLib = zstencil_vert_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_stencil_vert.MetalLib = zstencil_vert_0_metallibiossimulator
+ } else {
+ Shader_stencil_vert.MetalLib = zstencil_vert_0_metallibios
+ }
+ }
+}
diff --git a/vendor/gioui.org/shader/gio/simple.frag b/vendor/gioui.org/shader/gio/simple.frag
new file mode 100644
index 0000000..4614f33
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/simple.frag
@@ -0,0 +1,11 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+layout(location = 0) out vec4 fragColor;
+
+void main() {
+ fragColor = vec4(.25, .55, .75, 1.0);
+}
diff --git a/vendor/gioui.org/shader/gio/stencil.frag b/vendor/gioui.org/shader/gio/stencil.frag
new file mode 100644
index 0000000..956dae8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/stencil.frag
@@ -0,0 +1,81 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+precision mediump float;
+
+layout(location=0) in highp vec2 vFrom;
+layout(location=1) in highp vec2 vCtrl;
+layout(location=2) in highp vec2 vTo;
+
+layout(location = 0) out vec4 fragCover;
+
+void main() {
+ float dx = vTo.x - vFrom.x;
+ // Sort from and to in increasing order so the root below
+ // is always the positive square root, if any.
+ // We need the direction of the curve below, so this can't be
+ // done from the vertex shader.
+ bool increasing = vTo.x >= vFrom.x;
+ vec2 left = increasing ? vFrom : vTo;
+ vec2 right = increasing ? vTo : vFrom;
+
+ // The signed horizontal extent of the fragment.
+ vec2 extent = clamp(vec2(vFrom.x, vTo.x), -0.5, 0.5);
+ // Find the t where the curve crosses the middle of the
+ // extent, x₀.
+ // Given the Bézier curve with x coordinates P₀, P₁, P₂
+ // where P₀ is at the origin, its x coordinate in t
+ // is given by:
+ //
+ // x(t) = 2(1-t)tP₁ + t²P₂
+ //
+ // Rearranging:
+ //
+ // x(t) = (P₂ - 2P₁)t² + 2P₁t
+ //
+ // Setting x(t) = x₀ and using Muller's quadratic formula ("Citardauq")
+ // for robustnesss,
+ //
+ // t = 2x₀/(2P₁±√(4P₁²+4(P₂-2P₁)x₀))
+ //
+ // which simplifies to
+ //
+ // t = x₀/(P₁±√(P₁²+(P₂-2P₁)x₀))
+ //
+ // Setting v = P₂-P₁,
+ //
+ // t = x₀/(P₁±√(P₁²+(v-P₁)x₀))
+ //
+ // t lie in [0; 1]; P₂ ≥ P₁ and P₁ ≥ 0 since we split curves where
+ // the control point lies before the start point or after the end point.
+ // It can then be shown that only the positive square root is valid.
+ float midx = mix(extent.x, extent.y, 0.5);
+ float x0 = midx - left.x;
+ vec2 p1 = vCtrl - left;
+ vec2 v = right - vCtrl;
+ float t = x0/(p1.x+sqrt(p1.x*p1.x+(v.x-p1.x)*x0));
+ // Find y(t) on the curve.
+ float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);
+ // And the slope.
+ vec2 d_half = mix(p1, v, t);
+ float dy = d_half.y/d_half.x;
+ // Together, y and dy form a line approximation.
+
+ // Compute the fragment area above the line.
+ // The area is symmetric around dy = 0. Scale slope with extent width.
+ float width = extent.y - extent.x;
+ dy = abs(dy*width);
+
+ vec4 sides = vec4(dy*+0.5 + y, dy*-0.5 + y, (+0.5-y)/dy, (-0.5-y)/dy);
+ sides = clamp(sides+0.5, 0.0, 1.0);
+
+ float area = 0.5*(sides.z - sides.z*sides.y + 1.0 - sides.x+sides.x*sides.w);
+ area *= width;
+
+ // Work around issue #13.
+ if (width == 0.0)
+ area = 0.0;
+
+ fragCover.r = area;
+}
diff --git a/vendor/gioui.org/shader/gio/stencil.vert b/vendor/gioui.org/shader/gio/stencil.vert
new file mode 100644
index 0000000..fd6f28b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/stencil.vert
@@ -0,0 +1,57 @@
+#version 310 es
+
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#extension GL_GOOGLE_include_directive : enable
+
+precision highp float;
+
+#include "common.h"
+
+layout(push_constant) uniform Block {
+ vec4 transform;
+ vec2 pathOffset;
+} _block;
+
+layout(location=0) in float corner;
+layout(location=1) in float maxy;
+layout(location=2) in vec2 from;
+layout(location=3) in vec2 ctrl;
+layout(location=4) in vec2 to;
+
+layout(location=0) out vec2 vFrom;
+layout(location=1) out vec2 vCtrl;
+layout(location=2) out vec2 vTo;
+
+void main() {
+ // Add a one pixel overlap so curve quads cover their
+ // entire curves. Could use conservative rasterization
+ // if available.
+ vec2 from = from + _block.pathOffset;
+ vec2 ctrl = ctrl + _block.pathOffset;
+ vec2 to = to + _block.pathOffset;
+ float maxy = maxy + _block.pathOffset.y;
+ vec2 pos;
+ float c = corner;
+ if (c >= 0.375) {
+ // North.
+ c -= 0.5;
+ pos.y = maxy + 1.0;
+ } else {
+ // South.
+ pos.y = min(min(from.y, ctrl.y), to.y) - 1.0;
+ }
+ if (c >= 0.125) {
+ // East.
+ pos.x = max(max(from.x, ctrl.x), to.x)+1.0;
+ } else {
+ // West.
+ pos.x = min(min(from.x, ctrl.x), to.x)-1.0;
+ }
+ vFrom = from-pos;
+ vCtrl = ctrl-pos;
+ vTo = to-pos;
+ pos = pos*_block.transform.xy + _block.transform.zw;
+ gl_Position = vec4(transform3x2(fboTransform, vec3(pos, 0)), 1);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.dxbc b/vendor/gioui.org/shader/gio/zblit.frag.0.dxbc
new file mode 100644
index 0000000..45e8355
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zblit.frag.0.glsl100es
new file mode 100644
index 0000000..d7ca41a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.glsl100es
@@ -0,0 +1,18 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+struct Color
+{
+ vec4 color;
+};
+
+uniform Color _color;
+
+varying highp vec2 vUV;
+
+void main()
+{
+ gl_FragData[0] = _color.color;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zblit.frag.0.glsl150
new file mode 100644
index 0000000..9559c85
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.glsl150
@@ -0,0 +1,17 @@
+#version 150
+
+struct Color
+{
+ vec4 color;
+};
+
+uniform Color _color;
+
+out vec4 fragColor;
+in vec2 vUV;
+
+void main()
+{
+ fragColor = _color.color;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.metallibios b/vendor/gioui.org/shader/gio/zblit.frag.0.metallibios
new file mode 100644
index 0000000..63e606f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zblit.frag.0.metallibiossimulator
new file mode 100644
index 0000000..d8d2589
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zblit.frag.0.metallibmacos
new file mode 100644
index 0000000..85946aa
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.0.spirv b/vendor/gioui.org/shader/gio/zblit.frag.0.spirv
new file mode 100644
index 0000000..c2a88d2
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.dxbc b/vendor/gioui.org/shader/gio/zblit.frag.1.dxbc
new file mode 100644
index 0000000..ddb8dad
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.glsl100es b/vendor/gioui.org/shader/gio/zblit.frag.1.glsl100es
new file mode 100644
index 0000000..ccc6d2a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.glsl100es
@@ -0,0 +1,19 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+struct Gradient
+{
+ vec4 color1;
+ vec4 color2;
+};
+
+uniform Gradient _gradient;
+
+varying highp vec2 vUV;
+
+void main()
+{
+ gl_FragData[0] = mix(_gradient.color1, _gradient.color2, vec4(clamp(vUV.x, 0.0, 1.0)));
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.glsl150 b/vendor/gioui.org/shader/gio/zblit.frag.1.glsl150
new file mode 100644
index 0000000..a55f29f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.glsl150
@@ -0,0 +1,18 @@
+#version 150
+
+struct Gradient
+{
+ vec4 color1;
+ vec4 color2;
+};
+
+uniform Gradient _gradient;
+
+out vec4 fragColor;
+in vec2 vUV;
+
+void main()
+{
+ fragColor = mix(_gradient.color1, _gradient.color2, vec4(clamp(vUV.x, 0.0, 1.0)));
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.metallibios b/vendor/gioui.org/shader/gio/zblit.frag.1.metallibios
new file mode 100644
index 0000000..680c495
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.metallibiossimulator b/vendor/gioui.org/shader/gio/zblit.frag.1.metallibiossimulator
new file mode 100644
index 0000000..ef5ac86
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.metallibmacos b/vendor/gioui.org/shader/gio/zblit.frag.1.metallibmacos
new file mode 100644
index 0000000..5fbd2c2
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.1.spirv b/vendor/gioui.org/shader/gio/zblit.frag.1.spirv
new file mode 100644
index 0000000..88128fc
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.1.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.dxbc b/vendor/gioui.org/shader/gio/zblit.frag.2.dxbc
new file mode 100644
index 0000000..fd95db8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.glsl100es b/vendor/gioui.org/shader/gio/zblit.frag.2.glsl100es
new file mode 100644
index 0000000..5c2d832
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.glsl100es
@@ -0,0 +1,13 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+uniform mediump sampler2D tex;
+
+varying highp vec2 vUV;
+
+void main()
+{
+ gl_FragData[0] = texture2D(tex, vUV);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.glsl150 b/vendor/gioui.org/shader/gio/zblit.frag.2.glsl150
new file mode 100644
index 0000000..f5df869
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.glsl150
@@ -0,0 +1,12 @@
+#version 150
+
+uniform sampler2D tex;
+
+out vec4 fragColor;
+in vec2 vUV;
+
+void main()
+{
+ fragColor = texture(tex, vUV);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.metallibios b/vendor/gioui.org/shader/gio/zblit.frag.2.metallibios
new file mode 100644
index 0000000..c4eb922
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.metallibiossimulator b/vendor/gioui.org/shader/gio/zblit.frag.2.metallibiossimulator
new file mode 100644
index 0000000..81f7aa3
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.metallibmacos b/vendor/gioui.org/shader/gio/zblit.frag.2.metallibmacos
new file mode 100644
index 0000000..70b3da8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.frag.2.spirv b/vendor/gioui.org/shader/gio/zblit.frag.2.spirv
new file mode 100644
index 0000000..efa380b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.frag.2.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.dxbc b/vendor/gioui.org/shader/gio/zblit.vert.0.dxbc
new file mode 100644
index 0000000..5ad9601
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zblit.vert.0.glsl100es
new file mode 100644
index 0000000..61dee04
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.glsl100es
@@ -0,0 +1,37 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 transform;
+ vec4 uvTransformR1;
+ vec4 uvTransformR2;
+};
+
+uniform Block _block;
+
+attribute vec2 pos;
+varying vec2 vUV;
+attribute vec2 uv;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vec2 p = (pos * _block.transform.xy) + _block.transform.zw;
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+ m3x2 param_2 = m3x2(_block.uvTransformR1.xyz, _block.uvTransformR2.xyz);
+ vec3 param_3 = vec3(uv, 1.0);
+ vUV = transform3x2(param_2, param_3).xy;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zblit.vert.0.glsl150
new file mode 100644
index 0000000..eba9f1a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.glsl150
@@ -0,0 +1,37 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 transform;
+ vec4 uvTransformR1;
+ vec4 uvTransformR2;
+};
+
+uniform Block _block;
+
+in vec2 pos;
+out vec2 vUV;
+in vec2 uv;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vec2 p = (pos * _block.transform.xy) + _block.transform.zw;
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+ m3x2 param_2 = m3x2(_block.uvTransformR1.xyz, _block.uvTransformR2.xyz);
+ vec3 param_3 = vec3(uv, 1.0);
+ vUV = transform3x2(param_2, param_3).xy;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.metallibios b/vendor/gioui.org/shader/gio/zblit.vert.0.metallibios
new file mode 100644
index 0000000..2450ec9
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zblit.vert.0.metallibiossimulator
new file mode 100644
index 0000000..6b4960b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zblit.vert.0.metallibmacos
new file mode 100644
index 0000000..d902b36
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zblit.vert.0.spirv b/vendor/gioui.org/shader/gio/zblit.vert.0.spirv
new file mode 100644
index 0000000..4f762bb
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zblit.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.dxbc b/vendor/gioui.org/shader/gio/zcopy.frag.0.dxbc
new file mode 100644
index 0000000..a521803
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zcopy.frag.0.glsl100es
new file mode 100644
index 0000000..b2dd95a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.glsl100es
@@ -0,0 +1,27 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+uniform mediump sampler2D tex;
+
+varying highp vec2 vUV;
+
+vec3 sRGBtoRGB(vec3 rgb)
+{
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.040449999272823333740234375));
+ vec3 below = rgb / vec3(12.9200000762939453125);
+ vec3 above = pow((rgb + vec3(0.054999999701976776123046875)) / vec3(1.05499994754791259765625), vec3(2.400000095367431640625));
+ return vec3(cutoff.x ? above.x : below.x, cutoff.y ? above.y : below.y, cutoff.z ? above.z : below.z);
+}
+
+void main()
+{
+ vec4 texel = texture2D(tex, vUV);
+ vec3 param = texel.xyz;
+ vec3 _59 = sRGBtoRGB(param);
+ texel.x = _59.x;
+ texel.y = _59.y;
+ texel.z = _59.z;
+ gl_FragData[0] = texel;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zcopy.frag.0.glsl150
new file mode 100644
index 0000000..799add1
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.glsl150
@@ -0,0 +1,26 @@
+#version 150
+
+uniform sampler2D tex;
+
+in vec2 vUV;
+out vec4 fragColor;
+
+vec3 sRGBtoRGB(vec3 rgb)
+{
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.040449999272823333740234375));
+ vec3 below = rgb / vec3(12.9200000762939453125);
+ vec3 above = pow((rgb + vec3(0.054999999701976776123046875)) / vec3(1.05499994754791259765625), vec3(2.400000095367431640625));
+ return vec3(cutoff.x ? above.x : below.x, cutoff.y ? above.y : below.y, cutoff.z ? above.z : below.z);
+}
+
+void main()
+{
+ vec4 texel = texture(tex, vUV);
+ vec3 param = texel.xyz;
+ vec3 _59 = sRGBtoRGB(param);
+ texel.x = _59.x;
+ texel.y = _59.y;
+ texel.z = _59.z;
+ fragColor = texel;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibios b/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibios
new file mode 100644
index 0000000..f143069
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibiossimulator
new file mode 100644
index 0000000..8fe4c74
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibmacos
new file mode 100644
index 0000000..2e43803
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.frag.0.spirv b/vendor/gioui.org/shader/gio/zcopy.frag.0.spirv
new file mode 100644
index 0000000..3299552
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.dxbc b/vendor/gioui.org/shader/gio/zcopy.vert.0.dxbc
new file mode 100644
index 0000000..acce7ab
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zcopy.vert.0.glsl100es
new file mode 100644
index 0000000..ff0be47
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.glsl100es
@@ -0,0 +1,35 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec2 scale;
+ vec2 pos;
+ vec2 uvScale;
+};
+
+uniform Block _block;
+
+varying vec2 vUV;
+attribute vec2 uv;
+attribute vec2 pos;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vUV = vec2(uv * _block.uvScale);
+ vec2 p = vec2((pos * _block.scale) + _block.pos);
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zcopy.vert.0.glsl150
new file mode 100644
index 0000000..036cd39
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.glsl150
@@ -0,0 +1,35 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec2 scale;
+ vec2 pos;
+ vec2 uvScale;
+};
+
+uniform Block _block;
+
+out vec2 vUV;
+in vec2 uv;
+in vec2 pos;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vUV = vec2(uv * _block.uvScale);
+ vec2 p = vec2((pos * _block.scale) + _block.pos);
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibios b/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibios
new file mode 100644
index 0000000..25f5e56
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibiossimulator
new file mode 100644
index 0000000..f696caf
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibmacos
new file mode 100644
index 0000000..d4a5777
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcopy.vert.0.spirv b/vendor/gioui.org/shader/gio/zcopy.vert.0.spirv
new file mode 100644
index 0000000..7251754
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcopy.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.dxbc b/vendor/gioui.org/shader/gio/zcover.frag.0.dxbc
new file mode 100644
index 0000000..8b77ae4
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zcover.frag.0.glsl100es
new file mode 100644
index 0000000..2399901
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.glsl100es
@@ -0,0 +1,23 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+struct Color
+{
+ vec4 color;
+};
+
+uniform Color _color;
+
+uniform mediump sampler2D cover;
+
+varying highp vec2 vCoverUV;
+varying highp vec2 vUV;
+
+void main()
+{
+ gl_FragData[0] = _color.color;
+ float c = min(abs(texture2D(cover, vCoverUV).x), 1.0);
+ gl_FragData[0] *= c;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zcover.frag.0.glsl150
new file mode 100644
index 0000000..ce1beaa
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.glsl150
@@ -0,0 +1,22 @@
+#version 150
+
+struct Color
+{
+ vec4 color;
+};
+
+uniform Color _color;
+
+uniform sampler2D cover;
+
+out vec4 fragColor;
+in vec2 vCoverUV;
+in vec2 vUV;
+
+void main()
+{
+ fragColor = _color.color;
+ float c = min(abs(texture(cover, vCoverUV).x), 1.0);
+ fragColor *= c;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.metallibios b/vendor/gioui.org/shader/gio/zcover.frag.0.metallibios
new file mode 100644
index 0000000..22256c8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zcover.frag.0.metallibiossimulator
new file mode 100644
index 0000000..c8040ad
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zcover.frag.0.metallibmacos
new file mode 100644
index 0000000..fe25160
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.0.spirv b/vendor/gioui.org/shader/gio/zcover.frag.0.spirv
new file mode 100644
index 0000000..2061ff1
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.dxbc b/vendor/gioui.org/shader/gio/zcover.frag.1.dxbc
new file mode 100644
index 0000000..c9a44cf
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.glsl100es b/vendor/gioui.org/shader/gio/zcover.frag.1.glsl100es
new file mode 100644
index 0000000..01cc88e
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.glsl100es
@@ -0,0 +1,24 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+struct Gradient
+{
+ vec4 color1;
+ vec4 color2;
+};
+
+uniform Gradient _gradient;
+
+uniform mediump sampler2D cover;
+
+varying highp vec2 vUV;
+varying highp vec2 vCoverUV;
+
+void main()
+{
+ gl_FragData[0] = mix(_gradient.color1, _gradient.color2, vec4(clamp(vUV.x, 0.0, 1.0)));
+ float c = min(abs(texture2D(cover, vCoverUV).x), 1.0);
+ gl_FragData[0] *= c;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.glsl150 b/vendor/gioui.org/shader/gio/zcover.frag.1.glsl150
new file mode 100644
index 0000000..3f832c3
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.glsl150
@@ -0,0 +1,23 @@
+#version 150
+
+struct Gradient
+{
+ vec4 color1;
+ vec4 color2;
+};
+
+uniform Gradient _gradient;
+
+uniform sampler2D cover;
+
+out vec4 fragColor;
+in vec2 vUV;
+in vec2 vCoverUV;
+
+void main()
+{
+ fragColor = mix(_gradient.color1, _gradient.color2, vec4(clamp(vUV.x, 0.0, 1.0)));
+ float c = min(abs(texture(cover, vCoverUV).x), 1.0);
+ fragColor *= c;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.metallibios b/vendor/gioui.org/shader/gio/zcover.frag.1.metallibios
new file mode 100644
index 0000000..228996a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.metallibiossimulator b/vendor/gioui.org/shader/gio/zcover.frag.1.metallibiossimulator
new file mode 100644
index 0000000..1c99553
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.metallibmacos b/vendor/gioui.org/shader/gio/zcover.frag.1.metallibmacos
new file mode 100644
index 0000000..889e249
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.1.spirv b/vendor/gioui.org/shader/gio/zcover.frag.1.spirv
new file mode 100644
index 0000000..4c48d20
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.1.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.dxbc b/vendor/gioui.org/shader/gio/zcover.frag.2.dxbc
new file mode 100644
index 0000000..d8c6a80
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.glsl100es b/vendor/gioui.org/shader/gio/zcover.frag.2.glsl100es
new file mode 100644
index 0000000..7cfde4b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.glsl100es
@@ -0,0 +1,17 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+uniform mediump sampler2D tex;
+uniform mediump sampler2D cover;
+
+varying highp vec2 vUV;
+varying highp vec2 vCoverUV;
+
+void main()
+{
+ gl_FragData[0] = texture2D(tex, vUV);
+ float c = min(abs(texture2D(cover, vCoverUV).x), 1.0);
+ gl_FragData[0] *= c;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.glsl150 b/vendor/gioui.org/shader/gio/zcover.frag.2.glsl150
new file mode 100644
index 0000000..939baee
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.glsl150
@@ -0,0 +1,16 @@
+#version 150
+
+uniform sampler2D tex;
+uniform sampler2D cover;
+
+out vec4 fragColor;
+in vec2 vUV;
+in vec2 vCoverUV;
+
+void main()
+{
+ fragColor = texture(tex, vUV);
+ float c = min(abs(texture(cover, vCoverUV).x), 1.0);
+ fragColor *= c;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.metallibios b/vendor/gioui.org/shader/gio/zcover.frag.2.metallibios
new file mode 100644
index 0000000..6eba400
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.metallibiossimulator b/vendor/gioui.org/shader/gio/zcover.frag.2.metallibiossimulator
new file mode 100644
index 0000000..09ddb1f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.metallibmacos b/vendor/gioui.org/shader/gio/zcover.frag.2.metallibmacos
new file mode 100644
index 0000000..3ba9105
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.frag.2.spirv b/vendor/gioui.org/shader/gio/zcover.frag.2.spirv
new file mode 100644
index 0000000..cd618ce
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.frag.2.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.dxbc b/vendor/gioui.org/shader/gio/zcover.vert.0.dxbc
new file mode 100644
index 0000000..3b6cf6b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zcover.vert.0.glsl100es
new file mode 100644
index 0000000..423ca60
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.glsl100es
@@ -0,0 +1,41 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 transform;
+ vec4 uvCoverTransform;
+ vec4 uvTransformR1;
+ vec4 uvTransformR2;
+};
+
+uniform Block _block;
+
+attribute vec2 pos;
+varying vec2 vUV;
+attribute vec2 uv;
+varying vec2 vCoverUV;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vec2 p = vec2((pos * _block.transform.xy) + _block.transform.zw);
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+ m3x2 param_2 = m3x2(_block.uvTransformR1.xyz, _block.uvTransformR2.xyz);
+ vec3 param_3 = vec3(uv, 1.0);
+ vUV = transform3x2(param_2, param_3).xy;
+ vec3 uv3 = vec3(uv, 1.0);
+ vCoverUV = ((uv3 * vec3(_block.uvCoverTransform.xy, 1.0)) + vec3(_block.uvCoverTransform.zw, 0.0)).xy;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zcover.vert.0.glsl150
new file mode 100644
index 0000000..a5005d6
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.glsl150
@@ -0,0 +1,41 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 transform;
+ vec4 uvCoverTransform;
+ vec4 uvTransformR1;
+ vec4 uvTransformR2;
+};
+
+uniform Block _block;
+
+in vec2 pos;
+out vec2 vUV;
+in vec2 uv;
+out vec2 vCoverUV;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vec2 p = vec2((pos * _block.transform.xy) + _block.transform.zw);
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+ m3x2 param_2 = m3x2(_block.uvTransformR1.xyz, _block.uvTransformR2.xyz);
+ vec3 param_3 = vec3(uv, 1.0);
+ vUV = transform3x2(param_2, param_3).xy;
+ vec3 uv3 = vec3(uv, 1.0);
+ vCoverUV = ((uv3 * vec3(_block.uvCoverTransform.xy, 1.0)) + vec3(_block.uvCoverTransform.zw, 0.0)).xy;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.metallibios b/vendor/gioui.org/shader/gio/zcover.vert.0.metallibios
new file mode 100644
index 0000000..335704b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zcover.vert.0.metallibiossimulator
new file mode 100644
index 0000000..96470cd
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zcover.vert.0.metallibmacos
new file mode 100644
index 0000000..629e82b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zcover.vert.0.spirv b/vendor/gioui.org/shader/gio/zcover.vert.0.spirv
new file mode 100644
index 0000000..f9af8ab
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zcover.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.dxbc b/vendor/gioui.org/shader/gio/zinput.vert.0.dxbc
new file mode 100644
index 0000000..096bd01
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zinput.vert.0.glsl100es
new file mode 100644
index 0000000..d1d4c8d
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.glsl100es
@@ -0,0 +1,22 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+attribute vec4 position;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = position.xyz;
+ gl_Position = vec4(transform3x2(param, param_1), position.w);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zinput.vert.0.glsl150
new file mode 100644
index 0000000..ab28308
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.glsl150
@@ -0,0 +1,22 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+in vec4 position;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0));
+ vec3 param_1 = position.xyz;
+ gl_Position = vec4(transform3x2(param, param_1), position.w);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.metallibios b/vendor/gioui.org/shader/gio/zinput.vert.0.metallibios
new file mode 100644
index 0000000..6fdc427
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zinput.vert.0.metallibiossimulator
new file mode 100644
index 0000000..da28890
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zinput.vert.0.metallibmacos
new file mode 100644
index 0000000..064c501
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zinput.vert.0.spirv b/vendor/gioui.org/shader/gio/zinput.vert.0.spirv
new file mode 100644
index 0000000..eb999e5
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zinput.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.dxbc b/vendor/gioui.org/shader/gio/zintersect.frag.0.dxbc
new file mode 100644
index 0000000..f2081ee
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zintersect.frag.0.glsl100es
new file mode 100644
index 0000000..90fe2f9
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.glsl100es
@@ -0,0 +1,13 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+uniform mediump sampler2D cover;
+
+varying highp vec2 vUV;
+
+void main()
+{
+ gl_FragData[0].x = abs(texture2D(cover, vUV).x);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zintersect.frag.0.glsl150
new file mode 100644
index 0000000..f574aae
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.glsl150
@@ -0,0 +1,12 @@
+#version 150
+
+uniform sampler2D cover;
+
+out vec4 fragColor;
+in vec2 vUV;
+
+void main()
+{
+ fragColor.x = abs(texture(cover, vUV).x);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibios b/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibios
new file mode 100644
index 0000000..f48da4e
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibiossimulator
new file mode 100644
index 0000000..b1a40c4
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibmacos
new file mode 100644
index 0000000..f16d190
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.frag.0.spirv b/vendor/gioui.org/shader/gio/zintersect.frag.0.spirv
new file mode 100644
index 0000000..6c28644
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.dxbc b/vendor/gioui.org/shader/gio/zintersect.vert.0.dxbc
new file mode 100644
index 0000000..03005ea
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zintersect.vert.0.glsl100es
new file mode 100644
index 0000000..4441763
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.glsl100es
@@ -0,0 +1,35 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 uvTransform;
+ vec4 subUVTransform;
+};
+
+uniform Block _block;
+
+attribute vec2 pos;
+varying vec2 vUV;
+attribute vec2 uv;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
+ vec3 param_1 = vec3(pos, 1.0);
+ vec3 p = transform3x2(param, param_1);
+ gl_Position = vec4(p, 1.0);
+ vUV = (uv * _block.subUVTransform.xy) + _block.subUVTransform.zw;
+ vUV = (vUV * _block.uvTransform.xy) + _block.uvTransform.zw;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zintersect.vert.0.glsl150
new file mode 100644
index 0000000..656b4c9
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.glsl150
@@ -0,0 +1,35 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 uvTransform;
+ vec4 subUVTransform;
+};
+
+uniform Block _block;
+
+in vec2 pos;
+out vec2 vUV;
+in vec2 uv;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
+ vec3 param_1 = vec3(pos, 1.0);
+ vec3 p = transform3x2(param, param_1);
+ gl_Position = vec4(p, 1.0);
+ vUV = (uv * _block.subUVTransform.xy) + _block.subUVTransform.zw;
+ vUV = (vUV * _block.uvTransform.xy) + _block.uvTransform.zw;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibios b/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibios
new file mode 100644
index 0000000..975fbb8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibiossimulator
new file mode 100644
index 0000000..682bad1
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibmacos
new file mode 100644
index 0000000..a43236d
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zintersect.vert.0.spirv b/vendor/gioui.org/shader/gio/zintersect.vert.0.spirv
new file mode 100644
index 0000000..13e7335
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zintersect.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.dxbc b/vendor/gioui.org/shader/gio/zmaterial.frag.0.dxbc
new file mode 100644
index 0000000..e250378
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl100es
new file mode 100644
index 0000000..f2f2a30
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl100es
@@ -0,0 +1,37 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+struct Color
+{
+ float emulateSRGB;
+};
+
+uniform Color _color;
+
+uniform mediump sampler2D tex;
+
+varying highp vec2 vUV;
+
+vec3 RGBtosRGB(vec3 rgb)
+{
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.003130800090730190277099609375));
+ vec3 below = vec3(12.9200000762939453125) * rgb;
+ vec3 above = (vec3(1.05499994754791259765625) * pow(rgb, vec3(0.416660010814666748046875))) - vec3(0.054999999701976776123046875);
+ return vec3(cutoff.x ? above.x : below.x, cutoff.y ? above.y : below.y, cutoff.z ? above.z : below.z);
+}
+
+void main()
+{
+ vec4 texel = texture2D(tex, vUV);
+ if (_color.emulateSRGB == 0.0)
+ {
+ vec3 param = texel.xyz;
+ vec3 _71 = RGBtosRGB(param);
+ texel.x = _71.x;
+ texel.y = _71.y;
+ texel.z = _71.z;
+ }
+ gl_FragData[0] = texel;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl150
new file mode 100644
index 0000000..6b8bed3
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.glsl150
@@ -0,0 +1,36 @@
+#version 150
+
+struct Color
+{
+ float emulateSRGB;
+};
+
+uniform Color _color;
+
+uniform sampler2D tex;
+
+in vec2 vUV;
+out vec4 fragColor;
+
+vec3 RGBtosRGB(vec3 rgb)
+{
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.003130800090730190277099609375));
+ vec3 below = vec3(12.9200000762939453125) * rgb;
+ vec3 above = (vec3(1.05499994754791259765625) * pow(rgb, vec3(0.416660010814666748046875))) - vec3(0.054999999701976776123046875);
+ return vec3(cutoff.x ? above.x : below.x, cutoff.y ? above.y : below.y, cutoff.z ? above.z : below.z);
+}
+
+void main()
+{
+ vec4 texel = texture(tex, vUV);
+ if (_color.emulateSRGB == 0.0)
+ {
+ vec3 param = texel.xyz;
+ vec3 _71 = RGBtosRGB(param);
+ texel.x = _71.x;
+ texel.y = _71.y;
+ texel.z = _71.z;
+ }
+ fragColor = texel;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibios b/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibios
new file mode 100644
index 0000000..8679f2a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibiossimulator
new file mode 100644
index 0000000..6306d9a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibmacos
new file mode 100644
index 0000000..911948e
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.frag.0.spirv b/vendor/gioui.org/shader/gio/zmaterial.frag.0.spirv
new file mode 100644
index 0000000..475cfb8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.dxbc b/vendor/gioui.org/shader/gio/zmaterial.vert.0.dxbc
new file mode 100644
index 0000000..a5056cc
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl100es
new file mode 100644
index 0000000..39a7b50
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl100es
@@ -0,0 +1,34 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec2 scale;
+ vec2 pos;
+};
+
+uniform Block _block;
+
+varying vec2 vUV;
+attribute vec2 uv;
+attribute vec2 pos;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vUV = uv;
+ vec2 p = vec2((pos * _block.scale) + _block.pos);
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl150
new file mode 100644
index 0000000..be02b44
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.glsl150
@@ -0,0 +1,34 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec2 scale;
+ vec2 pos;
+};
+
+uniform Block _block;
+
+out vec2 vUV;
+in vec2 uv;
+in vec2 pos;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vUV = uv;
+ vec2 p = vec2((pos * _block.scale) + _block.pos);
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
+ vec3 param_1 = vec3(p, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibios b/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibios
new file mode 100644
index 0000000..19cf6d8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibiossimulator
new file mode 100644
index 0000000..c710ca9
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibmacos
new file mode 100644
index 0000000..cfbdfbc
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zmaterial.vert.0.spirv b/vendor/gioui.org/shader/gio/zmaterial.vert.0.spirv
new file mode 100644
index 0000000..18e731f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zmaterial.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.dxbc b/vendor/gioui.org/shader/gio/zsimple.frag.0.dxbc
new file mode 100644
index 0000000..f4f8894
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zsimple.frag.0.glsl100es
new file mode 100644
index 0000000..0f86af5
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.glsl100es
@@ -0,0 +1,9 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+void main()
+{
+ gl_FragData[0] = vec4(0.25, 0.550000011920928955078125, 0.75, 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zsimple.frag.0.glsl150
new file mode 100644
index 0000000..db4c060
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.glsl150
@@ -0,0 +1,9 @@
+#version 150
+
+out vec4 fragColor;
+
+void main()
+{
+ fragColor = vec4(0.25, 0.550000011920928955078125, 0.75, 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibios b/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibios
new file mode 100644
index 0000000..05e6329
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibiossimulator
new file mode 100644
index 0000000..2c87af9
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibmacos
new file mode 100644
index 0000000..407d7ea
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zsimple.frag.0.spirv b/vendor/gioui.org/shader/gio/zsimple.frag.0.spirv
new file mode 100644
index 0000000..2b2aba3
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zsimple.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.dxbc b/vendor/gioui.org/shader/gio/zstencil.frag.0.dxbc
new file mode 100644
index 0000000..ded34dc
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.glsl100es b/vendor/gioui.org/shader/gio/zstencil.frag.0.glsl100es
new file mode 100644
index 0000000..15530e3
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.glsl100es
@@ -0,0 +1,38 @@
+#version 100
+precision mediump float;
+precision highp int;
+
+varying highp vec2 vTo;
+varying highp vec2 vFrom;
+varying highp vec2 vCtrl;
+
+void main()
+{
+ float dx = vTo.x - vFrom.x;
+ bool increasing = vTo.x >= vFrom.x;
+ bvec2 _35 = bvec2(increasing);
+ vec2 left = vec2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);
+ bvec2 _41 = bvec2(increasing);
+ vec2 right = vec2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);
+ vec2 extent = clamp(vec2(vFrom.x, vTo.x), vec2(-0.5), vec2(0.5));
+ float midx = mix(extent.x, extent.y, 0.5);
+ float x0 = midx - left.x;
+ vec2 p1 = vCtrl - left;
+ vec2 v = right - vCtrl;
+ float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));
+ float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);
+ vec2 d_half = mix(p1, v, vec2(t));
+ float dy = d_half.y / d_half.x;
+ float width = extent.y - extent.x;
+ dy = abs(dy * width);
+ vec4 sides = vec4((dy * 0.5) + y, (dy * (-0.5)) + y, (0.5 - y) / dy, ((-0.5) - y) / dy);
+ sides = clamp(sides + vec4(0.5), vec4(0.0), vec4(1.0));
+ float area = 0.5 * ((((sides.z - (sides.z * sides.y)) + 1.0) - sides.x) + (sides.x * sides.w));
+ area *= width;
+ if (width == 0.0)
+ {
+ area = 0.0;
+ }
+ gl_FragData[0].x = area;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.glsl150 b/vendor/gioui.org/shader/gio/zstencil.frag.0.glsl150
new file mode 100644
index 0000000..8e2abd8
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.glsl150
@@ -0,0 +1,37 @@
+#version 150
+
+in vec2 vTo;
+in vec2 vFrom;
+in vec2 vCtrl;
+out vec4 fragCover;
+
+void main()
+{
+ float dx = vTo.x - vFrom.x;
+ bool increasing = vTo.x >= vFrom.x;
+ bvec2 _35 = bvec2(increasing);
+ vec2 left = vec2(_35.x ? vFrom.x : vTo.x, _35.y ? vFrom.y : vTo.y);
+ bvec2 _41 = bvec2(increasing);
+ vec2 right = vec2(_41.x ? vTo.x : vFrom.x, _41.y ? vTo.y : vFrom.y);
+ vec2 extent = clamp(vec2(vFrom.x, vTo.x), vec2(-0.5), vec2(0.5));
+ float midx = mix(extent.x, extent.y, 0.5);
+ float x0 = midx - left.x;
+ vec2 p1 = vCtrl - left;
+ vec2 v = right - vCtrl;
+ float t = x0 / (p1.x + sqrt((p1.x * p1.x) + ((v.x - p1.x) * x0)));
+ float y = mix(mix(left.y, vCtrl.y, t), mix(vCtrl.y, right.y, t), t);
+ vec2 d_half = mix(p1, v, vec2(t));
+ float dy = d_half.y / d_half.x;
+ float width = extent.y - extent.x;
+ dy = abs(dy * width);
+ vec4 sides = vec4((dy * 0.5) + y, (dy * (-0.5)) + y, (0.5 - y) / dy, ((-0.5) - y) / dy);
+ sides = clamp(sides + vec4(0.5), vec4(0.0), vec4(1.0));
+ float area = 0.5 * ((((sides.z - (sides.z * sides.y)) + 1.0) - sides.x) + (sides.x * sides.w));
+ area *= width;
+ if (width == 0.0)
+ {
+ area = 0.0;
+ }
+ fragCover.x = area;
+}
+
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibios b/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibios
new file mode 100644
index 0000000..52f668f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibiossimulator
new file mode 100644
index 0000000..3fbfa8f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibmacos b/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibmacos
new file mode 100644
index 0000000..358a02a
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.frag.0.spirv b/vendor/gioui.org/shader/gio/zstencil.frag.0.spirv
new file mode 100644
index 0000000..9a22d9e
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.frag.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.dxbc b/vendor/gioui.org/shader/gio/zstencil.vert.0.dxbc
new file mode 100644
index 0000000..505672f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.glsl100es b/vendor/gioui.org/shader/gio/zstencil.vert.0.glsl100es
new file mode 100644
index 0000000..c8e1261
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.glsl100es
@@ -0,0 +1,64 @@
+#version 100
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 transform;
+ vec2 pathOffset;
+};
+
+uniform Block _block;
+
+attribute vec2 from;
+attribute vec2 ctrl;
+attribute vec2 to;
+attribute float maxy;
+attribute float corner;
+varying vec2 vFrom;
+varying vec2 vCtrl;
+varying vec2 vTo;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vec2 from_1 = from + _block.pathOffset;
+ vec2 ctrl_1 = ctrl + _block.pathOffset;
+ vec2 to_1 = to + _block.pathOffset;
+ float maxy_1 = maxy + _block.pathOffset.y;
+ float c = corner;
+ vec2 pos;
+ if (c >= 0.375)
+ {
+ c -= 0.5;
+ pos.y = maxy_1 + 1.0;
+ }
+ else
+ {
+ pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0;
+ }
+ if (c >= 0.125)
+ {
+ pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0;
+ }
+ else
+ {
+ pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0;
+ }
+ vFrom = from_1 - pos;
+ vCtrl = ctrl_1 - pos;
+ vTo = to_1 - pos;
+ pos = (pos * _block.transform.xy) + _block.transform.zw;
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
+ vec3 param_1 = vec3(pos, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.glsl150 b/vendor/gioui.org/shader/gio/zstencil.vert.0.glsl150
new file mode 100644
index 0000000..9ae6c9b
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.glsl150
@@ -0,0 +1,64 @@
+#version 150
+
+struct m3x2
+{
+ vec3 r0;
+ vec3 r1;
+};
+
+struct Block
+{
+ vec4 transform;
+ vec2 pathOffset;
+};
+
+uniform Block _block;
+
+in vec2 from;
+in vec2 ctrl;
+in vec2 to;
+in float maxy;
+in float corner;
+out vec2 vFrom;
+out vec2 vCtrl;
+out vec2 vTo;
+
+vec3 transform3x2(m3x2 t, vec3 v)
+{
+ return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
+}
+
+void main()
+{
+ vec2 from_1 = from + _block.pathOffset;
+ vec2 ctrl_1 = ctrl + _block.pathOffset;
+ vec2 to_1 = to + _block.pathOffset;
+ float maxy_1 = maxy + _block.pathOffset.y;
+ float c = corner;
+ vec2 pos;
+ if (c >= 0.375)
+ {
+ c -= 0.5;
+ pos.y = maxy_1 + 1.0;
+ }
+ else
+ {
+ pos.y = min(min(from_1.y, ctrl_1.y), to_1.y) - 1.0;
+ }
+ if (c >= 0.125)
+ {
+ pos.x = max(max(from_1.x, ctrl_1.x), to_1.x) + 1.0;
+ }
+ else
+ {
+ pos.x = min(min(from_1.x, ctrl_1.x), to_1.x) - 1.0;
+ }
+ vFrom = from_1 - pos;
+ vCtrl = ctrl_1 - pos;
+ vTo = to_1 - pos;
+ pos = (pos * _block.transform.xy) + _block.transform.zw;
+ m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
+ vec3 param_1 = vec3(pos, 0.0);
+ gl_Position = vec4(transform3x2(param, param_1), 1.0);
+}
+
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibios b/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibios
new file mode 100644
index 0000000..75ac068
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibiossimulator b/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibiossimulator
new file mode 100644
index 0000000..9ba5f58
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibmacos b/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibmacos
new file mode 100644
index 0000000..4de454d
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/gio/zstencil.vert.0.spirv b/vendor/gioui.org/shader/gio/zstencil.vert.0.spirv
new file mode 100644
index 0000000..b45803f
--- /dev/null
+++ b/vendor/gioui.org/shader/gio/zstencil.vert.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/go.mod b/vendor/gioui.org/shader/go.mod
new file mode 100644
index 0000000..4c9167c
--- /dev/null
+++ b/vendor/gioui.org/shader/go.mod
@@ -0,0 +1,5 @@
+module gioui.org/shader
+
+go 1.16
+
+require gioui.org/cpu v0.0.0-20210808092351-bfe733dd3334
diff --git a/vendor/gioui.org/shader/go.sum b/vendor/gioui.org/shader/go.sum
new file mode 100644
index 0000000..ec5a47a
--- /dev/null
+++ b/vendor/gioui.org/shader/go.sum
@@ -0,0 +1,2 @@
+gioui.org/cpu v0.0.0-20210808092351-bfe733dd3334 h1:1xK224B5DnjlPKCfVDTl7+olrzgAXn4ym6dum3l34rs=
+gioui.org/cpu v0.0.0-20210808092351-bfe733dd3334/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ=
diff --git a/vendor/gioui.org/shader/piet/abi.h b/vendor/gioui.org/shader/piet/abi.h
new file mode 100644
index 0000000..365d936
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/abi.h
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#define ALIGN(bytes, type) type __attribute__((aligned(bytes)))
+
+typedef ALIGN(8, uint8_t) byte8[8];
+typedef ALIGN(8, uint16_t) word4[4];
+typedef ALIGN(4, uint32_t) dword;
+typedef ALIGN(16, uint32_t) dword4[4];
+typedef ALIGN(8, uint64_t) qword;
+typedef ALIGN(16, uint64_t) qword2[2];
+typedef ALIGN(16, unsigned int) uint4[4];
+typedef ALIGN(8, uint32_t) dword2[2];
+typedef ALIGN(8, unsigned short) ushort4[4];
+typedef ALIGN(16, float) float4[4];
+typedef ALIGN(16, int) int4[4];
+
+typedef unsigned short half;
+
+typedef unsigned char bool;
+
+enum {
+ MAX_BOUND_DESCRIPTOR_SETS = 4,
+ MAX_DESCRIPTOR_SET_UNIFORM_BUFFERS_DYNAMIC = 8,
+ MAX_DESCRIPTOR_SET_STORAGE_BUFFERS_DYNAMIC = 4,
+ MAX_DESCRIPTOR_SET_COMBINED_BUFFERS_DYNAMIC =
+ MAX_DESCRIPTOR_SET_UNIFORM_BUFFERS_DYNAMIC +
+ MAX_DESCRIPTOR_SET_STORAGE_BUFFERS_DYNAMIC,
+ MAX_PUSH_CONSTANT_SIZE = 128,
+
+ MIN_STORAGE_BUFFER_OFFSET_ALIGNMENT = 256,
+
+ REQUIRED_MEMORY_ALIGNMENT = 16,
+
+ SIMD_WIDTH = 4,
+};
+
+struct image_descriptor {
+ ALIGN(16, void *ptr);
+ int width;
+ int height;
+ int depth;
+ int row_pitch_bytes;
+ int slice_pitch_bytes;
+ int sample_pitch_bytes;
+ int sample_count;
+ int size_in_bytes;
+
+ void *stencil_ptr;
+ int stencil_row_pitch_bytes;
+ int stencil_slice_pitch_bytes;
+ int stencil_sample_pitch_bytes;
+
+ // TODO: unused?
+ void *memoryOwner;
+};
+
+struct buffer_descriptor {
+ ALIGN(16, void *ptr);
+ int size_in_bytes;
+ int robustness_size;
+};
+
+struct program_data {
+ uint8_t *descriptor_sets[MAX_BOUND_DESCRIPTOR_SETS];
+ uint32_t descriptor_dynamic_offsets[MAX_DESCRIPTOR_SET_COMBINED_BUFFERS_DYNAMIC];
+ uint4 num_workgroups;
+ uint4 workgroup_size;
+ uint32_t invocations_per_subgroup;
+ uint32_t subgroups_per_workgroup;
+ uint32_t invocations_per_workgroup;
+ unsigned char push_constants[MAX_PUSH_CONSTANT_SIZE];
+ // Unused.
+ void *constants;
+};
+
+typedef int32_t yield_result;
+
+typedef void * coroutine;
+
+typedef coroutine (*routine_begin)(struct program_data *data,
+ int32_t workgroupX,
+ int32_t workgroupY,
+ int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount);
+
+typedef bool (*routine_await)(coroutine r, yield_result *res);
+
+typedef void (*routine_destroy)(coroutine r);
+
diff --git a/vendor/gioui.org/shader/piet/annotated.h b/vendor/gioui.org/shader/piet/annotated.h
new file mode 100644
index 0000000..6b18155
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/annotated.h
@@ -0,0 +1,225 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct AnnoImageRef {
+ uint offset;
+};
+
+struct AnnoColorRef {
+ uint offset;
+};
+
+struct AnnoBeginClipRef {
+ uint offset;
+};
+
+struct AnnoEndClipRef {
+ uint offset;
+};
+
+struct AnnotatedRef {
+ uint offset;
+};
+
+struct AnnoImage {
+ vec4 bbox;
+ float linewidth;
+ uint index;
+ ivec2 offset;
+};
+
+#define AnnoImage_size 28
+
+AnnoImageRef AnnoImage_index(AnnoImageRef ref, uint index) {
+ return AnnoImageRef(ref.offset + index * AnnoImage_size);
+}
+
+struct AnnoColor {
+ vec4 bbox;
+ float linewidth;
+ uint rgba_color;
+};
+
+#define AnnoColor_size 24
+
+AnnoColorRef AnnoColor_index(AnnoColorRef ref, uint index) {
+ return AnnoColorRef(ref.offset + index * AnnoColor_size);
+}
+
+struct AnnoBeginClip {
+ vec4 bbox;
+ float linewidth;
+};
+
+#define AnnoBeginClip_size 20
+
+AnnoBeginClipRef AnnoBeginClip_index(AnnoBeginClipRef ref, uint index) {
+ return AnnoBeginClipRef(ref.offset + index * AnnoBeginClip_size);
+}
+
+struct AnnoEndClip {
+ vec4 bbox;
+};
+
+#define AnnoEndClip_size 16
+
+AnnoEndClipRef AnnoEndClip_index(AnnoEndClipRef ref, uint index) {
+ return AnnoEndClipRef(ref.offset + index * AnnoEndClip_size);
+}
+
+#define Annotated_Nop 0
+#define Annotated_Color 1
+#define Annotated_Image 2
+#define Annotated_BeginClip 3
+#define Annotated_EndClip 4
+#define Annotated_size 32
+
+AnnotatedRef Annotated_index(AnnotatedRef ref, uint index) {
+ return AnnotatedRef(ref.offset + index * Annotated_size);
+}
+
+struct AnnotatedTag {
+ uint tag;
+ uint flags;
+};
+
+AnnoImage AnnoImage_read(Alloc a, AnnoImageRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ uint raw4 = read_mem(a, ix + 4);
+ uint raw5 = read_mem(a, ix + 5);
+ uint raw6 = read_mem(a, ix + 6);
+ AnnoImage s;
+ s.bbox = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.linewidth = uintBitsToFloat(raw4);
+ s.index = raw5;
+ s.offset = ivec2(int(raw6 << 16) >> 16, int(raw6) >> 16);
+ return s;
+}
+
+void AnnoImage_write(Alloc a, AnnoImageRef ref, AnnoImage s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.bbox.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.bbox.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.bbox.z));
+ write_mem(a, ix + 3, floatBitsToUint(s.bbox.w));
+ write_mem(a, ix + 4, floatBitsToUint(s.linewidth));
+ write_mem(a, ix + 5, s.index);
+ write_mem(a, ix + 6, (uint(s.offset.x) & 0xffff) | (uint(s.offset.y) << 16));
+}
+
+AnnoColor AnnoColor_read(Alloc a, AnnoColorRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ uint raw4 = read_mem(a, ix + 4);
+ uint raw5 = read_mem(a, ix + 5);
+ AnnoColor s;
+ s.bbox = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.linewidth = uintBitsToFloat(raw4);
+ s.rgba_color = raw5;
+ return s;
+}
+
+void AnnoColor_write(Alloc a, AnnoColorRef ref, AnnoColor s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.bbox.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.bbox.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.bbox.z));
+ write_mem(a, ix + 3, floatBitsToUint(s.bbox.w));
+ write_mem(a, ix + 4, floatBitsToUint(s.linewidth));
+ write_mem(a, ix + 5, s.rgba_color);
+}
+
+AnnoBeginClip AnnoBeginClip_read(Alloc a, AnnoBeginClipRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ uint raw4 = read_mem(a, ix + 4);
+ AnnoBeginClip s;
+ s.bbox = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.linewidth = uintBitsToFloat(raw4);
+ return s;
+}
+
+void AnnoBeginClip_write(Alloc a, AnnoBeginClipRef ref, AnnoBeginClip s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.bbox.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.bbox.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.bbox.z));
+ write_mem(a, ix + 3, floatBitsToUint(s.bbox.w));
+ write_mem(a, ix + 4, floatBitsToUint(s.linewidth));
+}
+
+AnnoEndClip AnnoEndClip_read(Alloc a, AnnoEndClipRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ AnnoEndClip s;
+ s.bbox = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ return s;
+}
+
+void AnnoEndClip_write(Alloc a, AnnoEndClipRef ref, AnnoEndClip s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.bbox.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.bbox.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.bbox.z));
+ write_mem(a, ix + 3, floatBitsToUint(s.bbox.w));
+}
+
+AnnotatedTag Annotated_tag(Alloc a, AnnotatedRef ref) {
+ uint tag_and_flags = read_mem(a, ref.offset >> 2);
+ return AnnotatedTag(tag_and_flags & 0xffff, tag_and_flags >> 16);
+}
+
+AnnoColor Annotated_Color_read(Alloc a, AnnotatedRef ref) {
+ return AnnoColor_read(a, AnnoColorRef(ref.offset + 4));
+}
+
+AnnoImage Annotated_Image_read(Alloc a, AnnotatedRef ref) {
+ return AnnoImage_read(a, AnnoImageRef(ref.offset + 4));
+}
+
+AnnoBeginClip Annotated_BeginClip_read(Alloc a, AnnotatedRef ref) {
+ return AnnoBeginClip_read(a, AnnoBeginClipRef(ref.offset + 4));
+}
+
+AnnoEndClip Annotated_EndClip_read(Alloc a, AnnotatedRef ref) {
+ return AnnoEndClip_read(a, AnnoEndClipRef(ref.offset + 4));
+}
+
+void Annotated_Nop_write(Alloc a, AnnotatedRef ref) {
+ write_mem(a, ref.offset >> 2, Annotated_Nop);
+}
+
+void Annotated_Color_write(Alloc a, AnnotatedRef ref, uint flags, AnnoColor s) {
+ write_mem(a, ref.offset >> 2, (flags << 16) | Annotated_Color);
+ AnnoColor_write(a, AnnoColorRef(ref.offset + 4), s);
+}
+
+void Annotated_Image_write(Alloc a, AnnotatedRef ref, uint flags, AnnoImage s) {
+ write_mem(a, ref.offset >> 2, (flags << 16) | Annotated_Image);
+ AnnoImage_write(a, AnnoImageRef(ref.offset + 4), s);
+}
+
+void Annotated_BeginClip_write(Alloc a, AnnotatedRef ref, uint flags, AnnoBeginClip s) {
+ write_mem(a, ref.offset >> 2, (flags << 16) | Annotated_BeginClip);
+ AnnoBeginClip_write(a, AnnoBeginClipRef(ref.offset + 4), s);
+}
+
+void Annotated_EndClip_write(Alloc a, AnnotatedRef ref, AnnoEndClip s) {
+ write_mem(a, ref.offset >> 2, Annotated_EndClip);
+ AnnoEndClip_write(a, AnnoEndClipRef(ref.offset + 4), s);
+}
+
diff --git a/vendor/gioui.org/shader/piet/backdrop.comp b/vendor/gioui.org/shader/piet/backdrop.comp
new file mode 100644
index 0000000..12ae5b1
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop.comp
@@ -0,0 +1,109 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Propagation of tile backdrop for filling.
+//
+// Each thread reads one path element and calculates the number of spanned tiles
+// based on the bounding box.
+// In a further compaction step, the workgroup loops over the corresponding tile rows per element in parallel.
+// For each row the per tile backdrop will be read, as calculated in the previous coarse path segment kernel,
+// and propagated from the left to the right (prefix summed).
+//
+// Output state:
+// - Each path element has an array of tiles covering the whole path based on boundig box
+// - Each tile per path element contains the 'backdrop' and a list of subdivided path segments
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+
+#include "mem.h"
+#include "setup.h"
+
+#define LG_BACKDROP_WG (7 + LG_WG_FACTOR)
+#define BACKDROP_WG (1 << LG_BACKDROP_WG)
+
+layout(local_size_x = BACKDROP_WG, local_size_y = 1) in;
+
+layout(set = 0, binding = 1) readonly buffer ConfigBuf {
+ Config conf;
+};
+
+#include "annotated.h"
+#include "tile.h"
+
+shared uint sh_row_count[BACKDROP_WG];
+shared Alloc sh_row_alloc[BACKDROP_WG];
+shared uint sh_row_width[BACKDROP_WG];
+
+void main() {
+ uint th_ix = gl_LocalInvocationID.x;
+ uint element_ix = gl_GlobalInvocationID.x;
+ AnnotatedRef ref = AnnotatedRef(conf.anno_alloc.offset + element_ix * Annotated_size);
+
+ // Work assignment: 1 thread : 1 path element
+ uint row_count = 0;
+ bool mem_ok = mem_error == NO_ERROR;
+ if (element_ix < conf.n_elements) {
+ AnnotatedTag tag = Annotated_tag(conf.anno_alloc, ref);
+ switch (tag.tag) {
+ case Annotated_Image:
+ case Annotated_BeginClip:
+ case Annotated_Color:
+ if (fill_mode_from_flags(tag.flags) != MODE_NONZERO) {
+ break;
+ }
+ // Fall through.
+ PathRef path_ref = PathRef(conf.tile_alloc.offset + element_ix * Path_size);
+ Path path = Path_read(conf.tile_alloc, path_ref);
+ sh_row_width[th_ix] = path.bbox.z - path.bbox.x;
+ row_count = path.bbox.w - path.bbox.y;
+ // Paths that don't cross tile top edges don't have backdrops.
+ // Don't apply the optimization to paths that may cross the y = 0
+ // top edge, but clipped to 1 row.
+ if (row_count == 1 && path.bbox.y > 0) {
+ // Note: this can probably be expanded to width = 2 as
+ // long as it doesn't cross the left edge.
+ row_count = 0;
+ }
+ Alloc path_alloc = new_alloc(path.tiles.offset, (path.bbox.z - path.bbox.x) * (path.bbox.w - path.bbox.y) * Tile_size, mem_ok);
+ sh_row_alloc[th_ix] = path_alloc;
+ }
+ }
+
+ sh_row_count[th_ix] = row_count;
+ // Prefix sum of sh_row_count
+ for (uint i = 0; i < LG_BACKDROP_WG; i++) {
+ barrier();
+ if (th_ix >= (1 << i)) {
+ row_count += sh_row_count[th_ix - (1 << i)];
+ }
+ barrier();
+ sh_row_count[th_ix] = row_count;
+ }
+ barrier();
+ // Work assignment: 1 thread : 1 path element row
+ uint total_rows = sh_row_count[BACKDROP_WG - 1];
+ for (uint row = th_ix; row < total_rows; row += BACKDROP_WG) {
+ // Binary search to find element
+ uint el_ix = 0;
+ for (uint i = 0; i < LG_BACKDROP_WG; i++) {
+ uint probe = el_ix + ((BACKDROP_WG / 2) >> i);
+ if (row >= sh_row_count[probe - 1]) {
+ el_ix = probe;
+ }
+ }
+ uint width = sh_row_width[el_ix];
+ if (width > 0 && mem_ok) {
+ // Process one row sequentially
+ // Read backdrop value per tile and prefix sum it
+ Alloc tiles_alloc = sh_row_alloc[el_ix];
+ uint seq_ix = row - (el_ix > 0 ? sh_row_count[el_ix - 1] : 0);
+ uint tile_el_ix = (tiles_alloc.offset >> 2) + 1 + seq_ix * 2 * width;
+ uint sum = read_mem(tiles_alloc, tile_el_ix);
+ for (uint x = 1; x < width; x++) {
+ tile_el_ix += 2;
+ sum += read_mem(tiles_alloc, tile_el_ix);
+ write_mem(tiles_alloc, tile_el_ix, sum);
+ }
+ }
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/backdrop_abi.c b/vendor/gioui.org/shader/piet/backdrop_abi.c
new file mode 100644
index 0000000..48a4a30
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "backdrop_abi.h"
+
+const struct program_info backdrop_program_info = {
+ .has_cbarriers = 1,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct backdrop_descriptor_set_layout),
+ .workgroup_size_x = 128,
+ .workgroup_size_y = 1,
+ .workgroup_size_z = 1,
+ .begin = backdrop_coroutine_begin,
+ .await = backdrop_coroutine_await,
+ .destroy = backdrop_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/backdrop_abi.go b/vendor/gioui.org/shader/piet/backdrop_abi.go
new file mode 100644
index 0000000..a40a37d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_abi.go
@@ -0,0 +1,35 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "backdrop_abi.h"
+*/
+import "C"
+
+var BackdropProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.backdrop_program_info))
+
+type BackdropDescriptorSetLayout = C.struct_backdrop_descriptor_set_layout
+
+const BackdropHash = "6862eaf623d89da635e9d5bc981c77aae4e39aa44047ab47c62d243cf5fe7e73"
+
+func (l *BackdropDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *BackdropDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
diff --git a/vendor/gioui.org/shader/piet/backdrop_abi.h b/vendor/gioui.org/shader/piet/backdrop_abi.h
new file mode 100644
index 0000000..f5c0303
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_abi.h
@@ -0,0 +1,17 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct backdrop_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+};
+
+extern coroutine backdrop_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool backdrop_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void backdrop_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info backdrop_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/backdrop_abi_nosupport.go b/vendor/gioui.org/shader/piet/backdrop_abi_nosupport.go
new file mode 100644
index 0000000..c60119b
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_abi_nosupport.go
@@ -0,0 +1,22 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var BackdropProgramInfo *cpu.ProgramInfo
+
+type BackdropDescriptorSetLayout struct{}
+
+const BackdropHash = ""
+
+func (l *BackdropDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *BackdropDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/backdrop_linux_amd64.syso b/vendor/gioui.org/shader/piet/backdrop_linux_amd64.syso
new file mode 100644
index 0000000..2a71e8a
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/backdrop_linux_arm.syso b/vendor/gioui.org/shader/piet/backdrop_linux_arm.syso
new file mode 100644
index 0000000..c86dada
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/backdrop_linux_arm64.syso b/vendor/gioui.org/shader/piet/backdrop_linux_arm64.syso
new file mode 100644
index 0000000..4608a7e
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/backdrop_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/binning.comp b/vendor/gioui.org/shader/piet/binning.comp
new file mode 100644
index 0000000..acda83c
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning.comp
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// The binning stage of the pipeline.
+//
+// Each workgroup processes N_TILE paths.
+// Each thread processes one path and calculates a N_TILE_X x N_TILE_Y coverage mask
+// based on the path bounding box to bin the paths.
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+
+#include "mem.h"
+#include "setup.h"
+
+layout(local_size_x = N_TILE, local_size_y = 1) in;
+
+layout(set = 0, binding = 1) readonly buffer ConfigBuf {
+ Config conf;
+};
+
+#include "annotated.h"
+#include "bins.h"
+
+// scale factors useful for converting coordinates to bins
+#define SX (1.0 / float(N_TILE_X * TILE_WIDTH_PX))
+#define SY (1.0 / float(N_TILE_Y * TILE_HEIGHT_PX))
+
+// Constant not available in GLSL. Also consider uintBitsToFloat(0x7f800000)
+#define INFINITY (1.0 / 0.0)
+
+// Note: cudaraster has N_TILE + 1 to cut down on bank conflicts.
+// Bitmaps are sliced (256bit into 8 (N_SLICE) 32bit submaps)
+shared uint bitmaps[N_SLICE][N_TILE];
+shared uint count[N_SLICE][N_TILE];
+shared Alloc sh_chunk_alloc[N_TILE];
+// Really a bool, but some Metal devices don't accept shared bools.
+shared uint sh_alloc_failed;
+
+void main() {
+ uint my_n_elements = conf.n_elements;
+ uint my_partition = gl_WorkGroupID.x;
+
+ for (uint i = 0; i < N_SLICE; i++) {
+ bitmaps[i][gl_LocalInvocationID.x] = 0;
+ }
+ if (gl_LocalInvocationID.x == 0) {
+ sh_alloc_failed = 0;
+ }
+ barrier();
+
+ // Read inputs and determine coverage of bins
+ uint element_ix = my_partition * N_TILE + gl_LocalInvocationID.x;
+ AnnotatedRef ref = AnnotatedRef(conf.anno_alloc.offset + element_ix * Annotated_size);
+ uint tag = Annotated_Nop;
+ if (element_ix < my_n_elements) {
+ tag = Annotated_tag(conf.anno_alloc, ref).tag;
+ }
+ int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
+ switch (tag) {
+ case Annotated_Color:
+ case Annotated_Image:
+ case Annotated_BeginClip:
+ case Annotated_EndClip:
+ // Note: we take advantage of the fact that these drawing elements
+ // have the bbox at the same place in their layout.
+ AnnoEndClip clip = Annotated_EndClip_read(conf.anno_alloc, ref);
+ x0 = int(floor(clip.bbox.x * SX));
+ y0 = int(floor(clip.bbox.y * SY));
+ x1 = int(ceil(clip.bbox.z * SX));
+ y1 = int(ceil(clip.bbox.w * SY));
+ break;
+ }
+
+ // At this point, we run an iterator over the coverage area,
+ // trying to keep divergence low.
+ // Right now, it's just a bbox, but we'll get finer with
+ // segments.
+ uint width_in_bins = (conf.width_in_tiles + N_TILE_X - 1)/N_TILE_X;
+ uint height_in_bins = (conf.height_in_tiles + N_TILE_Y - 1)/N_TILE_Y;
+ x0 = clamp(x0, 0, int(width_in_bins));
+ x1 = clamp(x1, x0, int(width_in_bins));
+ y0 = clamp(y0, 0, int(height_in_bins));
+ y1 = clamp(y1, y0, int(height_in_bins));
+ if (x0 == x1) y1 = y0;
+ int x = x0, y = y0;
+ uint my_slice = gl_LocalInvocationID.x / 32;
+ uint my_mask = 1 << (gl_LocalInvocationID.x & 31);
+ while (y < y1) {
+ atomicOr(bitmaps[my_slice][y * width_in_bins + x], my_mask);
+ x++;
+ if (x == x1) {
+ x = x0;
+ y++;
+ }
+ }
+
+ barrier();
+ // Allocate output segments.
+ uint element_count = 0;
+ for (uint i = 0; i < N_SLICE; i++) {
+ element_count += bitCount(bitmaps[i][gl_LocalInvocationID.x]);
+ count[i][gl_LocalInvocationID.x] = element_count;
+ }
+ // element_count is number of elements covering bin for this invocation.
+ Alloc chunk_alloc = new_alloc(0, 0, true);
+ if (element_count != 0) {
+ // TODO: aggregate atomic adds (subgroup is probably fastest)
+ MallocResult chunk = malloc(element_count * BinInstance_size);
+ chunk_alloc = chunk.alloc;
+ sh_chunk_alloc[gl_LocalInvocationID.x] = chunk_alloc;
+ if (chunk.failed) {
+ sh_alloc_failed = 1;
+ }
+ }
+ // Note: it might be more efficient for reading to do this in the
+ // other order (each bin is a contiguous sequence of partitions)
+ uint out_ix = (conf.bin_alloc.offset >> 2) + (my_partition * N_TILE + gl_LocalInvocationID.x) * 2;
+ write_mem(conf.bin_alloc, out_ix, element_count);
+ write_mem(conf.bin_alloc, out_ix + 1, chunk_alloc.offset);
+
+ barrier();
+ if (sh_alloc_failed != 0 || mem_error != NO_ERROR) {
+ return;
+ }
+
+ // Use similar strategy as Laine & Karras paper; loop over bbox of bins
+ // touched by this element
+ x = x0;
+ y = y0;
+ while (y < y1) {
+ uint bin_ix = y * width_in_bins + x;
+ uint out_mask = bitmaps[my_slice][bin_ix];
+ if ((out_mask & my_mask) != 0) {
+ uint idx = bitCount(out_mask & (my_mask - 1));
+ if (my_slice > 0) {
+ idx += count[my_slice - 1][bin_ix];
+ }
+ Alloc out_alloc = sh_chunk_alloc[bin_ix];
+ uint out_offset = out_alloc.offset + idx * BinInstance_size;
+ BinInstance_write(out_alloc, BinInstanceRef(out_offset), BinInstance(element_ix));
+ }
+ x++;
+ if (x == x1) {
+ x = x0;
+ y++;
+ }
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/binning_abi.c b/vendor/gioui.org/shader/piet/binning_abi.c
new file mode 100644
index 0000000..b28be33
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "binning_abi.h"
+
+const struct program_info binning_program_info = {
+ .has_cbarriers = 1,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct binning_descriptor_set_layout),
+ .workgroup_size_x = 128,
+ .workgroup_size_y = 1,
+ .workgroup_size_z = 1,
+ .begin = binning_coroutine_begin,
+ .await = binning_coroutine_await,
+ .destroy = binning_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/binning_abi.go b/vendor/gioui.org/shader/piet/binning_abi.go
new file mode 100644
index 0000000..7ee361f
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_abi.go
@@ -0,0 +1,35 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "binning_abi.h"
+*/
+import "C"
+
+var BinningProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.binning_program_info))
+
+type BinningDescriptorSetLayout = C.struct_binning_descriptor_set_layout
+
+const BinningHash = "84177b6dfb90309a6c054ab9fea42293bd49033c221651c756eb40188f4d6ce8"
+
+func (l *BinningDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *BinningDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
diff --git a/vendor/gioui.org/shader/piet/binning_abi.h b/vendor/gioui.org/shader/piet/binning_abi.h
new file mode 100644
index 0000000..0152f34
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_abi.h
@@ -0,0 +1,17 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct binning_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+};
+
+extern coroutine binning_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool binning_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void binning_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info binning_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/binning_abi_nosupport.go b/vendor/gioui.org/shader/piet/binning_abi_nosupport.go
new file mode 100644
index 0000000..81b9b56
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_abi_nosupport.go
@@ -0,0 +1,22 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var BinningProgramInfo *cpu.ProgramInfo
+
+type BinningDescriptorSetLayout struct{}
+
+const BinningHash = ""
+
+func (l *BinningDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *BinningDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/binning_linux_amd64.syso b/vendor/gioui.org/shader/piet/binning_linux_amd64.syso
new file mode 100644
index 0000000..329d95d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/binning_linux_arm.syso b/vendor/gioui.org/shader/piet/binning_linux_arm.syso
new file mode 100644
index 0000000..a8f21a7
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/binning_linux_arm64.syso b/vendor/gioui.org/shader/piet/binning_linux_arm64.syso
new file mode 100644
index 0000000..02938c5
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/binning_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/bins.h b/vendor/gioui.org/shader/piet/bins.h
new file mode 100644
index 0000000..853adab
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/bins.h
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct BinInstanceRef {
+ uint offset;
+};
+
+struct BinInstance {
+ uint element_ix;
+};
+
+#define BinInstance_size 4
+
+BinInstanceRef BinInstance_index(BinInstanceRef ref, uint index) {
+ return BinInstanceRef(ref.offset + index * BinInstance_size);
+}
+
+BinInstance BinInstance_read(Alloc a, BinInstanceRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ BinInstance s;
+ s.element_ix = raw0;
+ return s;
+}
+
+void BinInstance_write(Alloc a, BinInstanceRef ref, BinInstance s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.element_ix);
+}
+
diff --git a/vendor/gioui.org/shader/piet/coarse.comp b/vendor/gioui.org/shader/piet/coarse.comp
new file mode 100644
index 0000000..731da97
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse.comp
@@ -0,0 +1,426 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// The coarse rasterizer stage of the pipeline.
+//
+// As input we have the ordered partitions of paths from the binning phase and
+// the annotated tile list of segments and backdrop per path.
+//
+// Each workgroup operating on one bin by stream compacting
+// the elements corresponding to the bin.
+//
+// As output we have an ordered command stream per tile. Every tile from a path (backdrop + segment list) will be encoded.
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+
+#include "mem.h"
+#include "setup.h"
+
+layout(local_size_x = N_TILE, local_size_y = 1) in;
+
+layout(set = 0, binding = 1) readonly buffer ConfigBuf {
+ Config conf;
+};
+
+#include "annotated.h"
+#include "bins.h"
+#include "tile.h"
+#include "ptcl.h"
+
+#define LG_N_PART_READ (7 + LG_WG_FACTOR)
+#define N_PART_READ (1 << LG_N_PART_READ)
+
+shared uint sh_elements[N_TILE];
+
+// Number of elements in the partition; prefix sum.
+shared uint sh_part_count[N_PART_READ];
+shared Alloc sh_part_elements[N_PART_READ];
+
+shared uint sh_bitmaps[N_SLICE][N_TILE];
+
+shared uint sh_tile_count[N_TILE];
+// The width of the tile rect for the element, intersected with this bin
+shared uint sh_tile_width[N_TILE];
+shared uint sh_tile_x0[N_TILE];
+shared uint sh_tile_y0[N_TILE];
+
+// These are set up so base + tile_y * stride + tile_x points to a Tile.
+shared uint sh_tile_base[N_TILE];
+shared uint sh_tile_stride[N_TILE];
+
+#ifdef MEM_DEBUG
+// Store allocs only when MEM_DEBUG to save shared memory traffic.
+shared Alloc sh_tile_alloc[N_TILE];
+
+void write_tile_alloc(uint el_ix, Alloc a) {
+ sh_tile_alloc[el_ix] = a;
+}
+
+Alloc read_tile_alloc(uint el_ix, bool mem_ok) {
+ return sh_tile_alloc[el_ix];
+}
+#else
+void write_tile_alloc(uint el_ix, Alloc a) {
+ // No-op
+}
+
+Alloc read_tile_alloc(uint el_ix, bool mem_ok) {
+ // All memory.
+ return new_alloc(0, memory.length()*4, mem_ok);
+}
+#endif
+
+// The maximum number of commands per annotated element.
+#define ANNO_COMMANDS 2
+
+// Perhaps cmd_alloc should be a global? This is a style question.
+bool alloc_cmd(inout Alloc cmd_alloc, inout CmdRef cmd_ref, inout uint cmd_limit) {
+ if (cmd_ref.offset < cmd_limit) {
+ return true;
+ }
+ MallocResult new_cmd = malloc(PTCL_INITIAL_ALLOC);
+ if (new_cmd.failed) {
+ return false;
+ }
+ CmdJump jump = CmdJump(new_cmd.alloc.offset);
+ Cmd_Jump_write(cmd_alloc, cmd_ref, jump);
+ cmd_alloc = new_cmd.alloc;
+ cmd_ref = CmdRef(cmd_alloc.offset);
+ // Reserve space for the maximum number of commands and a potential jump.
+ cmd_limit = cmd_alloc.offset + PTCL_INITIAL_ALLOC - (ANNO_COMMANDS + 1) * Cmd_size;
+ return true;
+}
+
+void write_fill(Alloc alloc, inout CmdRef cmd_ref, uint flags, Tile tile, float linewidth) {
+ if (fill_mode_from_flags(flags) == MODE_NONZERO) {
+ if (tile.tile.offset != 0) {
+ CmdFill cmd_fill = CmdFill(tile.tile.offset, tile.backdrop);
+ Cmd_Fill_write(alloc, cmd_ref, cmd_fill);
+ cmd_ref.offset += 4 + CmdFill_size;
+ } else {
+ Cmd_Solid_write(alloc, cmd_ref);
+ cmd_ref.offset += 4;
+ }
+ } else {
+ CmdStroke cmd_stroke = CmdStroke(tile.tile.offset, 0.5 * linewidth);
+ Cmd_Stroke_write(alloc, cmd_ref, cmd_stroke);
+ cmd_ref.offset += 4 + CmdStroke_size;
+ }
+}
+
+void main() {
+ // Could use either linear or 2d layouts for both dispatch and
+ // invocations within the workgroup. We'll use variables to abstract.
+ uint width_in_bins = (conf.width_in_tiles + N_TILE_X - 1)/N_TILE_X;
+ uint bin_ix = width_in_bins * gl_WorkGroupID.y + gl_WorkGroupID.x;
+ uint partition_ix = 0;
+ uint n_partitions = (conf.n_elements + N_TILE - 1) / N_TILE;
+ uint th_ix = gl_LocalInvocationID.x;
+
+ // Coordinates of top left of bin, in tiles.
+ uint bin_tile_x = N_TILE_X * gl_WorkGroupID.x;
+ uint bin_tile_y = N_TILE_Y * gl_WorkGroupID.y;
+
+ // Per-tile state
+ uint tile_x = gl_LocalInvocationID.x % N_TILE_X;
+ uint tile_y = gl_LocalInvocationID.x / N_TILE_X;
+ uint this_tile_ix = (bin_tile_y + tile_y) * conf.width_in_tiles + bin_tile_x + tile_x;
+ Alloc cmd_alloc = slice_mem(conf.ptcl_alloc, this_tile_ix * PTCL_INITIAL_ALLOC, PTCL_INITIAL_ALLOC);
+ CmdRef cmd_ref = CmdRef(cmd_alloc.offset);
+ // Reserve space for the maximum number of commands and a potential jump.
+ uint cmd_limit = cmd_ref.offset + PTCL_INITIAL_ALLOC - (ANNO_COMMANDS + 1) * Cmd_size;
+ // The nesting depth of the clip stack
+ uint clip_depth = 0;
+ // State for the "clip zero" optimization. If it's nonzero, then we are
+ // currently in a clip for which the entire tile has an alpha of zero, and
+ // the value is the depth after the "begin clip" of that element.
+ uint clip_zero_depth = 0;
+ // State for the "clip one" optimization. If bit `i` is set, then that means
+ // that the clip pushed at depth `i` has an alpha of all one.
+ uint clip_one_mask = 0;
+
+ // I'm sure we can figure out how to do this with at least one fewer register...
+ // Items up to rd_ix have been read from sh_elements
+ uint rd_ix = 0;
+ // Items up to wr_ix have been written into sh_elements
+ uint wr_ix = 0;
+ // Items between part_start_ix and ready_ix are ready to be transferred from sh_part_elements
+ uint part_start_ix = 0;
+ uint ready_ix = 0;
+
+ // Leave room for the fine rasterizer scratch allocation.
+ Alloc scratch_alloc = slice_mem(cmd_alloc, 0, Alloc_size);
+ cmd_ref.offset += Alloc_size;
+
+ uint num_begin_slots = 0;
+ uint begin_slot = 0;
+ bool mem_ok = mem_error == NO_ERROR;
+ while (true) {
+ for (uint i = 0; i < N_SLICE; i++) {
+ sh_bitmaps[i][th_ix] = 0;
+ }
+
+ // parallel read of input partitions
+ do {
+ if (ready_ix == wr_ix && partition_ix < n_partitions) {
+ part_start_ix = ready_ix;
+ uint count = 0;
+ if (th_ix < N_PART_READ && partition_ix + th_ix < n_partitions) {
+ uint in_ix = (conf.bin_alloc.offset >> 2) + ((partition_ix + th_ix) * N_TILE + bin_ix) * 2;
+ count = read_mem(conf.bin_alloc, in_ix);
+ uint offset = read_mem(conf.bin_alloc, in_ix + 1);
+ sh_part_elements[th_ix] = new_alloc(offset, count*BinInstance_size, mem_ok);
+ }
+ // prefix sum of counts
+ for (uint i = 0; i < LG_N_PART_READ; i++) {
+ if (th_ix < N_PART_READ) {
+ sh_part_count[th_ix] = count;
+ }
+ barrier();
+ if (th_ix < N_PART_READ) {
+ if (th_ix >= (1 << i)) {
+ count += sh_part_count[th_ix - (1 << i)];
+ }
+ }
+ barrier();
+ }
+ if (th_ix < N_PART_READ) {
+ sh_part_count[th_ix] = part_start_ix + count;
+ }
+ barrier();
+ ready_ix = sh_part_count[N_PART_READ - 1];
+ partition_ix += N_PART_READ;
+ }
+ // use binary search to find element to read
+ uint ix = rd_ix + th_ix;
+ if (ix >= wr_ix && ix < ready_ix && mem_ok) {
+ uint part_ix = 0;
+ for (uint i = 0; i < LG_N_PART_READ; i++) {
+ uint probe = part_ix + ((N_PART_READ / 2) >> i);
+ if (ix >= sh_part_count[probe - 1]) {
+ part_ix = probe;
+ }
+ }
+ ix -= part_ix > 0 ? sh_part_count[part_ix - 1] : part_start_ix;
+ Alloc bin_alloc = sh_part_elements[part_ix];
+ BinInstanceRef inst_ref = BinInstanceRef(bin_alloc.offset);
+ BinInstance inst = BinInstance_read(bin_alloc, BinInstance_index(inst_ref, ix));
+ sh_elements[th_ix] = inst.element_ix;
+ }
+ barrier();
+
+ wr_ix = min(rd_ix + N_TILE, ready_ix);
+ } while (wr_ix - rd_ix < N_TILE && (wr_ix < ready_ix || partition_ix < n_partitions));
+
+ // We've done the merge and filled the buffer.
+
+ // Read one element, compute coverage.
+ uint tag = Annotated_Nop;
+ uint element_ix;
+ AnnotatedRef ref;
+ if (th_ix + rd_ix < wr_ix) {
+ element_ix = sh_elements[th_ix];
+ ref = AnnotatedRef(conf.anno_alloc.offset + element_ix * Annotated_size);
+ tag = Annotated_tag(conf.anno_alloc, ref).tag;
+ }
+
+ // Bounding box of element in pixel coordinates.
+ uint tile_count;
+ switch (tag) {
+ case Annotated_Color:
+ case Annotated_Image:
+ case Annotated_BeginClip:
+ case Annotated_EndClip:
+ // We have one "path" for each element, even if the element isn't
+ // actually a path (currently EndClip, but images etc in the future).
+ uint path_ix = element_ix;
+ Path path = Path_read(conf.tile_alloc, PathRef(conf.tile_alloc.offset + path_ix * Path_size));
+ uint stride = path.bbox.z - path.bbox.x;
+ sh_tile_stride[th_ix] = stride;
+ int dx = int(path.bbox.x) - int(bin_tile_x);
+ int dy = int(path.bbox.y) - int(bin_tile_y);
+ int x0 = clamp(dx, 0, N_TILE_X);
+ int y0 = clamp(dy, 0, N_TILE_Y);
+ int x1 = clamp(int(path.bbox.z) - int(bin_tile_x), 0, N_TILE_X);
+ int y1 = clamp(int(path.bbox.w) - int(bin_tile_y), 0, N_TILE_Y);
+ sh_tile_width[th_ix] = uint(x1 - x0);
+ sh_tile_x0[th_ix] = x0;
+ sh_tile_y0[th_ix] = y0;
+ tile_count = uint(x1 - x0) * uint(y1 - y0);
+ // base relative to bin
+ uint base = path.tiles.offset - uint(dy * stride + dx) * Tile_size;
+ sh_tile_base[th_ix] = base;
+ Alloc path_alloc = new_alloc(path.tiles.offset, (path.bbox.z - path.bbox.x) * (path.bbox.w - path.bbox.y) * Tile_size, mem_ok);
+ write_tile_alloc(th_ix, path_alloc);
+ break;
+ default:
+ tile_count = 0;
+ break;
+ }
+
+ // Prefix sum of sh_tile_count
+ sh_tile_count[th_ix] = tile_count;
+ for (uint i = 0; i < LG_N_TILE; i++) {
+ barrier();
+ if (th_ix >= (1 << i)) {
+ tile_count += sh_tile_count[th_ix - (1 << i)];
+ }
+ barrier();
+ sh_tile_count[th_ix] = tile_count;
+ }
+ barrier();
+ uint total_tile_count = sh_tile_count[N_TILE - 1];
+ for (uint ix = th_ix; ix < total_tile_count; ix += N_TILE) {
+ // Binary search to find element
+ uint el_ix = 0;
+ for (uint i = 0; i < LG_N_TILE; i++) {
+ uint probe = el_ix + ((N_TILE / 2) >> i);
+ if (ix >= sh_tile_count[probe - 1]) {
+ el_ix = probe;
+ }
+ }
+ AnnotatedRef ref = AnnotatedRef(conf.anno_alloc.offset + sh_elements[el_ix] * Annotated_size);
+ uint tag = Annotated_tag(conf.anno_alloc, ref).tag;
+ uint seq_ix = ix - (el_ix > 0 ? sh_tile_count[el_ix - 1] : 0);
+ uint width = sh_tile_width[el_ix];
+ uint x = sh_tile_x0[el_ix] + seq_ix % width;
+ uint y = sh_tile_y0[el_ix] + seq_ix / width;
+ bool include_tile = false;
+ if (tag == Annotated_BeginClip || tag == Annotated_EndClip) {
+ include_tile = true;
+ } else if (mem_ok) {
+ Tile tile = Tile_read(read_tile_alloc(el_ix, mem_ok), TileRef(sh_tile_base[el_ix] + (sh_tile_stride[el_ix] * y + x) * Tile_size));
+ // Include the path in the tile if
+ // - the tile contains at least a segment (tile offset non-zero)
+ // - the tile is completely covered (backdrop non-zero)
+ include_tile = tile.tile.offset != 0 || tile.backdrop != 0;
+ }
+ if (include_tile) {
+ uint el_slice = el_ix / 32;
+ uint el_mask = 1 << (el_ix & 31);
+ atomicOr(sh_bitmaps[el_slice][y * N_TILE_X + x], el_mask);
+ }
+ }
+
+ barrier();
+
+ // Output non-segment elements for this tile. The thread does a sequential walk
+ // through the non-segment elements.
+ uint slice_ix = 0;
+ uint bitmap = sh_bitmaps[0][th_ix];
+ while (mem_ok) {
+ if (bitmap == 0) {
+ slice_ix++;
+ if (slice_ix == N_SLICE) {
+ break;
+ }
+ bitmap = sh_bitmaps[slice_ix][th_ix];
+ if (bitmap == 0) {
+ continue;
+ }
+ }
+ uint element_ref_ix = slice_ix * 32 + findLSB(bitmap);
+ uint element_ix = sh_elements[element_ref_ix];
+
+ // Clear LSB
+ bitmap &= bitmap - 1;
+
+ // At this point, we read the element again from global memory.
+ // If that turns out to be expensive, maybe we can pack it into
+ // shared memory (or perhaps just the tag).
+ ref = AnnotatedRef(conf.anno_alloc.offset + element_ix * Annotated_size);
+ AnnotatedTag tag = Annotated_tag(conf.anno_alloc, ref);
+
+ if (clip_zero_depth == 0) {
+ switch (tag.tag) {
+ case Annotated_Color:
+ Tile tile = Tile_read(read_tile_alloc(element_ref_ix, mem_ok), TileRef(sh_tile_base[element_ref_ix]
+ + (sh_tile_stride[element_ref_ix] * tile_y + tile_x) * Tile_size));
+ AnnoColor fill = Annotated_Color_read(conf.anno_alloc, ref);
+ if (!alloc_cmd(cmd_alloc, cmd_ref, cmd_limit)) {
+ break;
+ }
+ write_fill(cmd_alloc, cmd_ref, tag.flags, tile, fill.linewidth);
+ Cmd_Color_write(cmd_alloc, cmd_ref, CmdColor(fill.rgba_color));
+ cmd_ref.offset += 4 + CmdColor_size;
+ break;
+ case Annotated_Image:
+ tile = Tile_read(read_tile_alloc(element_ref_ix, mem_ok), TileRef(sh_tile_base[element_ref_ix]
+ + (sh_tile_stride[element_ref_ix] * tile_y + tile_x) * Tile_size));
+ AnnoImage fill_img = Annotated_Image_read(conf.anno_alloc, ref);
+ if (!alloc_cmd(cmd_alloc, cmd_ref, cmd_limit)) {
+ break;
+ }
+ write_fill(cmd_alloc, cmd_ref, tag.flags, tile, fill_img.linewidth);
+ Cmd_Image_write(cmd_alloc, cmd_ref, CmdImage(fill_img.index, fill_img.offset));
+ cmd_ref.offset += 4 + CmdImage_size;
+ break;
+ case Annotated_BeginClip:
+ tile = Tile_read(read_tile_alloc(element_ref_ix, mem_ok), TileRef(sh_tile_base[element_ref_ix]
+ + (sh_tile_stride[element_ref_ix] * tile_y + tile_x) * Tile_size));
+ if (tile.tile.offset == 0 && tile.backdrop == 0) {
+ clip_zero_depth = clip_depth + 1;
+ } else if (tile.tile.offset == 0 && clip_depth < 32) {
+ clip_one_mask |= (1 << clip_depth);
+ } else {
+ AnnoBeginClip begin_clip = Annotated_BeginClip_read(conf.anno_alloc, ref);
+ if (!alloc_cmd(cmd_alloc, cmd_ref, cmd_limit)) {
+ break;
+ }
+ write_fill(cmd_alloc, cmd_ref, tag.flags, tile, begin_clip.linewidth);
+ Cmd_BeginClip_write(cmd_alloc, cmd_ref);
+ cmd_ref.offset += 4;
+ if (clip_depth < 32) {
+ clip_one_mask &= ~(1 << clip_depth);
+ }
+ begin_slot++;
+ num_begin_slots = max(num_begin_slots, begin_slot);
+ }
+ clip_depth++;
+ break;
+ case Annotated_EndClip:
+ clip_depth--;
+ if (clip_depth >= 32 || (clip_one_mask & (1 << clip_depth)) == 0) {
+ if (!alloc_cmd(cmd_alloc, cmd_ref, cmd_limit)) {
+ break;
+ }
+ Cmd_Solid_write(cmd_alloc, cmd_ref);
+ cmd_ref.offset += 4;
+ begin_slot--;
+ Cmd_EndClip_write(cmd_alloc, cmd_ref);
+ cmd_ref.offset += 4;
+ }
+ break;
+ }
+ } else {
+ // In "clip zero" state, suppress all drawing
+ switch (tag.tag) {
+ case Annotated_BeginClip:
+ clip_depth++;
+ break;
+ case Annotated_EndClip:
+ if (clip_depth == clip_zero_depth) {
+ clip_zero_depth = 0;
+ }
+ clip_depth--;
+ break;
+ }
+ }
+ }
+ barrier();
+
+ rd_ix += N_TILE;
+ if (rd_ix >= ready_ix && partition_ix >= n_partitions) break;
+ }
+ if (bin_tile_x + tile_x < conf.width_in_tiles && bin_tile_y + tile_y < conf.height_in_tiles) {
+ Cmd_End_write(cmd_alloc, cmd_ref);
+ if (num_begin_slots > 0) {
+ // Write scratch allocation: one state per BeginClip per rasterizer chunk.
+ uint scratch_size = num_begin_slots * TILE_WIDTH_PX * TILE_HEIGHT_PX * CLIP_STATE_SIZE * 4;
+ MallocResult scratch = malloc(scratch_size);
+ // Ignore scratch.failed; we don't use the allocation and kernel4
+ // checks for memory overflow before using it.
+ alloc_write(scratch_alloc, scratch_alloc.offset, scratch.alloc);
+ }
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/coarse_abi.c b/vendor/gioui.org/shader/piet/coarse_abi.c
new file mode 100644
index 0000000..dbecf9f
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "coarse_abi.h"
+
+const struct program_info coarse_program_info = {
+ .has_cbarriers = 1,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct coarse_descriptor_set_layout),
+ .workgroup_size_x = 128,
+ .workgroup_size_y = 1,
+ .workgroup_size_z = 1,
+ .begin = coarse_coroutine_begin,
+ .await = coarse_coroutine_await,
+ .destroy = coarse_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/coarse_abi.go b/vendor/gioui.org/shader/piet/coarse_abi.go
new file mode 100644
index 0000000..dfd977d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_abi.go
@@ -0,0 +1,35 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "coarse_abi.h"
+*/
+import "C"
+
+var CoarseProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.coarse_program_info))
+
+type CoarseDescriptorSetLayout = C.struct_coarse_descriptor_set_layout
+
+const CoarseHash = "e7ef250c08701490aed979a889cca73943b988bdb5e4ca4b02735aebcf5e5505"
+
+func (l *CoarseDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *CoarseDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
diff --git a/vendor/gioui.org/shader/piet/coarse_abi.h b/vendor/gioui.org/shader/piet/coarse_abi.h
new file mode 100644
index 0000000..24d874d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_abi.h
@@ -0,0 +1,17 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct coarse_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+};
+
+extern coroutine coarse_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool coarse_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void coarse_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info coarse_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/coarse_abi_nosupport.go b/vendor/gioui.org/shader/piet/coarse_abi_nosupport.go
new file mode 100644
index 0000000..00e2ad8
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_abi_nosupport.go
@@ -0,0 +1,22 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var CoarseProgramInfo *cpu.ProgramInfo
+
+type CoarseDescriptorSetLayout struct{}
+
+const CoarseHash = ""
+
+func (l *CoarseDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *CoarseDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/coarse_linux_amd64.syso b/vendor/gioui.org/shader/piet/coarse_linux_amd64.syso
new file mode 100644
index 0000000..1ac8407
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/coarse_linux_arm.syso b/vendor/gioui.org/shader/piet/coarse_linux_arm.syso
new file mode 100644
index 0000000..3f5ee88
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/coarse_linux_arm64.syso b/vendor/gioui.org/shader/piet/coarse_linux_arm64.syso
new file mode 100644
index 0000000..da3b563
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/coarse_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/elements.comp b/vendor/gioui.org/shader/piet/elements.comp
new file mode 100644
index 0000000..17ef1ee
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements.comp
@@ -0,0 +1,413 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// The element processing stage, first in the pipeline.
+//
+// This stage is primarily about applying transforms and computing bounding
+// boxes. It is organized as a scan over the input elements, producing
+// annotated output elements.
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+
+#include "mem.h"
+#include "setup.h"
+
+#define N_ROWS 4
+#define WG_SIZE 32
+#define LG_WG_SIZE 5
+#define PARTITION_SIZE (WG_SIZE * N_ROWS)
+
+layout(local_size_x = WG_SIZE, local_size_y = 1) in;
+
+layout(set = 0, binding = 1) readonly buffer ConfigBuf {
+ Config conf;
+};
+
+layout(set = 0, binding = 2) readonly buffer SceneBuf {
+ uint[] scene;
+};
+
+// It would be better to use the Vulkan memory model than
+// "volatile" but shooting for compatibility here rather
+// than doing things right.
+layout(set = 0, binding = 3) volatile buffer StateBuf {
+ uint part_counter;
+ uint[] state;
+};
+
+#include "scene.h"
+#include "state.h"
+#include "annotated.h"
+#include "pathseg.h"
+#include "tile.h"
+
+#define StateBuf_stride (4 + 2 * State_size)
+
+StateRef state_aggregate_ref(uint partition_ix) {
+ return StateRef(4 + partition_ix * StateBuf_stride);
+}
+
+StateRef state_prefix_ref(uint partition_ix) {
+ return StateRef(4 + partition_ix * StateBuf_stride + State_size);
+}
+
+uint state_flag_index(uint partition_ix) {
+ return partition_ix * (StateBuf_stride / 4);
+}
+
+// These correspond to X, A, P respectively in the prefix sum paper.
+#define FLAG_NOT_READY 0
+#define FLAG_AGGREGATE_READY 1
+#define FLAG_PREFIX_READY 2
+
+#define FLAG_SET_LINEWIDTH 1
+#define FLAG_SET_BBOX 2
+#define FLAG_RESET_BBOX 4
+#define FLAG_SET_FILL_MODE 8
+// Fill modes take up the next bit. Non-zero fill is 0, stroke is 1.
+#define LG_FILL_MODE 4
+#define FILL_MODE_BITS 1
+#define FILL_MODE_MASK (FILL_MODE_BITS << LG_FILL_MODE)
+
+// This is almost like a monoid (the interaction between transformation and
+// bounding boxes is approximate)
+State combine_state(State a, State b) {
+ State c;
+ c.bbox.x = min(a.mat.x * b.bbox.x, a.mat.x * b.bbox.z) + min(a.mat.z * b.bbox.y, a.mat.z * b.bbox.w) + a.translate.x;
+ c.bbox.y = min(a.mat.y * b.bbox.x, a.mat.y * b.bbox.z) + min(a.mat.w * b.bbox.y, a.mat.w * b.bbox.w) + a.translate.y;
+ c.bbox.z = max(a.mat.x * b.bbox.x, a.mat.x * b.bbox.z) + max(a.mat.z * b.bbox.y, a.mat.z * b.bbox.w) + a.translate.x;
+ c.bbox.w = max(a.mat.y * b.bbox.x, a.mat.y * b.bbox.z) + max(a.mat.w * b.bbox.y, a.mat.w * b.bbox.w) + a.translate.y;
+ if ((a.flags & FLAG_RESET_BBOX) == 0 && b.bbox.z <= b.bbox.x && b.bbox.w <= b.bbox.y) {
+ c.bbox = a.bbox;
+ } else if ((a.flags & FLAG_RESET_BBOX) == 0 && (b.flags & FLAG_SET_BBOX) == 0 &&
+ (a.bbox.z > a.bbox.x || a.bbox.w > a.bbox.y))
+ {
+ c.bbox.xy = min(a.bbox.xy, c.bbox.xy);
+ c.bbox.zw = max(a.bbox.zw, c.bbox.zw);
+ }
+ // It would be more concise to cast to matrix types; ah well.
+ c.mat.x = a.mat.x * b.mat.x + a.mat.z * b.mat.y;
+ c.mat.y = a.mat.y * b.mat.x + a.mat.w * b.mat.y;
+ c.mat.z = a.mat.x * b.mat.z + a.mat.z * b.mat.w;
+ c.mat.w = a.mat.y * b.mat.z + a.mat.w * b.mat.w;
+ c.translate.x = a.mat.x * b.translate.x + a.mat.z * b.translate.y + a.translate.x;
+ c.translate.y = a.mat.y * b.translate.x + a.mat.w * b.translate.y + a.translate.y;
+ c.linewidth = (b.flags & FLAG_SET_LINEWIDTH) == 0 ? a.linewidth : b.linewidth;
+ c.flags = (a.flags & (FLAG_SET_LINEWIDTH | FLAG_SET_BBOX | FLAG_SET_FILL_MODE)) | b.flags;
+ c.flags |= (a.flags & FLAG_RESET_BBOX) >> 1;
+ uint fill_mode = (b.flags & FLAG_SET_FILL_MODE) == 0 ? a.flags : b.flags;
+ fill_mode &= FILL_MODE_MASK;
+ c.flags = (c.flags & ~FILL_MODE_MASK) | fill_mode;
+ c.path_count = a.path_count + b.path_count;
+ c.pathseg_count = a.pathseg_count + b.pathseg_count;
+ c.trans_count = a.trans_count + b.trans_count;
+ return c;
+}
+
+State map_element(ElementRef ref) {
+ // TODO: it would *probably* be more efficient to make the memory read patterns less
+ // divergent, though it would be more wasted memory.
+ uint tag = Element_tag(ref).tag;
+ State c;
+ c.bbox = vec4(0.0, 0.0, 0.0, 0.0);
+ c.mat = vec4(1.0, 0.0, 0.0, 1.0);
+ c.translate = vec2(0.0, 0.0);
+ c.linewidth = 1.0; // TODO should be 0.0
+ c.flags = 0;
+ c.path_count = 0;
+ c.pathseg_count = 0;
+ c.trans_count = 0;
+ switch (tag) {
+ case Element_Line:
+ LineSeg line = Element_Line_read(ref);
+ c.bbox.xy = min(line.p0, line.p1);
+ c.bbox.zw = max(line.p0, line.p1);
+ c.pathseg_count = 1;
+ break;
+ case Element_Quad:
+ QuadSeg quad = Element_Quad_read(ref);
+ c.bbox.xy = min(min(quad.p0, quad.p1), quad.p2);
+ c.bbox.zw = max(max(quad.p0, quad.p1), quad.p2);
+ c.pathseg_count = 1;
+ break;
+ case Element_Cubic:
+ CubicSeg cubic = Element_Cubic_read(ref);
+ c.bbox.xy = min(min(cubic.p0, cubic.p1), min(cubic.p2, cubic.p3));
+ c.bbox.zw = max(max(cubic.p0, cubic.p1), max(cubic.p2, cubic.p3));
+ c.pathseg_count = 1;
+ break;
+ case Element_FillColor:
+ case Element_FillImage:
+ case Element_BeginClip:
+ c.flags = FLAG_RESET_BBOX;
+ c.path_count = 1;
+ break;
+ case Element_EndClip:
+ c.path_count = 1;
+ break;
+ case Element_SetLineWidth:
+ SetLineWidth lw = Element_SetLineWidth_read(ref);
+ c.linewidth = lw.width;
+ c.flags = FLAG_SET_LINEWIDTH;
+ break;
+ case Element_Transform:
+ Transform t = Element_Transform_read(ref);
+ c.mat = t.mat;
+ c.translate = t.translate;
+ c.trans_count = 1;
+ break;
+ case Element_SetFillMode:
+ SetFillMode fm = Element_SetFillMode_read(ref);
+ c.flags = FLAG_SET_FILL_MODE | (fm.fill_mode << LG_FILL_MODE);
+ break;
+ }
+ return c;
+}
+
+// Get the bounding box of a circle transformed by the matrix into an ellipse.
+vec2 get_linewidth(State st) {
+ // See https://www.iquilezles.org/www/articles/ellipses/ellipses.htm
+ return 0.5 * st.linewidth * vec2(length(st.mat.xz), length(st.mat.yw));
+}
+
+shared State sh_state[WG_SIZE];
+
+shared uint sh_part_ix;
+shared State sh_prefix;
+
+void main() {
+ State th_state[N_ROWS];
+ // Determine partition to process by atomic counter (described in Section
+ // 4.4 of prefix sum paper).
+ if (gl_LocalInvocationID.x == 0) {
+ sh_part_ix = atomicAdd(part_counter, 1);
+ }
+ barrier();
+ uint part_ix = sh_part_ix;
+
+ uint ix = part_ix * PARTITION_SIZE + gl_LocalInvocationID.x * N_ROWS;
+ ElementRef ref = ElementRef(ix * Element_size);
+
+ th_state[0] = map_element(ref);
+ for (uint i = 1; i < N_ROWS; i++) {
+ // discussion question: would it be faster to load using more coherent patterns
+ // into thread memory? This is kinda strided.
+ th_state[i] = combine_state(th_state[i - 1], map_element(Element_index(ref, i)));
+ }
+ State agg = th_state[N_ROWS - 1];
+ sh_state[gl_LocalInvocationID.x] = agg;
+ for (uint i = 0; i < LG_WG_SIZE; i++) {
+ barrier();
+ if (gl_LocalInvocationID.x >= (1 << i)) {
+ State other = sh_state[gl_LocalInvocationID.x - (1 << i)];
+ agg = combine_state(other, agg);
+ }
+ barrier();
+ sh_state[gl_LocalInvocationID.x] = agg;
+ }
+
+ State exclusive;
+ exclusive.bbox = vec4(0.0, 0.0, 0.0, 0.0);
+ exclusive.mat = vec4(1.0, 0.0, 0.0, 1.0);
+ exclusive.translate = vec2(0.0, 0.0);
+ exclusive.linewidth = 1.0; //TODO should be 0.0
+ exclusive.flags = 0;
+ exclusive.path_count = 0;
+ exclusive.pathseg_count = 0;
+ exclusive.trans_count = 0;
+
+ // Publish aggregate for this partition
+ if (gl_LocalInvocationID.x == WG_SIZE - 1) {
+ // Note: with memory model, we'd want to generate the atomic store version of this.
+ State_write(state_aggregate_ref(part_ix), agg);
+ }
+ memoryBarrierBuffer();
+ if (gl_LocalInvocationID.x == WG_SIZE - 1) {
+ uint flag = FLAG_AGGREGATE_READY;
+ if (part_ix == 0) {
+ State_write(state_prefix_ref(part_ix), agg);
+ flag = FLAG_PREFIX_READY;
+ }
+ state[state_flag_index(part_ix)] = flag;
+ if (part_ix != 0) {
+ // step 4 of paper: decoupled lookback
+ uint look_back_ix = part_ix - 1;
+
+ State their_agg;
+ uint their_ix = 0;
+ while (true) {
+ flag = state[state_flag_index(look_back_ix)];
+ if (flag == FLAG_PREFIX_READY) {
+ State their_prefix = State_read(state_prefix_ref(look_back_ix));
+ exclusive = combine_state(their_prefix, exclusive);
+ break;
+ } else if (flag == FLAG_AGGREGATE_READY) {
+ their_agg = State_read(state_aggregate_ref(look_back_ix));
+ exclusive = combine_state(their_agg, exclusive);
+ look_back_ix--;
+ their_ix = 0;
+ continue;
+ }
+ // else spin
+
+ // Unfortunately there's no guarantee of forward progress of other
+ // workgroups, so compute a bit of the aggregate before trying again.
+ // In the worst case, spinning stops when the aggregate is complete.
+ ElementRef ref = ElementRef((look_back_ix * PARTITION_SIZE + their_ix) * Element_size);
+ State s = map_element(ref);
+ if (their_ix == 0) {
+ their_agg = s;
+ } else {
+ their_agg = combine_state(their_agg, s);
+ }
+ their_ix++;
+ if (their_ix == PARTITION_SIZE) {
+ exclusive = combine_state(their_agg, exclusive);
+ if (look_back_ix == 0) {
+ break;
+ }
+ look_back_ix--;
+ their_ix = 0;
+ }
+ }
+
+ // step 5 of paper: compute inclusive prefix
+ State inclusive_prefix = combine_state(exclusive, agg);
+ sh_prefix = exclusive;
+ State_write(state_prefix_ref(part_ix), inclusive_prefix);
+ }
+ }
+ memoryBarrierBuffer();
+ if (gl_LocalInvocationID.x == WG_SIZE - 1 && part_ix != 0) {
+ state[state_flag_index(part_ix)] = FLAG_PREFIX_READY;
+ }
+ barrier();
+ if (part_ix != 0) {
+ exclusive = sh_prefix;
+ }
+
+ State row = exclusive;
+ if (gl_LocalInvocationID.x > 0) {
+ State other = sh_state[gl_LocalInvocationID.x - 1];
+ row = combine_state(row, other);
+ }
+ for (uint i = 0; i < N_ROWS; i++) {
+ State st = combine_state(row, th_state[i]);
+
+ // Here we read again from the original scene. There may be
+ // gains to be had from stashing in shared memory or possibly
+ // registers (though register pressure is an issue).
+ ElementRef this_ref = Element_index(ref, i);
+ ElementTag tag = Element_tag(this_ref);
+ uint fill_mode = fill_mode_from_flags(st.flags >> LG_FILL_MODE);
+ bool is_stroke = fill_mode == MODE_STROKE;
+ switch (tag.tag) {
+ case Element_Line:
+ LineSeg line = Element_Line_read(this_ref);
+ PathCubic path_cubic;
+ path_cubic.p0 = line.p0;
+ path_cubic.p1 = mix(line.p0, line.p1, 1.0 / 3.0);
+ path_cubic.p2 = mix(line.p1, line.p0, 1.0 / 3.0);
+ path_cubic.p3 = line.p1;
+ path_cubic.path_ix = st.path_count;
+ path_cubic.trans_ix = st.trans_count;
+ if (is_stroke) {
+ path_cubic.stroke = get_linewidth(st);
+ } else {
+ path_cubic.stroke = vec2(0.0);
+ }
+ PathSegRef path_out_ref = PathSegRef(conf.pathseg_alloc.offset + (st.pathseg_count - 1) * PathSeg_size);
+ PathSeg_Cubic_write(conf.pathseg_alloc, path_out_ref, fill_mode, path_cubic);
+ break;
+ case Element_Quad:
+ QuadSeg quad = Element_Quad_read(this_ref);
+ path_cubic.p0 = quad.p0;
+ path_cubic.p1 = mix(quad.p1, quad.p0, 1.0 / 3.0);
+ path_cubic.p2 = mix(quad.p1, quad.p2, 1.0 / 3.0);
+ path_cubic.p3 = quad.p2;
+ path_cubic.path_ix = st.path_count;
+ path_cubic.trans_ix = st.trans_count;
+ if (is_stroke) {
+ path_cubic.stroke = get_linewidth(st);
+ } else {
+ path_cubic.stroke = vec2(0.0);
+ }
+ path_out_ref = PathSegRef(conf.pathseg_alloc.offset + (st.pathseg_count - 1) * PathSeg_size);
+ PathSeg_Cubic_write(conf.pathseg_alloc, path_out_ref, fill_mode, path_cubic);
+ break;
+ case Element_Cubic:
+ CubicSeg cubic = Element_Cubic_read(this_ref);
+ path_cubic.p0 = cubic.p0;
+ path_cubic.p1 = cubic.p1;
+ path_cubic.p2 = cubic.p2;
+ path_cubic.p3 = cubic.p3;
+ path_cubic.path_ix = st.path_count;
+ path_cubic.trans_ix = st.trans_count;
+ if (is_stroke) {
+ path_cubic.stroke = get_linewidth(st);
+ } else {
+ path_cubic.stroke = vec2(0.0);
+ }
+ path_out_ref = PathSegRef(conf.pathseg_alloc.offset + (st.pathseg_count - 1) * PathSeg_size);
+ PathSeg_Cubic_write(conf.pathseg_alloc, path_out_ref, fill_mode, path_cubic);
+ break;
+ case Element_FillColor:
+ FillColor fill = Element_FillColor_read(this_ref);
+ AnnoColor anno_fill;
+ anno_fill.rgba_color = fill.rgba_color;
+ if (is_stroke) {
+ vec2 lw = get_linewidth(st);
+ anno_fill.bbox = st.bbox + vec4(-lw, lw);
+ anno_fill.linewidth = st.linewidth * sqrt(abs(st.mat.x * st.mat.w - st.mat.y * st.mat.z));
+ } else {
+ anno_fill.bbox = st.bbox;
+ anno_fill.linewidth = 0.0;
+ }
+ AnnotatedRef out_ref = AnnotatedRef(conf.anno_alloc.offset + (st.path_count - 1) * Annotated_size);
+ Annotated_Color_write(conf.anno_alloc, out_ref, fill_mode, anno_fill);
+ break;
+ case Element_FillImage:
+ FillImage fill_img = Element_FillImage_read(this_ref);
+ AnnoImage anno_img;
+ anno_img.index = fill_img.index;
+ anno_img.offset = fill_img.offset;
+ if (is_stroke) {
+ vec2 lw = get_linewidth(st);
+ anno_img.bbox = st.bbox + vec4(-lw, lw);
+ anno_img.linewidth = st.linewidth * sqrt(abs(st.mat.x * st.mat.w - st.mat.y * st.mat.z));
+ } else {
+ anno_img.bbox = st.bbox;
+ anno_img.linewidth = 0.0;
+ }
+ out_ref = AnnotatedRef(conf.anno_alloc.offset + (st.path_count - 1) * Annotated_size);
+ Annotated_Image_write(conf.anno_alloc, out_ref, fill_mode, anno_img);
+ break;
+ case Element_BeginClip:
+ Clip begin_clip = Element_BeginClip_read(this_ref);
+ AnnoBeginClip anno_begin_clip;
+ // This is the absolute bbox, it's been transformed during encoding.
+ anno_begin_clip.bbox = begin_clip.bbox;
+ if (is_stroke) {
+ vec2 lw = get_linewidth(st);
+ anno_begin_clip.linewidth = st.linewidth * sqrt(abs(st.mat.x * st.mat.w - st.mat.y * st.mat.z));
+ } else {
+ anno_fill.linewidth = 0.0;
+ }
+ out_ref = AnnotatedRef(conf.anno_alloc.offset + (st.path_count - 1) * Annotated_size);
+ Annotated_BeginClip_write(conf.anno_alloc, out_ref, fill_mode, anno_begin_clip);
+ break;
+ case Element_EndClip:
+ Clip end_clip = Element_EndClip_read(this_ref);
+ // This bbox is expected to be the same as the begin one.
+ AnnoEndClip anno_end_clip = AnnoEndClip(end_clip.bbox);
+ out_ref = AnnotatedRef(conf.anno_alloc.offset + (st.path_count - 1) * Annotated_size);
+ Annotated_EndClip_write(conf.anno_alloc, out_ref, anno_end_clip);
+ break;
+ case Element_Transform:
+ TransformSeg transform = TransformSeg(st.mat, st.translate);
+ TransformSegRef trans_ref = TransformSegRef(conf.trans_alloc.offset + (st.trans_count - 1) * TransformSeg_size);
+ TransformSeg_write(conf.trans_alloc, trans_ref, transform);
+ break;
+ }
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/elements_abi.c b/vendor/gioui.org/shader/piet/elements_abi.c
new file mode 100644
index 0000000..bacf32d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "elements_abi.h"
+
+const struct program_info elements_program_info = {
+ .has_cbarriers = 1,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct elements_descriptor_set_layout),
+ .workgroup_size_x = 32,
+ .workgroup_size_y = 1,
+ .workgroup_size_z = 1,
+ .begin = elements_coroutine_begin,
+ .await = elements_coroutine_await,
+ .destroy = elements_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/elements_abi.go b/vendor/gioui.org/shader/piet/elements_abi.go
new file mode 100644
index 0000000..a85eeca
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_abi.go
@@ -0,0 +1,43 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "elements_abi.h"
+*/
+import "C"
+
+var ElementsProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.elements_program_info))
+
+type ElementsDescriptorSetLayout = C.struct_elements_descriptor_set_layout
+
+const ElementsHash = "0f18de15866045b36217068789c9c8715a63e0f9f120c53ea2d4d76f53e443c3"
+
+func (l *ElementsDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *ElementsDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
+
+func (l *ElementsDescriptorSetLayout) Binding2() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding2))
+}
+
+func (l *ElementsDescriptorSetLayout) Binding3() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding3))
+}
diff --git a/vendor/gioui.org/shader/piet/elements_abi.h b/vendor/gioui.org/shader/piet/elements_abi.h
new file mode 100644
index 0000000..c455224
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_abi.h
@@ -0,0 +1,19 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct elements_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+ struct buffer_descriptor binding2;
+ struct buffer_descriptor binding3;
+};
+
+extern coroutine elements_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool elements_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void elements_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info elements_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/elements_abi_nosupport.go b/vendor/gioui.org/shader/piet/elements_abi_nosupport.go
new file mode 100644
index 0000000..8b30234
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_abi_nosupport.go
@@ -0,0 +1,30 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var ElementsProgramInfo *cpu.ProgramInfo
+
+type ElementsDescriptorSetLayout struct{}
+
+const ElementsHash = ""
+
+func (l *ElementsDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *ElementsDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *ElementsDescriptorSetLayout) Binding2() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *ElementsDescriptorSetLayout) Binding3() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/elements_linux_amd64.syso b/vendor/gioui.org/shader/piet/elements_linux_amd64.syso
new file mode 100644
index 0000000..bba953b
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/elements_linux_arm.syso b/vendor/gioui.org/shader/piet/elements_linux_arm.syso
new file mode 100644
index 0000000..1325ac8
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/elements_linux_arm64.syso b/vendor/gioui.org/shader/piet/elements_linux_arm64.syso
new file mode 100644
index 0000000..6855eb6
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/elements_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/gen.go b/vendor/gioui.org/shader/piet/gen.go
new file mode 100644
index 0000000..4b80e92
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/gen.go
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package piet
+
+//go:generate go run ../cmd/convertshaders -package piet -dir .
diff --git a/vendor/gioui.org/shader/piet/gencpu.sh b/vendor/gioui.org/shader/piet/gencpu.sh
new file mode 100644
index 0000000..d6f6f7d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/gencpu.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# SPDX-License-Identifier: Unlicense OR MIT
+
+set -e
+
+OBJCOPY_ARM64=$ANDROID_SDK_ROOT/ndk/21.3.6528147/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin/objcopy
+OBJCOPY_ARM=$ANDROID_SDK_ROOT/ndk/21.3.6528147/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/objcopy
+SWIFTSHADER=$HOME/.cache/swiftshader
+
+export CGO_ENABLED=1
+export GOARCH=386
+export VK_ICD_FILENAMES=$SWIFTSHADER/build.32bit/Linux/vk_swiftshader_icd.json
+
+export SWIFTSHADER_TRIPLE=armv7a-none-eabi
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer,2:image,3:image" kernel4.comp
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer" coarse.comp
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer" binning.comp
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer" backdrop.comp
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer" path_coarse.comp
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer" tile_alloc.comp
+go run gioui.org/cpu/cmd/compile -arch arm -objcopy $OBJCOPY_ARM -layout "0:buffer,1:buffer,2:buffer,3:buffer" elements.comp
+
+export GOARCH=amd64
+export VK_ICD_FILENAMES=$SWIFTSHADER/build.64bit/Linux/vk_swiftshader_icd.json
+export SWIFTSHADER_TRIPLE=x86_64-unknown-none-gnu
+
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer,2:image,3:image" kernel4.comp
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer" coarse.comp
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer" binning.comp
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer" backdrop.comp
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer" path_coarse.comp
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer" tile_alloc.comp
+go run gioui.org/cpu/cmd/compile -arch amd64 -layout "0:buffer,1:buffer,2:buffer,3:buffer" elements.comp
+
+export SWIFTSHADER_TRIPLE=aarch64-unknown-linux-gnu
+
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer,2:image,3:image" kernel4.comp
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer" coarse.comp
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer" binning.comp
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer" backdrop.comp
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer" path_coarse.comp
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer" tile_alloc.comp
+go run gioui.org/cpu/cmd/compile -arch arm64 -objcopy $OBJCOPY_ARM64 -layout "0:buffer,1:buffer,2:buffer,3:buffer" elements.comp
diff --git a/vendor/gioui.org/shader/piet/kernel4.comp b/vendor/gioui.org/shader/piet/kernel4.comp
new file mode 100644
index 0000000..3f8ef65
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4.comp
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// This is "kernel 4" in a 4-kernel pipeline. It renders the commands
+// in the per-tile command list to an image.
+
+// Right now, this kernel stores the image in a buffer, but a better
+// plan is to use a texture. This is because of limited support.
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+#ifdef ENABLE_IMAGE_INDICES
+#extension GL_EXT_nonuniform_qualifier : enable
+#endif
+
+#include "mem.h"
+#include "setup.h"
+
+#define CHUNK_X 2
+#define CHUNK_Y 4
+#define CHUNK CHUNK_X * CHUNK_Y
+#define CHUNK_DX (TILE_WIDTH_PX / CHUNK_X)
+#define CHUNK_DY (TILE_HEIGHT_PX / CHUNK_Y)
+layout(local_size_x = CHUNK_DX, local_size_y = CHUNK_DY) in;
+
+layout(set = 0, binding = 1) restrict readonly buffer ConfigBuf {
+ Config conf;
+};
+
+layout(rgba8, set = 0, binding = 2) uniform restrict writeonly image2D image;
+
+#ifdef ENABLE_IMAGE_INDICES
+layout(rgba8, set = 0, binding = 3) uniform restrict readonly image2D images[];
+#else
+layout(rgba8, set = 0, binding = 3) uniform restrict readonly image2D images;
+#endif
+
+#include "ptcl.h"
+#include "tile.h"
+
+mediump vec3 tosRGB(mediump vec3 rgb) {
+ bvec3 cutoff = greaterThanEqual(rgb, vec3(0.0031308));
+ mediump vec3 below = vec3(12.92)*rgb;
+ mediump vec3 above = vec3(1.055)*pow(rgb, vec3(0.41666)) - vec3(0.055);
+ return mix(below, above, cutoff);
+}
+
+mediump vec3 fromsRGB(mediump vec3 srgb) {
+ // Formula from EXT_sRGB.
+ bvec3 cutoff = greaterThanEqual(srgb, vec3(0.04045));
+ mediump vec3 below = srgb/vec3(12.92);
+ mediump vec3 above = pow((srgb + vec3(0.055))/vec3(1.055), vec3(2.4));
+ return mix(below, above, cutoff);
+}
+
+// unpacksRGB unpacks a color in the sRGB color space to a vec4 in the linear color
+// space.
+mediump vec4 unpacksRGB(uint srgba) {
+ mediump vec4 color = unpackUnorm4x8(srgba).wzyx;
+ return vec4(fromsRGB(color.rgb), color.a);
+}
+
+// packsRGB packs a color in the linear color space into its 8-bit sRGB equivalent.
+uint packsRGB(mediump vec4 rgba) {
+ rgba = vec4(tosRGB(rgba.rgb), rgba.a);
+ return packUnorm4x8(rgba.wzyx);
+}
+
+uvec2 chunk_offset(uint i) {
+ return uvec2(i % CHUNK_X * CHUNK_DX, i / CHUNK_X * CHUNK_DY);
+}
+
+mediump vec4[CHUNK] fillImage(uvec2 xy, CmdImage cmd_img) {
+ mediump vec4 rgba[CHUNK];
+ for (uint i = 0; i < CHUNK; i++) {
+ ivec2 uv = ivec2(xy + chunk_offset(i)) + cmd_img.offset;
+ mediump vec4 fg_rgba;
+#ifdef ENABLE_IMAGE_INDICES
+ fg_rgba = imageLoad(images[cmd_img.index], uv);
+#else
+ fg_rgba = imageLoad(images, uv);
+#endif
+ fg_rgba.rgb = fromsRGB(fg_rgba.rgb);
+ rgba[i] = fg_rgba;
+ }
+ return rgba;
+}
+
+void main() {
+ uint tile_ix = gl_WorkGroupID.y * conf.width_in_tiles + gl_WorkGroupID.x;
+ Alloc cmd_alloc = slice_mem(conf.ptcl_alloc, tile_ix * PTCL_INITIAL_ALLOC, PTCL_INITIAL_ALLOC);
+ CmdRef cmd_ref = CmdRef(cmd_alloc.offset);
+
+ // Read scrach space allocation, written first in the command list.
+ Alloc scratch_alloc = alloc_read(cmd_alloc, cmd_ref.offset);
+ cmd_ref.offset += Alloc_size;
+
+ uvec2 xy_uint = uvec2(gl_LocalInvocationID.x + TILE_WIDTH_PX * gl_WorkGroupID.x, gl_LocalInvocationID.y + TILE_HEIGHT_PX * gl_WorkGroupID.y);
+ vec2 xy = vec2(xy_uint);
+ mediump vec4 rgba[CHUNK];
+ for (uint i = 0; i < CHUNK; i++) {
+ rgba[i] = vec4(0.0);
+ // TODO: remove this debug image support when the actual image method is plumbed.
+#ifdef DEBUG_IMAGES
+#ifdef ENABLE_IMAGE_INDICES
+ if (xy_uint.x < 1024 && xy_uint.y < 1024) {
+ rgba[i] = imageLoad(images[gl_WorkGroupID.x / 64], ivec2(xy_uint + chunk_offset(i))/4);
+ }
+#else
+ if (xy_uint.x < 1024 && xy_uint.y < 1024) {
+ rgb[i] = imageLoad(images[0], ivec2(xy_uint + chunk_offset(i))/4).rgb;
+ }
+#endif
+#endif
+ }
+
+ mediump float area[CHUNK];
+ uint clip_depth = 0;
+ bool mem_ok = mem_error == NO_ERROR;
+ while (mem_ok) {
+ uint tag = Cmd_tag(cmd_alloc, cmd_ref).tag;
+ if (tag == Cmd_End) {
+ break;
+ }
+ switch (tag) {
+ case Cmd_Stroke:
+ // Calculate distance field from all the line segments in this tile.
+ CmdStroke stroke = Cmd_Stroke_read(cmd_alloc, cmd_ref);
+ mediump float df[CHUNK];
+ for (uint k = 0; k < CHUNK; k++) df[k] = 1e9;
+ TileSegRef tile_seg_ref = TileSegRef(stroke.tile_ref);
+ do {
+ TileSeg seg = TileSeg_read(new_alloc(tile_seg_ref.offset, TileSeg_size, mem_ok), tile_seg_ref);
+ vec2 line_vec = seg.vector;
+ for (uint k = 0; k < CHUNK; k++) {
+ vec2 dpos = xy + vec2(0.5, 0.5) - seg.origin;
+ dpos += vec2(chunk_offset(k));
+ float t = clamp(dot(line_vec, dpos) / dot(line_vec, line_vec), 0.0, 1.0);
+ df[k] = min(df[k], length(line_vec * t - dpos));
+ }
+ tile_seg_ref = seg.next;
+ } while (tile_seg_ref.offset != 0);
+ for (uint k = 0; k < CHUNK; k++) {
+ area[k] = clamp(stroke.half_width + 0.5 - df[k], 0.0, 1.0);
+ }
+ cmd_ref.offset += 4 + CmdStroke_size;
+ break;
+ case Cmd_Fill:
+ CmdFill fill = Cmd_Fill_read(cmd_alloc, cmd_ref);
+ for (uint k = 0; k < CHUNK; k++) area[k] = float(fill.backdrop);
+ tile_seg_ref = TileSegRef(fill.tile_ref);
+ // Calculate coverage based on backdrop + coverage of each line segment
+ do {
+ TileSeg seg = TileSeg_read(new_alloc(tile_seg_ref.offset, TileSeg_size, mem_ok), tile_seg_ref);
+ for (uint k = 0; k < CHUNK; k++) {
+ vec2 my_xy = xy + vec2(chunk_offset(k));
+ vec2 start = seg.origin - my_xy;
+ vec2 end = start + seg.vector;
+ vec2 window = clamp(vec2(start.y, end.y), 0.0, 1.0);
+ if (window.x != window.y) {
+ vec2 t = (window - start.y) / seg.vector.y;
+ vec2 xs = vec2(mix(start.x, end.x, t.x), mix(start.x, end.x, t.y));
+ float xmin = min(min(xs.x, xs.y), 1.0) - 1e-6;
+ float xmax = max(xs.x, xs.y);
+ float b = min(xmax, 1.0);
+ float c = max(b, 0.0);
+ float d = max(xmin, 0.0);
+ float a = (b + 0.5 * (d * d - c * c) - xmin) / (xmax - xmin);
+ area[k] += a * (window.x - window.y);
+ }
+ area[k] += sign(seg.vector.x) * clamp(my_xy.y - seg.y_edge + 1.0, 0.0, 1.0);
+ }
+ tile_seg_ref = seg.next;
+ } while (tile_seg_ref.offset != 0);
+ for (uint k = 0; k < CHUNK; k++) {
+ area[k] = min(abs(area[k]), 1.0);
+ }
+ cmd_ref.offset += 4 + CmdFill_size;
+ break;
+ case Cmd_Solid:
+ for (uint k = 0; k < CHUNK; k++) {
+ area[k] = 1.0;
+ }
+ cmd_ref.offset += 4;
+ break;
+ case Cmd_Alpha:
+ CmdAlpha alpha = Cmd_Alpha_read(cmd_alloc, cmd_ref);
+ for (uint k = 0; k < CHUNK; k++) {
+ area[k] = alpha.alpha;
+ }
+ cmd_ref.offset += 4 + CmdAlpha_size;
+ break;
+ case Cmd_Color:
+ CmdColor color = Cmd_Color_read(cmd_alloc, cmd_ref);
+ mediump vec4 fg = unpacksRGB(color.rgba_color);
+ for (uint k = 0; k < CHUNK; k++) {
+ mediump vec4 fg_k = fg * area[k];
+ rgba[k] = rgba[k] * (1.0 - fg_k.a) + fg_k;
+ }
+ cmd_ref.offset += 4 + CmdColor_size;
+ break;
+ case Cmd_Image:
+ CmdImage fill_img = Cmd_Image_read(cmd_alloc, cmd_ref);
+ mediump vec4 img[CHUNK] = fillImage(xy_uint, fill_img);
+ for (uint k = 0; k < CHUNK; k++) {
+ mediump vec4 fg_k = img[k] * area[k];
+ rgba[k] = rgba[k] * (1.0 - fg_k.a) + fg_k;
+ }
+ cmd_ref.offset += 4 + CmdImage_size;
+ break;
+ case Cmd_BeginClip:
+ uint base_ix = (scratch_alloc.offset >> 2) + CLIP_STATE_SIZE * (clip_depth * TILE_WIDTH_PX * TILE_HEIGHT_PX +
+ gl_LocalInvocationID.x + TILE_WIDTH_PX * gl_LocalInvocationID.y);
+ for (uint k = 0; k < CHUNK; k++) {
+ uvec2 offset = chunk_offset(k);
+ uint srgb = packsRGB(vec4(rgba[k]));
+ mediump float alpha = clamp(abs(area[k]), 0.0, 1.0);
+ write_mem(scratch_alloc, base_ix + 0 + CLIP_STATE_SIZE * (offset.x + offset.y * TILE_WIDTH_PX), srgb);
+ write_mem(scratch_alloc, base_ix + 1 + CLIP_STATE_SIZE * (offset.x + offset.y * TILE_WIDTH_PX), floatBitsToUint(alpha));
+ rgba[k] = vec4(0.0);
+ }
+ clip_depth++;
+ cmd_ref.offset += 4;
+ break;
+ case Cmd_EndClip:
+ clip_depth--;
+ base_ix = (scratch_alloc.offset >> 2) + CLIP_STATE_SIZE * (clip_depth * TILE_WIDTH_PX * TILE_HEIGHT_PX +
+ gl_LocalInvocationID.x + TILE_WIDTH_PX * gl_LocalInvocationID.y);
+ for (uint k = 0; k < CHUNK; k++) {
+ uvec2 offset = chunk_offset(k);
+ uint srgb = read_mem(scratch_alloc, base_ix + 0 + CLIP_STATE_SIZE * (offset.x + offset.y * TILE_WIDTH_PX));
+ uint alpha = read_mem(scratch_alloc, base_ix + 1 + CLIP_STATE_SIZE * (offset.x + offset.y * TILE_WIDTH_PX));
+ mediump vec4 bg = unpacksRGB(srgb);
+ mediump vec4 fg = rgba[k] * area[k] * uintBitsToFloat(alpha);
+ rgba[k] = bg * (1.0 - fg.a) + fg;
+ }
+ cmd_ref.offset += 4;
+ break;
+ case Cmd_Jump:
+ cmd_ref = CmdRef(Cmd_Jump_read(cmd_alloc, cmd_ref).new_ref);
+ cmd_alloc.offset = cmd_ref.offset;
+ break;
+ }
+ }
+
+ for (uint i = 0; i < CHUNK; i++) {
+ imageStore(image, ivec2(xy_uint + chunk_offset(i)), vec4(tosRGB(rgba[i].rgb), rgba[i].a));
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/kernel4_abi.c b/vendor/gioui.org/shader/piet/kernel4_abi.c
new file mode 100644
index 0000000..81c4ac4
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "kernel4_abi.h"
+
+const struct program_info kernel4_program_info = {
+ .has_cbarriers = 0,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct kernel4_descriptor_set_layout),
+ .workgroup_size_x = 16,
+ .workgroup_size_y = 8,
+ .workgroup_size_z = 1,
+ .begin = kernel4_coroutine_begin,
+ .await = kernel4_coroutine_await,
+ .destroy = kernel4_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/kernel4_abi.go b/vendor/gioui.org/shader/piet/kernel4_abi.go
new file mode 100644
index 0000000..9804647
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_abi.go
@@ -0,0 +1,43 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "kernel4_abi.h"
+*/
+import "C"
+
+var Kernel4ProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.kernel4_program_info))
+
+type Kernel4DescriptorSetLayout = C.struct_kernel4_descriptor_set_layout
+
+const Kernel4Hash = "88ae29cf53c1819fad9680e85faaee30fcc934d1a978a717695c966ef051bf1d"
+
+func (l *Kernel4DescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *Kernel4DescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
+
+func (l *Kernel4DescriptorSetLayout) Binding2() *cpu.ImageDescriptor {
+ return (*cpu.ImageDescriptor)(unsafe.Pointer(&l.binding2))
+}
+
+func (l *Kernel4DescriptorSetLayout) Binding3() *cpu.ImageDescriptor {
+ return (*cpu.ImageDescriptor)(unsafe.Pointer(&l.binding3))
+}
diff --git a/vendor/gioui.org/shader/piet/kernel4_abi.h b/vendor/gioui.org/shader/piet/kernel4_abi.h
new file mode 100644
index 0000000..0d3b4c9
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_abi.h
@@ -0,0 +1,19 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct kernel4_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+ struct image_descriptor binding2;
+ struct image_descriptor binding3;
+};
+
+extern coroutine kernel4_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool kernel4_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void kernel4_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info kernel4_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/kernel4_abi_nosupport.go b/vendor/gioui.org/shader/piet/kernel4_abi_nosupport.go
new file mode 100644
index 0000000..6cff47f
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_abi_nosupport.go
@@ -0,0 +1,30 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var Kernel4ProgramInfo *cpu.ProgramInfo
+
+type Kernel4DescriptorSetLayout struct{}
+
+const Kernel4Hash = ""
+
+func (l *Kernel4DescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *Kernel4DescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *Kernel4DescriptorSetLayout) Binding2() *cpu.ImageDescriptor {
+ panic("unsupported")
+}
+
+func (l *Kernel4DescriptorSetLayout) Binding3() *cpu.ImageDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/kernel4_linux_amd64.syso b/vendor/gioui.org/shader/piet/kernel4_linux_amd64.syso
new file mode 100644
index 0000000..bdf0e46
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/kernel4_linux_arm.syso b/vendor/gioui.org/shader/piet/kernel4_linux_arm.syso
new file mode 100644
index 0000000..6fab185
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/kernel4_linux_arm64.syso b/vendor/gioui.org/shader/piet/kernel4_linux_arm64.syso
new file mode 100644
index 0000000..b7994d7
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/kernel4_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/mem.h b/vendor/gioui.org/shader/piet/mem.h
new file mode 100644
index 0000000..9e81f04
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/mem.h
@@ -0,0 +1,147 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+layout(set = 0, binding = 0) buffer Memory {
+ // offset into memory of the next allocation, initialized by the user.
+ uint mem_offset;
+ // mem_error tracks the status of memory accesses, initialized to NO_ERROR
+ // by the user. ERR_MALLOC_FAILED is reported for insufficient memory.
+ // If MEM_DEBUG is defined the following errors are reported:
+ // - ERR_OUT_OF_BOUNDS is reported for out of bounds writes.
+ // - ERR_UNALIGNED_ACCESS for memory access not aligned to 32-bit words.
+ uint mem_error;
+ uint[] memory;
+};
+
+// Uncomment this line to add the size field to Alloc and enable memory checks.
+// Note that the Config struct in setup.h grows size fields as well.
+//#define MEM_DEBUG
+
+#define NO_ERROR 0
+#define ERR_MALLOC_FAILED 1
+#define ERR_OUT_OF_BOUNDS 2
+#define ERR_UNALIGNED_ACCESS 3
+
+#ifdef MEM_DEBUG
+#define Alloc_size 16
+#else
+#define Alloc_size 8
+#endif
+
+// Alloc represents a memory allocation.
+struct Alloc {
+ // offset in bytes into memory.
+ uint offset;
+#ifdef MEM_DEBUG
+ // size in bytes of the allocation.
+ uint size;
+#endif
+};
+
+struct MallocResult {
+ Alloc alloc;
+ // failed is true if the allocation overflowed memory.
+ bool failed;
+};
+
+// new_alloc synthesizes an Alloc from an offset and size.
+Alloc new_alloc(uint offset, uint size, bool mem_ok) {
+ Alloc a;
+ a.offset = offset;
+#ifdef MEM_DEBUG
+ if (mem_ok) {
+ a.size = size;
+ } else {
+ a.size = 0;
+ }
+#endif
+ return a;
+}
+
+// malloc allocates size bytes of memory.
+MallocResult malloc(uint size) {
+ MallocResult r;
+ uint offset = atomicAdd(mem_offset, size);
+ r.failed = offset + size > memory.length() * 4;
+ r.alloc = new_alloc(offset, size, !r.failed);
+ if (r.failed) {
+ atomicMax(mem_error, ERR_MALLOC_FAILED);
+ return r;
+ }
+#ifdef MEM_DEBUG
+ if ((size & 3) != 0) {
+ r.failed = true;
+ atomicMax(mem_error, ERR_UNALIGNED_ACCESS);
+ return r;
+ }
+#endif
+ return r;
+}
+
+// touch_mem checks whether access to the memory word at offset is valid.
+// If MEM_DEBUG is defined, touch_mem returns false if offset is out of bounds.
+// Offset is in words.
+bool touch_mem(Alloc alloc, uint offset) {
+#ifdef MEM_DEBUG
+ if (offset < alloc.offset/4 || offset >= (alloc.offset + alloc.size)/4) {
+ atomicMax(mem_error, ERR_OUT_OF_BOUNDS);
+ return false;
+ }
+#endif
+ return true;
+}
+
+// write_mem writes val to memory at offset.
+// Offset is in words.
+void write_mem(Alloc alloc, uint offset, uint val) {
+ if (!touch_mem(alloc, offset)) {
+ return;
+ }
+ memory[offset] = val;
+}
+
+// read_mem reads the value from memory at offset.
+// Offset is in words.
+uint read_mem(Alloc alloc, uint offset) {
+ if (!touch_mem(alloc, offset)) {
+ return 0;
+ }
+ uint v = memory[offset];
+ return v;
+}
+
+// slice_mem returns a sub-allocation inside another. Offset and size are in
+// bytes, relative to a.offset.
+Alloc slice_mem(Alloc a, uint offset, uint size) {
+#ifdef MEM_DEBUG
+ if ((offset & 3) != 0 || (size & 3) != 0) {
+ atomicMax(mem_error, ERR_UNALIGNED_ACCESS);
+ return Alloc(0, 0);
+ }
+ if (offset + size > a.size) {
+ // slice_mem is sometimes used for slices outside bounds,
+ // but never written.
+ return Alloc(0, 0);
+ }
+ return Alloc(a.offset + offset, size);
+#else
+ return Alloc(a.offset + offset);
+#endif
+}
+
+// alloc_write writes alloc to memory at offset bytes.
+void alloc_write(Alloc a, uint offset, Alloc alloc) {
+ write_mem(a, offset >> 2, alloc.offset);
+#ifdef MEM_DEBUG
+ write_mem(a, (offset >> 2) + 1, alloc.size);
+#endif
+}
+
+// alloc_read reads an Alloc from memory at offset bytes.
+Alloc alloc_read(Alloc a, uint offset) {
+ Alloc alloc;
+ alloc.offset = read_mem(a, offset >> 2);
+#ifdef MEM_DEBUG
+ alloc.size = read_mem(a, (offset >> 2) + 1);
+#endif
+ return alloc;
+}
diff --git a/vendor/gioui.org/shader/piet/path_coarse.comp b/vendor/gioui.org/shader/piet/path_coarse.comp
new file mode 100644
index 0000000..ea525f5
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse.comp
@@ -0,0 +1,294 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Coarse rasterization of path segments.
+
+// Allocation and initialization of tiles for paths.
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+
+#include "mem.h"
+#include "setup.h"
+
+#define LG_COARSE_WG 5
+#define COARSE_WG (1 << LG_COARSE_WG)
+
+layout(local_size_x = COARSE_WG, local_size_y = 1) in;
+
+layout(set = 0, binding = 1) readonly buffer ConfigBuf {
+ Config conf;
+};
+
+#include "pathseg.h"
+#include "tile.h"
+
+// scale factors useful for converting coordinates to tiles
+#define SX (1.0 / float(TILE_WIDTH_PX))
+#define SY (1.0 / float(TILE_HEIGHT_PX))
+
+#define ACCURACY 0.25
+#define Q_ACCURACY (ACCURACY * 0.1)
+#define REM_ACCURACY (ACCURACY - Q_ACCURACY)
+#define MAX_HYPOT2 (432.0 * Q_ACCURACY * Q_ACCURACY)
+#define MAX_QUADS 16
+
+vec2 eval_quad(vec2 p0, vec2 p1, vec2 p2, float t) {
+ float mt = 1.0 - t;
+ return p0 * (mt * mt) + (p1 * (mt * 2.0) + p2 * t) * t;
+}
+
+vec2 eval_cubic(vec2 p0, vec2 p1, vec2 p2, vec2 p3, float t) {
+ float mt = 1.0 - t;
+ return p0 * (mt * mt * mt) + (p1 * (mt * mt * 3.0) + (p2 * (mt * 3.0) + p3 * t) * t) * t;
+}
+
+struct SubdivResult {
+ float val;
+ float a0;
+ float a2;
+};
+
+/// An approximation to $\int (1 + 4x^2) ^ -0.25 dx$
+///
+/// This is used for flattening curves.
+#define D 0.67
+float approx_parabola_integral(float x) {
+ return x * inversesqrt(sqrt(1.0 - D + (D * D * D * D + 0.25 * x * x)));
+}
+
+/// An approximation to the inverse parabola integral.
+#define B 0.39
+float approx_parabola_inv_integral(float x) {
+ return x * sqrt(1.0 - B + (B * B + 0.25 * x * x));
+}
+
+SubdivResult estimate_subdiv(vec2 p0, vec2 p1, vec2 p2, float sqrt_tol) {
+ vec2 d01 = p1 - p0;
+ vec2 d12 = p2 - p1;
+ vec2 dd = d01 - d12;
+ float cross = (p2.x - p0.x) * dd.y - (p2.y - p0.y) * dd.x;
+ float x0 = (d01.x * dd.x + d01.y * dd.y) / cross;
+ float x2 = (d12.x * dd.x + d12.y * dd.y) / cross;
+ float scale = abs(cross / (length(dd) * (x2 - x0)));
+
+ float a0 = approx_parabola_integral(x0);
+ float a2 = approx_parabola_integral(x2);
+ float val = 0.0;
+ if (scale < 1e9) {
+ float da = abs(a2 - a0);
+ float sqrt_scale = sqrt(scale);
+ if (sign(x0) == sign(x2)) {
+ val = da * sqrt_scale;
+ } else {
+ float xmin = sqrt_tol / sqrt_scale;
+ val = sqrt_tol * da / approx_parabola_integral(xmin);
+ }
+ }
+ return SubdivResult(val, a0, a2);
+}
+
+void main() {
+ uint element_ix = gl_GlobalInvocationID.x;
+ PathSegRef ref = PathSegRef(conf.pathseg_alloc.offset + element_ix * PathSeg_size);
+
+ PathSegTag tag = PathSegTag(PathSeg_Nop, 0);
+ if (element_ix < conf.n_pathseg) {
+ tag = PathSeg_tag(conf.pathseg_alloc, ref);
+ }
+ bool mem_ok = mem_error == NO_ERROR;
+ switch (tag.tag) {
+ case PathSeg_Cubic:
+ PathCubic cubic = PathSeg_Cubic_read(conf.pathseg_alloc, ref);
+
+ uint trans_ix = cubic.trans_ix;
+ if (trans_ix > 0) {
+ TransformSegRef trans_ref = TransformSegRef(conf.trans_alloc.offset + (trans_ix - 1) * TransformSeg_size);
+ TransformSeg trans = TransformSeg_read(conf.trans_alloc, trans_ref);
+ cubic.p0 = trans.mat.xy * cubic.p0.x + trans.mat.zw * cubic.p0.y + trans.translate;
+ cubic.p1 = trans.mat.xy * cubic.p1.x + trans.mat.zw * cubic.p1.y + trans.translate;
+ cubic.p2 = trans.mat.xy * cubic.p2.x + trans.mat.zw * cubic.p2.y + trans.translate;
+ cubic.p3 = trans.mat.xy * cubic.p3.x + trans.mat.zw * cubic.p3.y + trans.translate;
+ }
+
+ vec2 err_v = 3.0 * (cubic.p2 - cubic.p1) + cubic.p0 - cubic.p3;
+ float err = err_v.x * err_v.x + err_v.y * err_v.y;
+ // The number of quadratics.
+ uint n_quads = max(uint(ceil(pow(err * (1.0 / MAX_HYPOT2), 1.0 / 6.0))), 1);
+ n_quads = min(n_quads, MAX_QUADS);
+ SubdivResult keep_params[MAX_QUADS];
+ // Iterate over quadratics and tote up the estimated number of segments.
+ float val = 0.0;
+ vec2 qp0 = cubic.p0;
+ float step = 1.0 / float(n_quads);
+ for (uint i = 0; i < n_quads; i++) {
+ float t = float(i + 1) * step;
+ vec2 qp2 = eval_cubic(cubic.p0, cubic.p1, cubic.p2, cubic.p3, t);
+ vec2 qp1 = eval_cubic(cubic.p0, cubic.p1, cubic.p2, cubic.p3, t - 0.5 * step);
+ qp1 = 2.0 * qp1 - 0.5 * (qp0 + qp2);
+ SubdivResult params = estimate_subdiv(qp0, qp1, qp2, sqrt(REM_ACCURACY));
+ keep_params[i] = params;
+ val += params.val;
+
+ qp0 = qp2;
+ }
+ uint n = max(uint(ceil(val * 0.5 / sqrt(REM_ACCURACY))), 1);
+
+ bool is_stroke = fill_mode_from_flags(tag.flags) == MODE_STROKE;
+ uint path_ix = cubic.path_ix;
+ Path path = Path_read(conf.tile_alloc, PathRef(conf.tile_alloc.offset + path_ix * Path_size));
+ Alloc path_alloc = new_alloc(path.tiles.offset, (path.bbox.z - path.bbox.x) * (path.bbox.w - path.bbox.y) * Tile_size, mem_ok);
+ ivec4 bbox = ivec4(path.bbox);
+ vec2 p0 = cubic.p0;
+ qp0 = cubic.p0;
+ float v_step = val / float(n);
+ int n_out = 1;
+ float val_sum = 0.0;
+ for (uint i = 0; i < n_quads; i++) {
+ float t = float(i + 1) * step;
+ vec2 qp2 = eval_cubic(cubic.p0, cubic.p1, cubic.p2, cubic.p3, t);
+ vec2 qp1 = eval_cubic(cubic.p0, cubic.p1, cubic.p2, cubic.p3, t - 0.5 * step);
+ qp1 = 2.0 * qp1 - 0.5 * (qp0 + qp2);
+ SubdivResult params = keep_params[i];
+ float u0 = approx_parabola_inv_integral(params.a0);
+ float u2 = approx_parabola_inv_integral(params.a2);
+ float uscale = 1.0 / (u2 - u0);
+ float target = float(n_out) * v_step;
+ while (n_out == n || target < val_sum + params.val) {
+ vec2 p1;
+ if (n_out == n) {
+ p1 = cubic.p3;
+ } else {
+ float u = (target - val_sum) / params.val;
+ float a = mix(params.a0, params.a2, u);
+ float au = approx_parabola_inv_integral(a);
+ float t = (au - u0) * uscale;
+ p1 = eval_quad(qp0, qp1, qp2, t);
+ }
+
+ // Output line segment
+
+ // Bounding box of element in pixel coordinates.
+ float xmin = min(p0.x, p1.x) - cubic.stroke.x;
+ float xmax = max(p0.x, p1.x) + cubic.stroke.x;
+ float ymin = min(p0.y, p1.y) - cubic.stroke.y;
+ float ymax = max(p0.y, p1.y) + cubic.stroke.y;
+ float dx = p1.x - p0.x;
+ float dy = p1.y - p0.y;
+ // Set up for per-scanline coverage formula, below.
+ float invslope = abs(dy) < 1e-9 ? 1e9 : dx / dy;
+ float c = (cubic.stroke.x + abs(invslope) * (0.5 * float(TILE_HEIGHT_PX) + cubic.stroke.y)) * SX;
+ float b = invslope; // Note: assumes square tiles, otherwise scale.
+ float a = (p0.x - (p0.y - 0.5 * float(TILE_HEIGHT_PX)) * b) * SX;
+
+ int x0 = int(floor(xmin * SX));
+ int x1 = int(floor(xmax * SX) + 1);
+ int y0 = int(floor(ymin * SY));
+ int y1 = int(floor(ymax * SY) + 1);
+
+ x0 = clamp(x0, bbox.x, bbox.z);
+ y0 = clamp(y0, bbox.y, bbox.w);
+ x1 = clamp(x1, bbox.x, bbox.z);
+ y1 = clamp(y1, bbox.y, bbox.w);
+ float xc = a + b * float(y0);
+ int stride = bbox.z - bbox.x;
+ int base = (y0 - bbox.y) * stride - bbox.x;
+ // TODO: can be tighter, use c to bound width
+ uint n_tile_alloc = uint((x1 - x0) * (y1 - y0));
+ // Consider using subgroups to aggregate atomic add.
+ MallocResult tile_alloc = malloc(n_tile_alloc * TileSeg_size);
+ if (tile_alloc.failed || !mem_ok) {
+ return;
+ }
+ uint tile_offset = tile_alloc.alloc.offset;
+
+ TileSeg tile_seg;
+
+ int xray = int(floor(p0.x*SX));
+ int last_xray = int(floor(p1.x*SX));
+ if (p0.y > p1.y) {
+ int tmp = xray;
+ xray = last_xray;
+ last_xray = tmp;
+ }
+ for (int y = y0; y < y1; y++) {
+ float tile_y0 = float(y * TILE_HEIGHT_PX);
+ int xbackdrop = max(xray + 1, bbox.x);
+ if (!is_stroke && min(p0.y, p1.y) < tile_y0 && xbackdrop < bbox.z) {
+ int backdrop = p1.y < p0.y ? 1 : -1;
+ TileRef tile_ref = Tile_index(path.tiles, uint(base + xbackdrop));
+ uint tile_el = tile_ref.offset >> 2;
+ if (touch_mem(path_alloc, tile_el + 1)) {
+ atomicAdd(memory[tile_el + 1], backdrop);
+ }
+ }
+
+ // next_xray is the xray for the next scanline; the line segment intersects
+ // all tiles between xray and next_xray.
+ int next_xray = last_xray;
+ if (y < y1 - 1) {
+ float tile_y1 = float((y + 1) * TILE_HEIGHT_PX);
+ float x_edge = mix(p0.x, p1.x, (tile_y1 - p0.y) / dy);
+ next_xray = int(floor(x_edge*SX));
+ }
+
+ int min_xray = min(xray, next_xray);
+ int max_xray = max(xray, next_xray);
+ int xx0 = min(int(floor(xc - c)), min_xray);
+ int xx1 = max(int(ceil(xc + c)), max_xray + 1);
+ xx0 = clamp(xx0, x0, x1);
+ xx1 = clamp(xx1, x0, x1);
+
+ for (int x = xx0; x < xx1; x++) {
+ float tile_x0 = float(x * TILE_WIDTH_PX);
+ TileRef tile_ref = Tile_index(TileRef(path.tiles.offset), uint(base + x));
+ uint tile_el = tile_ref.offset >> 2;
+ uint old = 0;
+ if (touch_mem(path_alloc, tile_el)) {
+ old = atomicExchange(memory[tile_el], tile_offset);
+ }
+ tile_seg.origin = p0;
+ tile_seg.vector = p1 - p0;
+ float y_edge = 0.0;
+ if (!is_stroke) {
+ y_edge = mix(p0.y, p1.y, (tile_x0 - p0.x) / dx);
+ if (min(p0.x, p1.x) < tile_x0) {
+ vec2 p = vec2(tile_x0, y_edge);
+ if (p0.x > p1.x) {
+ tile_seg.vector = p - p0;
+ } else {
+ tile_seg.origin = p;
+ tile_seg.vector = p1 - p;
+ }
+ // kernel4 uses sign(vector.x) for the sign of the intersection backdrop.
+ // Nudge zeroes towards the intended sign.
+ if (tile_seg.vector.x == 0) {
+ tile_seg.vector.x = sign(p1.x - p0.x)*1e-9;
+ }
+ }
+ if (x <= min_xray || max_xray < x) {
+ // Reject inconsistent intersections.
+ y_edge = 1e9;
+ }
+ }
+ tile_seg.y_edge = y_edge;
+ tile_seg.next.offset = old;
+ TileSeg_write(tile_alloc.alloc, TileSegRef(tile_offset), tile_seg);
+ tile_offset += TileSeg_size;
+ }
+ xc += b;
+ base += stride;
+ xray = next_xray;
+ }
+
+ n_out += 1;
+ target += v_step;
+ p0 = p1;
+ }
+ val_sum += params.val;
+
+ qp0 = qp2;
+ }
+
+ break;
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/path_coarse_abi.c b/vendor/gioui.org/shader/piet/path_coarse_abi.c
new file mode 100644
index 0000000..575d260
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "path_coarse_abi.h"
+
+const struct program_info path_coarse_program_info = {
+ .has_cbarriers = 0,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct path_coarse_descriptor_set_layout),
+ .workgroup_size_x = 32,
+ .workgroup_size_y = 1,
+ .workgroup_size_z = 1,
+ .begin = path_coarse_coroutine_begin,
+ .await = path_coarse_coroutine_await,
+ .destroy = path_coarse_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/path_coarse_abi.go b/vendor/gioui.org/shader/piet/path_coarse_abi.go
new file mode 100644
index 0000000..34d8ac3
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_abi.go
@@ -0,0 +1,35 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "path_coarse_abi.h"
+*/
+import "C"
+
+var Path_coarseProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.path_coarse_program_info))
+
+type Path_coarseDescriptorSetLayout = C.struct_path_coarse_descriptor_set_layout
+
+const Path_coarseHash = "ed67e14c880cf92bdd7a9d520610e8c8b139907ff8b55df20464d353a7f58e79"
+
+func (l *Path_coarseDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *Path_coarseDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
diff --git a/vendor/gioui.org/shader/piet/path_coarse_abi.h b/vendor/gioui.org/shader/piet/path_coarse_abi.h
new file mode 100644
index 0000000..9e43e8e
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_abi.h
@@ -0,0 +1,17 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct path_coarse_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+};
+
+extern coroutine path_coarse_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool path_coarse_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void path_coarse_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info path_coarse_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/path_coarse_abi_nosupport.go b/vendor/gioui.org/shader/piet/path_coarse_abi_nosupport.go
new file mode 100644
index 0000000..f67a16a
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_abi_nosupport.go
@@ -0,0 +1,22 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var Path_coarseProgramInfo *cpu.ProgramInfo
+
+type Path_coarseDescriptorSetLayout struct{}
+
+const Path_coarseHash = ""
+
+func (l *Path_coarseDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *Path_coarseDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/path_coarse_linux_amd64.syso b/vendor/gioui.org/shader/piet/path_coarse_linux_amd64.syso
new file mode 100644
index 0000000..a9f91d5
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/path_coarse_linux_arm.syso b/vendor/gioui.org/shader/piet/path_coarse_linux_arm.syso
new file mode 100644
index 0000000..2fcd6a0
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/path_coarse_linux_arm64.syso b/vendor/gioui.org/shader/piet/path_coarse_linux_arm64.syso
new file mode 100644
index 0000000..95f731a
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/path_coarse_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/pathseg.h b/vendor/gioui.org/shader/piet/pathseg.h
new file mode 100644
index 0000000..749771e
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/pathseg.h
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct PathCubicRef {
+ uint offset;
+};
+
+struct PathSegRef {
+ uint offset;
+};
+
+struct PathCubic {
+ vec2 p0;
+ vec2 p1;
+ vec2 p2;
+ vec2 p3;
+ uint path_ix;
+ uint trans_ix;
+ vec2 stroke;
+};
+
+#define PathCubic_size 48
+
+PathCubicRef PathCubic_index(PathCubicRef ref, uint index) {
+ return PathCubicRef(ref.offset + index * PathCubic_size);
+}
+
+#define PathSeg_Nop 0
+#define PathSeg_Cubic 1
+#define PathSeg_size 52
+
+PathSegRef PathSeg_index(PathSegRef ref, uint index) {
+ return PathSegRef(ref.offset + index * PathSeg_size);
+}
+
+struct PathSegTag {
+ uint tag;
+ uint flags;
+};
+
+PathCubic PathCubic_read(Alloc a, PathCubicRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ uint raw4 = read_mem(a, ix + 4);
+ uint raw5 = read_mem(a, ix + 5);
+ uint raw6 = read_mem(a, ix + 6);
+ uint raw7 = read_mem(a, ix + 7);
+ uint raw8 = read_mem(a, ix + 8);
+ uint raw9 = read_mem(a, ix + 9);
+ uint raw10 = read_mem(a, ix + 10);
+ uint raw11 = read_mem(a, ix + 11);
+ PathCubic s;
+ s.p0 = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
+ s.p1 = vec2(uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.p2 = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
+ s.p3 = vec2(uintBitsToFloat(raw6), uintBitsToFloat(raw7));
+ s.path_ix = raw8;
+ s.trans_ix = raw9;
+ s.stroke = vec2(uintBitsToFloat(raw10), uintBitsToFloat(raw11));
+ return s;
+}
+
+void PathCubic_write(Alloc a, PathCubicRef ref, PathCubic s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.p0.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.p0.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.p1.x));
+ write_mem(a, ix + 3, floatBitsToUint(s.p1.y));
+ write_mem(a, ix + 4, floatBitsToUint(s.p2.x));
+ write_mem(a, ix + 5, floatBitsToUint(s.p2.y));
+ write_mem(a, ix + 6, floatBitsToUint(s.p3.x));
+ write_mem(a, ix + 7, floatBitsToUint(s.p3.y));
+ write_mem(a, ix + 8, s.path_ix);
+ write_mem(a, ix + 9, s.trans_ix);
+ write_mem(a, ix + 10, floatBitsToUint(s.stroke.x));
+ write_mem(a, ix + 11, floatBitsToUint(s.stroke.y));
+}
+
+PathSegTag PathSeg_tag(Alloc a, PathSegRef ref) {
+ uint tag_and_flags = read_mem(a, ref.offset >> 2);
+ return PathSegTag(tag_and_flags & 0xffff, tag_and_flags >> 16);
+}
+
+PathCubic PathSeg_Cubic_read(Alloc a, PathSegRef ref) {
+ return PathCubic_read(a, PathCubicRef(ref.offset + 4));
+}
+
+void PathSeg_Nop_write(Alloc a, PathSegRef ref) {
+ write_mem(a, ref.offset >> 2, PathSeg_Nop);
+}
+
+void PathSeg_Cubic_write(Alloc a, PathSegRef ref, uint flags, PathCubic s) {
+ write_mem(a, ref.offset >> 2, (flags << 16) | PathSeg_Cubic);
+ PathCubic_write(a, PathCubicRef(ref.offset + 4), s);
+}
+
diff --git a/vendor/gioui.org/shader/piet/ptcl.h b/vendor/gioui.org/shader/piet/ptcl.h
new file mode 100644
index 0000000..6267fc5
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/ptcl.h
@@ -0,0 +1,278 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct CmdStrokeRef {
+ uint offset;
+};
+
+struct CmdFillRef {
+ uint offset;
+};
+
+struct CmdColorRef {
+ uint offset;
+};
+
+struct CmdImageRef {
+ uint offset;
+};
+
+struct CmdAlphaRef {
+ uint offset;
+};
+
+struct CmdJumpRef {
+ uint offset;
+};
+
+struct CmdRef {
+ uint offset;
+};
+
+struct CmdStroke {
+ uint tile_ref;
+ float half_width;
+};
+
+#define CmdStroke_size 8
+
+CmdStrokeRef CmdStroke_index(CmdStrokeRef ref, uint index) {
+ return CmdStrokeRef(ref.offset + index * CmdStroke_size);
+}
+
+struct CmdFill {
+ uint tile_ref;
+ int backdrop;
+};
+
+#define CmdFill_size 8
+
+CmdFillRef CmdFill_index(CmdFillRef ref, uint index) {
+ return CmdFillRef(ref.offset + index * CmdFill_size);
+}
+
+struct CmdColor {
+ uint rgba_color;
+};
+
+#define CmdColor_size 4
+
+CmdColorRef CmdColor_index(CmdColorRef ref, uint index) {
+ return CmdColorRef(ref.offset + index * CmdColor_size);
+}
+
+struct CmdImage {
+ uint index;
+ ivec2 offset;
+};
+
+#define CmdImage_size 8
+
+CmdImageRef CmdImage_index(CmdImageRef ref, uint index) {
+ return CmdImageRef(ref.offset + index * CmdImage_size);
+}
+
+struct CmdAlpha {
+ float alpha;
+};
+
+#define CmdAlpha_size 4
+
+CmdAlphaRef CmdAlpha_index(CmdAlphaRef ref, uint index) {
+ return CmdAlphaRef(ref.offset + index * CmdAlpha_size);
+}
+
+struct CmdJump {
+ uint new_ref;
+};
+
+#define CmdJump_size 4
+
+CmdJumpRef CmdJump_index(CmdJumpRef ref, uint index) {
+ return CmdJumpRef(ref.offset + index * CmdJump_size);
+}
+
+#define Cmd_End 0
+#define Cmd_Fill 1
+#define Cmd_Stroke 2
+#define Cmd_Solid 3
+#define Cmd_Alpha 4
+#define Cmd_Color 5
+#define Cmd_Image 6
+#define Cmd_BeginClip 7
+#define Cmd_EndClip 8
+#define Cmd_Jump 9
+#define Cmd_size 12
+
+CmdRef Cmd_index(CmdRef ref, uint index) {
+ return CmdRef(ref.offset + index * Cmd_size);
+}
+
+struct CmdTag {
+ uint tag;
+ uint flags;
+};
+
+CmdStroke CmdStroke_read(Alloc a, CmdStrokeRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ CmdStroke s;
+ s.tile_ref = raw0;
+ s.half_width = uintBitsToFloat(raw1);
+ return s;
+}
+
+void CmdStroke_write(Alloc a, CmdStrokeRef ref, CmdStroke s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.tile_ref);
+ write_mem(a, ix + 1, floatBitsToUint(s.half_width));
+}
+
+CmdFill CmdFill_read(Alloc a, CmdFillRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ CmdFill s;
+ s.tile_ref = raw0;
+ s.backdrop = int(raw1);
+ return s;
+}
+
+void CmdFill_write(Alloc a, CmdFillRef ref, CmdFill s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.tile_ref);
+ write_mem(a, ix + 1, uint(s.backdrop));
+}
+
+CmdColor CmdColor_read(Alloc a, CmdColorRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ CmdColor s;
+ s.rgba_color = raw0;
+ return s;
+}
+
+void CmdColor_write(Alloc a, CmdColorRef ref, CmdColor s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.rgba_color);
+}
+
+CmdImage CmdImage_read(Alloc a, CmdImageRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ CmdImage s;
+ s.index = raw0;
+ s.offset = ivec2(int(raw1 << 16) >> 16, int(raw1) >> 16);
+ return s;
+}
+
+void CmdImage_write(Alloc a, CmdImageRef ref, CmdImage s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.index);
+ write_mem(a, ix + 1, (uint(s.offset.x) & 0xffff) | (uint(s.offset.y) << 16));
+}
+
+CmdAlpha CmdAlpha_read(Alloc a, CmdAlphaRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ CmdAlpha s;
+ s.alpha = uintBitsToFloat(raw0);
+ return s;
+}
+
+void CmdAlpha_write(Alloc a, CmdAlphaRef ref, CmdAlpha s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.alpha));
+}
+
+CmdJump CmdJump_read(Alloc a, CmdJumpRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ CmdJump s;
+ s.new_ref = raw0;
+ return s;
+}
+
+void CmdJump_write(Alloc a, CmdJumpRef ref, CmdJump s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.new_ref);
+}
+
+CmdTag Cmd_tag(Alloc a, CmdRef ref) {
+ uint tag_and_flags = read_mem(a, ref.offset >> 2);
+ return CmdTag(tag_and_flags & 0xffff, tag_and_flags >> 16);
+}
+
+CmdFill Cmd_Fill_read(Alloc a, CmdRef ref) {
+ return CmdFill_read(a, CmdFillRef(ref.offset + 4));
+}
+
+CmdStroke Cmd_Stroke_read(Alloc a, CmdRef ref) {
+ return CmdStroke_read(a, CmdStrokeRef(ref.offset + 4));
+}
+
+CmdAlpha Cmd_Alpha_read(Alloc a, CmdRef ref) {
+ return CmdAlpha_read(a, CmdAlphaRef(ref.offset + 4));
+}
+
+CmdColor Cmd_Color_read(Alloc a, CmdRef ref) {
+ return CmdColor_read(a, CmdColorRef(ref.offset + 4));
+}
+
+CmdImage Cmd_Image_read(Alloc a, CmdRef ref) {
+ return CmdImage_read(a, CmdImageRef(ref.offset + 4));
+}
+
+CmdJump Cmd_Jump_read(Alloc a, CmdRef ref) {
+ return CmdJump_read(a, CmdJumpRef(ref.offset + 4));
+}
+
+void Cmd_End_write(Alloc a, CmdRef ref) {
+ write_mem(a, ref.offset >> 2, Cmd_End);
+}
+
+void Cmd_Fill_write(Alloc a, CmdRef ref, CmdFill s) {
+ write_mem(a, ref.offset >> 2, Cmd_Fill);
+ CmdFill_write(a, CmdFillRef(ref.offset + 4), s);
+}
+
+void Cmd_Stroke_write(Alloc a, CmdRef ref, CmdStroke s) {
+ write_mem(a, ref.offset >> 2, Cmd_Stroke);
+ CmdStroke_write(a, CmdStrokeRef(ref.offset + 4), s);
+}
+
+void Cmd_Solid_write(Alloc a, CmdRef ref) {
+ write_mem(a, ref.offset >> 2, Cmd_Solid);
+}
+
+void Cmd_Alpha_write(Alloc a, CmdRef ref, CmdAlpha s) {
+ write_mem(a, ref.offset >> 2, Cmd_Alpha);
+ CmdAlpha_write(a, CmdAlphaRef(ref.offset + 4), s);
+}
+
+void Cmd_Color_write(Alloc a, CmdRef ref, CmdColor s) {
+ write_mem(a, ref.offset >> 2, Cmd_Color);
+ CmdColor_write(a, CmdColorRef(ref.offset + 4), s);
+}
+
+void Cmd_Image_write(Alloc a, CmdRef ref, CmdImage s) {
+ write_mem(a, ref.offset >> 2, Cmd_Image);
+ CmdImage_write(a, CmdImageRef(ref.offset + 4), s);
+}
+
+void Cmd_BeginClip_write(Alloc a, CmdRef ref) {
+ write_mem(a, ref.offset >> 2, Cmd_BeginClip);
+}
+
+void Cmd_EndClip_write(Alloc a, CmdRef ref) {
+ write_mem(a, ref.offset >> 2, Cmd_EndClip);
+}
+
+void Cmd_Jump_write(Alloc a, CmdRef ref, CmdJump s) {
+ write_mem(a, ref.offset >> 2, Cmd_Jump);
+ CmdJump_write(a, CmdJumpRef(ref.offset + 4), s);
+}
+
diff --git a/vendor/gioui.org/shader/piet/runtime.h b/vendor/gioui.org/shader/piet/runtime.h
new file mode 100644
index 0000000..cfae912
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/runtime.h
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+#define ATTR_HIDDEN __attribute__ ((visibility ("hidden")))
+
+// program_info contains constant parameters for a program.
+struct program_info {
+ // MinMemorySize is the minimum size of memory passed to dispatch.
+ size_t min_memory_size;
+ // has_cbarriers is 1 when the program contains control barriers.
+ bool has_cbarriers;
+ // desc_set_size is the size of the first descriptor set for the program.
+ size_t desc_set_size;
+ int workgroup_size_x;
+ int workgroup_size_y;
+ int workgroup_size_z;
+ // Program entrypoints.
+ routine_begin begin;
+ routine_await await;
+ routine_destroy destroy;
+};
+
+// dispatch_context contains the information a program dispatch.
+struct dispatch_context;
+
+// thread_context contains the working memory of a batch. It may be
+// reused, but not concurrently.
+struct thread_context;
+
+extern struct buffer_descriptor alloc_buffer(size_t size) ATTR_HIDDEN;
+extern struct image_descriptor alloc_image_rgba(int width, int height) ATTR_HIDDEN;
+
+extern struct dispatch_context *alloc_dispatch_context(void) ATTR_HIDDEN;
+
+extern void free_dispatch_context(struct dispatch_context *c) ATTR_HIDDEN;
+
+extern struct thread_context *alloc_thread_context(void) ATTR_HIDDEN;
+
+extern void free_thread_context(struct thread_context *c) ATTR_HIDDEN;
+
+// prepare_dispatch initializes ctx to run a dispatch of a program distributed
+// among nthreads threads.
+extern void prepare_dispatch(struct dispatch_context *ctx, int nthreads, struct program_info *info, uint8_t *desc_set, int ngroupx, int ngroupy, int ngroupz) ATTR_HIDDEN;
+
+// dispatch_batch executes a dispatch batch.
+extern void dispatch_thread(struct dispatch_context *ctx, int thread_idx, struct thread_context *thread) ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/scene.h b/vendor/gioui.org/shader/piet/scene.h
new file mode 100644
index 0000000..38c2549
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/scene.h
@@ -0,0 +1,313 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct LineSegRef {
+ uint offset;
+};
+
+struct QuadSegRef {
+ uint offset;
+};
+
+struct CubicSegRef {
+ uint offset;
+};
+
+struct FillColorRef {
+ uint offset;
+};
+
+struct FillImageRef {
+ uint offset;
+};
+
+struct SetLineWidthRef {
+ uint offset;
+};
+
+struct TransformRef {
+ uint offset;
+};
+
+struct ClipRef {
+ uint offset;
+};
+
+struct SetFillModeRef {
+ uint offset;
+};
+
+struct ElementRef {
+ uint offset;
+};
+
+struct LineSeg {
+ vec2 p0;
+ vec2 p1;
+};
+
+#define LineSeg_size 16
+
+LineSegRef LineSeg_index(LineSegRef ref, uint index) {
+ return LineSegRef(ref.offset + index * LineSeg_size);
+}
+
+struct QuadSeg {
+ vec2 p0;
+ vec2 p1;
+ vec2 p2;
+};
+
+#define QuadSeg_size 24
+
+QuadSegRef QuadSeg_index(QuadSegRef ref, uint index) {
+ return QuadSegRef(ref.offset + index * QuadSeg_size);
+}
+
+struct CubicSeg {
+ vec2 p0;
+ vec2 p1;
+ vec2 p2;
+ vec2 p3;
+};
+
+#define CubicSeg_size 32
+
+CubicSegRef CubicSeg_index(CubicSegRef ref, uint index) {
+ return CubicSegRef(ref.offset + index * CubicSeg_size);
+}
+
+struct FillColor {
+ uint rgba_color;
+};
+
+#define FillColor_size 4
+
+FillColorRef FillColor_index(FillColorRef ref, uint index) {
+ return FillColorRef(ref.offset + index * FillColor_size);
+}
+
+struct FillImage {
+ uint index;
+ ivec2 offset;
+};
+
+#define FillImage_size 8
+
+FillImageRef FillImage_index(FillImageRef ref, uint index) {
+ return FillImageRef(ref.offset + index * FillImage_size);
+}
+
+struct SetLineWidth {
+ float width;
+};
+
+#define SetLineWidth_size 4
+
+SetLineWidthRef SetLineWidth_index(SetLineWidthRef ref, uint index) {
+ return SetLineWidthRef(ref.offset + index * SetLineWidth_size);
+}
+
+struct Transform {
+ vec4 mat;
+ vec2 translate;
+};
+
+#define Transform_size 24
+
+TransformRef Transform_index(TransformRef ref, uint index) {
+ return TransformRef(ref.offset + index * Transform_size);
+}
+
+struct Clip {
+ vec4 bbox;
+};
+
+#define Clip_size 16
+
+ClipRef Clip_index(ClipRef ref, uint index) {
+ return ClipRef(ref.offset + index * Clip_size);
+}
+
+struct SetFillMode {
+ uint fill_mode;
+};
+
+#define SetFillMode_size 4
+
+SetFillModeRef SetFillMode_index(SetFillModeRef ref, uint index) {
+ return SetFillModeRef(ref.offset + index * SetFillMode_size);
+}
+
+#define Element_Nop 0
+#define Element_Line 1
+#define Element_Quad 2
+#define Element_Cubic 3
+#define Element_FillColor 4
+#define Element_SetLineWidth 5
+#define Element_Transform 6
+#define Element_BeginClip 7
+#define Element_EndClip 8
+#define Element_FillImage 9
+#define Element_SetFillMode 10
+#define Element_size 36
+
+ElementRef Element_index(ElementRef ref, uint index) {
+ return ElementRef(ref.offset + index * Element_size);
+}
+
+struct ElementTag {
+ uint tag;
+ uint flags;
+};
+
+LineSeg LineSeg_read(LineSegRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ uint raw1 = scene[ix + 1];
+ uint raw2 = scene[ix + 2];
+ uint raw3 = scene[ix + 3];
+ LineSeg s;
+ s.p0 = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
+ s.p1 = vec2(uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ return s;
+}
+
+QuadSeg QuadSeg_read(QuadSegRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ uint raw1 = scene[ix + 1];
+ uint raw2 = scene[ix + 2];
+ uint raw3 = scene[ix + 3];
+ uint raw4 = scene[ix + 4];
+ uint raw5 = scene[ix + 5];
+ QuadSeg s;
+ s.p0 = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
+ s.p1 = vec2(uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.p2 = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
+ return s;
+}
+
+CubicSeg CubicSeg_read(CubicSegRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ uint raw1 = scene[ix + 1];
+ uint raw2 = scene[ix + 2];
+ uint raw3 = scene[ix + 3];
+ uint raw4 = scene[ix + 4];
+ uint raw5 = scene[ix + 5];
+ uint raw6 = scene[ix + 6];
+ uint raw7 = scene[ix + 7];
+ CubicSeg s;
+ s.p0 = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
+ s.p1 = vec2(uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.p2 = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
+ s.p3 = vec2(uintBitsToFloat(raw6), uintBitsToFloat(raw7));
+ return s;
+}
+
+FillColor FillColor_read(FillColorRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ FillColor s;
+ s.rgba_color = raw0;
+ return s;
+}
+
+FillImage FillImage_read(FillImageRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ uint raw1 = scene[ix + 1];
+ FillImage s;
+ s.index = raw0;
+ s.offset = ivec2(int(raw1 << 16) >> 16, int(raw1) >> 16);
+ return s;
+}
+
+SetLineWidth SetLineWidth_read(SetLineWidthRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ SetLineWidth s;
+ s.width = uintBitsToFloat(raw0);
+ return s;
+}
+
+Transform Transform_read(TransformRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ uint raw1 = scene[ix + 1];
+ uint raw2 = scene[ix + 2];
+ uint raw3 = scene[ix + 3];
+ uint raw4 = scene[ix + 4];
+ uint raw5 = scene[ix + 5];
+ Transform s;
+ s.mat = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.translate = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
+ return s;
+}
+
+Clip Clip_read(ClipRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ uint raw1 = scene[ix + 1];
+ uint raw2 = scene[ix + 2];
+ uint raw3 = scene[ix + 3];
+ Clip s;
+ s.bbox = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ return s;
+}
+
+SetFillMode SetFillMode_read(SetFillModeRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = scene[ix + 0];
+ SetFillMode s;
+ s.fill_mode = raw0;
+ return s;
+}
+
+ElementTag Element_tag(ElementRef ref) {
+ uint tag_and_flags = scene[ref.offset >> 2];
+ return ElementTag(tag_and_flags & 0xffff, tag_and_flags >> 16);
+}
+
+LineSeg Element_Line_read(ElementRef ref) {
+ return LineSeg_read(LineSegRef(ref.offset + 4));
+}
+
+QuadSeg Element_Quad_read(ElementRef ref) {
+ return QuadSeg_read(QuadSegRef(ref.offset + 4));
+}
+
+CubicSeg Element_Cubic_read(ElementRef ref) {
+ return CubicSeg_read(CubicSegRef(ref.offset + 4));
+}
+
+FillColor Element_FillColor_read(ElementRef ref) {
+ return FillColor_read(FillColorRef(ref.offset + 4));
+}
+
+SetLineWidth Element_SetLineWidth_read(ElementRef ref) {
+ return SetLineWidth_read(SetLineWidthRef(ref.offset + 4));
+}
+
+Transform Element_Transform_read(ElementRef ref) {
+ return Transform_read(TransformRef(ref.offset + 4));
+}
+
+Clip Element_BeginClip_read(ElementRef ref) {
+ return Clip_read(ClipRef(ref.offset + 4));
+}
+
+Clip Element_EndClip_read(ElementRef ref) {
+ return Clip_read(ClipRef(ref.offset + 4));
+}
+
+FillImage Element_FillImage_read(ElementRef ref) {
+ return FillImage_read(FillImageRef(ref.offset + 4));
+}
+
+SetFillMode Element_SetFillMode_read(ElementRef ref) {
+ return SetFillMode_read(SetFillModeRef(ref.offset + 4));
+}
+
diff --git a/vendor/gioui.org/shader/piet/setup.h b/vendor/gioui.org/shader/piet/setup.h
new file mode 100644
index 0000000..83b6d1d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/setup.h
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Various constants for the sizes of groups and tiles.
+
+// Much of this will be made dynamic in various ways, but for now it's easiest
+// to hardcode and keep all in one place.
+
+// A LG_WG_FACTOR of n scales workgroup sizes by 2^n. Use 0 for a
+// maximum workgroup size of 128, or 1 for a maximum size of 256.
+#define LG_WG_FACTOR 0
+#define WG_FACTOR (1<<LG_WG_FACTOR)
+
+#define TILE_WIDTH_PX 32
+#define TILE_HEIGHT_PX 32
+
+#define PTCL_INITIAL_ALLOC 1024
+
+// These should probably be renamed and/or reworked. In the binning
+// kernel, they represent the number of bins. Also, the workgroup size
+// of that kernel is equal to the number of bins, but should probably
+// be more flexible (it's 512 in the K&L paper).
+#define N_TILE_X 16
+#define N_TILE_Y (8 * WG_FACTOR)
+#define N_TILE (N_TILE_X * N_TILE_Y)
+#define LG_N_TILE (7 + LG_WG_FACTOR)
+#define N_SLICE (N_TILE / 32)
+
+struct Config {
+ uint n_elements; // paths
+ uint n_pathseg;
+ uint width_in_tiles;
+ uint height_in_tiles;
+ Alloc tile_alloc;
+ Alloc bin_alloc;
+ Alloc ptcl_alloc;
+ Alloc pathseg_alloc;
+ Alloc anno_alloc;
+ Alloc trans_alloc;
+};
+
+// Fill modes.
+#define MODE_NONZERO 0
+#define MODE_STROKE 1
+
+// Size of kernel4 clip state, in words.
+#define CLIP_STATE_SIZE 2
+
+// fill_mode_from_flags extracts the fill mode from tag flags.
+uint fill_mode_from_flags(uint flags) {
+ return flags & 0x1;
+}
diff --git a/vendor/gioui.org/shader/piet/shaders.go b/vendor/gioui.org/shader/piet/shaders.go
new file mode 100644
index 0000000..b4b6996
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/shaders.go
@@ -0,0 +1,268 @@
+// Code generated by build.go. DO NOT EDIT.
+
+package piet
+
+import (
+ _ "embed"
+ "runtime"
+
+ "gioui.org/shader"
+)
+
+var (
+ Shader_backdrop_comp = shader.Sources{
+ Name: "backdrop.comp",
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{128, 1, 1},
+ }
+ //go:embed zbackdrop.comp.0.spirv
+ zbackdrop_comp_0_spirv string
+ //go:embed zbackdrop.comp.0.dxbc
+ zbackdrop_comp_0_dxbc string
+ //go:embed zbackdrop.comp.0.metallibmacos
+ zbackdrop_comp_0_metallibmacos string
+ //go:embed zbackdrop.comp.0.metallibios
+ zbackdrop_comp_0_metallibios string
+ //go:embed zbackdrop.comp.0.metallibiossimulator
+ zbackdrop_comp_0_metallibiossimulator string
+ Shader_binning_comp = shader.Sources{
+ Name: "binning.comp",
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{128, 1, 1},
+ }
+ //go:embed zbinning.comp.0.spirv
+ zbinning_comp_0_spirv string
+ //go:embed zbinning.comp.0.dxbc
+ zbinning_comp_0_dxbc string
+ //go:embed zbinning.comp.0.metallibmacos
+ zbinning_comp_0_metallibmacos string
+ //go:embed zbinning.comp.0.metallibios
+ zbinning_comp_0_metallibios string
+ //go:embed zbinning.comp.0.metallibiossimulator
+ zbinning_comp_0_metallibiossimulator string
+ Shader_coarse_comp = shader.Sources{
+ Name: "coarse.comp",
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{128, 1, 1},
+ }
+ //go:embed zcoarse.comp.0.spirv
+ zcoarse_comp_0_spirv string
+ //go:embed zcoarse.comp.0.dxbc
+ zcoarse_comp_0_dxbc string
+ //go:embed zcoarse.comp.0.metallibmacos
+ zcoarse_comp_0_metallibmacos string
+ //go:embed zcoarse.comp.0.metallibios
+ zcoarse_comp_0_metallibios string
+ //go:embed zcoarse.comp.0.metallibiossimulator
+ zcoarse_comp_0_metallibiossimulator string
+ Shader_elements_comp = shader.Sources{
+ Name: "elements.comp",
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "SceneBuf", Binding: 2}, {Name: "StateBuf", Binding: 3}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{32, 1, 1},
+ }
+ //go:embed zelements.comp.0.spirv
+ zelements_comp_0_spirv string
+ //go:embed zelements.comp.0.dxbc
+ zelements_comp_0_dxbc string
+ //go:embed zelements.comp.0.metallibmacos
+ zelements_comp_0_metallibmacos string
+ //go:embed zelements.comp.0.metallibios
+ zelements_comp_0_metallibios string
+ //go:embed zelements.comp.0.metallibiossimulator
+ zelements_comp_0_metallibiossimulator string
+ Shader_kernel4_comp = shader.Sources{
+ Name: "kernel4.comp",
+ Images: []shader.ImageBinding{{Name: "images", Binding: 3}, {Name: "image", Binding: 2}},
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{16, 8, 1},
+ }
+ //go:embed zkernel4.comp.0.spirv
+ zkernel4_comp_0_spirv string
+ //go:embed zkernel4.comp.0.dxbc
+ zkernel4_comp_0_dxbc string
+ //go:embed zkernel4.comp.0.metallibmacos
+ zkernel4_comp_0_metallibmacos string
+ //go:embed zkernel4.comp.0.metallibios
+ zkernel4_comp_0_metallibios string
+ //go:embed zkernel4.comp.0.metallibiossimulator
+ zkernel4_comp_0_metallibiossimulator string
+ Shader_path_coarse_comp = shader.Sources{
+ Name: "path_coarse.comp",
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{32, 1, 1},
+ }
+ //go:embed zpath_coarse.comp.0.spirv
+ zpath_coarse_comp_0_spirv string
+ //go:embed zpath_coarse.comp.0.dxbc
+ zpath_coarse_comp_0_dxbc string
+ //go:embed zpath_coarse.comp.0.metallibmacos
+ zpath_coarse_comp_0_metallibmacos string
+ //go:embed zpath_coarse.comp.0.metallibios
+ zpath_coarse_comp_0_metallibios string
+ //go:embed zpath_coarse.comp.0.metallibiossimulator
+ zpath_coarse_comp_0_metallibiossimulator string
+ Shader_tile_alloc_comp = shader.Sources{
+ Name: "tile_alloc.comp",
+ StorageBuffers: []shader.BufferBinding{{Name: "Memory", Binding: 0}, {Name: "ConfigBuf", Binding: 1}},
+ WorkgroupSize: [3]int{128, 1, 1},
+ }
+ //go:embed ztile_alloc.comp.0.spirv
+ ztile_alloc_comp_0_spirv string
+ //go:embed ztile_alloc.comp.0.dxbc
+ ztile_alloc_comp_0_dxbc string
+ //go:embed ztile_alloc.comp.0.metallibmacos
+ ztile_alloc_comp_0_metallibmacos string
+ //go:embed ztile_alloc.comp.0.metallibios
+ ztile_alloc_comp_0_metallibios string
+ //go:embed ztile_alloc.comp.0.metallibiossimulator
+ ztile_alloc_comp_0_metallibiossimulator string
+)
+
+func init() {
+ const (
+ opengles = runtime.GOOS == "linux" || runtime.GOOS == "freebsd" || runtime.GOOS == "openbsd" || runtime.GOOS == "windows" || runtime.GOOS == "js" || runtime.GOOS == "android" || runtime.GOOS == "darwin" || runtime.GOOS == "ios"
+ opengl = runtime.GOOS == "darwin"
+ d3d11 = runtime.GOOS == "windows"
+ vulkan = runtime.GOOS == "linux" || runtime.GOOS == "android"
+ )
+ if vulkan {
+ Shader_backdrop_comp.SPIRV = zbackdrop_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_backdrop_comp.DXBC = zbackdrop_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_backdrop_comp.MetalLib = zbackdrop_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_backdrop_comp.MetalLib = zbackdrop_comp_0_metallibiossimulator
+ } else {
+ Shader_backdrop_comp.MetalLib = zbackdrop_comp_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_binning_comp.SPIRV = zbinning_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_binning_comp.DXBC = zbinning_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_binning_comp.MetalLib = zbinning_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_binning_comp.MetalLib = zbinning_comp_0_metallibiossimulator
+ } else {
+ Shader_binning_comp.MetalLib = zbinning_comp_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_coarse_comp.SPIRV = zcoarse_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_coarse_comp.DXBC = zcoarse_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_coarse_comp.MetalLib = zcoarse_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_coarse_comp.MetalLib = zcoarse_comp_0_metallibiossimulator
+ } else {
+ Shader_coarse_comp.MetalLib = zcoarse_comp_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_elements_comp.SPIRV = zelements_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_elements_comp.DXBC = zelements_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_elements_comp.MetalLib = zelements_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_elements_comp.MetalLib = zelements_comp_0_metallibiossimulator
+ } else {
+ Shader_elements_comp.MetalLib = zelements_comp_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_kernel4_comp.SPIRV = zkernel4_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_kernel4_comp.DXBC = zkernel4_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_kernel4_comp.MetalLib = zkernel4_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_kernel4_comp.MetalLib = zkernel4_comp_0_metallibiossimulator
+ } else {
+ Shader_kernel4_comp.MetalLib = zkernel4_comp_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_path_coarse_comp.SPIRV = zpath_coarse_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_path_coarse_comp.DXBC = zpath_coarse_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_path_coarse_comp.MetalLib = zpath_coarse_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_path_coarse_comp.MetalLib = zpath_coarse_comp_0_metallibiossimulator
+ } else {
+ Shader_path_coarse_comp.MetalLib = zpath_coarse_comp_0_metallibios
+ }
+ }
+ if vulkan {
+ Shader_tile_alloc_comp.SPIRV = ztile_alloc_comp_0_spirv
+ }
+ if opengles {
+ }
+ if opengl {
+ }
+ if d3d11 {
+ Shader_tile_alloc_comp.DXBC = ztile_alloc_comp_0_dxbc
+ }
+ if runtime.GOOS == "darwin" {
+ Shader_tile_alloc_comp.MetalLib = ztile_alloc_comp_0_metallibmacos
+ }
+ if runtime.GOOS == "ios" {
+ if runtime.GOARCH == "amd64" {
+ Shader_tile_alloc_comp.MetalLib = ztile_alloc_comp_0_metallibiossimulator
+ } else {
+ Shader_tile_alloc_comp.MetalLib = ztile_alloc_comp_0_metallibios
+ }
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/state.h b/vendor/gioui.org/shader/piet/state.h
new file mode 100644
index 0000000..d2df804
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/state.h
@@ -0,0 +1,73 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct StateRef {
+ uint offset;
+};
+
+struct State {
+ vec4 mat;
+ vec2 translate;
+ vec4 bbox;
+ float linewidth;
+ uint flags;
+ uint path_count;
+ uint pathseg_count;
+ uint trans_count;
+};
+
+#define State_size 60
+
+StateRef State_index(StateRef ref, uint index) {
+ return StateRef(ref.offset + index * State_size);
+}
+
+State State_read(StateRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = state[ix + 0];
+ uint raw1 = state[ix + 1];
+ uint raw2 = state[ix + 2];
+ uint raw3 = state[ix + 3];
+ uint raw4 = state[ix + 4];
+ uint raw5 = state[ix + 5];
+ uint raw6 = state[ix + 6];
+ uint raw7 = state[ix + 7];
+ uint raw8 = state[ix + 8];
+ uint raw9 = state[ix + 9];
+ uint raw10 = state[ix + 10];
+ uint raw11 = state[ix + 11];
+ uint raw12 = state[ix + 12];
+ uint raw13 = state[ix + 13];
+ uint raw14 = state[ix + 14];
+ State s;
+ s.mat = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.translate = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
+ s.bbox = vec4(uintBitsToFloat(raw6), uintBitsToFloat(raw7), uintBitsToFloat(raw8), uintBitsToFloat(raw9));
+ s.linewidth = uintBitsToFloat(raw10);
+ s.flags = raw11;
+ s.path_count = raw12;
+ s.pathseg_count = raw13;
+ s.trans_count = raw14;
+ return s;
+}
+
+void State_write(StateRef ref, State s) {
+ uint ix = ref.offset >> 2;
+ state[ix + 0] = floatBitsToUint(s.mat.x);
+ state[ix + 1] = floatBitsToUint(s.mat.y);
+ state[ix + 2] = floatBitsToUint(s.mat.z);
+ state[ix + 3] = floatBitsToUint(s.mat.w);
+ state[ix + 4] = floatBitsToUint(s.translate.x);
+ state[ix + 5] = floatBitsToUint(s.translate.y);
+ state[ix + 6] = floatBitsToUint(s.bbox.x);
+ state[ix + 7] = floatBitsToUint(s.bbox.y);
+ state[ix + 8] = floatBitsToUint(s.bbox.z);
+ state[ix + 9] = floatBitsToUint(s.bbox.w);
+ state[ix + 10] = floatBitsToUint(s.linewidth);
+ state[ix + 11] = s.flags;
+ state[ix + 12] = s.path_count;
+ state[ix + 13] = s.pathseg_count;
+ state[ix + 14] = s.trans_count;
+}
+
diff --git a/vendor/gioui.org/shader/piet/support.c b/vendor/gioui.org/shader/piet/support.c
new file mode 100644
index 0000000..1b7dd42
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/support.c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "abi.h"
+#include "runtime.h"
+
+static void *malloc_align(size_t alignment, size_t size) {
+ void *ptr;
+ int ret = posix_memalign(&ptr, alignment, size);
+ assert(ret == 0);
+ return ptr;
+}
+
+ATTR_HIDDEN void *coroutine_alloc_frame(size_t size) {
+ void *ptr = malloc_align(16, size);
+ return ptr;
+}
+
+ATTR_HIDDEN void coroutine_free_frame(void *ptr) {
+ free(ptr);
+}
diff --git a/vendor/gioui.org/shader/piet/tile.h b/vendor/gioui.org/shader/piet/tile.h
new file mode 100644
index 0000000..e11329c
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile.h
@@ -0,0 +1,150 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Code auto-generated by piet-gpu-derive
+
+struct PathRef {
+ uint offset;
+};
+
+struct TileRef {
+ uint offset;
+};
+
+struct TileSegRef {
+ uint offset;
+};
+
+struct TransformSegRef {
+ uint offset;
+};
+
+struct Path {
+ uvec4 bbox;
+ TileRef tiles;
+};
+
+#define Path_size 12
+
+PathRef Path_index(PathRef ref, uint index) {
+ return PathRef(ref.offset + index * Path_size);
+}
+
+struct Tile {
+ TileSegRef tile;
+ int backdrop;
+};
+
+#define Tile_size 8
+
+TileRef Tile_index(TileRef ref, uint index) {
+ return TileRef(ref.offset + index * Tile_size);
+}
+
+struct TileSeg {
+ vec2 origin;
+ vec2 vector;
+ float y_edge;
+ TileSegRef next;
+};
+
+#define TileSeg_size 24
+
+TileSegRef TileSeg_index(TileSegRef ref, uint index) {
+ return TileSegRef(ref.offset + index * TileSeg_size);
+}
+
+struct TransformSeg {
+ vec4 mat;
+ vec2 translate;
+};
+
+#define TransformSeg_size 24
+
+TransformSegRef TransformSeg_index(TransformSegRef ref, uint index) {
+ return TransformSegRef(ref.offset + index * TransformSeg_size);
+}
+
+Path Path_read(Alloc a, PathRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ Path s;
+ s.bbox = uvec4(raw0 & 0xffff, raw0 >> 16, raw1 & 0xffff, raw1 >> 16);
+ s.tiles = TileRef(raw2);
+ return s;
+}
+
+void Path_write(Alloc a, PathRef ref, Path s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.bbox.x | (s.bbox.y << 16));
+ write_mem(a, ix + 1, s.bbox.z | (s.bbox.w << 16));
+ write_mem(a, ix + 2, s.tiles.offset);
+}
+
+Tile Tile_read(Alloc a, TileRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ Tile s;
+ s.tile = TileSegRef(raw0);
+ s.backdrop = int(raw1);
+ return s;
+}
+
+void Tile_write(Alloc a, TileRef ref, Tile s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, s.tile.offset);
+ write_mem(a, ix + 1, uint(s.backdrop));
+}
+
+TileSeg TileSeg_read(Alloc a, TileSegRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ uint raw4 = read_mem(a, ix + 4);
+ uint raw5 = read_mem(a, ix + 5);
+ TileSeg s;
+ s.origin = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
+ s.vector = vec2(uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.y_edge = uintBitsToFloat(raw4);
+ s.next = TileSegRef(raw5);
+ return s;
+}
+
+void TileSeg_write(Alloc a, TileSegRef ref, TileSeg s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.origin.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.origin.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.vector.x));
+ write_mem(a, ix + 3, floatBitsToUint(s.vector.y));
+ write_mem(a, ix + 4, floatBitsToUint(s.y_edge));
+ write_mem(a, ix + 5, s.next.offset);
+}
+
+TransformSeg TransformSeg_read(Alloc a, TransformSegRef ref) {
+ uint ix = ref.offset >> 2;
+ uint raw0 = read_mem(a, ix + 0);
+ uint raw1 = read_mem(a, ix + 1);
+ uint raw2 = read_mem(a, ix + 2);
+ uint raw3 = read_mem(a, ix + 3);
+ uint raw4 = read_mem(a, ix + 4);
+ uint raw5 = read_mem(a, ix + 5);
+ TransformSeg s;
+ s.mat = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
+ s.translate = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
+ return s;
+}
+
+void TransformSeg_write(Alloc a, TransformSegRef ref, TransformSeg s) {
+ uint ix = ref.offset >> 2;
+ write_mem(a, ix + 0, floatBitsToUint(s.mat.x));
+ write_mem(a, ix + 1, floatBitsToUint(s.mat.y));
+ write_mem(a, ix + 2, floatBitsToUint(s.mat.z));
+ write_mem(a, ix + 3, floatBitsToUint(s.mat.w));
+ write_mem(a, ix + 4, floatBitsToUint(s.translate.x));
+ write_mem(a, ix + 5, floatBitsToUint(s.translate.y));
+}
+
diff --git a/vendor/gioui.org/shader/piet/tile_alloc.comp b/vendor/gioui.org/shader/piet/tile_alloc.comp
new file mode 100644
index 0000000..0b6eca4
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc.comp
@@ -0,0 +1,108 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
+
+// Allocation and initialization of tiles for paths.
+
+#version 450
+#extension GL_GOOGLE_include_directive : enable
+
+#include "mem.h"
+#include "setup.h"
+
+#define LG_TILE_ALLOC_WG (7 + LG_WG_FACTOR)
+#define TILE_ALLOC_WG (1 << LG_TILE_ALLOC_WG)
+
+layout(local_size_x = TILE_ALLOC_WG, local_size_y = 1) in;
+
+layout(set = 0, binding = 1) readonly buffer ConfigBuf {
+ Config conf;
+};
+
+#include "annotated.h"
+#include "tile.h"
+
+// scale factors useful for converting coordinates to tiles
+#define SX (1.0 / float(TILE_WIDTH_PX))
+#define SY (1.0 / float(TILE_HEIGHT_PX))
+
+shared uint sh_tile_count[TILE_ALLOC_WG];
+shared Alloc sh_tile_alloc;
+// Really a bool, but some Metal devices don't accept shared bools.
+shared uint sh_tile_alloc_failed;
+
+void main() {
+ uint th_ix = gl_LocalInvocationID.x;
+ uint element_ix = gl_GlobalInvocationID.x;
+ PathRef path_ref = PathRef(conf.tile_alloc.offset + element_ix * Path_size);
+ AnnotatedRef ref = AnnotatedRef(conf.anno_alloc.offset + element_ix * Annotated_size);
+
+ uint tag = Annotated_Nop;
+ if (element_ix < conf.n_elements) {
+ tag = Annotated_tag(conf.anno_alloc, ref).tag;
+ }
+ int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
+ switch (tag) {
+ case Annotated_Color:
+ case Annotated_Image:
+ case Annotated_BeginClip:
+ case Annotated_EndClip:
+ // Note: we take advantage of the fact that fills, strokes, and
+ // clips have compatible layout.
+ AnnoEndClip clip = Annotated_EndClip_read(conf.anno_alloc, ref);
+ x0 = int(floor(clip.bbox.x * SX));
+ y0 = int(floor(clip.bbox.y * SY));
+ x1 = int(ceil(clip.bbox.z * SX));
+ y1 = int(ceil(clip.bbox.w * SY));
+ break;
+ }
+ x0 = clamp(x0, 0, int(conf.width_in_tiles));
+ y0 = clamp(y0, 0, int(conf.height_in_tiles));
+ x1 = clamp(x1, 0, int(conf.width_in_tiles));
+ y1 = clamp(y1, 0, int(conf.height_in_tiles));
+
+ Path path;
+ path.bbox = uvec4(x0, y0, x1, y1);
+ uint tile_count = (x1 - x0) * (y1 - y0);
+ if (tag == Annotated_EndClip) {
+ // Don't actually allocate tiles for an end clip, but we do want
+ // the path structure (especially bbox) allocated for it.
+ tile_count = 0;
+ }
+
+ sh_tile_count[th_ix] = tile_count;
+ uint total_tile_count = tile_count;
+ // Prefix sum of sh_tile_count
+ for (uint i = 0; i < LG_TILE_ALLOC_WG; i++) {
+ barrier();
+ if (th_ix >= (1 << i)) {
+ total_tile_count += sh_tile_count[th_ix - (1 << i)];
+ }
+ barrier();
+ sh_tile_count[th_ix] = total_tile_count;
+ }
+ if (th_ix == TILE_ALLOC_WG - 1) {
+ MallocResult res = malloc(total_tile_count * Tile_size);
+ sh_tile_alloc = res.alloc;
+ sh_tile_alloc_failed = res.failed ? 1 : 0;
+ }
+ barrier();
+ if (sh_tile_alloc_failed != 0 || mem_error != NO_ERROR) {
+ return;
+ }
+ Alloc alloc_start = sh_tile_alloc;
+
+ if (element_ix < conf.n_elements) {
+ uint tile_subix = th_ix > 0 ? sh_tile_count[th_ix - 1] : 0;
+ Alloc tiles_alloc = slice_mem(alloc_start, Tile_size * tile_subix, Tile_size * tile_count);
+ path.tiles = TileRef(tiles_alloc.offset);
+ Path_write(conf.tile_alloc, path_ref, path);
+ }
+
+ // Zero out allocated tiles efficiently
+ uint total_count = sh_tile_count[TILE_ALLOC_WG - 1] * (Tile_size / 4);
+ uint start_ix = alloc_start.offset >> 2;
+ for (uint i = th_ix; i < total_count; i += TILE_ALLOC_WG) {
+ // Note: this interleaving is faster than using Tile_write
+ // by a significant amount.
+ write_mem(alloc_start, start_ix + i, 0);
+ }
+}
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_abi.c b/vendor/gioui.org/shader/piet/tile_alloc_abi.c
new file mode 100644
index 0000000..0cffe2c
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_abi.c
@@ -0,0 +1,23 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+#include <stdint.h>
+#include <stddef.h>
+#include "abi.h"
+#include "runtime.h"
+#include "tile_alloc_abi.h"
+
+const struct program_info tile_alloc_program_info = {
+ .has_cbarriers = 1,
+ .min_memory_size = 100000,
+ .desc_set_size = sizeof(struct tile_alloc_descriptor_set_layout),
+ .workgroup_size_x = 128,
+ .workgroup_size_y = 1,
+ .workgroup_size_z = 1,
+ .begin = tile_alloc_coroutine_begin,
+ .await = tile_alloc_coroutine_await,
+ .destroy = tile_alloc_coroutine_destroy,
+};
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_abi.go b/vendor/gioui.org/shader/piet/tile_alloc_abi.go
new file mode 100644
index 0000000..8d0414e
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_abi.go
@@ -0,0 +1,35 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build linux && (arm64 || arm || amd64)
+// +build linux
+// +build arm64 arm amd64
+
+package piet
+
+import "gioui.org/cpu"
+import "unsafe"
+
+/*
+#cgo LDFLAGS: -lm
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "abi.h"
+#include "runtime.h"
+#include "tile_alloc_abi.h"
+*/
+import "C"
+
+var Tile_allocProgramInfo = (*cpu.ProgramInfo)(unsafe.Pointer(&C.tile_alloc_program_info))
+
+type Tile_allocDescriptorSetLayout = C.struct_tile_alloc_descriptor_set_layout
+
+const Tile_allocHash = "364b3cf559d02a86c751292bedc571d5ceef2df899de39ad483b4176294e9857"
+
+func (l *Tile_allocDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding0))
+}
+
+func (l *Tile_allocDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ return (*cpu.BufferDescriptor)(unsafe.Pointer(&l.binding1))
+}
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_abi.h b/vendor/gioui.org/shader/piet/tile_alloc_abi.h
new file mode 100644
index 0000000..aac2706
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_abi.h
@@ -0,0 +1,17 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+struct tile_alloc_descriptor_set_layout {
+ struct buffer_descriptor binding0;
+ struct buffer_descriptor binding1;
+};
+
+extern coroutine tile_alloc_coroutine_begin(struct program_data *data,
+ int32_t workgroupX, int32_t workgroupY, int32_t workgroupZ,
+ void *workgroupMemory,
+ int32_t firstSubgroup,
+ int32_t subgroupCount) ATTR_HIDDEN;
+
+extern bool tile_alloc_coroutine_await(coroutine r, yield_result *res) ATTR_HIDDEN;
+extern void tile_alloc_coroutine_destroy(coroutine r) ATTR_HIDDEN;
+
+extern const struct program_info tile_alloc_program_info ATTR_HIDDEN;
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_abi_nosupport.go b/vendor/gioui.org/shader/piet/tile_alloc_abi_nosupport.go
new file mode 100644
index 0000000..fb3a023
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_abi_nosupport.go
@@ -0,0 +1,22 @@
+// Code generated by gioui.org/cpu/cmd/compile DO NOT EDIT.
+
+//go:build !(linux && (arm64 || arm || amd64))
+// +build !linux !arm64,!arm,!amd64
+
+package piet
+
+import "gioui.org/cpu"
+
+var Tile_allocProgramInfo *cpu.ProgramInfo
+
+type Tile_allocDescriptorSetLayout struct{}
+
+const Tile_allocHash = ""
+
+func (l *Tile_allocDescriptorSetLayout) Binding0() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
+
+func (l *Tile_allocDescriptorSetLayout) Binding1() *cpu.BufferDescriptor {
+ panic("unsupported")
+}
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_linux_amd64.syso b/vendor/gioui.org/shader/piet/tile_alloc_linux_amd64.syso
new file mode 100644
index 0000000..0f37c87
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_linux_amd64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_linux_arm.syso b/vendor/gioui.org/shader/piet/tile_alloc_linux_arm.syso
new file mode 100644
index 0000000..ab62099
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_linux_arm.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/tile_alloc_linux_arm64.syso b/vendor/gioui.org/shader/piet/tile_alloc_linux_arm64.syso
new file mode 100644
index 0000000..0c968b0
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/tile_alloc_linux_arm64.syso
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbackdrop.comp.0.dxbc b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.dxbc
new file mode 100644
index 0000000..a255faf
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibios b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibios
new file mode 100644
index 0000000..349eb6e
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibiossimulator
new file mode 100644
index 0000000..2d9f890
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibmacos
new file mode 100644
index 0000000..a72cd7b
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbackdrop.comp.0.spirv b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.spirv
new file mode 100644
index 0000000..e3ffcfb
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbackdrop.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbinning.comp.0.dxbc b/vendor/gioui.org/shader/piet/zbinning.comp.0.dxbc
new file mode 100644
index 0000000..ba04622
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbinning.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibios b/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibios
new file mode 100644
index 0000000..862042e
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibiossimulator
new file mode 100644
index 0000000..c1e8019
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibmacos
new file mode 100644
index 0000000..27508e1
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbinning.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zbinning.comp.0.spirv b/vendor/gioui.org/shader/piet/zbinning.comp.0.spirv
new file mode 100644
index 0000000..7cfcb0c
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zbinning.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zcoarse.comp.0.dxbc b/vendor/gioui.org/shader/piet/zcoarse.comp.0.dxbc
new file mode 100644
index 0000000..94a3259
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zcoarse.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibios b/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibios
new file mode 100644
index 0000000..29c8dbf
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibiossimulator
new file mode 100644
index 0000000..12b533d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibmacos
new file mode 100644
index 0000000..c9a781b
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zcoarse.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zcoarse.comp.0.spirv b/vendor/gioui.org/shader/piet/zcoarse.comp.0.spirv
new file mode 100644
index 0000000..23e652a
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zcoarse.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zelements.comp.0.dxbc b/vendor/gioui.org/shader/piet/zelements.comp.0.dxbc
new file mode 100644
index 0000000..e4916b7
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zelements.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zelements.comp.0.metallibios b/vendor/gioui.org/shader/piet/zelements.comp.0.metallibios
new file mode 100644
index 0000000..1d5097f
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zelements.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zelements.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/zelements.comp.0.metallibiossimulator
new file mode 100644
index 0000000..367e234
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zelements.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zelements.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/zelements.comp.0.metallibmacos
new file mode 100644
index 0000000..b405013
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zelements.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zelements.comp.0.spirv b/vendor/gioui.org/shader/piet/zelements.comp.0.spirv
new file mode 100644
index 0000000..84057ac
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zelements.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zkernel4.comp.0.dxbc b/vendor/gioui.org/shader/piet/zkernel4.comp.0.dxbc
new file mode 100644
index 0000000..f459a5d
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zkernel4.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibios b/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibios
new file mode 100644
index 0000000..a979d51
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibiossimulator
new file mode 100644
index 0000000..1dbb051
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibmacos
new file mode 100644
index 0000000..99a823b
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zkernel4.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zkernel4.comp.0.spirv b/vendor/gioui.org/shader/piet/zkernel4.comp.0.spirv
new file mode 100644
index 0000000..d558185
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zkernel4.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.dxbc b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.dxbc
new file mode 100644
index 0000000..70eaf00
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibios b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibios
new file mode 100644
index 0000000..e6c2985
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibiossimulator
new file mode 100644
index 0000000..edde25c
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibmacos
new file mode 100644
index 0000000..d1c5653
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.spirv b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.spirv
new file mode 100644
index 0000000..078ea61
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/zpath_coarse.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.dxbc b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.dxbc
new file mode 100644
index 0000000..309a77a
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.dxbc
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibios b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibios
new file mode 100644
index 0000000..0e165cf
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibios
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibiossimulator b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibiossimulator
new file mode 100644
index 0000000..a95ef45
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibiossimulator
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibmacos b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibmacos
new file mode 100644
index 0000000..be6ab47
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.metallibmacos
Binary files differ
diff --git a/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.spirv b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.spirv
new file mode 100644
index 0000000..06f9b60
--- /dev/null
+++ b/vendor/gioui.org/shader/piet/ztile_alloc.comp.0.spirv
Binary files differ
diff --git a/vendor/gioui.org/shader/shader.go b/vendor/gioui.org/shader/shader.go
new file mode 100644
index 0000000..e1263c1
--- /dev/null
+++ b/vendor/gioui.org/shader/shader.go
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: Unlicense OR MIT
+
+package shader
+
+type Sources struct {
+ Name string
+ SPIRV string
+ GLSL100ES string
+ GLSL150 string
+ DXBC string
+ MetalLib string
+ Uniforms UniformsReflection
+ Inputs []InputLocation
+ Textures []TextureBinding
+ StorageBuffers []BufferBinding
+ Images []ImageBinding
+ WorkgroupSize [3]int
+}
+
+type UniformsReflection struct {
+ Locations []UniformLocation
+ Size int
+}
+
+type ImageBinding struct {
+ Name string
+ Binding int
+}
+
+type BufferBinding struct {
+ Name string
+ Binding int
+}
+
+type TextureBinding struct {
+ Name string
+ Binding int
+}
+
+type UniformLocation struct {
+ Name string
+ Type DataType
+ Size int
+ Offset int
+}
+
+type InputLocation struct {
+ // For GLSL.
+ Name string
+ Location int
+ // For HLSL.
+ Semantic string
+ SemanticIndex int
+
+ Type DataType
+ Size int
+}
+
+type DataType uint8
+
+const (
+ DataTypeFloat DataType = iota
+ DataTypeInt
+ DataTypeShort
+)
diff --git a/vendor/gioui.org/text/lru.go b/vendor/gioui.org/text/lru.go
index 85dbf9c..10448b1 100644
--- a/vendor/gioui.org/text/lru.go
+++ b/vendor/gioui.org/text/lru.go
@@ -3,7 +3,7 @@
package text
import (
- "gioui.org/op"
+ "gioui.org/op/clip"
"golang.org/x/image/math/fixed"
)
@@ -26,7 +26,7 @@ type layoutElem struct {
type path struct {
next, prev *path
key pathKey
- val op.CallOp
+ val clip.PathSpec
}
type layoutKey struct {
@@ -81,16 +81,16 @@ func (l *layoutCache) insert(lt *layoutElem) {
lt.next.prev = lt
}
-func (c *pathCache) Get(k pathKey) (op.CallOp, bool) {
+func (c *pathCache) Get(k pathKey) (clip.PathSpec, bool) {
if v, ok := c.m[k]; ok {
c.remove(v)
c.insert(v)
return v.val, true
}
- return op.CallOp{}, false
+ return clip.PathSpec{}, false
}
-func (c *pathCache) Put(k pathKey, v op.CallOp) {
+func (c *pathCache) Put(k pathKey, v clip.PathSpec) {
if c.m == nil {
c.m = make(map[pathKey]*path)
c.head = new(path)
diff --git a/vendor/gioui.org/text/shaper.go b/vendor/gioui.org/text/shaper.go
index c4ec48c..59020e0 100644
--- a/vendor/gioui.org/text/shaper.go
+++ b/vendor/gioui.org/text/shaper.go
@@ -6,21 +6,19 @@ import (
"io"
"strings"
- "gioui.org/op"
"golang.org/x/image/math/fixed"
+
+ "gioui.org/op/clip"
)
// Shaper implements layout and shaping of text.
type Shaper interface {
// Layout a text according to a set of options.
Layout(font Font, size fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error)
- // Shape a line of text and return a clipping operation for its outline.
- Shape(font Font, size fixed.Int26_6, layout []Glyph) op.CallOp
-
- // LayoutString is like Layout, but for strings.
+ // LayoutString is Layout for strings.
LayoutString(font Font, size fixed.Int26_6, maxWidth int, str string) []Line
- // ShapeString is like Shape for lines previously laid out by LayoutString.
- ShapeString(font Font, size fixed.Int26_6, str string, layout []Glyph) op.CallOp
+ // Shape a line of text and return a clipping operation for its outline.
+ Shape(font Font, size fixed.Int26_6, layout Layout) clip.PathSpec
}
// A FontFace is a Font and a matching Face.
@@ -49,8 +47,7 @@ type faceCache struct {
}
func (c *Cache) lookup(font Font) *faceCache {
- var f *faceCache
- f = c.faceForStyle(font)
+ f := c.faceForStyle(font)
if f == nil {
font.Typeface = c.def
f = c.faceForStyle(font)
@@ -59,24 +56,42 @@ func (c *Cache) lookup(font Font) *faceCache {
}
func (c *Cache) faceForStyle(font Font) *faceCache {
- tf := c.faces[font]
- if tf == nil {
- font := font
- font.Weight = Normal
- tf = c.faces[font]
+ if closest, ok := c.closestFont(font); ok {
+ return c.faces[closest]
}
- if tf == nil {
- font := font
- font.Style = Regular
- tf = c.faces[font]
+ font.Style = Regular
+ if closest, ok := c.closestFont(font); ok {
+ return c.faces[closest]
}
- if tf == nil {
- font := font
- font.Style = Regular
- font.Weight = Normal
- tf = c.faces[font]
+ return nil
+}
+
+// closestFont returns the closest Font by weight, in case of equality the
+// lighter weight will be returned.
+func (c *Cache) closestFont(lookup Font) (Font, bool) {
+ if c.faces[lookup] != nil {
+ return lookup, true
}
- return tf
+ found := false
+ var match Font
+ for cf := range c.faces {
+ if cf.Typeface != lookup.Typeface || cf.Variant != lookup.Variant || cf.Style != lookup.Style {
+ continue
+ }
+ if !found {
+ found = true
+ match = cf
+ continue
+ }
+ cDist := weightDistance(lookup.Weight, cf.Weight)
+ mDist := weightDistance(lookup.Weight, match.Weight)
+ if cDist < mDist {
+ match = cf
+ } else if cDist == mDist && cf.Weight < match.Weight {
+ match = cf
+ }
+ }
+ return match, found
}
func NewCache(collection []FontFace) *Cache {
@@ -84,9 +99,6 @@ func NewCache(collection []FontFace) *Cache {
faces: make(map[Font]*faceCache),
}
for i, ff := range collection {
- if ff.Font.Weight == 0 {
- ff.Font.Weight = Normal
- }
if i == 0 {
c.def = ff.Font.Typeface
}
@@ -95,24 +107,23 @@ func NewCache(collection []FontFace) *Cache {
return c
}
-func (s *Cache) Layout(font Font, size fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error) {
- cache := s.lookup(font)
+// Layout implements the Shaper interface.
+func (c *Cache) Layout(font Font, size fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error) {
+ cache := c.lookup(font)
return cache.face.Layout(size, maxWidth, txt)
}
-func (s *Cache) Shape(font Font, size fixed.Int26_6, layout []Glyph) op.CallOp {
- cache := s.lookup(font)
- return cache.face.Shape(size, layout)
-}
-
-func (s *Cache) LayoutString(font Font, size fixed.Int26_6, maxWidth int, str string) []Line {
- cache := s.lookup(font)
+// LayoutString is a caching implementation of the Shaper interface.
+func (c *Cache) LayoutString(font Font, size fixed.Int26_6, maxWidth int, str string) []Line {
+ cache := c.lookup(font)
return cache.layout(size, maxWidth, str)
}
-func (s *Cache) ShapeString(font Font, size fixed.Int26_6, str string, layout []Glyph) op.CallOp {
- cache := s.lookup(font)
- return cache.shape(size, str, layout)
+// Shape is a caching implementation of the Shaper interface. Shape assumes that the layout
+// argument is unchanged from a call to Layout or LayoutString.
+func (c *Cache) Shape(font Font, size fixed.Int26_6, layout Layout) clip.PathSpec {
+ cache := c.lookup(font)
+ return cache.shape(size, layout)
}
func (f *faceCache) layout(ppem fixed.Int26_6, maxWidth int, str string) []Line {
@@ -132,13 +143,13 @@ func (f *faceCache) layout(ppem fixed.Int26_6, maxWidth int, str string) []Line
return l
}
-func (f *faceCache) shape(ppem fixed.Int26_6, str string, layout []Glyph) op.CallOp {
+func (f *faceCache) shape(ppem fixed.Int26_6, layout Layout) clip.PathSpec {
if f == nil {
- return op.CallOp{}
+ return clip.PathSpec{}
}
pk := pathKey{
ppem: ppem,
- str: str,
+ str: layout.Text,
}
if clip, ok := f.pathCache.Get(pk); ok {
return clip
diff --git a/vendor/gioui.org/text/text.go b/vendor/gioui.org/text/text.go
index 3ec7d1f..12d39f5 100644
--- a/vendor/gioui.org/text/text.go
+++ b/vendor/gioui.org/text/text.go
@@ -5,15 +5,13 @@ package text
import (
"io"
- "gioui.org/op"
+ "gioui.org/op/clip"
"golang.org/x/image/math/fixed"
)
// A Line contains the measurements of a line of text.
type Line struct {
- Layout []Glyph
- // Len is the length in UTF8 bytes of the line.
- Len int
+ Layout Layout
// Width is the width of the line.
Width fixed.Int26_6
// Ascent is the height above the baseline.
@@ -25,15 +23,16 @@ type Line struct {
Bounds fixed.Rectangle26_6
}
-type Glyph struct {
- Rune rune
- Advance fixed.Int26_6
+type Layout struct {
+ Text string
+ Advances []fixed.Int26_6
}
// Style is the font style.
type Style int
-// Weight is a font weight, in CSS units.
+// Weight is a font weight, in CSS units subtracted 400 so the zero value
+// is normal text weight.
type Weight int
// Font specify a particular typeface variant, style and weight.
@@ -45,10 +44,11 @@ type Font struct {
Weight Weight
}
-// Face implements text layout and shaping for a particular font.
+// Face implements text layout and shaping for a particular font. All
+// methods must be safe for concurrent use.
type Face interface {
Layout(ppem fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error)
- Shape(ppem fixed.Int26_6, str []Glyph) op.CallOp
+ Shape(ppem fixed.Int26_6, str Layout) clip.PathSpec
}
// Typeface identifies a particular typeface design. The empty
@@ -72,9 +72,22 @@ const (
)
const (
- Normal Weight = 400
- Medium Weight = 500
- Bold Weight = 600
+ Thin Weight = 100 - 400
+ Hairline Weight = Thin
+ ExtraLight Weight = 200 - 400
+ UltraLight Weight = ExtraLight
+ Light Weight = 300 - 400
+ Normal Weight = 400 - 400
+ Medium Weight = 500 - 400
+ SemiBold Weight = 600 - 400
+ DemiBold Weight = SemiBold
+ Bold Weight = 700 - 400
+ ExtraBold Weight = 800 - 400
+ UltraBold Weight = ExtraBold
+ Black Weight = 900 - 400
+ Heavy Weight = Black
+ ExtraBlack Weight = 950 - 400
+ UltraBlack Weight = ExtraBlack
)
func (a Alignment) String() string {
@@ -86,6 +99,56 @@ func (a Alignment) String() string {
case Middle:
return "Middle"
default:
- panic("unreachable")
+ panic("invalid Alignment")
}
}
+
+func (s Style) String() string {
+ switch s {
+ case Regular:
+ return "Regular"
+ case Italic:
+ return "Italic"
+ default:
+ panic("invalid Style")
+ }
+}
+
+func (w Weight) String() string {
+ switch w {
+ case Thin:
+ return "Thin"
+ case ExtraLight:
+ return "ExtraLight"
+ case Light:
+ return "Light"
+ case Normal:
+ return "Normal"
+ case Medium:
+ return "Medium"
+ case SemiBold:
+ return "SemiBold"
+ case Bold:
+ return "Bold"
+ case ExtraBold:
+ return "ExtraBold"
+ case Black:
+ return "Black"
+ case ExtraBlack:
+ return "ExtraBlack"
+ default:
+ panic("invalid Weight")
+ }
+}
+
+// weightDistance returns the distance value between two font weights.
+func weightDistance(wa Weight, wb Weight) int {
+ // Avoid dealing with negative Weight values.
+ a := int(wa) + 400
+ b := int(wb) + 400
+ diff := a - b
+ if diff < 0 {
+ return -diff
+ }
+ return diff
+}
diff --git a/vendor/github.com/BurntSushi/xgb/README b/vendor/github.com/BurntSushi/xgb/README
index c96a5fb..e0bd8a2 100644
--- a/vendor/github.com/BurntSushi/xgb/README
+++ b/vendor/github.com/BurntSushi/xgb/README
@@ -1,3 +1,8 @@
+Note that this project is largely unmaintained as I don't have the time to do
+or support more development. Please consider using this fork instead:
+https://github.com/jezek/xgb
+
+
XGB is the X Go Binding, which is a low-level API to communicate with the
core X protocol and many of the X extensions. It is closely modeled after
XCB and xpyb.
@@ -20,7 +25,7 @@ BurntSushi's Fork
I've forked the XGB repository from Google Code due to inactivty upstream.
Godoc documentation can be found here:
-http://godoc.burntsushi.net/pkg/github.com/BurntSushi/xgb/
+https://godoc.org/github.com/BurntSushi/xgb
Much of the code has been rewritten in an effort to support thread safety
and multiple extensions. Namely, go_client.py has been thrown away in favor
diff --git a/vendor/github.com/BurntSushi/xgb/conn.go b/vendor/github.com/BurntSushi/xgb/conn.go
index 1b7d838..f1b85c0 100644
--- a/vendor/github.com/BurntSushi/xgb/conn.go
+++ b/vendor/github.com/BurntSushi/xgb/conn.go
@@ -168,13 +168,14 @@ func (c *Conn) dial(display string) error {
// Connect to server
if len(socket) != 0 {
c.conn, err = net.Dial("unix", socket+":"+c.display)
- } else if len(c.host) != 0 {
+ } else if len(c.host) != 0 && c.host != "unix" {
if protocol == "" {
protocol = "tcp"
}
c.conn, err = net.Dial(protocol,
c.host+":"+strconv.Itoa(6000+c.DisplayNumber))
} else {
+ c.host = ""
c.conn, err = net.Dial("unix", "/tmp/.X11-unix/X"+c.display)
}
diff --git a/vendor/github.com/aarzilli/nucular/font/font_gio.go b/vendor/github.com/aarzilli/nucular/font/font_gio.go
index f4816d7..2f27d5b 100644
--- a/vendor/github.com/aarzilli/nucular/font/font_gio.go
+++ b/vendor/github.com/aarzilli/nucular/font/font_gio.go
@@ -17,7 +17,7 @@ import (
type Face struct {
fnt *opentype.Font
- shaper *text.FontRegistry
+ shaper *text.Cache
size int
fsize fixed.Int26_6
metrics font.Metrics
@@ -40,8 +40,7 @@ func NewFace(ttf []byte, size int) (Face, error) {
}
}
- shaper := &text.FontRegistry{}
- shaper.Register(text.Font{}, fnt)
+ shaper := text.NewCache([]text.FontFace{{text.Font{}, fnt}})
face := Face{fnt, shaper, size, fixed.I(size), font.Metrics{}}
metricsTxt, _ := face.shaper.Layout(text.Font{}, fixed.I(size), 1e6, strings.NewReader("metrics"))
diff --git a/vendor/github.com/aarzilli/nucular/gio.go b/vendor/github.com/aarzilli/nucular/gio.go
index 1b6adf3..d8adeaf 100644
--- a/vendor/github.com/aarzilli/nucular/gio.go
+++ b/vendor/github.com/aarzilli/nucular/gio.go
@@ -13,6 +13,7 @@ import (
"sync"
"sync/atomic"
"time"
+ "unicode/utf8"
"unsafe"
"gioui.org/app"
@@ -46,6 +47,7 @@ type masterWindow struct {
Title string
initialSize image.Point
size image.Point
+ onClose func()
w *app.Window
ops op.Ops
@@ -81,6 +83,11 @@ func (mw *masterWindow) Main() {
go func() {
mw.w = app.NewWindow(app.Title(mw.Title), app.Size(unit.Px(float32(mw.ctx.scale(mw.initialSize.X))), unit.Px(float32(mw.ctx.scale(mw.initialSize.Y)))))
mw.main()
+ if mw.onClose != nil {
+ mw.onClose()
+ } else {
+ os.Exit(0)
+ }
}()
go mw.updater()
app.Main()
@@ -95,7 +102,7 @@ func (mw *masterWindow) Unlock() {
}
func (mw *masterWindow) Close() {
- os.Exit(0) // Bad...
+ mw.w.Close()
}
func (mw *masterWindow) Closed() bool {
@@ -104,9 +111,13 @@ func (mw *masterWindow) Closed() bool {
return mw.closed
}
+func (mw *masterWindow) OnClose(onClose func()) {
+ mw.onClose = onClose
+}
+
func (mw *masterWindow) main() {
- for {
- e := <-mw.w.Events()
+ perfString := ""
+ for e := range mw.w.Events() {
switch e := e.(type) {
case system.DestroyEvent:
mw.uilock.Lock()
@@ -121,15 +132,49 @@ func (mw *masterWindow) main() {
mw.size = e.Size
mw.uilock.Lock()
mw.prevCmds = mw.prevCmds[:0]
- mw.updateLocked()
+ mw.updateLocked(perfString)
mw.uilock.Unlock()
e.Frame(&mw.ops)
+
+ case profile.Event:
+ perfString = e.Timings
+ case pointer.Event:
+ mw.uilock.Lock()
+ mw.processPointerEvent(e)
+ mw.uilock.Unlock()
+ case key.EditEvent:
+ changed := atomic.LoadInt32(&mw.ctx.changed)
+ if changed < 2 {
+ atomic.StoreInt32(&mw.ctx.changed, 2)
+ }
+ mw.uilock.Lock()
+ io.WriteString(&mw.textbuffer, e.Text)
+ mw.uilock.Unlock()
+
+ case key.Event:
+ changed := atomic.LoadInt32(&mw.ctx.changed)
+ if changed < 2 {
+ atomic.StoreInt32(&mw.ctx.changed, 2)
+ }
+ if e.State == key.Press {
+ mw.uilock.Lock()
+ switch e.Name {
+ case key.NameEnter, key.NameReturn:
+ io.WriteString(&mw.textbuffer, "\n")
+ }
+ mw.ctx.Input.Keyboard.Keys = append(mw.ctx.Input.Keyboard.Keys, gio2mobileKey(e))
+ mw.uilock.Unlock()
+ }
}
}
}
func (mw *masterWindow) processPointerEvent(e pointer.Event) {
+ changed := atomic.LoadInt32(&mw.ctx.changed)
+ if changed < 2 {
+ atomic.StoreInt32(&mw.ctx.changed, 2)
+ }
switch e.Type {
case pointer.Release, pointer.Cancel:
for i := range mw.ctx.Input.Mouse.Buttons {
@@ -144,11 +189,11 @@ func (mw *masterWindow) processPointerEvent(e pointer.Event) {
var button mouse.Button
switch {
- case e.Buttons.Contain(pointer.ButtonLeft):
+ case e.Buttons.Contain(pointer.ButtonPrimary):
button = mouse.ButtonLeft
- case e.Buttons.Contain(pointer.ButtonRight):
+ case e.Buttons.Contain(pointer.ButtonSecondary):
button = mouse.ButtonRight
- case e.Buttons.Contain(pointer.ButtonMiddle):
+ case e.Buttons.Contain(pointer.ButtonTertiary):
button = mouse.ButtonMiddle
}
@@ -169,7 +214,7 @@ func (mw *masterWindow) processPointerEvent(e pointer.Event) {
btn.Clicked = true
btn.Down = down
- case pointer.Move:
+ case pointer.Move, pointer.Drag, pointer.Scroll:
mw.ctx.Input.Mouse.Pos.X = int(e.Position.X)
mw.ctx.Input.Mouse.Pos.Y = int(e.Position.Y)
mw.ctx.Input.Mouse.Delta = mw.ctx.Input.Mouse.Pos.Sub(mw.ctx.Input.Mouse.Prev)
@@ -219,6 +264,19 @@ func init() {
runeToCode[key.NamePageUp] = mkey.CodePageUp
runeToCode[key.NamePageDown] = mkey.CodePageDown
runeToCode[key.NameTab] = mkey.CodeTab
+
+ runeToCode["F1"] = mkey.CodeF1
+ runeToCode["F2"] = mkey.CodeF2
+ runeToCode["F3"] = mkey.CodeF3
+ runeToCode["F4"] = mkey.CodeF4
+ runeToCode["F5"] = mkey.CodeF5
+ runeToCode["F6"] = mkey.CodeF6
+ runeToCode["F7"] = mkey.CodeF7
+ runeToCode["F8"] = mkey.CodeF8
+ runeToCode["F9"] = mkey.CodeF9
+ runeToCode["F10"] = mkey.CodeF10
+ runeToCode["F11"] = mkey.CodeF11
+ runeToCode["F12"] = mkey.CodeF12
}
func gio2mobileKey(e key.Event) mkey.Event {
@@ -275,27 +333,7 @@ func (w *masterWindow) updater() {
}
}
-func (mw *masterWindow) updateLocked() {
- perfString := ""
- q := mw.w.Queue()
- for _, e := range q.Events(mw.ctx) {
- switch e := e.(type) {
- case profile.Event:
- perfString = e.Timings
- case pointer.Event:
- mw.processPointerEvent(e)
- case key.EditEvent:
- io.WriteString(&mw.textbuffer, e.Text)
-
- case key.Event:
- switch e.Name {
- case key.NameEnter, key.NameReturn:
- io.WriteString(&mw.textbuffer, "\n")
- }
- mw.ctx.Input.Keyboard.Keys = append(mw.ctx.Input.Keyboard.Keys, gio2mobileKey(e))
- }
- }
-
+func (mw *masterWindow) updateLocked(perfString string) {
mw.ctx.Windows[0].Bounds = rect.Rect{X: 0, Y: 0, W: mw.size.X, H: mw.size.Y}
in := &mw.ctx.Input
in.Mouse.clip = nk_null_rect
@@ -341,11 +379,9 @@ func (mw *masterWindow) updateLocked() {
paintRect := f32.Rectangle{f32.Point{float32(pos.X), float32(pos.Y)}, f32.Point{float32(pos.X + bounds.X), float32(pos.Y + bounds.Y)}}
- var stack op.StackOp
- stack.Push(&mw.ops)
- paint.ColorOp{Color: color.RGBA{0xff, 0xff, 0xff, 0xff}}.Add(&mw.ops)
- paint.PaintOp{Rect: paintRect}.Add(&mw.ops)
- stack.Pop()
+ stack := op.Save(&mw.ops)
+ paint.FillShape(&mw.ops, color.NRGBA{0xff, 0xff, 0xff, 0xff}, gioclip.UniformRRect(paintRect, 0).Op(&mw.ops))
+ stack.Load()
drawText(&mw.ops, txt, font, color.RGBA{0x00, 0x00, 0x00, 0xff}, pos, bounds, paintRect)
}
@@ -367,10 +403,10 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
if perf {
profile.Op{ctx}.Add(ops)
}
- pointer.InputOp{ctx, false}.Add(ops)
- key.InputOp{ctx, true}.Add(ops)
+ pointer.InputOp{ctx, false, pointer.Cancel | pointer.Press | pointer.Release | pointer.Move | pointer.Drag | pointer.Scroll, image.Rect(0, 0, 4096, 4096)}.Add(ops)
+ key.InputOp{ctx}.Add(ops)
- var scissorStack op.StackOp
+ var scissorStack op.StateOp
scissorless := true
for i := range ctx.cmds {
@@ -378,18 +414,17 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
switch icmd.Kind {
case command.ScissorCmd:
if !scissorless {
- scissorStack.Pop()
+ scissorStack.Load()
}
- scissorStack.Push(ops)
- gioclip.Rect{Rect: n2fRect(icmd.Rect)}.Op(ops).Add(ops)
+ scissorStack = op.Save(ops)
+ gioclip.Rect(icmd.Rect.Rectangle()).Add(ops)
scissorless = false
case command.LineCmd:
cmd := icmd.Line
- var stack op.StackOp
- stack.Push(ops)
- paint.ColorOp{Color: cmd.Color}.Add(ops)
+ stack := op.Save(ops)
+ paint.ColorOp{Color: toNRGBA(cmd.Color)}.Add(ops)
h1 := int(cmd.LineThickness / 2)
h2 := int(cmd.LineThickness) - h1
@@ -399,17 +434,15 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
if y0 > y1 {
y0, y1 = y1, y0
}
- paint.PaintOp{Rect: f32.Rectangle{
- f32.Point{float32(cmd.Begin.X - h1), float32(y0)},
- f32.Point{float32(cmd.Begin.X + h2), float32(y1)}}}.Add(ops)
+ gioclip.Rect{image.Point{cmd.Begin.X - h1, y0}, image.Point{cmd.Begin.X + h2, y1}}.Add(ops)
+ paint.PaintOp{}.Add(ops)
} else if cmd.Begin.Y == cmd.End.Y {
x0, x1 := cmd.Begin.X, cmd.End.X
if x0 > x1 {
x0, x1 = x1, x0
}
- paint.PaintOp{Rect: f32.Rectangle{
- f32.Point{float32(x0), float32(cmd.Begin.Y - h1)},
- f32.Point{float32(x1), float32(cmd.Begin.Y + h2)}}}.Add(ops)
+ gioclip.Rect{image.Point{x0, cmd.Begin.Y - h1}, image.Point{x1, cmd.Begin.Y + h2}}.Add(ops)
+ paint.PaintOp{}.Add(ops)
} else {
m := float32(cmd.Begin.Y-cmd.End.Y) / float32(cmd.Begin.X-cmd.End.X)
invm := -1 / m
@@ -429,33 +462,26 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
pd := f32.Point{-2 * xadv, -2 * yadv}
p.Line(pd)
p.Line(f32.Point{float32(cmd.Begin.X - cmd.End.X), float32(cmd.Begin.Y - cmd.End.Y)})
+ p.Close()
- p.End().Add(ops)
+ gioclip.Outline{Path: p.End()}.Op().Add(ops)
pb = pb.Add(pa)
pc = pc.Add(pb)
pd = pd.Add(pc)
- minp := f32.Point{
- min4(pa.X, pb.X, pc.X, pd.X),
- min4(pa.Y, pb.Y, pc.Y, pd.Y)}
- maxp := f32.Point{
- max4(pa.X, pb.X, pc.X, pd.X),
- max4(pa.Y, pb.Y, pc.Y, pd.Y)}
-
- paint.PaintOp{Rect: f32.Rectangle{minp, maxp}}.Add(ops)
+ paint.PaintOp{}.Add(ops)
}
- stack.Pop()
+ stack.Load()
case command.RectFilledCmd:
cmd := icmd.RectFilled
// rounding is true if rounding has been requested AND we can draw it
rounding := cmd.Rounding > 0 && int(cmd.Rounding*2) < icmd.W && int(cmd.Rounding*2) < icmd.H
- var stack op.StackOp
- stack.Push(ops)
- paint.ColorOp{Color: cmd.Color}.Add(ops)
+ stack := op.Save(ops)
+ paint.ColorOp{Color: toNRGBA(cmd.Color)}.Add(ops)
if rounding {
const c = 0.55228475 // 4*(sqrt(2)-1)/3
@@ -473,19 +499,20 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
b.Cube(f32.Point{X: 0, Y: -r * c}, f32.Point{X: r - r*c, Y: -r}, f32.Point{X: r, Y: -r}) // NW
b.Line(f32.Point{X: w - r - r, Y: 0})
b.Cube(f32.Point{X: r * c, Y: 0}, f32.Point{X: r, Y: r - r*c}, f32.Point{X: r, Y: r}) // NE
- b.End().Add(ops)
+ b.Close()
+ gioclip.Outline{Path: b.End()}.Op().Add(ops)
}
- paint.PaintOp{Rect: n2fRect(icmd.Rect)}.Add(ops)
- stack.Pop()
+ gioclip.Rect(icmd.Rect.Rectangle()).Add(ops)
+ paint.PaintOp{}.Add(ops)
+ stack.Load()
case command.TriangleFilledCmd:
cmd := icmd.TriangleFilled
- var stack op.StackOp
- stack.Push(ops)
+ stack := op.Save(ops)
- paint.ColorOp{cmd.Color}.Add(ops)
+ paint.ColorOp{toNRGBA(cmd.Color)}.Add(ops)
var p gioclip.Path
p.Begin(ops)
@@ -493,25 +520,17 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
p.Line(f32.Point{float32(cmd.B.X - cmd.A.X), float32(cmd.B.Y - cmd.A.Y)})
p.Line(f32.Point{float32(cmd.C.X - cmd.B.X), float32(cmd.C.Y - cmd.B.Y)})
p.Line(f32.Point{float32(cmd.A.X - cmd.C.X), float32(cmd.A.Y - cmd.C.Y)})
- p.End().Add(ops)
-
- pmin := f32.Point{
- min2(min2(float32(cmd.A.X), float32(cmd.B.X)), float32(cmd.C.X)),
- min2(min2(float32(cmd.A.Y), float32(cmd.B.Y)), float32(cmd.C.Y))}
+ p.Close()
+ gioclip.Outline{Path: p.End()}.Op().Add(ops)
- pmax := f32.Point{
- max2(max2(float32(cmd.A.X), float32(cmd.B.X)), float32(cmd.C.X)),
- max2(max2(float32(cmd.A.Y), float32(cmd.B.Y)), float32(cmd.C.Y))}
+ paint.PaintOp{}.Add(ops)
- paint.PaintOp{Rect: f32.Rectangle{pmin, pmax}}.Add(ops)
-
- stack.Pop()
+ stack.Load()
case command.CircleFilledCmd:
- var stack op.StackOp
- stack.Push(ops)
+ stack := op.Save(ops)
- paint.ColorOp{icmd.CircleFilled.Color}.Add(ops)
+ paint.ColorOp{toNRGBA(icmd.CircleFilled.Color)}.Add(ops)
r := min2(float32(icmd.W), float32(icmd.H)) / 2
@@ -523,19 +542,20 @@ func (ctx *context) Draw(ops *op.Ops, size image.Point, perf bool) int {
b.Cube(f32.Point{X: -r * c, Y: 0}, f32.Point{X: -r, Y: -r + r*c}, f32.Point{X: -r, Y: -r}) // SW
b.Cube(f32.Point{X: 0, Y: -r * c}, f32.Point{X: r - r*c, Y: -r}, f32.Point{X: r, Y: -r}) // NW
b.Cube(f32.Point{X: r * c, Y: 0}, f32.Point{X: r, Y: r - r*c}, f32.Point{X: r, Y: r}) // NE
- b.End().Add(ops)
+ gioclip.Outline{Path: b.End()}.Op().Add(ops)
- paint.PaintOp{Rect: n2fRect(icmd.Rect)}.Add(ops)
+ paint.PaintOp{}.Add(ops)
- stack.Pop()
+ stack.Load()
case command.ImageCmd:
- var stack op.StackOp
- stack.Push(ops)
+ stack := op.Save(ops)
//TODO: this should be retained between frames somehow...
paint.NewImageOp(icmd.Image.Img).Add(ops)
- paint.PaintOp{n2fRect(icmd.Rect)}.Add(ops)
- stack.Pop()
+ op.Offset(f32.Point{float32(icmd.Rect.X), float32(icmd.Rect.Y)}).Add(ops)
+ gioclip.Rect{image.Point{0, 0}, image.Point{icmd.Rect.W, icmd.Rect.H}}.Add(ops)
+ paint.PaintOp{}.Add(ops)
+ stack.Load()
case command.TextCmd:
txt := fontFace2fontFace(&icmd.Text.Face).layout(icmd.Text.String, -1)
@@ -618,21 +638,26 @@ func textPadding(lines []text.Line) (padding image.Rectangle) {
func clipLine(line text.Line, clip image.Rectangle) (text.Line, f32.Point, bool) {
off := fixed.Point26_6{X: fixed.I(0), Y: fixed.I(line.Ascent.Ceil())}
- for len(line.Layout) > 0 {
- adv := line.Layout[0].Advance
+ for len(line.Layout.Advances) > 0 {
+ adv := line.Layout.Advances[0]
+ _, n := utf8.DecodeRuneInString(line.Layout.Text)
if (off.X + adv + line.Bounds.Max.X - line.Width).Ceil() >= clip.Min.X {
break
}
off.X += adv
- line.Layout = line.Layout[1:]
+ line.Layout.Text = line.Layout.Text[n:]
+ line.Layout.Advances = line.Layout.Advances[1:]
}
endx := off.X
- for i, glyph := range line.Layout {
+ rune := 0
+ for n, _ := range line.Layout.Text {
if (endx + line.Bounds.Min.X).Floor() > clip.Max.X {
- line.Layout = line.Layout[:i]
+ line.Layout.Advances = line.Layout.Advances[:rune]
+ line.Layout.Text = line.Layout.Text[:n]
break
}
- endx += glyph.Advance
+ endx += line.Layout.Advances[rune]
+ rune++
}
offf := f32.Point{X: float32(off.X) / 64, Y: float32(off.Y) / 64}
return line, offf, true
@@ -652,9 +677,8 @@ func drawText(ops *op.Ops, txt []text.Line, face font.Face, fgcolor color.RGBA,
clip := textPadding(txt)
clip.Max = clip.Max.Add(bounds)
- var stack op.StackOp
- stack.Push(ops)
- paint.ColorOp{fgcolor}.Add(ops)
+ stack := op.Save(ops)
+ paint.ColorOp{toNRGBA(fgcolor)}.Add(ops)
fc := fontFace2fontFace(&face)
@@ -667,23 +691,23 @@ func drawText(ops *op.Ops, txt []text.Line, face font.Face, fgcolor color.RGBA,
off.X += float32(pos.X)
off.Y += float32(pos.Y) + float32(i*FontHeight(face))
- var stack op.StackOp
- stack.Push(ops)
+ stack := op.Save(ops)
- op.TransformOp{}.Offset(off).Add(ops)
+ op.Offset(off).Add(ops)
fc.shape(txtstr.Layout).Add(ops)
- paint.PaintOp{Rect: paintRect.Sub(off)}.Add(ops)
+ gioclip.UniformRRect(paintRect.Sub(off), 0).Add(ops)
+ paint.PaintOp{}.Add(ops)
- stack.Pop()
+ stack.Load()
}
- stack.Pop()
+ stack.Load()
}
type fontFace struct {
fnt *opentype.Font
- shaper *text.FontRegistry
+ shaper *text.Cache
size int
fsize fixed.Int26_6
metrics ifont.Metrics
@@ -700,7 +724,7 @@ func (face *fontFace) layout(str string, width int) []text.Line {
return face.shaper.LayoutString(text.Font{}, fixed.I(face.size), width, str)
}
-func (face *fontFace) shape(txtstr []text.Glyph) op.CallOp {
+func (face *fontFace) shape(txtstr text.Layout) op.CallOp {
return face.shaper.Shape(text.Font{}, fixed.I(face.size), txtstr)
}
@@ -817,11 +841,18 @@ func widgetTextWrap(o *command.Buffer, b rect.Rect, str []rune, t *textWidget, f
if line.Y+line.H >= (b.Y + b.H) {
break
}
- runes := make([]rune, len(txtline.Layout))
- for i := range txtline.Layout {
- runes[i] = txtline.Layout[i].Rune
- }
- widgetText(o, line, string(runes), &text, "LC", f)
+ widgetText(o, line, txtline.Layout.Text, &text, "LC", f)
line.Y += FontHeight(f) + 2*t.Padding.Y
}
}
+
+func toNRGBA(c color.RGBA) color.NRGBA {
+ if c.A == 0xff {
+ return color.NRGBA{c.R, c.G, c.B, c.A}
+ }
+ r, g, b, a := c.RGBA()
+ r = (r * 0xffff) / a
+ g = (g * 0xffff) / a
+ b = (b * 0xffff) / a
+ return color.NRGBA{uint8(r >> 8), uint8(g >> 8), uint8(b >> 8), uint8(a >> 8)}
+}
diff --git a/vendor/github.com/aarzilli/nucular/go.mod b/vendor/github.com/aarzilli/nucular/go.mod
index d8a9134..7f38a4e 100644
--- a/vendor/github.com/aarzilli/nucular/go.mod
+++ b/vendor/github.com/aarzilli/nucular/go.mod
@@ -1,13 +1,13 @@
module github.com/aarzilli/nucular
require (
- gioui.org v0.0.0-20200417085050-0cfc914d8b7d
+ gioui.org v0.0.0-20210407072325-abd6e8f9cdd4
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
github.com/golang/freetype v0.0.0-20161208064710-d9be45aaf745
github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad
golang.org/x/exp v0.0.0-20191224044220-1fea468a75e9
- golang.org/x/image v0.0.0-20190802002840-cff245a6509b
+ golang.org/x/image v0.0.0-20200618115811-c13761719519
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028
)
-go 1.10
+go 1.14
diff --git a/vendor/github.com/aarzilli/nucular/go.sum b/vendor/github.com/aarzilli/nucular/go.sum
index 4dea8aa..14e367d 100644
--- a/vendor/github.com/aarzilli/nucular/go.sum
+++ b/vendor/github.com/aarzilli/nucular/go.sum
@@ -12,6 +12,16 @@ gioui.org v0.0.0-20191218180754-3dd7c8121c67 h1:y9md+l1thtMqJu/ulhF1Upv3pnOpGotp
gioui.org v0.0.0-20191218180754-3dd7c8121c67/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
gioui.org v0.0.0-20200417085050-0cfc914d8b7d h1:uZspKksrY99JQRUrP0XCoClt9Y6SZdxaT4Q7tAXsl4I=
gioui.org v0.0.0-20200417085050-0cfc914d8b7d/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
+gioui.org v0.0.0-20200824174209-9543b5f8f3ff h1:xiUlvOxsqxGuXx56i+BXa381HjHIh8UUcJYPJD3EemQ=
+gioui.org v0.0.0-20200824174209-9543b5f8f3ff/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
+gioui.org v0.0.0-20200825104353-4821472ea1c9 h1:wjaosWGBhqWYSffsg55/LYlqlqmTvgo8h6RPRY2cuqs=
+gioui.org v0.0.0-20200825104353-4821472ea1c9/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
+gioui.org v0.0.0-20210106084211-c030065af7bc h1:0jo2QznfZl35y/Bzqt915yUT1ruaTjmC24iJM/4vA94=
+gioui.org v0.0.0-20210106084211-c030065af7bc/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
+gioui.org v0.0.0-20210222172543-284659d3eac9 h1:rEhi0IMfjyzZu73tiAaPOtprJd9Z3QxJ0/VeY42dLv8=
+gioui.org v0.0.0-20210222172543-284659d3eac9/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
+gioui.org v0.0.0-20210407072325-abd6e8f9cdd4 h1:AlnhfKQm5z7MT1Soxj5dObqyhOU0YCGT6+gc7zCCCLg=
+gioui.org v0.0.0-20210407072325-abd6e8f9cdd4/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=
@@ -37,6 +47,8 @@ golang.org/x/image v0.0.0-20190227222117-0694c2d4d067 h1:KYGJGHOQy8oSi1fDlSpcZF0
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/image v0.0.0-20200618115811-c13761719519 h1:1e2ufUJNM3lCHEY5jIgac/7UTjd6cgJNdatjPdFWf34=
+golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190318164015-6bd122906c08 h1:REhdg1qxVTaAJcvh9BOGNgt2kd+KiUZ148XXlLp08FU=
golang.org/x/mobile v0.0.0-20190318164015-6bd122906c08/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -56,6 +68,8 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210304124612-50617c2ba197 h1:7+SpRyhoo46QjKkYInQXpcfxx3TYFEYkn131lwGE9/0=
+golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
diff --git a/vendor/github.com/aarzilli/nucular/masterwindow.go b/vendor/github.com/aarzilli/nucular/masterwindow.go
index 1ecf1f3..f74bd42 100644
--- a/vendor/github.com/aarzilli/nucular/masterwindow.go
+++ b/vendor/github.com/aarzilli/nucular/masterwindow.go
@@ -23,6 +23,7 @@ type MasterWindow interface {
Changed()
Close()
Closed() bool
+ OnClose(func())
ActivateEditor(ed *TextEditor)
Style() *nstyle.Style
diff --git a/vendor/github.com/aarzilli/nucular/nucular.go b/vendor/github.com/aarzilli/nucular/nucular.go
index 20ce6d2..7e4967c 100644
--- a/vendor/github.com/aarzilli/nucular/nucular.go
+++ b/vendor/github.com/aarzilli/nucular/nucular.go
@@ -49,8 +49,6 @@ type Window struct {
parent *Window
// helper windows to implement groups
groupWnd map[string]*Window
- // editor of the active property widget (see PropertyInt, PropertyFloat)
- editor *TextEditor
// update function
updateFn UpdateFn
usingSub bool
@@ -60,6 +58,7 @@ type Window struct {
lastLayoutCnt int
adjust map[int]map[int]*adjustCol
undockedSz image.Point
+ editors map[string]*TextEditor
}
type FittingWidthFn func(width int)
@@ -161,6 +160,7 @@ func createTreeNode(initialState bool, parent *treeNode) *treeNode {
func createWindow(ctx *context, title string) *Window {
rootNode := createTreeNode(false, nil)
r := &Window{ctx: ctx, title: title, rootNode: rootNode, curNode: rootNode, groupWnd: map[string]*Window{}, first: true}
+ r.editors = make(map[string]*TextEditor)
r.rowCtor.win = r
r.widgets.cur = make(map[rect.Rect]frozenWidget)
return r
@@ -600,6 +600,9 @@ func panelEnd(ctx *context, window *Window) {
scroll_inc = float64(layout.Clip.H) * 0.01
scroll_target = float64(layout.AtY - layout.Clip.Y)
scroll_offset = doScrollbarv(window, bounds, layout.Bounds, scroll_offset, scroll_target, scroll_step, scroll_inc, &ctx.Style.Scrollv, in, style.Font)
+ if layout.Offset.Y != int(scroll_offset) {
+ ctx.trashFrame = true
+ }
layout.Offset.Y = int(scroll_offset)
}
if layout.Flags&WindowNoHScrollbar == 0 {
@@ -629,6 +632,9 @@ func panelEnd(ctx *context, window *Window) {
scroll_step = float64(layout.MaxX) * 0.05
scroll_inc = float64(layout.MaxX) * 0.005
scroll_offset = doScrollbarh(window, bounds, scroll_offset, scroll_target, scroll_step, scroll_inc, &ctx.Style.Scrollh, in, style.Font)
+ if layout.Offset.X != int(scroll_offset) {
+ ctx.trashFrame = true
+ }
layout.Offset.X = int(scroll_offset)
}
}
@@ -2494,8 +2500,8 @@ func (win *Window) doProperty(property rect.Rect, name string, text string, filt
ws := win.widgets.PrevState(property)
oldws := ws
- if ws == nstyle.WidgetStateActive && win.editor != nil {
- ed = win.editor
+ if ws == nstyle.WidgetStateActive && win.editors[name] != nil {
+ ed = win.editors[name]
} else {
ed = &TextEditor{}
ed.init(win)
@@ -2527,9 +2533,9 @@ func (win *Window) doProperty(property rect.Rect, name string, text string, filt
}
if ws == nstyle.WidgetStateActive {
ed.Active = true
- win.editor = ed
+ win.editors[name] = ed
} else if oldws == nstyle.WidgetStateActive {
- win.editor = nil
+ delete(win.editors, name)
}
ed.win.widgets.Add(ws, property)
drawProperty(ed.win, style, property, lblrect, ws, name)
diff --git a/vendor/github.com/aarzilli/nucular/shiny.go b/vendor/github.com/aarzilli/nucular/shiny.go
index 2f8461b..3e44a98 100644
--- a/vendor/github.com/aarzilli/nucular/shiny.go
+++ b/vendor/github.com/aarzilli/nucular/shiny.go
@@ -52,7 +52,11 @@ type masterWindow struct {
wndb screen.Buffer
bounds image.Rectangle
+ paintEvent *paint.Event
+ sizeEvent *size.Event
+
initialSize image.Point
+ onClose func()
// window is focused
Focus bool
@@ -86,6 +90,9 @@ func NewMasterWindowSize(flags WindowFlags, title string, sz image.Point, update
// Shows window, runs event loop
func (mw *masterWindow) Main() {
driver.Main(mw.main)
+ if mw.onClose != nil {
+ mw.onClose()
+ }
}
func (mw *masterWindow) Lock() {
@@ -96,6 +103,10 @@ func (mw *masterWindow) Unlock() {
mw.uilock.Unlock()
}
+func (mw *masterWindow) OnClose(onClose func()) {
+ mw.onClose = onClose
+}
+
func (mw *masterWindow) main(s screen.Screen) {
var err error
mw.screen = s
@@ -124,12 +135,7 @@ func (mw *masterWindow) main(s screen.Screen) {
func (w *masterWindow) handleEventLocked(ei interface{}) bool {
switch e := ei.(type) {
case paint.Event:
- // On darwin we must respond to a paint.Event by reuploading the buffer or
- // the appplication will freeze.
- // On windows when the window goes off screen part of the window contents
- // will be discarded and must be redrawn.
- w.prevCmds = w.prevCmds[:0]
- w.updateLocked()
+ w.paintEvent = &e
case lifecycle.Event:
if e.Crosses(lifecycle.StageDead) == lifecycle.CrossOn || e.To == lifecycle.StageDead || w.closing {
@@ -158,22 +164,7 @@ func (w *masterWindow) handleEventLocked(ei interface{}) bool {
}
}
case size.Event:
- sz := e.Size()
- bb := w.wndb.Bounds()
- if sz.X <= bb.Dx() && sz.Y <= bb.Dy() {
- w.bounds = w.wndb.Bounds()
- w.bounds.Max.Y = w.bounds.Min.Y + sz.Y
- w.bounds.Max.X = w.bounds.Min.X + sz.X
- } else {
- if w.wndb != nil {
- w.wndb.Release()
- }
- w.setupBuffer(sz)
- }
- w.prevCmds = w.prevCmds[:0]
- if changed := atomic.LoadInt32(&w.ctx.changed); changed < 2 {
- atomic.StoreInt32(&w.ctx.changed, 2)
- }
+ w.sizeEvent = &e
case mouse.Event:
changed := atomic.LoadInt32(&w.ctx.changed)
@@ -235,10 +226,43 @@ func (w *masterWindow) updater() {
if w.closing {
return
}
+
+ forceUpdate := false
+
+ if w.paintEvent != nil {
+ w.paintEvent = nil
+ w.prevCmds = w.prevCmds[:0]
+ forceUpdate = true
+ }
+
+ if w.sizeEvent != nil {
+ sz := w.sizeEvent.Size()
+ w.sizeEvent = nil
+ if sz.X > 0 && sz.Y > 0 {
+ bb := w.wndb.Bounds()
+ if sz.X <= bb.Dx() && sz.Y <= bb.Dy() {
+ w.bounds = w.wndb.Bounds()
+ w.bounds.Max.Y = w.bounds.Min.Y + sz.Y
+ w.bounds.Max.X = w.bounds.Min.X + sz.X
+ } else {
+ if w.wndb != nil {
+ w.wndb.Release()
+ }
+ w.setupBuffer(sz)
+ }
+ w.prevCmds = w.prevCmds[:0]
+ if changed := atomic.LoadInt32(&w.ctx.changed); changed < 2 {
+ atomic.StoreInt32(&w.ctx.changed, 2)
+ }
+ }
+ }
+
changed := atomic.LoadInt32(&w.ctx.changed)
if changed > 0 {
atomic.AddInt32(&w.ctx.changed, -1)
w.updateLocked()
+ } else if forceUpdate {
+ w.updateLocked()
} else {
down = false
for _, btn := range w.ctx.Input.Mouse.Buttons {
diff --git a/vendor/github.com/aarzilli/nucular/text.go b/vendor/github.com/aarzilli/nucular/text.go
index a51a197..994a79a 100644
--- a/vendor/github.com/aarzilli/nucular/text.go
+++ b/vendor/github.com/aarzilli/nucular/text.go
@@ -1378,7 +1378,11 @@ func (ed *TextEditor) doEdit(bounds rect.Rect, style *nstyle.Edit, inp *Input, c
scroll_step := float64(scroll.H) * 0.1
scroll_inc := float64(scroll.H) * 0.01
scroll_target := float64(d.TextSize.Y + row_height)
- ed.Scrollbar.Y = int(doScrollbarv(ed.win, scroll, bounds, scroll_offset, scroll_target, scroll_step, scroll_inc, &style.Scrollbar, inp, font))
+ newy := int(doScrollbarv(ed.win, scroll, bounds, scroll_offset, scroll_target, scroll_step, scroll_inc, &style.Scrollbar, inp, font))
+ if newy != ed.Scrollbar.Y {
+ ed.win.ctx.trashFrame = true
+ }
+ ed.Scrollbar.Y = newy
}
return ret
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/GLFW_C_REVISION.txt b/vendor/github.com/go-gl/glfw/v3.3/glfw/GLFW_C_REVISION.txt
index 79d2fc3..5c74602 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/GLFW_C_REVISION.txt
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/GLFW_C_REVISION.txt
@@ -1 +1 @@
-2bac7ee8da526257d808bd026b027246c98e4f2f
+7d5a16ce714f0b5f4efa3262de22e4d948851525
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/build.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/build.go
index acf4d92..6ee6c43 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/build.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/build.go
@@ -7,8 +7,10 @@ package glfw
#cgo windows CFLAGS: -D_GLFW_WIN32 -Iglfw/deps/mingw
// Linker Options:
-#cgo windows LDFLAGS: -lopengl32 -lgdi32
+#cgo windows LDFLAGS: -lgdi32
+#cgo !gles2,windows LDFLAGS: -lopengl32
+#cgo gles2,windows LDFLAGS: -lGLESv2
// Darwin Build Tags
// ----------------
@@ -16,8 +18,10 @@ package glfw
#cgo darwin CFLAGS: -D_GLFW_COCOA -Wno-deprecated-declarations
// Linker Options:
-#cgo darwin LDFLAGS: -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo
+#cgo darwin LDFLAGS: -framework Cocoa -framework IOKit -framework CoreVideo
+#cgo !gles2,darwin LDFLAGS: -framework OpenGL
+#cgo gles2,darwin LDFLAGS: -lGLESv2
// Linux Build Tags
// ----------------
@@ -34,16 +38,16 @@ package glfw
#cgo linux,!wayland LDFLAGS: -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt
#cgo linux,wayland LDFLAGS: -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt
-// FreeBSD Build Tags
+// BSD Build Tags
// ----------------
// GLFW Options:
-#cgo freebsd pkg-config: glfw3
-#cgo freebsd CFLAGS: -D_GLFW_HAS_DLOPEN
-#cgo freebsd,!wayland CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
-#cgo freebsd,wayland CFLAGS: -D_GLFW_WAYLAND
+#cgo freebsd,!wayland netbsd,!wayland openbsd pkg-config: x11 xau xcb xdmcp
+#cgo freebsd,wayland netbsd,wayland pkg-config: wayland-client wayland-cursor wayland-egl epoll-shim
+#cgo freebsd netbsd openbsd CFLAGS: -D_GLFW_HAS_DLOPEN
+#cgo freebsd,!wayland netbsd,!wayland openbsd CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
+#cgo freebsd,wayland netbsd,wayland CFLAGS: -D_GLFW_WAYLAND
// Linker Options:
-#cgo freebsd,!wayland LDFLAGS: -lm -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lXinerama
-#cgo freebsd,wayland LDFLAGS: -lm -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
+#cgo freebsd netbsd openbsd LDFLAGS: -lm
*/
import "C"
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/build_cgo_hack.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/build_cgo_hack.go
new file mode 100644
index 0000000..5fe4c5a
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/build_cgo_hack.go
@@ -0,0 +1,18 @@
+// +build required
+
+package glfw
+
+// This file exists purely to prevent the golang toolchain from stripping
+// away the c source directories and files when `go mod vendor` is used
+// to populate a `vendor/` directory of a project depending on `go-gl/glfw`.
+//
+// How it works:
+// - every directory which only includes c source files receives a dummy.go file.
+// - every directory we want to preserve is included here as a _ import.
+// - this file is given a build to exclude it from the regular build.
+import (
+ // Prevent go tooling from stripping out the c source files.
+ _ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps"
+ _ "github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW"
+ _ "github.com/go-gl/glfw/v3.3/glfw/glfw/src"
+)
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_bsd.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_bsd.go
new file mode 100644
index 0000000..8644986
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_bsd.go
@@ -0,0 +1,29 @@
+// +build freebsd netbsd openbsd
+
+package glfw
+
+/*
+#ifdef _GLFW_WAYLAND
+ #include "glfw/src/wl_init.c"
+ #include "glfw/src/wl_monitor.c"
+ #include "glfw/src/wl_window.c"
+ #include "glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-viewporter-client-protocol.c"
+ #include "glfw/src/wayland-xdg-decoration-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-xdg-shell-client-protocol.c"
+#endif
+#ifdef _GLFW_X11
+ #include "glfw/src/x11_init.c"
+ #include "glfw/src/x11_monitor.c"
+ #include "glfw/src/x11_window.c"
+ #include "glfw/src/glx_context.c"
+#endif
+#include "glfw/src/null_joystick.c"
+#include "glfw/src/posix_time.c"
+#include "glfw/src/posix_thread.c"
+#include "glfw/src/xkb_unicode.c"
+#include "glfw/src/egl_context.c"
+*/
+import "C"
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_linbsd.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_lin.go
index 98c7581..67eb054 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_linbsd.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_lin.go
@@ -1,4 +1,4 @@
-// +build linux freebsd
+// +build linux
package glfw
@@ -7,7 +7,12 @@ package glfw
#include "glfw/src/wl_init.c"
#include "glfw/src/wl_monitor.c"
#include "glfw/src/wl_window.c"
- #include "glfw/src/wl_platform.h"
+ #include "glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-viewporter-client-protocol.c"
+ #include "glfw/src/wayland-xdg-decoration-unstable-v1-client-protocol.c"
+ #include "glfw/src/wayland-xdg-shell-client-protocol.c"
#endif
#ifdef _GLFW_X11
#include "glfw/src/x11_init.c"
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
index 3492997..9a135da 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
@@ -34,7 +34,14 @@ const (
// This function may only be called from the main thread.
func Init() error {
C.glfwInit()
- return acceptError(APIUnavailable)
+ // invalidValue can happen when specific joysticks are used. This issue
+ // will be fixed in GLFW 3.3.5. As a temporary fix, ignore this error.
+ // See go-gl/glfw#292, go-gl/glfw#324, and glfw/glfw#1763.
+ err := acceptError(APIUnavailable, invalidValue)
+ if e, ok := err.(*Error); ok && e.Code == invalidValue {
+ return nil
+ }
+ return err
}
// Terminate destroys all remaining windows, frees any allocated resources and
@@ -100,6 +107,7 @@ func GetVersionString() string {
func GetClipboardString() string {
cs := C.glfwGetClipboardString(nil)
if cs == nil {
+ acceptError(FormatUnavailable)
return ""
}
return C.GoString(cs)
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/LICENSE.md b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/LICENSE.md
new file mode 100644
index 0000000..7494a3f
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/LICENSE.md
@@ -0,0 +1,23 @@
+Copyright (c) 2002-2006 Marcus Geelnard
+
+Copyright (c) 2006-2019 Camilla Löwy
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would
+ be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not
+ be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+ distribution.
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/dummy.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/dummy.go
new file mode 100644
index 0000000..b31e788
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/dummy.go
@@ -0,0 +1,11 @@
+// +build required
+
+// Package dummy prevents go tooling from stripping the c dependencies.
+package dummy
+
+import (
+ // Prevent go tooling from stripping out the c source files.
+ _ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad"
+ _ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw"
+ _ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008"
+)
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.c
new file mode 100644
index 0000000..9743046
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.c
@@ -0,0 +1,230 @@
+/* Copyright (c) 2012, Kim Gräsman
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Kim Gräsman nor the names of contributors may be used
+ * to endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "getopt.h"
+
+#include <stddef.h>
+#include <string.h>
+
+const int no_argument = 0;
+const int required_argument = 1;
+const int optional_argument = 2;
+
+char* optarg;
+int optopt;
+/* The variable optind [...] shall be initialized to 1 by the system. */
+int optind = 1;
+int opterr;
+
+static char* optcursor = NULL;
+
+/* Implemented based on [1] and [2] for optional arguments.
+ optopt is handled FreeBSD-style, per [3].
+ Other GNU and FreeBSD extensions are purely accidental.
+
+[1] http://pubs.opengroup.org/onlinepubs/000095399/functions/getopt.html
+[2] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html
+[3] http://www.freebsd.org/cgi/man.cgi?query=getopt&sektion=3&manpath=FreeBSD+9.0-RELEASE
+*/
+int getopt(int argc, char* const argv[], const char* optstring) {
+ int optchar = -1;
+ const char* optdecl = NULL;
+
+ optarg = NULL;
+ opterr = 0;
+ optopt = 0;
+
+ /* Unspecified, but we need it to avoid overrunning the argv bounds. */
+ if (optind >= argc)
+ goto no_more_optchars;
+
+ /* If, when getopt() is called argv[optind] is a null pointer, getopt()
+ shall return -1 without changing optind. */
+ if (argv[optind] == NULL)
+ goto no_more_optchars;
+
+ /* If, when getopt() is called *argv[optind] is not the character '-',
+ getopt() shall return -1 without changing optind. */
+ if (*argv[optind] != '-')
+ goto no_more_optchars;
+
+ /* If, when getopt() is called argv[optind] points to the string "-",
+ getopt() shall return -1 without changing optind. */
+ if (strcmp(argv[optind], "-") == 0)
+ goto no_more_optchars;
+
+ /* If, when getopt() is called argv[optind] points to the string "--",
+ getopt() shall return -1 after incrementing optind. */
+ if (strcmp(argv[optind], "--") == 0) {
+ ++optind;
+ goto no_more_optchars;
+ }
+
+ if (optcursor == NULL || *optcursor == '\0')
+ optcursor = argv[optind] + 1;
+
+ optchar = *optcursor;
+
+ /* FreeBSD: The variable optopt saves the last known option character
+ returned by getopt(). */
+ optopt = optchar;
+
+ /* The getopt() function shall return the next option character (if one is
+ found) from argv that matches a character in optstring, if there is
+ one that matches. */
+ optdecl = strchr(optstring, optchar);
+ if (optdecl) {
+ /* [I]f a character is followed by a colon, the option takes an
+ argument. */
+ if (optdecl[1] == ':') {
+ optarg = ++optcursor;
+ if (*optarg == '\0') {
+ /* GNU extension: Two colons mean an option takes an
+ optional arg; if there is text in the current argv-element
+ (i.e., in the same word as the option name itself, for example,
+ "-oarg"), then it is returned in optarg, otherwise optarg is set
+ to zero. */
+ if (optdecl[2] != ':') {
+ /* If the option was the last character in the string pointed to by
+ an element of argv, then optarg shall contain the next element
+ of argv, and optind shall be incremented by 2. If the resulting
+ value of optind is greater than argc, this indicates a missing
+ option-argument, and getopt() shall return an error indication.
+
+ Otherwise, optarg shall point to the string following the
+ option character in that element of argv, and optind shall be
+ incremented by 1.
+ */
+ if (++optind < argc) {
+ optarg = argv[optind];
+ } else {
+ /* If it detects a missing option-argument, it shall return the
+ colon character ( ':' ) if the first character of optstring
+ was a colon, or a question-mark character ( '?' ) otherwise.
+ */
+ optarg = NULL;
+ optchar = (optstring[0] == ':') ? ':' : '?';
+ }
+ } else {
+ optarg = NULL;
+ }
+ }
+
+ optcursor = NULL;
+ }
+ } else {
+ /* If getopt() encounters an option character that is not contained in
+ optstring, it shall return the question-mark ( '?' ) character. */
+ optchar = '?';
+ }
+
+ if (optcursor == NULL || *++optcursor == '\0')
+ ++optind;
+
+ return optchar;
+
+no_more_optchars:
+ optcursor = NULL;
+ return -1;
+}
+
+/* Implementation based on [1].
+
+[1] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html
+*/
+int getopt_long(int argc, char* const argv[], const char* optstring,
+ const struct option* longopts, int* longindex) {
+ const struct option* o = longopts;
+ const struct option* match = NULL;
+ int num_matches = 0;
+ size_t argument_name_length = 0;
+ const char* current_argument = NULL;
+ int retval = -1;
+
+ optarg = NULL;
+ optopt = 0;
+
+ if (optind >= argc)
+ return -1;
+
+ if (strlen(argv[optind]) < 3 || strncmp(argv[optind], "--", 2) != 0)
+ return getopt(argc, argv, optstring);
+
+ /* It's an option; starts with -- and is longer than two chars. */
+ current_argument = argv[optind] + 2;
+ argument_name_length = strcspn(current_argument, "=");
+ for (; o->name; ++o) {
+ if (strncmp(o->name, current_argument, argument_name_length) == 0) {
+ match = o;
+ ++num_matches;
+ }
+ }
+
+ if (num_matches == 1) {
+ /* If longindex is not NULL, it points to a variable which is set to the
+ index of the long option relative to longopts. */
+ if (longindex)
+ *longindex = (int) (match - longopts);
+
+ /* If flag is NULL, then getopt_long() shall return val.
+ Otherwise, getopt_long() returns 0, and flag shall point to a variable
+ which shall be set to val if the option is found, but left unchanged if
+ the option is not found. */
+ if (match->flag)
+ *(match->flag) = match->val;
+
+ retval = match->flag ? 0 : match->val;
+
+ if (match->has_arg != no_argument) {
+ optarg = strchr(argv[optind], '=');
+ if (optarg != NULL)
+ ++optarg;
+
+ if (match->has_arg == required_argument) {
+ /* Only scan the next argv for required arguments. Behavior is not
+ specified, but has been observed with Ubuntu and Mac OSX. */
+ if (optarg == NULL && ++optind < argc) {
+ optarg = argv[optind];
+ }
+
+ if (optarg == NULL)
+ retval = ':';
+ }
+ } else if (strchr(argv[optind], '=')) {
+ /* An argument was provided to a non-argument option.
+ I haven't seen this specified explicitly, but both GNU and BSD-based
+ implementations show this behavior.
+ */
+ retval = '?';
+ }
+ } else {
+ /* Unknown option or ambiguous match. */
+ retval = '?';
+ }
+
+ ++optind;
+ return retval;
+}
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.h
new file mode 100644
index 0000000..e1eb540
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/getopt.h
@@ -0,0 +1,57 @@
+/* Copyright (c) 2012, Kim Gräsman
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Kim Gräsman nor the names of contributors may be used
+ * to endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef INCLUDED_GETOPT_PORT_H
+#define INCLUDED_GETOPT_PORT_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+extern const int no_argument;
+extern const int required_argument;
+extern const int optional_argument;
+
+extern char* optarg;
+extern int optind, opterr, optopt;
+
+struct option {
+ const char* name;
+ int has_arg;
+ int* flag;
+ int val;
+};
+
+int getopt(int argc, char* const argv[], const char* optstring);
+
+int getopt_long(int argc, char* const argv[],
+ const char* optstring, const struct option* longopts, int* longindex);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // INCLUDED_GETOPT_PORT_H
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/dummy.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/dummy.go
new file mode 100644
index 0000000..41053ac
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/dummy.go
@@ -0,0 +1,4 @@
+// +build required
+
+// Package dummy prevents go tooling from stripping the c dependencies.
+package dummy
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/gl.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/gl.h
new file mode 100644
index 0000000..5c7879f
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/gl.h
@@ -0,0 +1,3840 @@
+/**
+ * Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:32 2019
+ *
+ * Generator: C/C++
+ * Specification: gl
+ * Extensions: 3
+ *
+ * APIs:
+ * - gl:compatibility=3.3
+ *
+ * Options:
+ * - MX_GLOBAL = False
+ * - LOADER = False
+ * - ALIAS = False
+ * - HEADER_ONLY = False
+ * - DEBUG = False
+ * - MX = False
+ *
+ * Commandline:
+ * --api='gl:compatibility=3.3' --extensions='GL_ARB_multisample,GL_ARB_robustness,GL_KHR_debug' c
+ *
+ * Online:
+ * http://glad.sh/#api=gl%3Acompatibility%3D3.3&extensions=GL_ARB_multisample%2CGL_ARB_robustness%2CGL_KHR_debug&generator=c&options=
+ *
+ */
+
+#ifndef GLAD_GL_H_
+#define GLAD_GL_H_
+
+#ifdef __gl_h_
+ #error OpenGL header already included (API: gl), remove previous include!
+#endif
+#define __gl_h_ 1
+
+
+#define GLAD_GL
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GLAD_PLATFORM_H_
+#define GLAD_PLATFORM_H_
+
+#ifndef GLAD_PLATFORM_WIN32
+ #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
+ #define GLAD_PLATFORM_WIN32 1
+ #else
+ #define GLAD_PLATFORM_WIN32 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_APPLE
+ #ifdef __APPLE__
+ #define GLAD_PLATFORM_APPLE 1
+ #else
+ #define GLAD_PLATFORM_APPLE 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_EMSCRIPTEN
+ #ifdef __EMSCRIPTEN__
+ #define GLAD_PLATFORM_EMSCRIPTEN 1
+ #else
+ #define GLAD_PLATFORM_EMSCRIPTEN 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_UWP
+ #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
+ #ifdef __has_include
+ #if __has_include(<winapifamily.h>)
+ #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+ #endif
+ #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
+ #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+ #endif
+ #endif
+
+ #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
+ #include <winapifamily.h>
+ #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+ #define GLAD_PLATFORM_UWP 1
+ #endif
+ #endif
+
+ #ifndef GLAD_PLATFORM_UWP
+ #define GLAD_PLATFORM_UWP 0
+ #endif
+#endif
+
+#ifdef __GNUC__
+ #define GLAD_GNUC_EXTENSION __extension__
+#else
+ #define GLAD_GNUC_EXTENSION
+#endif
+
+#ifndef GLAD_API_CALL
+ #if defined(GLAD_API_CALL_EXPORT)
+ #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
+ #if defined(GLAD_API_CALL_EXPORT_BUILD)
+ #if defined(__GNUC__)
+ #define GLAD_API_CALL __attribute__ ((dllexport)) extern
+ #else
+ #define GLAD_API_CALL __declspec(dllexport) extern
+ #endif
+ #else
+ #if defined(__GNUC__)
+ #define GLAD_API_CALL __attribute__ ((dllimport)) extern
+ #else
+ #define GLAD_API_CALL __declspec(dllimport) extern
+ #endif
+ #endif
+ #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
+ #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
+ #else
+ #define GLAD_API_CALL extern
+ #endif
+ #else
+ #define GLAD_API_CALL extern
+ #endif
+#endif
+
+#ifdef APIENTRY
+ #define GLAD_API_PTR APIENTRY
+#elif GLAD_PLATFORM_WIN32
+ #define GLAD_API_PTR __stdcall
+#else
+ #define GLAD_API_PTR
+#endif
+
+#ifndef GLAPI
+#define GLAPI GLAD_API_CALL
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY GLAD_API_PTR
+#endif
+
+
+#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
+#define GLAD_VERSION_MAJOR(version) (version / 10000)
+#define GLAD_VERSION_MINOR(version) (version % 10000)
+
+typedef void (*GLADapiproc)(void);
+
+typedef GLADapiproc (*GLADloadfunc)(const char *name);
+typedef GLADapiproc (*GLADuserptrloadfunc)(const char *name, void *userptr);
+
+typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
+typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
+
+#endif /* GLAD_PLATFORM_H_ */
+
+#define GL_2D 0x0600
+#define GL_2_BYTES 0x1407
+#define GL_3D 0x0601
+#define GL_3D_COLOR 0x0602
+#define GL_3D_COLOR_TEXTURE 0x0603
+#define GL_3_BYTES 0x1408
+#define GL_4D_COLOR_TEXTURE 0x0604
+#define GL_4_BYTES 0x1409
+#define GL_ACCUM 0x0100
+#define GL_ACCUM_ALPHA_BITS 0x0D5B
+#define GL_ACCUM_BLUE_BITS 0x0D5A
+#define GL_ACCUM_BUFFER_BIT 0x00000200
+#define GL_ACCUM_CLEAR_VALUE 0x0B80
+#define GL_ACCUM_GREEN_BITS 0x0D59
+#define GL_ACCUM_RED_BITS 0x0D58
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_ADD 0x0104
+#define GL_ADD_SIGNED 0x8574
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALL_ATTRIB_BITS 0xFFFFFFFF
+#define GL_ALPHA 0x1906
+#define GL_ALPHA12 0x803D
+#define GL_ALPHA16 0x803E
+#define GL_ALPHA4 0x803B
+#define GL_ALPHA8 0x803C
+#define GL_ALPHA_BIAS 0x0D1D
+#define GL_ALPHA_BITS 0x0D55
+#define GL_ALPHA_INTEGER 0x8D97
+#define GL_ALPHA_SCALE 0x0D1C
+#define GL_ALPHA_TEST 0x0BC0
+#define GL_ALPHA_TEST_FUNC 0x0BC1
+#define GL_ALPHA_TEST_REF 0x0BC2
+#define GL_ALREADY_SIGNALED 0x911A
+#define GL_ALWAYS 0x0207
+#define GL_AMBIENT 0x1200
+#define GL_AMBIENT_AND_DIFFUSE 0x1602
+#define GL_AND 0x1501
+#define GL_AND_INVERTED 0x1504
+#define GL_AND_REVERSE 0x1502
+#define GL_ANY_SAMPLES_PASSED 0x8C2F
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
+#define GL_AUTO_NORMAL 0x0D80
+#define GL_AUX0 0x0409
+#define GL_AUX1 0x040A
+#define GL_AUX2 0x040B
+#define GL_AUX3 0x040C
+#define GL_AUX_BUFFERS 0x0C00
+#define GL_BACK 0x0405
+#define GL_BACK_LEFT 0x0402
+#define GL_BACK_RIGHT 0x0403
+#define GL_BGR 0x80E0
+#define GL_BGRA 0x80E1
+#define GL_BGRA_INTEGER 0x8D9B
+#define GL_BGR_INTEGER 0x8D9A
+#define GL_BITMAP 0x1A00
+#define GL_BITMAP_TOKEN 0x0704
+#define GL_BLEND 0x0BE2
+#define GL_BLEND_COLOR 0x8005
+#define GL_BLEND_DST 0x0BE0
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_EQUATION 0x8009
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_BLEND_EQUATION_RGB 0x8009
+#define GL_BLEND_SRC 0x0BE1
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLUE 0x1905
+#define GL_BLUE_BIAS 0x0D1B
+#define GL_BLUE_BITS 0x0D54
+#define GL_BLUE_INTEGER 0x8D96
+#define GL_BLUE_SCALE 0x0D1A
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_BUFFER 0x82E0
+#define GL_BUFFER_ACCESS 0x88BB
+#define GL_BUFFER_ACCESS_FLAGS 0x911F
+#define GL_BUFFER_MAPPED 0x88BC
+#define GL_BUFFER_MAP_LENGTH 0x9120
+#define GL_BUFFER_MAP_OFFSET 0x9121
+#define GL_BUFFER_MAP_POINTER 0x88BD
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+#define GL_BYTE 0x1400
+#define GL_C3F_V3F 0x2A24
+#define GL_C4F_N3F_V3F 0x2A26
+#define GL_C4UB_V2F 0x2A22
+#define GL_C4UB_V3F 0x2A23
+#define GL_CCW 0x0901
+#define GL_CLAMP 0x2900
+#define GL_CLAMP_FRAGMENT_COLOR 0x891B
+#define GL_CLAMP_READ_COLOR 0x891C
+#define GL_CLAMP_TO_BORDER 0x812D
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_CLAMP_VERTEX_COLOR 0x891A
+#define GL_CLEAR 0x1500
+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
+#define GL_CLIP_DISTANCE0 0x3000
+#define GL_CLIP_DISTANCE1 0x3001
+#define GL_CLIP_DISTANCE2 0x3002
+#define GL_CLIP_DISTANCE3 0x3003
+#define GL_CLIP_DISTANCE4 0x3004
+#define GL_CLIP_DISTANCE5 0x3005
+#define GL_CLIP_DISTANCE6 0x3006
+#define GL_CLIP_DISTANCE7 0x3007
+#define GL_CLIP_PLANE0 0x3000
+#define GL_CLIP_PLANE1 0x3001
+#define GL_CLIP_PLANE2 0x3002
+#define GL_CLIP_PLANE3 0x3003
+#define GL_CLIP_PLANE4 0x3004
+#define GL_CLIP_PLANE5 0x3005
+#define GL_COEFF 0x0A00
+#define GL_COLOR 0x1800
+#define GL_COLOR_ARRAY 0x8076
+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define GL_COLOR_ARRAY_POINTER 0x8090
+#define GL_COLOR_ARRAY_SIZE 0x8081
+#define GL_COLOR_ARRAY_STRIDE 0x8083
+#define GL_COLOR_ARRAY_TYPE 0x8082
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_COLOR_ATTACHMENT1 0x8CE1
+#define GL_COLOR_ATTACHMENT10 0x8CEA
+#define GL_COLOR_ATTACHMENT11 0x8CEB
+#define GL_COLOR_ATTACHMENT12 0x8CEC
+#define GL_COLOR_ATTACHMENT13 0x8CED
+#define GL_COLOR_ATTACHMENT14 0x8CEE
+#define GL_COLOR_ATTACHMENT15 0x8CEF
+#define GL_COLOR_ATTACHMENT16 0x8CF0
+#define GL_COLOR_ATTACHMENT17 0x8CF1
+#define GL_COLOR_ATTACHMENT18 0x8CF2
+#define GL_COLOR_ATTACHMENT19 0x8CF3
+#define GL_COLOR_ATTACHMENT2 0x8CE2
+#define GL_COLOR_ATTACHMENT20 0x8CF4
+#define GL_COLOR_ATTACHMENT21 0x8CF5
+#define GL_COLOR_ATTACHMENT22 0x8CF6
+#define GL_COLOR_ATTACHMENT23 0x8CF7
+#define GL_COLOR_ATTACHMENT24 0x8CF8
+#define GL_COLOR_ATTACHMENT25 0x8CF9
+#define GL_COLOR_ATTACHMENT26 0x8CFA
+#define GL_COLOR_ATTACHMENT27 0x8CFB
+#define GL_COLOR_ATTACHMENT28 0x8CFC
+#define GL_COLOR_ATTACHMENT29 0x8CFD
+#define GL_COLOR_ATTACHMENT3 0x8CE3
+#define GL_COLOR_ATTACHMENT30 0x8CFE
+#define GL_COLOR_ATTACHMENT31 0x8CFF
+#define GL_COLOR_ATTACHMENT4 0x8CE4
+#define GL_COLOR_ATTACHMENT5 0x8CE5
+#define GL_COLOR_ATTACHMENT6 0x8CE6
+#define GL_COLOR_ATTACHMENT7 0x8CE7
+#define GL_COLOR_ATTACHMENT8 0x8CE8
+#define GL_COLOR_ATTACHMENT9 0x8CE9
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_INDEX 0x1900
+#define GL_COLOR_INDEXES 0x1603
+#define GL_COLOR_LOGIC_OP 0x0BF2
+#define GL_COLOR_MATERIAL 0x0B57
+#define GL_COLOR_MATERIAL_FACE 0x0B55
+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
+#define GL_COLOR_SUM 0x8458
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_COMBINE 0x8570
+#define GL_COMBINE_ALPHA 0x8572
+#define GL_COMBINE_RGB 0x8571
+#define GL_COMPARE_REF_TO_TEXTURE 0x884E
+#define GL_COMPARE_R_TO_TEXTURE 0x884E
+#define GL_COMPILE 0x1300
+#define GL_COMPILE_AND_EXECUTE 0x1301
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_COMPRESSED_ALPHA 0x84E9
+#define GL_COMPRESSED_INTENSITY 0x84EC
+#define GL_COMPRESSED_LUMINANCE 0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
+#define GL_COMPRESSED_RED 0x8225
+#define GL_COMPRESSED_RED_RGTC1 0x8DBB
+#define GL_COMPRESSED_RG 0x8226
+#define GL_COMPRESSED_RGB 0x84ED
+#define GL_COMPRESSED_RGBA 0x84EE
+#define GL_COMPRESSED_RG_RGTC2 0x8DBD
+#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
+#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
+#define GL_COMPRESSED_SRGB 0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define GL_CONDITION_SATISFIED 0x911C
+#define GL_CONSTANT 0x8576
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_CONSTANT_ATTENUATION 0x1207
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
+#define GL_CONTEXT_FLAGS 0x821E
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+#define GL_COORD_REPLACE 0x8862
+#define GL_COPY 0x1503
+#define GL_COPY_INVERTED 0x150C
+#define GL_COPY_PIXEL_TOKEN 0x0706
+#define GL_COPY_READ_BUFFER 0x8F36
+#define GL_COPY_WRITE_BUFFER 0x8F37
+#define GL_CULL_FACE 0x0B44
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_CURRENT_BIT 0x00000001
+#define GL_CURRENT_COLOR 0x0B00
+#define GL_CURRENT_FOG_COORD 0x8453
+#define GL_CURRENT_FOG_COORDINATE 0x8453
+#define GL_CURRENT_INDEX 0x0B01
+#define GL_CURRENT_NORMAL 0x0B02
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_CURRENT_QUERY 0x8865
+#define GL_CURRENT_RASTER_COLOR 0x0B04
+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
+#define GL_CURRENT_RASTER_INDEX 0x0B05
+#define GL_CURRENT_RASTER_POSITION 0x0B07
+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
+#define GL_CURRENT_SECONDARY_COLOR 0x8459
+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_CW 0x0900
+#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
+#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
+#define GL_DEBUG_LOGGED_MESSAGES 0x9145
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
+#define GL_DEBUG_OUTPUT 0x92E0
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
+#define GL_DEBUG_SEVERITY_HIGH 0x9146
+#define GL_DEBUG_SEVERITY_LOW 0x9148
+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
+#define GL_DEBUG_SOURCE_API 0x8246
+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
+#define GL_DEBUG_SOURCE_OTHER 0x824B
+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
+#define GL_DEBUG_TYPE_ERROR 0x824C
+#define GL_DEBUG_TYPE_MARKER 0x8268
+#define GL_DEBUG_TYPE_OTHER 0x8251
+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
+#define GL_DEBUG_TYPE_POP_GROUP 0x826A
+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
+#define GL_DECAL 0x2101
+#define GL_DECR 0x1E03
+#define GL_DECR_WRAP 0x8508
+#define GL_DELETE_STATUS 0x8B80
+#define GL_DEPTH 0x1801
+#define GL_DEPTH24_STENCIL8 0x88F0
+#define GL_DEPTH32F_STENCIL8 0x8CAD
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_DEPTH_BIAS 0x0D1F
+#define GL_DEPTH_BITS 0x0D56
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_DEPTH_CLAMP 0x864F
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32 0x81A7
+#define GL_DEPTH_COMPONENT32F 0x8CAC
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_SCALE 0x0D1E
+#define GL_DEPTH_STENCIL 0x84F9
+#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_TEXTURE_MODE 0x884B
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DIFFUSE 0x1201
+#define GL_DISPLAY_LIST 0x82E7
+#define GL_DITHER 0x0BD0
+#define GL_DOMAIN 0x0A02
+#define GL_DONT_CARE 0x1100
+#define GL_DOT3_RGB 0x86AE
+#define GL_DOT3_RGBA 0x86AF
+#define GL_DOUBLE 0x140A
+#define GL_DOUBLEBUFFER 0x0C32
+#define GL_DRAW_BUFFER 0x0C01
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_FRAMEBUFFER 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_DRAW_PIXEL_TOKEN 0x0705
+#define GL_DST_ALPHA 0x0304
+#define GL_DST_COLOR 0x0306
+#define GL_DYNAMIC_COPY 0x88EA
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_EDGE_FLAG 0x0B43
+#define GL_EDGE_FLAG_ARRAY 0x8079
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_EMISSION 0x1600
+#define GL_ENABLE_BIT 0x00002000
+#define GL_EQUAL 0x0202
+#define GL_EQUIV 0x1509
+#define GL_EVAL_BIT 0x00010000
+#define GL_EXP 0x0800
+#define GL_EXP2 0x0801
+#define GL_EXTENSIONS 0x1F03
+#define GL_EYE_LINEAR 0x2400
+#define GL_EYE_PLANE 0x2502
+#define GL_FALSE 0
+#define GL_FASTEST 0x1101
+#define GL_FEEDBACK 0x1C01
+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
+#define GL_FILL 0x1B02
+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
+#define GL_FIXED_ONLY 0x891D
+#define GL_FLAT 0x1D00
+#define GL_FLOAT 0x1406
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT2x3 0x8B65
+#define GL_FLOAT_MAT2x4 0x8B66
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT3x2 0x8B67
+#define GL_FLOAT_MAT3x4 0x8B68
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_FLOAT_MAT4x2 0x8B69
+#define GL_FLOAT_MAT4x3 0x8B6A
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_FOG 0x0B60
+#define GL_FOG_BIT 0x00000080
+#define GL_FOG_COLOR 0x0B66
+#define GL_FOG_COORD 0x8451
+#define GL_FOG_COORDINATE 0x8451
+#define GL_FOG_COORDINATE_ARRAY 0x8457
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
+#define GL_FOG_COORDINATE_SOURCE 0x8450
+#define GL_FOG_COORD_ARRAY 0x8457
+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
+#define GL_FOG_COORD_ARRAY_POINTER 0x8456
+#define GL_FOG_COORD_ARRAY_STRIDE 0x8455
+#define GL_FOG_COORD_ARRAY_TYPE 0x8454
+#define GL_FOG_COORD_SRC 0x8450
+#define GL_FOG_DENSITY 0x0B62
+#define GL_FOG_END 0x0B64
+#define GL_FOG_HINT 0x0C54
+#define GL_FOG_INDEX 0x0B61
+#define GL_FOG_MODE 0x0B65
+#define GL_FOG_START 0x0B63
+#define GL_FRAGMENT_DEPTH 0x8452
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_DEFAULT 0x8218
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
+#define GL_FRAMEBUFFER_SRGB 0x8DB9
+#define GL_FRAMEBUFFER_UNDEFINED 0x8219
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+#define GL_FRONT 0x0404
+#define GL_FRONT_AND_BACK 0x0408
+#define GL_FRONT_FACE 0x0B46
+#define GL_FRONT_LEFT 0x0400
+#define GL_FRONT_RIGHT 0x0401
+#define GL_FUNC_ADD 0x8006
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_GENERATE_MIPMAP 0x8191
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+#define GL_GEOMETRY_INPUT_TYPE 0x8917
+#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
+#define GL_GEOMETRY_SHADER 0x8DD9
+#define GL_GEOMETRY_VERTICES_OUT 0x8916
+#define GL_GEQUAL 0x0206
+#define GL_GREATER 0x0204
+#define GL_GREEN 0x1904
+#define GL_GREEN_BIAS 0x0D19
+#define GL_GREEN_BITS 0x0D53
+#define GL_GREEN_INTEGER 0x8D95
+#define GL_GREEN_SCALE 0x0D18
+#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
+#define GL_HALF_FLOAT 0x140B
+#define GL_HINT_BIT 0x00008000
+#define GL_INCR 0x1E02
+#define GL_INCR_WRAP 0x8507
+#define GL_INDEX 0x8222
+#define GL_INDEX_ARRAY 0x8077
+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
+#define GL_INDEX_ARRAY_POINTER 0x8091
+#define GL_INDEX_ARRAY_STRIDE 0x8086
+#define GL_INDEX_ARRAY_TYPE 0x8085
+#define GL_INDEX_BITS 0x0D51
+#define GL_INDEX_CLEAR_VALUE 0x0C20
+#define GL_INDEX_LOGIC_OP 0x0BF1
+#define GL_INDEX_MODE 0x0C30
+#define GL_INDEX_OFFSET 0x0D13
+#define GL_INDEX_SHIFT 0x0D12
+#define GL_INDEX_WRITEMASK 0x0C21
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
+#define GL_INT 0x1404
+#define GL_INTENSITY 0x8049
+#define GL_INTENSITY12 0x804C
+#define GL_INTENSITY16 0x804D
+#define GL_INTENSITY4 0x804A
+#define GL_INTENSITY8 0x804B
+#define GL_INTERLEAVED_ATTRIBS 0x8C8C
+#define GL_INTERPOLATE 0x8575
+#define GL_INT_2_10_10_10_REV 0x8D9F
+#define GL_INT_SAMPLER_1D 0x8DC9
+#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
+#define GL_INT_SAMPLER_2D 0x8DCA
+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
+#define GL_INT_SAMPLER_3D 0x8DCB
+#define GL_INT_SAMPLER_BUFFER 0x8DD0
+#define GL_INT_SAMPLER_CUBE 0x8DCC
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+#define GL_INVALID_INDEX 0xFFFFFFFF
+#define GL_INVALID_OPERATION 0x0502
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVERT 0x150A
+#define GL_KEEP 0x1E00
+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
+#define GL_LEFT 0x0406
+#define GL_LEQUAL 0x0203
+#define GL_LESS 0x0201
+#define GL_LIGHT0 0x4000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
+#define GL_LIGHTING 0x0B50
+#define GL_LIGHTING_BIT 0x00000040
+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
+#define GL_LINE 0x1B01
+#define GL_LINEAR 0x2601
+#define GL_LINEAR_ATTENUATION 0x1208
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_LINES 0x0001
+#define GL_LINES_ADJACENCY 0x000A
+#define GL_LINE_BIT 0x00000004
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_RESET_TOKEN 0x0707
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_LINE_SMOOTH_HINT 0x0C52
+#define GL_LINE_STIPPLE 0x0B24
+#define GL_LINE_STIPPLE_PATTERN 0x0B25
+#define GL_LINE_STIPPLE_REPEAT 0x0B26
+#define GL_LINE_STRIP 0x0003
+#define GL_LINE_STRIP_ADJACENCY 0x000B
+#define GL_LINE_TOKEN 0x0702
+#define GL_LINE_WIDTH 0x0B21
+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_LINE_WIDTH_RANGE 0x0B22
+#define GL_LINK_STATUS 0x8B82
+#define GL_LIST_BASE 0x0B32
+#define GL_LIST_BIT 0x00020000
+#define GL_LIST_INDEX 0x0B33
+#define GL_LIST_MODE 0x0B30
+#define GL_LOAD 0x0101
+#define GL_LOGIC_OP 0x0BF1
+#define GL_LOGIC_OP_MODE 0x0BF0
+#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE12 0x8041
+#define GL_LUMINANCE12_ALPHA12 0x8047
+#define GL_LUMINANCE12_ALPHA4 0x8046
+#define GL_LUMINANCE16 0x8042
+#define GL_LUMINANCE16_ALPHA16 0x8048
+#define GL_LUMINANCE4 0x803F
+#define GL_LUMINANCE4_ALPHA4 0x8043
+#define GL_LUMINANCE6_ALPHA2 0x8044
+#define GL_LUMINANCE8 0x8040
+#define GL_LUMINANCE8_ALPHA8 0x8045
+#define GL_LUMINANCE_ALPHA 0x190A
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MAP1_COLOR_4 0x0D90
+#define GL_MAP1_GRID_DOMAIN 0x0DD0
+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
+#define GL_MAP1_INDEX 0x0D91
+#define GL_MAP1_NORMAL 0x0D92
+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
+#define GL_MAP1_VERTEX_3 0x0D97
+#define GL_MAP1_VERTEX_4 0x0D98
+#define GL_MAP2_COLOR_4 0x0DB0
+#define GL_MAP2_GRID_DOMAIN 0x0DD2
+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
+#define GL_MAP2_INDEX 0x0DB1
+#define GL_MAP2_NORMAL 0x0DB2
+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
+#define GL_MAP2_VERTEX_3 0x0DB7
+#define GL_MAP2_VERTEX_4 0x0DB8
+#define GL_MAP_COLOR 0x0D10
+#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
+#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
+#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
+#define GL_MAP_READ_BIT 0x0001
+#define GL_MAP_STENCIL 0x0D11
+#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
+#define GL_MAP_WRITE_BIT 0x0002
+#define GL_MATRIX_MODE 0x0BA0
+#define GL_MAX 0x8008
+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
+#define GL_MAX_CLIP_DISTANCES 0x0D32
+#define GL_MAX_CLIP_PLANES 0x0D32
+#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
+#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
+#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define GL_MAX_EVAL_ORDER 0x0D30
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
+#define GL_MAX_INTEGER_SAMPLES 0x9110
+#define GL_MAX_LABEL_LENGTH 0x82E8
+#define GL_MAX_LIGHTS 0x0D31
+#define GL_MAX_LIST_NESTING 0x0B31
+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
+#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+#define GL_MAX_SAMPLES 0x8D57
+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
+#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
+#define GL_MAX_TEXTURE_COORDS 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
+#define GL_MAX_VARYING_COMPONENTS 0x8B4B
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_MIN 0x8007
+#define GL_MINOR_VERSION 0x821C
+#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
+#define GL_MIRRORED_REPEAT 0x8370
+#define GL_MODELVIEW 0x1700
+#define GL_MODELVIEW_MATRIX 0x0BA6
+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
+#define GL_MODULATE 0x2100
+#define GL_MULT 0x0103
+#define GL_MULTISAMPLE 0x809D
+#define GL_MULTISAMPLE_ARB 0x809D
+#define GL_MULTISAMPLE_BIT 0x20000000
+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
+#define GL_N3F_V3F 0x2A25
+#define GL_NAME_STACK_DEPTH 0x0D70
+#define GL_NAND 0x150E
+#define GL_NEAREST 0x2600
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_NEVER 0x0200
+#define GL_NICEST 0x1102
+#define GL_NONE 0
+#define GL_NOOP 0x1505
+#define GL_NOR 0x1508
+#define GL_NORMALIZE 0x0BA1
+#define GL_NORMAL_ARRAY 0x8075
+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define GL_NORMAL_ARRAY_POINTER 0x808F
+#define GL_NORMAL_ARRAY_STRIDE 0x807F
+#define GL_NORMAL_ARRAY_TYPE 0x807E
+#define GL_NORMAL_MAP 0x8511
+#define GL_NOTEQUAL 0x0205
+#define GL_NO_ERROR 0
+#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_NUM_EXTENSIONS 0x821D
+#define GL_OBJECT_LINEAR 0x2401
+#define GL_OBJECT_PLANE 0x2501
+#define GL_OBJECT_TYPE 0x9112
+#define GL_ONE 1
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
+#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_OPERAND0_ALPHA 0x8598
+#define GL_OPERAND0_RGB 0x8590
+#define GL_OPERAND1_ALPHA 0x8599
+#define GL_OPERAND1_RGB 0x8591
+#define GL_OPERAND2_ALPHA 0x859A
+#define GL_OPERAND2_RGB 0x8592
+#define GL_OR 0x1507
+#define GL_ORDER 0x0A01
+#define GL_OR_INVERTED 0x150D
+#define GL_OR_REVERSE 0x150B
+#define GL_OUT_OF_MEMORY 0x0505
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_PACK_IMAGE_HEIGHT 0x806C
+#define GL_PACK_LSB_FIRST 0x0D01
+#define GL_PACK_ROW_LENGTH 0x0D02
+#define GL_PACK_SKIP_IMAGES 0x806B
+#define GL_PACK_SKIP_PIXELS 0x0D04
+#define GL_PACK_SKIP_ROWS 0x0D03
+#define GL_PACK_SWAP_BYTES 0x0D00
+#define GL_PASS_THROUGH_TOKEN 0x0700
+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
+#define GL_PIXEL_MAP_A_TO_A 0x0C79
+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
+#define GL_PIXEL_MAP_B_TO_B 0x0C78
+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
+#define GL_PIXEL_MAP_G_TO_G 0x0C77
+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
+#define GL_PIXEL_MAP_I_TO_A 0x0C75
+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
+#define GL_PIXEL_MAP_I_TO_B 0x0C74
+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
+#define GL_PIXEL_MAP_I_TO_G 0x0C73
+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
+#define GL_PIXEL_MAP_I_TO_I 0x0C70
+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
+#define GL_PIXEL_MAP_I_TO_R 0x0C72
+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
+#define GL_PIXEL_MAP_R_TO_R 0x0C76
+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
+#define GL_PIXEL_MAP_S_TO_S 0x0C71
+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
+#define GL_PIXEL_MODE_BIT 0x00000020
+#define GL_PIXEL_PACK_BUFFER 0x88EB
+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
+#define GL_POINT 0x1B00
+#define GL_POINTS 0x0000
+#define GL_POINT_BIT 0x00000002
+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_POINT_SIZE_MAX 0x8127
+#define GL_POINT_SIZE_MIN 0x8126
+#define GL_POINT_SIZE_RANGE 0x0B12
+#define GL_POINT_SMOOTH 0x0B10
+#define GL_POINT_SMOOTH_HINT 0x0C51
+#define GL_POINT_SPRITE 0x8861
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_POINT_TOKEN 0x0701
+#define GL_POLYGON 0x0009
+#define GL_POLYGON_BIT 0x00000008
+#define GL_POLYGON_MODE 0x0B40
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_POLYGON_OFFSET_LINE 0x2A02
+#define GL_POLYGON_OFFSET_POINT 0x2A01
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_POLYGON_SMOOTH 0x0B41
+#define GL_POLYGON_SMOOTH_HINT 0x0C53
+#define GL_POLYGON_STIPPLE 0x0B42
+#define GL_POLYGON_STIPPLE_BIT 0x00000010
+#define GL_POLYGON_TOKEN 0x0703
+#define GL_POSITION 0x1203
+#define GL_PREVIOUS 0x8578
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PRIMITIVES_GENERATED 0x8C87
+#define GL_PRIMITIVE_RESTART 0x8F9D
+#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
+#define GL_PROGRAM 0x82E2
+#define GL_PROGRAM_PIPELINE 0x82E4
+#define GL_PROGRAM_POINT_SIZE 0x8642
+#define GL_PROJECTION 0x1701
+#define GL_PROJECTION_MATRIX 0x0BA7
+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
+#define GL_PROVOKING_VERTEX 0x8E4F
+#define GL_PROXY_TEXTURE_1D 0x8063
+#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
+#define GL_PROXY_TEXTURE_2D 0x8064
+#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
+#define GL_PROXY_TEXTURE_3D 0x8070
+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
+#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
+#define GL_Q 0x2003
+#define GL_QUADRATIC_ATTENUATION 0x1209
+#define GL_QUADS 0x0007
+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
+#define GL_QUAD_STRIP 0x0008
+#define GL_QUERY 0x82E3
+#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
+#define GL_QUERY_BY_REGION_WAIT 0x8E15
+#define GL_QUERY_COUNTER_BITS 0x8864
+#define GL_QUERY_NO_WAIT 0x8E14
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_QUERY_WAIT 0x8E13
+#define GL_R 0x2002
+#define GL_R11F_G11F_B10F 0x8C3A
+#define GL_R16 0x822A
+#define GL_R16F 0x822D
+#define GL_R16I 0x8233
+#define GL_R16UI 0x8234
+#define GL_R16_SNORM 0x8F98
+#define GL_R32F 0x822E
+#define GL_R32I 0x8235
+#define GL_R32UI 0x8236
+#define GL_R3_G3_B2 0x2A10
+#define GL_R8 0x8229
+#define GL_R8I 0x8231
+#define GL_R8UI 0x8232
+#define GL_R8_SNORM 0x8F94
+#define GL_RASTERIZER_DISCARD 0x8C89
+#define GL_READ_BUFFER 0x0C02
+#define GL_READ_FRAMEBUFFER 0x8CA8
+#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
+#define GL_READ_ONLY 0x88B8
+#define GL_READ_WRITE 0x88BA
+#define GL_RED 0x1903
+#define GL_RED_BIAS 0x0D15
+#define GL_RED_BITS 0x0D52
+#define GL_RED_INTEGER 0x8D94
+#define GL_RED_SCALE 0x0D14
+#define GL_REFLECTION_MAP 0x8512
+#define GL_RENDER 0x1C00
+#define GL_RENDERBUFFER 0x8D41
+#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define GL_RENDERBUFFER_HEIGHT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define GL_RENDERBUFFER_SAMPLES 0x8CAB
+#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+#define GL_RENDERBUFFER_WIDTH 0x8D42
+#define GL_RENDERER 0x1F01
+#define GL_RENDER_MODE 0x0C40
+#define GL_REPEAT 0x2901
+#define GL_REPLACE 0x1E01
+#define GL_RESCALE_NORMAL 0x803A
+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GL_RETURN 0x0102
+#define GL_RG 0x8227
+#define GL_RG16 0x822C
+#define GL_RG16F 0x822F
+#define GL_RG16I 0x8239
+#define GL_RG16UI 0x823A
+#define GL_RG16_SNORM 0x8F99
+#define GL_RG32F 0x8230
+#define GL_RG32I 0x823B
+#define GL_RG32UI 0x823C
+#define GL_RG8 0x822B
+#define GL_RG8I 0x8237
+#define GL_RG8UI 0x8238
+#define GL_RG8_SNORM 0x8F95
+#define GL_RGB 0x1907
+#define GL_RGB10 0x8052
+#define GL_RGB10_A2 0x8059
+#define GL_RGB10_A2UI 0x906F
+#define GL_RGB12 0x8053
+#define GL_RGB16 0x8054
+#define GL_RGB16F 0x881B
+#define GL_RGB16I 0x8D89
+#define GL_RGB16UI 0x8D77
+#define GL_RGB16_SNORM 0x8F9A
+#define GL_RGB32F 0x8815
+#define GL_RGB32I 0x8D83
+#define GL_RGB32UI 0x8D71
+#define GL_RGB4 0x804F
+#define GL_RGB5 0x8050
+#define GL_RGB5_A1 0x8057
+#define GL_RGB8 0x8051
+#define GL_RGB8I 0x8D8F
+#define GL_RGB8UI 0x8D7D
+#define GL_RGB8_SNORM 0x8F96
+#define GL_RGB9_E5 0x8C3D
+#define GL_RGBA 0x1908
+#define GL_RGBA12 0x805A
+#define GL_RGBA16 0x805B
+#define GL_RGBA16F 0x881A
+#define GL_RGBA16I 0x8D88
+#define GL_RGBA16UI 0x8D76
+#define GL_RGBA16_SNORM 0x8F9B
+#define GL_RGBA2 0x8055
+#define GL_RGBA32F 0x8814
+#define GL_RGBA32I 0x8D82
+#define GL_RGBA32UI 0x8D70
+#define GL_RGBA4 0x8056
+#define GL_RGBA8 0x8058
+#define GL_RGBA8I 0x8D8E
+#define GL_RGBA8UI 0x8D7C
+#define GL_RGBA8_SNORM 0x8F97
+#define GL_RGBA_INTEGER 0x8D99
+#define GL_RGBA_MODE 0x0C31
+#define GL_RGB_INTEGER 0x8D98
+#define GL_RGB_SCALE 0x8573
+#define GL_RG_INTEGER 0x8228
+#define GL_RIGHT 0x0407
+#define GL_S 0x2000
+#define GL_SAMPLER 0x82E6
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_1D_ARRAY 0x8DC0
+#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_2D_ARRAY 0x8DC1
+#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
+#define GL_SAMPLER_2D_RECT 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_BINDING 0x8919
+#define GL_SAMPLER_BUFFER 0x8DC2
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLES_ARB 0x80A9
+#define GL_SAMPLES_PASSED 0x8914
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
+#define GL_SAMPLE_COVERAGE 0x80A0
+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
+#define GL_SAMPLE_MASK 0x8E51
+#define GL_SAMPLE_MASK_VALUE 0x8E52
+#define GL_SAMPLE_POSITION 0x8E50
+#define GL_SCISSOR_BIT 0x00080000
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_SECONDARY_COLOR_ARRAY 0x845E
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
+#define GL_SELECT 0x1C02
+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
+#define GL_SEPARATE_ATTRIBS 0x8C8D
+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
+#define GL_SET 0x150F
+#define GL_SHADER 0x82E1
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_SHADE_MODEL 0x0B54
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_SHININESS 0x1601
+#define GL_SHORT 0x1402
+#define GL_SIGNALED 0x9119
+#define GL_SIGNED_NORMALIZED 0x8F9C
+#define GL_SINGLE_COLOR 0x81F9
+#define GL_SLUMINANCE 0x8C46
+#define GL_SLUMINANCE8 0x8C47
+#define GL_SLUMINANCE8_ALPHA8 0x8C45
+#define GL_SLUMINANCE_ALPHA 0x8C44
+#define GL_SMOOTH 0x1D01
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_SOURCE0_ALPHA 0x8588
+#define GL_SOURCE0_RGB 0x8580
+#define GL_SOURCE1_ALPHA 0x8589
+#define GL_SOURCE1_RGB 0x8581
+#define GL_SOURCE2_ALPHA 0x858A
+#define GL_SOURCE2_RGB 0x8582
+#define GL_SPECULAR 0x1202
+#define GL_SPHERE_MAP 0x2402
+#define GL_SPOT_CUTOFF 0x1206
+#define GL_SPOT_DIRECTION 0x1204
+#define GL_SPOT_EXPONENT 0x1205
+#define GL_SRC0_ALPHA 0x8588
+#define GL_SRC0_RGB 0x8580
+#define GL_SRC1_ALPHA 0x8589
+#define GL_SRC1_COLOR 0x88F9
+#define GL_SRC1_RGB 0x8581
+#define GL_SRC2_ALPHA 0x858A
+#define GL_SRC2_RGB 0x8582
+#define GL_SRC_ALPHA 0x0302
+#define GL_SRC_ALPHA_SATURATE 0x0308
+#define GL_SRC_COLOR 0x0300
+#define GL_SRGB 0x8C40
+#define GL_SRGB8 0x8C41
+#define GL_SRGB8_ALPHA8 0x8C43
+#define GL_SRGB_ALPHA 0x8C42
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+#define GL_STATIC_COPY 0x88E6
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STENCIL 0x1802
+#define GL_STENCIL_ATTACHMENT 0x8D20
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#define GL_STENCIL_BITS 0x0D57
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_INDEX 0x1901
+#define GL_STENCIL_INDEX1 0x8D46
+#define GL_STENCIL_INDEX16 0x8D49
+#define GL_STENCIL_INDEX4 0x8D47
+#define GL_STENCIL_INDEX8 0x8D48
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_TEST 0x0B90
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_STEREO 0x0C33
+#define GL_STREAM_COPY 0x88E2
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_SUBTRACT 0x84E7
+#define GL_SYNC_CONDITION 0x9113
+#define GL_SYNC_FENCE 0x9116
+#define GL_SYNC_FLAGS 0x9115
+#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
+#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
+#define GL_SYNC_STATUS 0x9114
+#define GL_T 0x2001
+#define GL_T2F_C3F_V3F 0x2A2A
+#define GL_T2F_C4F_N3F_V3F 0x2A2C
+#define GL_T2F_C4UB_V3F 0x2A29
+#define GL_T2F_N3F_V3F 0x2A2B
+#define GL_T2F_V3F 0x2A27
+#define GL_T4F_C4F_N3F_V4F 0x2A2D
+#define GL_T4F_V4F 0x2A28
+#define GL_TEXTURE 0x1702
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE_1D 0x0DE0
+#define GL_TEXTURE_1D_ARRAY 0x8C18
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_TEXTURE_2D_ARRAY 0x8C1A
+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
+#define GL_TEXTURE_3D 0x806F
+#define GL_TEXTURE_ALPHA_SIZE 0x805F
+#define GL_TEXTURE_ALPHA_TYPE 0x8C13
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#define GL_TEXTURE_BINDING_1D 0x8068
+#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
+#define GL_TEXTURE_BINDING_3D 0x806A
+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
+#define GL_TEXTURE_BIT 0x00040000
+#define GL_TEXTURE_BLUE_SIZE 0x805E
+#define GL_TEXTURE_BLUE_TYPE 0x8C12
+#define GL_TEXTURE_BORDER 0x1005
+#define GL_TEXTURE_BORDER_COLOR 0x1004
+#define GL_TEXTURE_BUFFER 0x8C2A
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#define GL_TEXTURE_COMPONENTS 0x1003
+#define GL_TEXTURE_COMPRESSED 0x86A1
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#define GL_TEXTURE_COORD_ARRAY 0x8078
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
+#define GL_TEXTURE_DEPTH 0x8071
+#define GL_TEXTURE_DEPTH_SIZE 0x884A
+#define GL_TEXTURE_DEPTH_TYPE 0x8C16
+#define GL_TEXTURE_ENV 0x2300
+#define GL_TEXTURE_ENV_COLOR 0x2201
+#define GL_TEXTURE_ENV_MODE 0x2200
+#define GL_TEXTURE_FILTER_CONTROL 0x8500
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_TEXTURE_GEN_MODE 0x2500
+#define GL_TEXTURE_GEN_Q 0x0C63
+#define GL_TEXTURE_GEN_R 0x0C62
+#define GL_TEXTURE_GEN_S 0x0C60
+#define GL_TEXTURE_GEN_T 0x0C61
+#define GL_TEXTURE_GREEN_SIZE 0x805D
+#define GL_TEXTURE_GREEN_TYPE 0x8C11
+#define GL_TEXTURE_HEIGHT 0x1001
+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
+#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
+#define GL_TEXTURE_LOD_BIAS 0x8501
+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
+#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MATRIX 0x0BA8
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#define GL_TEXTURE_MAX_LOD 0x813B
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_MIN_LOD 0x813A
+#define GL_TEXTURE_PRIORITY 0x8066
+#define GL_TEXTURE_RECTANGLE 0x84F5
+#define GL_TEXTURE_RED_SIZE 0x805C
+#define GL_TEXTURE_RED_TYPE 0x8C10
+#define GL_TEXTURE_RESIDENT 0x8067
+#define GL_TEXTURE_SAMPLES 0x9106
+#define GL_TEXTURE_SHARED_SIZE 0x8C3F
+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
+#define GL_TEXTURE_STENCIL_SIZE 0x88F1
+#define GL_TEXTURE_SWIZZLE_A 0x8E45
+#define GL_TEXTURE_SWIZZLE_B 0x8E44
+#define GL_TEXTURE_SWIZZLE_G 0x8E43
+#define GL_TEXTURE_SWIZZLE_R 0x8E42
+#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
+#define GL_TEXTURE_WIDTH 0x1000
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+#define GL_TIMEOUT_EXPIRED 0x911B
+#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF
+#define GL_TIMESTAMP 0x8E28
+#define GL_TIME_ELAPSED 0x88BF
+#define GL_TRANSFORM_BIT 0x00001000
+#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLES_ADJACENCY 0x000C
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
+#define GL_TRUE 1
+#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BUFFER 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING 0x8A28
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
+#define GL_UNIFORM_BUFFER_START 0x8A29
+#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
+#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+#define GL_UNIFORM_NAME_LENGTH 0x8A39
+#define GL_UNIFORM_OFFSET 0x8A3B
+#define GL_UNIFORM_SIZE 0x8A38
+#define GL_UNIFORM_TYPE 0x8A37
+#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define GL_UNPACK_LSB_FIRST 0x0CF1
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_IMAGES 0x806D
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SWAP_BYTES 0x0CF0
+#define GL_UNSIGNALED 0x9118
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
+#define GL_UNSIGNED_INT 0x1405
+#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
+#define GL_UNSIGNED_INT_24_8 0x84FA
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
+#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
+#define GL_UNSIGNED_INT_VEC2 0x8DC6
+#define GL_UNSIGNED_INT_VEC3 0x8DC7
+#define GL_UNSIGNED_INT_VEC4 0x8DC8
+#define GL_UNSIGNED_NORMALIZED 0x8C17
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_V2F 0x2A20
+#define GL_V3F 0x2A21
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_VENDOR 0x1F00
+#define GL_VERSION 0x1F02
+#define GL_VERTEX_ARRAY 0x8074
+#define GL_VERTEX_ARRAY_BINDING 0x85B5
+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define GL_VERTEX_ARRAY_POINTER 0x808E
+#define GL_VERTEX_ARRAY_SIZE 0x807A
+#define GL_VERTEX_ARRAY_STRIDE 0x807C
+#define GL_VERTEX_ARRAY_TYPE 0x807B
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_VIEWPORT 0x0BA2
+#define GL_VIEWPORT_BIT 0x00000800
+#define GL_WAIT_FAILED 0x911D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
+#define GL_WRITE_ONLY 0x88B9
+#define GL_XOR 0x1506
+#define GL_ZERO 0
+#define GL_ZOOM_X 0x0D16
+#define GL_ZOOM_Y 0x0D17
+
+
+#include <glad/khrplatform.h>
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef void GLvoid;
+typedef khronos_int8_t GLbyte;
+typedef khronos_uint8_t GLubyte;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
+typedef int GLint;
+typedef unsigned int GLuint;
+typedef khronos_int32_t GLclampx;
+typedef int GLsizei;
+typedef khronos_float_t GLfloat;
+typedef khronos_float_t GLclampf;
+typedef double GLdouble;
+typedef double GLclampd;
+typedef void *GLeglClientBufferEXT;
+typedef void *GLeglImageOES;
+typedef char GLchar;
+typedef char GLcharARB;
+#ifdef __APPLE__
+typedef void *GLhandleARB;
+#else
+typedef unsigned int GLhandleARB;
+#endif
+typedef khronos_uint16_t GLhalf;
+typedef khronos_uint16_t GLhalfARB;
+typedef khronos_int32_t GLfixed;
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_intptr_t GLintptr;
+#else
+typedef khronos_intptr_t GLintptr;
+#endif
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_intptr_t GLintptrARB;
+#else
+typedef khronos_intptr_t GLintptrARB;
+#endif
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_ssize_t GLsizeiptr;
+#else
+typedef khronos_ssize_t GLsizeiptr;
+#endif
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_ssize_t GLsizeiptrARB;
+#else
+typedef khronos_ssize_t GLsizeiptrARB;
+#endif
+typedef khronos_int64_t GLint64;
+typedef khronos_int64_t GLint64EXT;
+typedef khronos_uint64_t GLuint64;
+typedef khronos_uint64_t GLuint64EXT;
+typedef struct __GLsync *GLsync;
+struct _cl_context;
+struct _cl_event;
+typedef void ( *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+typedef void ( *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
+typedef unsigned short GLhalfNV;
+typedef GLintptr GLvdpauSurfaceNV;
+typedef void ( *GLVULKANPROCNV)(void);
+
+
+#define GL_VERSION_1_0 1
+GLAD_API_CALL int GLAD_GL_VERSION_1_0;
+#define GL_VERSION_1_1 1
+GLAD_API_CALL int GLAD_GL_VERSION_1_1;
+#define GL_VERSION_1_2 1
+GLAD_API_CALL int GLAD_GL_VERSION_1_2;
+#define GL_VERSION_1_3 1
+GLAD_API_CALL int GLAD_GL_VERSION_1_3;
+#define GL_VERSION_1_4 1
+GLAD_API_CALL int GLAD_GL_VERSION_1_4;
+#define GL_VERSION_1_5 1
+GLAD_API_CALL int GLAD_GL_VERSION_1_5;
+#define GL_VERSION_2_0 1
+GLAD_API_CALL int GLAD_GL_VERSION_2_0;
+#define GL_VERSION_2_1 1
+GLAD_API_CALL int GLAD_GL_VERSION_2_1;
+#define GL_VERSION_3_0 1
+GLAD_API_CALL int GLAD_GL_VERSION_3_0;
+#define GL_VERSION_3_1 1
+GLAD_API_CALL int GLAD_GL_VERSION_3_1;
+#define GL_VERSION_3_2 1
+GLAD_API_CALL int GLAD_GL_VERSION_3_2;
+#define GL_VERSION_3_3 1
+GLAD_API_CALL int GLAD_GL_VERSION_3_3;
+#define GL_ARB_multisample 1
+GLAD_API_CALL int GLAD_GL_ARB_multisample;
+#define GL_ARB_robustness 1
+GLAD_API_CALL int GLAD_GL_ARB_robustness;
+#define GL_KHR_debug 1
+GLAD_API_CALL int GLAD_GL_KHR_debug;
+
+
+typedef void (GLAD_API_PTR *PFNGLACCUMPROC)(GLenum op, GLfloat value);
+typedef void (GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture);
+typedef void (GLAD_API_PTR *PFNGLALPHAFUNCPROC)(GLenum func, GLfloat ref);
+typedef GLboolean (GLAD_API_PTR *PFNGLARETEXTURESRESIDENTPROC)(GLsizei n, const GLuint * textures, GLboolean * residences);
+typedef void (GLAD_API_PTR *PFNGLARRAYELEMENTPROC)(GLint i);
+typedef void (GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLBEGINPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum target, GLuint id);
+typedef void (GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode);
+typedef void (GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer);
+typedef void (GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer);
+typedef void (GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, GLuint index, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
+typedef void (GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
+typedef void (GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler);
+typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture);
+typedef void (GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint array);
+typedef void (GLAD_API_PTR *PFNGLBITMAPPROC)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
+typedef void (GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
+typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef void (GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void * data, GLenum usage);
+typedef void (GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCALLLISTPROC)(GLuint list);
+typedef void (GLAD_API_PTR *PFNGLCALLLISTSPROC)(GLsizei n, GLenum type, const void * lists);
+typedef GLenum (GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp);
+typedef void (GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask);
+typedef void (GLAD_API_PTR *PFNGLCLEARACCUMPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHPROC)(GLdouble depth);
+typedef void (GLAD_API_PTR *PFNGLCLEARINDEXPROC)(GLfloat c);
+typedef void (GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s);
+typedef void (GLAD_API_PTR *PFNGLCLIENTACTIVETEXTUREPROC)(GLenum texture);
+typedef GLenum (GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GLAD_API_PTR *PFNGLCLIPPLANEPROC)(GLenum plane, const GLdouble * equation);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3BPROC)(GLbyte red, GLbyte green, GLbyte blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3BVPROC)(const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3DPROC)(GLdouble red, GLdouble green, GLdouble blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3FPROC)(GLfloat red, GLfloat green, GLfloat blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3IPROC)(GLint red, GLint green, GLint blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3SPROC)(GLshort red, GLshort green, GLshort blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3UBPROC)(GLubyte red, GLubyte green, GLubyte blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3UBVPROC)(const GLubyte * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3UIPROC)(GLuint red, GLuint green, GLuint blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3UIVPROC)(const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue);
+typedef void (GLAD_API_PTR *PFNGLCOLOR3USVPROC)(const GLushort * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4BPROC)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4BVPROC)(const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4DPROC)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4FPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4IPROC)(GLint red, GLint green, GLint blue, GLint alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4SPROC)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4UBPROC)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4UBVPROC)(const GLubyte * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4UIPROC)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4UIVPROC)(const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4USPROC)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLOR4USVPROC)(const GLushort * v);
+typedef void (GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (GLAD_API_PTR *PFNGLCOLORMATERIALPROC)(GLenum face, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLCOLORP3UIPROC)(GLenum type, GLuint color);
+typedef void (GLAD_API_PTR *PFNGLCOLORP3UIVPROC)(GLenum type, const GLuint * color);
+typedef void (GLAD_API_PTR *PFNGLCOLORP4UIPROC)(GLenum type, GLuint color);
+typedef void (GLAD_API_PTR *PFNGLCOLORP4UIVPROC)(GLenum type, const GLuint * color);
+typedef void (GLAD_API_PTR *PFNGLCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void (GLAD_API_PTR *PFNGLCOPYPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef GLuint (GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void);
+typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum type);
+typedef void (GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void * userParam);
+typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled);
+typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
+typedef void (GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint * buffers);
+typedef void (GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint * framebuffers);
+typedef void (GLAD_API_PTR *PFNGLDELETELISTSPROC)(GLuint list, GLsizei range);
+typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint * ids);
+typedef void (GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint * renderbuffers);
+typedef void (GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint * samplers);
+typedef void (GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync sync);
+typedef void (GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint * textures);
+typedef void (GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint * arrays);
+typedef void (GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func);
+typedef void (GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag);
+typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f);
+typedef void (GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap);
+typedef void (GLAD_API_PTR *PFNGLDISABLECLIENTSTATEPROC)(GLenum array);
+typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
+typedef void (GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum target, GLuint index);
+typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
+typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERPROC)(GLenum buf);
+typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum * bufs);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex);
+typedef void (GLAD_API_PTR *PFNGLDRAWPIXELSPROC)(GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices);
+typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex);
+typedef void (GLAD_API_PTR *PFNGLEDGEFLAGPROC)(GLboolean flag);
+typedef void (GLAD_API_PTR *PFNGLEDGEFLAGPOINTERPROC)(GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLEDGEFLAGVPROC)(const GLboolean * flag);
+typedef void (GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap);
+typedef void (GLAD_API_PTR *PFNGLENABLECLIENTSTATEPROC)(GLenum array);
+typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
+typedef void (GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum target, GLuint index);
+typedef void (GLAD_API_PTR *PFNGLENDPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLENDCONDITIONALRENDERPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLENDLISTPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD1DPROC)(GLdouble u);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD1DVPROC)(const GLdouble * u);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD1FPROC)(GLfloat u);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD1FVPROC)(const GLfloat * u);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD2DPROC)(GLdouble u, GLdouble v);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD2DVPROC)(const GLdouble * u);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD2FPROC)(GLfloat u, GLfloat v);
+typedef void (GLAD_API_PTR *PFNGLEVALCOORD2FVPROC)(const GLfloat * u);
+typedef void (GLAD_API_PTR *PFNGLEVALMESH1PROC)(GLenum mode, GLint i1, GLint i2);
+typedef void (GLAD_API_PTR *PFNGLEVALMESH2PROC)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+typedef void (GLAD_API_PTR *PFNGLEVALPOINT1PROC)(GLint i);
+typedef void (GLAD_API_PTR *PFNGLEVALPOINT2PROC)(GLint i, GLint j);
+typedef void (GLAD_API_PTR *PFNGLFEEDBACKBUFFERPROC)(GLsizei size, GLenum type, GLfloat * buffer);
+typedef GLsync (GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags);
+typedef void (GLAD_API_PTR *PFNGLFINISHPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLFLUSHPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length);
+typedef void (GLAD_API_PTR *PFNGLFOGCOORDPOINTERPROC)(GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLFOGCOORDDPROC)(GLdouble coord);
+typedef void (GLAD_API_PTR *PFNGLFOGCOORDDVPROC)(const GLdouble * coord);
+typedef void (GLAD_API_PTR *PFNGLFOGCOORDFPROC)(GLfloat coord);
+typedef void (GLAD_API_PTR *PFNGLFOGCOORDFVPROC)(const GLfloat * coord);
+typedef void (GLAD_API_PTR *PFNGLFOGFPROC)(GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLFOGFVPROC)(GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLFOGIPROC)(GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLFOGIVPROC)(GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLFRUSTUMPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+typedef void (GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint * buffers);
+typedef void (GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers);
+typedef GLuint (GLAD_API_PTR *PFNGLGENLISTSPROC)(GLsizei range);
+typedef void (GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei n, GLuint * ids);
+typedef void (GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers);
+typedef void (GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint * samplers);
+typedef void (GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint * textures);
+typedef void (GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint * arrays);
+typedef void (GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformName);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders);
+typedef GLint (GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean * data);
+typedef void (GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean * data);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 * params);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void ** params);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void * data);
+typedef void (GLAD_API_PTR *PFNGLGETCLIPPLANEPROC)(GLenum plane, GLdouble * equation);
+typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void * img);
+typedef GLuint (GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog);
+typedef void (GLAD_API_PTR *PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble * data);
+typedef GLenum (GLAD_API_PTR *PFNGLGETERRORPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat * data);
+typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar * name);
+typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
+typedef GLenum (GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSARBPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint * data);
+typedef void (GLAD_API_PTR *PFNGLGETLIGHTFVPROC)(GLenum light, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETLIGHTIVPROC)(GLenum light, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETMAPDVPROC)(GLenum target, GLenum query, GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLGETMAPFVPROC)(GLenum target, GLenum query, GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLGETMAPIVPROC)(GLenum target, GLenum query, GLint * v);
+typedef void (GLAD_API_PTR *PFNGLGETMATERIALFVPROC)(GLenum face, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETMATERIALIVPROC)(GLenum face, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat * val);
+typedef void (GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLGETPIXELMAPFVPROC)(GLenum map, GLfloat * values);
+typedef void (GLAD_API_PTR *PFNGLGETPIXELMAPUIVPROC)(GLenum map, GLuint * values);
+typedef void (GLAD_API_PTR *PFNGLGETPIXELMAPUSVPROC)(GLenum map, GLushort * values);
+typedef void (GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum pname, void ** params);
+typedef void (GLAD_API_PTR *PFNGLGETPOLYGONSTIPPLEPROC)(GLubyte * mask);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint * params);
+typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name);
+typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, GLuint index);
+typedef void (GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values);
+typedef void (GLAD_API_PTR *PFNGLGETTEXENVFVPROC)(GLenum target, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXENVIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXGENDVPROC)(GLenum coord, GLenum pname, GLdouble * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXGENFVPROC)(GLenum coord, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXGENIVPROC)(GLenum coord, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void * pixels);
+typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name);
+typedef GLuint (GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar * uniformBlockName);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices);
+typedef GLint (GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void ** pointer);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETNCOLORTABLEARBPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void * table);
+typedef void (GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC)(GLenum target, GLint lod, GLsizei bufSize, void * img);
+typedef void (GLAD_API_PTR *PFNGLGETNCONVOLUTIONFILTERARBPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void * image);
+typedef void (GLAD_API_PTR *PFNGLGETNHISTOGRAMARBPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void * values);
+typedef void (GLAD_API_PTR *PFNGLGETNMAPDVARBPROC)(GLenum target, GLenum query, GLsizei bufSize, GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLGETNMAPFVARBPROC)(GLenum target, GLenum query, GLsizei bufSize, GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLGETNMAPIVARBPROC)(GLenum target, GLenum query, GLsizei bufSize, GLint * v);
+typedef void (GLAD_API_PTR *PFNGLGETNMINMAXARBPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void * values);
+typedef void (GLAD_API_PTR *PFNGLGETNPIXELMAPFVARBPROC)(GLenum map, GLsizei bufSize, GLfloat * values);
+typedef void (GLAD_API_PTR *PFNGLGETNPIXELMAPUIVARBPROC)(GLenum map, GLsizei bufSize, GLuint * values);
+typedef void (GLAD_API_PTR *PFNGLGETNPIXELMAPUSVARBPROC)(GLenum map, GLsizei bufSize, GLushort * values);
+typedef void (GLAD_API_PTR *PFNGLGETNPOLYGONSTIPPLEARBPROC)(GLsizei bufSize, GLubyte * pattern);
+typedef void (GLAD_API_PTR *PFNGLGETNSEPARABLEFILTERARBPROC)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void * row, GLsizei columnBufSize, void * column, void * span);
+typedef void (GLAD_API_PTR *PFNGLGETNTEXIMAGEARBPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * img);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMDVARBPROC)(GLuint program, GLint location, GLsizei bufSize, GLdouble * params);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMFVARBPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMIVARBPROC)(GLuint program, GLint location, GLsizei bufSize, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMUIVARBPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLINDEXMASKPROC)(GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLINDEXPOINTERPROC)(GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLINDEXDPROC)(GLdouble c);
+typedef void (GLAD_API_PTR *PFNGLINDEXDVPROC)(const GLdouble * c);
+typedef void (GLAD_API_PTR *PFNGLINDEXFPROC)(GLfloat c);
+typedef void (GLAD_API_PTR *PFNGLINDEXFVPROC)(const GLfloat * c);
+typedef void (GLAD_API_PTR *PFNGLINDEXIPROC)(GLint c);
+typedef void (GLAD_API_PTR *PFNGLINDEXIVPROC)(const GLint * c);
+typedef void (GLAD_API_PTR *PFNGLINDEXSPROC)(GLshort c);
+typedef void (GLAD_API_PTR *PFNGLINDEXSVPROC)(const GLshort * c);
+typedef void (GLAD_API_PTR *PFNGLINDEXUBPROC)(GLubyte c);
+typedef void (GLAD_API_PTR *PFNGLINDEXUBVPROC)(const GLubyte * c);
+typedef void (GLAD_API_PTR *PFNGLINITNAMESPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLINTERLEAVEDARRAYSPROC)(GLenum format, GLsizei stride, const void * pointer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint buffer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap);
+typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum target, GLuint index);
+typedef GLboolean (GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISLISTPROC)(GLuint list);
+typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint program);
+typedef GLboolean (GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint id);
+typedef GLboolean (GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint sampler);
+typedef GLboolean (GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint shader);
+typedef GLboolean (GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync sync);
+typedef GLboolean (GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint texture);
+typedef GLboolean (GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint array);
+typedef void (GLAD_API_PTR *PFNGLLIGHTMODELFPROC)(GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLLIGHTMODELFVPROC)(GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLLIGHTMODELIPROC)(GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLLIGHTMODELIVPROC)(GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLLIGHTFPROC)(GLenum light, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLLIGHTFVPROC)(GLenum light, GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLLIGHTIPROC)(GLenum light, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLLIGHTIVPROC)(GLenum light, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLLINESTIPPLEPROC)(GLint factor, GLushort pattern);
+typedef void (GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width);
+typedef void (GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLLISTBASEPROC)(GLuint base);
+typedef void (GLAD_API_PTR *PFNGLLOADIDENTITYPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLLOADMATRIXDPROC)(const GLdouble * m);
+typedef void (GLAD_API_PTR *PFNGLLOADMATRIXFPROC)(const GLfloat * m);
+typedef void (GLAD_API_PTR *PFNGLLOADNAMEPROC)(GLuint name);
+typedef void (GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXDPROC)(const GLdouble * m);
+typedef void (GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXFPROC)(const GLfloat * m);
+typedef void (GLAD_API_PTR *PFNGLLOGICOPPROC)(GLenum opcode);
+typedef void (GLAD_API_PTR *PFNGLMAP1DPROC)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points);
+typedef void (GLAD_API_PTR *PFNGLMAP1FPROC)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points);
+typedef void (GLAD_API_PTR *PFNGLMAP2DPROC)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points);
+typedef void (GLAD_API_PTR *PFNGLMAP2FPROC)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points);
+typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum target, GLenum access);
+typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GLAD_API_PTR *PFNGLMAPGRID1DPROC)(GLint un, GLdouble u1, GLdouble u2);
+typedef void (GLAD_API_PTR *PFNGLMAPGRID1FPROC)(GLint un, GLfloat u1, GLfloat u2);
+typedef void (GLAD_API_PTR *PFNGLMAPGRID2DPROC)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+typedef void (GLAD_API_PTR *PFNGLMAPGRID2FPROC)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+typedef void (GLAD_API_PTR *PFNGLMATERIALFPROC)(GLenum face, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLMATERIALFVPROC)(GLenum face, GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLMATERIALIPROC)(GLenum face, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLMATERIALIVPROC)(GLenum face, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLMATRIXMODEPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLMULTMATRIXDPROC)(const GLdouble * m);
+typedef void (GLAD_API_PTR *PFNGLMULTMATRIXFPROC)(const GLfloat * m);
+typedef void (GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXDPROC)(const GLdouble * m);
+typedef void (GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXFPROC)(const GLfloat * m);
+typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount);
+typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount);
+typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount, const GLint * basevertex);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1DPROC)(GLenum target, GLdouble s);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1DVPROC)(GLenum target, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1FPROC)(GLenum target, GLfloat s);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1FVPROC)(GLenum target, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1IPROC)(GLenum target, GLint s);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1IVPROC)(GLenum target, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1SPROC)(GLenum target, GLshort s);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1SVPROC)(GLenum target, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2DPROC)(GLenum target, GLdouble s, GLdouble t);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2DVPROC)(GLenum target, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2FPROC)(GLenum target, GLfloat s, GLfloat t);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2FVPROC)(GLenum target, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2IPROC)(GLenum target, GLint s, GLint t);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2IVPROC)(GLenum target, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2SPROC)(GLenum target, GLshort s, GLshort t);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2SVPROC)(GLenum target, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3DPROC)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3DVPROC)(GLenum target, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3FPROC)(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3FVPROC)(GLenum target, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3IPROC)(GLenum target, GLint s, GLint t, GLint r);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3IVPROC)(GLenum target, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3SPROC)(GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3SVPROC)(GLenum target, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4DPROC)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4DVPROC)(GLenum target, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4FPROC)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4FVPROC)(GLenum target, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4IPROC)(GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4IVPROC)(GLenum target, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4SPROC)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4SVPROC)(GLenum target, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP1UIPROC)(GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP1UIVPROC)(GLenum texture, GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP2UIPROC)(GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP2UIVPROC)(GLenum texture, GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP3UIPROC)(GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP3UIVPROC)(GLenum texture, GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP4UIPROC)(GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP4UIVPROC)(GLenum texture, GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLNEWLISTPROC)(GLuint list, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3BPROC)(GLbyte nx, GLbyte ny, GLbyte nz);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3BVPROC)(const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3DPROC)(GLdouble nx, GLdouble ny, GLdouble nz);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3FPROC)(GLfloat nx, GLfloat ny, GLfloat nz);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3IPROC)(GLint nx, GLint ny, GLint nz);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3SPROC)(GLshort nx, GLshort ny, GLshort nz);
+typedef void (GLAD_API_PTR *PFNGLNORMAL3SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLNORMALP3UIPROC)(GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLNORMALP3UIVPROC)(GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLNORMALPOINTERPROC)(GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void * ptr, GLsizei length, const GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLORTHOPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+typedef void (GLAD_API_PTR *PFNGLPASSTHROUGHPROC)(GLfloat token);
+typedef void (GLAD_API_PTR *PFNGLPIXELMAPFVPROC)(GLenum map, GLsizei mapsize, const GLfloat * values);
+typedef void (GLAD_API_PTR *PFNGLPIXELMAPUIVPROC)(GLenum map, GLsizei mapsize, const GLuint * values);
+typedef void (GLAD_API_PTR *PFNGLPIXELMAPUSVPROC)(GLenum map, GLsizei mapsize, const GLushort * values);
+typedef void (GLAD_API_PTR *PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLPIXELTRANSFERFPROC)(GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLPIXELTRANSFERIPROC)(GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLPIXELZOOMPROC)(GLfloat xfactor, GLfloat yfactor);
+typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLPOINTSIZEPROC)(GLfloat size);
+typedef void (GLAD_API_PTR *PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units);
+typedef void (GLAD_API_PTR *PFNGLPOLYGONSTIPPLEPROC)(const GLubyte * mask);
+typedef void (GLAD_API_PTR *PFNGLPOPATTRIBPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPOPCLIENTATTRIBPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPOPMATRIXPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPOPNAMEPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index);
+typedef void (GLAD_API_PTR *PFNGLPRIORITIZETEXTURESPROC)(GLsizei n, const GLuint * textures, const GLfloat * priorities);
+typedef void (GLAD_API_PTR *PFNGLPROVOKINGVERTEXPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLPUSHATTRIBPROC)(GLbitfield mask);
+typedef void (GLAD_API_PTR *PFNGLPUSHCLIENTATTRIBPROC)(GLbitfield mask);
+typedef void (GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar * message);
+typedef void (GLAD_API_PTR *PFNGLPUSHMATRIXPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPUSHNAMEPROC)(GLuint name);
+typedef void (GLAD_API_PTR *PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2DPROC)(GLdouble x, GLdouble y);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2FPROC)(GLfloat x, GLfloat y);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2IPROC)(GLint x, GLint y);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2SPROC)(GLshort x, GLshort y);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS2SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3DPROC)(GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3FPROC)(GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3IPROC)(GLint x, GLint y, GLint z);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3SPROC)(GLshort x, GLshort y, GLshort z);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS3SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4DPROC)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4FPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4IPROC)(GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4SPROC)(GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAD_API_PTR *PFNGLRASTERPOS4SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum src);
+typedef void (GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels);
+typedef void (GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data);
+typedef void (GLAD_API_PTR *PFNGLREADNPIXELSARBPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data);
+typedef void (GLAD_API_PTR *PFNGLRECTDPROC)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+typedef void (GLAD_API_PTR *PFNGLRECTDVPROC)(const GLdouble * v1, const GLdouble * v2);
+typedef void (GLAD_API_PTR *PFNGLRECTFPROC)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+typedef void (GLAD_API_PTR *PFNGLRECTFVPROC)(const GLfloat * v1, const GLfloat * v2);
+typedef void (GLAD_API_PTR *PFNGLRECTIPROC)(GLint x1, GLint y1, GLint x2, GLint y2);
+typedef void (GLAD_API_PTR *PFNGLRECTIVPROC)(const GLint * v1, const GLint * v2);
+typedef void (GLAD_API_PTR *PFNGLRECTSPROC)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+typedef void (GLAD_API_PTR *PFNGLRECTSVPROC)(const GLshort * v1, const GLshort * v2);
+typedef GLint (GLAD_API_PTR *PFNGLRENDERMODEPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLROTATEDPROC)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLROTATEFPROC)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert);
+typedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEARBPROC)(GLfloat value, GLboolean invert);
+typedef void (GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint * param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint * param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat * param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint * param);
+typedef void (GLAD_API_PTR *PFNGLSCALEDPROC)(GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLSCALEFPROC)(GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3BPROC)(GLbyte red, GLbyte green, GLbyte blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3BVPROC)(const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3DPROC)(GLdouble red, GLdouble green, GLdouble blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3FPROC)(GLfloat red, GLfloat green, GLfloat blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3IPROC)(GLint red, GLint green, GLint blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3SPROC)(GLshort red, GLshort green, GLshort blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBPROC)(GLubyte red, GLubyte green, GLubyte blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBVPROC)(const GLubyte * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIPROC)(GLuint red, GLuint green, GLuint blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIVPROC)(const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3USVPROC)(const GLushort * v);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLORP3UIPROC)(GLenum type, GLuint color);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLORP3UIVPROC)(GLenum type, const GLuint * color);
+typedef void (GLAD_API_PTR *PFNGLSECONDARYCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLSELECTBUFFERPROC)(GLsizei size, GLuint * buffer);
+typedef void (GLAD_API_PTR *PFNGLSHADEMODELPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length);
+typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
+typedef void (GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1DPROC)(GLdouble s);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1FPROC)(GLfloat s);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1IPROC)(GLint s);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1SPROC)(GLshort s);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD1SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2DPROC)(GLdouble s, GLdouble t);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2FPROC)(GLfloat s, GLfloat t);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2IPROC)(GLint s, GLint t);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2SPROC)(GLshort s, GLshort t);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD2SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3DPROC)(GLdouble s, GLdouble t, GLdouble r);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3FPROC)(GLfloat s, GLfloat t, GLfloat r);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3IPROC)(GLint s, GLint t, GLint r);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3SPROC)(GLshort s, GLshort t, GLshort r);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD3SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4DPROC)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4FPROC)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4IPROC)(GLint s, GLint t, GLint r, GLint q);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4SPROC)(GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORD4SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP1UIPROC)(GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP1UIVPROC)(GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP2UIPROC)(GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP2UIVPROC)(GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP3UIPROC)(GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP3UIVPROC)(GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP4UIPROC)(GLenum type, GLuint coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDP4UIVPROC)(GLenum type, const GLuint * coords);
+typedef void (GLAD_API_PTR *PFNGLTEXCOORDPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLTEXENVFPROC)(GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLTEXENVFVPROC)(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLTEXENVIPROC)(GLenum target, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLTEXENVIVPROC)(GLenum target, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXGENDPROC)(GLenum coord, GLenum pname, GLdouble param);
+typedef void (GLAD_API_PTR *PFNGLTEXGENDVPROC)(GLenum coord, GLenum pname, const GLdouble * params);
+typedef void (GLAD_API_PTR *PFNGLTEXGENFPROC)(GLenum coord, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLTEXGENFVPROC)(GLenum coord, GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLTEXGENIPROC)(GLenum coord, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLTEXGENIVPROC)(GLenum coord, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode);
+typedef void (GLAD_API_PTR *PFNGLTRANSLATEDPROC)(GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLTRANSLATEFPROC)(GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef GLboolean (GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2DPROC)(GLdouble x, GLdouble y);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2FPROC)(GLfloat x, GLfloat y);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2IPROC)(GLint x, GLint y);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2SPROC)(GLshort x, GLshort y);
+typedef void (GLAD_API_PTR *PFNGLVERTEX2SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3DPROC)(GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3FPROC)(GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3IPROC)(GLint x, GLint y, GLint z);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3SPROC)(GLshort x, GLshort y, GLshort z);
+typedef void (GLAD_API_PTR *PFNGLVERTEX3SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4DPROC)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4FPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4IPROC)(GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4SPROC)(GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAD_API_PTR *PFNGLVERTEX4SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLVERTEXP2UIPROC)(GLenum type, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXP2UIVPROC)(GLenum type, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXP3UIPROC)(GLenum type, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXP3UIVPROC)(GLenum type, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXP4UIPROC)(GLenum type, GLuint value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXP4UIVPROC)(GLenum type, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLVERTEXPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2DPROC)(GLdouble x, GLdouble y);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2FPROC)(GLfloat x, GLfloat y);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2IPROC)(GLint x, GLint y);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2SPROC)(GLshort x, GLshort y);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS2SVPROC)(const GLshort * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3DPROC)(GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3DVPROC)(const GLdouble * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3FPROC)(GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3FVPROC)(const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3IPROC)(GLint x, GLint y, GLint z);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3IVPROC)(const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3SPROC)(GLshort x, GLshort y, GLshort z);
+typedef void (GLAD_API_PTR *PFNGLWINDOWPOS3SVPROC)(const GLshort * v);
+
+GLAD_API_CALL PFNGLACCUMPROC glad_glAccum;
+#define glAccum glad_glAccum
+GLAD_API_CALL PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
+#define glActiveTexture glad_glActiveTexture
+GLAD_API_CALL PFNGLALPHAFUNCPROC glad_glAlphaFunc;
+#define glAlphaFunc glad_glAlphaFunc
+GLAD_API_CALL PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident;
+#define glAreTexturesResident glad_glAreTexturesResident
+GLAD_API_CALL PFNGLARRAYELEMENTPROC glad_glArrayElement;
+#define glArrayElement glad_glArrayElement
+GLAD_API_CALL PFNGLATTACHSHADERPROC glad_glAttachShader;
+#define glAttachShader glad_glAttachShader
+GLAD_API_CALL PFNGLBEGINPROC glad_glBegin;
+#define glBegin glad_glBegin
+GLAD_API_CALL PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender;
+#define glBeginConditionalRender glad_glBeginConditionalRender
+GLAD_API_CALL PFNGLBEGINQUERYPROC glad_glBeginQuery;
+#define glBeginQuery glad_glBeginQuery
+GLAD_API_CALL PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;
+#define glBeginTransformFeedback glad_glBeginTransformFeedback
+GLAD_API_CALL PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;
+#define glBindAttribLocation glad_glBindAttribLocation
+GLAD_API_CALL PFNGLBINDBUFFERPROC glad_glBindBuffer;
+#define glBindBuffer glad_glBindBuffer
+GLAD_API_CALL PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase;
+#define glBindBufferBase glad_glBindBufferBase
+GLAD_API_CALL PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange;
+#define glBindBufferRange glad_glBindBufferRange
+GLAD_API_CALL PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation;
+#define glBindFragDataLocation glad_glBindFragDataLocation
+GLAD_API_CALL PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed;
+#define glBindFragDataLocationIndexed glad_glBindFragDataLocationIndexed
+GLAD_API_CALL PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer;
+#define glBindFramebuffer glad_glBindFramebuffer
+GLAD_API_CALL PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer;
+#define glBindRenderbuffer glad_glBindRenderbuffer
+GLAD_API_CALL PFNGLBINDSAMPLERPROC glad_glBindSampler;
+#define glBindSampler glad_glBindSampler
+GLAD_API_CALL PFNGLBINDTEXTUREPROC glad_glBindTexture;
+#define glBindTexture glad_glBindTexture
+GLAD_API_CALL PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray;
+#define glBindVertexArray glad_glBindVertexArray
+GLAD_API_CALL PFNGLBITMAPPROC glad_glBitmap;
+#define glBitmap glad_glBitmap
+GLAD_API_CALL PFNGLBLENDCOLORPROC glad_glBlendColor;
+#define glBlendColor glad_glBlendColor
+GLAD_API_CALL PFNGLBLENDEQUATIONPROC glad_glBlendEquation;
+#define glBlendEquation glad_glBlendEquation
+GLAD_API_CALL PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate;
+#define glBlendEquationSeparate glad_glBlendEquationSeparate
+GLAD_API_CALL PFNGLBLENDFUNCPROC glad_glBlendFunc;
+#define glBlendFunc glad_glBlendFunc
+GLAD_API_CALL PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;
+#define glBlendFuncSeparate glad_glBlendFuncSeparate
+GLAD_API_CALL PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer;
+#define glBlitFramebuffer glad_glBlitFramebuffer
+GLAD_API_CALL PFNGLBUFFERDATAPROC glad_glBufferData;
+#define glBufferData glad_glBufferData
+GLAD_API_CALL PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;
+#define glBufferSubData glad_glBufferSubData
+GLAD_API_CALL PFNGLCALLLISTPROC glad_glCallList;
+#define glCallList glad_glCallList
+GLAD_API_CALL PFNGLCALLLISTSPROC glad_glCallLists;
+#define glCallLists glad_glCallLists
+GLAD_API_CALL PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus;
+#define glCheckFramebufferStatus glad_glCheckFramebufferStatus
+GLAD_API_CALL PFNGLCLAMPCOLORPROC glad_glClampColor;
+#define glClampColor glad_glClampColor
+GLAD_API_CALL PFNGLCLEARPROC glad_glClear;
+#define glClear glad_glClear
+GLAD_API_CALL PFNGLCLEARACCUMPROC glad_glClearAccum;
+#define glClearAccum glad_glClearAccum
+GLAD_API_CALL PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi;
+#define glClearBufferfi glad_glClearBufferfi
+GLAD_API_CALL PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv;
+#define glClearBufferfv glad_glClearBufferfv
+GLAD_API_CALL PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv;
+#define glClearBufferiv glad_glClearBufferiv
+GLAD_API_CALL PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv;
+#define glClearBufferuiv glad_glClearBufferuiv
+GLAD_API_CALL PFNGLCLEARCOLORPROC glad_glClearColor;
+#define glClearColor glad_glClearColor
+GLAD_API_CALL PFNGLCLEARDEPTHPROC glad_glClearDepth;
+#define glClearDepth glad_glClearDepth
+GLAD_API_CALL PFNGLCLEARINDEXPROC glad_glClearIndex;
+#define glClearIndex glad_glClearIndex
+GLAD_API_CALL PFNGLCLEARSTENCILPROC glad_glClearStencil;
+#define glClearStencil glad_glClearStencil
+GLAD_API_CALL PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture;
+#define glClientActiveTexture glad_glClientActiveTexture
+GLAD_API_CALL PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync;
+#define glClientWaitSync glad_glClientWaitSync
+GLAD_API_CALL PFNGLCLIPPLANEPROC glad_glClipPlane;
+#define glClipPlane glad_glClipPlane
+GLAD_API_CALL PFNGLCOLOR3BPROC glad_glColor3b;
+#define glColor3b glad_glColor3b
+GLAD_API_CALL PFNGLCOLOR3BVPROC glad_glColor3bv;
+#define glColor3bv glad_glColor3bv
+GLAD_API_CALL PFNGLCOLOR3DPROC glad_glColor3d;
+#define glColor3d glad_glColor3d
+GLAD_API_CALL PFNGLCOLOR3DVPROC glad_glColor3dv;
+#define glColor3dv glad_glColor3dv
+GLAD_API_CALL PFNGLCOLOR3FPROC glad_glColor3f;
+#define glColor3f glad_glColor3f
+GLAD_API_CALL PFNGLCOLOR3FVPROC glad_glColor3fv;
+#define glColor3fv glad_glColor3fv
+GLAD_API_CALL PFNGLCOLOR3IPROC glad_glColor3i;
+#define glColor3i glad_glColor3i
+GLAD_API_CALL PFNGLCOLOR3IVPROC glad_glColor3iv;
+#define glColor3iv glad_glColor3iv
+GLAD_API_CALL PFNGLCOLOR3SPROC glad_glColor3s;
+#define glColor3s glad_glColor3s
+GLAD_API_CALL PFNGLCOLOR3SVPROC glad_glColor3sv;
+#define glColor3sv glad_glColor3sv
+GLAD_API_CALL PFNGLCOLOR3UBPROC glad_glColor3ub;
+#define glColor3ub glad_glColor3ub
+GLAD_API_CALL PFNGLCOLOR3UBVPROC glad_glColor3ubv;
+#define glColor3ubv glad_glColor3ubv
+GLAD_API_CALL PFNGLCOLOR3UIPROC glad_glColor3ui;
+#define glColor3ui glad_glColor3ui
+GLAD_API_CALL PFNGLCOLOR3UIVPROC glad_glColor3uiv;
+#define glColor3uiv glad_glColor3uiv
+GLAD_API_CALL PFNGLCOLOR3USPROC glad_glColor3us;
+#define glColor3us glad_glColor3us
+GLAD_API_CALL PFNGLCOLOR3USVPROC glad_glColor3usv;
+#define glColor3usv glad_glColor3usv
+GLAD_API_CALL PFNGLCOLOR4BPROC glad_glColor4b;
+#define glColor4b glad_glColor4b
+GLAD_API_CALL PFNGLCOLOR4BVPROC glad_glColor4bv;
+#define glColor4bv glad_glColor4bv
+GLAD_API_CALL PFNGLCOLOR4DPROC glad_glColor4d;
+#define glColor4d glad_glColor4d
+GLAD_API_CALL PFNGLCOLOR4DVPROC glad_glColor4dv;
+#define glColor4dv glad_glColor4dv
+GLAD_API_CALL PFNGLCOLOR4FPROC glad_glColor4f;
+#define glColor4f glad_glColor4f
+GLAD_API_CALL PFNGLCOLOR4FVPROC glad_glColor4fv;
+#define glColor4fv glad_glColor4fv
+GLAD_API_CALL PFNGLCOLOR4IPROC glad_glColor4i;
+#define glColor4i glad_glColor4i
+GLAD_API_CALL PFNGLCOLOR4IVPROC glad_glColor4iv;
+#define glColor4iv glad_glColor4iv
+GLAD_API_CALL PFNGLCOLOR4SPROC glad_glColor4s;
+#define glColor4s glad_glColor4s
+GLAD_API_CALL PFNGLCOLOR4SVPROC glad_glColor4sv;
+#define glColor4sv glad_glColor4sv
+GLAD_API_CALL PFNGLCOLOR4UBPROC glad_glColor4ub;
+#define glColor4ub glad_glColor4ub
+GLAD_API_CALL PFNGLCOLOR4UBVPROC glad_glColor4ubv;
+#define glColor4ubv glad_glColor4ubv
+GLAD_API_CALL PFNGLCOLOR4UIPROC glad_glColor4ui;
+#define glColor4ui glad_glColor4ui
+GLAD_API_CALL PFNGLCOLOR4UIVPROC glad_glColor4uiv;
+#define glColor4uiv glad_glColor4uiv
+GLAD_API_CALL PFNGLCOLOR4USPROC glad_glColor4us;
+#define glColor4us glad_glColor4us
+GLAD_API_CALL PFNGLCOLOR4USVPROC glad_glColor4usv;
+#define glColor4usv glad_glColor4usv
+GLAD_API_CALL PFNGLCOLORMASKPROC glad_glColorMask;
+#define glColorMask glad_glColorMask
+GLAD_API_CALL PFNGLCOLORMASKIPROC glad_glColorMaski;
+#define glColorMaski glad_glColorMaski
+GLAD_API_CALL PFNGLCOLORMATERIALPROC glad_glColorMaterial;
+#define glColorMaterial glad_glColorMaterial
+GLAD_API_CALL PFNGLCOLORP3UIPROC glad_glColorP3ui;
+#define glColorP3ui glad_glColorP3ui
+GLAD_API_CALL PFNGLCOLORP3UIVPROC glad_glColorP3uiv;
+#define glColorP3uiv glad_glColorP3uiv
+GLAD_API_CALL PFNGLCOLORP4UIPROC glad_glColorP4ui;
+#define glColorP4ui glad_glColorP4ui
+GLAD_API_CALL PFNGLCOLORP4UIVPROC glad_glColorP4uiv;
+#define glColorP4uiv glad_glColorP4uiv
+GLAD_API_CALL PFNGLCOLORPOINTERPROC glad_glColorPointer;
+#define glColorPointer glad_glColorPointer
+GLAD_API_CALL PFNGLCOMPILESHADERPROC glad_glCompileShader;
+#define glCompileShader glad_glCompileShader
+GLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D;
+#define glCompressedTexImage1D glad_glCompressedTexImage1D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
+#define glCompressedTexImage2D glad_glCompressedTexImage2D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;
+#define glCompressedTexImage3D glad_glCompressedTexImage3D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D;
+#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
+#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;
+#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D
+GLAD_API_CALL PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData;
+#define glCopyBufferSubData glad_glCopyBufferSubData
+GLAD_API_CALL PFNGLCOPYPIXELSPROC glad_glCopyPixels;
+#define glCopyPixels glad_glCopyPixels
+GLAD_API_CALL PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D;
+#define glCopyTexImage1D glad_glCopyTexImage1D
+GLAD_API_CALL PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
+#define glCopyTexImage2D glad_glCopyTexImage2D
+GLAD_API_CALL PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D;
+#define glCopyTexSubImage1D glad_glCopyTexSubImage1D
+GLAD_API_CALL PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
+#define glCopyTexSubImage2D glad_glCopyTexSubImage2D
+GLAD_API_CALL PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;
+#define glCopyTexSubImage3D glad_glCopyTexSubImage3D
+GLAD_API_CALL PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
+#define glCreateProgram glad_glCreateProgram
+GLAD_API_CALL PFNGLCREATESHADERPROC glad_glCreateShader;
+#define glCreateShader glad_glCreateShader
+GLAD_API_CALL PFNGLCULLFACEPROC glad_glCullFace;
+#define glCullFace glad_glCullFace
+GLAD_API_CALL PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback;
+#define glDebugMessageCallback glad_glDebugMessageCallback
+GLAD_API_CALL PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl;
+#define glDebugMessageControl glad_glDebugMessageControl
+GLAD_API_CALL PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert;
+#define glDebugMessageInsert glad_glDebugMessageInsert
+GLAD_API_CALL PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;
+#define glDeleteBuffers glad_glDeleteBuffers
+GLAD_API_CALL PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers;
+#define glDeleteFramebuffers glad_glDeleteFramebuffers
+GLAD_API_CALL PFNGLDELETELISTSPROC glad_glDeleteLists;
+#define glDeleteLists glad_glDeleteLists
+GLAD_API_CALL PFNGLDELETEPROGRAMPROC glad_glDeleteProgram;
+#define glDeleteProgram glad_glDeleteProgram
+GLAD_API_CALL PFNGLDELETEQUERIESPROC glad_glDeleteQueries;
+#define glDeleteQueries glad_glDeleteQueries
+GLAD_API_CALL PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers;
+#define glDeleteRenderbuffers glad_glDeleteRenderbuffers
+GLAD_API_CALL PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers;
+#define glDeleteSamplers glad_glDeleteSamplers
+GLAD_API_CALL PFNGLDELETESHADERPROC glad_glDeleteShader;
+#define glDeleteShader glad_glDeleteShader
+GLAD_API_CALL PFNGLDELETESYNCPROC glad_glDeleteSync;
+#define glDeleteSync glad_glDeleteSync
+GLAD_API_CALL PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
+#define glDeleteTextures glad_glDeleteTextures
+GLAD_API_CALL PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays;
+#define glDeleteVertexArrays glad_glDeleteVertexArrays
+GLAD_API_CALL PFNGLDEPTHFUNCPROC glad_glDepthFunc;
+#define glDepthFunc glad_glDepthFunc
+GLAD_API_CALL PFNGLDEPTHMASKPROC glad_glDepthMask;
+#define glDepthMask glad_glDepthMask
+GLAD_API_CALL PFNGLDEPTHRANGEPROC glad_glDepthRange;
+#define glDepthRange glad_glDepthRange
+GLAD_API_CALL PFNGLDETACHSHADERPROC glad_glDetachShader;
+#define glDetachShader glad_glDetachShader
+GLAD_API_CALL PFNGLDISABLEPROC glad_glDisable;
+#define glDisable glad_glDisable
+GLAD_API_CALL PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState;
+#define glDisableClientState glad_glDisableClientState
+GLAD_API_CALL PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray;
+#define glDisableVertexAttribArray glad_glDisableVertexAttribArray
+GLAD_API_CALL PFNGLDISABLEIPROC glad_glDisablei;
+#define glDisablei glad_glDisablei
+GLAD_API_CALL PFNGLDRAWARRAYSPROC glad_glDrawArrays;
+#define glDrawArrays glad_glDrawArrays
+GLAD_API_CALL PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced;
+#define glDrawArraysInstanced glad_glDrawArraysInstanced
+GLAD_API_CALL PFNGLDRAWBUFFERPROC glad_glDrawBuffer;
+#define glDrawBuffer glad_glDrawBuffer
+GLAD_API_CALL PFNGLDRAWBUFFERSPROC glad_glDrawBuffers;
+#define glDrawBuffers glad_glDrawBuffers
+GLAD_API_CALL PFNGLDRAWELEMENTSPROC glad_glDrawElements;
+#define glDrawElements glad_glDrawElements
+GLAD_API_CALL PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex;
+#define glDrawElementsBaseVertex glad_glDrawElementsBaseVertex
+GLAD_API_CALL PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced;
+#define glDrawElementsInstanced glad_glDrawElementsInstanced
+GLAD_API_CALL PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex;
+#define glDrawElementsInstancedBaseVertex glad_glDrawElementsInstancedBaseVertex
+GLAD_API_CALL PFNGLDRAWPIXELSPROC glad_glDrawPixels;
+#define glDrawPixels glad_glDrawPixels
+GLAD_API_CALL PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;
+#define glDrawRangeElements glad_glDrawRangeElements
+GLAD_API_CALL PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex;
+#define glDrawRangeElementsBaseVertex glad_glDrawRangeElementsBaseVertex
+GLAD_API_CALL PFNGLEDGEFLAGPROC glad_glEdgeFlag;
+#define glEdgeFlag glad_glEdgeFlag
+GLAD_API_CALL PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer;
+#define glEdgeFlagPointer glad_glEdgeFlagPointer
+GLAD_API_CALL PFNGLEDGEFLAGVPROC glad_glEdgeFlagv;
+#define glEdgeFlagv glad_glEdgeFlagv
+GLAD_API_CALL PFNGLENABLEPROC glad_glEnable;
+#define glEnable glad_glEnable
+GLAD_API_CALL PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState;
+#define glEnableClientState glad_glEnableClientState
+GLAD_API_CALL PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray;
+#define glEnableVertexAttribArray glad_glEnableVertexAttribArray
+GLAD_API_CALL PFNGLENABLEIPROC glad_glEnablei;
+#define glEnablei glad_glEnablei
+GLAD_API_CALL PFNGLENDPROC glad_glEnd;
+#define glEnd glad_glEnd
+GLAD_API_CALL PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender;
+#define glEndConditionalRender glad_glEndConditionalRender
+GLAD_API_CALL PFNGLENDLISTPROC glad_glEndList;
+#define glEndList glad_glEndList
+GLAD_API_CALL PFNGLENDQUERYPROC glad_glEndQuery;
+#define glEndQuery glad_glEndQuery
+GLAD_API_CALL PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;
+#define glEndTransformFeedback glad_glEndTransformFeedback
+GLAD_API_CALL PFNGLEVALCOORD1DPROC glad_glEvalCoord1d;
+#define glEvalCoord1d glad_glEvalCoord1d
+GLAD_API_CALL PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv;
+#define glEvalCoord1dv glad_glEvalCoord1dv
+GLAD_API_CALL PFNGLEVALCOORD1FPROC glad_glEvalCoord1f;
+#define glEvalCoord1f glad_glEvalCoord1f
+GLAD_API_CALL PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv;
+#define glEvalCoord1fv glad_glEvalCoord1fv
+GLAD_API_CALL PFNGLEVALCOORD2DPROC glad_glEvalCoord2d;
+#define glEvalCoord2d glad_glEvalCoord2d
+GLAD_API_CALL PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv;
+#define glEvalCoord2dv glad_glEvalCoord2dv
+GLAD_API_CALL PFNGLEVALCOORD2FPROC glad_glEvalCoord2f;
+#define glEvalCoord2f glad_glEvalCoord2f
+GLAD_API_CALL PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv;
+#define glEvalCoord2fv glad_glEvalCoord2fv
+GLAD_API_CALL PFNGLEVALMESH1PROC glad_glEvalMesh1;
+#define glEvalMesh1 glad_glEvalMesh1
+GLAD_API_CALL PFNGLEVALMESH2PROC glad_glEvalMesh2;
+#define glEvalMesh2 glad_glEvalMesh2
+GLAD_API_CALL PFNGLEVALPOINT1PROC glad_glEvalPoint1;
+#define glEvalPoint1 glad_glEvalPoint1
+GLAD_API_CALL PFNGLEVALPOINT2PROC glad_glEvalPoint2;
+#define glEvalPoint2 glad_glEvalPoint2
+GLAD_API_CALL PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer;
+#define glFeedbackBuffer glad_glFeedbackBuffer
+GLAD_API_CALL PFNGLFENCESYNCPROC glad_glFenceSync;
+#define glFenceSync glad_glFenceSync
+GLAD_API_CALL PFNGLFINISHPROC glad_glFinish;
+#define glFinish glad_glFinish
+GLAD_API_CALL PFNGLFLUSHPROC glad_glFlush;
+#define glFlush glad_glFlush
+GLAD_API_CALL PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange;
+#define glFlushMappedBufferRange glad_glFlushMappedBufferRange
+GLAD_API_CALL PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer;
+#define glFogCoordPointer glad_glFogCoordPointer
+GLAD_API_CALL PFNGLFOGCOORDDPROC glad_glFogCoordd;
+#define glFogCoordd glad_glFogCoordd
+GLAD_API_CALL PFNGLFOGCOORDDVPROC glad_glFogCoorddv;
+#define glFogCoorddv glad_glFogCoorddv
+GLAD_API_CALL PFNGLFOGCOORDFPROC glad_glFogCoordf;
+#define glFogCoordf glad_glFogCoordf
+GLAD_API_CALL PFNGLFOGCOORDFVPROC glad_glFogCoordfv;
+#define glFogCoordfv glad_glFogCoordfv
+GLAD_API_CALL PFNGLFOGFPROC glad_glFogf;
+#define glFogf glad_glFogf
+GLAD_API_CALL PFNGLFOGFVPROC glad_glFogfv;
+#define glFogfv glad_glFogfv
+GLAD_API_CALL PFNGLFOGIPROC glad_glFogi;
+#define glFogi glad_glFogi
+GLAD_API_CALL PFNGLFOGIVPROC glad_glFogiv;
+#define glFogiv glad_glFogiv
+GLAD_API_CALL PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer;
+#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture;
+#define glFramebufferTexture glad_glFramebufferTexture
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D;
+#define glFramebufferTexture1D glad_glFramebufferTexture1D
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D;
+#define glFramebufferTexture2D glad_glFramebufferTexture2D
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D;
+#define glFramebufferTexture3D glad_glFramebufferTexture3D
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer;
+#define glFramebufferTextureLayer glad_glFramebufferTextureLayer
+GLAD_API_CALL PFNGLFRONTFACEPROC glad_glFrontFace;
+#define glFrontFace glad_glFrontFace
+GLAD_API_CALL PFNGLFRUSTUMPROC glad_glFrustum;
+#define glFrustum glad_glFrustum
+GLAD_API_CALL PFNGLGENBUFFERSPROC glad_glGenBuffers;
+#define glGenBuffers glad_glGenBuffers
+GLAD_API_CALL PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers;
+#define glGenFramebuffers glad_glGenFramebuffers
+GLAD_API_CALL PFNGLGENLISTSPROC glad_glGenLists;
+#define glGenLists glad_glGenLists
+GLAD_API_CALL PFNGLGENQUERIESPROC glad_glGenQueries;
+#define glGenQueries glad_glGenQueries
+GLAD_API_CALL PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers;
+#define glGenRenderbuffers glad_glGenRenderbuffers
+GLAD_API_CALL PFNGLGENSAMPLERSPROC glad_glGenSamplers;
+#define glGenSamplers glad_glGenSamplers
+GLAD_API_CALL PFNGLGENTEXTURESPROC glad_glGenTextures;
+#define glGenTextures glad_glGenTextures
+GLAD_API_CALL PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays;
+#define glGenVertexArrays glad_glGenVertexArrays
+GLAD_API_CALL PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap;
+#define glGenerateMipmap glad_glGenerateMipmap
+GLAD_API_CALL PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib;
+#define glGetActiveAttrib glad_glGetActiveAttrib
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform;
+#define glGetActiveUniform glad_glGetActiveUniform
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName;
+#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv;
+#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName;
+#define glGetActiveUniformName glad_glGetActiveUniformName
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv;
+#define glGetActiveUniformsiv glad_glGetActiveUniformsiv
+GLAD_API_CALL PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders;
+#define glGetAttachedShaders glad_glGetAttachedShaders
+GLAD_API_CALL PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation;
+#define glGetAttribLocation glad_glGetAttribLocation
+GLAD_API_CALL PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v;
+#define glGetBooleani_v glad_glGetBooleani_v
+GLAD_API_CALL PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
+#define glGetBooleanv glad_glGetBooleanv
+GLAD_API_CALL PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v;
+#define glGetBufferParameteri64v glad_glGetBufferParameteri64v
+GLAD_API_CALL PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;
+#define glGetBufferParameteriv glad_glGetBufferParameteriv
+GLAD_API_CALL PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv;
+#define glGetBufferPointerv glad_glGetBufferPointerv
+GLAD_API_CALL PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData;
+#define glGetBufferSubData glad_glGetBufferSubData
+GLAD_API_CALL PFNGLGETCLIPPLANEPROC glad_glGetClipPlane;
+#define glGetClipPlane glad_glGetClipPlane
+GLAD_API_CALL PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage;
+#define glGetCompressedTexImage glad_glGetCompressedTexImage
+GLAD_API_CALL PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog;
+#define glGetDebugMessageLog glad_glGetDebugMessageLog
+GLAD_API_CALL PFNGLGETDOUBLEVPROC glad_glGetDoublev;
+#define glGetDoublev glad_glGetDoublev
+GLAD_API_CALL PFNGLGETERRORPROC glad_glGetError;
+#define glGetError glad_glGetError
+GLAD_API_CALL PFNGLGETFLOATVPROC glad_glGetFloatv;
+#define glGetFloatv glad_glGetFloatv
+GLAD_API_CALL PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex;
+#define glGetFragDataIndex glad_glGetFragDataIndex
+GLAD_API_CALL PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation;
+#define glGetFragDataLocation glad_glGetFragDataLocation
+GLAD_API_CALL PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv;
+#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv
+GLAD_API_CALL PFNGLGETGRAPHICSRESETSTATUSARBPROC glad_glGetGraphicsResetStatusARB;
+#define glGetGraphicsResetStatusARB glad_glGetGraphicsResetStatusARB
+GLAD_API_CALL PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v;
+#define glGetInteger64i_v glad_glGetInteger64i_v
+GLAD_API_CALL PFNGLGETINTEGER64VPROC glad_glGetInteger64v;
+#define glGetInteger64v glad_glGetInteger64v
+GLAD_API_CALL PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v;
+#define glGetIntegeri_v glad_glGetIntegeri_v
+GLAD_API_CALL PFNGLGETINTEGERVPROC glad_glGetIntegerv;
+#define glGetIntegerv glad_glGetIntegerv
+GLAD_API_CALL PFNGLGETLIGHTFVPROC glad_glGetLightfv;
+#define glGetLightfv glad_glGetLightfv
+GLAD_API_CALL PFNGLGETLIGHTIVPROC glad_glGetLightiv;
+#define glGetLightiv glad_glGetLightiv
+GLAD_API_CALL PFNGLGETMAPDVPROC glad_glGetMapdv;
+#define glGetMapdv glad_glGetMapdv
+GLAD_API_CALL PFNGLGETMAPFVPROC glad_glGetMapfv;
+#define glGetMapfv glad_glGetMapfv
+GLAD_API_CALL PFNGLGETMAPIVPROC glad_glGetMapiv;
+#define glGetMapiv glad_glGetMapiv
+GLAD_API_CALL PFNGLGETMATERIALFVPROC glad_glGetMaterialfv;
+#define glGetMaterialfv glad_glGetMaterialfv
+GLAD_API_CALL PFNGLGETMATERIALIVPROC glad_glGetMaterialiv;
+#define glGetMaterialiv glad_glGetMaterialiv
+GLAD_API_CALL PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv;
+#define glGetMultisamplefv glad_glGetMultisamplefv
+GLAD_API_CALL PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel;
+#define glGetObjectLabel glad_glGetObjectLabel
+GLAD_API_CALL PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel;
+#define glGetObjectPtrLabel glad_glGetObjectPtrLabel
+GLAD_API_CALL PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv;
+#define glGetPixelMapfv glad_glGetPixelMapfv
+GLAD_API_CALL PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv;
+#define glGetPixelMapuiv glad_glGetPixelMapuiv
+GLAD_API_CALL PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv;
+#define glGetPixelMapusv glad_glGetPixelMapusv
+GLAD_API_CALL PFNGLGETPOINTERVPROC glad_glGetPointerv;
+#define glGetPointerv glad_glGetPointerv
+GLAD_API_CALL PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple;
+#define glGetPolygonStipple glad_glGetPolygonStipple
+GLAD_API_CALL PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog;
+#define glGetProgramInfoLog glad_glGetProgramInfoLog
+GLAD_API_CALL PFNGLGETPROGRAMIVPROC glad_glGetProgramiv;
+#define glGetProgramiv glad_glGetProgramiv
+GLAD_API_CALL PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v;
+#define glGetQueryObjecti64v glad_glGetQueryObjecti64v
+GLAD_API_CALL PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv;
+#define glGetQueryObjectiv glad_glGetQueryObjectiv
+GLAD_API_CALL PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v;
+#define glGetQueryObjectui64v glad_glGetQueryObjectui64v
+GLAD_API_CALL PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv;
+#define glGetQueryObjectuiv glad_glGetQueryObjectuiv
+GLAD_API_CALL PFNGLGETQUERYIVPROC glad_glGetQueryiv;
+#define glGetQueryiv glad_glGetQueryiv
+GLAD_API_CALL PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv;
+#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv;
+#define glGetSamplerParameterIiv glad_glGetSamplerParameterIiv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv;
+#define glGetSamplerParameterIuiv glad_glGetSamplerParameterIuiv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv;
+#define glGetSamplerParameterfv glad_glGetSamplerParameterfv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv;
+#define glGetSamplerParameteriv glad_glGetSamplerParameteriv
+GLAD_API_CALL PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog;
+#define glGetShaderInfoLog glad_glGetShaderInfoLog
+GLAD_API_CALL PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource;
+#define glGetShaderSource glad_glGetShaderSource
+GLAD_API_CALL PFNGLGETSHADERIVPROC glad_glGetShaderiv;
+#define glGetShaderiv glad_glGetShaderiv
+GLAD_API_CALL PFNGLGETSTRINGPROC glad_glGetString;
+#define glGetString glad_glGetString
+GLAD_API_CALL PFNGLGETSTRINGIPROC glad_glGetStringi;
+#define glGetStringi glad_glGetStringi
+GLAD_API_CALL PFNGLGETSYNCIVPROC glad_glGetSynciv;
+#define glGetSynciv glad_glGetSynciv
+GLAD_API_CALL PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv;
+#define glGetTexEnvfv glad_glGetTexEnvfv
+GLAD_API_CALL PFNGLGETTEXENVIVPROC glad_glGetTexEnviv;
+#define glGetTexEnviv glad_glGetTexEnviv
+GLAD_API_CALL PFNGLGETTEXGENDVPROC glad_glGetTexGendv;
+#define glGetTexGendv glad_glGetTexGendv
+GLAD_API_CALL PFNGLGETTEXGENFVPROC glad_glGetTexGenfv;
+#define glGetTexGenfv glad_glGetTexGenfv
+GLAD_API_CALL PFNGLGETTEXGENIVPROC glad_glGetTexGeniv;
+#define glGetTexGeniv glad_glGetTexGeniv
+GLAD_API_CALL PFNGLGETTEXIMAGEPROC glad_glGetTexImage;
+#define glGetTexImage glad_glGetTexImage
+GLAD_API_CALL PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;
+#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv
+GLAD_API_CALL PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;
+#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv
+GLAD_API_CALL PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv;
+#define glGetTexParameterIiv glad_glGetTexParameterIiv
+GLAD_API_CALL PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv;
+#define glGetTexParameterIuiv glad_glGetTexParameterIuiv
+GLAD_API_CALL PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
+#define glGetTexParameterfv glad_glGetTexParameterfv
+GLAD_API_CALL PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
+#define glGetTexParameteriv glad_glGetTexParameteriv
+GLAD_API_CALL PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying;
+#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying
+GLAD_API_CALL PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex;
+#define glGetUniformBlockIndex glad_glGetUniformBlockIndex
+GLAD_API_CALL PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices;
+#define glGetUniformIndices glad_glGetUniformIndices
+GLAD_API_CALL PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation;
+#define glGetUniformLocation glad_glGetUniformLocation
+GLAD_API_CALL PFNGLGETUNIFORMFVPROC glad_glGetUniformfv;
+#define glGetUniformfv glad_glGetUniformfv
+GLAD_API_CALL PFNGLGETUNIFORMIVPROC glad_glGetUniformiv;
+#define glGetUniformiv glad_glGetUniformiv
+GLAD_API_CALL PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv;
+#define glGetUniformuiv glad_glGetUniformuiv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv;
+#define glGetVertexAttribIiv glad_glGetVertexAttribIiv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv;
+#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv;
+#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv;
+#define glGetVertexAttribdv glad_glGetVertexAttribdv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv;
+#define glGetVertexAttribfv glad_glGetVertexAttribfv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv;
+#define glGetVertexAttribiv glad_glGetVertexAttribiv
+GLAD_API_CALL PFNGLGETNCOLORTABLEARBPROC glad_glGetnColorTableARB;
+#define glGetnColorTableARB glad_glGetnColorTableARB
+GLAD_API_CALL PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC glad_glGetnCompressedTexImageARB;
+#define glGetnCompressedTexImageARB glad_glGetnCompressedTexImageARB
+GLAD_API_CALL PFNGLGETNCONVOLUTIONFILTERARBPROC glad_glGetnConvolutionFilterARB;
+#define glGetnConvolutionFilterARB glad_glGetnConvolutionFilterARB
+GLAD_API_CALL PFNGLGETNHISTOGRAMARBPROC glad_glGetnHistogramARB;
+#define glGetnHistogramARB glad_glGetnHistogramARB
+GLAD_API_CALL PFNGLGETNMAPDVARBPROC glad_glGetnMapdvARB;
+#define glGetnMapdvARB glad_glGetnMapdvARB
+GLAD_API_CALL PFNGLGETNMAPFVARBPROC glad_glGetnMapfvARB;
+#define glGetnMapfvARB glad_glGetnMapfvARB
+GLAD_API_CALL PFNGLGETNMAPIVARBPROC glad_glGetnMapivARB;
+#define glGetnMapivARB glad_glGetnMapivARB
+GLAD_API_CALL PFNGLGETNMINMAXARBPROC glad_glGetnMinmaxARB;
+#define glGetnMinmaxARB glad_glGetnMinmaxARB
+GLAD_API_CALL PFNGLGETNPIXELMAPFVARBPROC glad_glGetnPixelMapfvARB;
+#define glGetnPixelMapfvARB glad_glGetnPixelMapfvARB
+GLAD_API_CALL PFNGLGETNPIXELMAPUIVARBPROC glad_glGetnPixelMapuivARB;
+#define glGetnPixelMapuivARB glad_glGetnPixelMapuivARB
+GLAD_API_CALL PFNGLGETNPIXELMAPUSVARBPROC glad_glGetnPixelMapusvARB;
+#define glGetnPixelMapusvARB glad_glGetnPixelMapusvARB
+GLAD_API_CALL PFNGLGETNPOLYGONSTIPPLEARBPROC glad_glGetnPolygonStippleARB;
+#define glGetnPolygonStippleARB glad_glGetnPolygonStippleARB
+GLAD_API_CALL PFNGLGETNSEPARABLEFILTERARBPROC glad_glGetnSeparableFilterARB;
+#define glGetnSeparableFilterARB glad_glGetnSeparableFilterARB
+GLAD_API_CALL PFNGLGETNTEXIMAGEARBPROC glad_glGetnTexImageARB;
+#define glGetnTexImageARB glad_glGetnTexImageARB
+GLAD_API_CALL PFNGLGETNUNIFORMDVARBPROC glad_glGetnUniformdvARB;
+#define glGetnUniformdvARB glad_glGetnUniformdvARB
+GLAD_API_CALL PFNGLGETNUNIFORMFVARBPROC glad_glGetnUniformfvARB;
+#define glGetnUniformfvARB glad_glGetnUniformfvARB
+GLAD_API_CALL PFNGLGETNUNIFORMIVARBPROC glad_glGetnUniformivARB;
+#define glGetnUniformivARB glad_glGetnUniformivARB
+GLAD_API_CALL PFNGLGETNUNIFORMUIVARBPROC glad_glGetnUniformuivARB;
+#define glGetnUniformuivARB glad_glGetnUniformuivARB
+GLAD_API_CALL PFNGLHINTPROC glad_glHint;
+#define glHint glad_glHint
+GLAD_API_CALL PFNGLINDEXMASKPROC glad_glIndexMask;
+#define glIndexMask glad_glIndexMask
+GLAD_API_CALL PFNGLINDEXPOINTERPROC glad_glIndexPointer;
+#define glIndexPointer glad_glIndexPointer
+GLAD_API_CALL PFNGLINDEXDPROC glad_glIndexd;
+#define glIndexd glad_glIndexd
+GLAD_API_CALL PFNGLINDEXDVPROC glad_glIndexdv;
+#define glIndexdv glad_glIndexdv
+GLAD_API_CALL PFNGLINDEXFPROC glad_glIndexf;
+#define glIndexf glad_glIndexf
+GLAD_API_CALL PFNGLINDEXFVPROC glad_glIndexfv;
+#define glIndexfv glad_glIndexfv
+GLAD_API_CALL PFNGLINDEXIPROC glad_glIndexi;
+#define glIndexi glad_glIndexi
+GLAD_API_CALL PFNGLINDEXIVPROC glad_glIndexiv;
+#define glIndexiv glad_glIndexiv
+GLAD_API_CALL PFNGLINDEXSPROC glad_glIndexs;
+#define glIndexs glad_glIndexs
+GLAD_API_CALL PFNGLINDEXSVPROC glad_glIndexsv;
+#define glIndexsv glad_glIndexsv
+GLAD_API_CALL PFNGLINDEXUBPROC glad_glIndexub;
+#define glIndexub glad_glIndexub
+GLAD_API_CALL PFNGLINDEXUBVPROC glad_glIndexubv;
+#define glIndexubv glad_glIndexubv
+GLAD_API_CALL PFNGLINITNAMESPROC glad_glInitNames;
+#define glInitNames glad_glInitNames
+GLAD_API_CALL PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays;
+#define glInterleavedArrays glad_glInterleavedArrays
+GLAD_API_CALL PFNGLISBUFFERPROC glad_glIsBuffer;
+#define glIsBuffer glad_glIsBuffer
+GLAD_API_CALL PFNGLISENABLEDPROC glad_glIsEnabled;
+#define glIsEnabled glad_glIsEnabled
+GLAD_API_CALL PFNGLISENABLEDIPROC glad_glIsEnabledi;
+#define glIsEnabledi glad_glIsEnabledi
+GLAD_API_CALL PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer;
+#define glIsFramebuffer glad_glIsFramebuffer
+GLAD_API_CALL PFNGLISLISTPROC glad_glIsList;
+#define glIsList glad_glIsList
+GLAD_API_CALL PFNGLISPROGRAMPROC glad_glIsProgram;
+#define glIsProgram glad_glIsProgram
+GLAD_API_CALL PFNGLISQUERYPROC glad_glIsQuery;
+#define glIsQuery glad_glIsQuery
+GLAD_API_CALL PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer;
+#define glIsRenderbuffer glad_glIsRenderbuffer
+GLAD_API_CALL PFNGLISSAMPLERPROC glad_glIsSampler;
+#define glIsSampler glad_glIsSampler
+GLAD_API_CALL PFNGLISSHADERPROC glad_glIsShader;
+#define glIsShader glad_glIsShader
+GLAD_API_CALL PFNGLISSYNCPROC glad_glIsSync;
+#define glIsSync glad_glIsSync
+GLAD_API_CALL PFNGLISTEXTUREPROC glad_glIsTexture;
+#define glIsTexture glad_glIsTexture
+GLAD_API_CALL PFNGLISVERTEXARRAYPROC glad_glIsVertexArray;
+#define glIsVertexArray glad_glIsVertexArray
+GLAD_API_CALL PFNGLLIGHTMODELFPROC glad_glLightModelf;
+#define glLightModelf glad_glLightModelf
+GLAD_API_CALL PFNGLLIGHTMODELFVPROC glad_glLightModelfv;
+#define glLightModelfv glad_glLightModelfv
+GLAD_API_CALL PFNGLLIGHTMODELIPROC glad_glLightModeli;
+#define glLightModeli glad_glLightModeli
+GLAD_API_CALL PFNGLLIGHTMODELIVPROC glad_glLightModeliv;
+#define glLightModeliv glad_glLightModeliv
+GLAD_API_CALL PFNGLLIGHTFPROC glad_glLightf;
+#define glLightf glad_glLightf
+GLAD_API_CALL PFNGLLIGHTFVPROC glad_glLightfv;
+#define glLightfv glad_glLightfv
+GLAD_API_CALL PFNGLLIGHTIPROC glad_glLighti;
+#define glLighti glad_glLighti
+GLAD_API_CALL PFNGLLIGHTIVPROC glad_glLightiv;
+#define glLightiv glad_glLightiv
+GLAD_API_CALL PFNGLLINESTIPPLEPROC glad_glLineStipple;
+#define glLineStipple glad_glLineStipple
+GLAD_API_CALL PFNGLLINEWIDTHPROC glad_glLineWidth;
+#define glLineWidth glad_glLineWidth
+GLAD_API_CALL PFNGLLINKPROGRAMPROC glad_glLinkProgram;
+#define glLinkProgram glad_glLinkProgram
+GLAD_API_CALL PFNGLLISTBASEPROC glad_glListBase;
+#define glListBase glad_glListBase
+GLAD_API_CALL PFNGLLOADIDENTITYPROC glad_glLoadIdentity;
+#define glLoadIdentity glad_glLoadIdentity
+GLAD_API_CALL PFNGLLOADMATRIXDPROC glad_glLoadMatrixd;
+#define glLoadMatrixd glad_glLoadMatrixd
+GLAD_API_CALL PFNGLLOADMATRIXFPROC glad_glLoadMatrixf;
+#define glLoadMatrixf glad_glLoadMatrixf
+GLAD_API_CALL PFNGLLOADNAMEPROC glad_glLoadName;
+#define glLoadName glad_glLoadName
+GLAD_API_CALL PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd;
+#define glLoadTransposeMatrixd glad_glLoadTransposeMatrixd
+GLAD_API_CALL PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf;
+#define glLoadTransposeMatrixf glad_glLoadTransposeMatrixf
+GLAD_API_CALL PFNGLLOGICOPPROC glad_glLogicOp;
+#define glLogicOp glad_glLogicOp
+GLAD_API_CALL PFNGLMAP1DPROC glad_glMap1d;
+#define glMap1d glad_glMap1d
+GLAD_API_CALL PFNGLMAP1FPROC glad_glMap1f;
+#define glMap1f glad_glMap1f
+GLAD_API_CALL PFNGLMAP2DPROC glad_glMap2d;
+#define glMap2d glad_glMap2d
+GLAD_API_CALL PFNGLMAP2FPROC glad_glMap2f;
+#define glMap2f glad_glMap2f
+GLAD_API_CALL PFNGLMAPBUFFERPROC glad_glMapBuffer;
+#define glMapBuffer glad_glMapBuffer
+GLAD_API_CALL PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange;
+#define glMapBufferRange glad_glMapBufferRange
+GLAD_API_CALL PFNGLMAPGRID1DPROC glad_glMapGrid1d;
+#define glMapGrid1d glad_glMapGrid1d
+GLAD_API_CALL PFNGLMAPGRID1FPROC glad_glMapGrid1f;
+#define glMapGrid1f glad_glMapGrid1f
+GLAD_API_CALL PFNGLMAPGRID2DPROC glad_glMapGrid2d;
+#define glMapGrid2d glad_glMapGrid2d
+GLAD_API_CALL PFNGLMAPGRID2FPROC glad_glMapGrid2f;
+#define glMapGrid2f glad_glMapGrid2f
+GLAD_API_CALL PFNGLMATERIALFPROC glad_glMaterialf;
+#define glMaterialf glad_glMaterialf
+GLAD_API_CALL PFNGLMATERIALFVPROC glad_glMaterialfv;
+#define glMaterialfv glad_glMaterialfv
+GLAD_API_CALL PFNGLMATERIALIPROC glad_glMateriali;
+#define glMateriali glad_glMateriali
+GLAD_API_CALL PFNGLMATERIALIVPROC glad_glMaterialiv;
+#define glMaterialiv glad_glMaterialiv
+GLAD_API_CALL PFNGLMATRIXMODEPROC glad_glMatrixMode;
+#define glMatrixMode glad_glMatrixMode
+GLAD_API_CALL PFNGLMULTMATRIXDPROC glad_glMultMatrixd;
+#define glMultMatrixd glad_glMultMatrixd
+GLAD_API_CALL PFNGLMULTMATRIXFPROC glad_glMultMatrixf;
+#define glMultMatrixf glad_glMultMatrixf
+GLAD_API_CALL PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd;
+#define glMultTransposeMatrixd glad_glMultTransposeMatrixd
+GLAD_API_CALL PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf;
+#define glMultTransposeMatrixf glad_glMultTransposeMatrixf
+GLAD_API_CALL PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays;
+#define glMultiDrawArrays glad_glMultiDrawArrays
+GLAD_API_CALL PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements;
+#define glMultiDrawElements glad_glMultiDrawElements
+GLAD_API_CALL PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex;
+#define glMultiDrawElementsBaseVertex glad_glMultiDrawElementsBaseVertex
+GLAD_API_CALL PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d;
+#define glMultiTexCoord1d glad_glMultiTexCoord1d
+GLAD_API_CALL PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv;
+#define glMultiTexCoord1dv glad_glMultiTexCoord1dv
+GLAD_API_CALL PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f;
+#define glMultiTexCoord1f glad_glMultiTexCoord1f
+GLAD_API_CALL PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv;
+#define glMultiTexCoord1fv glad_glMultiTexCoord1fv
+GLAD_API_CALL PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i;
+#define glMultiTexCoord1i glad_glMultiTexCoord1i
+GLAD_API_CALL PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv;
+#define glMultiTexCoord1iv glad_glMultiTexCoord1iv
+GLAD_API_CALL PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s;
+#define glMultiTexCoord1s glad_glMultiTexCoord1s
+GLAD_API_CALL PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv;
+#define glMultiTexCoord1sv glad_glMultiTexCoord1sv
+GLAD_API_CALL PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d;
+#define glMultiTexCoord2d glad_glMultiTexCoord2d
+GLAD_API_CALL PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv;
+#define glMultiTexCoord2dv glad_glMultiTexCoord2dv
+GLAD_API_CALL PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f;
+#define glMultiTexCoord2f glad_glMultiTexCoord2f
+GLAD_API_CALL PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv;
+#define glMultiTexCoord2fv glad_glMultiTexCoord2fv
+GLAD_API_CALL PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i;
+#define glMultiTexCoord2i glad_glMultiTexCoord2i
+GLAD_API_CALL PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv;
+#define glMultiTexCoord2iv glad_glMultiTexCoord2iv
+GLAD_API_CALL PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s;
+#define glMultiTexCoord2s glad_glMultiTexCoord2s
+GLAD_API_CALL PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv;
+#define glMultiTexCoord2sv glad_glMultiTexCoord2sv
+GLAD_API_CALL PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d;
+#define glMultiTexCoord3d glad_glMultiTexCoord3d
+GLAD_API_CALL PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv;
+#define glMultiTexCoord3dv glad_glMultiTexCoord3dv
+GLAD_API_CALL PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f;
+#define glMultiTexCoord3f glad_glMultiTexCoord3f
+GLAD_API_CALL PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv;
+#define glMultiTexCoord3fv glad_glMultiTexCoord3fv
+GLAD_API_CALL PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i;
+#define glMultiTexCoord3i glad_glMultiTexCoord3i
+GLAD_API_CALL PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv;
+#define glMultiTexCoord3iv glad_glMultiTexCoord3iv
+GLAD_API_CALL PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s;
+#define glMultiTexCoord3s glad_glMultiTexCoord3s
+GLAD_API_CALL PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv;
+#define glMultiTexCoord3sv glad_glMultiTexCoord3sv
+GLAD_API_CALL PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d;
+#define glMultiTexCoord4d glad_glMultiTexCoord4d
+GLAD_API_CALL PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv;
+#define glMultiTexCoord4dv glad_glMultiTexCoord4dv
+GLAD_API_CALL PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f;
+#define glMultiTexCoord4f glad_glMultiTexCoord4f
+GLAD_API_CALL PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv;
+#define glMultiTexCoord4fv glad_glMultiTexCoord4fv
+GLAD_API_CALL PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i;
+#define glMultiTexCoord4i glad_glMultiTexCoord4i
+GLAD_API_CALL PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv;
+#define glMultiTexCoord4iv glad_glMultiTexCoord4iv
+GLAD_API_CALL PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s;
+#define glMultiTexCoord4s glad_glMultiTexCoord4s
+GLAD_API_CALL PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv;
+#define glMultiTexCoord4sv glad_glMultiTexCoord4sv
+GLAD_API_CALL PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui;
+#define glMultiTexCoordP1ui glad_glMultiTexCoordP1ui
+GLAD_API_CALL PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv;
+#define glMultiTexCoordP1uiv glad_glMultiTexCoordP1uiv
+GLAD_API_CALL PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui;
+#define glMultiTexCoordP2ui glad_glMultiTexCoordP2ui
+GLAD_API_CALL PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv;
+#define glMultiTexCoordP2uiv glad_glMultiTexCoordP2uiv
+GLAD_API_CALL PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui;
+#define glMultiTexCoordP3ui glad_glMultiTexCoordP3ui
+GLAD_API_CALL PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv;
+#define glMultiTexCoordP3uiv glad_glMultiTexCoordP3uiv
+GLAD_API_CALL PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui;
+#define glMultiTexCoordP4ui glad_glMultiTexCoordP4ui
+GLAD_API_CALL PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv;
+#define glMultiTexCoordP4uiv glad_glMultiTexCoordP4uiv
+GLAD_API_CALL PFNGLNEWLISTPROC glad_glNewList;
+#define glNewList glad_glNewList
+GLAD_API_CALL PFNGLNORMAL3BPROC glad_glNormal3b;
+#define glNormal3b glad_glNormal3b
+GLAD_API_CALL PFNGLNORMAL3BVPROC glad_glNormal3bv;
+#define glNormal3bv glad_glNormal3bv
+GLAD_API_CALL PFNGLNORMAL3DPROC glad_glNormal3d;
+#define glNormal3d glad_glNormal3d
+GLAD_API_CALL PFNGLNORMAL3DVPROC glad_glNormal3dv;
+#define glNormal3dv glad_glNormal3dv
+GLAD_API_CALL PFNGLNORMAL3FPROC glad_glNormal3f;
+#define glNormal3f glad_glNormal3f
+GLAD_API_CALL PFNGLNORMAL3FVPROC glad_glNormal3fv;
+#define glNormal3fv glad_glNormal3fv
+GLAD_API_CALL PFNGLNORMAL3IPROC glad_glNormal3i;
+#define glNormal3i glad_glNormal3i
+GLAD_API_CALL PFNGLNORMAL3IVPROC glad_glNormal3iv;
+#define glNormal3iv glad_glNormal3iv
+GLAD_API_CALL PFNGLNORMAL3SPROC glad_glNormal3s;
+#define glNormal3s glad_glNormal3s
+GLAD_API_CALL PFNGLNORMAL3SVPROC glad_glNormal3sv;
+#define glNormal3sv glad_glNormal3sv
+GLAD_API_CALL PFNGLNORMALP3UIPROC glad_glNormalP3ui;
+#define glNormalP3ui glad_glNormalP3ui
+GLAD_API_CALL PFNGLNORMALP3UIVPROC glad_glNormalP3uiv;
+#define glNormalP3uiv glad_glNormalP3uiv
+GLAD_API_CALL PFNGLNORMALPOINTERPROC glad_glNormalPointer;
+#define glNormalPointer glad_glNormalPointer
+GLAD_API_CALL PFNGLOBJECTLABELPROC glad_glObjectLabel;
+#define glObjectLabel glad_glObjectLabel
+GLAD_API_CALL PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel;
+#define glObjectPtrLabel glad_glObjectPtrLabel
+GLAD_API_CALL PFNGLORTHOPROC glad_glOrtho;
+#define glOrtho glad_glOrtho
+GLAD_API_CALL PFNGLPASSTHROUGHPROC glad_glPassThrough;
+#define glPassThrough glad_glPassThrough
+GLAD_API_CALL PFNGLPIXELMAPFVPROC glad_glPixelMapfv;
+#define glPixelMapfv glad_glPixelMapfv
+GLAD_API_CALL PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv;
+#define glPixelMapuiv glad_glPixelMapuiv
+GLAD_API_CALL PFNGLPIXELMAPUSVPROC glad_glPixelMapusv;
+#define glPixelMapusv glad_glPixelMapusv
+GLAD_API_CALL PFNGLPIXELSTOREFPROC glad_glPixelStoref;
+#define glPixelStoref glad_glPixelStoref
+GLAD_API_CALL PFNGLPIXELSTOREIPROC glad_glPixelStorei;
+#define glPixelStorei glad_glPixelStorei
+GLAD_API_CALL PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf;
+#define glPixelTransferf glad_glPixelTransferf
+GLAD_API_CALL PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi;
+#define glPixelTransferi glad_glPixelTransferi
+GLAD_API_CALL PFNGLPIXELZOOMPROC glad_glPixelZoom;
+#define glPixelZoom glad_glPixelZoom
+GLAD_API_CALL PFNGLPOINTPARAMETERFPROC glad_glPointParameterf;
+#define glPointParameterf glad_glPointParameterf
+GLAD_API_CALL PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv;
+#define glPointParameterfv glad_glPointParameterfv
+GLAD_API_CALL PFNGLPOINTPARAMETERIPROC glad_glPointParameteri;
+#define glPointParameteri glad_glPointParameteri
+GLAD_API_CALL PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv;
+#define glPointParameteriv glad_glPointParameteriv
+GLAD_API_CALL PFNGLPOINTSIZEPROC glad_glPointSize;
+#define glPointSize glad_glPointSize
+GLAD_API_CALL PFNGLPOLYGONMODEPROC glad_glPolygonMode;
+#define glPolygonMode glad_glPolygonMode
+GLAD_API_CALL PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
+#define glPolygonOffset glad_glPolygonOffset
+GLAD_API_CALL PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple;
+#define glPolygonStipple glad_glPolygonStipple
+GLAD_API_CALL PFNGLPOPATTRIBPROC glad_glPopAttrib;
+#define glPopAttrib glad_glPopAttrib
+GLAD_API_CALL PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib;
+#define glPopClientAttrib glad_glPopClientAttrib
+GLAD_API_CALL PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup;
+#define glPopDebugGroup glad_glPopDebugGroup
+GLAD_API_CALL PFNGLPOPMATRIXPROC glad_glPopMatrix;
+#define glPopMatrix glad_glPopMatrix
+GLAD_API_CALL PFNGLPOPNAMEPROC glad_glPopName;
+#define glPopName glad_glPopName
+GLAD_API_CALL PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex;
+#define glPrimitiveRestartIndex glad_glPrimitiveRestartIndex
+GLAD_API_CALL PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures;
+#define glPrioritizeTextures glad_glPrioritizeTextures
+GLAD_API_CALL PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex;
+#define glProvokingVertex glad_glProvokingVertex
+GLAD_API_CALL PFNGLPUSHATTRIBPROC glad_glPushAttrib;
+#define glPushAttrib glad_glPushAttrib
+GLAD_API_CALL PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib;
+#define glPushClientAttrib glad_glPushClientAttrib
+GLAD_API_CALL PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup;
+#define glPushDebugGroup glad_glPushDebugGroup
+GLAD_API_CALL PFNGLPUSHMATRIXPROC glad_glPushMatrix;
+#define glPushMatrix glad_glPushMatrix
+GLAD_API_CALL PFNGLPUSHNAMEPROC glad_glPushName;
+#define glPushName glad_glPushName
+GLAD_API_CALL PFNGLQUERYCOUNTERPROC glad_glQueryCounter;
+#define glQueryCounter glad_glQueryCounter
+GLAD_API_CALL PFNGLRASTERPOS2DPROC glad_glRasterPos2d;
+#define glRasterPos2d glad_glRasterPos2d
+GLAD_API_CALL PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv;
+#define glRasterPos2dv glad_glRasterPos2dv
+GLAD_API_CALL PFNGLRASTERPOS2FPROC glad_glRasterPos2f;
+#define glRasterPos2f glad_glRasterPos2f
+GLAD_API_CALL PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv;
+#define glRasterPos2fv glad_glRasterPos2fv
+GLAD_API_CALL PFNGLRASTERPOS2IPROC glad_glRasterPos2i;
+#define glRasterPos2i glad_glRasterPos2i
+GLAD_API_CALL PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv;
+#define glRasterPos2iv glad_glRasterPos2iv
+GLAD_API_CALL PFNGLRASTERPOS2SPROC glad_glRasterPos2s;
+#define glRasterPos2s glad_glRasterPos2s
+GLAD_API_CALL PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv;
+#define glRasterPos2sv glad_glRasterPos2sv
+GLAD_API_CALL PFNGLRASTERPOS3DPROC glad_glRasterPos3d;
+#define glRasterPos3d glad_glRasterPos3d
+GLAD_API_CALL PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv;
+#define glRasterPos3dv glad_glRasterPos3dv
+GLAD_API_CALL PFNGLRASTERPOS3FPROC glad_glRasterPos3f;
+#define glRasterPos3f glad_glRasterPos3f
+GLAD_API_CALL PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv;
+#define glRasterPos3fv glad_glRasterPos3fv
+GLAD_API_CALL PFNGLRASTERPOS3IPROC glad_glRasterPos3i;
+#define glRasterPos3i glad_glRasterPos3i
+GLAD_API_CALL PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv;
+#define glRasterPos3iv glad_glRasterPos3iv
+GLAD_API_CALL PFNGLRASTERPOS3SPROC glad_glRasterPos3s;
+#define glRasterPos3s glad_glRasterPos3s
+GLAD_API_CALL PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv;
+#define glRasterPos3sv glad_glRasterPos3sv
+GLAD_API_CALL PFNGLRASTERPOS4DPROC glad_glRasterPos4d;
+#define glRasterPos4d glad_glRasterPos4d
+GLAD_API_CALL PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv;
+#define glRasterPos4dv glad_glRasterPos4dv
+GLAD_API_CALL PFNGLRASTERPOS4FPROC glad_glRasterPos4f;
+#define glRasterPos4f glad_glRasterPos4f
+GLAD_API_CALL PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv;
+#define glRasterPos4fv glad_glRasterPos4fv
+GLAD_API_CALL PFNGLRASTERPOS4IPROC glad_glRasterPos4i;
+#define glRasterPos4i glad_glRasterPos4i
+GLAD_API_CALL PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv;
+#define glRasterPos4iv glad_glRasterPos4iv
+GLAD_API_CALL PFNGLRASTERPOS4SPROC glad_glRasterPos4s;
+#define glRasterPos4s glad_glRasterPos4s
+GLAD_API_CALL PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv;
+#define glRasterPos4sv glad_glRasterPos4sv
+GLAD_API_CALL PFNGLREADBUFFERPROC glad_glReadBuffer;
+#define glReadBuffer glad_glReadBuffer
+GLAD_API_CALL PFNGLREADPIXELSPROC glad_glReadPixels;
+#define glReadPixels glad_glReadPixels
+GLAD_API_CALL PFNGLREADNPIXELSPROC glad_glReadnPixels;
+#define glReadnPixels glad_glReadnPixels
+GLAD_API_CALL PFNGLREADNPIXELSARBPROC glad_glReadnPixelsARB;
+#define glReadnPixelsARB glad_glReadnPixelsARB
+GLAD_API_CALL PFNGLRECTDPROC glad_glRectd;
+#define glRectd glad_glRectd
+GLAD_API_CALL PFNGLRECTDVPROC glad_glRectdv;
+#define glRectdv glad_glRectdv
+GLAD_API_CALL PFNGLRECTFPROC glad_glRectf;
+#define glRectf glad_glRectf
+GLAD_API_CALL PFNGLRECTFVPROC glad_glRectfv;
+#define glRectfv glad_glRectfv
+GLAD_API_CALL PFNGLRECTIPROC glad_glRecti;
+#define glRecti glad_glRecti
+GLAD_API_CALL PFNGLRECTIVPROC glad_glRectiv;
+#define glRectiv glad_glRectiv
+GLAD_API_CALL PFNGLRECTSPROC glad_glRects;
+#define glRects glad_glRects
+GLAD_API_CALL PFNGLRECTSVPROC glad_glRectsv;
+#define glRectsv glad_glRectsv
+GLAD_API_CALL PFNGLRENDERMODEPROC glad_glRenderMode;
+#define glRenderMode glad_glRenderMode
+GLAD_API_CALL PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage;
+#define glRenderbufferStorage glad_glRenderbufferStorage
+GLAD_API_CALL PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample;
+#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample
+GLAD_API_CALL PFNGLROTATEDPROC glad_glRotated;
+#define glRotated glad_glRotated
+GLAD_API_CALL PFNGLROTATEFPROC glad_glRotatef;
+#define glRotatef glad_glRotatef
+GLAD_API_CALL PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
+#define glSampleCoverage glad_glSampleCoverage
+GLAD_API_CALL PFNGLSAMPLECOVERAGEARBPROC glad_glSampleCoverageARB;
+#define glSampleCoverageARB glad_glSampleCoverageARB
+GLAD_API_CALL PFNGLSAMPLEMASKIPROC glad_glSampleMaski;
+#define glSampleMaski glad_glSampleMaski
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv;
+#define glSamplerParameterIiv glad_glSamplerParameterIiv
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv;
+#define glSamplerParameterIuiv glad_glSamplerParameterIuiv
+GLAD_API_CALL PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf;
+#define glSamplerParameterf glad_glSamplerParameterf
+GLAD_API_CALL PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv;
+#define glSamplerParameterfv glad_glSamplerParameterfv
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri;
+#define glSamplerParameteri glad_glSamplerParameteri
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv;
+#define glSamplerParameteriv glad_glSamplerParameteriv
+GLAD_API_CALL PFNGLSCALEDPROC glad_glScaled;
+#define glScaled glad_glScaled
+GLAD_API_CALL PFNGLSCALEFPROC glad_glScalef;
+#define glScalef glad_glScalef
+GLAD_API_CALL PFNGLSCISSORPROC glad_glScissor;
+#define glScissor glad_glScissor
+GLAD_API_CALL PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b;
+#define glSecondaryColor3b glad_glSecondaryColor3b
+GLAD_API_CALL PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv;
+#define glSecondaryColor3bv glad_glSecondaryColor3bv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d;
+#define glSecondaryColor3d glad_glSecondaryColor3d
+GLAD_API_CALL PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv;
+#define glSecondaryColor3dv glad_glSecondaryColor3dv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f;
+#define glSecondaryColor3f glad_glSecondaryColor3f
+GLAD_API_CALL PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv;
+#define glSecondaryColor3fv glad_glSecondaryColor3fv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i;
+#define glSecondaryColor3i glad_glSecondaryColor3i
+GLAD_API_CALL PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv;
+#define glSecondaryColor3iv glad_glSecondaryColor3iv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s;
+#define glSecondaryColor3s glad_glSecondaryColor3s
+GLAD_API_CALL PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv;
+#define glSecondaryColor3sv glad_glSecondaryColor3sv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub;
+#define glSecondaryColor3ub glad_glSecondaryColor3ub
+GLAD_API_CALL PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv;
+#define glSecondaryColor3ubv glad_glSecondaryColor3ubv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui;
+#define glSecondaryColor3ui glad_glSecondaryColor3ui
+GLAD_API_CALL PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv;
+#define glSecondaryColor3uiv glad_glSecondaryColor3uiv
+GLAD_API_CALL PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us;
+#define glSecondaryColor3us glad_glSecondaryColor3us
+GLAD_API_CALL PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv;
+#define glSecondaryColor3usv glad_glSecondaryColor3usv
+GLAD_API_CALL PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui;
+#define glSecondaryColorP3ui glad_glSecondaryColorP3ui
+GLAD_API_CALL PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv;
+#define glSecondaryColorP3uiv glad_glSecondaryColorP3uiv
+GLAD_API_CALL PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer;
+#define glSecondaryColorPointer glad_glSecondaryColorPointer
+GLAD_API_CALL PFNGLSELECTBUFFERPROC glad_glSelectBuffer;
+#define glSelectBuffer glad_glSelectBuffer
+GLAD_API_CALL PFNGLSHADEMODELPROC glad_glShadeModel;
+#define glShadeModel glad_glShadeModel
+GLAD_API_CALL PFNGLSHADERSOURCEPROC glad_glShaderSource;
+#define glShaderSource glad_glShaderSource
+GLAD_API_CALL PFNGLSTENCILFUNCPROC glad_glStencilFunc;
+#define glStencilFunc glad_glStencilFunc
+GLAD_API_CALL PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate;
+#define glStencilFuncSeparate glad_glStencilFuncSeparate
+GLAD_API_CALL PFNGLSTENCILMASKPROC glad_glStencilMask;
+#define glStencilMask glad_glStencilMask
+GLAD_API_CALL PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate;
+#define glStencilMaskSeparate glad_glStencilMaskSeparate
+GLAD_API_CALL PFNGLSTENCILOPPROC glad_glStencilOp;
+#define glStencilOp glad_glStencilOp
+GLAD_API_CALL PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate;
+#define glStencilOpSeparate glad_glStencilOpSeparate
+GLAD_API_CALL PFNGLTEXBUFFERPROC glad_glTexBuffer;
+#define glTexBuffer glad_glTexBuffer
+GLAD_API_CALL PFNGLTEXCOORD1DPROC glad_glTexCoord1d;
+#define glTexCoord1d glad_glTexCoord1d
+GLAD_API_CALL PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv;
+#define glTexCoord1dv glad_glTexCoord1dv
+GLAD_API_CALL PFNGLTEXCOORD1FPROC glad_glTexCoord1f;
+#define glTexCoord1f glad_glTexCoord1f
+GLAD_API_CALL PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv;
+#define glTexCoord1fv glad_glTexCoord1fv
+GLAD_API_CALL PFNGLTEXCOORD1IPROC glad_glTexCoord1i;
+#define glTexCoord1i glad_glTexCoord1i
+GLAD_API_CALL PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv;
+#define glTexCoord1iv glad_glTexCoord1iv
+GLAD_API_CALL PFNGLTEXCOORD1SPROC glad_glTexCoord1s;
+#define glTexCoord1s glad_glTexCoord1s
+GLAD_API_CALL PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv;
+#define glTexCoord1sv glad_glTexCoord1sv
+GLAD_API_CALL PFNGLTEXCOORD2DPROC glad_glTexCoord2d;
+#define glTexCoord2d glad_glTexCoord2d
+GLAD_API_CALL PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv;
+#define glTexCoord2dv glad_glTexCoord2dv
+GLAD_API_CALL PFNGLTEXCOORD2FPROC glad_glTexCoord2f;
+#define glTexCoord2f glad_glTexCoord2f
+GLAD_API_CALL PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv;
+#define glTexCoord2fv glad_glTexCoord2fv
+GLAD_API_CALL PFNGLTEXCOORD2IPROC glad_glTexCoord2i;
+#define glTexCoord2i glad_glTexCoord2i
+GLAD_API_CALL PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv;
+#define glTexCoord2iv glad_glTexCoord2iv
+GLAD_API_CALL PFNGLTEXCOORD2SPROC glad_glTexCoord2s;
+#define glTexCoord2s glad_glTexCoord2s
+GLAD_API_CALL PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv;
+#define glTexCoord2sv glad_glTexCoord2sv
+GLAD_API_CALL PFNGLTEXCOORD3DPROC glad_glTexCoord3d;
+#define glTexCoord3d glad_glTexCoord3d
+GLAD_API_CALL PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv;
+#define glTexCoord3dv glad_glTexCoord3dv
+GLAD_API_CALL PFNGLTEXCOORD3FPROC glad_glTexCoord3f;
+#define glTexCoord3f glad_glTexCoord3f
+GLAD_API_CALL PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv;
+#define glTexCoord3fv glad_glTexCoord3fv
+GLAD_API_CALL PFNGLTEXCOORD3IPROC glad_glTexCoord3i;
+#define glTexCoord3i glad_glTexCoord3i
+GLAD_API_CALL PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv;
+#define glTexCoord3iv glad_glTexCoord3iv
+GLAD_API_CALL PFNGLTEXCOORD3SPROC glad_glTexCoord3s;
+#define glTexCoord3s glad_glTexCoord3s
+GLAD_API_CALL PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv;
+#define glTexCoord3sv glad_glTexCoord3sv
+GLAD_API_CALL PFNGLTEXCOORD4DPROC glad_glTexCoord4d;
+#define glTexCoord4d glad_glTexCoord4d
+GLAD_API_CALL PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv;
+#define glTexCoord4dv glad_glTexCoord4dv
+GLAD_API_CALL PFNGLTEXCOORD4FPROC glad_glTexCoord4f;
+#define glTexCoord4f glad_glTexCoord4f
+GLAD_API_CALL PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv;
+#define glTexCoord4fv glad_glTexCoord4fv
+GLAD_API_CALL PFNGLTEXCOORD4IPROC glad_glTexCoord4i;
+#define glTexCoord4i glad_glTexCoord4i
+GLAD_API_CALL PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv;
+#define glTexCoord4iv glad_glTexCoord4iv
+GLAD_API_CALL PFNGLTEXCOORD4SPROC glad_glTexCoord4s;
+#define glTexCoord4s glad_glTexCoord4s
+GLAD_API_CALL PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv;
+#define glTexCoord4sv glad_glTexCoord4sv
+GLAD_API_CALL PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui;
+#define glTexCoordP1ui glad_glTexCoordP1ui
+GLAD_API_CALL PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv;
+#define glTexCoordP1uiv glad_glTexCoordP1uiv
+GLAD_API_CALL PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui;
+#define glTexCoordP2ui glad_glTexCoordP2ui
+GLAD_API_CALL PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv;
+#define glTexCoordP2uiv glad_glTexCoordP2uiv
+GLAD_API_CALL PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui;
+#define glTexCoordP3ui glad_glTexCoordP3ui
+GLAD_API_CALL PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv;
+#define glTexCoordP3uiv glad_glTexCoordP3uiv
+GLAD_API_CALL PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui;
+#define glTexCoordP4ui glad_glTexCoordP4ui
+GLAD_API_CALL PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv;
+#define glTexCoordP4uiv glad_glTexCoordP4uiv
+GLAD_API_CALL PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer;
+#define glTexCoordPointer glad_glTexCoordPointer
+GLAD_API_CALL PFNGLTEXENVFPROC glad_glTexEnvf;
+#define glTexEnvf glad_glTexEnvf
+GLAD_API_CALL PFNGLTEXENVFVPROC glad_glTexEnvfv;
+#define glTexEnvfv glad_glTexEnvfv
+GLAD_API_CALL PFNGLTEXENVIPROC glad_glTexEnvi;
+#define glTexEnvi glad_glTexEnvi
+GLAD_API_CALL PFNGLTEXENVIVPROC glad_glTexEnviv;
+#define glTexEnviv glad_glTexEnviv
+GLAD_API_CALL PFNGLTEXGENDPROC glad_glTexGend;
+#define glTexGend glad_glTexGend
+GLAD_API_CALL PFNGLTEXGENDVPROC glad_glTexGendv;
+#define glTexGendv glad_glTexGendv
+GLAD_API_CALL PFNGLTEXGENFPROC glad_glTexGenf;
+#define glTexGenf glad_glTexGenf
+GLAD_API_CALL PFNGLTEXGENFVPROC glad_glTexGenfv;
+#define glTexGenfv glad_glTexGenfv
+GLAD_API_CALL PFNGLTEXGENIPROC glad_glTexGeni;
+#define glTexGeni glad_glTexGeni
+GLAD_API_CALL PFNGLTEXGENIVPROC glad_glTexGeniv;
+#define glTexGeniv glad_glTexGeniv
+GLAD_API_CALL PFNGLTEXIMAGE1DPROC glad_glTexImage1D;
+#define glTexImage1D glad_glTexImage1D
+GLAD_API_CALL PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
+#define glTexImage2D glad_glTexImage2D
+GLAD_API_CALL PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample;
+#define glTexImage2DMultisample glad_glTexImage2DMultisample
+GLAD_API_CALL PFNGLTEXIMAGE3DPROC glad_glTexImage3D;
+#define glTexImage3D glad_glTexImage3D
+GLAD_API_CALL PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample;
+#define glTexImage3DMultisample glad_glTexImage3DMultisample
+GLAD_API_CALL PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv;
+#define glTexParameterIiv glad_glTexParameterIiv
+GLAD_API_CALL PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv;
+#define glTexParameterIuiv glad_glTexParameterIuiv
+GLAD_API_CALL PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
+#define glTexParameterf glad_glTexParameterf
+GLAD_API_CALL PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
+#define glTexParameterfv glad_glTexParameterfv
+GLAD_API_CALL PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
+#define glTexParameteri glad_glTexParameteri
+GLAD_API_CALL PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
+#define glTexParameteriv glad_glTexParameteriv
+GLAD_API_CALL PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D;
+#define glTexSubImage1D glad_glTexSubImage1D
+GLAD_API_CALL PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
+#define glTexSubImage2D glad_glTexSubImage2D
+GLAD_API_CALL PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;
+#define glTexSubImage3D glad_glTexSubImage3D
+GLAD_API_CALL PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings;
+#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings
+GLAD_API_CALL PFNGLTRANSLATEDPROC glad_glTranslated;
+#define glTranslated glad_glTranslated
+GLAD_API_CALL PFNGLTRANSLATEFPROC glad_glTranslatef;
+#define glTranslatef glad_glTranslatef
+GLAD_API_CALL PFNGLUNIFORM1FPROC glad_glUniform1f;
+#define glUniform1f glad_glUniform1f
+GLAD_API_CALL PFNGLUNIFORM1FVPROC glad_glUniform1fv;
+#define glUniform1fv glad_glUniform1fv
+GLAD_API_CALL PFNGLUNIFORM1IPROC glad_glUniform1i;
+#define glUniform1i glad_glUniform1i
+GLAD_API_CALL PFNGLUNIFORM1IVPROC glad_glUniform1iv;
+#define glUniform1iv glad_glUniform1iv
+GLAD_API_CALL PFNGLUNIFORM1UIPROC glad_glUniform1ui;
+#define glUniform1ui glad_glUniform1ui
+GLAD_API_CALL PFNGLUNIFORM1UIVPROC glad_glUniform1uiv;
+#define glUniform1uiv glad_glUniform1uiv
+GLAD_API_CALL PFNGLUNIFORM2FPROC glad_glUniform2f;
+#define glUniform2f glad_glUniform2f
+GLAD_API_CALL PFNGLUNIFORM2FVPROC glad_glUniform2fv;
+#define glUniform2fv glad_glUniform2fv
+GLAD_API_CALL PFNGLUNIFORM2IPROC glad_glUniform2i;
+#define glUniform2i glad_glUniform2i
+GLAD_API_CALL PFNGLUNIFORM2IVPROC glad_glUniform2iv;
+#define glUniform2iv glad_glUniform2iv
+GLAD_API_CALL PFNGLUNIFORM2UIPROC glad_glUniform2ui;
+#define glUniform2ui glad_glUniform2ui
+GLAD_API_CALL PFNGLUNIFORM2UIVPROC glad_glUniform2uiv;
+#define glUniform2uiv glad_glUniform2uiv
+GLAD_API_CALL PFNGLUNIFORM3FPROC glad_glUniform3f;
+#define glUniform3f glad_glUniform3f
+GLAD_API_CALL PFNGLUNIFORM3FVPROC glad_glUniform3fv;
+#define glUniform3fv glad_glUniform3fv
+GLAD_API_CALL PFNGLUNIFORM3IPROC glad_glUniform3i;
+#define glUniform3i glad_glUniform3i
+GLAD_API_CALL PFNGLUNIFORM3IVPROC glad_glUniform3iv;
+#define glUniform3iv glad_glUniform3iv
+GLAD_API_CALL PFNGLUNIFORM3UIPROC glad_glUniform3ui;
+#define glUniform3ui glad_glUniform3ui
+GLAD_API_CALL PFNGLUNIFORM3UIVPROC glad_glUniform3uiv;
+#define glUniform3uiv glad_glUniform3uiv
+GLAD_API_CALL PFNGLUNIFORM4FPROC glad_glUniform4f;
+#define glUniform4f glad_glUniform4f
+GLAD_API_CALL PFNGLUNIFORM4FVPROC glad_glUniform4fv;
+#define glUniform4fv glad_glUniform4fv
+GLAD_API_CALL PFNGLUNIFORM4IPROC glad_glUniform4i;
+#define glUniform4i glad_glUniform4i
+GLAD_API_CALL PFNGLUNIFORM4IVPROC glad_glUniform4iv;
+#define glUniform4iv glad_glUniform4iv
+GLAD_API_CALL PFNGLUNIFORM4UIPROC glad_glUniform4ui;
+#define glUniform4ui glad_glUniform4ui
+GLAD_API_CALL PFNGLUNIFORM4UIVPROC glad_glUniform4uiv;
+#define glUniform4uiv glad_glUniform4uiv
+GLAD_API_CALL PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding;
+#define glUniformBlockBinding glad_glUniformBlockBinding
+GLAD_API_CALL PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv;
+#define glUniformMatrix2fv glad_glUniformMatrix2fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv;
+#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv;
+#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv;
+#define glUniformMatrix3fv glad_glUniformMatrix3fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv;
+#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv;
+#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv;
+#define glUniformMatrix4fv glad_glUniformMatrix4fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv;
+#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;
+#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv
+GLAD_API_CALL PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer;
+#define glUnmapBuffer glad_glUnmapBuffer
+GLAD_API_CALL PFNGLUSEPROGRAMPROC glad_glUseProgram;
+#define glUseProgram glad_glUseProgram
+GLAD_API_CALL PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram;
+#define glValidateProgram glad_glValidateProgram
+GLAD_API_CALL PFNGLVERTEX2DPROC glad_glVertex2d;
+#define glVertex2d glad_glVertex2d
+GLAD_API_CALL PFNGLVERTEX2DVPROC glad_glVertex2dv;
+#define glVertex2dv glad_glVertex2dv
+GLAD_API_CALL PFNGLVERTEX2FPROC glad_glVertex2f;
+#define glVertex2f glad_glVertex2f
+GLAD_API_CALL PFNGLVERTEX2FVPROC glad_glVertex2fv;
+#define glVertex2fv glad_glVertex2fv
+GLAD_API_CALL PFNGLVERTEX2IPROC glad_glVertex2i;
+#define glVertex2i glad_glVertex2i
+GLAD_API_CALL PFNGLVERTEX2IVPROC glad_glVertex2iv;
+#define glVertex2iv glad_glVertex2iv
+GLAD_API_CALL PFNGLVERTEX2SPROC glad_glVertex2s;
+#define glVertex2s glad_glVertex2s
+GLAD_API_CALL PFNGLVERTEX2SVPROC glad_glVertex2sv;
+#define glVertex2sv glad_glVertex2sv
+GLAD_API_CALL PFNGLVERTEX3DPROC glad_glVertex3d;
+#define glVertex3d glad_glVertex3d
+GLAD_API_CALL PFNGLVERTEX3DVPROC glad_glVertex3dv;
+#define glVertex3dv glad_glVertex3dv
+GLAD_API_CALL PFNGLVERTEX3FPROC glad_glVertex3f;
+#define glVertex3f glad_glVertex3f
+GLAD_API_CALL PFNGLVERTEX3FVPROC glad_glVertex3fv;
+#define glVertex3fv glad_glVertex3fv
+GLAD_API_CALL PFNGLVERTEX3IPROC glad_glVertex3i;
+#define glVertex3i glad_glVertex3i
+GLAD_API_CALL PFNGLVERTEX3IVPROC glad_glVertex3iv;
+#define glVertex3iv glad_glVertex3iv
+GLAD_API_CALL PFNGLVERTEX3SPROC glad_glVertex3s;
+#define glVertex3s glad_glVertex3s
+GLAD_API_CALL PFNGLVERTEX3SVPROC glad_glVertex3sv;
+#define glVertex3sv glad_glVertex3sv
+GLAD_API_CALL PFNGLVERTEX4DPROC glad_glVertex4d;
+#define glVertex4d glad_glVertex4d
+GLAD_API_CALL PFNGLVERTEX4DVPROC glad_glVertex4dv;
+#define glVertex4dv glad_glVertex4dv
+GLAD_API_CALL PFNGLVERTEX4FPROC glad_glVertex4f;
+#define glVertex4f glad_glVertex4f
+GLAD_API_CALL PFNGLVERTEX4FVPROC glad_glVertex4fv;
+#define glVertex4fv glad_glVertex4fv
+GLAD_API_CALL PFNGLVERTEX4IPROC glad_glVertex4i;
+#define glVertex4i glad_glVertex4i
+GLAD_API_CALL PFNGLVERTEX4IVPROC glad_glVertex4iv;
+#define glVertex4iv glad_glVertex4iv
+GLAD_API_CALL PFNGLVERTEX4SPROC glad_glVertex4s;
+#define glVertex4s glad_glVertex4s
+GLAD_API_CALL PFNGLVERTEX4SVPROC glad_glVertex4sv;
+#define glVertex4sv glad_glVertex4sv
+GLAD_API_CALL PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d;
+#define glVertexAttrib1d glad_glVertexAttrib1d
+GLAD_API_CALL PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv;
+#define glVertexAttrib1dv glad_glVertexAttrib1dv
+GLAD_API_CALL PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f;
+#define glVertexAttrib1f glad_glVertexAttrib1f
+GLAD_API_CALL PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv;
+#define glVertexAttrib1fv glad_glVertexAttrib1fv
+GLAD_API_CALL PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s;
+#define glVertexAttrib1s glad_glVertexAttrib1s
+GLAD_API_CALL PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv;
+#define glVertexAttrib1sv glad_glVertexAttrib1sv
+GLAD_API_CALL PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d;
+#define glVertexAttrib2d glad_glVertexAttrib2d
+GLAD_API_CALL PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv;
+#define glVertexAttrib2dv glad_glVertexAttrib2dv
+GLAD_API_CALL PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f;
+#define glVertexAttrib2f glad_glVertexAttrib2f
+GLAD_API_CALL PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv;
+#define glVertexAttrib2fv glad_glVertexAttrib2fv
+GLAD_API_CALL PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s;
+#define glVertexAttrib2s glad_glVertexAttrib2s
+GLAD_API_CALL PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv;
+#define glVertexAttrib2sv glad_glVertexAttrib2sv
+GLAD_API_CALL PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d;
+#define glVertexAttrib3d glad_glVertexAttrib3d
+GLAD_API_CALL PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv;
+#define glVertexAttrib3dv glad_glVertexAttrib3dv
+GLAD_API_CALL PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f;
+#define glVertexAttrib3f glad_glVertexAttrib3f
+GLAD_API_CALL PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv;
+#define glVertexAttrib3fv glad_glVertexAttrib3fv
+GLAD_API_CALL PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s;
+#define glVertexAttrib3s glad_glVertexAttrib3s
+GLAD_API_CALL PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv;
+#define glVertexAttrib3sv glad_glVertexAttrib3sv
+GLAD_API_CALL PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv;
+#define glVertexAttrib4Nbv glad_glVertexAttrib4Nbv
+GLAD_API_CALL PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv;
+#define glVertexAttrib4Niv glad_glVertexAttrib4Niv
+GLAD_API_CALL PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv;
+#define glVertexAttrib4Nsv glad_glVertexAttrib4Nsv
+GLAD_API_CALL PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub;
+#define glVertexAttrib4Nub glad_glVertexAttrib4Nub
+GLAD_API_CALL PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv;
+#define glVertexAttrib4Nubv glad_glVertexAttrib4Nubv
+GLAD_API_CALL PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv;
+#define glVertexAttrib4Nuiv glad_glVertexAttrib4Nuiv
+GLAD_API_CALL PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv;
+#define glVertexAttrib4Nusv glad_glVertexAttrib4Nusv
+GLAD_API_CALL PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv;
+#define glVertexAttrib4bv glad_glVertexAttrib4bv
+GLAD_API_CALL PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d;
+#define glVertexAttrib4d glad_glVertexAttrib4d
+GLAD_API_CALL PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv;
+#define glVertexAttrib4dv glad_glVertexAttrib4dv
+GLAD_API_CALL PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f;
+#define glVertexAttrib4f glad_glVertexAttrib4f
+GLAD_API_CALL PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv;
+#define glVertexAttrib4fv glad_glVertexAttrib4fv
+GLAD_API_CALL PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv;
+#define glVertexAttrib4iv glad_glVertexAttrib4iv
+GLAD_API_CALL PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s;
+#define glVertexAttrib4s glad_glVertexAttrib4s
+GLAD_API_CALL PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv;
+#define glVertexAttrib4sv glad_glVertexAttrib4sv
+GLAD_API_CALL PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv;
+#define glVertexAttrib4ubv glad_glVertexAttrib4ubv
+GLAD_API_CALL PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv;
+#define glVertexAttrib4uiv glad_glVertexAttrib4uiv
+GLAD_API_CALL PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv;
+#define glVertexAttrib4usv glad_glVertexAttrib4usv
+GLAD_API_CALL PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor;
+#define glVertexAttribDivisor glad_glVertexAttribDivisor
+GLAD_API_CALL PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i;
+#define glVertexAttribI1i glad_glVertexAttribI1i
+GLAD_API_CALL PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv;
+#define glVertexAttribI1iv glad_glVertexAttribI1iv
+GLAD_API_CALL PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui;
+#define glVertexAttribI1ui glad_glVertexAttribI1ui
+GLAD_API_CALL PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv;
+#define glVertexAttribI1uiv glad_glVertexAttribI1uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i;
+#define glVertexAttribI2i glad_glVertexAttribI2i
+GLAD_API_CALL PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv;
+#define glVertexAttribI2iv glad_glVertexAttribI2iv
+GLAD_API_CALL PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui;
+#define glVertexAttribI2ui glad_glVertexAttribI2ui
+GLAD_API_CALL PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv;
+#define glVertexAttribI2uiv glad_glVertexAttribI2uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i;
+#define glVertexAttribI3i glad_glVertexAttribI3i
+GLAD_API_CALL PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv;
+#define glVertexAttribI3iv glad_glVertexAttribI3iv
+GLAD_API_CALL PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui;
+#define glVertexAttribI3ui glad_glVertexAttribI3ui
+GLAD_API_CALL PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv;
+#define glVertexAttribI3uiv glad_glVertexAttribI3uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv;
+#define glVertexAttribI4bv glad_glVertexAttribI4bv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i;
+#define glVertexAttribI4i glad_glVertexAttribI4i
+GLAD_API_CALL PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv;
+#define glVertexAttribI4iv glad_glVertexAttribI4iv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv;
+#define glVertexAttribI4sv glad_glVertexAttribI4sv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv;
+#define glVertexAttribI4ubv glad_glVertexAttribI4ubv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui;
+#define glVertexAttribI4ui glad_glVertexAttribI4ui
+GLAD_API_CALL PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv;
+#define glVertexAttribI4uiv glad_glVertexAttribI4uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv;
+#define glVertexAttribI4usv glad_glVertexAttribI4usv
+GLAD_API_CALL PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer;
+#define glVertexAttribIPointer glad_glVertexAttribIPointer
+GLAD_API_CALL PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui;
+#define glVertexAttribP1ui glad_glVertexAttribP1ui
+GLAD_API_CALL PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv;
+#define glVertexAttribP1uiv glad_glVertexAttribP1uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui;
+#define glVertexAttribP2ui glad_glVertexAttribP2ui
+GLAD_API_CALL PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv;
+#define glVertexAttribP2uiv glad_glVertexAttribP2uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui;
+#define glVertexAttribP3ui glad_glVertexAttribP3ui
+GLAD_API_CALL PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv;
+#define glVertexAttribP3uiv glad_glVertexAttribP3uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui;
+#define glVertexAttribP4ui glad_glVertexAttribP4ui
+GLAD_API_CALL PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv;
+#define glVertexAttribP4uiv glad_glVertexAttribP4uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer;
+#define glVertexAttribPointer glad_glVertexAttribPointer
+GLAD_API_CALL PFNGLVERTEXP2UIPROC glad_glVertexP2ui;
+#define glVertexP2ui glad_glVertexP2ui
+GLAD_API_CALL PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv;
+#define glVertexP2uiv glad_glVertexP2uiv
+GLAD_API_CALL PFNGLVERTEXP3UIPROC glad_glVertexP3ui;
+#define glVertexP3ui glad_glVertexP3ui
+GLAD_API_CALL PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv;
+#define glVertexP3uiv glad_glVertexP3uiv
+GLAD_API_CALL PFNGLVERTEXP4UIPROC glad_glVertexP4ui;
+#define glVertexP4ui glad_glVertexP4ui
+GLAD_API_CALL PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv;
+#define glVertexP4uiv glad_glVertexP4uiv
+GLAD_API_CALL PFNGLVERTEXPOINTERPROC glad_glVertexPointer;
+#define glVertexPointer glad_glVertexPointer
+GLAD_API_CALL PFNGLVIEWPORTPROC glad_glViewport;
+#define glViewport glad_glViewport
+GLAD_API_CALL PFNGLWAITSYNCPROC glad_glWaitSync;
+#define glWaitSync glad_glWaitSync
+GLAD_API_CALL PFNGLWINDOWPOS2DPROC glad_glWindowPos2d;
+#define glWindowPos2d glad_glWindowPos2d
+GLAD_API_CALL PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv;
+#define glWindowPos2dv glad_glWindowPos2dv
+GLAD_API_CALL PFNGLWINDOWPOS2FPROC glad_glWindowPos2f;
+#define glWindowPos2f glad_glWindowPos2f
+GLAD_API_CALL PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv;
+#define glWindowPos2fv glad_glWindowPos2fv
+GLAD_API_CALL PFNGLWINDOWPOS2IPROC glad_glWindowPos2i;
+#define glWindowPos2i glad_glWindowPos2i
+GLAD_API_CALL PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv;
+#define glWindowPos2iv glad_glWindowPos2iv
+GLAD_API_CALL PFNGLWINDOWPOS2SPROC glad_glWindowPos2s;
+#define glWindowPos2s glad_glWindowPos2s
+GLAD_API_CALL PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv;
+#define glWindowPos2sv glad_glWindowPos2sv
+GLAD_API_CALL PFNGLWINDOWPOS3DPROC glad_glWindowPos3d;
+#define glWindowPos3d glad_glWindowPos3d
+GLAD_API_CALL PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv;
+#define glWindowPos3dv glad_glWindowPos3dv
+GLAD_API_CALL PFNGLWINDOWPOS3FPROC glad_glWindowPos3f;
+#define glWindowPos3f glad_glWindowPos3f
+GLAD_API_CALL PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv;
+#define glWindowPos3fv glad_glWindowPos3fv
+GLAD_API_CALL PFNGLWINDOWPOS3IPROC glad_glWindowPos3i;
+#define glWindowPos3i glad_glWindowPos3i
+GLAD_API_CALL PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv;
+#define glWindowPos3iv glad_glWindowPos3iv
+GLAD_API_CALL PFNGLWINDOWPOS3SPROC glad_glWindowPos3s;
+#define glWindowPos3s glad_glWindowPos3s
+GLAD_API_CALL PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv;
+#define glWindowPos3sv glad_glWindowPos3sv
+
+
+GLAD_API_CALL int gladLoadGLUserPtr( GLADuserptrloadfunc load, void *userptr);
+GLAD_API_CALL int gladLoadGL( GLADloadfunc load);
+
+
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/khrplatform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/khrplatform.h
new file mode 100644
index 0000000..975bbff
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/khrplatform.h
@@ -0,0 +1,282 @@
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2018 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Khronos platform-specific types and definitions.
+ *
+ * The master copy of khrplatform.h is maintained in the Khronos EGL
+ * Registry repository at https://github.com/KhronosGroup/EGL-Registry
+ * The last semantic modification to khrplatform.h was at commit ID:
+ * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
+ *
+ * Adopters may modify this file to suit their platform. Adopters are
+ * encouraged to submit platform specific modifications to the Khronos
+ * group so that they can be included in future versions of this file.
+ * Please submit changes by filing pull requests or issues on
+ * the EGL Registry repository linked above.
+ *
+ *
+ * See the Implementer's Guidelines for information about where this file
+ * should be located on your system and for more details of its use:
+ * http://www.khronos.org/registry/implementers_guide.pdf
+ *
+ * This file should be included as
+ * #include <KHR/khrplatform.h>
+ * by Khronos client API header files that use its types and defines.
+ *
+ * The types in khrplatform.h should only be used to define API-specific types.
+ *
+ * Types defined in khrplatform.h:
+ * khronos_int8_t signed 8 bit
+ * khronos_uint8_t unsigned 8 bit
+ * khronos_int16_t signed 16 bit
+ * khronos_uint16_t unsigned 16 bit
+ * khronos_int32_t signed 32 bit
+ * khronos_uint32_t unsigned 32 bit
+ * khronos_int64_t signed 64 bit
+ * khronos_uint64_t unsigned 64 bit
+ * khronos_intptr_t signed same number of bits as a pointer
+ * khronos_uintptr_t unsigned same number of bits as a pointer
+ * khronos_ssize_t signed size
+ * khronos_usize_t unsigned size
+ * khronos_float_t signed 32 bit floating point
+ * khronos_time_ns_t unsigned 64 bit time in nanoseconds
+ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+ * nanoseconds
+ * khronos_stime_nanoseconds_t signed time interval in nanoseconds
+ * khronos_boolean_enum_t enumerated boolean type. This should
+ * only be used as a base type when a client API's boolean type is
+ * an enum. Client APIs which use an integer or other type for
+ * booleans cannot use this as the base type for their boolean.
+ *
+ * Tokens defined in khrplatform.h:
+ *
+ * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
+ *
+ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+ *
+ * Calling convention macros defined in this file:
+ * KHRONOS_APICALL
+ * KHRONOS_APIENTRY
+ * KHRONOS_APIATTRIBUTES
+ *
+ * These may be used in function prototypes as:
+ *
+ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+ * int arg1,
+ * int arg2) KHRONOS_APIATTRIBUTES;
+ */
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APICALL
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+# define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+# define KHRONOS_APICALL IMPORT_C
+#elif defined(__ANDROID__)
+# define KHRONOS_APICALL __attribute__((visibility("default")))
+#else
+# define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+ /* Win32 but not WinCE */
+# define KHRONOS_APIENTRY __stdcall
+#else
+# define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIATTRIBUTES
+ *-------------------------------------------------------------------------
+ * This follows the closing parenthesis of the function prototype arguments.
+ */
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+ * basic type definitions
+ *-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+ * Using <stdint.h>
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+ * Using <inttypes.h>
+ */
+#include <inttypes.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+ * Win32
+ */
+typedef __int32 khronos_int32_t;
+typedef unsigned __int32 khronos_uint32_t;
+typedef __int64 khronos_int64_t;
+typedef unsigned __int64 khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+ * Sun or Digital
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int khronos_int64_t;
+typedef unsigned long int khronos_uint64_t;
+#else
+typedef long long int khronos_int64_t;
+typedef unsigned long long int khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif 0
+
+/*
+ * Hypothetical platform with no float or int64 support
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64 0
+#define KHRONOS_SUPPORT_FLOAT 0
+
+#else
+
+/*
+ * Generic fallback
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#endif
+
+
+/*
+ * Types that are (so far) the same on all platforms
+ */
+typedef signed char khronos_int8_t;
+typedef unsigned char khronos_uint8_t;
+typedef signed short int khronos_int16_t;
+typedef unsigned short int khronos_uint16_t;
+
+/*
+ * Types that differ between LLP64 and LP64 architectures - in LLP64,
+ * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
+ * to be the only LLP64 architecture in current use.
+ */
+#ifdef _WIN64
+typedef signed long long int khronos_intptr_t;
+typedef unsigned long long int khronos_uintptr_t;
+typedef signed long long int khronos_ssize_t;
+typedef unsigned long long int khronos_usize_t;
+#else
+typedef signed long int khronos_intptr_t;
+typedef unsigned long int khronos_uintptr_t;
+typedef signed long int khronos_ssize_t;
+typedef unsigned long int khronos_usize_t;
+#endif
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+ * Float type
+ */
+typedef float khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+ *
+ * These types can be used to represent a time interval in nanoseconds or
+ * an absolute Unadjusted System Time. Unadjusted System Time is the number
+ * of nanoseconds since some arbitrary system event (e.g. since the last
+ * time the system booted). The Unadjusted System Time is an unsigned
+ * 64 bit value that wraps back to 0 every 584 years. Time intervals
+ * may be either signed or unsigned.
+ */
+typedef khronos_uint64_t khronos_utime_nanoseconds_t;
+typedef khronos_int64_t khronos_stime_nanoseconds_t;
+#endif
+
+/*
+ * Dummy value used to pad enum types to 32 bits.
+ */
+#ifndef KHRONOS_MAX_ENUM
+#define KHRONOS_MAX_ENUM 0x7FFFFFFF
+#endif
+
+/*
+ * Enumerated boolean type
+ *
+ * Values other than zero should be considered to be true. Therefore
+ * comparisons should not be made against KHRONOS_TRUE.
+ */
+typedef enum {
+ KHRONOS_FALSE = 0,
+ KHRONOS_TRUE = 1,
+ KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
+} khronos_boolean_enum_t;
+
+#endif /* __khrplatform_h_ */
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vk_platform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vk_platform.h
new file mode 100644
index 0000000..d7d22e1
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vk_platform.h
@@ -0,0 +1,92 @@
+/* */
+/* File: vk_platform.h */
+/* */
+/*
+** Copyright (c) 2014-2017 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+
+#ifndef VK_PLATFORM_H_
+#define VK_PLATFORM_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/*
+***************************************************************************************************
+* Platform-specific directives and type declarations
+***************************************************************************************************
+*/
+
+/* Platform-specific calling convention macros.
+ *
+ * Platforms should define these so that Vulkan clients call Vulkan commands
+ * with the same calling conventions that the Vulkan implementation expects.
+ *
+ * VKAPI_ATTR - Placed before the return type in function declarations.
+ * Useful for C++11 and GCC/Clang-style function attribute syntax.
+ * VKAPI_CALL - Placed after the return type in function declarations.
+ * Useful for MSVC-style calling convention syntax.
+ * VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
+ *
+ * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
+ * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
+ */
+#if defined(_WIN32)
+ /* On Windows, Vulkan commands use the stdcall convention */
+ #define VKAPI_ATTR
+ #define VKAPI_CALL __stdcall
+ #define VKAPI_PTR VKAPI_CALL
+#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
+ #error "Vulkan isn't supported for the 'armeabi' NDK ABI"
+#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
+ /* On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" */
+ /* calling convention, i.e. float parameters are passed in registers. This */
+ /* is true even if the rest of the application passes floats on the stack, */
+ /* as it does by default when compiling for the armeabi-v7a NDK ABI. */
+ #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
+ #define VKAPI_CALL
+ #define VKAPI_PTR VKAPI_ATTR
+#else
+ /* On other platforms, use the default calling convention */
+ #define VKAPI_ATTR
+ #define VKAPI_CALL
+ #define VKAPI_PTR
+#endif
+
+#include <stddef.h>
+
+#if !defined(VK_NO_STDINT_H)
+ #if defined(_MSC_VER) && (_MSC_VER < 1600)
+ typedef signed __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+ typedef signed __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+ typedef signed __int32 int32_t;
+ typedef unsigned __int32 uint32_t;
+ typedef signed __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+ #else
+ #include <stdint.h>
+ #endif
+#endif /* !defined(VK_NO_STDINT_H) */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vulkan.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vulkan.h
new file mode 100644
index 0000000..6bace71
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad/vulkan.h
@@ -0,0 +1,3480 @@
+/**
+ * Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:38 2019
+ *
+ * Generator: C/C++
+ * Specification: vk
+ * Extensions: 3
+ *
+ * APIs:
+ * - vulkan=1.1
+ *
+ * Options:
+ * - MX_GLOBAL = False
+ * - LOADER = False
+ * - ALIAS = False
+ * - HEADER_ONLY = False
+ * - DEBUG = False
+ * - MX = False
+ *
+ * Commandline:
+ * --api='vulkan=1.1' --extensions='VK_EXT_debug_report,VK_KHR_surface,VK_KHR_swapchain' c
+ *
+ * Online:
+ * http://glad.sh/#api=vulkan%3D1.1&extensions=VK_EXT_debug_report%2CVK_KHR_surface%2CVK_KHR_swapchain&generator=c&options=
+ *
+ */
+
+#ifndef GLAD_VULKAN_H_
+#define GLAD_VULKAN_H_
+
+#ifdef VULKAN_H_
+ #error header already included (API: vulkan), remove previous include!
+#endif
+#define VULKAN_H_ 1
+
+#ifdef VULKAN_CORE_H_
+ #error header already included (API: vulkan), remove previous include!
+#endif
+#define VULKAN_CORE_H_ 1
+
+
+#define GLAD_VULKAN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GLAD_PLATFORM_H_
+#define GLAD_PLATFORM_H_
+
+#ifndef GLAD_PLATFORM_WIN32
+ #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
+ #define GLAD_PLATFORM_WIN32 1
+ #else
+ #define GLAD_PLATFORM_WIN32 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_APPLE
+ #ifdef __APPLE__
+ #define GLAD_PLATFORM_APPLE 1
+ #else
+ #define GLAD_PLATFORM_APPLE 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_EMSCRIPTEN
+ #ifdef __EMSCRIPTEN__
+ #define GLAD_PLATFORM_EMSCRIPTEN 1
+ #else
+ #define GLAD_PLATFORM_EMSCRIPTEN 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_UWP
+ #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
+ #ifdef __has_include
+ #if __has_include(<winapifamily.h>)
+ #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+ #endif
+ #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
+ #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+ #endif
+ #endif
+
+ #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
+ #include <winapifamily.h>
+ #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+ #define GLAD_PLATFORM_UWP 1
+ #endif
+ #endif
+
+ #ifndef GLAD_PLATFORM_UWP
+ #define GLAD_PLATFORM_UWP 0
+ #endif
+#endif
+
+#ifdef __GNUC__
+ #define GLAD_GNUC_EXTENSION __extension__
+#else
+ #define GLAD_GNUC_EXTENSION
+#endif
+
+#ifndef GLAD_API_CALL
+ #if defined(GLAD_API_CALL_EXPORT)
+ #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
+ #if defined(GLAD_API_CALL_EXPORT_BUILD)
+ #if defined(__GNUC__)
+ #define GLAD_API_CALL __attribute__ ((dllexport)) extern
+ #else
+ #define GLAD_API_CALL __declspec(dllexport) extern
+ #endif
+ #else
+ #if defined(__GNUC__)
+ #define GLAD_API_CALL __attribute__ ((dllimport)) extern
+ #else
+ #define GLAD_API_CALL __declspec(dllimport) extern
+ #endif
+ #endif
+ #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
+ #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
+ #else
+ #define GLAD_API_CALL extern
+ #endif
+ #else
+ #define GLAD_API_CALL extern
+ #endif
+#endif
+
+#ifdef APIENTRY
+ #define GLAD_API_PTR APIENTRY
+#elif GLAD_PLATFORM_WIN32
+ #define GLAD_API_PTR __stdcall
+#else
+ #define GLAD_API_PTR
+#endif
+
+#ifndef GLAPI
+#define GLAPI GLAD_API_CALL
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY GLAD_API_PTR
+#endif
+
+
+#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
+#define GLAD_VERSION_MAJOR(version) (version / 10000)
+#define GLAD_VERSION_MINOR(version) (version % 10000)
+
+typedef void (*GLADapiproc)(void);
+
+typedef GLADapiproc (*GLADloadfunc)(const char *name);
+typedef GLADapiproc (*GLADuserptrloadfunc)(const char *name, void *userptr);
+
+typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
+typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
+
+#endif /* GLAD_PLATFORM_H_ */
+
+#define VK_ATTACHMENT_UNUSED (~0U)
+#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
+#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
+#define VK_FALSE 0
+#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
+#define VK_KHR_SURFACE_SPEC_VERSION 25
+#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
+#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
+#define VK_LOD_CLAMP_NONE 1000.0f
+#define VK_LUID_SIZE 8
+#define VK_MAX_DESCRIPTION_SIZE 256
+#define VK_MAX_DEVICE_GROUP_SIZE 32
+#define VK_MAX_EXTENSION_NAME_SIZE 256
+#define VK_MAX_MEMORY_HEAPS 16
+#define VK_MAX_MEMORY_TYPES 32
+#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
+#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)
+#define VK_QUEUE_FAMILY_IGNORED (~0U)
+#define VK_REMAINING_ARRAY_LAYERS (~0U)
+#define VK_REMAINING_MIP_LEVELS (~0U)
+#define VK_SUBPASS_EXTERNAL (~0U)
+#define VK_TRUE 1
+#define VK_UUID_SIZE 16
+#define VK_WHOLE_SIZE (~0ULL)
+
+
+#include <glad/vk_platform.h>
+#define VK_MAKE_VERSION(major, minor, patch) \
+ (((major) << 22) | ((minor) << 12) | (patch))
+#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
+#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
+#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
+/* DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. */
+/*#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 */
+/* Vulkan 1.0 version number */
+#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)/* Patch version should always be set to 0 */
+/* Vulkan 1.1 version number */
+#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)/* Patch version should always be set to 0 */
+/* Version of this file */
+#define VK_HEADER_VERSION 106
+#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
+#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
+#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+ #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
+#else
+ #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#endif
+#endif
+#define VK_NULL_HANDLE 0
+
+
+
+
+
+
+
+
+VK_DEFINE_HANDLE(VkInstance)
+VK_DEFINE_HANDLE(VkPhysicalDevice)
+VK_DEFINE_HANDLE(VkDevice)
+VK_DEFINE_HANDLE(VkQueue)
+VK_DEFINE_HANDLE(VkCommandBuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
+typedef enum VkAttachmentLoadOp {
+ VK_ATTACHMENT_LOAD_OP_LOAD = 0,
+ VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
+ VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2
+} VkAttachmentLoadOp;
+typedef enum VkAttachmentStoreOp {
+ VK_ATTACHMENT_STORE_OP_STORE = 0,
+ VK_ATTACHMENT_STORE_OP_DONT_CARE = 1
+} VkAttachmentStoreOp;
+typedef enum VkBlendFactor {
+ VK_BLEND_FACTOR_ZERO = 0,
+ VK_BLEND_FACTOR_ONE = 1,
+ VK_BLEND_FACTOR_SRC_COLOR = 2,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
+ VK_BLEND_FACTOR_DST_COLOR = 4,
+ VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
+ VK_BLEND_FACTOR_SRC_ALPHA = 6,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
+ VK_BLEND_FACTOR_DST_ALPHA = 8,
+ VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
+ VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
+ VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
+ VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
+ VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
+ VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
+ VK_BLEND_FACTOR_SRC1_COLOR = 15,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
+ VK_BLEND_FACTOR_SRC1_ALPHA = 17,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18
+} VkBlendFactor;
+typedef enum VkBlendOp {
+ VK_BLEND_OP_ADD = 0,
+ VK_BLEND_OP_SUBTRACT = 1,
+ VK_BLEND_OP_REVERSE_SUBTRACT = 2,
+ VK_BLEND_OP_MIN = 3,
+ VK_BLEND_OP_MAX = 4
+} VkBlendOp;
+typedef enum VkBorderColor {
+ VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
+ VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
+ VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
+ VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
+ VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
+ VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5
+} VkBorderColor;
+
+typedef enum VkPipelineCacheHeaderVersion {
+ VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1
+} VkPipelineCacheHeaderVersion;
+
+typedef enum VkDeviceQueueCreateFlagBits {
+ VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 1
+} VkDeviceQueueCreateFlagBits;
+typedef enum VkBufferCreateFlagBits {
+ VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 1,
+ VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 2,
+ VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 4,
+ VK_BUFFER_CREATE_PROTECTED_BIT = 8
+} VkBufferCreateFlagBits;
+typedef enum VkBufferUsageFlagBits {
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 1,
+ VK_BUFFER_USAGE_TRANSFER_DST_BIT = 2,
+ VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 4,
+ VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 8,
+ VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 16,
+ VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 32,
+ VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 64,
+ VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 128,
+ VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 256
+} VkBufferUsageFlagBits;
+typedef enum VkColorComponentFlagBits {
+ VK_COLOR_COMPONENT_R_BIT = 1,
+ VK_COLOR_COMPONENT_G_BIT = 2,
+ VK_COLOR_COMPONENT_B_BIT = 4,
+ VK_COLOR_COMPONENT_A_BIT = 8
+} VkColorComponentFlagBits;
+typedef enum VkComponentSwizzle {
+ VK_COMPONENT_SWIZZLE_IDENTITY = 0,
+ VK_COMPONENT_SWIZZLE_ZERO = 1,
+ VK_COMPONENT_SWIZZLE_ONE = 2,
+ VK_COMPONENT_SWIZZLE_R = 3,
+ VK_COMPONENT_SWIZZLE_G = 4,
+ VK_COMPONENT_SWIZZLE_B = 5,
+ VK_COMPONENT_SWIZZLE_A = 6
+} VkComponentSwizzle;
+typedef enum VkCommandPoolCreateFlagBits {
+ VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 1,
+ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 2,
+ VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 4
+} VkCommandPoolCreateFlagBits;
+typedef enum VkCommandPoolResetFlagBits {
+ VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 1
+} VkCommandPoolResetFlagBits;
+typedef enum VkCommandBufferResetFlagBits {
+ VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 1
+} VkCommandBufferResetFlagBits;
+typedef enum VkCommandBufferLevel {
+ VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
+ VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1
+} VkCommandBufferLevel;
+typedef enum VkCommandBufferUsageFlagBits {
+ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 1,
+ VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 2,
+ VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 4
+} VkCommandBufferUsageFlagBits;
+typedef enum VkCompareOp {
+ VK_COMPARE_OP_NEVER = 0,
+ VK_COMPARE_OP_LESS = 1,
+ VK_COMPARE_OP_EQUAL = 2,
+ VK_COMPARE_OP_LESS_OR_EQUAL = 3,
+ VK_COMPARE_OP_GREATER = 4,
+ VK_COMPARE_OP_NOT_EQUAL = 5,
+ VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
+ VK_COMPARE_OP_ALWAYS = 7
+} VkCompareOp;
+typedef enum VkCullModeFlagBits {
+ VK_CULL_MODE_NONE = 0,
+ VK_CULL_MODE_FRONT_BIT = 1,
+ VK_CULL_MODE_BACK_BIT = 2,
+ VK_CULL_MODE_FRONT_AND_BACK = 0x00000003
+} VkCullModeFlagBits;
+typedef enum VkDescriptorType {
+ VK_DESCRIPTOR_TYPE_SAMPLER = 0,
+ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
+ VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
+ VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
+ VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
+ VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
+ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
+ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
+ VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10
+} VkDescriptorType;
+typedef enum VkDynamicState {
+ VK_DYNAMIC_STATE_VIEWPORT = 0,
+ VK_DYNAMIC_STATE_SCISSOR = 1,
+ VK_DYNAMIC_STATE_LINE_WIDTH = 2,
+ VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
+ VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
+ VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
+ VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
+ VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
+ VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
+ VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1)
+} VkDynamicState;
+typedef enum VkFenceCreateFlagBits {
+ VK_FENCE_CREATE_SIGNALED_BIT = 1
+} VkFenceCreateFlagBits;
+typedef enum VkPolygonMode {
+ VK_POLYGON_MODE_FILL = 0,
+ VK_POLYGON_MODE_LINE = 1,
+ VK_POLYGON_MODE_POINT = 2
+} VkPolygonMode;
+typedef enum VkFormat {
+ VK_FORMAT_UNDEFINED = 0,
+ VK_FORMAT_R4G4_UNORM_PACK8 = 1,
+ VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
+ VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
+ VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
+ VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
+ VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
+ VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
+ VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
+ VK_FORMAT_R8_UNORM = 9,
+ VK_FORMAT_R8_SNORM = 10,
+ VK_FORMAT_R8_USCALED = 11,
+ VK_FORMAT_R8_SSCALED = 12,
+ VK_FORMAT_R8_UINT = 13,
+ VK_FORMAT_R8_SINT = 14,
+ VK_FORMAT_R8_SRGB = 15,
+ VK_FORMAT_R8G8_UNORM = 16,
+ VK_FORMAT_R8G8_SNORM = 17,
+ VK_FORMAT_R8G8_USCALED = 18,
+ VK_FORMAT_R8G8_SSCALED = 19,
+ VK_FORMAT_R8G8_UINT = 20,
+ VK_FORMAT_R8G8_SINT = 21,
+ VK_FORMAT_R8G8_SRGB = 22,
+ VK_FORMAT_R8G8B8_UNORM = 23,
+ VK_FORMAT_R8G8B8_SNORM = 24,
+ VK_FORMAT_R8G8B8_USCALED = 25,
+ VK_FORMAT_R8G8B8_SSCALED = 26,
+ VK_FORMAT_R8G8B8_UINT = 27,
+ VK_FORMAT_R8G8B8_SINT = 28,
+ VK_FORMAT_R8G8B8_SRGB = 29,
+ VK_FORMAT_B8G8R8_UNORM = 30,
+ VK_FORMAT_B8G8R8_SNORM = 31,
+ VK_FORMAT_B8G8R8_USCALED = 32,
+ VK_FORMAT_B8G8R8_SSCALED = 33,
+ VK_FORMAT_B8G8R8_UINT = 34,
+ VK_FORMAT_B8G8R8_SINT = 35,
+ VK_FORMAT_B8G8R8_SRGB = 36,
+ VK_FORMAT_R8G8B8A8_UNORM = 37,
+ VK_FORMAT_R8G8B8A8_SNORM = 38,
+ VK_FORMAT_R8G8B8A8_USCALED = 39,
+ VK_FORMAT_R8G8B8A8_SSCALED = 40,
+ VK_FORMAT_R8G8B8A8_UINT = 41,
+ VK_FORMAT_R8G8B8A8_SINT = 42,
+ VK_FORMAT_R8G8B8A8_SRGB = 43,
+ VK_FORMAT_B8G8R8A8_UNORM = 44,
+ VK_FORMAT_B8G8R8A8_SNORM = 45,
+ VK_FORMAT_B8G8R8A8_USCALED = 46,
+ VK_FORMAT_B8G8R8A8_SSCALED = 47,
+ VK_FORMAT_B8G8R8A8_UINT = 48,
+ VK_FORMAT_B8G8R8A8_SINT = 49,
+ VK_FORMAT_B8G8R8A8_SRGB = 50,
+ VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
+ VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
+ VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
+ VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
+ VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
+ VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
+ VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
+ VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
+ VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
+ VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
+ VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
+ VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
+ VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
+ VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
+ VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
+ VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
+ VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
+ VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
+ VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
+ VK_FORMAT_R16_UNORM = 70,
+ VK_FORMAT_R16_SNORM = 71,
+ VK_FORMAT_R16_USCALED = 72,
+ VK_FORMAT_R16_SSCALED = 73,
+ VK_FORMAT_R16_UINT = 74,
+ VK_FORMAT_R16_SINT = 75,
+ VK_FORMAT_R16_SFLOAT = 76,
+ VK_FORMAT_R16G16_UNORM = 77,
+ VK_FORMAT_R16G16_SNORM = 78,
+ VK_FORMAT_R16G16_USCALED = 79,
+ VK_FORMAT_R16G16_SSCALED = 80,
+ VK_FORMAT_R16G16_UINT = 81,
+ VK_FORMAT_R16G16_SINT = 82,
+ VK_FORMAT_R16G16_SFLOAT = 83,
+ VK_FORMAT_R16G16B16_UNORM = 84,
+ VK_FORMAT_R16G16B16_SNORM = 85,
+ VK_FORMAT_R16G16B16_USCALED = 86,
+ VK_FORMAT_R16G16B16_SSCALED = 87,
+ VK_FORMAT_R16G16B16_UINT = 88,
+ VK_FORMAT_R16G16B16_SINT = 89,
+ VK_FORMAT_R16G16B16_SFLOAT = 90,
+ VK_FORMAT_R16G16B16A16_UNORM = 91,
+ VK_FORMAT_R16G16B16A16_SNORM = 92,
+ VK_FORMAT_R16G16B16A16_USCALED = 93,
+ VK_FORMAT_R16G16B16A16_SSCALED = 94,
+ VK_FORMAT_R16G16B16A16_UINT = 95,
+ VK_FORMAT_R16G16B16A16_SINT = 96,
+ VK_FORMAT_R16G16B16A16_SFLOAT = 97,
+ VK_FORMAT_R32_UINT = 98,
+ VK_FORMAT_R32_SINT = 99,
+ VK_FORMAT_R32_SFLOAT = 100,
+ VK_FORMAT_R32G32_UINT = 101,
+ VK_FORMAT_R32G32_SINT = 102,
+ VK_FORMAT_R32G32_SFLOAT = 103,
+ VK_FORMAT_R32G32B32_UINT = 104,
+ VK_FORMAT_R32G32B32_SINT = 105,
+ VK_FORMAT_R32G32B32_SFLOAT = 106,
+ VK_FORMAT_R32G32B32A32_UINT = 107,
+ VK_FORMAT_R32G32B32A32_SINT = 108,
+ VK_FORMAT_R32G32B32A32_SFLOAT = 109,
+ VK_FORMAT_R64_UINT = 110,
+ VK_FORMAT_R64_SINT = 111,
+ VK_FORMAT_R64_SFLOAT = 112,
+ VK_FORMAT_R64G64_UINT = 113,
+ VK_FORMAT_R64G64_SINT = 114,
+ VK_FORMAT_R64G64_SFLOAT = 115,
+ VK_FORMAT_R64G64B64_UINT = 116,
+ VK_FORMAT_R64G64B64_SINT = 117,
+ VK_FORMAT_R64G64B64_SFLOAT = 118,
+ VK_FORMAT_R64G64B64A64_UINT = 119,
+ VK_FORMAT_R64G64B64A64_SINT = 120,
+ VK_FORMAT_R64G64B64A64_SFLOAT = 121,
+ VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
+ VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
+ VK_FORMAT_D16_UNORM = 124,
+ VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
+ VK_FORMAT_D32_SFLOAT = 126,
+ VK_FORMAT_S8_UINT = 127,
+ VK_FORMAT_D16_UNORM_S8_UINT = 128,
+ VK_FORMAT_D24_UNORM_S8_UINT = 129,
+ VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
+ VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
+ VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
+ VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
+ VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
+ VK_FORMAT_BC2_UNORM_BLOCK = 135,
+ VK_FORMAT_BC2_SRGB_BLOCK = 136,
+ VK_FORMAT_BC3_UNORM_BLOCK = 137,
+ VK_FORMAT_BC3_SRGB_BLOCK = 138,
+ VK_FORMAT_BC4_UNORM_BLOCK = 139,
+ VK_FORMAT_BC4_SNORM_BLOCK = 140,
+ VK_FORMAT_BC5_UNORM_BLOCK = 141,
+ VK_FORMAT_BC5_SNORM_BLOCK = 142,
+ VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
+ VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
+ VK_FORMAT_BC7_UNORM_BLOCK = 145,
+ VK_FORMAT_BC7_SRGB_BLOCK = 146,
+ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
+ VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
+ VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
+ VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
+ VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
+ VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
+ VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
+ VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
+ VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
+ VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
+ VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
+ VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
+ VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
+ VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
+ VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
+ VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
+ VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
+ VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
+ VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
+ VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
+ VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
+ VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
+ VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
+ VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
+ VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
+ VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
+ VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
+ VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
+ VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
+ VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
+ VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
+ VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
+ VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
+ VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
+ VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
+ VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
+ VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
+ VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
+ VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
+ VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
+ VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
+ VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
+ VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,
+ VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033
+} VkFormat;
+typedef enum VkFormatFeatureFlagBits {
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 1,
+ VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 2,
+ VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 4,
+ VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 8,
+ VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 16,
+ VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 32,
+ VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 64,
+ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 128,
+ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 256,
+ VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 512,
+ VK_FORMAT_FEATURE_BLIT_SRC_BIT = 1024,
+ VK_FORMAT_FEATURE_BLIT_DST_BIT = 2048,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 4096,
+ VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 16384,
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 32768,
+ VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 131072,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 262144,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 524288,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1048576,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 2097152,
+ VK_FORMAT_FEATURE_DISJOINT_BIT = 4194304,
+ VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 8388608
+} VkFormatFeatureFlagBits;
+typedef enum VkFrontFace {
+ VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
+ VK_FRONT_FACE_CLOCKWISE = 1
+} VkFrontFace;
+typedef enum VkImageAspectFlagBits {
+ VK_IMAGE_ASPECT_COLOR_BIT = 1,
+ VK_IMAGE_ASPECT_DEPTH_BIT = 2,
+ VK_IMAGE_ASPECT_STENCIL_BIT = 4,
+ VK_IMAGE_ASPECT_METADATA_BIT = 8,
+ VK_IMAGE_ASPECT_PLANE_0_BIT = 16,
+ VK_IMAGE_ASPECT_PLANE_1_BIT = 32,
+ VK_IMAGE_ASPECT_PLANE_2_BIT = 64
+} VkImageAspectFlagBits;
+typedef enum VkImageCreateFlagBits {
+ VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 1,
+ VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 2,
+ VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 4,
+ VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 8,
+ VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 16,
+ VK_IMAGE_CREATE_ALIAS_BIT = 1024,
+ VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 64,
+ VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 32,
+ VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 128,
+ VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 256,
+ VK_IMAGE_CREATE_PROTECTED_BIT = 2048,
+ VK_IMAGE_CREATE_DISJOINT_BIT = 512
+} VkImageCreateFlagBits;
+typedef enum VkImageLayout {
+ VK_IMAGE_LAYOUT_UNDEFINED = 0,
+ VK_IMAGE_LAYOUT_GENERAL = 1,
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
+ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
+ VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
+ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
+ VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
+ VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
+ VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
+ VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002
+} VkImageLayout;
+typedef enum VkImageTiling {
+ VK_IMAGE_TILING_OPTIMAL = 0,
+ VK_IMAGE_TILING_LINEAR = 1
+} VkImageTiling;
+typedef enum VkImageType {
+ VK_IMAGE_TYPE_1D = 0,
+ VK_IMAGE_TYPE_2D = 1,
+ VK_IMAGE_TYPE_3D = 2
+} VkImageType;
+typedef enum VkImageUsageFlagBits {
+ VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 1,
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT = 2,
+ VK_IMAGE_USAGE_SAMPLED_BIT = 4,
+ VK_IMAGE_USAGE_STORAGE_BIT = 8,
+ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 16,
+ VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 32,
+ VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 64,
+ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 128
+} VkImageUsageFlagBits;
+
+typedef enum VkImageViewType {
+ VK_IMAGE_VIEW_TYPE_1D = 0,
+ VK_IMAGE_VIEW_TYPE_2D = 1,
+ VK_IMAGE_VIEW_TYPE_3D = 2,
+ VK_IMAGE_VIEW_TYPE_CUBE = 3,
+ VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
+ VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
+ VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6
+} VkImageViewType;
+typedef enum VkSharingMode {
+ VK_SHARING_MODE_EXCLUSIVE = 0,
+ VK_SHARING_MODE_CONCURRENT = 1
+} VkSharingMode;
+typedef enum VkIndexType {
+ VK_INDEX_TYPE_UINT16 = 0,
+ VK_INDEX_TYPE_UINT32 = 1
+} VkIndexType;
+typedef enum VkLogicOp {
+ VK_LOGIC_OP_CLEAR = 0,
+ VK_LOGIC_OP_AND = 1,
+ VK_LOGIC_OP_AND_REVERSE = 2,
+ VK_LOGIC_OP_COPY = 3,
+ VK_LOGIC_OP_AND_INVERTED = 4,
+ VK_LOGIC_OP_NO_OP = 5,
+ VK_LOGIC_OP_XOR = 6,
+ VK_LOGIC_OP_OR = 7,
+ VK_LOGIC_OP_NOR = 8,
+ VK_LOGIC_OP_EQUIVALENT = 9,
+ VK_LOGIC_OP_INVERT = 10,
+ VK_LOGIC_OP_OR_REVERSE = 11,
+ VK_LOGIC_OP_COPY_INVERTED = 12,
+ VK_LOGIC_OP_OR_INVERTED = 13,
+ VK_LOGIC_OP_NAND = 14,
+ VK_LOGIC_OP_SET = 15
+} VkLogicOp;
+typedef enum VkMemoryHeapFlagBits {
+ VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 1,
+ VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 2
+} VkMemoryHeapFlagBits;
+typedef enum VkAccessFlagBits {
+ VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 1,
+ VK_ACCESS_INDEX_READ_BIT = 2,
+ VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 4,
+ VK_ACCESS_UNIFORM_READ_BIT = 8,
+ VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 16,
+ VK_ACCESS_SHADER_READ_BIT = 32,
+ VK_ACCESS_SHADER_WRITE_BIT = 64,
+ VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 128,
+ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 256,
+ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 512,
+ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1024,
+ VK_ACCESS_TRANSFER_READ_BIT = 2048,
+ VK_ACCESS_TRANSFER_WRITE_BIT = 4096,
+ VK_ACCESS_HOST_READ_BIT = 8192,
+ VK_ACCESS_HOST_WRITE_BIT = 16384,
+ VK_ACCESS_MEMORY_READ_BIT = 32768,
+ VK_ACCESS_MEMORY_WRITE_BIT = 65536
+} VkAccessFlagBits;
+typedef enum VkMemoryPropertyFlagBits {
+ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 1,
+ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 2,
+ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 4,
+ VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 8,
+ VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 16,
+ VK_MEMORY_PROPERTY_PROTECTED_BIT = 32
+} VkMemoryPropertyFlagBits;
+typedef enum VkPhysicalDeviceType {
+ VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
+ VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
+ VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
+ VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
+ VK_PHYSICAL_DEVICE_TYPE_CPU = 4
+} VkPhysicalDeviceType;
+typedef enum VkPipelineBindPoint {
+ VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
+ VK_PIPELINE_BIND_POINT_COMPUTE = 1
+} VkPipelineBindPoint;
+typedef enum VkPipelineCreateFlagBits {
+ VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 1,
+ VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 2,
+ VK_PIPELINE_CREATE_DERIVATIVE_BIT = 4,
+ VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 8,
+ VK_PIPELINE_CREATE_DISPATCH_BASE = 16
+} VkPipelineCreateFlagBits;
+typedef enum VkPrimitiveTopology {
+ VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
+ VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
+ VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
+ VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
+ VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
+ VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10
+} VkPrimitiveTopology;
+typedef enum VkQueryControlFlagBits {
+ VK_QUERY_CONTROL_PRECISE_BIT = 1
+} VkQueryControlFlagBits;
+typedef enum VkQueryPipelineStatisticFlagBits {
+ VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 1,
+ VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 2,
+ VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 4,
+ VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 8,
+ VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 16,
+ VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 32,
+ VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 64,
+ VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 128,
+ VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 256,
+ VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 512,
+ VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 1024
+} VkQueryPipelineStatisticFlagBits;
+typedef enum VkQueryResultFlagBits {
+ VK_QUERY_RESULT_64_BIT = 1,
+ VK_QUERY_RESULT_WAIT_BIT = 2,
+ VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 4,
+ VK_QUERY_RESULT_PARTIAL_BIT = 8
+} VkQueryResultFlagBits;
+typedef enum VkQueryType {
+ VK_QUERY_TYPE_OCCLUSION = 0,
+ VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
+ VK_QUERY_TYPE_TIMESTAMP = 2
+} VkQueryType;
+typedef enum VkQueueFlagBits {
+ VK_QUEUE_GRAPHICS_BIT = 1,
+ VK_QUEUE_COMPUTE_BIT = 2,
+ VK_QUEUE_TRANSFER_BIT = 4,
+ VK_QUEUE_SPARSE_BINDING_BIT = 8,
+ VK_QUEUE_PROTECTED_BIT = 16
+} VkQueueFlagBits;
+typedef enum VkSubpassContents {
+ VK_SUBPASS_CONTENTS_INLINE = 0,
+ VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1
+} VkSubpassContents;
+typedef enum VkResult {
+ VK_SUCCESS = 0,
+ VK_NOT_READY = 1,
+ VK_TIMEOUT = 2,
+ VK_EVENT_SET = 3,
+ VK_EVENT_RESET = 4,
+ VK_INCOMPLETE = 5,
+ VK_ERROR_OUT_OF_HOST_MEMORY = -1,
+ VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
+ VK_ERROR_INITIALIZATION_FAILED = -3,
+ VK_ERROR_DEVICE_LOST = -4,
+ VK_ERROR_MEMORY_MAP_FAILED = -5,
+ VK_ERROR_LAYER_NOT_PRESENT = -6,
+ VK_ERROR_EXTENSION_NOT_PRESENT = -7,
+ VK_ERROR_FEATURE_NOT_PRESENT = -8,
+ VK_ERROR_INCOMPATIBLE_DRIVER = -9,
+ VK_ERROR_TOO_MANY_OBJECTS = -10,
+ VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
+ VK_ERROR_FRAGMENTED_POOL = -12,
+ VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003,
+ VK_ERROR_SURFACE_LOST_KHR = -1000000000,
+ VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
+ VK_SUBOPTIMAL_KHR = 1000001003,
+ VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
+ VK_ERROR_VALIDATION_FAILED_EXT = -1000011001
+} VkResult;
+typedef enum VkShaderStageFlagBits {
+ VK_SHADER_STAGE_VERTEX_BIT = 1,
+ VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 2,
+ VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 4,
+ VK_SHADER_STAGE_GEOMETRY_BIT = 8,
+ VK_SHADER_STAGE_FRAGMENT_BIT = 16,
+ VK_SHADER_STAGE_COMPUTE_BIT = 32,
+ VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
+ VK_SHADER_STAGE_ALL = 0x7FFFFFFF
+} VkShaderStageFlagBits;
+typedef enum VkSparseMemoryBindFlagBits {
+ VK_SPARSE_MEMORY_BIND_METADATA_BIT = 1
+} VkSparseMemoryBindFlagBits;
+typedef enum VkStencilFaceFlagBits {
+ VK_STENCIL_FACE_FRONT_BIT = 1,
+ VK_STENCIL_FACE_BACK_BIT = 2,
+ VK_STENCIL_FRONT_AND_BACK = 0x00000003
+} VkStencilFaceFlagBits;
+typedef enum VkStencilOp {
+ VK_STENCIL_OP_KEEP = 0,
+ VK_STENCIL_OP_ZERO = 1,
+ VK_STENCIL_OP_REPLACE = 2,
+ VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
+ VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
+ VK_STENCIL_OP_INVERT = 5,
+ VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
+ VK_STENCIL_OP_DECREMENT_AND_WRAP = 7
+} VkStencilOp;
+typedef enum VkStructureType {
+ VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
+ VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
+ VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
+ VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
+ VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
+ VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
+ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
+ VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
+ VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
+ VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
+ VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
+ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
+ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
+ VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
+ VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
+ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
+ VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
+ VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
+ VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
+ VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
+ VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
+ VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
+ VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
+ VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
+ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
+ VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
+ VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
+ VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
+ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
+ VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
+ VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
+ VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
+ VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
+ VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
+ VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
+ VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
+ VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
+ VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
+ VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
+ VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
+ VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
+ VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
+ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
+ VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
+ VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
+ VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
+ VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
+ VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
+ VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
+ VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
+ VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
+ VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
+ VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
+ VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
+ VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,
+ VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
+ VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
+ VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
+ VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
+ VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
+ VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
+} VkStructureType;
+typedef enum VkSystemAllocationScope {
+ VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
+ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
+ VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
+ VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
+ VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4
+} VkSystemAllocationScope;
+typedef enum VkInternalAllocationType {
+ VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0
+} VkInternalAllocationType;
+typedef enum VkSamplerAddressMode {
+ VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
+ VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
+ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
+ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3
+} VkSamplerAddressMode;
+typedef enum VkFilter {
+ VK_FILTER_NEAREST = 0,
+ VK_FILTER_LINEAR = 1
+} VkFilter;
+typedef enum VkSamplerMipmapMode {
+ VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
+ VK_SAMPLER_MIPMAP_MODE_LINEAR = 1
+} VkSamplerMipmapMode;
+typedef enum VkVertexInputRate {
+ VK_VERTEX_INPUT_RATE_VERTEX = 0,
+ VK_VERTEX_INPUT_RATE_INSTANCE = 1
+} VkVertexInputRate;
+typedef enum VkPipelineStageFlagBits {
+ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 1,
+ VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 2,
+ VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 4,
+ VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 8,
+ VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 16,
+ VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 32,
+ VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 64,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 128,
+ VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 256,
+ VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 512,
+ VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 1024,
+ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 2048,
+ VK_PIPELINE_STAGE_TRANSFER_BIT = 4096,
+ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 8192,
+ VK_PIPELINE_STAGE_HOST_BIT = 16384,
+ VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 32768,
+ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 65536
+} VkPipelineStageFlagBits;
+typedef enum VkSparseImageFormatFlagBits {
+ VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 1,
+ VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 2,
+ VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 4
+} VkSparseImageFormatFlagBits;
+typedef enum VkSampleCountFlagBits {
+ VK_SAMPLE_COUNT_1_BIT = 1,
+ VK_SAMPLE_COUNT_2_BIT = 2,
+ VK_SAMPLE_COUNT_4_BIT = 4,
+ VK_SAMPLE_COUNT_8_BIT = 8,
+ VK_SAMPLE_COUNT_16_BIT = 16,
+ VK_SAMPLE_COUNT_32_BIT = 32,
+ VK_SAMPLE_COUNT_64_BIT = 64
+} VkSampleCountFlagBits;
+typedef enum VkAttachmentDescriptionFlagBits {
+ VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 1
+} VkAttachmentDescriptionFlagBits;
+typedef enum VkDescriptorPoolCreateFlagBits {
+ VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 1
+} VkDescriptorPoolCreateFlagBits;
+typedef enum VkDependencyFlagBits {
+ VK_DEPENDENCY_BY_REGION_BIT = 1,
+ VK_DEPENDENCY_DEVICE_GROUP_BIT = 4,
+ VK_DEPENDENCY_VIEW_LOCAL_BIT = 2
+} VkDependencyFlagBits;
+typedef enum VkObjectType {
+ VK_OBJECT_TYPE_UNKNOWN = 0,
+ VK_OBJECT_TYPE_INSTANCE = 1,
+ VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
+ VK_OBJECT_TYPE_DEVICE = 3,
+ VK_OBJECT_TYPE_QUEUE = 4,
+ VK_OBJECT_TYPE_SEMAPHORE = 5,
+ VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
+ VK_OBJECT_TYPE_FENCE = 7,
+ VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
+ VK_OBJECT_TYPE_BUFFER = 9,
+ VK_OBJECT_TYPE_IMAGE = 10,
+ VK_OBJECT_TYPE_EVENT = 11,
+ VK_OBJECT_TYPE_QUERY_POOL = 12,
+ VK_OBJECT_TYPE_BUFFER_VIEW = 13,
+ VK_OBJECT_TYPE_IMAGE_VIEW = 14,
+ VK_OBJECT_TYPE_SHADER_MODULE = 15,
+ VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
+ VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
+ VK_OBJECT_TYPE_RENDER_PASS = 18,
+ VK_OBJECT_TYPE_PIPELINE = 19,
+ VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
+ VK_OBJECT_TYPE_SAMPLER = 21,
+ VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
+ VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
+ VK_OBJECT_TYPE_FRAMEBUFFER = 24,
+ VK_OBJECT_TYPE_COMMAND_POOL = 25,
+ VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,
+ VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,
+ VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
+ VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
+ VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000
+} VkObjectType;
+typedef enum VkDescriptorUpdateTemplateType {
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0
+} VkDescriptorUpdateTemplateType;
+
+typedef enum VkPointClippingBehavior {
+ VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
+ VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1
+} VkPointClippingBehavior;
+typedef enum VkColorSpaceKHR {
+ VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
+ VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
+} VkColorSpaceKHR;
+typedef enum VkCompositeAlphaFlagBitsKHR {
+ VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1,
+ VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 2,
+ VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 4,
+ VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 8
+} VkCompositeAlphaFlagBitsKHR;
+typedef enum VkPresentModeKHR {
+ VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
+ VK_PRESENT_MODE_MAILBOX_KHR = 1,
+ VK_PRESENT_MODE_FIFO_KHR = 2,
+ VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3
+} VkPresentModeKHR;
+typedef enum VkSurfaceTransformFlagBitsKHR {
+ VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1,
+ VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 2,
+ VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 4,
+ VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 8,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 16,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 32,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 64,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 128,
+ VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 256
+} VkSurfaceTransformFlagBitsKHR;
+typedef enum VkDebugReportFlagBitsEXT {
+ VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 1,
+ VK_DEBUG_REPORT_WARNING_BIT_EXT = 2,
+ VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 4,
+ VK_DEBUG_REPORT_ERROR_BIT_EXT = 8,
+ VK_DEBUG_REPORT_DEBUG_BIT_EXT = 16
+} VkDebugReportFlagBitsEXT;
+typedef enum VkDebugReportObjectTypeEXT {
+ VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
+ VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
+ VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
+ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
+ VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
+ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
+ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
+ VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
+ VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
+ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
+ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
+ VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
+ VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
+ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
+ VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
+ VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
+ VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33,
+ VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000
+} VkDebugReportObjectTypeEXT;
+typedef enum VkExternalMemoryHandleTypeFlagBits {
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 8,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 16,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 32,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 64
+} VkExternalMemoryHandleTypeFlagBits;
+typedef enum VkExternalMemoryFeatureFlagBits {
+ VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 1,
+ VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 2,
+ VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 4
+} VkExternalMemoryFeatureFlagBits;
+typedef enum VkExternalSemaphoreHandleTypeFlagBits {
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 8,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 16
+} VkExternalSemaphoreHandleTypeFlagBits;
+typedef enum VkExternalSemaphoreFeatureFlagBits {
+ VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 1,
+ VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 2
+} VkExternalSemaphoreFeatureFlagBits;
+typedef enum VkSemaphoreImportFlagBits {
+ VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 1
+} VkSemaphoreImportFlagBits;
+typedef enum VkExternalFenceHandleTypeFlagBits {
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 8
+} VkExternalFenceHandleTypeFlagBits;
+typedef enum VkExternalFenceFeatureFlagBits {
+ VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 1,
+ VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 2
+} VkExternalFenceFeatureFlagBits;
+typedef enum VkFenceImportFlagBits {
+ VK_FENCE_IMPORT_TEMPORARY_BIT = 1
+} VkFenceImportFlagBits;
+typedef enum VkPeerMemoryFeatureFlagBits {
+ VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 1,
+ VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 2,
+ VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 4,
+ VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 8
+} VkPeerMemoryFeatureFlagBits;
+typedef enum VkMemoryAllocateFlagBits {
+ VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 1
+} VkMemoryAllocateFlagBits;
+typedef enum VkDeviceGroupPresentModeFlagBitsKHR {
+ VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1,
+ VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 2,
+ VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 4,
+ VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 8
+} VkDeviceGroupPresentModeFlagBitsKHR;
+typedef enum VkSwapchainCreateFlagBitsKHR {
+ VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1,
+ VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 2
+} VkSwapchainCreateFlagBitsKHR;
+typedef enum VkSubgroupFeatureFlagBits {
+ VK_SUBGROUP_FEATURE_BASIC_BIT = 1,
+ VK_SUBGROUP_FEATURE_VOTE_BIT = 2,
+ VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 4,
+ VK_SUBGROUP_FEATURE_BALLOT_BIT = 8,
+ VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 16,
+ VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 32,
+ VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 64,
+ VK_SUBGROUP_FEATURE_QUAD_BIT = 128
+} VkSubgroupFeatureFlagBits;
+typedef enum VkTessellationDomainOrigin {
+ VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
+ VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1
+} VkTessellationDomainOrigin;
+typedef enum VkSamplerYcbcrModelConversion {
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4
+} VkSamplerYcbcrModelConversion;
+typedef enum VkSamplerYcbcrRange {
+ VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
+ VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1
+} VkSamplerYcbcrRange;
+typedef enum VkChromaLocation {
+ VK_CHROMA_LOCATION_COSITED_EVEN = 0,
+ VK_CHROMA_LOCATION_MIDPOINT = 1
+} VkChromaLocation;
+typedef enum VkVendorId {
+ VK_VENDOR_ID_VIV = 0x10001,
+ VK_VENDOR_ID_VSI = 0x10002,
+ VK_VENDOR_ID_KAZAN = 0x10003
+} VkVendorId;
+typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
+ void* pUserData,
+ size_t size,
+ VkInternalAllocationType allocationType,
+ VkSystemAllocationScope allocationScope);
+typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
+ void* pUserData,
+ size_t size,
+ VkInternalAllocationType allocationType,
+ VkSystemAllocationScope allocationScope);
+typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
+ void* pUserData,
+ void* pOriginal,
+ size_t size,
+ size_t alignment,
+ VkSystemAllocationScope allocationScope);
+typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
+ void* pUserData,
+ size_t size,
+ size_t alignment,
+ VkSystemAllocationScope allocationScope);
+typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
+ void* pUserData,
+ void* pMemory);
+typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);
+typedef struct VkBaseOutStructure {
+ VkStructureType sType;
+ struct VkBaseOutStructure * pNext;
+} VkBaseOutStructure;
+typedef struct VkBaseInStructure {
+ VkStructureType sType;
+ const struct VkBaseInStructure * pNext;
+} VkBaseInStructure;
+typedef struct VkOffset2D {
+ int32_t x;
+ int32_t y;
+} VkOffset2D;
+typedef struct VkOffset3D {
+ int32_t x;
+ int32_t y;
+ int32_t z;
+} VkOffset3D;
+typedef struct VkExtent2D {
+ uint32_t width;
+ uint32_t height;
+} VkExtent2D;
+typedef struct VkExtent3D {
+ uint32_t width;
+ uint32_t height;
+ uint32_t depth;
+} VkExtent3D;
+typedef struct VkViewport {
+ float x;
+ float y;
+ float width;
+ float height;
+ float minDepth;
+ float maxDepth;
+} VkViewport;
+typedef struct VkRect2D {
+ VkOffset2D offset;
+ VkExtent2D extent;
+} VkRect2D;
+typedef struct VkClearRect {
+ VkRect2D rect;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkClearRect;
+typedef struct VkComponentMapping {
+ VkComponentSwizzle r;
+ VkComponentSwizzle g;
+ VkComponentSwizzle b;
+ VkComponentSwizzle a;
+} VkComponentMapping;
+typedef struct VkExtensionProperties {
+ char extensionName [ VK_MAX_EXTENSION_NAME_SIZE ];
+ uint32_t specVersion;
+} VkExtensionProperties;
+typedef struct VkLayerProperties {
+ char layerName [ VK_MAX_EXTENSION_NAME_SIZE ];
+ uint32_t specVersion;
+ uint32_t implementationVersion;
+ char description [ VK_MAX_DESCRIPTION_SIZE ];
+} VkLayerProperties;
+typedef struct VkApplicationInfo {
+ VkStructureType sType;
+ const void * pNext;
+ const char * pApplicationName;
+ uint32_t applicationVersion;
+ const char * pEngineName;
+ uint32_t engineVersion;
+ uint32_t apiVersion;
+} VkApplicationInfo;
+typedef struct VkAllocationCallbacks {
+ void * pUserData;
+ PFN_vkAllocationFunction pfnAllocation;
+ PFN_vkReallocationFunction pfnReallocation;
+ PFN_vkFreeFunction pfnFree;
+ PFN_vkInternalAllocationNotification pfnInternalAllocation;
+ PFN_vkInternalFreeNotification pfnInternalFree;
+} VkAllocationCallbacks;
+typedef struct VkDescriptorImageInfo {
+ VkSampler sampler;
+ VkImageView imageView;
+ VkImageLayout imageLayout;
+} VkDescriptorImageInfo;
+typedef struct VkCopyDescriptorSet {
+ VkStructureType sType;
+ const void * pNext;
+ VkDescriptorSet srcSet;
+ uint32_t srcBinding;
+ uint32_t srcArrayElement;
+ VkDescriptorSet dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+} VkCopyDescriptorSet;
+typedef struct VkDescriptorPoolSize {
+ VkDescriptorType type;
+ uint32_t descriptorCount;
+} VkDescriptorPoolSize;
+typedef struct VkDescriptorSetAllocateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDescriptorPool descriptorPool;
+ uint32_t descriptorSetCount;
+ const VkDescriptorSetLayout * pSetLayouts;
+} VkDescriptorSetAllocateInfo;
+typedef struct VkSpecializationMapEntry {
+ uint32_t constantID;
+ uint32_t offset;
+ size_t size;
+} VkSpecializationMapEntry;
+typedef struct VkSpecializationInfo {
+ uint32_t mapEntryCount;
+ const VkSpecializationMapEntry * pMapEntries;
+ size_t dataSize;
+ const void * pData;
+} VkSpecializationInfo;
+typedef struct VkVertexInputBindingDescription {
+ uint32_t binding;
+ uint32_t stride;
+ VkVertexInputRate inputRate;
+} VkVertexInputBindingDescription;
+typedef struct VkVertexInputAttributeDescription {
+ uint32_t location;
+ uint32_t binding;
+ VkFormat format;
+ uint32_t offset;
+} VkVertexInputAttributeDescription;
+typedef struct VkStencilOpState {
+ VkStencilOp failOp;
+ VkStencilOp passOp;
+ VkStencilOp depthFailOp;
+ VkCompareOp compareOp;
+ uint32_t compareMask;
+ uint32_t writeMask;
+ uint32_t reference;
+} VkStencilOpState;
+typedef struct VkCommandBufferAllocateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkCommandPool commandPool;
+ VkCommandBufferLevel level;
+ uint32_t commandBufferCount;
+} VkCommandBufferAllocateInfo;
+typedef union VkClearColorValue {
+ float float32 [4];
+ int32_t int32 [4];
+ uint32_t uint32 [4];
+} VkClearColorValue;
+typedef struct VkClearDepthStencilValue {
+ float depth;
+ uint32_t stencil;
+} VkClearDepthStencilValue;
+typedef union VkClearValue {
+ VkClearColorValue color;
+ VkClearDepthStencilValue depthStencil;
+} VkClearValue;
+typedef struct VkAttachmentReference {
+ uint32_t attachment;
+ VkImageLayout layout;
+} VkAttachmentReference;
+typedef struct VkDrawIndirectCommand {
+ uint32_t vertexCount;
+ uint32_t instanceCount;
+ uint32_t firstVertex;
+ uint32_t firstInstance;
+} VkDrawIndirectCommand;
+typedef struct VkDrawIndexedIndirectCommand {
+ uint32_t indexCount;
+ uint32_t instanceCount;
+ uint32_t firstIndex;
+ int32_t vertexOffset;
+ uint32_t firstInstance;
+} VkDrawIndexedIndirectCommand;
+typedef struct VkDispatchIndirectCommand {
+ uint32_t x;
+ uint32_t y;
+ uint32_t z;
+} VkDispatchIndirectCommand;
+typedef struct VkSurfaceFormatKHR {
+ VkFormat format;
+ VkColorSpaceKHR colorSpace;
+} VkSurfaceFormatKHR;
+typedef struct VkPresentInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t waitSemaphoreCount;
+ const VkSemaphore * pWaitSemaphores;
+ uint32_t swapchainCount;
+ const VkSwapchainKHR * pSwapchains;
+ const uint32_t * pImageIndices;
+ VkResult * pResults;
+} VkPresentInfoKHR;
+typedef struct VkPhysicalDeviceExternalImageFormatInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalImageFormatInfo;
+typedef struct VkPhysicalDeviceExternalSemaphoreInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalSemaphoreHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalSemaphoreInfo;
+typedef struct VkPhysicalDeviceExternalFenceInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalFenceHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalFenceInfo;
+typedef struct VkPhysicalDeviceMultiviewProperties {
+ VkStructureType sType;
+ void * pNext;
+ uint32_t maxMultiviewViewCount;
+ uint32_t maxMultiviewInstanceIndex;
+} VkPhysicalDeviceMultiviewProperties;
+typedef struct VkRenderPassMultiviewCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t subpassCount;
+ const uint32_t * pViewMasks;
+ uint32_t dependencyCount;
+ const int32_t * pViewOffsets;
+ uint32_t correlationMaskCount;
+ const uint32_t * pCorrelationMasks;
+} VkRenderPassMultiviewCreateInfo;
+typedef struct VkBindBufferMemoryDeviceGroupInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t deviceIndexCount;
+ const uint32_t * pDeviceIndices;
+} VkBindBufferMemoryDeviceGroupInfo;
+typedef struct VkBindImageMemoryDeviceGroupInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t deviceIndexCount;
+ const uint32_t * pDeviceIndices;
+ uint32_t splitInstanceBindRegionCount;
+ const VkRect2D * pSplitInstanceBindRegions;
+} VkBindImageMemoryDeviceGroupInfo;
+typedef struct VkDeviceGroupRenderPassBeginInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t deviceMask;
+ uint32_t deviceRenderAreaCount;
+ const VkRect2D * pDeviceRenderAreas;
+} VkDeviceGroupRenderPassBeginInfo;
+typedef struct VkDeviceGroupCommandBufferBeginInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t deviceMask;
+} VkDeviceGroupCommandBufferBeginInfo;
+typedef struct VkDeviceGroupSubmitInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t waitSemaphoreCount;
+ const uint32_t * pWaitSemaphoreDeviceIndices;
+ uint32_t commandBufferCount;
+ const uint32_t * pCommandBufferDeviceMasks;
+ uint32_t signalSemaphoreCount;
+ const uint32_t * pSignalSemaphoreDeviceIndices;
+} VkDeviceGroupSubmitInfo;
+typedef struct VkDeviceGroupBindSparseInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t resourceDeviceIndex;
+ uint32_t memoryDeviceIndex;
+} VkDeviceGroupBindSparseInfo;
+typedef struct VkImageSwapchainCreateInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ VkSwapchainKHR swapchain;
+} VkImageSwapchainCreateInfoKHR;
+typedef struct VkBindImageMemorySwapchainInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ VkSwapchainKHR swapchain;
+ uint32_t imageIndex;
+} VkBindImageMemorySwapchainInfoKHR;
+typedef struct VkAcquireNextImageInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ VkSwapchainKHR swapchain;
+ uint64_t timeout;
+ VkSemaphore semaphore;
+ VkFence fence;
+ uint32_t deviceMask;
+} VkAcquireNextImageInfoKHR;
+typedef struct VkDeviceGroupPresentInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t swapchainCount;
+ const uint32_t * pDeviceMasks;
+ VkDeviceGroupPresentModeFlagBitsKHR mode;
+} VkDeviceGroupPresentInfoKHR;
+typedef struct VkDeviceGroupDeviceCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t physicalDeviceCount;
+ const VkPhysicalDevice * pPhysicalDevices;
+} VkDeviceGroupDeviceCreateInfo;
+typedef struct VkDescriptorUpdateTemplateEntry {
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ VkDescriptorType descriptorType;
+ size_t offset;
+ size_t stride;
+} VkDescriptorUpdateTemplateEntry;
+typedef struct VkBufferMemoryRequirementsInfo2 {
+ VkStructureType sType;
+ const void * pNext;
+ VkBuffer buffer;
+} VkBufferMemoryRequirementsInfo2;
+typedef struct VkImageMemoryRequirementsInfo2 {
+ VkStructureType sType;
+ const void * pNext;
+ VkImage image;
+} VkImageMemoryRequirementsInfo2;
+typedef struct VkImageSparseMemoryRequirementsInfo2 {
+ VkStructureType sType;
+ const void * pNext;
+ VkImage image;
+} VkImageSparseMemoryRequirementsInfo2;
+typedef struct VkPhysicalDevicePointClippingProperties {
+ VkStructureType sType;
+ void * pNext;
+ VkPointClippingBehavior pointClippingBehavior;
+} VkPhysicalDevicePointClippingProperties;
+typedef struct VkMemoryDedicatedAllocateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImage image;
+ VkBuffer buffer;
+} VkMemoryDedicatedAllocateInfo;
+typedef struct VkPipelineTessellationDomainOriginStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkTessellationDomainOrigin domainOrigin;
+} VkPipelineTessellationDomainOriginStateCreateInfo;
+typedef struct VkSamplerYcbcrConversionInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkSamplerYcbcrConversion conversion;
+} VkSamplerYcbcrConversionInfo;
+typedef struct VkBindImagePlaneMemoryInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImageAspectFlagBits planeAspect;
+} VkBindImagePlaneMemoryInfo;
+typedef struct VkImagePlaneMemoryRequirementsInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImageAspectFlagBits planeAspect;
+} VkImagePlaneMemoryRequirementsInfo;
+typedef struct VkSamplerYcbcrConversionImageFormatProperties {
+ VkStructureType sType;
+ void * pNext;
+ uint32_t combinedImageSamplerDescriptorCount;
+} VkSamplerYcbcrConversionImageFormatProperties;
+typedef uint32_t VkSampleMask;
+typedef uint32_t VkBool32;
+typedef uint32_t VkFlags;
+typedef uint64_t VkDeviceSize;
+typedef VkFlags VkFramebufferCreateFlags;
+typedef VkFlags VkQueryPoolCreateFlags;
+typedef VkFlags VkRenderPassCreateFlags;
+typedef VkFlags VkSamplerCreateFlags;
+typedef VkFlags VkPipelineLayoutCreateFlags;
+typedef VkFlags VkPipelineCacheCreateFlags;
+typedef VkFlags VkPipelineDepthStencilStateCreateFlags;
+typedef VkFlags VkPipelineDynamicStateCreateFlags;
+typedef VkFlags VkPipelineColorBlendStateCreateFlags;
+typedef VkFlags VkPipelineMultisampleStateCreateFlags;
+typedef VkFlags VkPipelineRasterizationStateCreateFlags;
+typedef VkFlags VkPipelineViewportStateCreateFlags;
+typedef VkFlags VkPipelineTessellationStateCreateFlags;
+typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
+typedef VkFlags VkPipelineVertexInputStateCreateFlags;
+typedef VkFlags VkPipelineShaderStageCreateFlags;
+typedef VkFlags VkDescriptorSetLayoutCreateFlags;
+typedef VkFlags VkBufferViewCreateFlags;
+typedef VkFlags VkInstanceCreateFlags;
+typedef VkFlags VkDeviceCreateFlags;
+typedef VkFlags VkDeviceQueueCreateFlags;
+typedef VkFlags VkQueueFlags;
+typedef VkFlags VkMemoryPropertyFlags;
+typedef VkFlags VkMemoryHeapFlags;
+typedef VkFlags VkAccessFlags;
+typedef VkFlags VkBufferUsageFlags;
+typedef VkFlags VkBufferCreateFlags;
+typedef VkFlags VkShaderStageFlags;
+typedef VkFlags VkImageUsageFlags;
+typedef VkFlags VkImageCreateFlags;
+typedef VkFlags VkImageViewCreateFlags;
+typedef VkFlags VkPipelineCreateFlags;
+typedef VkFlags VkColorComponentFlags;
+typedef VkFlags VkFenceCreateFlags;
+typedef VkFlags VkSemaphoreCreateFlags;
+typedef VkFlags VkFormatFeatureFlags;
+typedef VkFlags VkQueryControlFlags;
+typedef VkFlags VkQueryResultFlags;
+typedef VkFlags VkShaderModuleCreateFlags;
+typedef VkFlags VkEventCreateFlags;
+typedef VkFlags VkCommandPoolCreateFlags;
+typedef VkFlags VkCommandPoolResetFlags;
+typedef VkFlags VkCommandBufferResetFlags;
+typedef VkFlags VkCommandBufferUsageFlags;
+typedef VkFlags VkQueryPipelineStatisticFlags;
+typedef VkFlags VkMemoryMapFlags;
+typedef VkFlags VkImageAspectFlags;
+typedef VkFlags VkSparseMemoryBindFlags;
+typedef VkFlags VkSparseImageFormatFlags;
+typedef VkFlags VkSubpassDescriptionFlags;
+typedef VkFlags VkPipelineStageFlags;
+typedef VkFlags VkSampleCountFlags;
+typedef VkFlags VkAttachmentDescriptionFlags;
+typedef VkFlags VkStencilFaceFlags;
+typedef VkFlags VkCullModeFlags;
+typedef VkFlags VkDescriptorPoolCreateFlags;
+typedef VkFlags VkDescriptorPoolResetFlags;
+typedef VkFlags VkDependencyFlags;
+typedef VkFlags VkSubgroupFeatureFlags;
+typedef VkFlags VkDescriptorUpdateTemplateCreateFlags;
+typedef VkFlags VkCompositeAlphaFlagsKHR;
+typedef VkFlags VkSurfaceTransformFlagsKHR;
+typedef VkFlags VkSwapchainCreateFlagsKHR;
+typedef VkFlags VkPeerMemoryFeatureFlags;
+typedef VkFlags VkMemoryAllocateFlags;
+typedef VkFlags VkDeviceGroupPresentModeFlagsKHR;
+typedef VkFlags VkDebugReportFlagsEXT;
+typedef VkFlags VkCommandPoolTrimFlags;
+typedef VkFlags VkExternalMemoryHandleTypeFlags;
+typedef VkFlags VkExternalMemoryFeatureFlags;
+typedef VkFlags VkExternalSemaphoreHandleTypeFlags;
+typedef VkFlags VkExternalSemaphoreFeatureFlags;
+typedef VkFlags VkSemaphoreImportFlags;
+typedef VkFlags VkExternalFenceHandleTypeFlags;
+typedef VkFlags VkExternalFenceFeatureFlags;
+typedef VkFlags VkFenceImportFlags;
+typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
+ VkDebugReportFlagsEXT flags,
+ VkDebugReportObjectTypeEXT objectType,
+ uint64_t object,
+ size_t location,
+ int32_t messageCode,
+ const char* pLayerPrefix,
+ const char* pMessage,
+ void* pUserData);
+typedef struct VkDeviceQueueCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueCount;
+ const float * pQueuePriorities;
+} VkDeviceQueueCreateInfo;
+typedef struct VkInstanceCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkInstanceCreateFlags flags;
+ const VkApplicationInfo * pApplicationInfo;
+ uint32_t enabledLayerCount;
+ const char * const* ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char * const* ppEnabledExtensionNames;
+} VkInstanceCreateInfo;
+typedef struct VkQueueFamilyProperties {
+ VkQueueFlags queueFlags;
+ uint32_t queueCount;
+ uint32_t timestampValidBits;
+ VkExtent3D minImageTransferGranularity;
+} VkQueueFamilyProperties;
+typedef struct VkMemoryAllocateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDeviceSize allocationSize;
+ uint32_t memoryTypeIndex;
+} VkMemoryAllocateInfo;
+typedef struct VkMemoryRequirements {
+ VkDeviceSize size;
+ VkDeviceSize alignment;
+ uint32_t memoryTypeBits;
+} VkMemoryRequirements;
+typedef struct VkSparseImageFormatProperties {
+ VkImageAspectFlags aspectMask;
+ VkExtent3D imageGranularity;
+ VkSparseImageFormatFlags flags;
+} VkSparseImageFormatProperties;
+typedef struct VkSparseImageMemoryRequirements {
+ VkSparseImageFormatProperties formatProperties;
+ uint32_t imageMipTailFirstLod;
+ VkDeviceSize imageMipTailSize;
+ VkDeviceSize imageMipTailOffset;
+ VkDeviceSize imageMipTailStride;
+} VkSparseImageMemoryRequirements;
+typedef struct VkMemoryType {
+ VkMemoryPropertyFlags propertyFlags;
+ uint32_t heapIndex;
+} VkMemoryType;
+typedef struct VkMemoryHeap {
+ VkDeviceSize size;
+ VkMemoryHeapFlags flags;
+} VkMemoryHeap;
+typedef struct VkMappedMemoryRange {
+ VkStructureType sType;
+ const void * pNext;
+ VkDeviceMemory memory;
+ VkDeviceSize offset;
+ VkDeviceSize size;
+} VkMappedMemoryRange;
+typedef struct VkFormatProperties {
+ VkFormatFeatureFlags linearTilingFeatures;
+ VkFormatFeatureFlags optimalTilingFeatures;
+ VkFormatFeatureFlags bufferFeatures;
+} VkFormatProperties;
+typedef struct VkImageFormatProperties {
+ VkExtent3D maxExtent;
+ uint32_t maxMipLevels;
+ uint32_t maxArrayLayers;
+ VkSampleCountFlags sampleCounts;
+ VkDeviceSize maxResourceSize;
+} VkImageFormatProperties;
+typedef struct VkDescriptorBufferInfo {
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkDeviceSize range;
+} VkDescriptorBufferInfo;
+typedef struct VkWriteDescriptorSet {
+ VkStructureType sType;
+ const void * pNext;
+ VkDescriptorSet dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ VkDescriptorType descriptorType;
+ const VkDescriptorImageInfo * pImageInfo;
+ const VkDescriptorBufferInfo * pBufferInfo;
+ const VkBufferView * pTexelBufferView;
+} VkWriteDescriptorSet;
+typedef struct VkBufferCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkBufferCreateFlags flags;
+ VkDeviceSize size;
+ VkBufferUsageFlags usage;
+ VkSharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t * pQueueFamilyIndices;
+} VkBufferCreateInfo;
+typedef struct VkBufferViewCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkBufferViewCreateFlags flags;
+ VkBuffer buffer;
+ VkFormat format;
+ VkDeviceSize offset;
+ VkDeviceSize range;
+} VkBufferViewCreateInfo;
+typedef struct VkImageSubresource {
+ VkImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t arrayLayer;
+} VkImageSubresource;
+typedef struct VkImageSubresourceLayers {
+ VkImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkImageSubresourceLayers;
+typedef struct VkImageSubresourceRange {
+ VkImageAspectFlags aspectMask;
+ uint32_t baseMipLevel;
+ uint32_t levelCount;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkImageSubresourceRange;
+typedef struct VkMemoryBarrier {
+ VkStructureType sType;
+ const void * pNext;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+} VkMemoryBarrier;
+typedef struct VkBufferMemoryBarrier {
+ VkStructureType sType;
+ const void * pNext;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ uint32_t srcQueueFamilyIndex;
+ uint32_t dstQueueFamilyIndex;
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkDeviceSize size;
+} VkBufferMemoryBarrier;
+typedef struct VkImageMemoryBarrier {
+ VkStructureType sType;
+ const void * pNext;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ VkImageLayout oldLayout;
+ VkImageLayout newLayout;
+ uint32_t srcQueueFamilyIndex;
+ uint32_t dstQueueFamilyIndex;
+ VkImage image;
+ VkImageSubresourceRange subresourceRange;
+} VkImageMemoryBarrier;
+typedef struct VkImageCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImageCreateFlags flags;
+ VkImageType imageType;
+ VkFormat format;
+ VkExtent3D extent;
+ uint32_t mipLevels;
+ uint32_t arrayLayers;
+ VkSampleCountFlagBits samples;
+ VkImageTiling tiling;
+ VkImageUsageFlags usage;
+ VkSharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t * pQueueFamilyIndices;
+ VkImageLayout initialLayout;
+} VkImageCreateInfo;
+typedef struct VkSubresourceLayout {
+ VkDeviceSize offset;
+ VkDeviceSize size;
+ VkDeviceSize rowPitch;
+ VkDeviceSize arrayPitch;
+ VkDeviceSize depthPitch;
+} VkSubresourceLayout;
+typedef struct VkImageViewCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImageViewCreateFlags flags;
+ VkImage image;
+ VkImageViewType viewType;
+ VkFormat format;
+ VkComponentMapping components;
+ VkImageSubresourceRange subresourceRange;
+} VkImageViewCreateInfo;
+typedef struct VkBufferCopy {
+ VkDeviceSize srcOffset;
+ VkDeviceSize dstOffset;
+ VkDeviceSize size;
+} VkBufferCopy;
+typedef struct VkSparseMemoryBind {
+ VkDeviceSize resourceOffset;
+ VkDeviceSize size;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+ VkSparseMemoryBindFlags flags;
+} VkSparseMemoryBind;
+typedef struct VkSparseImageMemoryBind {
+ VkImageSubresource subresource;
+ VkOffset3D offset;
+ VkExtent3D extent;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+ VkSparseMemoryBindFlags flags;
+} VkSparseImageMemoryBind;
+typedef struct VkSparseBufferMemoryBindInfo {
+ VkBuffer buffer;
+ uint32_t bindCount;
+ const VkSparseMemoryBind * pBinds;
+} VkSparseBufferMemoryBindInfo;
+typedef struct VkSparseImageOpaqueMemoryBindInfo {
+ VkImage image;
+ uint32_t bindCount;
+ const VkSparseMemoryBind * pBinds;
+} VkSparseImageOpaqueMemoryBindInfo;
+typedef struct VkSparseImageMemoryBindInfo {
+ VkImage image;
+ uint32_t bindCount;
+ const VkSparseImageMemoryBind * pBinds;
+} VkSparseImageMemoryBindInfo;
+typedef struct VkBindSparseInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t waitSemaphoreCount;
+ const VkSemaphore * pWaitSemaphores;
+ uint32_t bufferBindCount;
+ const VkSparseBufferMemoryBindInfo * pBufferBinds;
+ uint32_t imageOpaqueBindCount;
+ const VkSparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds;
+ uint32_t imageBindCount;
+ const VkSparseImageMemoryBindInfo * pImageBinds;
+ uint32_t signalSemaphoreCount;
+ const VkSemaphore * pSignalSemaphores;
+} VkBindSparseInfo;
+typedef struct VkImageCopy {
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffset;
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffset;
+ VkExtent3D extent;
+} VkImageCopy;
+typedef struct VkImageBlit {
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffsets [2];
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffsets [2];
+} VkImageBlit;
+typedef struct VkBufferImageCopy {
+ VkDeviceSize bufferOffset;
+ uint32_t bufferRowLength;
+ uint32_t bufferImageHeight;
+ VkImageSubresourceLayers imageSubresource;
+ VkOffset3D imageOffset;
+ VkExtent3D imageExtent;
+} VkBufferImageCopy;
+typedef struct VkImageResolve {
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffset;
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffset;
+ VkExtent3D extent;
+} VkImageResolve;
+typedef struct VkShaderModuleCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkShaderModuleCreateFlags flags;
+ size_t codeSize;
+ const uint32_t * pCode;
+} VkShaderModuleCreateInfo;
+typedef struct VkDescriptorSetLayoutBinding {
+ uint32_t binding;
+ VkDescriptorType descriptorType;
+ uint32_t descriptorCount;
+ VkShaderStageFlags stageFlags;
+ const VkSampler * pImmutableSamplers;
+} VkDescriptorSetLayoutBinding;
+typedef struct VkDescriptorSetLayoutCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDescriptorSetLayoutCreateFlags flags;
+ uint32_t bindingCount;
+ const VkDescriptorSetLayoutBinding * pBindings;
+} VkDescriptorSetLayoutCreateInfo;
+typedef struct VkDescriptorPoolCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDescriptorPoolCreateFlags flags;
+ uint32_t maxSets;
+ uint32_t poolSizeCount;
+ const VkDescriptorPoolSize * pPoolSizes;
+} VkDescriptorPoolCreateInfo;
+typedef struct VkPipelineShaderStageCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineShaderStageCreateFlags flags;
+ VkShaderStageFlagBits stage;
+ VkShaderModule module;
+ const char * pName;
+ const VkSpecializationInfo * pSpecializationInfo;
+} VkPipelineShaderStageCreateInfo;
+typedef struct VkComputePipelineCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineCreateFlags flags;
+ VkPipelineShaderStageCreateInfo stage;
+ VkPipelineLayout layout;
+ VkPipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkComputePipelineCreateInfo;
+typedef struct VkPipelineVertexInputStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineVertexInputStateCreateFlags flags;
+ uint32_t vertexBindingDescriptionCount;
+ const VkVertexInputBindingDescription * pVertexBindingDescriptions;
+ uint32_t vertexAttributeDescriptionCount;
+ const VkVertexInputAttributeDescription * pVertexAttributeDescriptions;
+} VkPipelineVertexInputStateCreateInfo;
+typedef struct VkPipelineInputAssemblyStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineInputAssemblyStateCreateFlags flags;
+ VkPrimitiveTopology topology;
+ VkBool32 primitiveRestartEnable;
+} VkPipelineInputAssemblyStateCreateInfo;
+typedef struct VkPipelineTessellationStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineTessellationStateCreateFlags flags;
+ uint32_t patchControlPoints;
+} VkPipelineTessellationStateCreateInfo;
+typedef struct VkPipelineViewportStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineViewportStateCreateFlags flags;
+ uint32_t viewportCount;
+ const VkViewport * pViewports;
+ uint32_t scissorCount;
+ const VkRect2D * pScissors;
+} VkPipelineViewportStateCreateInfo;
+typedef struct VkPipelineRasterizationStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineRasterizationStateCreateFlags flags;
+ VkBool32 depthClampEnable;
+ VkBool32 rasterizerDiscardEnable;
+ VkPolygonMode polygonMode;
+ VkCullModeFlags cullMode;
+ VkFrontFace frontFace;
+ VkBool32 depthBiasEnable;
+ float depthBiasConstantFactor;
+ float depthBiasClamp;
+ float depthBiasSlopeFactor;
+ float lineWidth;
+} VkPipelineRasterizationStateCreateInfo;
+typedef struct VkPipelineMultisampleStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineMultisampleStateCreateFlags flags;
+ VkSampleCountFlagBits rasterizationSamples;
+ VkBool32 sampleShadingEnable;
+ float minSampleShading;
+ const VkSampleMask * pSampleMask;
+ VkBool32 alphaToCoverageEnable;
+ VkBool32 alphaToOneEnable;
+} VkPipelineMultisampleStateCreateInfo;
+typedef struct VkPipelineColorBlendAttachmentState {
+ VkBool32 blendEnable;
+ VkBlendFactor srcColorBlendFactor;
+ VkBlendFactor dstColorBlendFactor;
+ VkBlendOp colorBlendOp;
+ VkBlendFactor srcAlphaBlendFactor;
+ VkBlendFactor dstAlphaBlendFactor;
+ VkBlendOp alphaBlendOp;
+ VkColorComponentFlags colorWriteMask;
+} VkPipelineColorBlendAttachmentState;
+typedef struct VkPipelineColorBlendStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineColorBlendStateCreateFlags flags;
+ VkBool32 logicOpEnable;
+ VkLogicOp logicOp;
+ uint32_t attachmentCount;
+ const VkPipelineColorBlendAttachmentState * pAttachments;
+ float blendConstants [4];
+} VkPipelineColorBlendStateCreateInfo;
+typedef struct VkPipelineDynamicStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineDynamicStateCreateFlags flags;
+ uint32_t dynamicStateCount;
+ const VkDynamicState * pDynamicStates;
+} VkPipelineDynamicStateCreateInfo;
+typedef struct VkPipelineDepthStencilStateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineDepthStencilStateCreateFlags flags;
+ VkBool32 depthTestEnable;
+ VkBool32 depthWriteEnable;
+ VkCompareOp depthCompareOp;
+ VkBool32 depthBoundsTestEnable;
+ VkBool32 stencilTestEnable;
+ VkStencilOpState front;
+ VkStencilOpState back;
+ float minDepthBounds;
+ float maxDepthBounds;
+} VkPipelineDepthStencilStateCreateInfo;
+typedef struct VkGraphicsPipelineCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineCreateFlags flags;
+ uint32_t stageCount;
+ const VkPipelineShaderStageCreateInfo * pStages;
+ const VkPipelineVertexInputStateCreateInfo * pVertexInputState;
+ const VkPipelineInputAssemblyStateCreateInfo * pInputAssemblyState;
+ const VkPipelineTessellationStateCreateInfo * pTessellationState;
+ const VkPipelineViewportStateCreateInfo * pViewportState;
+ const VkPipelineRasterizationStateCreateInfo * pRasterizationState;
+ const VkPipelineMultisampleStateCreateInfo * pMultisampleState;
+ const VkPipelineDepthStencilStateCreateInfo * pDepthStencilState;
+ const VkPipelineColorBlendStateCreateInfo * pColorBlendState;
+ const VkPipelineDynamicStateCreateInfo * pDynamicState;
+ VkPipelineLayout layout;
+ VkRenderPass renderPass;
+ uint32_t subpass;
+ VkPipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkGraphicsPipelineCreateInfo;
+typedef struct VkPipelineCacheCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineCacheCreateFlags flags;
+ size_t initialDataSize;
+ const void * pInitialData;
+} VkPipelineCacheCreateInfo;
+typedef struct VkPushConstantRange {
+ VkShaderStageFlags stageFlags;
+ uint32_t offset;
+ uint32_t size;
+} VkPushConstantRange;
+typedef struct VkPipelineLayoutCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkPipelineLayoutCreateFlags flags;
+ uint32_t setLayoutCount;
+ const VkDescriptorSetLayout * pSetLayouts;
+ uint32_t pushConstantRangeCount;
+ const VkPushConstantRange * pPushConstantRanges;
+} VkPipelineLayoutCreateInfo;
+typedef struct VkSamplerCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkSamplerCreateFlags flags;
+ VkFilter magFilter;
+ VkFilter minFilter;
+ VkSamplerMipmapMode mipmapMode;
+ VkSamplerAddressMode addressModeU;
+ VkSamplerAddressMode addressModeV;
+ VkSamplerAddressMode addressModeW;
+ float mipLodBias;
+ VkBool32 anisotropyEnable;
+ float maxAnisotropy;
+ VkBool32 compareEnable;
+ VkCompareOp compareOp;
+ float minLod;
+ float maxLod;
+ VkBorderColor borderColor;
+ VkBool32 unnormalizedCoordinates;
+} VkSamplerCreateInfo;
+typedef struct VkCommandPoolCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkCommandPoolCreateFlags flags;
+ uint32_t queueFamilyIndex;
+} VkCommandPoolCreateInfo;
+typedef struct VkCommandBufferInheritanceInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkRenderPass renderPass;
+ uint32_t subpass;
+ VkFramebuffer framebuffer;
+ VkBool32 occlusionQueryEnable;
+ VkQueryControlFlags queryFlags;
+ VkQueryPipelineStatisticFlags pipelineStatistics;
+} VkCommandBufferInheritanceInfo;
+typedef struct VkCommandBufferBeginInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkCommandBufferUsageFlags flags;
+ const VkCommandBufferInheritanceInfo * pInheritanceInfo;
+} VkCommandBufferBeginInfo;
+typedef struct VkRenderPassBeginInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkRenderPass renderPass;
+ VkFramebuffer framebuffer;
+ VkRect2D renderArea;
+ uint32_t clearValueCount;
+ const VkClearValue * pClearValues;
+} VkRenderPassBeginInfo;
+typedef struct VkClearAttachment {
+ VkImageAspectFlags aspectMask;
+ uint32_t colorAttachment;
+ VkClearValue clearValue;
+} VkClearAttachment;
+typedef struct VkAttachmentDescription {
+ VkAttachmentDescriptionFlags flags;
+ VkFormat format;
+ VkSampleCountFlagBits samples;
+ VkAttachmentLoadOp loadOp;
+ VkAttachmentStoreOp storeOp;
+ VkAttachmentLoadOp stencilLoadOp;
+ VkAttachmentStoreOp stencilStoreOp;
+ VkImageLayout initialLayout;
+ VkImageLayout finalLayout;
+} VkAttachmentDescription;
+typedef struct VkSubpassDescription {
+ VkSubpassDescriptionFlags flags;
+ VkPipelineBindPoint pipelineBindPoint;
+ uint32_t inputAttachmentCount;
+ const VkAttachmentReference * pInputAttachments;
+ uint32_t colorAttachmentCount;
+ const VkAttachmentReference * pColorAttachments;
+ const VkAttachmentReference * pResolveAttachments;
+ const VkAttachmentReference * pDepthStencilAttachment;
+ uint32_t preserveAttachmentCount;
+ const uint32_t * pPreserveAttachments;
+} VkSubpassDescription;
+typedef struct VkSubpassDependency {
+ uint32_t srcSubpass;
+ uint32_t dstSubpass;
+ VkPipelineStageFlags srcStageMask;
+ VkPipelineStageFlags dstStageMask;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ VkDependencyFlags dependencyFlags;
+} VkSubpassDependency;
+typedef struct VkRenderPassCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkRenderPassCreateFlags flags;
+ uint32_t attachmentCount;
+ const VkAttachmentDescription * pAttachments;
+ uint32_t subpassCount;
+ const VkSubpassDescription * pSubpasses;
+ uint32_t dependencyCount;
+ const VkSubpassDependency * pDependencies;
+} VkRenderPassCreateInfo;
+typedef struct VkEventCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkEventCreateFlags flags;
+} VkEventCreateInfo;
+typedef struct VkFenceCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkFenceCreateFlags flags;
+} VkFenceCreateInfo;
+typedef struct VkPhysicalDeviceFeatures {
+ VkBool32 robustBufferAccess;
+ VkBool32 fullDrawIndexUint32;
+ VkBool32 imageCubeArray;
+ VkBool32 independentBlend;
+ VkBool32 geometryShader;
+ VkBool32 tessellationShader;
+ VkBool32 sampleRateShading;
+ VkBool32 dualSrcBlend;
+ VkBool32 logicOp;
+ VkBool32 multiDrawIndirect;
+ VkBool32 drawIndirectFirstInstance;
+ VkBool32 depthClamp;
+ VkBool32 depthBiasClamp;
+ VkBool32 fillModeNonSolid;
+ VkBool32 depthBounds;
+ VkBool32 wideLines;
+ VkBool32 largePoints;
+ VkBool32 alphaToOne;
+ VkBool32 multiViewport;
+ VkBool32 samplerAnisotropy;
+ VkBool32 textureCompressionETC2;
+ VkBool32 textureCompressionASTC_LDR;
+ VkBool32 textureCompressionBC;
+ VkBool32 occlusionQueryPrecise;
+ VkBool32 pipelineStatisticsQuery;
+ VkBool32 vertexPipelineStoresAndAtomics;
+ VkBool32 fragmentStoresAndAtomics;
+ VkBool32 shaderTessellationAndGeometryPointSize;
+ VkBool32 shaderImageGatherExtended;
+ VkBool32 shaderStorageImageExtendedFormats;
+ VkBool32 shaderStorageImageMultisample;
+ VkBool32 shaderStorageImageReadWithoutFormat;
+ VkBool32 shaderStorageImageWriteWithoutFormat;
+ VkBool32 shaderUniformBufferArrayDynamicIndexing;
+ VkBool32 shaderSampledImageArrayDynamicIndexing;
+ VkBool32 shaderStorageBufferArrayDynamicIndexing;
+ VkBool32 shaderStorageImageArrayDynamicIndexing;
+ VkBool32 shaderClipDistance;
+ VkBool32 shaderCullDistance;
+ VkBool32 shaderFloat64;
+ VkBool32 shaderInt64;
+ VkBool32 shaderInt16;
+ VkBool32 shaderResourceResidency;
+ VkBool32 shaderResourceMinLod;
+ VkBool32 sparseBinding;
+ VkBool32 sparseResidencyBuffer;
+ VkBool32 sparseResidencyImage2D;
+ VkBool32 sparseResidencyImage3D;
+ VkBool32 sparseResidency2Samples;
+ VkBool32 sparseResidency4Samples;
+ VkBool32 sparseResidency8Samples;
+ VkBool32 sparseResidency16Samples;
+ VkBool32 sparseResidencyAliased;
+ VkBool32 variableMultisampleRate;
+ VkBool32 inheritedQueries;
+} VkPhysicalDeviceFeatures;
+typedef struct VkPhysicalDeviceSparseProperties {
+ VkBool32 residencyStandard2DBlockShape;
+ VkBool32 residencyStandard2DMultisampleBlockShape;
+ VkBool32 residencyStandard3DBlockShape;
+ VkBool32 residencyAlignedMipSize;
+ VkBool32 residencyNonResidentStrict;
+} VkPhysicalDeviceSparseProperties;
+typedef struct VkPhysicalDeviceLimits {
+ uint32_t maxImageDimension1D;
+ uint32_t maxImageDimension2D;
+ uint32_t maxImageDimension3D;
+ uint32_t maxImageDimensionCube;
+ uint32_t maxImageArrayLayers;
+ uint32_t maxTexelBufferElements;
+ uint32_t maxUniformBufferRange;
+ uint32_t maxStorageBufferRange;
+ uint32_t maxPushConstantsSize;
+ uint32_t maxMemoryAllocationCount;
+ uint32_t maxSamplerAllocationCount;
+ VkDeviceSize bufferImageGranularity;
+ VkDeviceSize sparseAddressSpaceSize;
+ uint32_t maxBoundDescriptorSets;
+ uint32_t maxPerStageDescriptorSamplers;
+ uint32_t maxPerStageDescriptorUniformBuffers;
+ uint32_t maxPerStageDescriptorStorageBuffers;
+ uint32_t maxPerStageDescriptorSampledImages;
+ uint32_t maxPerStageDescriptorStorageImages;
+ uint32_t maxPerStageDescriptorInputAttachments;
+ uint32_t maxPerStageResources;
+ uint32_t maxDescriptorSetSamplers;
+ uint32_t maxDescriptorSetUniformBuffers;
+ uint32_t maxDescriptorSetUniformBuffersDynamic;
+ uint32_t maxDescriptorSetStorageBuffers;
+ uint32_t maxDescriptorSetStorageBuffersDynamic;
+ uint32_t maxDescriptorSetSampledImages;
+ uint32_t maxDescriptorSetStorageImages;
+ uint32_t maxDescriptorSetInputAttachments;
+ uint32_t maxVertexInputAttributes;
+ uint32_t maxVertexInputBindings;
+ uint32_t maxVertexInputAttributeOffset;
+ uint32_t maxVertexInputBindingStride;
+ uint32_t maxVertexOutputComponents;
+ uint32_t maxTessellationGenerationLevel;
+ uint32_t maxTessellationPatchSize;
+ uint32_t maxTessellationControlPerVertexInputComponents;
+ uint32_t maxTessellationControlPerVertexOutputComponents;
+ uint32_t maxTessellationControlPerPatchOutputComponents;
+ uint32_t maxTessellationControlTotalOutputComponents;
+ uint32_t maxTessellationEvaluationInputComponents;
+ uint32_t maxTessellationEvaluationOutputComponents;
+ uint32_t maxGeometryShaderInvocations;
+ uint32_t maxGeometryInputComponents;
+ uint32_t maxGeometryOutputComponents;
+ uint32_t maxGeometryOutputVertices;
+ uint32_t maxGeometryTotalOutputComponents;
+ uint32_t maxFragmentInputComponents;
+ uint32_t maxFragmentOutputAttachments;
+ uint32_t maxFragmentDualSrcAttachments;
+ uint32_t maxFragmentCombinedOutputResources;
+ uint32_t maxComputeSharedMemorySize;
+ uint32_t maxComputeWorkGroupCount [3];
+ uint32_t maxComputeWorkGroupInvocations;
+ uint32_t maxComputeWorkGroupSize [3];
+ uint32_t subPixelPrecisionBits;
+ uint32_t subTexelPrecisionBits;
+ uint32_t mipmapPrecisionBits;
+ uint32_t maxDrawIndexedIndexValue;
+ uint32_t maxDrawIndirectCount;
+ float maxSamplerLodBias;
+ float maxSamplerAnisotropy;
+ uint32_t maxViewports;
+ uint32_t maxViewportDimensions [2];
+ float viewportBoundsRange [2];
+ uint32_t viewportSubPixelBits;
+ size_t minMemoryMapAlignment;
+ VkDeviceSize minTexelBufferOffsetAlignment;
+ VkDeviceSize minUniformBufferOffsetAlignment;
+ VkDeviceSize minStorageBufferOffsetAlignment;
+ int32_t minTexelOffset;
+ uint32_t maxTexelOffset;
+ int32_t minTexelGatherOffset;
+ uint32_t maxTexelGatherOffset;
+ float minInterpolationOffset;
+ float maxInterpolationOffset;
+ uint32_t subPixelInterpolationOffsetBits;
+ uint32_t maxFramebufferWidth;
+ uint32_t maxFramebufferHeight;
+ uint32_t maxFramebufferLayers;
+ VkSampleCountFlags framebufferColorSampleCounts;
+ VkSampleCountFlags framebufferDepthSampleCounts;
+ VkSampleCountFlags framebufferStencilSampleCounts;
+ VkSampleCountFlags framebufferNoAttachmentsSampleCounts;
+ uint32_t maxColorAttachments;
+ VkSampleCountFlags sampledImageColorSampleCounts;
+ VkSampleCountFlags sampledImageIntegerSampleCounts;
+ VkSampleCountFlags sampledImageDepthSampleCounts;
+ VkSampleCountFlags sampledImageStencilSampleCounts;
+ VkSampleCountFlags storageImageSampleCounts;
+ uint32_t maxSampleMaskWords;
+ VkBool32 timestampComputeAndGraphics;
+ float timestampPeriod;
+ uint32_t maxClipDistances;
+ uint32_t maxCullDistances;
+ uint32_t maxCombinedClipAndCullDistances;
+ uint32_t discreteQueuePriorities;
+ float pointSizeRange [2];
+ float lineWidthRange [2];
+ float pointSizeGranularity;
+ float lineWidthGranularity;
+ VkBool32 strictLines;
+ VkBool32 standardSampleLocations;
+ VkDeviceSize optimalBufferCopyOffsetAlignment;
+ VkDeviceSize optimalBufferCopyRowPitchAlignment;
+ VkDeviceSize nonCoherentAtomSize;
+} VkPhysicalDeviceLimits;
+typedef struct VkSemaphoreCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkSemaphoreCreateFlags flags;
+} VkSemaphoreCreateInfo;
+typedef struct VkQueryPoolCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkQueryPoolCreateFlags flags;
+ VkQueryType queryType;
+ uint32_t queryCount;
+ VkQueryPipelineStatisticFlags pipelineStatistics;
+} VkQueryPoolCreateInfo;
+typedef struct VkFramebufferCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkFramebufferCreateFlags flags;
+ VkRenderPass renderPass;
+ uint32_t attachmentCount;
+ const VkImageView * pAttachments;
+ uint32_t width;
+ uint32_t height;
+ uint32_t layers;
+} VkFramebufferCreateInfo;
+typedef struct VkSubmitInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t waitSemaphoreCount;
+ const VkSemaphore * pWaitSemaphores;
+ const VkPipelineStageFlags * pWaitDstStageMask;
+ uint32_t commandBufferCount;
+ const VkCommandBuffer * pCommandBuffers;
+ uint32_t signalSemaphoreCount;
+ const VkSemaphore * pSignalSemaphores;
+} VkSubmitInfo;
+typedef struct VkSurfaceCapabilitiesKHR {
+ uint32_t minImageCount;
+ uint32_t maxImageCount;
+ VkExtent2D currentExtent;
+ VkExtent2D minImageExtent;
+ VkExtent2D maxImageExtent;
+ uint32_t maxImageArrayLayers;
+ VkSurfaceTransformFlagsKHR supportedTransforms;
+ VkSurfaceTransformFlagBitsKHR currentTransform;
+ VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
+ VkImageUsageFlags supportedUsageFlags;
+} VkSurfaceCapabilitiesKHR;
+typedef struct VkSwapchainCreateInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ VkSwapchainCreateFlagsKHR flags;
+ VkSurfaceKHR surface;
+ uint32_t minImageCount;
+ VkFormat imageFormat;
+ VkColorSpaceKHR imageColorSpace;
+ VkExtent2D imageExtent;
+ uint32_t imageArrayLayers;
+ VkImageUsageFlags imageUsage;
+ VkSharingMode imageSharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t * pQueueFamilyIndices;
+ VkSurfaceTransformFlagBitsKHR preTransform;
+ VkCompositeAlphaFlagBitsKHR compositeAlpha;
+ VkPresentModeKHR presentMode;
+ VkBool32 clipped;
+ VkSwapchainKHR oldSwapchain;
+} VkSwapchainCreateInfoKHR;
+typedef struct VkDebugReportCallbackCreateInfoEXT {
+ VkStructureType sType;
+ const void * pNext;
+ VkDebugReportFlagsEXT flags;
+ PFN_vkDebugReportCallbackEXT pfnCallback;
+ void * pUserData;
+} VkDebugReportCallbackCreateInfoEXT;
+typedef struct VkPhysicalDeviceFeatures2 {
+ VkStructureType sType;
+ void * pNext;
+ VkPhysicalDeviceFeatures features;
+} VkPhysicalDeviceFeatures2;
+typedef struct VkFormatProperties2 {
+ VkStructureType sType;
+ void * pNext;
+ VkFormatProperties formatProperties;
+} VkFormatProperties2;
+typedef struct VkImageFormatProperties2 {
+ VkStructureType sType;
+ void * pNext;
+ VkImageFormatProperties imageFormatProperties;
+} VkImageFormatProperties2;
+typedef struct VkPhysicalDeviceImageFormatInfo2 {
+ VkStructureType sType;
+ const void * pNext;
+ VkFormat format;
+ VkImageType type;
+ VkImageTiling tiling;
+ VkImageUsageFlags usage;
+ VkImageCreateFlags flags;
+} VkPhysicalDeviceImageFormatInfo2;
+typedef struct VkQueueFamilyProperties2 {
+ VkStructureType sType;
+ void * pNext;
+ VkQueueFamilyProperties queueFamilyProperties;
+} VkQueueFamilyProperties2;
+typedef struct VkSparseImageFormatProperties2 {
+ VkStructureType sType;
+ void * pNext;
+ VkSparseImageFormatProperties properties;
+} VkSparseImageFormatProperties2;
+typedef struct VkPhysicalDeviceSparseImageFormatInfo2 {
+ VkStructureType sType;
+ const void * pNext;
+ VkFormat format;
+ VkImageType type;
+ VkSampleCountFlagBits samples;
+ VkImageUsageFlags usage;
+ VkImageTiling tiling;
+} VkPhysicalDeviceSparseImageFormatInfo2;
+typedef struct VkPhysicalDeviceVariablePointersFeatures {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 variablePointersStorageBuffer;
+ VkBool32 variablePointers;
+} VkPhysicalDeviceVariablePointersFeatures;
+typedef struct VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerFeatures;
+typedef struct VkExternalMemoryProperties {
+ VkExternalMemoryFeatureFlags externalMemoryFeatures;
+ VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes;
+ VkExternalMemoryHandleTypeFlags compatibleHandleTypes;
+} VkExternalMemoryProperties;
+typedef struct VkExternalImageFormatProperties {
+ VkStructureType sType;
+ void * pNext;
+ VkExternalMemoryProperties externalMemoryProperties;
+} VkExternalImageFormatProperties;
+typedef struct VkPhysicalDeviceExternalBufferInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkBufferCreateFlags flags;
+ VkBufferUsageFlags usage;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalBufferInfo;
+typedef struct VkExternalBufferProperties {
+ VkStructureType sType;
+ void * pNext;
+ VkExternalMemoryProperties externalMemoryProperties;
+} VkExternalBufferProperties;
+typedef struct VkPhysicalDeviceIDProperties {
+ VkStructureType sType;
+ void * pNext;
+ uint8_t deviceUUID [ VK_UUID_SIZE ];
+ uint8_t driverUUID [ VK_UUID_SIZE ];
+ uint8_t deviceLUID [ VK_LUID_SIZE ];
+ uint32_t deviceNodeMask;
+ VkBool32 deviceLUIDValid;
+} VkPhysicalDeviceIDProperties;
+typedef struct VkExternalMemoryImageCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalMemoryHandleTypeFlags handleTypes;
+} VkExternalMemoryImageCreateInfo;
+typedef struct VkExternalMemoryBufferCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalMemoryHandleTypeFlags handleTypes;
+} VkExternalMemoryBufferCreateInfo;
+typedef struct VkExportMemoryAllocateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalMemoryHandleTypeFlags handleTypes;
+} VkExportMemoryAllocateInfo;
+typedef struct VkExternalSemaphoreProperties {
+ VkStructureType sType;
+ void * pNext;
+ VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes;
+ VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes;
+ VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures;
+} VkExternalSemaphoreProperties;
+typedef struct VkExportSemaphoreCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalSemaphoreHandleTypeFlags handleTypes;
+} VkExportSemaphoreCreateInfo;
+typedef struct VkExternalFenceProperties {
+ VkStructureType sType;
+ void * pNext;
+ VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes;
+ VkExternalFenceHandleTypeFlags compatibleHandleTypes;
+ VkExternalFenceFeatureFlags externalFenceFeatures;
+} VkExternalFenceProperties;
+typedef struct VkExportFenceCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkExternalFenceHandleTypeFlags handleTypes;
+} VkExportFenceCreateInfo;
+typedef struct VkPhysicalDeviceMultiviewFeatures {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 multiview;
+ VkBool32 multiviewGeometryShader;
+ VkBool32 multiviewTessellationShader;
+} VkPhysicalDeviceMultiviewFeatures;
+typedef struct VkPhysicalDeviceGroupProperties {
+ VkStructureType sType;
+ void * pNext;
+ uint32_t physicalDeviceCount;
+ VkPhysicalDevice physicalDevices [ VK_MAX_DEVICE_GROUP_SIZE ];
+ VkBool32 subsetAllocation;
+} VkPhysicalDeviceGroupProperties;
+typedef struct VkMemoryAllocateFlagsInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkMemoryAllocateFlags flags;
+ uint32_t deviceMask;
+} VkMemoryAllocateFlagsInfo;
+typedef struct VkBindBufferMemoryInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkBuffer buffer;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+} VkBindBufferMemoryInfo;
+typedef struct VkBindImageMemoryInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImage image;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+} VkBindImageMemoryInfo;
+typedef struct VkDeviceGroupPresentCapabilitiesKHR {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t presentMask [ VK_MAX_DEVICE_GROUP_SIZE ];
+ VkDeviceGroupPresentModeFlagsKHR modes;
+} VkDeviceGroupPresentCapabilitiesKHR;
+typedef struct VkDeviceGroupSwapchainCreateInfoKHR {
+ VkStructureType sType;
+ const void * pNext;
+ VkDeviceGroupPresentModeFlagsKHR modes;
+} VkDeviceGroupSwapchainCreateInfoKHR;
+typedef struct VkDescriptorUpdateTemplateCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDescriptorUpdateTemplateCreateFlags flags;
+ uint32_t descriptorUpdateEntryCount;
+ const VkDescriptorUpdateTemplateEntry * pDescriptorUpdateEntries;
+ VkDescriptorUpdateTemplateType templateType;
+ VkDescriptorSetLayout descriptorSetLayout;
+ VkPipelineBindPoint pipelineBindPoint;
+ VkPipelineLayout pipelineLayout;
+ uint32_t set;
+} VkDescriptorUpdateTemplateCreateInfo;
+typedef struct VkInputAttachmentAspectReference {
+ uint32_t subpass;
+ uint32_t inputAttachmentIndex;
+ VkImageAspectFlags aspectMask;
+} VkInputAttachmentAspectReference;
+typedef struct VkRenderPassInputAttachmentAspectCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ uint32_t aspectReferenceCount;
+ const VkInputAttachmentAspectReference * pAspectReferences;
+} VkRenderPassInputAttachmentAspectCreateInfo;
+typedef struct VkPhysicalDevice16BitStorageFeatures {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 storageBuffer16BitAccess;
+ VkBool32 uniformAndStorageBuffer16BitAccess;
+ VkBool32 storagePushConstant16;
+ VkBool32 storageInputOutput16;
+} VkPhysicalDevice16BitStorageFeatures;
+typedef struct VkPhysicalDeviceSubgroupProperties {
+ VkStructureType sType;
+ void * pNext;
+ uint32_t subgroupSize;
+ VkShaderStageFlags supportedStages;
+ VkSubgroupFeatureFlags supportedOperations;
+ VkBool32 quadOperationsInAllStages;
+} VkPhysicalDeviceSubgroupProperties;
+typedef struct VkMemoryRequirements2 {
+ VkStructureType sType;
+ void * pNext;
+ VkMemoryRequirements memoryRequirements;
+} VkMemoryRequirements2;
+typedef struct VkMemoryRequirements2KHR VkMemoryRequirements2KHR;
+typedef struct VkSparseImageMemoryRequirements2 {
+ VkStructureType sType;
+ void * pNext;
+ VkSparseImageMemoryRequirements memoryRequirements;
+} VkSparseImageMemoryRequirements2;
+typedef struct VkMemoryDedicatedRequirements {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 prefersDedicatedAllocation;
+ VkBool32 requiresDedicatedAllocation;
+} VkMemoryDedicatedRequirements;
+typedef struct VkImageViewUsageCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkImageUsageFlags usage;
+} VkImageViewUsageCreateInfo;
+typedef struct VkSamplerYcbcrConversionCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkFormat format;
+ VkSamplerYcbcrModelConversion ycbcrModel;
+ VkSamplerYcbcrRange ycbcrRange;
+ VkComponentMapping components;
+ VkChromaLocation xChromaOffset;
+ VkChromaLocation yChromaOffset;
+ VkFilter chromaFilter;
+ VkBool32 forceExplicitReconstruction;
+} VkSamplerYcbcrConversionCreateInfo;
+typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 samplerYcbcrConversion;
+} VkPhysicalDeviceSamplerYcbcrConversionFeatures;
+typedef struct VkProtectedSubmitInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkBool32 protectedSubmit;
+} VkProtectedSubmitInfo;
+typedef struct VkPhysicalDeviceProtectedMemoryFeatures {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 protectedMemory;
+} VkPhysicalDeviceProtectedMemoryFeatures;
+typedef struct VkPhysicalDeviceProtectedMemoryProperties {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 protectedNoFault;
+} VkPhysicalDeviceProtectedMemoryProperties;
+typedef struct VkDeviceQueueInfo2 {
+ VkStructureType sType;
+ const void * pNext;
+ VkDeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueIndex;
+} VkDeviceQueueInfo2;
+typedef struct VkPhysicalDeviceMaintenance3Properties {
+ VkStructureType sType;
+ void * pNext;
+ uint32_t maxPerSetDescriptors;
+ VkDeviceSize maxMemoryAllocationSize;
+} VkPhysicalDeviceMaintenance3Properties;
+typedef struct VkDescriptorSetLayoutSupport {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 supported;
+} VkDescriptorSetLayoutSupport;
+typedef struct VkPhysicalDeviceShaderDrawParametersFeatures {
+ VkStructureType sType;
+ void * pNext;
+ VkBool32 shaderDrawParameters;
+} VkPhysicalDeviceShaderDrawParametersFeatures;
+typedef struct VkPhysicalDeviceShaderDrawParameterFeatures VkPhysicalDeviceShaderDrawParameterFeatures;
+typedef struct VkPhysicalDeviceProperties {
+ uint32_t apiVersion;
+ uint32_t driverVersion;
+ uint32_t vendorID;
+ uint32_t deviceID;
+ VkPhysicalDeviceType deviceType;
+ char deviceName [ VK_MAX_PHYSICAL_DEVICE_NAME_SIZE ];
+ uint8_t pipelineCacheUUID [ VK_UUID_SIZE ];
+ VkPhysicalDeviceLimits limits;
+ VkPhysicalDeviceSparseProperties sparseProperties;
+} VkPhysicalDeviceProperties;
+typedef struct VkDeviceCreateInfo {
+ VkStructureType sType;
+ const void * pNext;
+ VkDeviceCreateFlags flags;
+ uint32_t queueCreateInfoCount;
+ const VkDeviceQueueCreateInfo * pQueueCreateInfos;
+ uint32_t enabledLayerCount;
+ const char * const* ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char * const* ppEnabledExtensionNames;
+ const VkPhysicalDeviceFeatures * pEnabledFeatures;
+} VkDeviceCreateInfo;
+typedef struct VkPhysicalDeviceMemoryProperties {
+ uint32_t memoryTypeCount;
+ VkMemoryType memoryTypes [ VK_MAX_MEMORY_TYPES ];
+ uint32_t memoryHeapCount;
+ VkMemoryHeap memoryHeaps [ VK_MAX_MEMORY_HEAPS ];
+} VkPhysicalDeviceMemoryProperties;
+typedef struct VkPhysicalDeviceProperties2 {
+ VkStructureType sType;
+ void * pNext;
+ VkPhysicalDeviceProperties properties;
+} VkPhysicalDeviceProperties2;
+typedef struct VkPhysicalDeviceMemoryProperties2 {
+ VkStructureType sType;
+ void * pNext;
+ VkPhysicalDeviceMemoryProperties memoryProperties;
+} VkPhysicalDeviceMemoryProperties2;
+
+
+#define VK_VERSION_1_0 1
+GLAD_API_CALL int GLAD_VK_VERSION_1_0;
+#define VK_VERSION_1_1 1
+GLAD_API_CALL int GLAD_VK_VERSION_1_1;
+#define VK_EXT_debug_report 1
+GLAD_API_CALL int GLAD_VK_EXT_debug_report;
+#define VK_KHR_surface 1
+GLAD_API_CALL int GLAD_VK_KHR_surface;
+#define VK_KHR_swapchain 1
+GLAD_API_CALL int GLAD_VK_KHR_swapchain;
+
+
+typedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice device, const VkAcquireNextImageInfoKHR * pAcquireInfo, uint32_t * pImageIndex);
+typedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t * pImageIndex);
+typedef VkResult (GLAD_API_PTR *PFN_vkAllocateCommandBuffers)(VkDevice device, const VkCommandBufferAllocateInfo * pAllocateInfo, VkCommandBuffer * pCommandBuffers);
+typedef VkResult (GLAD_API_PTR *PFN_vkAllocateDescriptorSets)(VkDevice device, const VkDescriptorSetAllocateInfo * pAllocateInfo, VkDescriptorSet * pDescriptorSets);
+typedef VkResult (GLAD_API_PTR *PFN_vkAllocateMemory)(VkDevice device, const VkMemoryAllocateInfo * pAllocateInfo, const VkAllocationCallbacks * pAllocator, VkDeviceMemory * pMemory);
+typedef VkResult (GLAD_API_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo * pBeginInfo);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo * pBindInfos);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo * pBindInfos);
+typedef void (GLAD_API_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags);
+typedef void (GLAD_API_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo * pRenderPassBegin, VkSubpassContents contents);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet * pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t * pDynamicOffsets);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer * pBuffers, const VkDeviceSize * pOffsets);
+typedef void (GLAD_API_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit * pRegions, VkFilter filter);
+typedef void (GLAD_API_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment * pAttachments, uint32_t rectCount, const VkClearRect * pRects);
+typedef void (GLAD_API_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue * pColor, uint32_t rangeCount, const VkImageSubresourceRange * pRanges);
+typedef void (GLAD_API_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue * pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange * pRanges);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy * pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy * pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy * pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy * pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags);
+typedef void (GLAD_API_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+typedef void (GLAD_API_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+typedef void (GLAD_API_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
+typedef void (GLAD_API_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
+typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
+typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
+typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
+typedef void (GLAD_API_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query);
+typedef void (GLAD_API_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer);
+typedef void (GLAD_API_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer * pCommandBuffers);
+typedef void (GLAD_API_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data);
+typedef void (GLAD_API_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents);
+typedef void (GLAD_API_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier * pImageMemoryBarriers);
+typedef void (GLAD_API_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void * pValues);
+typedef void (GLAD_API_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
+typedef void (GLAD_API_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve * pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants [4]);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer commandBuffer, uint32_t deviceMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D * pScissors);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport * pViewports);
+typedef void (GLAD_API_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void * pData);
+typedef void (GLAD_API_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent * pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier * pImageMemoryBarriers);
+typedef void (GLAD_API_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkBuffer * pBuffer);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkBufferView * pView);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkCommandPool * pCommandPool);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDebugReportCallbackEXT * pCallback);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorPool * pDescriptorPool);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorSetLayout * pSetLayout);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorUpdateTemplate * pDescriptorUpdateTemplate);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDevice * pDevice);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkEvent * pEvent);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkFence * pFence);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkFramebuffer * pFramebuffer);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkImage * pImage);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkImageView * pView);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkInstance * pInstance);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPipelineCache * pPipelineCache);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPipelineLayout * pPipelineLayout);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkQueryPool * pQueryPool);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkRenderPass * pRenderPass);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSampler * pSampler);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSamplerYcbcrConversion * pYcbcrConversion);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSemaphore * pSemaphore);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkShaderModule * pShaderModule);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSwapchainKHR * pSwapchain);
+typedef void (GLAD_API_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char * pLayerPrefix, const char * pMessage);
+typedef void (GLAD_API_PTR *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDevice)(VkDevice device, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyEvent)(VkDevice device, VkEvent event, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyFence)(VkDevice device, VkFence fence, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyImage)(VkDevice device, VkImage image, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks * pAllocator);
+typedef VkResult (GLAD_API_PTR *PFN_vkDeviceWaitIdle)(VkDevice device);
+typedef VkResult (GLAD_API_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char * pLayerName, uint32_t * pPropertyCount, VkExtensionProperties * pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkLayerProperties * pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char * pLayerName, uint32_t * pPropertyCount, VkExtensionProperties * pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t * pPropertyCount, VkLayerProperties * pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t * pApiVersion);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance instance, uint32_t * pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t * pPhysicalDeviceCount, VkPhysicalDevice * pPhysicalDevices);
+typedef VkResult (GLAD_API_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange * pMemoryRanges);
+typedef void (GLAD_API_PTR *PFN_vkFreeCommandBuffers)(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer * pCommandBuffers);
+typedef VkResult (GLAD_API_PTR *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet * pDescriptorSets);
+typedef void (GLAD_API_PTR *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks * pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements * pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice device, const VkBufferMemoryRequirementsInfo2 * pInfo, VkMemoryRequirements2 * pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice device, const VkDescriptorSetLayoutCreateInfo * pCreateInfo, VkDescriptorSetLayoutSupport * pSupport);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags * pPeerMemoryFeatures);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR * pModes);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize * pCommittedMemoryInBytes);
+typedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetDeviceProcAddr)(VkDevice device, const char * pName);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue * pQueue);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue2)(VkDevice device, const VkDeviceQueueInfo2 * pQueueInfo, VkQueue * pQueue);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
+typedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements * pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice device, const VkImageMemoryRequirementsInfo2 * pInfo, VkMemoryRequirements2 * pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements * pSparseMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource * pSubresource, VkSubresourceLayout * pLayout);
+typedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char * pName);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VkExternalBufferProperties * pExternalBufferProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VkExternalFenceProperties * pExternalFenceProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VkExternalSemaphoreProperties * pExternalSemaphoreProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures * pFeatures);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 * pFeatures);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties * pFormatProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2 * pFormatProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties * pImageFormatProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VkImageFormatProperties2 * pImageFormatProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties * pMemoryProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 * pMemoryProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pRectCount, VkRect2D * pRects);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties * pProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties * pQueueFamilyProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties2 * pQueueFamilyProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t * pPropertyCount, VkSparseImageFormatProperties * pProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VkSparseImageFormatProperties2 * pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR * pSurfaceCapabilities);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pSurfaceFormatCount, VkSurfaceFormatKHR * pSurfaceFormats);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pPresentModeCount, VkPresentModeKHR * pPresentModes);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 * pSupported);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t * pDataSize, void * pData);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void * pData, VkDeviceSize stride, VkQueryResultFlags flags);
+typedef void (GLAD_API_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D * pGranularity);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t * pSwapchainImageCount, VkImage * pSwapchainImages);
+typedef VkResult (GLAD_API_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange * pMemoryRanges);
+typedef VkResult (GLAD_API_PTR *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void ** ppData);
+typedef VkResult (GLAD_API_PTR *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache * pSrcCaches);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueueBindSparse)(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo * pBindInfo, VkFence fence);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueuePresentKHR)(VkQueue queue, const VkPresentInfoKHR * pPresentInfo);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo * pSubmits, VkFence fence);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueueWaitIdle)(VkQueue queue);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetEvent)(VkDevice device, VkEvent event);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence * pFences);
+typedef VkResult (GLAD_API_PTR *PFN_vkSetEvent)(VkDevice device, VkEvent event);
+typedef void (GLAD_API_PTR *PFN_vkTrimCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags);
+typedef void (GLAD_API_PTR *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory memory);
+typedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData);
+typedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet * pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet * pDescriptorCopies);
+typedef VkResult (GLAD_API_PTR *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence * pFences, VkBool32 waitAll, uint64_t timeout);
+
+GLAD_API_CALL PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR;
+#define vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR
+GLAD_API_CALL PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR;
+#define vkAcquireNextImageKHR glad_vkAcquireNextImageKHR
+GLAD_API_CALL PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers;
+#define vkAllocateCommandBuffers glad_vkAllocateCommandBuffers
+GLAD_API_CALL PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets;
+#define vkAllocateDescriptorSets glad_vkAllocateDescriptorSets
+GLAD_API_CALL PFN_vkAllocateMemory glad_vkAllocateMemory;
+#define vkAllocateMemory glad_vkAllocateMemory
+GLAD_API_CALL PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer;
+#define vkBeginCommandBuffer glad_vkBeginCommandBuffer
+GLAD_API_CALL PFN_vkBindBufferMemory glad_vkBindBufferMemory;
+#define vkBindBufferMemory glad_vkBindBufferMemory
+GLAD_API_CALL PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2;
+#define vkBindBufferMemory2 glad_vkBindBufferMemory2
+GLAD_API_CALL PFN_vkBindImageMemory glad_vkBindImageMemory;
+#define vkBindImageMemory glad_vkBindImageMemory
+GLAD_API_CALL PFN_vkBindImageMemory2 glad_vkBindImageMemory2;
+#define vkBindImageMemory2 glad_vkBindImageMemory2
+GLAD_API_CALL PFN_vkCmdBeginQuery glad_vkCmdBeginQuery;
+#define vkCmdBeginQuery glad_vkCmdBeginQuery
+GLAD_API_CALL PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass;
+#define vkCmdBeginRenderPass glad_vkCmdBeginRenderPass
+GLAD_API_CALL PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets;
+#define vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets
+GLAD_API_CALL PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer;
+#define vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer
+GLAD_API_CALL PFN_vkCmdBindPipeline glad_vkCmdBindPipeline;
+#define vkCmdBindPipeline glad_vkCmdBindPipeline
+GLAD_API_CALL PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers;
+#define vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers
+GLAD_API_CALL PFN_vkCmdBlitImage glad_vkCmdBlitImage;
+#define vkCmdBlitImage glad_vkCmdBlitImage
+GLAD_API_CALL PFN_vkCmdClearAttachments glad_vkCmdClearAttachments;
+#define vkCmdClearAttachments glad_vkCmdClearAttachments
+GLAD_API_CALL PFN_vkCmdClearColorImage glad_vkCmdClearColorImage;
+#define vkCmdClearColorImage glad_vkCmdClearColorImage
+GLAD_API_CALL PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage;
+#define vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage
+GLAD_API_CALL PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer;
+#define vkCmdCopyBuffer glad_vkCmdCopyBuffer
+GLAD_API_CALL PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage;
+#define vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage
+GLAD_API_CALL PFN_vkCmdCopyImage glad_vkCmdCopyImage;
+#define vkCmdCopyImage glad_vkCmdCopyImage
+GLAD_API_CALL PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer;
+#define vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer
+GLAD_API_CALL PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults;
+#define vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults
+GLAD_API_CALL PFN_vkCmdDispatch glad_vkCmdDispatch;
+#define vkCmdDispatch glad_vkCmdDispatch
+GLAD_API_CALL PFN_vkCmdDispatchBase glad_vkCmdDispatchBase;
+#define vkCmdDispatchBase glad_vkCmdDispatchBase
+GLAD_API_CALL PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect;
+#define vkCmdDispatchIndirect glad_vkCmdDispatchIndirect
+GLAD_API_CALL PFN_vkCmdDraw glad_vkCmdDraw;
+#define vkCmdDraw glad_vkCmdDraw
+GLAD_API_CALL PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed;
+#define vkCmdDrawIndexed glad_vkCmdDrawIndexed
+GLAD_API_CALL PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect;
+#define vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect
+GLAD_API_CALL PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect;
+#define vkCmdDrawIndirect glad_vkCmdDrawIndirect
+GLAD_API_CALL PFN_vkCmdEndQuery glad_vkCmdEndQuery;
+#define vkCmdEndQuery glad_vkCmdEndQuery
+GLAD_API_CALL PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass;
+#define vkCmdEndRenderPass glad_vkCmdEndRenderPass
+GLAD_API_CALL PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands;
+#define vkCmdExecuteCommands glad_vkCmdExecuteCommands
+GLAD_API_CALL PFN_vkCmdFillBuffer glad_vkCmdFillBuffer;
+#define vkCmdFillBuffer glad_vkCmdFillBuffer
+GLAD_API_CALL PFN_vkCmdNextSubpass glad_vkCmdNextSubpass;
+#define vkCmdNextSubpass glad_vkCmdNextSubpass
+GLAD_API_CALL PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier;
+#define vkCmdPipelineBarrier glad_vkCmdPipelineBarrier
+GLAD_API_CALL PFN_vkCmdPushConstants glad_vkCmdPushConstants;
+#define vkCmdPushConstants glad_vkCmdPushConstants
+GLAD_API_CALL PFN_vkCmdResetEvent glad_vkCmdResetEvent;
+#define vkCmdResetEvent glad_vkCmdResetEvent
+GLAD_API_CALL PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool;
+#define vkCmdResetQueryPool glad_vkCmdResetQueryPool
+GLAD_API_CALL PFN_vkCmdResolveImage glad_vkCmdResolveImage;
+#define vkCmdResolveImage glad_vkCmdResolveImage
+GLAD_API_CALL PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants;
+#define vkCmdSetBlendConstants glad_vkCmdSetBlendConstants
+GLAD_API_CALL PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias;
+#define vkCmdSetDepthBias glad_vkCmdSetDepthBias
+GLAD_API_CALL PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds;
+#define vkCmdSetDepthBounds glad_vkCmdSetDepthBounds
+GLAD_API_CALL PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask;
+#define vkCmdSetDeviceMask glad_vkCmdSetDeviceMask
+GLAD_API_CALL PFN_vkCmdSetEvent glad_vkCmdSetEvent;
+#define vkCmdSetEvent glad_vkCmdSetEvent
+GLAD_API_CALL PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth;
+#define vkCmdSetLineWidth glad_vkCmdSetLineWidth
+GLAD_API_CALL PFN_vkCmdSetScissor glad_vkCmdSetScissor;
+#define vkCmdSetScissor glad_vkCmdSetScissor
+GLAD_API_CALL PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask;
+#define vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask
+GLAD_API_CALL PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference;
+#define vkCmdSetStencilReference glad_vkCmdSetStencilReference
+GLAD_API_CALL PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask;
+#define vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask
+GLAD_API_CALL PFN_vkCmdSetViewport glad_vkCmdSetViewport;
+#define vkCmdSetViewport glad_vkCmdSetViewport
+GLAD_API_CALL PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer;
+#define vkCmdUpdateBuffer glad_vkCmdUpdateBuffer
+GLAD_API_CALL PFN_vkCmdWaitEvents glad_vkCmdWaitEvents;
+#define vkCmdWaitEvents glad_vkCmdWaitEvents
+GLAD_API_CALL PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp;
+#define vkCmdWriteTimestamp glad_vkCmdWriteTimestamp
+GLAD_API_CALL PFN_vkCreateBuffer glad_vkCreateBuffer;
+#define vkCreateBuffer glad_vkCreateBuffer
+GLAD_API_CALL PFN_vkCreateBufferView glad_vkCreateBufferView;
+#define vkCreateBufferView glad_vkCreateBufferView
+GLAD_API_CALL PFN_vkCreateCommandPool glad_vkCreateCommandPool;
+#define vkCreateCommandPool glad_vkCreateCommandPool
+GLAD_API_CALL PFN_vkCreateComputePipelines glad_vkCreateComputePipelines;
+#define vkCreateComputePipelines glad_vkCreateComputePipelines
+GLAD_API_CALL PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT;
+#define vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT
+GLAD_API_CALL PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool;
+#define vkCreateDescriptorPool glad_vkCreateDescriptorPool
+GLAD_API_CALL PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout;
+#define vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout
+GLAD_API_CALL PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate;
+#define vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate
+GLAD_API_CALL PFN_vkCreateDevice glad_vkCreateDevice;
+#define vkCreateDevice glad_vkCreateDevice
+GLAD_API_CALL PFN_vkCreateEvent glad_vkCreateEvent;
+#define vkCreateEvent glad_vkCreateEvent
+GLAD_API_CALL PFN_vkCreateFence glad_vkCreateFence;
+#define vkCreateFence glad_vkCreateFence
+GLAD_API_CALL PFN_vkCreateFramebuffer glad_vkCreateFramebuffer;
+#define vkCreateFramebuffer glad_vkCreateFramebuffer
+GLAD_API_CALL PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines;
+#define vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines
+GLAD_API_CALL PFN_vkCreateImage glad_vkCreateImage;
+#define vkCreateImage glad_vkCreateImage
+GLAD_API_CALL PFN_vkCreateImageView glad_vkCreateImageView;
+#define vkCreateImageView glad_vkCreateImageView
+GLAD_API_CALL PFN_vkCreateInstance glad_vkCreateInstance;
+#define vkCreateInstance glad_vkCreateInstance
+GLAD_API_CALL PFN_vkCreatePipelineCache glad_vkCreatePipelineCache;
+#define vkCreatePipelineCache glad_vkCreatePipelineCache
+GLAD_API_CALL PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout;
+#define vkCreatePipelineLayout glad_vkCreatePipelineLayout
+GLAD_API_CALL PFN_vkCreateQueryPool glad_vkCreateQueryPool;
+#define vkCreateQueryPool glad_vkCreateQueryPool
+GLAD_API_CALL PFN_vkCreateRenderPass glad_vkCreateRenderPass;
+#define vkCreateRenderPass glad_vkCreateRenderPass
+GLAD_API_CALL PFN_vkCreateSampler glad_vkCreateSampler;
+#define vkCreateSampler glad_vkCreateSampler
+GLAD_API_CALL PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion;
+#define vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion
+GLAD_API_CALL PFN_vkCreateSemaphore glad_vkCreateSemaphore;
+#define vkCreateSemaphore glad_vkCreateSemaphore
+GLAD_API_CALL PFN_vkCreateShaderModule glad_vkCreateShaderModule;
+#define vkCreateShaderModule glad_vkCreateShaderModule
+GLAD_API_CALL PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR;
+#define vkCreateSwapchainKHR glad_vkCreateSwapchainKHR
+GLAD_API_CALL PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT;
+#define vkDebugReportMessageEXT glad_vkDebugReportMessageEXT
+GLAD_API_CALL PFN_vkDestroyBuffer glad_vkDestroyBuffer;
+#define vkDestroyBuffer glad_vkDestroyBuffer
+GLAD_API_CALL PFN_vkDestroyBufferView glad_vkDestroyBufferView;
+#define vkDestroyBufferView glad_vkDestroyBufferView
+GLAD_API_CALL PFN_vkDestroyCommandPool glad_vkDestroyCommandPool;
+#define vkDestroyCommandPool glad_vkDestroyCommandPool
+GLAD_API_CALL PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT;
+#define vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT
+GLAD_API_CALL PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool;
+#define vkDestroyDescriptorPool glad_vkDestroyDescriptorPool
+GLAD_API_CALL PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout;
+#define vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout
+GLAD_API_CALL PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate;
+#define vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate
+GLAD_API_CALL PFN_vkDestroyDevice glad_vkDestroyDevice;
+#define vkDestroyDevice glad_vkDestroyDevice
+GLAD_API_CALL PFN_vkDestroyEvent glad_vkDestroyEvent;
+#define vkDestroyEvent glad_vkDestroyEvent
+GLAD_API_CALL PFN_vkDestroyFence glad_vkDestroyFence;
+#define vkDestroyFence glad_vkDestroyFence
+GLAD_API_CALL PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer;
+#define vkDestroyFramebuffer glad_vkDestroyFramebuffer
+GLAD_API_CALL PFN_vkDestroyImage glad_vkDestroyImage;
+#define vkDestroyImage glad_vkDestroyImage
+GLAD_API_CALL PFN_vkDestroyImageView glad_vkDestroyImageView;
+#define vkDestroyImageView glad_vkDestroyImageView
+GLAD_API_CALL PFN_vkDestroyInstance glad_vkDestroyInstance;
+#define vkDestroyInstance glad_vkDestroyInstance
+GLAD_API_CALL PFN_vkDestroyPipeline glad_vkDestroyPipeline;
+#define vkDestroyPipeline glad_vkDestroyPipeline
+GLAD_API_CALL PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache;
+#define vkDestroyPipelineCache glad_vkDestroyPipelineCache
+GLAD_API_CALL PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout;
+#define vkDestroyPipelineLayout glad_vkDestroyPipelineLayout
+GLAD_API_CALL PFN_vkDestroyQueryPool glad_vkDestroyQueryPool;
+#define vkDestroyQueryPool glad_vkDestroyQueryPool
+GLAD_API_CALL PFN_vkDestroyRenderPass glad_vkDestroyRenderPass;
+#define vkDestroyRenderPass glad_vkDestroyRenderPass
+GLAD_API_CALL PFN_vkDestroySampler glad_vkDestroySampler;
+#define vkDestroySampler glad_vkDestroySampler
+GLAD_API_CALL PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion;
+#define vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion
+GLAD_API_CALL PFN_vkDestroySemaphore glad_vkDestroySemaphore;
+#define vkDestroySemaphore glad_vkDestroySemaphore
+GLAD_API_CALL PFN_vkDestroyShaderModule glad_vkDestroyShaderModule;
+#define vkDestroyShaderModule glad_vkDestroyShaderModule
+GLAD_API_CALL PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR;
+#define vkDestroySurfaceKHR glad_vkDestroySurfaceKHR
+GLAD_API_CALL PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR;
+#define vkDestroySwapchainKHR glad_vkDestroySwapchainKHR
+GLAD_API_CALL PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle;
+#define vkDeviceWaitIdle glad_vkDeviceWaitIdle
+GLAD_API_CALL PFN_vkEndCommandBuffer glad_vkEndCommandBuffer;
+#define vkEndCommandBuffer glad_vkEndCommandBuffer
+GLAD_API_CALL PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties;
+#define vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties
+GLAD_API_CALL PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties;
+#define vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties
+GLAD_API_CALL PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties;
+#define vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties
+GLAD_API_CALL PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties;
+#define vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties
+GLAD_API_CALL PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion;
+#define vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion
+GLAD_API_CALL PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups;
+#define vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups
+GLAD_API_CALL PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices;
+#define vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices
+GLAD_API_CALL PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges;
+#define vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges
+GLAD_API_CALL PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers;
+#define vkFreeCommandBuffers glad_vkFreeCommandBuffers
+GLAD_API_CALL PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets;
+#define vkFreeDescriptorSets glad_vkFreeDescriptorSets
+GLAD_API_CALL PFN_vkFreeMemory glad_vkFreeMemory;
+#define vkFreeMemory glad_vkFreeMemory
+GLAD_API_CALL PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements;
+#define vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements
+GLAD_API_CALL PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2;
+#define vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2
+GLAD_API_CALL PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport;
+#define vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport
+GLAD_API_CALL PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures;
+#define vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures
+GLAD_API_CALL PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR;
+#define vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR
+GLAD_API_CALL PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR;
+#define vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR
+GLAD_API_CALL PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment;
+#define vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment
+GLAD_API_CALL PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr;
+#define vkGetDeviceProcAddr glad_vkGetDeviceProcAddr
+GLAD_API_CALL PFN_vkGetDeviceQueue glad_vkGetDeviceQueue;
+#define vkGetDeviceQueue glad_vkGetDeviceQueue
+GLAD_API_CALL PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2;
+#define vkGetDeviceQueue2 glad_vkGetDeviceQueue2
+GLAD_API_CALL PFN_vkGetEventStatus glad_vkGetEventStatus;
+#define vkGetEventStatus glad_vkGetEventStatus
+GLAD_API_CALL PFN_vkGetFenceStatus glad_vkGetFenceStatus;
+#define vkGetFenceStatus glad_vkGetFenceStatus
+GLAD_API_CALL PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements;
+#define vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements
+GLAD_API_CALL PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2;
+#define vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2
+GLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements;
+#define vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements
+GLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2;
+#define vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2
+GLAD_API_CALL PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout;
+#define vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout
+GLAD_API_CALL PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr;
+#define vkGetInstanceProcAddr glad_vkGetInstanceProcAddr
+GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties;
+#define vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties;
+#define vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties;
+#define vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures;
+#define vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2;
+#define vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties;
+#define vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2;
+#define vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties;
+#define vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2;
+#define vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties;
+#define vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2;
+#define vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR;
+#define vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties;
+#define vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2;
+#define vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties;
+#define vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2;
+#define vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties;
+#define vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2;
+#define vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
+#define vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR;
+#define vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR;
+#define vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR;
+#define vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR
+GLAD_API_CALL PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData;
+#define vkGetPipelineCacheData glad_vkGetPipelineCacheData
+GLAD_API_CALL PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults;
+#define vkGetQueryPoolResults glad_vkGetQueryPoolResults
+GLAD_API_CALL PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity;
+#define vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity
+GLAD_API_CALL PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR;
+#define vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR
+GLAD_API_CALL PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges;
+#define vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges
+GLAD_API_CALL PFN_vkMapMemory glad_vkMapMemory;
+#define vkMapMemory glad_vkMapMemory
+GLAD_API_CALL PFN_vkMergePipelineCaches glad_vkMergePipelineCaches;
+#define vkMergePipelineCaches glad_vkMergePipelineCaches
+GLAD_API_CALL PFN_vkQueueBindSparse glad_vkQueueBindSparse;
+#define vkQueueBindSparse glad_vkQueueBindSparse
+GLAD_API_CALL PFN_vkQueuePresentKHR glad_vkQueuePresentKHR;
+#define vkQueuePresentKHR glad_vkQueuePresentKHR
+GLAD_API_CALL PFN_vkQueueSubmit glad_vkQueueSubmit;
+#define vkQueueSubmit glad_vkQueueSubmit
+GLAD_API_CALL PFN_vkQueueWaitIdle glad_vkQueueWaitIdle;
+#define vkQueueWaitIdle glad_vkQueueWaitIdle
+GLAD_API_CALL PFN_vkResetCommandBuffer glad_vkResetCommandBuffer;
+#define vkResetCommandBuffer glad_vkResetCommandBuffer
+GLAD_API_CALL PFN_vkResetCommandPool glad_vkResetCommandPool;
+#define vkResetCommandPool glad_vkResetCommandPool
+GLAD_API_CALL PFN_vkResetDescriptorPool glad_vkResetDescriptorPool;
+#define vkResetDescriptorPool glad_vkResetDescriptorPool
+GLAD_API_CALL PFN_vkResetEvent glad_vkResetEvent;
+#define vkResetEvent glad_vkResetEvent
+GLAD_API_CALL PFN_vkResetFences glad_vkResetFences;
+#define vkResetFences glad_vkResetFences
+GLAD_API_CALL PFN_vkSetEvent glad_vkSetEvent;
+#define vkSetEvent glad_vkSetEvent
+GLAD_API_CALL PFN_vkTrimCommandPool glad_vkTrimCommandPool;
+#define vkTrimCommandPool glad_vkTrimCommandPool
+GLAD_API_CALL PFN_vkUnmapMemory glad_vkUnmapMemory;
+#define vkUnmapMemory glad_vkUnmapMemory
+GLAD_API_CALL PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate;
+#define vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate
+GLAD_API_CALL PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets;
+#define vkUpdateDescriptorSets glad_vkUpdateDescriptorSets
+GLAD_API_CALL PFN_vkWaitForFences glad_vkWaitForFences;
+#define vkWaitForFences glad_vkWaitForFences
+
+
+GLAD_API_CALL int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr);
+GLAD_API_CALL int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load);
+
+
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_gl.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_gl.c
new file mode 100644
index 0000000..2d4c87f
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_gl.c
@@ -0,0 +1,1791 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glad/gl.h>
+
+#ifndef GLAD_IMPL_UTIL_C_
+#define GLAD_IMPL_UTIL_C_
+
+#ifdef _MSC_VER
+#define GLAD_IMPL_UTIL_SSCANF sscanf_s
+#else
+#define GLAD_IMPL_UTIL_SSCANF sscanf
+#endif
+
+#endif /* GLAD_IMPL_UTIL_C_ */
+
+
+int GLAD_GL_VERSION_1_0 = 0;
+int GLAD_GL_VERSION_1_1 = 0;
+int GLAD_GL_VERSION_1_2 = 0;
+int GLAD_GL_VERSION_1_3 = 0;
+int GLAD_GL_VERSION_1_4 = 0;
+int GLAD_GL_VERSION_1_5 = 0;
+int GLAD_GL_VERSION_2_0 = 0;
+int GLAD_GL_VERSION_2_1 = 0;
+int GLAD_GL_VERSION_3_0 = 0;
+int GLAD_GL_VERSION_3_1 = 0;
+int GLAD_GL_VERSION_3_2 = 0;
+int GLAD_GL_VERSION_3_3 = 0;
+int GLAD_GL_ARB_multisample = 0;
+int GLAD_GL_ARB_robustness = 0;
+int GLAD_GL_KHR_debug = 0;
+
+
+
+PFNGLACCUMPROC glad_glAccum = NULL;
+PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL;
+PFNGLALPHAFUNCPROC glad_glAlphaFunc = NULL;
+PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident = NULL;
+PFNGLARRAYELEMENTPROC glad_glArrayElement = NULL;
+PFNGLATTACHSHADERPROC glad_glAttachShader = NULL;
+PFNGLBEGINPROC glad_glBegin = NULL;
+PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL;
+PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL;
+PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL;
+PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL;
+PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL;
+PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL;
+PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL;
+PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL;
+PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL;
+PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL;
+PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL;
+PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL;
+PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL;
+PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL;
+PFNGLBITMAPPROC glad_glBitmap = NULL;
+PFNGLBLENDCOLORPROC glad_glBlendColor = NULL;
+PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL;
+PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL;
+PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL;
+PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL;
+PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL;
+PFNGLBUFFERDATAPROC glad_glBufferData = NULL;
+PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL;
+PFNGLCALLLISTPROC glad_glCallList = NULL;
+PFNGLCALLLISTSPROC glad_glCallLists = NULL;
+PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL;
+PFNGLCLAMPCOLORPROC glad_glClampColor = NULL;
+PFNGLCLEARPROC glad_glClear = NULL;
+PFNGLCLEARACCUMPROC glad_glClearAccum = NULL;
+PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL;
+PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL;
+PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL;
+PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL;
+PFNGLCLEARCOLORPROC glad_glClearColor = NULL;
+PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL;
+PFNGLCLEARINDEXPROC glad_glClearIndex = NULL;
+PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL;
+PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture = NULL;
+PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL;
+PFNGLCLIPPLANEPROC glad_glClipPlane = NULL;
+PFNGLCOLOR3BPROC glad_glColor3b = NULL;
+PFNGLCOLOR3BVPROC glad_glColor3bv = NULL;
+PFNGLCOLOR3DPROC glad_glColor3d = NULL;
+PFNGLCOLOR3DVPROC glad_glColor3dv = NULL;
+PFNGLCOLOR3FPROC glad_glColor3f = NULL;
+PFNGLCOLOR3FVPROC glad_glColor3fv = NULL;
+PFNGLCOLOR3IPROC glad_glColor3i = NULL;
+PFNGLCOLOR3IVPROC glad_glColor3iv = NULL;
+PFNGLCOLOR3SPROC glad_glColor3s = NULL;
+PFNGLCOLOR3SVPROC glad_glColor3sv = NULL;
+PFNGLCOLOR3UBPROC glad_glColor3ub = NULL;
+PFNGLCOLOR3UBVPROC glad_glColor3ubv = NULL;
+PFNGLCOLOR3UIPROC glad_glColor3ui = NULL;
+PFNGLCOLOR3UIVPROC glad_glColor3uiv = NULL;
+PFNGLCOLOR3USPROC glad_glColor3us = NULL;
+PFNGLCOLOR3USVPROC glad_glColor3usv = NULL;
+PFNGLCOLOR4BPROC glad_glColor4b = NULL;
+PFNGLCOLOR4BVPROC glad_glColor4bv = NULL;
+PFNGLCOLOR4DPROC glad_glColor4d = NULL;
+PFNGLCOLOR4DVPROC glad_glColor4dv = NULL;
+PFNGLCOLOR4FPROC glad_glColor4f = NULL;
+PFNGLCOLOR4FVPROC glad_glColor4fv = NULL;
+PFNGLCOLOR4IPROC glad_glColor4i = NULL;
+PFNGLCOLOR4IVPROC glad_glColor4iv = NULL;
+PFNGLCOLOR4SPROC glad_glColor4s = NULL;
+PFNGLCOLOR4SVPROC glad_glColor4sv = NULL;
+PFNGLCOLOR4UBPROC glad_glColor4ub = NULL;
+PFNGLCOLOR4UBVPROC glad_glColor4ubv = NULL;
+PFNGLCOLOR4UIPROC glad_glColor4ui = NULL;
+PFNGLCOLOR4UIVPROC glad_glColor4uiv = NULL;
+PFNGLCOLOR4USPROC glad_glColor4us = NULL;
+PFNGLCOLOR4USVPROC glad_glColor4usv = NULL;
+PFNGLCOLORMASKPROC glad_glColorMask = NULL;
+PFNGLCOLORMASKIPROC glad_glColorMaski = NULL;
+PFNGLCOLORMATERIALPROC glad_glColorMaterial = NULL;
+PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL;
+PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL;
+PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL;
+PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL;
+PFNGLCOLORPOINTERPROC glad_glColorPointer = NULL;
+PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL;
+PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL;
+PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL;
+PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL;
+PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL;
+PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL;
+PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL;
+PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL;
+PFNGLCOPYPIXELSPROC glad_glCopyPixels = NULL;
+PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL;
+PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL;
+PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL;
+PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL;
+PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL;
+PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL;
+PFNGLCREATESHADERPROC glad_glCreateShader = NULL;
+PFNGLCULLFACEPROC glad_glCullFace = NULL;
+PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL;
+PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL;
+PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL;
+PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL;
+PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL;
+PFNGLDELETELISTSPROC glad_glDeleteLists = NULL;
+PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL;
+PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL;
+PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL;
+PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL;
+PFNGLDELETESHADERPROC glad_glDeleteShader = NULL;
+PFNGLDELETESYNCPROC glad_glDeleteSync = NULL;
+PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL;
+PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL;
+PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL;
+PFNGLDEPTHMASKPROC glad_glDepthMask = NULL;
+PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL;
+PFNGLDETACHSHADERPROC glad_glDetachShader = NULL;
+PFNGLDISABLEPROC glad_glDisable = NULL;
+PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState = NULL;
+PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL;
+PFNGLDISABLEIPROC glad_glDisablei = NULL;
+PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL;
+PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL;
+PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL;
+PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL;
+PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL;
+PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL;
+PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL;
+PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL;
+PFNGLDRAWPIXELSPROC glad_glDrawPixels = NULL;
+PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL;
+PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL;
+PFNGLEDGEFLAGPROC glad_glEdgeFlag = NULL;
+PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer = NULL;
+PFNGLEDGEFLAGVPROC glad_glEdgeFlagv = NULL;
+PFNGLENABLEPROC glad_glEnable = NULL;
+PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState = NULL;
+PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL;
+PFNGLENABLEIPROC glad_glEnablei = NULL;
+PFNGLENDPROC glad_glEnd = NULL;
+PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL;
+PFNGLENDLISTPROC glad_glEndList = NULL;
+PFNGLENDQUERYPROC glad_glEndQuery = NULL;
+PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL;
+PFNGLEVALCOORD1DPROC glad_glEvalCoord1d = NULL;
+PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv = NULL;
+PFNGLEVALCOORD1FPROC glad_glEvalCoord1f = NULL;
+PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv = NULL;
+PFNGLEVALCOORD2DPROC glad_glEvalCoord2d = NULL;
+PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv = NULL;
+PFNGLEVALCOORD2FPROC glad_glEvalCoord2f = NULL;
+PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv = NULL;
+PFNGLEVALMESH1PROC glad_glEvalMesh1 = NULL;
+PFNGLEVALMESH2PROC glad_glEvalMesh2 = NULL;
+PFNGLEVALPOINT1PROC glad_glEvalPoint1 = NULL;
+PFNGLEVALPOINT2PROC glad_glEvalPoint2 = NULL;
+PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer = NULL;
+PFNGLFENCESYNCPROC glad_glFenceSync = NULL;
+PFNGLFINISHPROC glad_glFinish = NULL;
+PFNGLFLUSHPROC glad_glFlush = NULL;
+PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL;
+PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer = NULL;
+PFNGLFOGCOORDDPROC glad_glFogCoordd = NULL;
+PFNGLFOGCOORDDVPROC glad_glFogCoorddv = NULL;
+PFNGLFOGCOORDFPROC glad_glFogCoordf = NULL;
+PFNGLFOGCOORDFVPROC glad_glFogCoordfv = NULL;
+PFNGLFOGFPROC glad_glFogf = NULL;
+PFNGLFOGFVPROC glad_glFogfv = NULL;
+PFNGLFOGIPROC glad_glFogi = NULL;
+PFNGLFOGIVPROC glad_glFogiv = NULL;
+PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL;
+PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL;
+PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL;
+PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL;
+PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL;
+PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL;
+PFNGLFRONTFACEPROC glad_glFrontFace = NULL;
+PFNGLFRUSTUMPROC glad_glFrustum = NULL;
+PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL;
+PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL;
+PFNGLGENLISTSPROC glad_glGenLists = NULL;
+PFNGLGENQUERIESPROC glad_glGenQueries = NULL;
+PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL;
+PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL;
+PFNGLGENTEXTURESPROC glad_glGenTextures = NULL;
+PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL;
+PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL;
+PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL;
+PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL;
+PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL;
+PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL;
+PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL;
+PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL;
+PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL;
+PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL;
+PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL;
+PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL;
+PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL;
+PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL;
+PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL;
+PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL;
+PFNGLGETCLIPPLANEPROC glad_glGetClipPlane = NULL;
+PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL;
+PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL;
+PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL;
+PFNGLGETERRORPROC glad_glGetError = NULL;
+PFNGLGETFLOATVPROC glad_glGetFloatv = NULL;
+PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL;
+PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL;
+PFNGLGETGRAPHICSRESETSTATUSARBPROC glad_glGetGraphicsResetStatusARB = NULL;
+PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL;
+PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL;
+PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL;
+PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL;
+PFNGLGETLIGHTFVPROC glad_glGetLightfv = NULL;
+PFNGLGETLIGHTIVPROC glad_glGetLightiv = NULL;
+PFNGLGETMAPDVPROC glad_glGetMapdv = NULL;
+PFNGLGETMAPFVPROC glad_glGetMapfv = NULL;
+PFNGLGETMAPIVPROC glad_glGetMapiv = NULL;
+PFNGLGETMATERIALFVPROC glad_glGetMaterialfv = NULL;
+PFNGLGETMATERIALIVPROC glad_glGetMaterialiv = NULL;
+PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL;
+PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL;
+PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL;
+PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv = NULL;
+PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv = NULL;
+PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv = NULL;
+PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL;
+PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple = NULL;
+PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL;
+PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL;
+PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL;
+PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL;
+PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL;
+PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL;
+PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL;
+PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL;
+PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL;
+PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL;
+PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL;
+PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL;
+PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL;
+PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL;
+PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL;
+PFNGLGETSTRINGPROC glad_glGetString = NULL;
+PFNGLGETSTRINGIPROC glad_glGetStringi = NULL;
+PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL;
+PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv = NULL;
+PFNGLGETTEXENVIVPROC glad_glGetTexEnviv = NULL;
+PFNGLGETTEXGENDVPROC glad_glGetTexGendv = NULL;
+PFNGLGETTEXGENFVPROC glad_glGetTexGenfv = NULL;
+PFNGLGETTEXGENIVPROC glad_glGetTexGeniv = NULL;
+PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL;
+PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL;
+PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL;
+PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL;
+PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL;
+PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL;
+PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL;
+PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL;
+PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL;
+PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL;
+PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL;
+PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL;
+PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL;
+PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL;
+PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL;
+PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL;
+PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL;
+PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL;
+PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL;
+PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL;
+PFNGLGETNCOLORTABLEARBPROC glad_glGetnColorTableARB = NULL;
+PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC glad_glGetnCompressedTexImageARB = NULL;
+PFNGLGETNCONVOLUTIONFILTERARBPROC glad_glGetnConvolutionFilterARB = NULL;
+PFNGLGETNHISTOGRAMARBPROC glad_glGetnHistogramARB = NULL;
+PFNGLGETNMAPDVARBPROC glad_glGetnMapdvARB = NULL;
+PFNGLGETNMAPFVARBPROC glad_glGetnMapfvARB = NULL;
+PFNGLGETNMAPIVARBPROC glad_glGetnMapivARB = NULL;
+PFNGLGETNMINMAXARBPROC glad_glGetnMinmaxARB = NULL;
+PFNGLGETNPIXELMAPFVARBPROC glad_glGetnPixelMapfvARB = NULL;
+PFNGLGETNPIXELMAPUIVARBPROC glad_glGetnPixelMapuivARB = NULL;
+PFNGLGETNPIXELMAPUSVARBPROC glad_glGetnPixelMapusvARB = NULL;
+PFNGLGETNPOLYGONSTIPPLEARBPROC glad_glGetnPolygonStippleARB = NULL;
+PFNGLGETNSEPARABLEFILTERARBPROC glad_glGetnSeparableFilterARB = NULL;
+PFNGLGETNTEXIMAGEARBPROC glad_glGetnTexImageARB = NULL;
+PFNGLGETNUNIFORMDVARBPROC glad_glGetnUniformdvARB = NULL;
+PFNGLGETNUNIFORMFVARBPROC glad_glGetnUniformfvARB = NULL;
+PFNGLGETNUNIFORMIVARBPROC glad_glGetnUniformivARB = NULL;
+PFNGLGETNUNIFORMUIVARBPROC glad_glGetnUniformuivARB = NULL;
+PFNGLHINTPROC glad_glHint = NULL;
+PFNGLINDEXMASKPROC glad_glIndexMask = NULL;
+PFNGLINDEXPOINTERPROC glad_glIndexPointer = NULL;
+PFNGLINDEXDPROC glad_glIndexd = NULL;
+PFNGLINDEXDVPROC glad_glIndexdv = NULL;
+PFNGLINDEXFPROC glad_glIndexf = NULL;
+PFNGLINDEXFVPROC glad_glIndexfv = NULL;
+PFNGLINDEXIPROC glad_glIndexi = NULL;
+PFNGLINDEXIVPROC glad_glIndexiv = NULL;
+PFNGLINDEXSPROC glad_glIndexs = NULL;
+PFNGLINDEXSVPROC glad_glIndexsv = NULL;
+PFNGLINDEXUBPROC glad_glIndexub = NULL;
+PFNGLINDEXUBVPROC glad_glIndexubv = NULL;
+PFNGLINITNAMESPROC glad_glInitNames = NULL;
+PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays = NULL;
+PFNGLISBUFFERPROC glad_glIsBuffer = NULL;
+PFNGLISENABLEDPROC glad_glIsEnabled = NULL;
+PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL;
+PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL;
+PFNGLISLISTPROC glad_glIsList = NULL;
+PFNGLISPROGRAMPROC glad_glIsProgram = NULL;
+PFNGLISQUERYPROC glad_glIsQuery = NULL;
+PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL;
+PFNGLISSAMPLERPROC glad_glIsSampler = NULL;
+PFNGLISSHADERPROC glad_glIsShader = NULL;
+PFNGLISSYNCPROC glad_glIsSync = NULL;
+PFNGLISTEXTUREPROC glad_glIsTexture = NULL;
+PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL;
+PFNGLLIGHTMODELFPROC glad_glLightModelf = NULL;
+PFNGLLIGHTMODELFVPROC glad_glLightModelfv = NULL;
+PFNGLLIGHTMODELIPROC glad_glLightModeli = NULL;
+PFNGLLIGHTMODELIVPROC glad_glLightModeliv = NULL;
+PFNGLLIGHTFPROC glad_glLightf = NULL;
+PFNGLLIGHTFVPROC glad_glLightfv = NULL;
+PFNGLLIGHTIPROC glad_glLighti = NULL;
+PFNGLLIGHTIVPROC glad_glLightiv = NULL;
+PFNGLLINESTIPPLEPROC glad_glLineStipple = NULL;
+PFNGLLINEWIDTHPROC glad_glLineWidth = NULL;
+PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL;
+PFNGLLISTBASEPROC glad_glListBase = NULL;
+PFNGLLOADIDENTITYPROC glad_glLoadIdentity = NULL;
+PFNGLLOADMATRIXDPROC glad_glLoadMatrixd = NULL;
+PFNGLLOADMATRIXFPROC glad_glLoadMatrixf = NULL;
+PFNGLLOADNAMEPROC glad_glLoadName = NULL;
+PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd = NULL;
+PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf = NULL;
+PFNGLLOGICOPPROC glad_glLogicOp = NULL;
+PFNGLMAP1DPROC glad_glMap1d = NULL;
+PFNGLMAP1FPROC glad_glMap1f = NULL;
+PFNGLMAP2DPROC glad_glMap2d = NULL;
+PFNGLMAP2FPROC glad_glMap2f = NULL;
+PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL;
+PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL;
+PFNGLMAPGRID1DPROC glad_glMapGrid1d = NULL;
+PFNGLMAPGRID1FPROC glad_glMapGrid1f = NULL;
+PFNGLMAPGRID2DPROC glad_glMapGrid2d = NULL;
+PFNGLMAPGRID2FPROC glad_glMapGrid2f = NULL;
+PFNGLMATERIALFPROC glad_glMaterialf = NULL;
+PFNGLMATERIALFVPROC glad_glMaterialfv = NULL;
+PFNGLMATERIALIPROC glad_glMateriali = NULL;
+PFNGLMATERIALIVPROC glad_glMaterialiv = NULL;
+PFNGLMATRIXMODEPROC glad_glMatrixMode = NULL;
+PFNGLMULTMATRIXDPROC glad_glMultMatrixd = NULL;
+PFNGLMULTMATRIXFPROC glad_glMultMatrixf = NULL;
+PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd = NULL;
+PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf = NULL;
+PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL;
+PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL;
+PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL;
+PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d = NULL;
+PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv = NULL;
+PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f = NULL;
+PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv = NULL;
+PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i = NULL;
+PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv = NULL;
+PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s = NULL;
+PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv = NULL;
+PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d = NULL;
+PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv = NULL;
+PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f = NULL;
+PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv = NULL;
+PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i = NULL;
+PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv = NULL;
+PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s = NULL;
+PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv = NULL;
+PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d = NULL;
+PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv = NULL;
+PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f = NULL;
+PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv = NULL;
+PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i = NULL;
+PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv = NULL;
+PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s = NULL;
+PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv = NULL;
+PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d = NULL;
+PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv = NULL;
+PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f = NULL;
+PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv = NULL;
+PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i = NULL;
+PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv = NULL;
+PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s = NULL;
+PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv = NULL;
+PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL;
+PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL;
+PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL;
+PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL;
+PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL;
+PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL;
+PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL;
+PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL;
+PFNGLNEWLISTPROC glad_glNewList = NULL;
+PFNGLNORMAL3BPROC glad_glNormal3b = NULL;
+PFNGLNORMAL3BVPROC glad_glNormal3bv = NULL;
+PFNGLNORMAL3DPROC glad_glNormal3d = NULL;
+PFNGLNORMAL3DVPROC glad_glNormal3dv = NULL;
+PFNGLNORMAL3FPROC glad_glNormal3f = NULL;
+PFNGLNORMAL3FVPROC glad_glNormal3fv = NULL;
+PFNGLNORMAL3IPROC glad_glNormal3i = NULL;
+PFNGLNORMAL3IVPROC glad_glNormal3iv = NULL;
+PFNGLNORMAL3SPROC glad_glNormal3s = NULL;
+PFNGLNORMAL3SVPROC glad_glNormal3sv = NULL;
+PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL;
+PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL;
+PFNGLNORMALPOINTERPROC glad_glNormalPointer = NULL;
+PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL;
+PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL;
+PFNGLORTHOPROC glad_glOrtho = NULL;
+PFNGLPASSTHROUGHPROC glad_glPassThrough = NULL;
+PFNGLPIXELMAPFVPROC glad_glPixelMapfv = NULL;
+PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv = NULL;
+PFNGLPIXELMAPUSVPROC glad_glPixelMapusv = NULL;
+PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL;
+PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL;
+PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf = NULL;
+PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi = NULL;
+PFNGLPIXELZOOMPROC glad_glPixelZoom = NULL;
+PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL;
+PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL;
+PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL;
+PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL;
+PFNGLPOINTSIZEPROC glad_glPointSize = NULL;
+PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL;
+PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL;
+PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple = NULL;
+PFNGLPOPATTRIBPROC glad_glPopAttrib = NULL;
+PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib = NULL;
+PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL;
+PFNGLPOPMATRIXPROC glad_glPopMatrix = NULL;
+PFNGLPOPNAMEPROC glad_glPopName = NULL;
+PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL;
+PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures = NULL;
+PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL;
+PFNGLPUSHATTRIBPROC glad_glPushAttrib = NULL;
+PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib = NULL;
+PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL;
+PFNGLPUSHMATRIXPROC glad_glPushMatrix = NULL;
+PFNGLPUSHNAMEPROC glad_glPushName = NULL;
+PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL;
+PFNGLRASTERPOS2DPROC glad_glRasterPos2d = NULL;
+PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv = NULL;
+PFNGLRASTERPOS2FPROC glad_glRasterPos2f = NULL;
+PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv = NULL;
+PFNGLRASTERPOS2IPROC glad_glRasterPos2i = NULL;
+PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv = NULL;
+PFNGLRASTERPOS2SPROC glad_glRasterPos2s = NULL;
+PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv = NULL;
+PFNGLRASTERPOS3DPROC glad_glRasterPos3d = NULL;
+PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv = NULL;
+PFNGLRASTERPOS3FPROC glad_glRasterPos3f = NULL;
+PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv = NULL;
+PFNGLRASTERPOS3IPROC glad_glRasterPos3i = NULL;
+PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv = NULL;
+PFNGLRASTERPOS3SPROC glad_glRasterPos3s = NULL;
+PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv = NULL;
+PFNGLRASTERPOS4DPROC glad_glRasterPos4d = NULL;
+PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv = NULL;
+PFNGLRASTERPOS4FPROC glad_glRasterPos4f = NULL;
+PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv = NULL;
+PFNGLRASTERPOS4IPROC glad_glRasterPos4i = NULL;
+PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv = NULL;
+PFNGLRASTERPOS4SPROC glad_glRasterPos4s = NULL;
+PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv = NULL;
+PFNGLREADBUFFERPROC glad_glReadBuffer = NULL;
+PFNGLREADPIXELSPROC glad_glReadPixels = NULL;
+PFNGLREADNPIXELSPROC glad_glReadnPixels = NULL;
+PFNGLREADNPIXELSARBPROC glad_glReadnPixelsARB = NULL;
+PFNGLRECTDPROC glad_glRectd = NULL;
+PFNGLRECTDVPROC glad_glRectdv = NULL;
+PFNGLRECTFPROC glad_glRectf = NULL;
+PFNGLRECTFVPROC glad_glRectfv = NULL;
+PFNGLRECTIPROC glad_glRecti = NULL;
+PFNGLRECTIVPROC glad_glRectiv = NULL;
+PFNGLRECTSPROC glad_glRects = NULL;
+PFNGLRECTSVPROC glad_glRectsv = NULL;
+PFNGLRENDERMODEPROC glad_glRenderMode = NULL;
+PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL;
+PFNGLROTATEDPROC glad_glRotated = NULL;
+PFNGLROTATEFPROC glad_glRotatef = NULL;
+PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL;
+PFNGLSAMPLECOVERAGEARBPROC glad_glSampleCoverageARB = NULL;
+PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL;
+PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL;
+PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL;
+PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL;
+PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL;
+PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL;
+PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL;
+PFNGLSCALEDPROC glad_glScaled = NULL;
+PFNGLSCALEFPROC glad_glScalef = NULL;
+PFNGLSCISSORPROC glad_glScissor = NULL;
+PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b = NULL;
+PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv = NULL;
+PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d = NULL;
+PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv = NULL;
+PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f = NULL;
+PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv = NULL;
+PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i = NULL;
+PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv = NULL;
+PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s = NULL;
+PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv = NULL;
+PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub = NULL;
+PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv = NULL;
+PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui = NULL;
+PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv = NULL;
+PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us = NULL;
+PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv = NULL;
+PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL;
+PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL;
+PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer = NULL;
+PFNGLSELECTBUFFERPROC glad_glSelectBuffer = NULL;
+PFNGLSHADEMODELPROC glad_glShadeModel = NULL;
+PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL;
+PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL;
+PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL;
+PFNGLSTENCILMASKPROC glad_glStencilMask = NULL;
+PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL;
+PFNGLSTENCILOPPROC glad_glStencilOp = NULL;
+PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL;
+PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL;
+PFNGLTEXCOORD1DPROC glad_glTexCoord1d = NULL;
+PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv = NULL;
+PFNGLTEXCOORD1FPROC glad_glTexCoord1f = NULL;
+PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv = NULL;
+PFNGLTEXCOORD1IPROC glad_glTexCoord1i = NULL;
+PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv = NULL;
+PFNGLTEXCOORD1SPROC glad_glTexCoord1s = NULL;
+PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv = NULL;
+PFNGLTEXCOORD2DPROC glad_glTexCoord2d = NULL;
+PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv = NULL;
+PFNGLTEXCOORD2FPROC glad_glTexCoord2f = NULL;
+PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv = NULL;
+PFNGLTEXCOORD2IPROC glad_glTexCoord2i = NULL;
+PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv = NULL;
+PFNGLTEXCOORD2SPROC glad_glTexCoord2s = NULL;
+PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv = NULL;
+PFNGLTEXCOORD3DPROC glad_glTexCoord3d = NULL;
+PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv = NULL;
+PFNGLTEXCOORD3FPROC glad_glTexCoord3f = NULL;
+PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv = NULL;
+PFNGLTEXCOORD3IPROC glad_glTexCoord3i = NULL;
+PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv = NULL;
+PFNGLTEXCOORD3SPROC glad_glTexCoord3s = NULL;
+PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv = NULL;
+PFNGLTEXCOORD4DPROC glad_glTexCoord4d = NULL;
+PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv = NULL;
+PFNGLTEXCOORD4FPROC glad_glTexCoord4f = NULL;
+PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv = NULL;
+PFNGLTEXCOORD4IPROC glad_glTexCoord4i = NULL;
+PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv = NULL;
+PFNGLTEXCOORD4SPROC glad_glTexCoord4s = NULL;
+PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv = NULL;
+PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL;
+PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL;
+PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL;
+PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL;
+PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL;
+PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL;
+PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL;
+PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL;
+PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer = NULL;
+PFNGLTEXENVFPROC glad_glTexEnvf = NULL;
+PFNGLTEXENVFVPROC glad_glTexEnvfv = NULL;
+PFNGLTEXENVIPROC glad_glTexEnvi = NULL;
+PFNGLTEXENVIVPROC glad_glTexEnviv = NULL;
+PFNGLTEXGENDPROC glad_glTexGend = NULL;
+PFNGLTEXGENDVPROC glad_glTexGendv = NULL;
+PFNGLTEXGENFPROC glad_glTexGenf = NULL;
+PFNGLTEXGENFVPROC glad_glTexGenfv = NULL;
+PFNGLTEXGENIPROC glad_glTexGeni = NULL;
+PFNGLTEXGENIVPROC glad_glTexGeniv = NULL;
+PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL;
+PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL;
+PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL;
+PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL;
+PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL;
+PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL;
+PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL;
+PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL;
+PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL;
+PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL;
+PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL;
+PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL;
+PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL;
+PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL;
+PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL;
+PFNGLTRANSLATEDPROC glad_glTranslated = NULL;
+PFNGLTRANSLATEFPROC glad_glTranslatef = NULL;
+PFNGLUNIFORM1FPROC glad_glUniform1f = NULL;
+PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL;
+PFNGLUNIFORM1IPROC glad_glUniform1i = NULL;
+PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL;
+PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL;
+PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL;
+PFNGLUNIFORM2FPROC glad_glUniform2f = NULL;
+PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL;
+PFNGLUNIFORM2IPROC glad_glUniform2i = NULL;
+PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL;
+PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL;
+PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL;
+PFNGLUNIFORM3FPROC glad_glUniform3f = NULL;
+PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL;
+PFNGLUNIFORM3IPROC glad_glUniform3i = NULL;
+PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL;
+PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL;
+PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL;
+PFNGLUNIFORM4FPROC glad_glUniform4f = NULL;
+PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL;
+PFNGLUNIFORM4IPROC glad_glUniform4i = NULL;
+PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL;
+PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL;
+PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL;
+PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL;
+PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL;
+PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL;
+PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL;
+PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL;
+PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL;
+PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL;
+PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL;
+PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL;
+PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL;
+PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL;
+PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL;
+PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL;
+PFNGLVERTEX2DPROC glad_glVertex2d = NULL;
+PFNGLVERTEX2DVPROC glad_glVertex2dv = NULL;
+PFNGLVERTEX2FPROC glad_glVertex2f = NULL;
+PFNGLVERTEX2FVPROC glad_glVertex2fv = NULL;
+PFNGLVERTEX2IPROC glad_glVertex2i = NULL;
+PFNGLVERTEX2IVPROC glad_glVertex2iv = NULL;
+PFNGLVERTEX2SPROC glad_glVertex2s = NULL;
+PFNGLVERTEX2SVPROC glad_glVertex2sv = NULL;
+PFNGLVERTEX3DPROC glad_glVertex3d = NULL;
+PFNGLVERTEX3DVPROC glad_glVertex3dv = NULL;
+PFNGLVERTEX3FPROC glad_glVertex3f = NULL;
+PFNGLVERTEX3FVPROC glad_glVertex3fv = NULL;
+PFNGLVERTEX3IPROC glad_glVertex3i = NULL;
+PFNGLVERTEX3IVPROC glad_glVertex3iv = NULL;
+PFNGLVERTEX3SPROC glad_glVertex3s = NULL;
+PFNGLVERTEX3SVPROC glad_glVertex3sv = NULL;
+PFNGLVERTEX4DPROC glad_glVertex4d = NULL;
+PFNGLVERTEX4DVPROC glad_glVertex4dv = NULL;
+PFNGLVERTEX4FPROC glad_glVertex4f = NULL;
+PFNGLVERTEX4FVPROC glad_glVertex4fv = NULL;
+PFNGLVERTEX4IPROC glad_glVertex4i = NULL;
+PFNGLVERTEX4IVPROC glad_glVertex4iv = NULL;
+PFNGLVERTEX4SPROC glad_glVertex4s = NULL;
+PFNGLVERTEX4SVPROC glad_glVertex4sv = NULL;
+PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL;
+PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL;
+PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL;
+PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL;
+PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL;
+PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL;
+PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL;
+PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL;
+PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL;
+PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL;
+PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL;
+PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL;
+PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL;
+PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL;
+PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL;
+PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL;
+PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL;
+PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL;
+PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL;
+PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL;
+PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL;
+PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL;
+PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL;
+PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL;
+PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL;
+PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL;
+PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL;
+PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL;
+PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL;
+PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL;
+PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL;
+PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL;
+PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL;
+PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL;
+PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL;
+PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL;
+PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL;
+PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL;
+PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL;
+PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL;
+PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL;
+PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL;
+PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL;
+PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL;
+PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL;
+PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL;
+PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL;
+PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL;
+PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL;
+PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL;
+PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL;
+PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL;
+PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL;
+PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL;
+PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL;
+PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL;
+PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL;
+PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL;
+PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL;
+PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL;
+PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL;
+PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL;
+PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL;
+PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL;
+PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL;
+PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL;
+PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL;
+PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL;
+PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL;
+PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL;
+PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL;
+PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL;
+PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL;
+PFNGLVERTEXPOINTERPROC glad_glVertexPointer = NULL;
+PFNGLVIEWPORTPROC glad_glViewport = NULL;
+PFNGLWAITSYNCPROC glad_glWaitSync = NULL;
+PFNGLWINDOWPOS2DPROC glad_glWindowPos2d = NULL;
+PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv = NULL;
+PFNGLWINDOWPOS2FPROC glad_glWindowPos2f = NULL;
+PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv = NULL;
+PFNGLWINDOWPOS2IPROC glad_glWindowPos2i = NULL;
+PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv = NULL;
+PFNGLWINDOWPOS2SPROC glad_glWindowPos2s = NULL;
+PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv = NULL;
+PFNGLWINDOWPOS3DPROC glad_glWindowPos3d = NULL;
+PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv = NULL;
+PFNGLWINDOWPOS3FPROC glad_glWindowPos3f = NULL;
+PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv = NULL;
+PFNGLWINDOWPOS3IPROC glad_glWindowPos3i = NULL;
+PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv = NULL;
+PFNGLWINDOWPOS3SPROC glad_glWindowPos3s = NULL;
+PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv = NULL;
+
+
+static void glad_gl_load_GL_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_1_0) return;
+ glAccum = (PFNGLACCUMPROC) load("glAccum", userptr);
+ glAlphaFunc = (PFNGLALPHAFUNCPROC) load("glAlphaFunc", userptr);
+ glBegin = (PFNGLBEGINPROC) load("glBegin", userptr);
+ glBitmap = (PFNGLBITMAPPROC) load("glBitmap", userptr);
+ glBlendFunc = (PFNGLBLENDFUNCPROC) load("glBlendFunc", userptr);
+ glCallList = (PFNGLCALLLISTPROC) load("glCallList", userptr);
+ glCallLists = (PFNGLCALLLISTSPROC) load("glCallLists", userptr);
+ glClear = (PFNGLCLEARPROC) load("glClear", userptr);
+ glClearAccum = (PFNGLCLEARACCUMPROC) load("glClearAccum", userptr);
+ glClearColor = (PFNGLCLEARCOLORPROC) load("glClearColor", userptr);
+ glClearDepth = (PFNGLCLEARDEPTHPROC) load("glClearDepth", userptr);
+ glClearIndex = (PFNGLCLEARINDEXPROC) load("glClearIndex", userptr);
+ glClearStencil = (PFNGLCLEARSTENCILPROC) load("glClearStencil", userptr);
+ glClipPlane = (PFNGLCLIPPLANEPROC) load("glClipPlane", userptr);
+ glColor3b = (PFNGLCOLOR3BPROC) load("glColor3b", userptr);
+ glColor3bv = (PFNGLCOLOR3BVPROC) load("glColor3bv", userptr);
+ glColor3d = (PFNGLCOLOR3DPROC) load("glColor3d", userptr);
+ glColor3dv = (PFNGLCOLOR3DVPROC) load("glColor3dv", userptr);
+ glColor3f = (PFNGLCOLOR3FPROC) load("glColor3f", userptr);
+ glColor3fv = (PFNGLCOLOR3FVPROC) load("glColor3fv", userptr);
+ glColor3i = (PFNGLCOLOR3IPROC) load("glColor3i", userptr);
+ glColor3iv = (PFNGLCOLOR3IVPROC) load("glColor3iv", userptr);
+ glColor3s = (PFNGLCOLOR3SPROC) load("glColor3s", userptr);
+ glColor3sv = (PFNGLCOLOR3SVPROC) load("glColor3sv", userptr);
+ glColor3ub = (PFNGLCOLOR3UBPROC) load("glColor3ub", userptr);
+ glColor3ubv = (PFNGLCOLOR3UBVPROC) load("glColor3ubv", userptr);
+ glColor3ui = (PFNGLCOLOR3UIPROC) load("glColor3ui", userptr);
+ glColor3uiv = (PFNGLCOLOR3UIVPROC) load("glColor3uiv", userptr);
+ glColor3us = (PFNGLCOLOR3USPROC) load("glColor3us", userptr);
+ glColor3usv = (PFNGLCOLOR3USVPROC) load("glColor3usv", userptr);
+ glColor4b = (PFNGLCOLOR4BPROC) load("glColor4b", userptr);
+ glColor4bv = (PFNGLCOLOR4BVPROC) load("glColor4bv", userptr);
+ glColor4d = (PFNGLCOLOR4DPROC) load("glColor4d", userptr);
+ glColor4dv = (PFNGLCOLOR4DVPROC) load("glColor4dv", userptr);
+ glColor4f = (PFNGLCOLOR4FPROC) load("glColor4f", userptr);
+ glColor4fv = (PFNGLCOLOR4FVPROC) load("glColor4fv", userptr);
+ glColor4i = (PFNGLCOLOR4IPROC) load("glColor4i", userptr);
+ glColor4iv = (PFNGLCOLOR4IVPROC) load("glColor4iv", userptr);
+ glColor4s = (PFNGLCOLOR4SPROC) load("glColor4s", userptr);
+ glColor4sv = (PFNGLCOLOR4SVPROC) load("glColor4sv", userptr);
+ glColor4ub = (PFNGLCOLOR4UBPROC) load("glColor4ub", userptr);
+ glColor4ubv = (PFNGLCOLOR4UBVPROC) load("glColor4ubv", userptr);
+ glColor4ui = (PFNGLCOLOR4UIPROC) load("glColor4ui", userptr);
+ glColor4uiv = (PFNGLCOLOR4UIVPROC) load("glColor4uiv", userptr);
+ glColor4us = (PFNGLCOLOR4USPROC) load("glColor4us", userptr);
+ glColor4usv = (PFNGLCOLOR4USVPROC) load("glColor4usv", userptr);
+ glColorMask = (PFNGLCOLORMASKPROC) load("glColorMask", userptr);
+ glColorMaterial = (PFNGLCOLORMATERIALPROC) load("glColorMaterial", userptr);
+ glCopyPixels = (PFNGLCOPYPIXELSPROC) load("glCopyPixels", userptr);
+ glCullFace = (PFNGLCULLFACEPROC) load("glCullFace", userptr);
+ glDeleteLists = (PFNGLDELETELISTSPROC) load("glDeleteLists", userptr);
+ glDepthFunc = (PFNGLDEPTHFUNCPROC) load("glDepthFunc", userptr);
+ glDepthMask = (PFNGLDEPTHMASKPROC) load("glDepthMask", userptr);
+ glDepthRange = (PFNGLDEPTHRANGEPROC) load("glDepthRange", userptr);
+ glDisable = (PFNGLDISABLEPROC) load("glDisable", userptr);
+ glDrawBuffer = (PFNGLDRAWBUFFERPROC) load("glDrawBuffer", userptr);
+ glDrawPixels = (PFNGLDRAWPIXELSPROC) load("glDrawPixels", userptr);
+ glEdgeFlag = (PFNGLEDGEFLAGPROC) load("glEdgeFlag", userptr);
+ glEdgeFlagv = (PFNGLEDGEFLAGVPROC) load("glEdgeFlagv", userptr);
+ glEnable = (PFNGLENABLEPROC) load("glEnable", userptr);
+ glEnd = (PFNGLENDPROC) load("glEnd", userptr);
+ glEndList = (PFNGLENDLISTPROC) load("glEndList", userptr);
+ glEvalCoord1d = (PFNGLEVALCOORD1DPROC) load("glEvalCoord1d", userptr);
+ glEvalCoord1dv = (PFNGLEVALCOORD1DVPROC) load("glEvalCoord1dv", userptr);
+ glEvalCoord1f = (PFNGLEVALCOORD1FPROC) load("glEvalCoord1f", userptr);
+ glEvalCoord1fv = (PFNGLEVALCOORD1FVPROC) load("glEvalCoord1fv", userptr);
+ glEvalCoord2d = (PFNGLEVALCOORD2DPROC) load("glEvalCoord2d", userptr);
+ glEvalCoord2dv = (PFNGLEVALCOORD2DVPROC) load("glEvalCoord2dv", userptr);
+ glEvalCoord2f = (PFNGLEVALCOORD2FPROC) load("glEvalCoord2f", userptr);
+ glEvalCoord2fv = (PFNGLEVALCOORD2FVPROC) load("glEvalCoord2fv", userptr);
+ glEvalMesh1 = (PFNGLEVALMESH1PROC) load("glEvalMesh1", userptr);
+ glEvalMesh2 = (PFNGLEVALMESH2PROC) load("glEvalMesh2", userptr);
+ glEvalPoint1 = (PFNGLEVALPOINT1PROC) load("glEvalPoint1", userptr);
+ glEvalPoint2 = (PFNGLEVALPOINT2PROC) load("glEvalPoint2", userptr);
+ glFeedbackBuffer = (PFNGLFEEDBACKBUFFERPROC) load("glFeedbackBuffer", userptr);
+ glFinish = (PFNGLFINISHPROC) load("glFinish", userptr);
+ glFlush = (PFNGLFLUSHPROC) load("glFlush", userptr);
+ glFogf = (PFNGLFOGFPROC) load("glFogf", userptr);
+ glFogfv = (PFNGLFOGFVPROC) load("glFogfv", userptr);
+ glFogi = (PFNGLFOGIPROC) load("glFogi", userptr);
+ glFogiv = (PFNGLFOGIVPROC) load("glFogiv", userptr);
+ glFrontFace = (PFNGLFRONTFACEPROC) load("glFrontFace", userptr);
+ glFrustum = (PFNGLFRUSTUMPROC) load("glFrustum", userptr);
+ glGenLists = (PFNGLGENLISTSPROC) load("glGenLists", userptr);
+ glGetBooleanv = (PFNGLGETBOOLEANVPROC) load("glGetBooleanv", userptr);
+ glGetClipPlane = (PFNGLGETCLIPPLANEPROC) load("glGetClipPlane", userptr);
+ glGetDoublev = (PFNGLGETDOUBLEVPROC) load("glGetDoublev", userptr);
+ glGetError = (PFNGLGETERRORPROC) load("glGetError", userptr);
+ glGetFloatv = (PFNGLGETFLOATVPROC) load("glGetFloatv", userptr);
+ glGetIntegerv = (PFNGLGETINTEGERVPROC) load("glGetIntegerv", userptr);
+ glGetLightfv = (PFNGLGETLIGHTFVPROC) load("glGetLightfv", userptr);
+ glGetLightiv = (PFNGLGETLIGHTIVPROC) load("glGetLightiv", userptr);
+ glGetMapdv = (PFNGLGETMAPDVPROC) load("glGetMapdv", userptr);
+ glGetMapfv = (PFNGLGETMAPFVPROC) load("glGetMapfv", userptr);
+ glGetMapiv = (PFNGLGETMAPIVPROC) load("glGetMapiv", userptr);
+ glGetMaterialfv = (PFNGLGETMATERIALFVPROC) load("glGetMaterialfv", userptr);
+ glGetMaterialiv = (PFNGLGETMATERIALIVPROC) load("glGetMaterialiv", userptr);
+ glGetPixelMapfv = (PFNGLGETPIXELMAPFVPROC) load("glGetPixelMapfv", userptr);
+ glGetPixelMapuiv = (PFNGLGETPIXELMAPUIVPROC) load("glGetPixelMapuiv", userptr);
+ glGetPixelMapusv = (PFNGLGETPIXELMAPUSVPROC) load("glGetPixelMapusv", userptr);
+ glGetPolygonStipple = (PFNGLGETPOLYGONSTIPPLEPROC) load("glGetPolygonStipple", userptr);
+ glGetString = (PFNGLGETSTRINGPROC) load("glGetString", userptr);
+ glGetTexEnvfv = (PFNGLGETTEXENVFVPROC) load("glGetTexEnvfv", userptr);
+ glGetTexEnviv = (PFNGLGETTEXENVIVPROC) load("glGetTexEnviv", userptr);
+ glGetTexGendv = (PFNGLGETTEXGENDVPROC) load("glGetTexGendv", userptr);
+ glGetTexGenfv = (PFNGLGETTEXGENFVPROC) load("glGetTexGenfv", userptr);
+ glGetTexGeniv = (PFNGLGETTEXGENIVPROC) load("glGetTexGeniv", userptr);
+ glGetTexImage = (PFNGLGETTEXIMAGEPROC) load("glGetTexImage", userptr);
+ glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) load("glGetTexLevelParameterfv", userptr);
+ glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) load("glGetTexLevelParameteriv", userptr);
+ glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) load("glGetTexParameterfv", userptr);
+ glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) load("glGetTexParameteriv", userptr);
+ glHint = (PFNGLHINTPROC) load("glHint", userptr);
+ glIndexMask = (PFNGLINDEXMASKPROC) load("glIndexMask", userptr);
+ glIndexd = (PFNGLINDEXDPROC) load("glIndexd", userptr);
+ glIndexdv = (PFNGLINDEXDVPROC) load("glIndexdv", userptr);
+ glIndexf = (PFNGLINDEXFPROC) load("glIndexf", userptr);
+ glIndexfv = (PFNGLINDEXFVPROC) load("glIndexfv", userptr);
+ glIndexi = (PFNGLINDEXIPROC) load("glIndexi", userptr);
+ glIndexiv = (PFNGLINDEXIVPROC) load("glIndexiv", userptr);
+ glIndexs = (PFNGLINDEXSPROC) load("glIndexs", userptr);
+ glIndexsv = (PFNGLINDEXSVPROC) load("glIndexsv", userptr);
+ glInitNames = (PFNGLINITNAMESPROC) load("glInitNames", userptr);
+ glIsEnabled = (PFNGLISENABLEDPROC) load("glIsEnabled", userptr);
+ glIsList = (PFNGLISLISTPROC) load("glIsList", userptr);
+ glLightModelf = (PFNGLLIGHTMODELFPROC) load("glLightModelf", userptr);
+ glLightModelfv = (PFNGLLIGHTMODELFVPROC) load("glLightModelfv", userptr);
+ glLightModeli = (PFNGLLIGHTMODELIPROC) load("glLightModeli", userptr);
+ glLightModeliv = (PFNGLLIGHTMODELIVPROC) load("glLightModeliv", userptr);
+ glLightf = (PFNGLLIGHTFPROC) load("glLightf", userptr);
+ glLightfv = (PFNGLLIGHTFVPROC) load("glLightfv", userptr);
+ glLighti = (PFNGLLIGHTIPROC) load("glLighti", userptr);
+ glLightiv = (PFNGLLIGHTIVPROC) load("glLightiv", userptr);
+ glLineStipple = (PFNGLLINESTIPPLEPROC) load("glLineStipple", userptr);
+ glLineWidth = (PFNGLLINEWIDTHPROC) load("glLineWidth", userptr);
+ glListBase = (PFNGLLISTBASEPROC) load("glListBase", userptr);
+ glLoadIdentity = (PFNGLLOADIDENTITYPROC) load("glLoadIdentity", userptr);
+ glLoadMatrixd = (PFNGLLOADMATRIXDPROC) load("glLoadMatrixd", userptr);
+ glLoadMatrixf = (PFNGLLOADMATRIXFPROC) load("glLoadMatrixf", userptr);
+ glLoadName = (PFNGLLOADNAMEPROC) load("glLoadName", userptr);
+ glLogicOp = (PFNGLLOGICOPPROC) load("glLogicOp", userptr);
+ glMap1d = (PFNGLMAP1DPROC) load("glMap1d", userptr);
+ glMap1f = (PFNGLMAP1FPROC) load("glMap1f", userptr);
+ glMap2d = (PFNGLMAP2DPROC) load("glMap2d", userptr);
+ glMap2f = (PFNGLMAP2FPROC) load("glMap2f", userptr);
+ glMapGrid1d = (PFNGLMAPGRID1DPROC) load("glMapGrid1d", userptr);
+ glMapGrid1f = (PFNGLMAPGRID1FPROC) load("glMapGrid1f", userptr);
+ glMapGrid2d = (PFNGLMAPGRID2DPROC) load("glMapGrid2d", userptr);
+ glMapGrid2f = (PFNGLMAPGRID2FPROC) load("glMapGrid2f", userptr);
+ glMaterialf = (PFNGLMATERIALFPROC) load("glMaterialf", userptr);
+ glMaterialfv = (PFNGLMATERIALFVPROC) load("glMaterialfv", userptr);
+ glMateriali = (PFNGLMATERIALIPROC) load("glMateriali", userptr);
+ glMaterialiv = (PFNGLMATERIALIVPROC) load("glMaterialiv", userptr);
+ glMatrixMode = (PFNGLMATRIXMODEPROC) load("glMatrixMode", userptr);
+ glMultMatrixd = (PFNGLMULTMATRIXDPROC) load("glMultMatrixd", userptr);
+ glMultMatrixf = (PFNGLMULTMATRIXFPROC) load("glMultMatrixf", userptr);
+ glNewList = (PFNGLNEWLISTPROC) load("glNewList", userptr);
+ glNormal3b = (PFNGLNORMAL3BPROC) load("glNormal3b", userptr);
+ glNormal3bv = (PFNGLNORMAL3BVPROC) load("glNormal3bv", userptr);
+ glNormal3d = (PFNGLNORMAL3DPROC) load("glNormal3d", userptr);
+ glNormal3dv = (PFNGLNORMAL3DVPROC) load("glNormal3dv", userptr);
+ glNormal3f = (PFNGLNORMAL3FPROC) load("glNormal3f", userptr);
+ glNormal3fv = (PFNGLNORMAL3FVPROC) load("glNormal3fv", userptr);
+ glNormal3i = (PFNGLNORMAL3IPROC) load("glNormal3i", userptr);
+ glNormal3iv = (PFNGLNORMAL3IVPROC) load("glNormal3iv", userptr);
+ glNormal3s = (PFNGLNORMAL3SPROC) load("glNormal3s", userptr);
+ glNormal3sv = (PFNGLNORMAL3SVPROC) load("glNormal3sv", userptr);
+ glOrtho = (PFNGLORTHOPROC) load("glOrtho", userptr);
+ glPassThrough = (PFNGLPASSTHROUGHPROC) load("glPassThrough", userptr);
+ glPixelMapfv = (PFNGLPIXELMAPFVPROC) load("glPixelMapfv", userptr);
+ glPixelMapuiv = (PFNGLPIXELMAPUIVPROC) load("glPixelMapuiv", userptr);
+ glPixelMapusv = (PFNGLPIXELMAPUSVPROC) load("glPixelMapusv", userptr);
+ glPixelStoref = (PFNGLPIXELSTOREFPROC) load("glPixelStoref", userptr);
+ glPixelStorei = (PFNGLPIXELSTOREIPROC) load("glPixelStorei", userptr);
+ glPixelTransferf = (PFNGLPIXELTRANSFERFPROC) load("glPixelTransferf", userptr);
+ glPixelTransferi = (PFNGLPIXELTRANSFERIPROC) load("glPixelTransferi", userptr);
+ glPixelZoom = (PFNGLPIXELZOOMPROC) load("glPixelZoom", userptr);
+ glPointSize = (PFNGLPOINTSIZEPROC) load("glPointSize", userptr);
+ glPolygonMode = (PFNGLPOLYGONMODEPROC) load("glPolygonMode", userptr);
+ glPolygonStipple = (PFNGLPOLYGONSTIPPLEPROC) load("glPolygonStipple", userptr);
+ glPopAttrib = (PFNGLPOPATTRIBPROC) load("glPopAttrib", userptr);
+ glPopMatrix = (PFNGLPOPMATRIXPROC) load("glPopMatrix", userptr);
+ glPopName = (PFNGLPOPNAMEPROC) load("glPopName", userptr);
+ glPushAttrib = (PFNGLPUSHATTRIBPROC) load("glPushAttrib", userptr);
+ glPushMatrix = (PFNGLPUSHMATRIXPROC) load("glPushMatrix", userptr);
+ glPushName = (PFNGLPUSHNAMEPROC) load("glPushName", userptr);
+ glRasterPos2d = (PFNGLRASTERPOS2DPROC) load("glRasterPos2d", userptr);
+ glRasterPos2dv = (PFNGLRASTERPOS2DVPROC) load("glRasterPos2dv", userptr);
+ glRasterPos2f = (PFNGLRASTERPOS2FPROC) load("glRasterPos2f", userptr);
+ glRasterPos2fv = (PFNGLRASTERPOS2FVPROC) load("glRasterPos2fv", userptr);
+ glRasterPos2i = (PFNGLRASTERPOS2IPROC) load("glRasterPos2i", userptr);
+ glRasterPos2iv = (PFNGLRASTERPOS2IVPROC) load("glRasterPos2iv", userptr);
+ glRasterPos2s = (PFNGLRASTERPOS2SPROC) load("glRasterPos2s", userptr);
+ glRasterPos2sv = (PFNGLRASTERPOS2SVPROC) load("glRasterPos2sv", userptr);
+ glRasterPos3d = (PFNGLRASTERPOS3DPROC) load("glRasterPos3d", userptr);
+ glRasterPos3dv = (PFNGLRASTERPOS3DVPROC) load("glRasterPos3dv", userptr);
+ glRasterPos3f = (PFNGLRASTERPOS3FPROC) load("glRasterPos3f", userptr);
+ glRasterPos3fv = (PFNGLRASTERPOS3FVPROC) load("glRasterPos3fv", userptr);
+ glRasterPos3i = (PFNGLRASTERPOS3IPROC) load("glRasterPos3i", userptr);
+ glRasterPos3iv = (PFNGLRASTERPOS3IVPROC) load("glRasterPos3iv", userptr);
+ glRasterPos3s = (PFNGLRASTERPOS3SPROC) load("glRasterPos3s", userptr);
+ glRasterPos3sv = (PFNGLRASTERPOS3SVPROC) load("glRasterPos3sv", userptr);
+ glRasterPos4d = (PFNGLRASTERPOS4DPROC) load("glRasterPos4d", userptr);
+ glRasterPos4dv = (PFNGLRASTERPOS4DVPROC) load("glRasterPos4dv", userptr);
+ glRasterPos4f = (PFNGLRASTERPOS4FPROC) load("glRasterPos4f", userptr);
+ glRasterPos4fv = (PFNGLRASTERPOS4FVPROC) load("glRasterPos4fv", userptr);
+ glRasterPos4i = (PFNGLRASTERPOS4IPROC) load("glRasterPos4i", userptr);
+ glRasterPos4iv = (PFNGLRASTERPOS4IVPROC) load("glRasterPos4iv", userptr);
+ glRasterPos4s = (PFNGLRASTERPOS4SPROC) load("glRasterPos4s", userptr);
+ glRasterPos4sv = (PFNGLRASTERPOS4SVPROC) load("glRasterPos4sv", userptr);
+ glReadBuffer = (PFNGLREADBUFFERPROC) load("glReadBuffer", userptr);
+ glReadPixels = (PFNGLREADPIXELSPROC) load("glReadPixels", userptr);
+ glRectd = (PFNGLRECTDPROC) load("glRectd", userptr);
+ glRectdv = (PFNGLRECTDVPROC) load("glRectdv", userptr);
+ glRectf = (PFNGLRECTFPROC) load("glRectf", userptr);
+ glRectfv = (PFNGLRECTFVPROC) load("glRectfv", userptr);
+ glRecti = (PFNGLRECTIPROC) load("glRecti", userptr);
+ glRectiv = (PFNGLRECTIVPROC) load("glRectiv", userptr);
+ glRects = (PFNGLRECTSPROC) load("glRects", userptr);
+ glRectsv = (PFNGLRECTSVPROC) load("glRectsv", userptr);
+ glRenderMode = (PFNGLRENDERMODEPROC) load("glRenderMode", userptr);
+ glRotated = (PFNGLROTATEDPROC) load("glRotated", userptr);
+ glRotatef = (PFNGLROTATEFPROC) load("glRotatef", userptr);
+ glScaled = (PFNGLSCALEDPROC) load("glScaled", userptr);
+ glScalef = (PFNGLSCALEFPROC) load("glScalef", userptr);
+ glScissor = (PFNGLSCISSORPROC) load("glScissor", userptr);
+ glSelectBuffer = (PFNGLSELECTBUFFERPROC) load("glSelectBuffer", userptr);
+ glShadeModel = (PFNGLSHADEMODELPROC) load("glShadeModel", userptr);
+ glStencilFunc = (PFNGLSTENCILFUNCPROC) load("glStencilFunc", userptr);
+ glStencilMask = (PFNGLSTENCILMASKPROC) load("glStencilMask", userptr);
+ glStencilOp = (PFNGLSTENCILOPPROC) load("glStencilOp", userptr);
+ glTexCoord1d = (PFNGLTEXCOORD1DPROC) load("glTexCoord1d", userptr);
+ glTexCoord1dv = (PFNGLTEXCOORD1DVPROC) load("glTexCoord1dv", userptr);
+ glTexCoord1f = (PFNGLTEXCOORD1FPROC) load("glTexCoord1f", userptr);
+ glTexCoord1fv = (PFNGLTEXCOORD1FVPROC) load("glTexCoord1fv", userptr);
+ glTexCoord1i = (PFNGLTEXCOORD1IPROC) load("glTexCoord1i", userptr);
+ glTexCoord1iv = (PFNGLTEXCOORD1IVPROC) load("glTexCoord1iv", userptr);
+ glTexCoord1s = (PFNGLTEXCOORD1SPROC) load("glTexCoord1s", userptr);
+ glTexCoord1sv = (PFNGLTEXCOORD1SVPROC) load("glTexCoord1sv", userptr);
+ glTexCoord2d = (PFNGLTEXCOORD2DPROC) load("glTexCoord2d", userptr);
+ glTexCoord2dv = (PFNGLTEXCOORD2DVPROC) load("glTexCoord2dv", userptr);
+ glTexCoord2f = (PFNGLTEXCOORD2FPROC) load("glTexCoord2f", userptr);
+ glTexCoord2fv = (PFNGLTEXCOORD2FVPROC) load("glTexCoord2fv", userptr);
+ glTexCoord2i = (PFNGLTEXCOORD2IPROC) load("glTexCoord2i", userptr);
+ glTexCoord2iv = (PFNGLTEXCOORD2IVPROC) load("glTexCoord2iv", userptr);
+ glTexCoord2s = (PFNGLTEXCOORD2SPROC) load("glTexCoord2s", userptr);
+ glTexCoord2sv = (PFNGLTEXCOORD2SVPROC) load("glTexCoord2sv", userptr);
+ glTexCoord3d = (PFNGLTEXCOORD3DPROC) load("glTexCoord3d", userptr);
+ glTexCoord3dv = (PFNGLTEXCOORD3DVPROC) load("glTexCoord3dv", userptr);
+ glTexCoord3f = (PFNGLTEXCOORD3FPROC) load("glTexCoord3f", userptr);
+ glTexCoord3fv = (PFNGLTEXCOORD3FVPROC) load("glTexCoord3fv", userptr);
+ glTexCoord3i = (PFNGLTEXCOORD3IPROC) load("glTexCoord3i", userptr);
+ glTexCoord3iv = (PFNGLTEXCOORD3IVPROC) load("glTexCoord3iv", userptr);
+ glTexCoord3s = (PFNGLTEXCOORD3SPROC) load("glTexCoord3s", userptr);
+ glTexCoord3sv = (PFNGLTEXCOORD3SVPROC) load("glTexCoord3sv", userptr);
+ glTexCoord4d = (PFNGLTEXCOORD4DPROC) load("glTexCoord4d", userptr);
+ glTexCoord4dv = (PFNGLTEXCOORD4DVPROC) load("glTexCoord4dv", userptr);
+ glTexCoord4f = (PFNGLTEXCOORD4FPROC) load("glTexCoord4f", userptr);
+ glTexCoord4fv = (PFNGLTEXCOORD4FVPROC) load("glTexCoord4fv", userptr);
+ glTexCoord4i = (PFNGLTEXCOORD4IPROC) load("glTexCoord4i", userptr);
+ glTexCoord4iv = (PFNGLTEXCOORD4IVPROC) load("glTexCoord4iv", userptr);
+ glTexCoord4s = (PFNGLTEXCOORD4SPROC) load("glTexCoord4s", userptr);
+ glTexCoord4sv = (PFNGLTEXCOORD4SVPROC) load("glTexCoord4sv", userptr);
+ glTexEnvf = (PFNGLTEXENVFPROC) load("glTexEnvf", userptr);
+ glTexEnvfv = (PFNGLTEXENVFVPROC) load("glTexEnvfv", userptr);
+ glTexEnvi = (PFNGLTEXENVIPROC) load("glTexEnvi", userptr);
+ glTexEnviv = (PFNGLTEXENVIVPROC) load("glTexEnviv", userptr);
+ glTexGend = (PFNGLTEXGENDPROC) load("glTexGend", userptr);
+ glTexGendv = (PFNGLTEXGENDVPROC) load("glTexGendv", userptr);
+ glTexGenf = (PFNGLTEXGENFPROC) load("glTexGenf", userptr);
+ glTexGenfv = (PFNGLTEXGENFVPROC) load("glTexGenfv", userptr);
+ glTexGeni = (PFNGLTEXGENIPROC) load("glTexGeni", userptr);
+ glTexGeniv = (PFNGLTEXGENIVPROC) load("glTexGeniv", userptr);
+ glTexImage1D = (PFNGLTEXIMAGE1DPROC) load("glTexImage1D", userptr);
+ glTexImage2D = (PFNGLTEXIMAGE2DPROC) load("glTexImage2D", userptr);
+ glTexParameterf = (PFNGLTEXPARAMETERFPROC) load("glTexParameterf", userptr);
+ glTexParameterfv = (PFNGLTEXPARAMETERFVPROC) load("glTexParameterfv", userptr);
+ glTexParameteri = (PFNGLTEXPARAMETERIPROC) load("glTexParameteri", userptr);
+ glTexParameteriv = (PFNGLTEXPARAMETERIVPROC) load("glTexParameteriv", userptr);
+ glTranslated = (PFNGLTRANSLATEDPROC) load("glTranslated", userptr);
+ glTranslatef = (PFNGLTRANSLATEFPROC) load("glTranslatef", userptr);
+ glVertex2d = (PFNGLVERTEX2DPROC) load("glVertex2d", userptr);
+ glVertex2dv = (PFNGLVERTEX2DVPROC) load("glVertex2dv", userptr);
+ glVertex2f = (PFNGLVERTEX2FPROC) load("glVertex2f", userptr);
+ glVertex2fv = (PFNGLVERTEX2FVPROC) load("glVertex2fv", userptr);
+ glVertex2i = (PFNGLVERTEX2IPROC) load("glVertex2i", userptr);
+ glVertex2iv = (PFNGLVERTEX2IVPROC) load("glVertex2iv", userptr);
+ glVertex2s = (PFNGLVERTEX2SPROC) load("glVertex2s", userptr);
+ glVertex2sv = (PFNGLVERTEX2SVPROC) load("glVertex2sv", userptr);
+ glVertex3d = (PFNGLVERTEX3DPROC) load("glVertex3d", userptr);
+ glVertex3dv = (PFNGLVERTEX3DVPROC) load("glVertex3dv", userptr);
+ glVertex3f = (PFNGLVERTEX3FPROC) load("glVertex3f", userptr);
+ glVertex3fv = (PFNGLVERTEX3FVPROC) load("glVertex3fv", userptr);
+ glVertex3i = (PFNGLVERTEX3IPROC) load("glVertex3i", userptr);
+ glVertex3iv = (PFNGLVERTEX3IVPROC) load("glVertex3iv", userptr);
+ glVertex3s = (PFNGLVERTEX3SPROC) load("glVertex3s", userptr);
+ glVertex3sv = (PFNGLVERTEX3SVPROC) load("glVertex3sv", userptr);
+ glVertex4d = (PFNGLVERTEX4DPROC) load("glVertex4d", userptr);
+ glVertex4dv = (PFNGLVERTEX4DVPROC) load("glVertex4dv", userptr);
+ glVertex4f = (PFNGLVERTEX4FPROC) load("glVertex4f", userptr);
+ glVertex4fv = (PFNGLVERTEX4FVPROC) load("glVertex4fv", userptr);
+ glVertex4i = (PFNGLVERTEX4IPROC) load("glVertex4i", userptr);
+ glVertex4iv = (PFNGLVERTEX4IVPROC) load("glVertex4iv", userptr);
+ glVertex4s = (PFNGLVERTEX4SPROC) load("glVertex4s", userptr);
+ glVertex4sv = (PFNGLVERTEX4SVPROC) load("glVertex4sv", userptr);
+ glViewport = (PFNGLVIEWPORTPROC) load("glViewport", userptr);
+}
+static void glad_gl_load_GL_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_1_1) return;
+ glAreTexturesResident = (PFNGLARETEXTURESRESIDENTPROC) load("glAreTexturesResident", userptr);
+ glArrayElement = (PFNGLARRAYELEMENTPROC) load("glArrayElement", userptr);
+ glBindTexture = (PFNGLBINDTEXTUREPROC) load("glBindTexture", userptr);
+ glColorPointer = (PFNGLCOLORPOINTERPROC) load("glColorPointer", userptr);
+ glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC) load("glCopyTexImage1D", userptr);
+ glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) load("glCopyTexImage2D", userptr);
+ glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC) load("glCopyTexSubImage1D", userptr);
+ glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) load("glCopyTexSubImage2D", userptr);
+ glDeleteTextures = (PFNGLDELETETEXTURESPROC) load("glDeleteTextures", userptr);
+ glDisableClientState = (PFNGLDISABLECLIENTSTATEPROC) load("glDisableClientState", userptr);
+ glDrawArrays = (PFNGLDRAWARRAYSPROC) load("glDrawArrays", userptr);
+ glDrawElements = (PFNGLDRAWELEMENTSPROC) load("glDrawElements", userptr);
+ glEdgeFlagPointer = (PFNGLEDGEFLAGPOINTERPROC) load("glEdgeFlagPointer", userptr);
+ glEnableClientState = (PFNGLENABLECLIENTSTATEPROC) load("glEnableClientState", userptr);
+ glGenTextures = (PFNGLGENTEXTURESPROC) load("glGenTextures", userptr);
+ glGetPointerv = (PFNGLGETPOINTERVPROC) load("glGetPointerv", userptr);
+ glIndexPointer = (PFNGLINDEXPOINTERPROC) load("glIndexPointer", userptr);
+ glIndexub = (PFNGLINDEXUBPROC) load("glIndexub", userptr);
+ glIndexubv = (PFNGLINDEXUBVPROC) load("glIndexubv", userptr);
+ glInterleavedArrays = (PFNGLINTERLEAVEDARRAYSPROC) load("glInterleavedArrays", userptr);
+ glIsTexture = (PFNGLISTEXTUREPROC) load("glIsTexture", userptr);
+ glNormalPointer = (PFNGLNORMALPOINTERPROC) load("glNormalPointer", userptr);
+ glPolygonOffset = (PFNGLPOLYGONOFFSETPROC) load("glPolygonOffset", userptr);
+ glPopClientAttrib = (PFNGLPOPCLIENTATTRIBPROC) load("glPopClientAttrib", userptr);
+ glPrioritizeTextures = (PFNGLPRIORITIZETEXTURESPROC) load("glPrioritizeTextures", userptr);
+ glPushClientAttrib = (PFNGLPUSHCLIENTATTRIBPROC) load("glPushClientAttrib", userptr);
+ glTexCoordPointer = (PFNGLTEXCOORDPOINTERPROC) load("glTexCoordPointer", userptr);
+ glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC) load("glTexSubImage1D", userptr);
+ glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) load("glTexSubImage2D", userptr);
+ glVertexPointer = (PFNGLVERTEXPOINTERPROC) load("glVertexPointer", userptr);
+}
+static void glad_gl_load_GL_VERSION_1_2( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_1_2) return;
+ glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) load("glCopyTexSubImage3D", userptr);
+ glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) load("glDrawRangeElements", userptr);
+ glTexImage3D = (PFNGLTEXIMAGE3DPROC) load("glTexImage3D", userptr);
+ glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) load("glTexSubImage3D", userptr);
+}
+static void glad_gl_load_GL_VERSION_1_3( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_1_3) return;
+ glActiveTexture = (PFNGLACTIVETEXTUREPROC) load("glActiveTexture", userptr);
+ glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC) load("glClientActiveTexture", userptr);
+ glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) load("glCompressedTexImage1D", userptr);
+ glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) load("glCompressedTexImage2D", userptr);
+ glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) load("glCompressedTexImage3D", userptr);
+ glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) load("glCompressedTexSubImage1D", userptr);
+ glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) load("glCompressedTexSubImage2D", userptr);
+ glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) load("glCompressedTexSubImage3D", userptr);
+ glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) load("glGetCompressedTexImage", userptr);
+ glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC) load("glLoadTransposeMatrixd", userptr);
+ glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC) load("glLoadTransposeMatrixf", userptr);
+ glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC) load("glMultTransposeMatrixd", userptr);
+ glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC) load("glMultTransposeMatrixf", userptr);
+ glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC) load("glMultiTexCoord1d", userptr);
+ glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC) load("glMultiTexCoord1dv", userptr);
+ glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC) load("glMultiTexCoord1f", userptr);
+ glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC) load("glMultiTexCoord1fv", userptr);
+ glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC) load("glMultiTexCoord1i", userptr);
+ glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC) load("glMultiTexCoord1iv", userptr);
+ glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC) load("glMultiTexCoord1s", userptr);
+ glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC) load("glMultiTexCoord1sv", userptr);
+ glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC) load("glMultiTexCoord2d", userptr);
+ glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC) load("glMultiTexCoord2dv", userptr);
+ glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC) load("glMultiTexCoord2f", userptr);
+ glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC) load("glMultiTexCoord2fv", userptr);
+ glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC) load("glMultiTexCoord2i", userptr);
+ glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC) load("glMultiTexCoord2iv", userptr);
+ glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC) load("glMultiTexCoord2s", userptr);
+ glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC) load("glMultiTexCoord2sv", userptr);
+ glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC) load("glMultiTexCoord3d", userptr);
+ glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC) load("glMultiTexCoord3dv", userptr);
+ glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC) load("glMultiTexCoord3f", userptr);
+ glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC) load("glMultiTexCoord3fv", userptr);
+ glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC) load("glMultiTexCoord3i", userptr);
+ glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC) load("glMultiTexCoord3iv", userptr);
+ glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC) load("glMultiTexCoord3s", userptr);
+ glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC) load("glMultiTexCoord3sv", userptr);
+ glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC) load("glMultiTexCoord4d", userptr);
+ glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC) load("glMultiTexCoord4dv", userptr);
+ glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC) load("glMultiTexCoord4f", userptr);
+ glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC) load("glMultiTexCoord4fv", userptr);
+ glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC) load("glMultiTexCoord4i", userptr);
+ glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC) load("glMultiTexCoord4iv", userptr);
+ glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC) load("glMultiTexCoord4s", userptr);
+ glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC) load("glMultiTexCoord4sv", userptr);
+ glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load("glSampleCoverage", userptr);
+}
+static void glad_gl_load_GL_VERSION_1_4( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_1_4) return;
+ glBlendColor = (PFNGLBLENDCOLORPROC) load("glBlendColor", userptr);
+ glBlendEquation = (PFNGLBLENDEQUATIONPROC) load("glBlendEquation", userptr);
+ glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) load("glBlendFuncSeparate", userptr);
+ glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC) load("glFogCoordPointer", userptr);
+ glFogCoordd = (PFNGLFOGCOORDDPROC) load("glFogCoordd", userptr);
+ glFogCoorddv = (PFNGLFOGCOORDDVPROC) load("glFogCoorddv", userptr);
+ glFogCoordf = (PFNGLFOGCOORDFPROC) load("glFogCoordf", userptr);
+ glFogCoordfv = (PFNGLFOGCOORDFVPROC) load("glFogCoordfv", userptr);
+ glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) load("glMultiDrawArrays", userptr);
+ glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) load("glMultiDrawElements", userptr);
+ glPointParameterf = (PFNGLPOINTPARAMETERFPROC) load("glPointParameterf", userptr);
+ glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC) load("glPointParameterfv", userptr);
+ glPointParameteri = (PFNGLPOINTPARAMETERIPROC) load("glPointParameteri", userptr);
+ glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC) load("glPointParameteriv", userptr);
+ glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC) load("glSecondaryColor3b", userptr);
+ glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC) load("glSecondaryColor3bv", userptr);
+ glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC) load("glSecondaryColor3d", userptr);
+ glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC) load("glSecondaryColor3dv", userptr);
+ glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC) load("glSecondaryColor3f", userptr);
+ glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC) load("glSecondaryColor3fv", userptr);
+ glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC) load("glSecondaryColor3i", userptr);
+ glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC) load("glSecondaryColor3iv", userptr);
+ glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC) load("glSecondaryColor3s", userptr);
+ glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC) load("glSecondaryColor3sv", userptr);
+ glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC) load("glSecondaryColor3ub", userptr);
+ glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC) load("glSecondaryColor3ubv", userptr);
+ glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC) load("glSecondaryColor3ui", userptr);
+ glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC) load("glSecondaryColor3uiv", userptr);
+ glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC) load("glSecondaryColor3us", userptr);
+ glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC) load("glSecondaryColor3usv", userptr);
+ glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC) load("glSecondaryColorPointer", userptr);
+ glWindowPos2d = (PFNGLWINDOWPOS2DPROC) load("glWindowPos2d", userptr);
+ glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC) load("glWindowPos2dv", userptr);
+ glWindowPos2f = (PFNGLWINDOWPOS2FPROC) load("glWindowPos2f", userptr);
+ glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC) load("glWindowPos2fv", userptr);
+ glWindowPos2i = (PFNGLWINDOWPOS2IPROC) load("glWindowPos2i", userptr);
+ glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC) load("glWindowPos2iv", userptr);
+ glWindowPos2s = (PFNGLWINDOWPOS2SPROC) load("glWindowPos2s", userptr);
+ glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC) load("glWindowPos2sv", userptr);
+ glWindowPos3d = (PFNGLWINDOWPOS3DPROC) load("glWindowPos3d", userptr);
+ glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC) load("glWindowPos3dv", userptr);
+ glWindowPos3f = (PFNGLWINDOWPOS3FPROC) load("glWindowPos3f", userptr);
+ glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC) load("glWindowPos3fv", userptr);
+ glWindowPos3i = (PFNGLWINDOWPOS3IPROC) load("glWindowPos3i", userptr);
+ glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC) load("glWindowPos3iv", userptr);
+ glWindowPos3s = (PFNGLWINDOWPOS3SPROC) load("glWindowPos3s", userptr);
+ glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC) load("glWindowPos3sv", userptr);
+}
+static void glad_gl_load_GL_VERSION_1_5( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_1_5) return;
+ glBeginQuery = (PFNGLBEGINQUERYPROC) load("glBeginQuery", userptr);
+ glBindBuffer = (PFNGLBINDBUFFERPROC) load("glBindBuffer", userptr);
+ glBufferData = (PFNGLBUFFERDATAPROC) load("glBufferData", userptr);
+ glBufferSubData = (PFNGLBUFFERSUBDATAPROC) load("glBufferSubData", userptr);
+ glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) load("glDeleteBuffers", userptr);
+ glDeleteQueries = (PFNGLDELETEQUERIESPROC) load("glDeleteQueries", userptr);
+ glEndQuery = (PFNGLENDQUERYPROC) load("glEndQuery", userptr);
+ glGenBuffers = (PFNGLGENBUFFERSPROC) load("glGenBuffers", userptr);
+ glGenQueries = (PFNGLGENQUERIESPROC) load("glGenQueries", userptr);
+ glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) load("glGetBufferParameteriv", userptr);
+ glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) load("glGetBufferPointerv", userptr);
+ glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) load("glGetBufferSubData", userptr);
+ glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) load("glGetQueryObjectiv", userptr);
+ glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) load("glGetQueryObjectuiv", userptr);
+ glGetQueryiv = (PFNGLGETQUERYIVPROC) load("glGetQueryiv", userptr);
+ glIsBuffer = (PFNGLISBUFFERPROC) load("glIsBuffer", userptr);
+ glIsQuery = (PFNGLISQUERYPROC) load("glIsQuery", userptr);
+ glMapBuffer = (PFNGLMAPBUFFERPROC) load("glMapBuffer", userptr);
+ glUnmapBuffer = (PFNGLUNMAPBUFFERPROC) load("glUnmapBuffer", userptr);
+}
+static void glad_gl_load_GL_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_2_0) return;
+ glAttachShader = (PFNGLATTACHSHADERPROC) load("glAttachShader", userptr);
+ glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) load("glBindAttribLocation", userptr);
+ glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) load("glBlendEquationSeparate", userptr);
+ glCompileShader = (PFNGLCOMPILESHADERPROC) load("glCompileShader", userptr);
+ glCreateProgram = (PFNGLCREATEPROGRAMPROC) load("glCreateProgram", userptr);
+ glCreateShader = (PFNGLCREATESHADERPROC) load("glCreateShader", userptr);
+ glDeleteProgram = (PFNGLDELETEPROGRAMPROC) load("glDeleteProgram", userptr);
+ glDeleteShader = (PFNGLDELETESHADERPROC) load("glDeleteShader", userptr);
+ glDetachShader = (PFNGLDETACHSHADERPROC) load("glDetachShader", userptr);
+ glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) load("glDisableVertexAttribArray", userptr);
+ glDrawBuffers = (PFNGLDRAWBUFFERSPROC) load("glDrawBuffers", userptr);
+ glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) load("glEnableVertexAttribArray", userptr);
+ glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) load("glGetActiveAttrib", userptr);
+ glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) load("glGetActiveUniform", userptr);
+ glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) load("glGetAttachedShaders", userptr);
+ glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) load("glGetAttribLocation", userptr);
+ glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) load("glGetProgramInfoLog", userptr);
+ glGetProgramiv = (PFNGLGETPROGRAMIVPROC) load("glGetProgramiv", userptr);
+ glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) load("glGetShaderInfoLog", userptr);
+ glGetShaderSource = (PFNGLGETSHADERSOURCEPROC) load("glGetShaderSource", userptr);
+ glGetShaderiv = (PFNGLGETSHADERIVPROC) load("glGetShaderiv", userptr);
+ glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) load("glGetUniformLocation", userptr);
+ glGetUniformfv = (PFNGLGETUNIFORMFVPROC) load("glGetUniformfv", userptr);
+ glGetUniformiv = (PFNGLGETUNIFORMIVPROC) load("glGetUniformiv", userptr);
+ glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) load("glGetVertexAttribPointerv", userptr);
+ glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) load("glGetVertexAttribdv", userptr);
+ glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) load("glGetVertexAttribfv", userptr);
+ glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) load("glGetVertexAttribiv", userptr);
+ glIsProgram = (PFNGLISPROGRAMPROC) load("glIsProgram", userptr);
+ glIsShader = (PFNGLISSHADERPROC) load("glIsShader", userptr);
+ glLinkProgram = (PFNGLLINKPROGRAMPROC) load("glLinkProgram", userptr);
+ glShaderSource = (PFNGLSHADERSOURCEPROC) load("glShaderSource", userptr);
+ glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) load("glStencilFuncSeparate", userptr);
+ glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) load("glStencilMaskSeparate", userptr);
+ glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) load("glStencilOpSeparate", userptr);
+ glUniform1f = (PFNGLUNIFORM1FPROC) load("glUniform1f", userptr);
+ glUniform1fv = (PFNGLUNIFORM1FVPROC) load("glUniform1fv", userptr);
+ glUniform1i = (PFNGLUNIFORM1IPROC) load("glUniform1i", userptr);
+ glUniform1iv = (PFNGLUNIFORM1IVPROC) load("glUniform1iv", userptr);
+ glUniform2f = (PFNGLUNIFORM2FPROC) load("glUniform2f", userptr);
+ glUniform2fv = (PFNGLUNIFORM2FVPROC) load("glUniform2fv", userptr);
+ glUniform2i = (PFNGLUNIFORM2IPROC) load("glUniform2i", userptr);
+ glUniform2iv = (PFNGLUNIFORM2IVPROC) load("glUniform2iv", userptr);
+ glUniform3f = (PFNGLUNIFORM3FPROC) load("glUniform3f", userptr);
+ glUniform3fv = (PFNGLUNIFORM3FVPROC) load("glUniform3fv", userptr);
+ glUniform3i = (PFNGLUNIFORM3IPROC) load("glUniform3i", userptr);
+ glUniform3iv = (PFNGLUNIFORM3IVPROC) load("glUniform3iv", userptr);
+ glUniform4f = (PFNGLUNIFORM4FPROC) load("glUniform4f", userptr);
+ glUniform4fv = (PFNGLUNIFORM4FVPROC) load("glUniform4fv", userptr);
+ glUniform4i = (PFNGLUNIFORM4IPROC) load("glUniform4i", userptr);
+ glUniform4iv = (PFNGLUNIFORM4IVPROC) load("glUniform4iv", userptr);
+ glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) load("glUniformMatrix2fv", userptr);
+ glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) load("glUniformMatrix3fv", userptr);
+ glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) load("glUniformMatrix4fv", userptr);
+ glUseProgram = (PFNGLUSEPROGRAMPROC) load("glUseProgram", userptr);
+ glValidateProgram = (PFNGLVALIDATEPROGRAMPROC) load("glValidateProgram", userptr);
+ glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) load("glVertexAttrib1d", userptr);
+ glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) load("glVertexAttrib1dv", userptr);
+ glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) load("glVertexAttrib1f", userptr);
+ glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) load("glVertexAttrib1fv", userptr);
+ glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) load("glVertexAttrib1s", userptr);
+ glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) load("glVertexAttrib1sv", userptr);
+ glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) load("glVertexAttrib2d", userptr);
+ glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) load("glVertexAttrib2dv", userptr);
+ glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) load("glVertexAttrib2f", userptr);
+ glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) load("glVertexAttrib2fv", userptr);
+ glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) load("glVertexAttrib2s", userptr);
+ glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) load("glVertexAttrib2sv", userptr);
+ glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) load("glVertexAttrib3d", userptr);
+ glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) load("glVertexAttrib3dv", userptr);
+ glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) load("glVertexAttrib3f", userptr);
+ glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) load("glVertexAttrib3fv", userptr);
+ glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) load("glVertexAttrib3s", userptr);
+ glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) load("glVertexAttrib3sv", userptr);
+ glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) load("glVertexAttrib4Nbv", userptr);
+ glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) load("glVertexAttrib4Niv", userptr);
+ glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) load("glVertexAttrib4Nsv", userptr);
+ glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) load("glVertexAttrib4Nub", userptr);
+ glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) load("glVertexAttrib4Nubv", userptr);
+ glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) load("glVertexAttrib4Nuiv", userptr);
+ glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) load("glVertexAttrib4Nusv", userptr);
+ glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) load("glVertexAttrib4bv", userptr);
+ glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) load("glVertexAttrib4d", userptr);
+ glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) load("glVertexAttrib4dv", userptr);
+ glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) load("glVertexAttrib4f", userptr);
+ glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) load("glVertexAttrib4fv", userptr);
+ glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) load("glVertexAttrib4iv", userptr);
+ glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) load("glVertexAttrib4s", userptr);
+ glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) load("glVertexAttrib4sv", userptr);
+ glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) load("glVertexAttrib4ubv", userptr);
+ glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) load("glVertexAttrib4uiv", userptr);
+ glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) load("glVertexAttrib4usv", userptr);
+ glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) load("glVertexAttribPointer", userptr);
+}
+static void glad_gl_load_GL_VERSION_2_1( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_2_1) return;
+ glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) load("glUniformMatrix2x3fv", userptr);
+ glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) load("glUniformMatrix2x4fv", userptr);
+ glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) load("glUniformMatrix3x2fv", userptr);
+ glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) load("glUniformMatrix3x4fv", userptr);
+ glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) load("glUniformMatrix4x2fv", userptr);
+ glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) load("glUniformMatrix4x3fv", userptr);
+}
+static void glad_gl_load_GL_VERSION_3_0( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_3_0) return;
+ glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC) load("glBeginConditionalRender", userptr);
+ glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) load("glBeginTransformFeedback", userptr);
+ glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load("glBindBufferBase", userptr);
+ glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load("glBindBufferRange", userptr);
+ glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC) load("glBindFragDataLocation", userptr);
+ glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) load("glBindFramebuffer", userptr);
+ glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) load("glBindRenderbuffer", userptr);
+ glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) load("glBindVertexArray", userptr);
+ glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) load("glBlitFramebuffer", userptr);
+ glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) load("glCheckFramebufferStatus", userptr);
+ glClampColor = (PFNGLCLAMPCOLORPROC) load("glClampColor", userptr);
+ glClearBufferfi = (PFNGLCLEARBUFFERFIPROC) load("glClearBufferfi", userptr);
+ glClearBufferfv = (PFNGLCLEARBUFFERFVPROC) load("glClearBufferfv", userptr);
+ glClearBufferiv = (PFNGLCLEARBUFFERIVPROC) load("glClearBufferiv", userptr);
+ glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) load("glClearBufferuiv", userptr);
+ glColorMaski = (PFNGLCOLORMASKIPROC) load("glColorMaski", userptr);
+ glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) load("glDeleteFramebuffers", userptr);
+ glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) load("glDeleteRenderbuffers", userptr);
+ glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) load("glDeleteVertexArrays", userptr);
+ glDisablei = (PFNGLDISABLEIPROC) load("glDisablei", userptr);
+ glEnablei = (PFNGLENABLEIPROC) load("glEnablei", userptr);
+ glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC) load("glEndConditionalRender", userptr);
+ glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) load("glEndTransformFeedback", userptr);
+ glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) load("glFlushMappedBufferRange", userptr);
+ glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) load("glFramebufferRenderbuffer", userptr);
+ glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) load("glFramebufferTexture1D", userptr);
+ glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) load("glFramebufferTexture2D", userptr);
+ glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) load("glFramebufferTexture3D", userptr);
+ glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) load("glFramebufferTextureLayer", userptr);
+ glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) load("glGenFramebuffers", userptr);
+ glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) load("glGenRenderbuffers", userptr);
+ glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) load("glGenVertexArrays", userptr);
+ glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) load("glGenerateMipmap", userptr);
+ glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC) load("glGetBooleani_v", userptr);
+ glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) load("glGetFragDataLocation", userptr);
+ glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load("glGetFramebufferAttachmentParameteriv", userptr);
+ glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load("glGetIntegeri_v", userptr);
+ glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) load("glGetRenderbufferParameteriv", userptr);
+ glGetStringi = (PFNGLGETSTRINGIPROC) load("glGetStringi", userptr);
+ glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) load("glGetTexParameterIiv", userptr);
+ glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) load("glGetTexParameterIuiv", userptr);
+ glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) load("glGetTransformFeedbackVarying", userptr);
+ glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC) load("glGetUniformuiv", userptr);
+ glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) load("glGetVertexAttribIiv", userptr);
+ glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) load("glGetVertexAttribIuiv", userptr);
+ glIsEnabledi = (PFNGLISENABLEDIPROC) load("glIsEnabledi", userptr);
+ glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) load("glIsFramebuffer", userptr);
+ glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) load("glIsRenderbuffer", userptr);
+ glIsVertexArray = (PFNGLISVERTEXARRAYPROC) load("glIsVertexArray", userptr);
+ glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) load("glMapBufferRange", userptr);
+ glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) load("glRenderbufferStorage", userptr);
+ glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) load("glRenderbufferStorageMultisample", userptr);
+ glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) load("glTexParameterIiv", userptr);
+ glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) load("glTexParameterIuiv", userptr);
+ glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) load("glTransformFeedbackVaryings", userptr);
+ glUniform1ui = (PFNGLUNIFORM1UIPROC) load("glUniform1ui", userptr);
+ glUniform1uiv = (PFNGLUNIFORM1UIVPROC) load("glUniform1uiv", userptr);
+ glUniform2ui = (PFNGLUNIFORM2UIPROC) load("glUniform2ui", userptr);
+ glUniform2uiv = (PFNGLUNIFORM2UIVPROC) load("glUniform2uiv", userptr);
+ glUniform3ui = (PFNGLUNIFORM3UIPROC) load("glUniform3ui", userptr);
+ glUniform3uiv = (PFNGLUNIFORM3UIVPROC) load("glUniform3uiv", userptr);
+ glUniform4ui = (PFNGLUNIFORM4UIPROC) load("glUniform4ui", userptr);
+ glUniform4uiv = (PFNGLUNIFORM4UIVPROC) load("glUniform4uiv", userptr);
+ glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC) load("glVertexAttribI1i", userptr);
+ glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC) load("glVertexAttribI1iv", userptr);
+ glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC) load("glVertexAttribI1ui", userptr);
+ glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC) load("glVertexAttribI1uiv", userptr);
+ glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC) load("glVertexAttribI2i", userptr);
+ glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC) load("glVertexAttribI2iv", userptr);
+ glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC) load("glVertexAttribI2ui", userptr);
+ glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC) load("glVertexAttribI2uiv", userptr);
+ glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC) load("glVertexAttribI3i", userptr);
+ glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC) load("glVertexAttribI3iv", userptr);
+ glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC) load("glVertexAttribI3ui", userptr);
+ glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC) load("glVertexAttribI3uiv", userptr);
+ glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC) load("glVertexAttribI4bv", userptr);
+ glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) load("glVertexAttribI4i", userptr);
+ glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) load("glVertexAttribI4iv", userptr);
+ glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC) load("glVertexAttribI4sv", userptr);
+ glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC) load("glVertexAttribI4ubv", userptr);
+ glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) load("glVertexAttribI4ui", userptr);
+ glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) load("glVertexAttribI4uiv", userptr);
+ glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC) load("glVertexAttribI4usv", userptr);
+ glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) load("glVertexAttribIPointer", userptr);
+}
+static void glad_gl_load_GL_VERSION_3_1( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_3_1) return;
+ glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load("glBindBufferBase", userptr);
+ glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load("glBindBufferRange", userptr);
+ glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) load("glCopyBufferSubData", userptr);
+ glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) load("glDrawArraysInstanced", userptr);
+ glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) load("glDrawElementsInstanced", userptr);
+ glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) load("glGetActiveUniformBlockName", userptr);
+ glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) load("glGetActiveUniformBlockiv", userptr);
+ glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC) load("glGetActiveUniformName", userptr);
+ glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) load("glGetActiveUniformsiv", userptr);
+ glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load("glGetIntegeri_v", userptr);
+ glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) load("glGetUniformBlockIndex", userptr);
+ glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) load("glGetUniformIndices", userptr);
+ glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC) load("glPrimitiveRestartIndex", userptr);
+ glTexBuffer = (PFNGLTEXBUFFERPROC) load("glTexBuffer", userptr);
+ glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) load("glUniformBlockBinding", userptr);
+}
+static void glad_gl_load_GL_VERSION_3_2( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_3_2) return;
+ glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) load("glClientWaitSync", userptr);
+ glDeleteSync = (PFNGLDELETESYNCPROC) load("glDeleteSync", userptr);
+ glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) load("glDrawElementsBaseVertex", userptr);
+ glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) load("glDrawElementsInstancedBaseVertex", userptr);
+ glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) load("glDrawRangeElementsBaseVertex", userptr);
+ glFenceSync = (PFNGLFENCESYNCPROC) load("glFenceSync", userptr);
+ glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) load("glFramebufferTexture", userptr);
+ glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) load("glGetBufferParameteri64v", userptr);
+ glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) load("glGetInteger64i_v", userptr);
+ glGetInteger64v = (PFNGLGETINTEGER64VPROC) load("glGetInteger64v", userptr);
+ glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) load("glGetMultisamplefv", userptr);
+ glGetSynciv = (PFNGLGETSYNCIVPROC) load("glGetSynciv", userptr);
+ glIsSync = (PFNGLISSYNCPROC) load("glIsSync", userptr);
+ glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) load("glMultiDrawElementsBaseVertex", userptr);
+ glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC) load("glProvokingVertex", userptr);
+ glSampleMaski = (PFNGLSAMPLEMASKIPROC) load("glSampleMaski", userptr);
+ glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) load("glTexImage2DMultisample", userptr);
+ glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) load("glTexImage3DMultisample", userptr);
+ glWaitSync = (PFNGLWAITSYNCPROC) load("glWaitSync", userptr);
+}
+static void glad_gl_load_GL_VERSION_3_3( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_VERSION_3_3) return;
+ glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) load("glBindFragDataLocationIndexed", userptr);
+ glBindSampler = (PFNGLBINDSAMPLERPROC) load("glBindSampler", userptr);
+ glColorP3ui = (PFNGLCOLORP3UIPROC) load("glColorP3ui", userptr);
+ glColorP3uiv = (PFNGLCOLORP3UIVPROC) load("glColorP3uiv", userptr);
+ glColorP4ui = (PFNGLCOLORP4UIPROC) load("glColorP4ui", userptr);
+ glColorP4uiv = (PFNGLCOLORP4UIVPROC) load("glColorP4uiv", userptr);
+ glDeleteSamplers = (PFNGLDELETESAMPLERSPROC) load("glDeleteSamplers", userptr);
+ glGenSamplers = (PFNGLGENSAMPLERSPROC) load("glGenSamplers", userptr);
+ glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC) load("glGetFragDataIndex", userptr);
+ glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) load("glGetQueryObjecti64v", userptr);
+ glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) load("glGetQueryObjectui64v", userptr);
+ glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) load("glGetSamplerParameterIiv", userptr);
+ glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) load("glGetSamplerParameterIuiv", userptr);
+ glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) load("glGetSamplerParameterfv", userptr);
+ glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) load("glGetSamplerParameteriv", userptr);
+ glIsSampler = (PFNGLISSAMPLERPROC) load("glIsSampler", userptr);
+ glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC) load("glMultiTexCoordP1ui", userptr);
+ glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC) load("glMultiTexCoordP1uiv", userptr);
+ glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC) load("glMultiTexCoordP2ui", userptr);
+ glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC) load("glMultiTexCoordP2uiv", userptr);
+ glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC) load("glMultiTexCoordP3ui", userptr);
+ glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC) load("glMultiTexCoordP3uiv", userptr);
+ glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC) load("glMultiTexCoordP4ui", userptr);
+ glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC) load("glMultiTexCoordP4uiv", userptr);
+ glNormalP3ui = (PFNGLNORMALP3UIPROC) load("glNormalP3ui", userptr);
+ glNormalP3uiv = (PFNGLNORMALP3UIVPROC) load("glNormalP3uiv", userptr);
+ glQueryCounter = (PFNGLQUERYCOUNTERPROC) load("glQueryCounter", userptr);
+ glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) load("glSamplerParameterIiv", userptr);
+ glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) load("glSamplerParameterIuiv", userptr);
+ glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) load("glSamplerParameterf", userptr);
+ glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) load("glSamplerParameterfv", userptr);
+ glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) load("glSamplerParameteri", userptr);
+ glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) load("glSamplerParameteriv", userptr);
+ glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC) load("glSecondaryColorP3ui", userptr);
+ glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC) load("glSecondaryColorP3uiv", userptr);
+ glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC) load("glTexCoordP1ui", userptr);
+ glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC) load("glTexCoordP1uiv", userptr);
+ glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC) load("glTexCoordP2ui", userptr);
+ glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC) load("glTexCoordP2uiv", userptr);
+ glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC) load("glTexCoordP3ui", userptr);
+ glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC) load("glTexCoordP3uiv", userptr);
+ glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC) load("glTexCoordP4ui", userptr);
+ glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC) load("glTexCoordP4uiv", userptr);
+ glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) load("glVertexAttribDivisor", userptr);
+ glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC) load("glVertexAttribP1ui", userptr);
+ glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC) load("glVertexAttribP1uiv", userptr);
+ glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC) load("glVertexAttribP2ui", userptr);
+ glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC) load("glVertexAttribP2uiv", userptr);
+ glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC) load("glVertexAttribP3ui", userptr);
+ glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC) load("glVertexAttribP3uiv", userptr);
+ glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC) load("glVertexAttribP4ui", userptr);
+ glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC) load("glVertexAttribP4uiv", userptr);
+ glVertexP2ui = (PFNGLVERTEXP2UIPROC) load("glVertexP2ui", userptr);
+ glVertexP2uiv = (PFNGLVERTEXP2UIVPROC) load("glVertexP2uiv", userptr);
+ glVertexP3ui = (PFNGLVERTEXP3UIPROC) load("glVertexP3ui", userptr);
+ glVertexP3uiv = (PFNGLVERTEXP3UIVPROC) load("glVertexP3uiv", userptr);
+ glVertexP4ui = (PFNGLVERTEXP4UIPROC) load("glVertexP4ui", userptr);
+ glVertexP4uiv = (PFNGLVERTEXP4UIVPROC) load("glVertexP4uiv", userptr);
+}
+static void glad_gl_load_GL_ARB_multisample( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_ARB_multisample) return;
+ glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load("glSampleCoverage", userptr);
+ glSampleCoverageARB = (PFNGLSAMPLECOVERAGEARBPROC) load("glSampleCoverageARB", userptr);
+}
+static void glad_gl_load_GL_ARB_robustness( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_ARB_robustness) return;
+ glGetGraphicsResetStatusARB = (PFNGLGETGRAPHICSRESETSTATUSARBPROC) load("glGetGraphicsResetStatusARB", userptr);
+ glGetnColorTableARB = (PFNGLGETNCOLORTABLEARBPROC) load("glGetnColorTableARB", userptr);
+ glGetnCompressedTexImageARB = (PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) load("glGetnCompressedTexImageARB", userptr);
+ glGetnConvolutionFilterARB = (PFNGLGETNCONVOLUTIONFILTERARBPROC) load("glGetnConvolutionFilterARB", userptr);
+ glGetnHistogramARB = (PFNGLGETNHISTOGRAMARBPROC) load("glGetnHistogramARB", userptr);
+ glGetnMapdvARB = (PFNGLGETNMAPDVARBPROC) load("glGetnMapdvARB", userptr);
+ glGetnMapfvARB = (PFNGLGETNMAPFVARBPROC) load("glGetnMapfvARB", userptr);
+ glGetnMapivARB = (PFNGLGETNMAPIVARBPROC) load("glGetnMapivARB", userptr);
+ glGetnMinmaxARB = (PFNGLGETNMINMAXARBPROC) load("glGetnMinmaxARB", userptr);
+ glGetnPixelMapfvARB = (PFNGLGETNPIXELMAPFVARBPROC) load("glGetnPixelMapfvARB", userptr);
+ glGetnPixelMapuivARB = (PFNGLGETNPIXELMAPUIVARBPROC) load("glGetnPixelMapuivARB", userptr);
+ glGetnPixelMapusvARB = (PFNGLGETNPIXELMAPUSVARBPROC) load("glGetnPixelMapusvARB", userptr);
+ glGetnPolygonStippleARB = (PFNGLGETNPOLYGONSTIPPLEARBPROC) load("glGetnPolygonStippleARB", userptr);
+ glGetnSeparableFilterARB = (PFNGLGETNSEPARABLEFILTERARBPROC) load("glGetnSeparableFilterARB", userptr);
+ glGetnTexImageARB = (PFNGLGETNTEXIMAGEARBPROC) load("glGetnTexImageARB", userptr);
+ glGetnUniformdvARB = (PFNGLGETNUNIFORMDVARBPROC) load("glGetnUniformdvARB", userptr);
+ glGetnUniformfvARB = (PFNGLGETNUNIFORMFVARBPROC) load("glGetnUniformfvARB", userptr);
+ glGetnUniformivARB = (PFNGLGETNUNIFORMIVARBPROC) load("glGetnUniformivARB", userptr);
+ glGetnUniformuivARB = (PFNGLGETNUNIFORMUIVARBPROC) load("glGetnUniformuivARB", userptr);
+ glReadnPixels = (PFNGLREADNPIXELSPROC) load("glReadnPixels", userptr);
+ glReadnPixelsARB = (PFNGLREADNPIXELSARBPROC) load("glReadnPixelsARB", userptr);
+}
+static void glad_gl_load_GL_KHR_debug( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_KHR_debug) return;
+ glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) load("glDebugMessageCallback", userptr);
+ glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) load("glDebugMessageControl", userptr);
+ glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) load("glDebugMessageInsert", userptr);
+ glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) load("glGetDebugMessageLog", userptr);
+ glGetObjectLabel = (PFNGLGETOBJECTLABELPROC) load("glGetObjectLabel", userptr);
+ glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) load("glGetObjectPtrLabel", userptr);
+ glGetPointerv = (PFNGLGETPOINTERVPROC) load("glGetPointerv", userptr);
+ glObjectLabel = (PFNGLOBJECTLABELPROC) load("glObjectLabel", userptr);
+ glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) load("glObjectPtrLabel", userptr);
+ glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) load("glPopDebugGroup", userptr);
+ glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) load("glPushDebugGroup", userptr);
+}
+
+
+
+#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
+#define GLAD_GL_IS_SOME_NEW_VERSION 1
+#else
+#define GLAD_GL_IS_SOME_NEW_VERSION 0
+#endif
+
+static int glad_gl_get_extensions( int version, const char **out_exts, unsigned int *out_num_exts_i, char ***out_exts_i) {
+#if GLAD_GL_IS_SOME_NEW_VERSION
+ if(GLAD_VERSION_MAJOR(version) < 3) {
+#else
+ (void) version;
+ (void) out_num_exts_i;
+ (void) out_exts_i;
+#endif
+ if (glGetString == NULL) {
+ return 0;
+ }
+ *out_exts = (const char *)glGetString(GL_EXTENSIONS);
+#if GLAD_GL_IS_SOME_NEW_VERSION
+ } else {
+ unsigned int index = 0;
+ unsigned int num_exts_i = 0;
+ char **exts_i = NULL;
+ if (glGetStringi == NULL || glGetIntegerv == NULL) {
+ return 0;
+ }
+ glGetIntegerv(GL_NUM_EXTENSIONS, (int*) &num_exts_i);
+ if (num_exts_i > 0) {
+ exts_i = (char **) malloc(num_exts_i * (sizeof *exts_i));
+ }
+ if (exts_i == NULL) {
+ return 0;
+ }
+ for(index = 0; index < num_exts_i; index++) {
+ const char *gl_str_tmp = (const char*) glGetStringi(GL_EXTENSIONS, index);
+ size_t len = strlen(gl_str_tmp) + 1;
+
+ char *local_str = (char*) malloc(len * sizeof(char));
+ if(local_str != NULL) {
+ memcpy(local_str, gl_str_tmp, len * sizeof(char));
+ }
+
+ exts_i[index] = local_str;
+ }
+
+ *out_num_exts_i = num_exts_i;
+ *out_exts_i = exts_i;
+ }
+#endif
+ return 1;
+}
+static void glad_gl_free_extensions(char **exts_i, unsigned int num_exts_i) {
+ if (exts_i != NULL) {
+ unsigned int index;
+ for(index = 0; index < num_exts_i; index++) {
+ free((void *) (exts_i[index]));
+ }
+ free((void *)exts_i);
+ exts_i = NULL;
+ }
+}
+static int glad_gl_has_extension(int version, const char *exts, unsigned int num_exts_i, char **exts_i, const char *ext) {
+ if(GLAD_VERSION_MAJOR(version) < 3 || !GLAD_GL_IS_SOME_NEW_VERSION) {
+ const char *extensions;
+ const char *loc;
+ const char *terminator;
+ extensions = exts;
+ if(extensions == NULL || ext == NULL) {
+ return 0;
+ }
+ while(1) {
+ loc = strstr(extensions, ext);
+ if(loc == NULL) {
+ return 0;
+ }
+ terminator = loc + strlen(ext);
+ if((loc == extensions || *(loc - 1) == ' ') &&
+ (*terminator == ' ' || *terminator == '\0')) {
+ return 1;
+ }
+ extensions = terminator;
+ }
+ } else {
+ unsigned int index;
+ for(index = 0; index < num_exts_i; index++) {
+ const char *e = exts_i[index];
+ if(strcmp(e, ext) == 0) {
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+static GLADapiproc glad_gl_get_proc_from_userptr(const char* name, void *userptr) {
+ return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
+}
+
+static int glad_gl_find_extensions_gl( int version) {
+ const char *exts = NULL;
+ unsigned int num_exts_i = 0;
+ char **exts_i = NULL;
+ if (!glad_gl_get_extensions(version, &exts, &num_exts_i, &exts_i)) return 0;
+
+ GLAD_GL_ARB_multisample = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_ARB_multisample");
+ GLAD_GL_ARB_robustness = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_ARB_robustness");
+ GLAD_GL_KHR_debug = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_debug");
+
+ glad_gl_free_extensions(exts_i, num_exts_i);
+
+ return 1;
+}
+
+static int glad_gl_find_core_gl(void) {
+ int i, major, minor;
+ const char* version;
+ const char* prefixes[] = {
+ "OpenGL ES-CM ",
+ "OpenGL ES-CL ",
+ "OpenGL ES ",
+ NULL
+ };
+ version = (const char*) glGetString(GL_VERSION);
+ if (!version) return 0;
+ for (i = 0; prefixes[i]; i++) {
+ const size_t length = strlen(prefixes[i]);
+ if (strncmp(version, prefixes[i], length) == 0) {
+ version += length;
+ break;
+ }
+ }
+
+ GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor);
+
+ GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
+ GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
+ GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
+ GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
+ GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
+ GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1;
+ GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;
+ GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2;
+ GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3;
+ GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3;
+ GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3;
+ GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3;
+
+ return GLAD_MAKE_VERSION(major, minor);
+}
+
+int gladLoadGLUserPtr( GLADuserptrloadfunc load, void *userptr) {
+ int version;
+
+ glGetString = (PFNGLGETSTRINGPROC) load("glGetString", userptr);
+ if(glGetString == NULL) return 0;
+ if(glGetString(GL_VERSION) == NULL) return 0;
+ version = glad_gl_find_core_gl();
+
+ glad_gl_load_GL_VERSION_1_0(load, userptr);
+ glad_gl_load_GL_VERSION_1_1(load, userptr);
+ glad_gl_load_GL_VERSION_1_2(load, userptr);
+ glad_gl_load_GL_VERSION_1_3(load, userptr);
+ glad_gl_load_GL_VERSION_1_4(load, userptr);
+ glad_gl_load_GL_VERSION_1_5(load, userptr);
+ glad_gl_load_GL_VERSION_2_0(load, userptr);
+ glad_gl_load_GL_VERSION_2_1(load, userptr);
+ glad_gl_load_GL_VERSION_3_0(load, userptr);
+ glad_gl_load_GL_VERSION_3_1(load, userptr);
+ glad_gl_load_GL_VERSION_3_2(load, userptr);
+ glad_gl_load_GL_VERSION_3_3(load, userptr);
+
+ if (!glad_gl_find_extensions_gl(version)) return 0;
+ glad_gl_load_GL_ARB_multisample(load, userptr);
+ glad_gl_load_GL_ARB_robustness(load, userptr);
+ glad_gl_load_GL_KHR_debug(load, userptr);
+
+
+
+ return version;
+}
+
+
+int gladLoadGL( GLADloadfunc load) {
+ return gladLoadGLUserPtr( glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
+}
+
+
+
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_vulkan.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_vulkan.c
new file mode 100644
index 0000000..5adfbbb
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad_vulkan.c
@@ -0,0 +1,593 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glad/vulkan.h>
+
+#ifndef GLAD_IMPL_UTIL_C_
+#define GLAD_IMPL_UTIL_C_
+
+#ifdef _MSC_VER
+#define GLAD_IMPL_UTIL_SSCANF sscanf_s
+#else
+#define GLAD_IMPL_UTIL_SSCANF sscanf
+#endif
+
+#endif /* GLAD_IMPL_UTIL_C_ */
+
+
+int GLAD_VK_VERSION_1_0 = 0;
+int GLAD_VK_VERSION_1_1 = 0;
+int GLAD_VK_EXT_debug_report = 0;
+int GLAD_VK_KHR_surface = 0;
+int GLAD_VK_KHR_swapchain = 0;
+
+
+
+PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR = NULL;
+PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR = NULL;
+PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers = NULL;
+PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets = NULL;
+PFN_vkAllocateMemory glad_vkAllocateMemory = NULL;
+PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer = NULL;
+PFN_vkBindBufferMemory glad_vkBindBufferMemory = NULL;
+PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2 = NULL;
+PFN_vkBindImageMemory glad_vkBindImageMemory = NULL;
+PFN_vkBindImageMemory2 glad_vkBindImageMemory2 = NULL;
+PFN_vkCmdBeginQuery glad_vkCmdBeginQuery = NULL;
+PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass = NULL;
+PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets = NULL;
+PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer = NULL;
+PFN_vkCmdBindPipeline glad_vkCmdBindPipeline = NULL;
+PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers = NULL;
+PFN_vkCmdBlitImage glad_vkCmdBlitImage = NULL;
+PFN_vkCmdClearAttachments glad_vkCmdClearAttachments = NULL;
+PFN_vkCmdClearColorImage glad_vkCmdClearColorImage = NULL;
+PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage = NULL;
+PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer = NULL;
+PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage = NULL;
+PFN_vkCmdCopyImage glad_vkCmdCopyImage = NULL;
+PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer = NULL;
+PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults = NULL;
+PFN_vkCmdDispatch glad_vkCmdDispatch = NULL;
+PFN_vkCmdDispatchBase glad_vkCmdDispatchBase = NULL;
+PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect = NULL;
+PFN_vkCmdDraw glad_vkCmdDraw = NULL;
+PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed = NULL;
+PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect = NULL;
+PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect = NULL;
+PFN_vkCmdEndQuery glad_vkCmdEndQuery = NULL;
+PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass = NULL;
+PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands = NULL;
+PFN_vkCmdFillBuffer glad_vkCmdFillBuffer = NULL;
+PFN_vkCmdNextSubpass glad_vkCmdNextSubpass = NULL;
+PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier = NULL;
+PFN_vkCmdPushConstants glad_vkCmdPushConstants = NULL;
+PFN_vkCmdResetEvent glad_vkCmdResetEvent = NULL;
+PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool = NULL;
+PFN_vkCmdResolveImage glad_vkCmdResolveImage = NULL;
+PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants = NULL;
+PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias = NULL;
+PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds = NULL;
+PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask = NULL;
+PFN_vkCmdSetEvent glad_vkCmdSetEvent = NULL;
+PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth = NULL;
+PFN_vkCmdSetScissor glad_vkCmdSetScissor = NULL;
+PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask = NULL;
+PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference = NULL;
+PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask = NULL;
+PFN_vkCmdSetViewport glad_vkCmdSetViewport = NULL;
+PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer = NULL;
+PFN_vkCmdWaitEvents glad_vkCmdWaitEvents = NULL;
+PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp = NULL;
+PFN_vkCreateBuffer glad_vkCreateBuffer = NULL;
+PFN_vkCreateBufferView glad_vkCreateBufferView = NULL;
+PFN_vkCreateCommandPool glad_vkCreateCommandPool = NULL;
+PFN_vkCreateComputePipelines glad_vkCreateComputePipelines = NULL;
+PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT = NULL;
+PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool = NULL;
+PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout = NULL;
+PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate = NULL;
+PFN_vkCreateDevice glad_vkCreateDevice = NULL;
+PFN_vkCreateEvent glad_vkCreateEvent = NULL;
+PFN_vkCreateFence glad_vkCreateFence = NULL;
+PFN_vkCreateFramebuffer glad_vkCreateFramebuffer = NULL;
+PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines = NULL;
+PFN_vkCreateImage glad_vkCreateImage = NULL;
+PFN_vkCreateImageView glad_vkCreateImageView = NULL;
+PFN_vkCreateInstance glad_vkCreateInstance = NULL;
+PFN_vkCreatePipelineCache glad_vkCreatePipelineCache = NULL;
+PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout = NULL;
+PFN_vkCreateQueryPool glad_vkCreateQueryPool = NULL;
+PFN_vkCreateRenderPass glad_vkCreateRenderPass = NULL;
+PFN_vkCreateSampler glad_vkCreateSampler = NULL;
+PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion = NULL;
+PFN_vkCreateSemaphore glad_vkCreateSemaphore = NULL;
+PFN_vkCreateShaderModule glad_vkCreateShaderModule = NULL;
+PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR = NULL;
+PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT = NULL;
+PFN_vkDestroyBuffer glad_vkDestroyBuffer = NULL;
+PFN_vkDestroyBufferView glad_vkDestroyBufferView = NULL;
+PFN_vkDestroyCommandPool glad_vkDestroyCommandPool = NULL;
+PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT = NULL;
+PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool = NULL;
+PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout = NULL;
+PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate = NULL;
+PFN_vkDestroyDevice glad_vkDestroyDevice = NULL;
+PFN_vkDestroyEvent glad_vkDestroyEvent = NULL;
+PFN_vkDestroyFence glad_vkDestroyFence = NULL;
+PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer = NULL;
+PFN_vkDestroyImage glad_vkDestroyImage = NULL;
+PFN_vkDestroyImageView glad_vkDestroyImageView = NULL;
+PFN_vkDestroyInstance glad_vkDestroyInstance = NULL;
+PFN_vkDestroyPipeline glad_vkDestroyPipeline = NULL;
+PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache = NULL;
+PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout = NULL;
+PFN_vkDestroyQueryPool glad_vkDestroyQueryPool = NULL;
+PFN_vkDestroyRenderPass glad_vkDestroyRenderPass = NULL;
+PFN_vkDestroySampler glad_vkDestroySampler = NULL;
+PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion = NULL;
+PFN_vkDestroySemaphore glad_vkDestroySemaphore = NULL;
+PFN_vkDestroyShaderModule glad_vkDestroyShaderModule = NULL;
+PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR = NULL;
+PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR = NULL;
+PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle = NULL;
+PFN_vkEndCommandBuffer glad_vkEndCommandBuffer = NULL;
+PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties = NULL;
+PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties = NULL;
+PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties = NULL;
+PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties = NULL;
+PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion = NULL;
+PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups = NULL;
+PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices = NULL;
+PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges = NULL;
+PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers = NULL;
+PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets = NULL;
+PFN_vkFreeMemory glad_vkFreeMemory = NULL;
+PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements = NULL;
+PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2 = NULL;
+PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport = NULL;
+PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures = NULL;
+PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR = NULL;
+PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR = NULL;
+PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment = NULL;
+PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr = NULL;
+PFN_vkGetDeviceQueue glad_vkGetDeviceQueue = NULL;
+PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2 = NULL;
+PFN_vkGetEventStatus glad_vkGetEventStatus = NULL;
+PFN_vkGetFenceStatus glad_vkGetFenceStatus = NULL;
+PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements = NULL;
+PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2 = NULL;
+PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements = NULL;
+PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2 = NULL;
+PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout = NULL;
+PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr = NULL;
+PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties = NULL;
+PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties = NULL;
+PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties = NULL;
+PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures = NULL;
+PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2 = NULL;
+PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties = NULL;
+PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2 = NULL;
+PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties = NULL;
+PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2 = NULL;
+PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties = NULL;
+PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 = NULL;
+PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR = NULL;
+PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties = NULL;
+PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2 = NULL;
+PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties = NULL;
+PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2 = NULL;
+PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties = NULL;
+PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2 = NULL;
+PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = NULL;
+PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR = NULL;
+PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR = NULL;
+PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR = NULL;
+PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData = NULL;
+PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults = NULL;
+PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity = NULL;
+PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR = NULL;
+PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges = NULL;
+PFN_vkMapMemory glad_vkMapMemory = NULL;
+PFN_vkMergePipelineCaches glad_vkMergePipelineCaches = NULL;
+PFN_vkQueueBindSparse glad_vkQueueBindSparse = NULL;
+PFN_vkQueuePresentKHR glad_vkQueuePresentKHR = NULL;
+PFN_vkQueueSubmit glad_vkQueueSubmit = NULL;
+PFN_vkQueueWaitIdle glad_vkQueueWaitIdle = NULL;
+PFN_vkResetCommandBuffer glad_vkResetCommandBuffer = NULL;
+PFN_vkResetCommandPool glad_vkResetCommandPool = NULL;
+PFN_vkResetDescriptorPool glad_vkResetDescriptorPool = NULL;
+PFN_vkResetEvent glad_vkResetEvent = NULL;
+PFN_vkResetFences glad_vkResetFences = NULL;
+PFN_vkSetEvent glad_vkSetEvent = NULL;
+PFN_vkTrimCommandPool glad_vkTrimCommandPool = NULL;
+PFN_vkUnmapMemory glad_vkUnmapMemory = NULL;
+PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate = NULL;
+PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets = NULL;
+PFN_vkWaitForFences glad_vkWaitForFences = NULL;
+
+
+static void glad_vk_load_VK_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_VK_VERSION_1_0) return;
+ vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) load("vkAllocateCommandBuffers", userptr);
+ vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) load("vkAllocateDescriptorSets", userptr);
+ vkAllocateMemory = (PFN_vkAllocateMemory) load("vkAllocateMemory", userptr);
+ vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer) load("vkBeginCommandBuffer", userptr);
+ vkBindBufferMemory = (PFN_vkBindBufferMemory) load("vkBindBufferMemory", userptr);
+ vkBindImageMemory = (PFN_vkBindImageMemory) load("vkBindImageMemory", userptr);
+ vkCmdBeginQuery = (PFN_vkCmdBeginQuery) load("vkCmdBeginQuery", userptr);
+ vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) load("vkCmdBeginRenderPass", userptr);
+ vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) load("vkCmdBindDescriptorSets", userptr);
+ vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) load("vkCmdBindIndexBuffer", userptr);
+ vkCmdBindPipeline = (PFN_vkCmdBindPipeline) load("vkCmdBindPipeline", userptr);
+ vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) load("vkCmdBindVertexBuffers", userptr);
+ vkCmdBlitImage = (PFN_vkCmdBlitImage) load("vkCmdBlitImage", userptr);
+ vkCmdClearAttachments = (PFN_vkCmdClearAttachments) load("vkCmdClearAttachments", userptr);
+ vkCmdClearColorImage = (PFN_vkCmdClearColorImage) load("vkCmdClearColorImage", userptr);
+ vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) load("vkCmdClearDepthStencilImage", userptr);
+ vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer) load("vkCmdCopyBuffer", userptr);
+ vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) load("vkCmdCopyBufferToImage", userptr);
+ vkCmdCopyImage = (PFN_vkCmdCopyImage) load("vkCmdCopyImage", userptr);
+ vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) load("vkCmdCopyImageToBuffer", userptr);
+ vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) load("vkCmdCopyQueryPoolResults", userptr);
+ vkCmdDispatch = (PFN_vkCmdDispatch) load("vkCmdDispatch", userptr);
+ vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) load("vkCmdDispatchIndirect", userptr);
+ vkCmdDraw = (PFN_vkCmdDraw) load("vkCmdDraw", userptr);
+ vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed) load("vkCmdDrawIndexed", userptr);
+ vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) load("vkCmdDrawIndexedIndirect", userptr);
+ vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect) load("vkCmdDrawIndirect", userptr);
+ vkCmdEndQuery = (PFN_vkCmdEndQuery) load("vkCmdEndQuery", userptr);
+ vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass) load("vkCmdEndRenderPass", userptr);
+ vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands) load("vkCmdExecuteCommands", userptr);
+ vkCmdFillBuffer = (PFN_vkCmdFillBuffer) load("vkCmdFillBuffer", userptr);
+ vkCmdNextSubpass = (PFN_vkCmdNextSubpass) load("vkCmdNextSubpass", userptr);
+ vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) load("vkCmdPipelineBarrier", userptr);
+ vkCmdPushConstants = (PFN_vkCmdPushConstants) load("vkCmdPushConstants", userptr);
+ vkCmdResetEvent = (PFN_vkCmdResetEvent) load("vkCmdResetEvent", userptr);
+ vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool) load("vkCmdResetQueryPool", userptr);
+ vkCmdResolveImage = (PFN_vkCmdResolveImage) load("vkCmdResolveImage", userptr);
+ vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) load("vkCmdSetBlendConstants", userptr);
+ vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias) load("vkCmdSetDepthBias", userptr);
+ vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) load("vkCmdSetDepthBounds", userptr);
+ vkCmdSetEvent = (PFN_vkCmdSetEvent) load("vkCmdSetEvent", userptr);
+ vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth) load("vkCmdSetLineWidth", userptr);
+ vkCmdSetScissor = (PFN_vkCmdSetScissor) load("vkCmdSetScissor", userptr);
+ vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) load("vkCmdSetStencilCompareMask", userptr);
+ vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference) load("vkCmdSetStencilReference", userptr);
+ vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) load("vkCmdSetStencilWriteMask", userptr);
+ vkCmdSetViewport = (PFN_vkCmdSetViewport) load("vkCmdSetViewport", userptr);
+ vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) load("vkCmdUpdateBuffer", userptr);
+ vkCmdWaitEvents = (PFN_vkCmdWaitEvents) load("vkCmdWaitEvents", userptr);
+ vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) load("vkCmdWriteTimestamp", userptr);
+ vkCreateBuffer = (PFN_vkCreateBuffer) load("vkCreateBuffer", userptr);
+ vkCreateBufferView = (PFN_vkCreateBufferView) load("vkCreateBufferView", userptr);
+ vkCreateCommandPool = (PFN_vkCreateCommandPool) load("vkCreateCommandPool", userptr);
+ vkCreateComputePipelines = (PFN_vkCreateComputePipelines) load("vkCreateComputePipelines", userptr);
+ vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool) load("vkCreateDescriptorPool", userptr);
+ vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) load("vkCreateDescriptorSetLayout", userptr);
+ vkCreateDevice = (PFN_vkCreateDevice) load("vkCreateDevice", userptr);
+ vkCreateEvent = (PFN_vkCreateEvent) load("vkCreateEvent", userptr);
+ vkCreateFence = (PFN_vkCreateFence) load("vkCreateFence", userptr);
+ vkCreateFramebuffer = (PFN_vkCreateFramebuffer) load("vkCreateFramebuffer", userptr);
+ vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) load("vkCreateGraphicsPipelines", userptr);
+ vkCreateImage = (PFN_vkCreateImage) load("vkCreateImage", userptr);
+ vkCreateImageView = (PFN_vkCreateImageView) load("vkCreateImageView", userptr);
+ vkCreateInstance = (PFN_vkCreateInstance) load("vkCreateInstance", userptr);
+ vkCreatePipelineCache = (PFN_vkCreatePipelineCache) load("vkCreatePipelineCache", userptr);
+ vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout) load("vkCreatePipelineLayout", userptr);
+ vkCreateQueryPool = (PFN_vkCreateQueryPool) load("vkCreateQueryPool", userptr);
+ vkCreateRenderPass = (PFN_vkCreateRenderPass) load("vkCreateRenderPass", userptr);
+ vkCreateSampler = (PFN_vkCreateSampler) load("vkCreateSampler", userptr);
+ vkCreateSemaphore = (PFN_vkCreateSemaphore) load("vkCreateSemaphore", userptr);
+ vkCreateShaderModule = (PFN_vkCreateShaderModule) load("vkCreateShaderModule", userptr);
+ vkDestroyBuffer = (PFN_vkDestroyBuffer) load("vkDestroyBuffer", userptr);
+ vkDestroyBufferView = (PFN_vkDestroyBufferView) load("vkDestroyBufferView", userptr);
+ vkDestroyCommandPool = (PFN_vkDestroyCommandPool) load("vkDestroyCommandPool", userptr);
+ vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) load("vkDestroyDescriptorPool", userptr);
+ vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) load("vkDestroyDescriptorSetLayout", userptr);
+ vkDestroyDevice = (PFN_vkDestroyDevice) load("vkDestroyDevice", userptr);
+ vkDestroyEvent = (PFN_vkDestroyEvent) load("vkDestroyEvent", userptr);
+ vkDestroyFence = (PFN_vkDestroyFence) load("vkDestroyFence", userptr);
+ vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer) load("vkDestroyFramebuffer", userptr);
+ vkDestroyImage = (PFN_vkDestroyImage) load("vkDestroyImage", userptr);
+ vkDestroyImageView = (PFN_vkDestroyImageView) load("vkDestroyImageView", userptr);
+ vkDestroyInstance = (PFN_vkDestroyInstance) load("vkDestroyInstance", userptr);
+ vkDestroyPipeline = (PFN_vkDestroyPipeline) load("vkDestroyPipeline", userptr);
+ vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache) load("vkDestroyPipelineCache", userptr);
+ vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) load("vkDestroyPipelineLayout", userptr);
+ vkDestroyQueryPool = (PFN_vkDestroyQueryPool) load("vkDestroyQueryPool", userptr);
+ vkDestroyRenderPass = (PFN_vkDestroyRenderPass) load("vkDestroyRenderPass", userptr);
+ vkDestroySampler = (PFN_vkDestroySampler) load("vkDestroySampler", userptr);
+ vkDestroySemaphore = (PFN_vkDestroySemaphore) load("vkDestroySemaphore", userptr);
+ vkDestroyShaderModule = (PFN_vkDestroyShaderModule) load("vkDestroyShaderModule", userptr);
+ vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle) load("vkDeviceWaitIdle", userptr);
+ vkEndCommandBuffer = (PFN_vkEndCommandBuffer) load("vkEndCommandBuffer", userptr);
+ vkEnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) load("vkEnumerateDeviceExtensionProperties", userptr);
+ vkEnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) load("vkEnumerateDeviceLayerProperties", userptr);
+ vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) load("vkEnumerateInstanceExtensionProperties", userptr);
+ vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties) load("vkEnumerateInstanceLayerProperties", userptr);
+ vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) load("vkEnumeratePhysicalDevices", userptr);
+ vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) load("vkFlushMappedMemoryRanges", userptr);
+ vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers) load("vkFreeCommandBuffers", userptr);
+ vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets) load("vkFreeDescriptorSets", userptr);
+ vkFreeMemory = (PFN_vkFreeMemory) load("vkFreeMemory", userptr);
+ vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) load("vkGetBufferMemoryRequirements", userptr);
+ vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) load("vkGetDeviceMemoryCommitment", userptr);
+ vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr) load("vkGetDeviceProcAddr", userptr);
+ vkGetDeviceQueue = (PFN_vkGetDeviceQueue) load("vkGetDeviceQueue", userptr);
+ vkGetEventStatus = (PFN_vkGetEventStatus) load("vkGetEventStatus", userptr);
+ vkGetFenceStatus = (PFN_vkGetFenceStatus) load("vkGetFenceStatus", userptr);
+ vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) load("vkGetImageMemoryRequirements", userptr);
+ vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) load("vkGetImageSparseMemoryRequirements", userptr);
+ vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) load("vkGetImageSubresourceLayout", userptr);
+ vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) load("vkGetInstanceProcAddr", userptr);
+ vkGetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) load("vkGetPhysicalDeviceFeatures", userptr);
+ vkGetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) load("vkGetPhysicalDeviceFormatProperties", userptr);
+ vkGetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) load("vkGetPhysicalDeviceImageFormatProperties", userptr);
+ vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) load("vkGetPhysicalDeviceMemoryProperties", userptr);
+ vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) load("vkGetPhysicalDeviceProperties", userptr);
+ vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) load("vkGetPhysicalDeviceQueueFamilyProperties", userptr);
+ vkGetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) load("vkGetPhysicalDeviceSparseImageFormatProperties", userptr);
+ vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData) load("vkGetPipelineCacheData", userptr);
+ vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults) load("vkGetQueryPoolResults", userptr);
+ vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) load("vkGetRenderAreaGranularity", userptr);
+ vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) load("vkInvalidateMappedMemoryRanges", userptr);
+ vkMapMemory = (PFN_vkMapMemory) load("vkMapMemory", userptr);
+ vkMergePipelineCaches = (PFN_vkMergePipelineCaches) load("vkMergePipelineCaches", userptr);
+ vkQueueBindSparse = (PFN_vkQueueBindSparse) load("vkQueueBindSparse", userptr);
+ vkQueueSubmit = (PFN_vkQueueSubmit) load("vkQueueSubmit", userptr);
+ vkQueueWaitIdle = (PFN_vkQueueWaitIdle) load("vkQueueWaitIdle", userptr);
+ vkResetCommandBuffer = (PFN_vkResetCommandBuffer) load("vkResetCommandBuffer", userptr);
+ vkResetCommandPool = (PFN_vkResetCommandPool) load("vkResetCommandPool", userptr);
+ vkResetDescriptorPool = (PFN_vkResetDescriptorPool) load("vkResetDescriptorPool", userptr);
+ vkResetEvent = (PFN_vkResetEvent) load("vkResetEvent", userptr);
+ vkResetFences = (PFN_vkResetFences) load("vkResetFences", userptr);
+ vkSetEvent = (PFN_vkSetEvent) load("vkSetEvent", userptr);
+ vkUnmapMemory = (PFN_vkUnmapMemory) load("vkUnmapMemory", userptr);
+ vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) load("vkUpdateDescriptorSets", userptr);
+ vkWaitForFences = (PFN_vkWaitForFences) load("vkWaitForFences", userptr);
+}
+static void glad_vk_load_VK_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_VK_VERSION_1_1) return;
+ vkBindBufferMemory2 = (PFN_vkBindBufferMemory2) load("vkBindBufferMemory2", userptr);
+ vkBindImageMemory2 = (PFN_vkBindImageMemory2) load("vkBindImageMemory2", userptr);
+ vkCmdDispatchBase = (PFN_vkCmdDispatchBase) load("vkCmdDispatchBase", userptr);
+ vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) load("vkCmdSetDeviceMask", userptr);
+ vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) load("vkCreateDescriptorUpdateTemplate", userptr);
+ vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) load("vkCreateSamplerYcbcrConversion", userptr);
+ vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) load("vkDestroyDescriptorUpdateTemplate", userptr);
+ vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) load("vkDestroySamplerYcbcrConversion", userptr);
+ vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion) load("vkEnumerateInstanceVersion", userptr);
+ vkEnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) load("vkEnumeratePhysicalDeviceGroups", userptr);
+ vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) load("vkGetBufferMemoryRequirements2", userptr);
+ vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) load("vkGetDescriptorSetLayoutSupport", userptr);
+ vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) load("vkGetDeviceGroupPeerMemoryFeatures", userptr);
+ vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2) load("vkGetDeviceQueue2", userptr);
+ vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) load("vkGetImageMemoryRequirements2", userptr);
+ vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) load("vkGetImageSparseMemoryRequirements2", userptr);
+ vkGetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) load("vkGetPhysicalDeviceExternalBufferProperties", userptr);
+ vkGetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) load("vkGetPhysicalDeviceExternalFenceProperties", userptr);
+ vkGetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) load("vkGetPhysicalDeviceExternalSemaphoreProperties", userptr);
+ vkGetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) load("vkGetPhysicalDeviceFeatures2", userptr);
+ vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) load("vkGetPhysicalDeviceFormatProperties2", userptr);
+ vkGetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) load("vkGetPhysicalDeviceImageFormatProperties2", userptr);
+ vkGetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) load("vkGetPhysicalDeviceMemoryProperties2", userptr);
+ vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) load("vkGetPhysicalDeviceProperties2", userptr);
+ vkGetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) load("vkGetPhysicalDeviceQueueFamilyProperties2", userptr);
+ vkGetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) load("vkGetPhysicalDeviceSparseImageFormatProperties2", userptr);
+ vkTrimCommandPool = (PFN_vkTrimCommandPool) load("vkTrimCommandPool", userptr);
+ vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) load("vkUpdateDescriptorSetWithTemplate", userptr);
+}
+static void glad_vk_load_VK_EXT_debug_report( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_VK_EXT_debug_report) return;
+ vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) load("vkCreateDebugReportCallbackEXT", userptr);
+ vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) load("vkDebugReportMessageEXT", userptr);
+ vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) load("vkDestroyDebugReportCallbackEXT", userptr);
+}
+static void glad_vk_load_VK_KHR_surface( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_VK_KHR_surface) return;
+ vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) load("vkDestroySurfaceKHR", userptr);
+ vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) load("vkGetPhysicalDeviceSurfaceCapabilitiesKHR", userptr);
+ vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) load("vkGetPhysicalDeviceSurfaceFormatsKHR", userptr);
+ vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) load("vkGetPhysicalDeviceSurfacePresentModesKHR", userptr);
+ vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) load("vkGetPhysicalDeviceSurfaceSupportKHR", userptr);
+}
+static void glad_vk_load_VK_KHR_swapchain( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_VK_KHR_swapchain) return;
+ vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) load("vkAcquireNextImage2KHR", userptr);
+ vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) load("vkAcquireNextImageKHR", userptr);
+ vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) load("vkCreateSwapchainKHR", userptr);
+ vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) load("vkDestroySwapchainKHR", userptr);
+ vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) load("vkGetDeviceGroupPresentCapabilitiesKHR", userptr);
+ vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) load("vkGetDeviceGroupSurfacePresentModesKHR", userptr);
+ vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) load("vkGetPhysicalDevicePresentRectanglesKHR", userptr);
+ vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) load("vkGetSwapchainImagesKHR", userptr);
+ vkQueuePresentKHR = (PFN_vkQueuePresentKHR) load("vkQueuePresentKHR", userptr);
+}
+
+
+
+static int glad_vk_get_extensions( VkPhysicalDevice physical_device, uint32_t *out_extension_count, char ***out_extensions) {
+ uint32_t i;
+ uint32_t instance_extension_count = 0;
+ uint32_t device_extension_count = 0;
+ uint32_t max_extension_count;
+ uint32_t total_extension_count;
+ char **extensions;
+ VkExtensionProperties *ext_properties;
+ VkResult result;
+
+ if (vkEnumerateInstanceExtensionProperties == NULL || (physical_device != NULL && vkEnumerateDeviceExtensionProperties == NULL)) {
+ return 0;
+ }
+
+ result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, NULL);
+ if (result != VK_SUCCESS) {
+ return 0;
+ }
+
+ if (physical_device != NULL) {
+ result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, NULL);
+ if (result != VK_SUCCESS) {
+ return 0;
+ }
+ }
+
+ total_extension_count = instance_extension_count + device_extension_count;
+ max_extension_count = instance_extension_count > device_extension_count
+ ? instance_extension_count : device_extension_count;
+
+ ext_properties = (VkExtensionProperties*) malloc(max_extension_count * sizeof(VkExtensionProperties));
+ if (ext_properties == NULL) {
+ return 0;
+ }
+
+ result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, ext_properties);
+ if (result != VK_SUCCESS) {
+ free((void*) ext_properties);
+ return 0;
+ }
+
+ extensions = (char**) calloc(total_extension_count, sizeof(char*));
+ if (extensions == NULL) {
+ free((void*) ext_properties);
+ return 0;
+ }
+
+ for (i = 0; i < instance_extension_count; ++i) {
+ VkExtensionProperties ext = ext_properties[i];
+
+ size_t extension_name_length = strlen(ext.extensionName) + 1;
+ extensions[i] = (char*) malloc(extension_name_length * sizeof(char));
+ memcpy(extensions[i], ext.extensionName, extension_name_length * sizeof(char));
+ }
+
+ if (physical_device != NULL) {
+ result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, ext_properties);
+ if (result != VK_SUCCESS) {
+ for (i = 0; i < instance_extension_count; ++i) {
+ free((void*) extensions[i]);
+ }
+ free(extensions);
+ return 0;
+ }
+
+ for (i = 0; i < device_extension_count; ++i) {
+ VkExtensionProperties ext = ext_properties[i];
+
+ size_t extension_name_length = strlen(ext.extensionName) + 1;
+ extensions[instance_extension_count + i] = (char*) malloc(extension_name_length * sizeof(char));
+ memcpy(extensions[instance_extension_count + i], ext.extensionName, extension_name_length * sizeof(char));
+ }
+ }
+
+ free((void*) ext_properties);
+
+ *out_extension_count = total_extension_count;
+ *out_extensions = extensions;
+
+ return 1;
+}
+
+static void glad_vk_free_extensions(uint32_t extension_count, char **extensions) {
+ uint32_t i;
+
+ for(i = 0; i < extension_count ; ++i) {
+ free((void*) (extensions[i]));
+ }
+
+ free((void*) extensions);
+}
+
+static int glad_vk_has_extension(const char *name, uint32_t extension_count, char **extensions) {
+ uint32_t i;
+
+ for (i = 0; i < extension_count; ++i) {
+ if(strcmp(name, extensions[i]) == 0) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static GLADapiproc glad_vk_get_proc_from_userptr(const char* name, void *userptr) {
+ return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
+}
+
+static int glad_vk_find_extensions_vulkan( VkPhysicalDevice physical_device) {
+ uint32_t extension_count = 0;
+ char **extensions = NULL;
+ if (!glad_vk_get_extensions(physical_device, &extension_count, &extensions)) return 0;
+
+ GLAD_VK_EXT_debug_report = glad_vk_has_extension("VK_EXT_debug_report", extension_count, extensions);
+ GLAD_VK_KHR_surface = glad_vk_has_extension("VK_KHR_surface", extension_count, extensions);
+ GLAD_VK_KHR_swapchain = glad_vk_has_extension("VK_KHR_swapchain", extension_count, extensions);
+
+ glad_vk_free_extensions(extension_count, extensions);
+
+ return 1;
+}
+
+static int glad_vk_find_core_vulkan( VkPhysicalDevice physical_device) {
+ int major = 1;
+ int minor = 0;
+
+#ifdef VK_VERSION_1_1
+ if (vkEnumerateInstanceVersion != NULL) {
+ uint32_t version;
+ VkResult result;
+
+ result = vkEnumerateInstanceVersion(&version);
+ if (result == VK_SUCCESS) {
+ major = (int) VK_VERSION_MAJOR(version);
+ minor = (int) VK_VERSION_MINOR(version);
+ }
+ }
+#endif
+
+ if (physical_device != NULL && vkGetPhysicalDeviceProperties != NULL) {
+ VkPhysicalDeviceProperties properties;
+ vkGetPhysicalDeviceProperties(physical_device, &properties);
+
+ major = (int) VK_VERSION_MAJOR(properties.apiVersion);
+ minor = (int) VK_VERSION_MINOR(properties.apiVersion);
+ }
+
+ GLAD_VK_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
+ GLAD_VK_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
+
+ return GLAD_MAKE_VERSION(major, minor);
+}
+
+int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr) {
+ int version;
+
+#ifdef VK_VERSION_1_1
+ vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion) load("vkEnumerateInstanceVersion", userptr);
+#endif
+ version = glad_vk_find_core_vulkan( physical_device);
+ if (!version) {
+ return 0;
+ }
+
+ glad_vk_load_VK_VERSION_1_0(load, userptr);
+ glad_vk_load_VK_VERSION_1_1(load, userptr);
+
+ if (!glad_vk_find_extensions_vulkan( physical_device)) return 0;
+ glad_vk_load_VK_EXT_debug_report(load, userptr);
+ glad_vk_load_VK_KHR_surface(load, userptr);
+ glad_vk_load_VK_KHR_swapchain(load, userptr);
+
+
+ return version;
+}
+
+
+int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load) {
+ return gladLoadVulkanUserPtr( physical_device, glad_vk_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
+}
+
+
+
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/linmath.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/linmath.h
new file mode 100644
index 0000000..0ab7a41
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/linmath.h
@@ -0,0 +1,574 @@
+#ifndef LINMATH_H
+#define LINMATH_H
+
+#include <math.h>
+
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
+#define LINMATH_H_DEFINE_VEC(n) \
+typedef float vec##n[n]; \
+static inline void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \
+{ \
+ int i; \
+ for(i=0; i<n; ++i) \
+ r[i] = a[i] + b[i]; \
+} \
+static inline void vec##n##_sub(vec##n r, vec##n const a, vec##n const b) \
+{ \
+ int i; \
+ for(i=0; i<n; ++i) \
+ r[i] = a[i] - b[i]; \
+} \
+static inline void vec##n##_scale(vec##n r, vec##n const v, float const s) \
+{ \
+ int i; \
+ for(i=0; i<n; ++i) \
+ r[i] = v[i] * s; \
+} \
+static inline float vec##n##_mul_inner(vec##n const a, vec##n const b) \
+{ \
+ float p = 0.; \
+ int i; \
+ for(i=0; i<n; ++i) \
+ p += b[i]*a[i]; \
+ return p; \
+} \
+static inline float vec##n##_len(vec##n const v) \
+{ \
+ return (float) sqrt(vec##n##_mul_inner(v,v)); \
+} \
+static inline void vec##n##_norm(vec##n r, vec##n const v) \
+{ \
+ float k = 1.f / vec##n##_len(v); \
+ vec##n##_scale(r, v, k); \
+}
+
+LINMATH_H_DEFINE_VEC(2)
+LINMATH_H_DEFINE_VEC(3)
+LINMATH_H_DEFINE_VEC(4)
+
+static inline void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b)
+{
+ r[0] = a[1]*b[2] - a[2]*b[1];
+ r[1] = a[2]*b[0] - a[0]*b[2];
+ r[2] = a[0]*b[1] - a[1]*b[0];
+}
+
+static inline void vec3_reflect(vec3 r, vec3 const v, vec3 const n)
+{
+ float p = 2.f*vec3_mul_inner(v, n);
+ int i;
+ for(i=0;i<3;++i)
+ r[i] = v[i] - p*n[i];
+}
+
+static inline void vec4_mul_cross(vec4 r, vec4 a, vec4 b)
+{
+ r[0] = a[1]*b[2] - a[2]*b[1];
+ r[1] = a[2]*b[0] - a[0]*b[2];
+ r[2] = a[0]*b[1] - a[1]*b[0];
+ r[3] = 1.f;
+}
+
+static inline void vec4_reflect(vec4 r, vec4 v, vec4 n)
+{
+ float p = 2.f*vec4_mul_inner(v, n);
+ int i;
+ for(i=0;i<4;++i)
+ r[i] = v[i] - p*n[i];
+}
+
+typedef vec4 mat4x4[4];
+static inline void mat4x4_identity(mat4x4 M)
+{
+ int i, j;
+ for(i=0; i<4; ++i)
+ for(j=0; j<4; ++j)
+ M[i][j] = i==j ? 1.f : 0.f;
+}
+static inline void mat4x4_dup(mat4x4 M, mat4x4 N)
+{
+ int i, j;
+ for(i=0; i<4; ++i)
+ for(j=0; j<4; ++j)
+ M[i][j] = N[i][j];
+}
+static inline void mat4x4_row(vec4 r, mat4x4 M, int i)
+{
+ int k;
+ for(k=0; k<4; ++k)
+ r[k] = M[k][i];
+}
+static inline void mat4x4_col(vec4 r, mat4x4 M, int i)
+{
+ int k;
+ for(k=0; k<4; ++k)
+ r[k] = M[i][k];
+}
+static inline void mat4x4_transpose(mat4x4 M, mat4x4 N)
+{
+ int i, j;
+ for(j=0; j<4; ++j)
+ for(i=0; i<4; ++i)
+ M[i][j] = N[j][i];
+}
+static inline void mat4x4_add(mat4x4 M, mat4x4 a, mat4x4 b)
+{
+ int i;
+ for(i=0; i<4; ++i)
+ vec4_add(M[i], a[i], b[i]);
+}
+static inline void mat4x4_sub(mat4x4 M, mat4x4 a, mat4x4 b)
+{
+ int i;
+ for(i=0; i<4; ++i)
+ vec4_sub(M[i], a[i], b[i]);
+}
+static inline void mat4x4_scale(mat4x4 M, mat4x4 a, float k)
+{
+ int i;
+ for(i=0; i<4; ++i)
+ vec4_scale(M[i], a[i], k);
+}
+static inline void mat4x4_scale_aniso(mat4x4 M, mat4x4 a, float x, float y, float z)
+{
+ int i;
+ vec4_scale(M[0], a[0], x);
+ vec4_scale(M[1], a[1], y);
+ vec4_scale(M[2], a[2], z);
+ for(i = 0; i < 4; ++i) {
+ M[3][i] = a[3][i];
+ }
+}
+static inline void mat4x4_mul(mat4x4 M, mat4x4 a, mat4x4 b)
+{
+ mat4x4 temp;
+ int k, r, c;
+ for(c=0; c<4; ++c) for(r=0; r<4; ++r) {
+ temp[c][r] = 0.f;
+ for(k=0; k<4; ++k)
+ temp[c][r] += a[k][r] * b[c][k];
+ }
+ mat4x4_dup(M, temp);
+}
+static inline void mat4x4_mul_vec4(vec4 r, mat4x4 M, vec4 v)
+{
+ int i, j;
+ for(j=0; j<4; ++j) {
+ r[j] = 0.f;
+ for(i=0; i<4; ++i)
+ r[j] += M[i][j] * v[i];
+ }
+}
+static inline void mat4x4_translate(mat4x4 T, float x, float y, float z)
+{
+ mat4x4_identity(T);
+ T[3][0] = x;
+ T[3][1] = y;
+ T[3][2] = z;
+}
+static inline void mat4x4_translate_in_place(mat4x4 M, float x, float y, float z)
+{
+ vec4 t = {x, y, z, 0};
+ vec4 r;
+ int i;
+ for (i = 0; i < 4; ++i) {
+ mat4x4_row(r, M, i);
+ M[3][i] += vec4_mul_inner(r, t);
+ }
+}
+static inline void mat4x4_from_vec3_mul_outer(mat4x4 M, vec3 a, vec3 b)
+{
+ int i, j;
+ for(i=0; i<4; ++i) for(j=0; j<4; ++j)
+ M[i][j] = i<3 && j<3 ? a[i] * b[j] : 0.f;
+}
+static inline void mat4x4_rotate(mat4x4 R, mat4x4 M, float x, float y, float z, float angle)
+{
+ float s = sinf(angle);
+ float c = cosf(angle);
+ vec3 u = {x, y, z};
+
+ if(vec3_len(u) > 1e-4) {
+ mat4x4 T, C, S = {{0}};
+
+ vec3_norm(u, u);
+ mat4x4_from_vec3_mul_outer(T, u, u);
+
+ S[1][2] = u[0];
+ S[2][1] = -u[0];
+ S[2][0] = u[1];
+ S[0][2] = -u[1];
+ S[0][1] = u[2];
+ S[1][0] = -u[2];
+
+ mat4x4_scale(S, S, s);
+
+ mat4x4_identity(C);
+ mat4x4_sub(C, C, T);
+
+ mat4x4_scale(C, C, c);
+
+ mat4x4_add(T, T, C);
+ mat4x4_add(T, T, S);
+
+ T[3][3] = 1.;
+ mat4x4_mul(R, M, T);
+ } else {
+ mat4x4_dup(R, M);
+ }
+}
+static inline void mat4x4_rotate_X(mat4x4 Q, mat4x4 M, float angle)
+{
+ float s = sinf(angle);
+ float c = cosf(angle);
+ mat4x4 R = {
+ {1.f, 0.f, 0.f, 0.f},
+ {0.f, c, s, 0.f},
+ {0.f, -s, c, 0.f},
+ {0.f, 0.f, 0.f, 1.f}
+ };
+ mat4x4_mul(Q, M, R);
+}
+static inline void mat4x4_rotate_Y(mat4x4 Q, mat4x4 M, float angle)
+{
+ float s = sinf(angle);
+ float c = cosf(angle);
+ mat4x4 R = {
+ { c, 0.f, -s, 0.f},
+ { 0.f, 1.f, 0.f, 0.f},
+ { s, 0.f, c, 0.f},
+ { 0.f, 0.f, 0.f, 1.f}
+ };
+ mat4x4_mul(Q, M, R);
+}
+static inline void mat4x4_rotate_Z(mat4x4 Q, mat4x4 M, float angle)
+{
+ float s = sinf(angle);
+ float c = cosf(angle);
+ mat4x4 R = {
+ { c, s, 0.f, 0.f},
+ { -s, c, 0.f, 0.f},
+ { 0.f, 0.f, 1.f, 0.f},
+ { 0.f, 0.f, 0.f, 1.f}
+ };
+ mat4x4_mul(Q, M, R);
+}
+static inline void mat4x4_invert(mat4x4 T, mat4x4 M)
+{
+ float idet;
+ float s[6];
+ float c[6];
+ s[0] = M[0][0]*M[1][1] - M[1][0]*M[0][1];
+ s[1] = M[0][0]*M[1][2] - M[1][0]*M[0][2];
+ s[2] = M[0][0]*M[1][3] - M[1][0]*M[0][3];
+ s[3] = M[0][1]*M[1][2] - M[1][1]*M[0][2];
+ s[4] = M[0][1]*M[1][3] - M[1][1]*M[0][3];
+ s[5] = M[0][2]*M[1][3] - M[1][2]*M[0][3];
+
+ c[0] = M[2][0]*M[3][1] - M[3][0]*M[2][1];
+ c[1] = M[2][0]*M[3][2] - M[3][0]*M[2][2];
+ c[2] = M[2][0]*M[3][3] - M[3][0]*M[2][3];
+ c[3] = M[2][1]*M[3][2] - M[3][1]*M[2][2];
+ c[4] = M[2][1]*M[3][3] - M[3][1]*M[2][3];
+ c[5] = M[2][2]*M[3][3] - M[3][2]*M[2][3];
+
+ /* Assumes it is invertible */
+ idet = 1.0f/( s[0]*c[5]-s[1]*c[4]+s[2]*c[3]+s[3]*c[2]-s[4]*c[1]+s[5]*c[0] );
+
+ T[0][0] = ( M[1][1] * c[5] - M[1][2] * c[4] + M[1][3] * c[3]) * idet;
+ T[0][1] = (-M[0][1] * c[5] + M[0][2] * c[4] - M[0][3] * c[3]) * idet;
+ T[0][2] = ( M[3][1] * s[5] - M[3][2] * s[4] + M[3][3] * s[3]) * idet;
+ T[0][3] = (-M[2][1] * s[5] + M[2][2] * s[4] - M[2][3] * s[3]) * idet;
+
+ T[1][0] = (-M[1][0] * c[5] + M[1][2] * c[2] - M[1][3] * c[1]) * idet;
+ T[1][1] = ( M[0][0] * c[5] - M[0][2] * c[2] + M[0][3] * c[1]) * idet;
+ T[1][2] = (-M[3][0] * s[5] + M[3][2] * s[2] - M[3][3] * s[1]) * idet;
+ T[1][3] = ( M[2][0] * s[5] - M[2][2] * s[2] + M[2][3] * s[1]) * idet;
+
+ T[2][0] = ( M[1][0] * c[4] - M[1][1] * c[2] + M[1][3] * c[0]) * idet;
+ T[2][1] = (-M[0][0] * c[4] + M[0][1] * c[2] - M[0][3] * c[0]) * idet;
+ T[2][2] = ( M[3][0] * s[4] - M[3][1] * s[2] + M[3][3] * s[0]) * idet;
+ T[2][3] = (-M[2][0] * s[4] + M[2][1] * s[2] - M[2][3] * s[0]) * idet;
+
+ T[3][0] = (-M[1][0] * c[3] + M[1][1] * c[1] - M[1][2] * c[0]) * idet;
+ T[3][1] = ( M[0][0] * c[3] - M[0][1] * c[1] + M[0][2] * c[0]) * idet;
+ T[3][2] = (-M[3][0] * s[3] + M[3][1] * s[1] - M[3][2] * s[0]) * idet;
+ T[3][3] = ( M[2][0] * s[3] - M[2][1] * s[1] + M[2][2] * s[0]) * idet;
+}
+static inline void mat4x4_orthonormalize(mat4x4 R, mat4x4 M)
+{
+ float s = 1.;
+ vec3 h;
+
+ mat4x4_dup(R, M);
+ vec3_norm(R[2], R[2]);
+
+ s = vec3_mul_inner(R[1], R[2]);
+ vec3_scale(h, R[2], s);
+ vec3_sub(R[1], R[1], h);
+ vec3_norm(R[2], R[2]);
+
+ s = vec3_mul_inner(R[1], R[2]);
+ vec3_scale(h, R[2], s);
+ vec3_sub(R[1], R[1], h);
+ vec3_norm(R[1], R[1]);
+
+ s = vec3_mul_inner(R[0], R[1]);
+ vec3_scale(h, R[1], s);
+ vec3_sub(R[0], R[0], h);
+ vec3_norm(R[0], R[0]);
+}
+
+static inline void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f)
+{
+ M[0][0] = 2.f*n/(r-l);
+ M[0][1] = M[0][2] = M[0][3] = 0.f;
+
+ M[1][1] = 2.f*n/(t-b);
+ M[1][0] = M[1][2] = M[1][3] = 0.f;
+
+ M[2][0] = (r+l)/(r-l);
+ M[2][1] = (t+b)/(t-b);
+ M[2][2] = -(f+n)/(f-n);
+ M[2][3] = -1.f;
+
+ M[3][2] = -2.f*(f*n)/(f-n);
+ M[3][0] = M[3][1] = M[3][3] = 0.f;
+}
+static inline void mat4x4_ortho(mat4x4 M, float l, float r, float b, float t, float n, float f)
+{
+ M[0][0] = 2.f/(r-l);
+ M[0][1] = M[0][2] = M[0][3] = 0.f;
+
+ M[1][1] = 2.f/(t-b);
+ M[1][0] = M[1][2] = M[1][3] = 0.f;
+
+ M[2][2] = -2.f/(f-n);
+ M[2][0] = M[2][1] = M[2][3] = 0.f;
+
+ M[3][0] = -(r+l)/(r-l);
+ M[3][1] = -(t+b)/(t-b);
+ M[3][2] = -(f+n)/(f-n);
+ M[3][3] = 1.f;
+}
+static inline void mat4x4_perspective(mat4x4 m, float y_fov, float aspect, float n, float f)
+{
+ /* NOTE: Degrees are an unhandy unit to work with.
+ * linmath.h uses radians for everything! */
+ float const a = 1.f / (float) tan(y_fov / 2.f);
+
+ m[0][0] = a / aspect;
+ m[0][1] = 0.f;
+ m[0][2] = 0.f;
+ m[0][3] = 0.f;
+
+ m[1][0] = 0.f;
+ m[1][1] = a;
+ m[1][2] = 0.f;
+ m[1][3] = 0.f;
+
+ m[2][0] = 0.f;
+ m[2][1] = 0.f;
+ m[2][2] = -((f + n) / (f - n));
+ m[2][3] = -1.f;
+
+ m[3][0] = 0.f;
+ m[3][1] = 0.f;
+ m[3][2] = -((2.f * f * n) / (f - n));
+ m[3][3] = 0.f;
+}
+static inline void mat4x4_look_at(mat4x4 m, vec3 eye, vec3 center, vec3 up)
+{
+ /* Adapted from Android's OpenGL Matrix.java. */
+ /* See the OpenGL GLUT documentation for gluLookAt for a description */
+ /* of the algorithm. We implement it in a straightforward way: */
+
+ /* TODO: The negation of of can be spared by swapping the order of
+ * operands in the following cross products in the right way. */
+ vec3 f;
+ vec3 s;
+ vec3 t;
+
+ vec3_sub(f, center, eye);
+ vec3_norm(f, f);
+
+ vec3_mul_cross(s, f, up);
+ vec3_norm(s, s);
+
+ vec3_mul_cross(t, s, f);
+
+ m[0][0] = s[0];
+ m[0][1] = t[0];
+ m[0][2] = -f[0];
+ m[0][3] = 0.f;
+
+ m[1][0] = s[1];
+ m[1][1] = t[1];
+ m[1][2] = -f[1];
+ m[1][3] = 0.f;
+
+ m[2][0] = s[2];
+ m[2][1] = t[2];
+ m[2][2] = -f[2];
+ m[2][3] = 0.f;
+
+ m[3][0] = 0.f;
+ m[3][1] = 0.f;
+ m[3][2] = 0.f;
+ m[3][3] = 1.f;
+
+ mat4x4_translate_in_place(m, -eye[0], -eye[1], -eye[2]);
+}
+
+typedef float quat[4];
+static inline void quat_identity(quat q)
+{
+ q[0] = q[1] = q[2] = 0.f;
+ q[3] = 1.f;
+}
+static inline void quat_add(quat r, quat a, quat b)
+{
+ int i;
+ for(i=0; i<4; ++i)
+ r[i] = a[i] + b[i];
+}
+static inline void quat_sub(quat r, quat a, quat b)
+{
+ int i;
+ for(i=0; i<4; ++i)
+ r[i] = a[i] - b[i];
+}
+static inline void quat_mul(quat r, quat p, quat q)
+{
+ vec3 w;
+ vec3_mul_cross(r, p, q);
+ vec3_scale(w, p, q[3]);
+ vec3_add(r, r, w);
+ vec3_scale(w, q, p[3]);
+ vec3_add(r, r, w);
+ r[3] = p[3]*q[3] - vec3_mul_inner(p, q);
+}
+static inline void quat_scale(quat r, quat v, float s)
+{
+ int i;
+ for(i=0; i<4; ++i)
+ r[i] = v[i] * s;
+}
+static inline float quat_inner_product(quat a, quat b)
+{
+ float p = 0.f;
+ int i;
+ for(i=0; i<4; ++i)
+ p += b[i]*a[i];
+ return p;
+}
+static inline void quat_conj(quat r, quat q)
+{
+ int i;
+ for(i=0; i<3; ++i)
+ r[i] = -q[i];
+ r[3] = q[3];
+}
+static inline void quat_rotate(quat r, float angle, vec3 axis) {
+ int i;
+ vec3 v;
+ vec3_scale(v, axis, sinf(angle / 2));
+ for(i=0; i<3; ++i)
+ r[i] = v[i];
+ r[3] = cosf(angle / 2);
+}
+#define quat_norm vec4_norm
+static inline void quat_mul_vec3(vec3 r, quat q, vec3 v)
+{
+/*
+ * Method by Fabian 'ryg' Giessen (of Farbrausch)
+t = 2 * cross(q.xyz, v)
+v' = v + q.w * t + cross(q.xyz, t)
+ */
+ vec3 t = {q[0], q[1], q[2]};
+ vec3 u = {q[0], q[1], q[2]};
+
+ vec3_mul_cross(t, t, v);
+ vec3_scale(t, t, 2);
+
+ vec3_mul_cross(u, u, t);
+ vec3_scale(t, t, q[3]);
+
+ vec3_add(r, v, t);
+ vec3_add(r, r, u);
+}
+static inline void mat4x4_from_quat(mat4x4 M, quat q)
+{
+ float a = q[3];
+ float b = q[0];
+ float c = q[1];
+ float d = q[2];
+ float a2 = a*a;
+ float b2 = b*b;
+ float c2 = c*c;
+ float d2 = d*d;
+
+ M[0][0] = a2 + b2 - c2 - d2;
+ M[0][1] = 2.f*(b*c + a*d);
+ M[0][2] = 2.f*(b*d - a*c);
+ M[0][3] = 0.f;
+
+ M[1][0] = 2*(b*c - a*d);
+ M[1][1] = a2 - b2 + c2 - d2;
+ M[1][2] = 2.f*(c*d + a*b);
+ M[1][3] = 0.f;
+
+ M[2][0] = 2.f*(b*d + a*c);
+ M[2][1] = 2.f*(c*d - a*b);
+ M[2][2] = a2 - b2 - c2 + d2;
+ M[2][3] = 0.f;
+
+ M[3][0] = M[3][1] = M[3][2] = 0.f;
+ M[3][3] = 1.f;
+}
+
+static inline void mat4x4o_mul_quat(mat4x4 R, mat4x4 M, quat q)
+{
+/* XXX: The way this is written only works for othogonal matrices. */
+/* TODO: Take care of non-orthogonal case. */
+ quat_mul_vec3(R[0], q, M[0]);
+ quat_mul_vec3(R[1], q, M[1]);
+ quat_mul_vec3(R[2], q, M[2]);
+
+ R[3][0] = R[3][1] = R[3][2] = 0.f;
+ R[3][3] = 1.f;
+}
+static inline void quat_from_mat4x4(quat q, mat4x4 M)
+{
+ float r=0.f;
+ int i;
+
+ int perm[] = { 0, 1, 2, 0, 1 };
+ int *p = perm;
+
+ for(i = 0; i<3; i++) {
+ float m = M[i][i];
+ if( m < r )
+ continue;
+ m = r;
+ p = &perm[i];
+ }
+
+ r = (float) sqrt(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] );
+
+ if(r < 1e-6) {
+ q[0] = 1.f;
+ q[1] = q[2] = q[3] = 0.f;
+ return;
+ }
+
+ q[0] = r/2.f;
+ q[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r);
+ q[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r);
+ q[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r);
+}
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/_mingw_dxhelper.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/_mingw_dxhelper.h
new file mode 100644
index 0000000..849e291
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/_mingw_dxhelper.h
@@ -0,0 +1,117 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
+#define NONAMELESSUNION 1
+#endif
+#if defined(NONAMELESSSTRUCT) && \
+ !defined(NONAMELESSUNION)
+#define NONAMELESSUNION 1
+#endif
+#if defined(NONAMELESSUNION) && \
+ !defined(NONAMELESSSTRUCT)
+#define NONAMELESSSTRUCT 1
+#endif
+#if !defined(__GNU_EXTENSION)
+#if defined(__GNUC__) || defined(__GNUG__)
+#define __GNU_EXTENSION __extension__
+#else
+#define __GNU_EXTENSION
+#endif
+#endif /* __extension__ */
+
+#ifndef __ANONYMOUS_DEFINED
+#define __ANONYMOUS_DEFINED
+#if defined(__GNUC__) || defined(__GNUG__)
+#define _ANONYMOUS_UNION __extension__
+#define _ANONYMOUS_STRUCT __extension__
+#else
+#define _ANONYMOUS_UNION
+#define _ANONYMOUS_STRUCT
+#endif
+#ifndef NONAMELESSUNION
+#define _UNION_NAME(x)
+#define _STRUCT_NAME(x)
+#else /* NONAMELESSUNION */
+#define _UNION_NAME(x) x
+#define _STRUCT_NAME(x) x
+#endif
+#endif /* __ANONYMOUS_DEFINED */
+
+#ifndef DUMMYUNIONNAME
+# ifdef NONAMELESSUNION
+# define DUMMYUNIONNAME u
+# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
+# define DUMMYUNIONNAME2 u2
+# define DUMMYUNIONNAME3 u3
+# define DUMMYUNIONNAME4 u4
+# define DUMMYUNIONNAME5 u5
+# define DUMMYUNIONNAME6 u6
+# define DUMMYUNIONNAME7 u7
+# define DUMMYUNIONNAME8 u8
+# define DUMMYUNIONNAME9 u9
+# else /* NONAMELESSUNION */
+# define DUMMYUNIONNAME
+# define DUMMYUNIONNAME1 /* Wine uses this variant */
+# define DUMMYUNIONNAME2
+# define DUMMYUNIONNAME3
+# define DUMMYUNIONNAME4
+# define DUMMYUNIONNAME5
+# define DUMMYUNIONNAME6
+# define DUMMYUNIONNAME7
+# define DUMMYUNIONNAME8
+# define DUMMYUNIONNAME9
+# endif
+#endif /* DUMMYUNIONNAME */
+
+#if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */
+# ifdef NONAMELESSUNION
+# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
+# else
+# define DUMMYUNIONNAME1 /* Wine uses this variant */
+# endif
+#endif /* DUMMYUNIONNAME1 */
+
+#ifndef DUMMYSTRUCTNAME
+# ifdef NONAMELESSUNION
+# define DUMMYSTRUCTNAME s
+# define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */
+# define DUMMYSTRUCTNAME2 s2
+# define DUMMYSTRUCTNAME3 s3
+# define DUMMYSTRUCTNAME4 s4
+# define DUMMYSTRUCTNAME5 s5
+# else
+# define DUMMYSTRUCTNAME
+# define DUMMYSTRUCTNAME1 /* Wine uses this variant */
+# define DUMMYSTRUCTNAME2
+# define DUMMYSTRUCTNAME3
+# define DUMMYSTRUCTNAME4
+# define DUMMYSTRUCTNAME5
+# endif
+#endif /* DUMMYSTRUCTNAME */
+
+/* These are for compatibility with the Wine source tree */
+
+#ifndef WINELIB_NAME_AW
+# ifdef __MINGW_NAME_AW
+# define WINELIB_NAME_AW __MINGW_NAME_AW
+# else
+# ifdef UNICODE
+# define WINELIB_NAME_AW(func) func##W
+# else
+# define WINELIB_NAME_AW(func) func##A
+# endif
+# endif
+#endif /* WINELIB_NAME_AW */
+
+#ifndef DECL_WINELIB_TYPE_AW
+# ifdef __MINGW_TYPEDEF_AW
+# define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW
+# else
+# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
+# endif
+#endif /* DECL_WINELIB_TYPE_AW */
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dinput.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dinput.h
new file mode 100644
index 0000000..b575480
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dinput.h
@@ -0,0 +1,2467 @@
+/*
+ * Copyright (C) the Wine project
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __DINPUT_INCLUDED__
+#define __DINPUT_INCLUDED__
+
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#include <_mingw_dxhelper.h>
+
+#ifndef DIRECTINPUT_VERSION
+#define DIRECTINPUT_VERSION 0x0800
+#endif
+
+/* Classes */
+DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(CLSID_DirectInputDevice8, 0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+/* Interfaces */
+DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
+DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
+DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice2A, 0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice2W, 0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice7A, 0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInputDevice7W, 0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInputDevice8A, 0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
+DEFINE_GUID(IID_IDirectInputDevice8W, 0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
+DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+
+/* Predefined object types */
+DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+/* Predefined product GUIDs */
+DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboard, 0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Joystick, 0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouseEm2, 0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+/* predefined forcefeedback effects */
+DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+
+typedef struct IDirectInputA *LPDIRECTINPUTA;
+typedef struct IDirectInputW *LPDIRECTINPUTW;
+typedef struct IDirectInput2A *LPDIRECTINPUT2A;
+typedef struct IDirectInput2W *LPDIRECTINPUT2W;
+typedef struct IDirectInput7A *LPDIRECTINPUT7A;
+typedef struct IDirectInput7W *LPDIRECTINPUT7W;
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct IDirectInput8A *LPDIRECTINPUT8A;
+typedef struct IDirectInput8W *LPDIRECTINPUT8W;
+#endif /* DI8 */
+typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
+typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
+#if DIRECTINPUT_VERSION >= 0x0500
+typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
+typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
+#endif /* DI5 */
+#if DIRECTINPUT_VERSION >= 0x0700
+typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
+typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
+#endif /* DI7 */
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
+typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
+#endif /* DI8 */
+#if DIRECTINPUT_VERSION >= 0x0500
+typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
+#endif /* DI5 */
+typedef struct SysKeyboardA *LPSYSKEYBOARDA;
+typedef struct SysMouseA *LPSYSMOUSEA;
+
+#define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
+#define IDirectInput WINELIB_NAME_AW(IDirectInput)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
+#define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
+#define IDirectInput2 WINELIB_NAME_AW(IDirectInput2)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)
+#define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
+#define IDirectInput7 WINELIB_NAME_AW(IDirectInput7)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
+#if DIRECTINPUT_VERSION >= 0x0800
+#define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8)
+#define IDirectInput8 WINELIB_NAME_AW(IDirectInput8)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT8)
+#endif /* DI8 */
+#define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
+#define IDirectInputDevice WINELIB_NAME_AW(IDirectInputDevice)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
+#if DIRECTINPUT_VERSION >= 0x0500
+#define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
+#define IDirectInputDevice2 WINELIB_NAME_AW(IDirectInputDevice2)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
+#endif /* DI5 */
+#if DIRECTINPUT_VERSION >= 0x0700
+#define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
+#define IDirectInputDevice7 WINELIB_NAME_AW(IDirectInputDevice7)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)
+#endif /* DI7 */
+#if DIRECTINPUT_VERSION >= 0x0800
+#define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
+#define IDirectInputDevice8 WINELIB_NAME_AW(IDirectInputDevice8)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
+#endif /* DI8 */
+
+#define DI_OK S_OK
+#define DI_NOTATTACHED S_FALSE
+#define DI_BUFFEROVERFLOW S_FALSE
+#define DI_PROPNOEFFECT S_FALSE
+#define DI_NOEFFECT S_FALSE
+#define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
+#define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
+#define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
+#define DI_TRUNCATED ((HRESULT)0x00000008L)
+#define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000BL)
+#define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
+#define DI_WRITEPROTECT ((HRESULT)0x00000013L)
+
+#define DIERR_OLDDIRECTINPUTVERSION \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
+#define DIERR_BETADIRECTINPUTVERSION \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
+#define DIERR_BADDRIVERVER \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
+#define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
+#define DIERR_NOTFOUND \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
+#define DIERR_OBJECTNOTFOUND \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
+#define DIERR_INVALIDPARAM E_INVALIDARG
+#define DIERR_NOINTERFACE E_NOINTERFACE
+#define DIERR_GENERIC E_FAIL
+#define DIERR_OUTOFMEMORY E_OUTOFMEMORY
+#define DIERR_UNSUPPORTED E_NOTIMPL
+#define DIERR_NOTINITIALIZED \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
+#define DIERR_ALREADYINITIALIZED \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
+#define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
+#define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
+#define DIERR_INPUTLOST \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
+#define DIERR_ACQUIRED \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
+#define DIERR_NOTACQUIRED \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
+#define DIERR_READONLY E_ACCESSDENIED
+#define DIERR_HANDLEEXISTS E_ACCESSDENIED
+#ifndef E_PENDING
+#define E_PENDING 0x8000000AL
+#endif
+#define DIERR_INSUFFICIENTPRIVS 0x80040200L
+#define DIERR_DEVICEFULL 0x80040201L
+#define DIERR_MOREDATA 0x80040202L
+#define DIERR_NOTDOWNLOADED 0x80040203L
+#define DIERR_HASEFFECTS 0x80040204L
+#define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
+#define DIERR_INCOMPLETEEFFECT 0x80040206L
+#define DIERR_NOTBUFFERED 0x80040207L
+#define DIERR_EFFECTPLAYING 0x80040208L
+#define DIERR_UNPLUGGED 0x80040209L
+#define DIERR_REPORTFULL 0x8004020AL
+#define DIERR_MAPFILEFAIL 0x8004020BL
+
+#define DIENUM_STOP 0
+#define DIENUM_CONTINUE 1
+
+#define DIEDFL_ALLDEVICES 0x00000000
+#define DIEDFL_ATTACHEDONLY 0x00000001
+#define DIEDFL_FORCEFEEDBACK 0x00000100
+#define DIEDFL_INCLUDEALIASES 0x00010000
+#define DIEDFL_INCLUDEPHANTOMS 0x00020000
+#define DIEDFL_INCLUDEHIDDEN 0x00040000
+
+#define DIDEVTYPE_DEVICE 1
+#define DIDEVTYPE_MOUSE 2
+#define DIDEVTYPE_KEYBOARD 3
+#define DIDEVTYPE_JOYSTICK 4
+#define DIDEVTYPE_HID 0x00010000
+
+#define DI8DEVCLASS_ALL 0
+#define DI8DEVCLASS_DEVICE 1
+#define DI8DEVCLASS_POINTER 2
+#define DI8DEVCLASS_KEYBOARD 3
+#define DI8DEVCLASS_GAMECTRL 4
+
+#define DI8DEVTYPE_DEVICE 0x11
+#define DI8DEVTYPE_MOUSE 0x12
+#define DI8DEVTYPE_KEYBOARD 0x13
+#define DI8DEVTYPE_JOYSTICK 0x14
+#define DI8DEVTYPE_GAMEPAD 0x15
+#define DI8DEVTYPE_DRIVING 0x16
+#define DI8DEVTYPE_FLIGHT 0x17
+#define DI8DEVTYPE_1STPERSON 0x18
+#define DI8DEVTYPE_DEVICECTRL 0x19
+#define DI8DEVTYPE_SCREENPOINTER 0x1A
+#define DI8DEVTYPE_REMOTE 0x1B
+#define DI8DEVTYPE_SUPPLEMENTAL 0x1C
+
+#define DIDEVTYPEMOUSE_UNKNOWN 1
+#define DIDEVTYPEMOUSE_TRADITIONAL 2
+#define DIDEVTYPEMOUSE_FINGERSTICK 3
+#define DIDEVTYPEMOUSE_TOUCHPAD 4
+#define DIDEVTYPEMOUSE_TRACKBALL 5
+
+#define DIDEVTYPEKEYBOARD_UNKNOWN 0
+#define DIDEVTYPEKEYBOARD_PCXT 1
+#define DIDEVTYPEKEYBOARD_OLIVETTI 2
+#define DIDEVTYPEKEYBOARD_PCAT 3
+#define DIDEVTYPEKEYBOARD_PCENH 4
+#define DIDEVTYPEKEYBOARD_NOKIA1050 5
+#define DIDEVTYPEKEYBOARD_NOKIA9140 6
+#define DIDEVTYPEKEYBOARD_NEC98 7
+#define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
+#define DIDEVTYPEKEYBOARD_NEC98106 9
+#define DIDEVTYPEKEYBOARD_JAPAN106 10
+#define DIDEVTYPEKEYBOARD_JAPANAX 11
+#define DIDEVTYPEKEYBOARD_J3100 12
+
+#define DIDEVTYPEJOYSTICK_UNKNOWN 1
+#define DIDEVTYPEJOYSTICK_TRADITIONAL 2
+#define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
+#define DIDEVTYPEJOYSTICK_GAMEPAD 4
+#define DIDEVTYPEJOYSTICK_RUDDER 5
+#define DIDEVTYPEJOYSTICK_WHEEL 6
+#define DIDEVTYPEJOYSTICK_HEADTRACKER 7
+
+#define DI8DEVTYPEMOUSE_UNKNOWN 1
+#define DI8DEVTYPEMOUSE_TRADITIONAL 2
+#define DI8DEVTYPEMOUSE_FINGERSTICK 3
+#define DI8DEVTYPEMOUSE_TOUCHPAD 4
+#define DI8DEVTYPEMOUSE_TRACKBALL 5
+#define DI8DEVTYPEMOUSE_ABSOLUTE 6
+
+#define DI8DEVTYPEKEYBOARD_UNKNOWN 0
+#define DI8DEVTYPEKEYBOARD_PCXT 1
+#define DI8DEVTYPEKEYBOARD_OLIVETTI 2
+#define DI8DEVTYPEKEYBOARD_PCAT 3
+#define DI8DEVTYPEKEYBOARD_PCENH 4
+#define DI8DEVTYPEKEYBOARD_NOKIA1050 5
+#define DI8DEVTYPEKEYBOARD_NOKIA9140 6
+#define DI8DEVTYPEKEYBOARD_NEC98 7
+#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
+#define DI8DEVTYPEKEYBOARD_NEC98106 9
+#define DI8DEVTYPEKEYBOARD_JAPAN106 10
+#define DI8DEVTYPEKEYBOARD_JAPANAX 11
+#define DI8DEVTYPEKEYBOARD_J3100 12
+
+#define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
+
+#define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEJOYSTICK_STANDARD 2
+
+#define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEGAMEPAD_STANDARD 2
+#define DI8DEVTYPEGAMEPAD_TILT 3
+
+#define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
+#define DI8DEVTYPEDRIVING_DUALPEDALS 3
+#define DI8DEVTYPEDRIVING_THREEPEDALS 4
+#define DI8DEVTYPEDRIVING_HANDHELD 5
+
+#define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEFLIGHT_STICK 2
+#define DI8DEVTYPEFLIGHT_YOKE 3
+#define DI8DEVTYPEFLIGHT_RC 4
+
+#define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPE1STPERSON_UNKNOWN 2
+#define DI8DEVTYPE1STPERSON_SIXDOF 3
+#define DI8DEVTYPE1STPERSON_SHOOTER 4
+
+#define DI8DEVTYPESCREENPTR_UNKNOWN 2
+#define DI8DEVTYPESCREENPTR_LIGHTGUN 3
+#define DI8DEVTYPESCREENPTR_LIGHTPEN 4
+#define DI8DEVTYPESCREENPTR_TOUCH 5
+
+#define DI8DEVTYPEREMOTE_UNKNOWN 2
+
+#define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
+#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
+#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
+
+#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
+#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
+#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
+#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
+#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
+#define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
+#define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
+#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
+#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
+#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
+#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
+#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
+
+#define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
+#define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
+
+typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
+ DWORD dwSize;
+ GUID guidType;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+ CHAR tszName[MAX_PATH];
+} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
+typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
+typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
+ DWORD dwSize;
+ GUID guidType;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+ WCHAR tszName[MAX_PATH];
+} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
+typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)
+
+typedef struct DIDEVICEOBJECTINSTANCEA {
+ DWORD dwSize;
+ GUID guidType;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+ CHAR tszName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+ DWORD dwFFMaxForce;
+ DWORD dwFFForceResolution;
+ WORD wCollectionNumber;
+ WORD wDesignatorIndex;
+ WORD wUsagePage;
+ WORD wUsage;
+ DWORD dwDimension;
+ WORD wExponent;
+ WORD wReserved;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
+typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
+
+typedef struct DIDEVICEOBJECTINSTANCEW {
+ DWORD dwSize;
+ GUID guidType;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+ WCHAR tszName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+ DWORD dwFFMaxForce;
+ DWORD dwFFForceResolution;
+ WORD wCollectionNumber;
+ WORD wDesignatorIndex;
+ WORD wUsagePage;
+ WORD wUsage;
+ DWORD dwDimension;
+ WORD wExponent;
+ WORD wReserved;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
+typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
+
+typedef struct DIDEVICEINSTANCE_DX3A {
+ DWORD dwSize;
+ GUID guidInstance;
+ GUID guidProduct;
+ DWORD dwDevType;
+ CHAR tszInstanceName[MAX_PATH];
+ CHAR tszProductName[MAX_PATH];
+} DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
+typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
+typedef struct DIDEVICEINSTANCE_DX3W {
+ DWORD dwSize;
+ GUID guidInstance;
+ GUID guidProduct;
+ DWORD dwDevType;
+ WCHAR tszInstanceName[MAX_PATH];
+ WCHAR tszProductName[MAX_PATH];
+} DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
+typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)
+
+typedef struct DIDEVICEINSTANCEA {
+ DWORD dwSize;
+ GUID guidInstance;
+ GUID guidProduct;
+ DWORD dwDevType;
+ CHAR tszInstanceName[MAX_PATH];
+ CHAR tszProductName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+ GUID guidFFDriver;
+ WORD wUsagePage;
+ WORD wUsage;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
+typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
+
+typedef struct DIDEVICEINSTANCEW {
+ DWORD dwSize;
+ GUID guidInstance;
+ GUID guidProduct;
+ DWORD dwDevType;
+ WCHAR tszInstanceName[MAX_PATH];
+ WCHAR tszProductName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+ GUID guidFFDriver;
+ WORD wUsagePage;
+ WORD wUsage;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
+typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
+
+typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
+DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
+
+#define DIEDBS_MAPPEDPRI1 0x00000001
+#define DIEDBS_MAPPEDPRI2 0x00000002
+#define DIEDBS_RECENTDEVICE 0x00000010
+#define DIEDBS_NEWDEVICE 0x00000020
+
+#define DIEDBSFL_ATTACHEDONLY 0x00000000
+#define DIEDBSFL_THISUSER 0x00000010
+#define DIEDBSFL_FORCEFEEDBACK DIEDFL_FORCEFEEDBACK
+#define DIEDBSFL_AVAILABLEDEVICES 0x00001000
+#define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000
+#define DIEDBSFL_NONGAMINGDEVICES 0x00004000
+#define DIEDBSFL_VALID 0x00007110
+
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
+DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
+#endif
+
+typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
+
+typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
+DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
+
+#if DIRECTINPUT_VERSION >= 0x0500
+typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
+#endif
+
+#define DIK_ESCAPE 0x01
+#define DIK_1 0x02
+#define DIK_2 0x03
+#define DIK_3 0x04
+#define DIK_4 0x05
+#define DIK_5 0x06
+#define DIK_6 0x07
+#define DIK_7 0x08
+#define DIK_8 0x09
+#define DIK_9 0x0A
+#define DIK_0 0x0B
+#define DIK_MINUS 0x0C /* - on main keyboard */
+#define DIK_EQUALS 0x0D
+#define DIK_BACK 0x0E /* backspace */
+#define DIK_TAB 0x0F
+#define DIK_Q 0x10
+#define DIK_W 0x11
+#define DIK_E 0x12
+#define DIK_R 0x13
+#define DIK_T 0x14
+#define DIK_Y 0x15
+#define DIK_U 0x16
+#define DIK_I 0x17
+#define DIK_O 0x18
+#define DIK_P 0x19
+#define DIK_LBRACKET 0x1A
+#define DIK_RBRACKET 0x1B
+#define DIK_RETURN 0x1C /* Enter on main keyboard */
+#define DIK_LCONTROL 0x1D
+#define DIK_A 0x1E
+#define DIK_S 0x1F
+#define DIK_D 0x20
+#define DIK_F 0x21
+#define DIK_G 0x22
+#define DIK_H 0x23
+#define DIK_J 0x24
+#define DIK_K 0x25
+#define DIK_L 0x26
+#define DIK_SEMICOLON 0x27
+#define DIK_APOSTROPHE 0x28
+#define DIK_GRAVE 0x29 /* accent grave */
+#define DIK_LSHIFT 0x2A
+#define DIK_BACKSLASH 0x2B
+#define DIK_Z 0x2C
+#define DIK_X 0x2D
+#define DIK_C 0x2E
+#define DIK_V 0x2F
+#define DIK_B 0x30
+#define DIK_N 0x31
+#define DIK_M 0x32
+#define DIK_COMMA 0x33
+#define DIK_PERIOD 0x34 /* . on main keyboard */
+#define DIK_SLASH 0x35 /* / on main keyboard */
+#define DIK_RSHIFT 0x36
+#define DIK_MULTIPLY 0x37 /* * on numeric keypad */
+#define DIK_LMENU 0x38 /* left Alt */
+#define DIK_SPACE 0x39
+#define DIK_CAPITAL 0x3A
+#define DIK_F1 0x3B
+#define DIK_F2 0x3C
+#define DIK_F3 0x3D
+#define DIK_F4 0x3E
+#define DIK_F5 0x3F
+#define DIK_F6 0x40
+#define DIK_F7 0x41
+#define DIK_F8 0x42
+#define DIK_F9 0x43
+#define DIK_F10 0x44
+#define DIK_NUMLOCK 0x45
+#define DIK_SCROLL 0x46 /* Scroll Lock */
+#define DIK_NUMPAD7 0x47
+#define DIK_NUMPAD8 0x48
+#define DIK_NUMPAD9 0x49
+#define DIK_SUBTRACT 0x4A /* - on numeric keypad */
+#define DIK_NUMPAD4 0x4B
+#define DIK_NUMPAD5 0x4C
+#define DIK_NUMPAD6 0x4D
+#define DIK_ADD 0x4E /* + on numeric keypad */
+#define DIK_NUMPAD1 0x4F
+#define DIK_NUMPAD2 0x50
+#define DIK_NUMPAD3 0x51
+#define DIK_NUMPAD0 0x52
+#define DIK_DECIMAL 0x53 /* . on numeric keypad */
+#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */
+#define DIK_F11 0x57
+#define DIK_F12 0x58
+#define DIK_F13 0x64 /* (NEC PC98) */
+#define DIK_F14 0x65 /* (NEC PC98) */
+#define DIK_F15 0x66 /* (NEC PC98) */
+#define DIK_KANA 0x70 /* (Japanese keyboard) */
+#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */
+#define DIK_CONVERT 0x79 /* (Japanese keyboard) */
+#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
+#define DIK_YEN 0x7D /* (Japanese keyboard) */
+#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */
+#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
+#define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
+#define DIK_AT 0x91 /* (NEC PC98) */
+#define DIK_COLON 0x92 /* (NEC PC98) */
+#define DIK_UNDERLINE 0x93 /* (NEC PC98) */
+#define DIK_KANJI 0x94 /* (Japanese keyboard) */
+#define DIK_STOP 0x95 /* (NEC PC98) */
+#define DIK_AX 0x96 /* (Japan AX) */
+#define DIK_UNLABELED 0x97 /* (J3100) */
+#define DIK_NEXTTRACK 0x99 /* Next Track */
+#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
+#define DIK_RCONTROL 0x9D
+#define DIK_MUTE 0xA0 /* Mute */
+#define DIK_CALCULATOR 0xA1 /* Calculator */
+#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */
+#define DIK_MEDIASTOP 0xA4 /* Media Stop */
+#define DIK_VOLUMEDOWN 0xAE /* Volume - */
+#define DIK_VOLUMEUP 0xB0 /* Volume + */
+#define DIK_WEBHOME 0xB2 /* Web home */
+#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
+#define DIK_DIVIDE 0xB5 /* / on numeric keypad */
+#define DIK_SYSRQ 0xB7
+#define DIK_RMENU 0xB8 /* right Alt */
+#define DIK_PAUSE 0xC5 /* Pause */
+#define DIK_HOME 0xC7 /* Home on arrow keypad */
+#define DIK_UP 0xC8 /* UpArrow on arrow keypad */
+#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
+#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
+#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
+#define DIK_END 0xCF /* End on arrow keypad */
+#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
+#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
+#define DIK_INSERT 0xD2 /* Insert on arrow keypad */
+#define DIK_DELETE 0xD3 /* Delete on arrow keypad */
+#define DIK_LWIN 0xDB /* Left Windows key */
+#define DIK_RWIN 0xDC /* Right Windows key */
+#define DIK_APPS 0xDD /* AppMenu key */
+#define DIK_POWER 0xDE
+#define DIK_SLEEP 0xDF
+#define DIK_WAKE 0xE3 /* System Wake */
+#define DIK_WEBSEARCH 0xE5 /* Web Search */
+#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */
+#define DIK_WEBREFRESH 0xE7 /* Web Refresh */
+#define DIK_WEBSTOP 0xE8 /* Web Stop */
+#define DIK_WEBFORWARD 0xE9 /* Web Forward */
+#define DIK_WEBBACK 0xEA /* Web Back */
+#define DIK_MYCOMPUTER 0xEB /* My Computer */
+#define DIK_MAIL 0xEC /* Mail */
+#define DIK_MEDIASELECT 0xED /* Media Select */
+
+#define DIK_BACKSPACE DIK_BACK /* backspace */
+#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
+#define DIK_LALT DIK_LMENU /* left Alt */
+#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
+#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
+#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
+#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
+#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
+#define DIK_RALT DIK_RMENU /* right Alt */
+#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
+#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
+#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
+#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
+#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
+#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
+
+#define DIDFT_ALL 0x00000000
+#define DIDFT_RELAXIS 0x00000001
+#define DIDFT_ABSAXIS 0x00000002
+#define DIDFT_AXIS 0x00000003
+#define DIDFT_PSHBUTTON 0x00000004
+#define DIDFT_TGLBUTTON 0x00000008
+#define DIDFT_BUTTON 0x0000000C
+#define DIDFT_POV 0x00000010
+#define DIDFT_COLLECTION 0x00000040
+#define DIDFT_NODATA 0x00000080
+#define DIDFT_ANYINSTANCE 0x00FFFF00
+#define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
+#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
+#define DIDFT_GETTYPE(n) LOBYTE(n)
+#define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
+#define DIDFT_FFACTUATOR 0x01000000
+#define DIDFT_FFEFFECTTRIGGER 0x02000000
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIDFT_OUTPUT 0x10000000
+#define DIDFT_VENDORDEFINED 0x04000000
+#define DIDFT_ALIAS 0x08000000
+#endif /* DI5a */
+#ifndef DIDFT_OPTIONAL
+#define DIDFT_OPTIONAL 0x80000000
+#endif
+#define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
+#define DIDFT_NOCOLLECTION 0x00FFFF00
+
+#define DIDF_ABSAXIS 0x00000001
+#define DIDF_RELAXIS 0x00000002
+
+#define DIGDD_PEEK 0x00000001
+
+#define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0)
+
+typedef struct DIDEVICEOBJECTDATA_DX3 {
+ DWORD dwOfs;
+ DWORD dwData;
+ DWORD dwTimeStamp;
+ DWORD dwSequence;
+} DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;
+typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;
+
+typedef struct DIDEVICEOBJECTDATA {
+ DWORD dwOfs;
+ DWORD dwData;
+ DWORD dwTimeStamp;
+ DWORD dwSequence;
+#if(DIRECTINPUT_VERSION >= 0x0800)
+ UINT_PTR uAppData;
+#endif /* DIRECTINPUT_VERSION >= 0x0800 */
+} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
+typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
+
+typedef struct _DIOBJECTDATAFORMAT {
+ const GUID *pguid;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
+typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
+
+typedef struct _DIDATAFORMAT {
+ DWORD dwSize;
+ DWORD dwObjSize;
+ DWORD dwFlags;
+ DWORD dwDataSize;
+ DWORD dwNumObjs;
+ LPDIOBJECTDATAFORMAT rgodf;
+} DIDATAFORMAT, *LPDIDATAFORMAT;
+typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
+
+#if DIRECTINPUT_VERSION >= 0x0500
+#define DIDOI_FFACTUATOR 0x00000001
+#define DIDOI_FFEFFECTTRIGGER 0x00000002
+#define DIDOI_POLLED 0x00008000
+#define DIDOI_ASPECTPOSITION 0x00000100
+#define DIDOI_ASPECTVELOCITY 0x00000200
+#define DIDOI_ASPECTACCEL 0x00000300
+#define DIDOI_ASPECTFORCE 0x00000400
+#define DIDOI_ASPECTMASK 0x00000F00
+#endif /* DI5 */
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIDOI_GUIDISUSAGE 0x00010000
+#endif /* DI5a */
+
+typedef struct DIPROPHEADER {
+ DWORD dwSize;
+ DWORD dwHeaderSize;
+ DWORD dwObj;
+ DWORD dwHow;
+} DIPROPHEADER,*LPDIPROPHEADER;
+typedef const DIPROPHEADER *LPCDIPROPHEADER;
+
+#define DIPH_DEVICE 0
+#define DIPH_BYOFFSET 1
+#define DIPH_BYID 2
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIPH_BYUSAGE 3
+
+#define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
+#endif /* DI5a */
+
+typedef struct DIPROPDWORD {
+ DIPROPHEADER diph;
+ DWORD dwData;
+} DIPROPDWORD, *LPDIPROPDWORD;
+typedef const DIPROPDWORD *LPCDIPROPDWORD;
+
+typedef struct DIPROPRANGE {
+ DIPROPHEADER diph;
+ LONG lMin;
+ LONG lMax;
+} DIPROPRANGE, *LPDIPROPRANGE;
+typedef const DIPROPRANGE *LPCDIPROPRANGE;
+
+#define DIPROPRANGE_NOMIN ((LONG)0x80000000)
+#define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
+
+#if DIRECTINPUT_VERSION >= 0x050a
+typedef struct DIPROPCAL {
+ DIPROPHEADER diph;
+ LONG lMin;
+ LONG lCenter;
+ LONG lMax;
+} DIPROPCAL, *LPDIPROPCAL;
+typedef const DIPROPCAL *LPCDIPROPCAL;
+
+typedef struct DIPROPCALPOV {
+ DIPROPHEADER diph;
+ LONG lMin[5];
+ LONG lMax[5];
+} DIPROPCALPOV, *LPDIPROPCALPOV;
+typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
+
+typedef struct DIPROPGUIDANDPATH {
+ DIPROPHEADER diph;
+ GUID guidClass;
+ WCHAR wszPath[MAX_PATH];
+} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
+typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
+
+typedef struct DIPROPSTRING {
+ DIPROPHEADER diph;
+ WCHAR wsz[MAX_PATH];
+} DIPROPSTRING, *LPDIPROPSTRING;
+typedef const DIPROPSTRING *LPCDIPROPSTRING;
+#endif /* DI5a */
+
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct DIPROPPOINTER {
+ DIPROPHEADER diph;
+ UINT_PTR uData;
+} DIPROPPOINTER, *LPDIPROPPOINTER;
+typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
+#endif /* DI8 */
+
+/* special property GUIDs */
+#ifdef __cplusplus
+#define MAKEDIPROP(prop) (*(const GUID *)(prop))
+#else
+#define MAKEDIPROP(prop) ((REFGUID)(prop))
+#endif
+#define DIPROP_BUFFERSIZE MAKEDIPROP(1)
+#define DIPROP_AXISMODE MAKEDIPROP(2)
+
+#define DIPROPAXISMODE_ABS 0
+#define DIPROPAXISMODE_REL 1
+
+#define DIPROP_GRANULARITY MAKEDIPROP(3)
+#define DIPROP_RANGE MAKEDIPROP(4)
+#define DIPROP_DEADZONE MAKEDIPROP(5)
+#define DIPROP_SATURATION MAKEDIPROP(6)
+#define DIPROP_FFGAIN MAKEDIPROP(7)
+#define DIPROP_FFLOAD MAKEDIPROP(8)
+#define DIPROP_AUTOCENTER MAKEDIPROP(9)
+
+#define DIPROPAUTOCENTER_OFF 0
+#define DIPROPAUTOCENTER_ON 1
+
+#define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
+
+#define DIPROPCALIBRATIONMODE_COOKED 0
+#define DIPROPCALIBRATIONMODE_RAW 1
+
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIPROP_CALIBRATION MAKEDIPROP(11)
+#define DIPROP_GUIDANDPATH MAKEDIPROP(12)
+#define DIPROP_INSTANCENAME MAKEDIPROP(13)
+#define DIPROP_PRODUCTNAME MAKEDIPROP(14)
+#endif
+
+#if DIRECTINPUT_VERSION >= 0x5B2
+#define DIPROP_JOYSTICKID MAKEDIPROP(15)
+#define DIPROP_GETPORTDISPLAYNAME MAKEDIPROP(16)
+#endif
+
+#if DIRECTINPUT_VERSION >= 0x0700
+#define DIPROP_PHYSICALRANGE MAKEDIPROP(18)
+#define DIPROP_LOGICALRANGE MAKEDIPROP(19)
+#endif
+
+#if(DIRECTINPUT_VERSION >= 0x0800)
+#define DIPROP_KEYNAME MAKEDIPROP(20)
+#define DIPROP_CPOINTS MAKEDIPROP(21)
+#define DIPROP_APPDATA MAKEDIPROP(22)
+#define DIPROP_SCANCODE MAKEDIPROP(23)
+#define DIPROP_VIDPID MAKEDIPROP(24)
+#define DIPROP_USERNAME MAKEDIPROP(25)
+#define DIPROP_TYPENAME MAKEDIPROP(26)
+
+#define MAXCPOINTSNUM 8
+
+typedef struct _CPOINT {
+ LONG lP;
+ DWORD dwLog;
+} CPOINT, *PCPOINT;
+
+typedef struct DIPROPCPOINTS {
+ DIPROPHEADER diph;
+ DWORD dwCPointsNum;
+ CPOINT cp[MAXCPOINTSNUM];
+} DIPROPCPOINTS, *LPDIPROPCPOINTS;
+typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
+#endif /* DI8 */
+
+
+typedef struct DIDEVCAPS_DX3 {
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwDevType;
+ DWORD dwAxes;
+ DWORD dwButtons;
+ DWORD dwPOVs;
+} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
+
+typedef struct DIDEVCAPS {
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwDevType;
+ DWORD dwAxes;
+ DWORD dwButtons;
+ DWORD dwPOVs;
+#if(DIRECTINPUT_VERSION >= 0x0500)
+ DWORD dwFFSamplePeriod;
+ DWORD dwFFMinTimeResolution;
+ DWORD dwFirmwareRevision;
+ DWORD dwHardwareRevision;
+ DWORD dwFFDriverVersion;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVCAPS,*LPDIDEVCAPS;
+
+#define DIDC_ATTACHED 0x00000001
+#define DIDC_POLLEDDEVICE 0x00000002
+#define DIDC_EMULATED 0x00000004
+#define DIDC_POLLEDDATAFORMAT 0x00000008
+#define DIDC_FORCEFEEDBACK 0x00000100
+#define DIDC_FFATTACK 0x00000200
+#define DIDC_FFFADE 0x00000400
+#define DIDC_SATURATION 0x00000800
+#define DIDC_POSNEGCOEFFICIENTS 0x00001000
+#define DIDC_POSNEGSATURATION 0x00002000
+#define DIDC_DEADBAND 0x00004000
+#define DIDC_STARTDELAY 0x00008000
+#define DIDC_ALIAS 0x00010000
+#define DIDC_PHANTOM 0x00020000
+#define DIDC_HIDDEN 0x00040000
+
+
+/* SetCooperativeLevel dwFlags */
+#define DISCL_EXCLUSIVE 0x00000001
+#define DISCL_NONEXCLUSIVE 0x00000002
+#define DISCL_FOREGROUND 0x00000004
+#define DISCL_BACKGROUND 0x00000008
+#define DISCL_NOWINKEY 0x00000010
+
+#if (DIRECTINPUT_VERSION >= 0x0500)
+/* Device FF flags */
+#define DISFFC_RESET 0x00000001
+#define DISFFC_STOPALL 0x00000002
+#define DISFFC_PAUSE 0x00000004
+#define DISFFC_CONTINUE 0x00000008
+#define DISFFC_SETACTUATORSON 0x00000010
+#define DISFFC_SETACTUATORSOFF 0x00000020
+
+#define DIGFFS_EMPTY 0x00000001
+#define DIGFFS_STOPPED 0x00000002
+#define DIGFFS_PAUSED 0x00000004
+#define DIGFFS_ACTUATORSON 0x00000010
+#define DIGFFS_ACTUATORSOFF 0x00000020
+#define DIGFFS_POWERON 0x00000040
+#define DIGFFS_POWEROFF 0x00000080
+#define DIGFFS_SAFETYSWITCHON 0x00000100
+#define DIGFFS_SAFETYSWITCHOFF 0x00000200
+#define DIGFFS_USERFFSWITCHON 0x00000400
+#define DIGFFS_USERFFSWITCHOFF 0x00000800
+#define DIGFFS_DEVICELOST 0x80000000
+
+/* Effect flags */
+#define DIEFT_ALL 0x00000000
+
+#define DIEFT_CONSTANTFORCE 0x00000001
+#define DIEFT_RAMPFORCE 0x00000002
+#define DIEFT_PERIODIC 0x00000003
+#define DIEFT_CONDITION 0x00000004
+#define DIEFT_CUSTOMFORCE 0x00000005
+#define DIEFT_HARDWARE 0x000000FF
+#define DIEFT_FFATTACK 0x00000200
+#define DIEFT_FFFADE 0x00000400
+#define DIEFT_SATURATION 0x00000800
+#define DIEFT_POSNEGCOEFFICIENTS 0x00001000
+#define DIEFT_POSNEGSATURATION 0x00002000
+#define DIEFT_DEADBAND 0x00004000
+#define DIEFT_STARTDELAY 0x00008000
+#define DIEFT_GETTYPE(n) LOBYTE(n)
+
+#define DIEFF_OBJECTIDS 0x00000001
+#define DIEFF_OBJECTOFFSETS 0x00000002
+#define DIEFF_CARTESIAN 0x00000010
+#define DIEFF_POLAR 0x00000020
+#define DIEFF_SPHERICAL 0x00000040
+
+#define DIEP_DURATION 0x00000001
+#define DIEP_SAMPLEPERIOD 0x00000002
+#define DIEP_GAIN 0x00000004
+#define DIEP_TRIGGERBUTTON 0x00000008
+#define DIEP_TRIGGERREPEATINTERVAL 0x00000010
+#define DIEP_AXES 0x00000020
+#define DIEP_DIRECTION 0x00000040
+#define DIEP_ENVELOPE 0x00000080
+#define DIEP_TYPESPECIFICPARAMS 0x00000100
+#if(DIRECTINPUT_VERSION >= 0x0600)
+#define DIEP_STARTDELAY 0x00000200
+#define DIEP_ALLPARAMS_DX5 0x000001FF
+#define DIEP_ALLPARAMS 0x000003FF
+#else
+#define DIEP_ALLPARAMS 0x000001FF
+#endif /* DIRECTINPUT_VERSION >= 0x0600 */
+#define DIEP_START 0x20000000
+#define DIEP_NORESTART 0x40000000
+#define DIEP_NODOWNLOAD 0x80000000
+#define DIEB_NOTRIGGER 0xFFFFFFFF
+
+#define DIES_SOLO 0x00000001
+#define DIES_NODOWNLOAD 0x80000000
+
+#define DIEGES_PLAYING 0x00000001
+#define DIEGES_EMULATED 0x00000002
+
+#define DI_DEGREES 100
+#define DI_FFNOMINALMAX 10000
+#define DI_SECONDS 1000000
+
+typedef struct DICONSTANTFORCE {
+ LONG lMagnitude;
+} DICONSTANTFORCE, *LPDICONSTANTFORCE;
+typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
+
+typedef struct DIRAMPFORCE {
+ LONG lStart;
+ LONG lEnd;
+} DIRAMPFORCE, *LPDIRAMPFORCE;
+typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
+
+typedef struct DIPERIODIC {
+ DWORD dwMagnitude;
+ LONG lOffset;
+ DWORD dwPhase;
+ DWORD dwPeriod;
+} DIPERIODIC, *LPDIPERIODIC;
+typedef const DIPERIODIC *LPCDIPERIODIC;
+
+typedef struct DICONDITION {
+ LONG lOffset;
+ LONG lPositiveCoefficient;
+ LONG lNegativeCoefficient;
+ DWORD dwPositiveSaturation;
+ DWORD dwNegativeSaturation;
+ LONG lDeadBand;
+} DICONDITION, *LPDICONDITION;
+typedef const DICONDITION *LPCDICONDITION;
+
+typedef struct DICUSTOMFORCE {
+ DWORD cChannels;
+ DWORD dwSamplePeriod;
+ DWORD cSamples;
+ LPLONG rglForceData;
+} DICUSTOMFORCE, *LPDICUSTOMFORCE;
+typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
+
+typedef struct DIENVELOPE {
+ DWORD dwSize;
+ DWORD dwAttackLevel;
+ DWORD dwAttackTime;
+ DWORD dwFadeLevel;
+ DWORD dwFadeTime;
+} DIENVELOPE, *LPDIENVELOPE;
+typedef const DIENVELOPE *LPCDIENVELOPE;
+
+typedef struct DIEFFECT_DX5 {
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwDuration;
+ DWORD dwSamplePeriod;
+ DWORD dwGain;
+ DWORD dwTriggerButton;
+ DWORD dwTriggerRepeatInterval;
+ DWORD cAxes;
+ LPDWORD rgdwAxes;
+ LPLONG rglDirection;
+ LPDIENVELOPE lpEnvelope;
+ DWORD cbTypeSpecificParams;
+ LPVOID lpvTypeSpecificParams;
+} DIEFFECT_DX5, *LPDIEFFECT_DX5;
+typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
+
+typedef struct DIEFFECT {
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwDuration;
+ DWORD dwSamplePeriod;
+ DWORD dwGain;
+ DWORD dwTriggerButton;
+ DWORD dwTriggerRepeatInterval;
+ DWORD cAxes;
+ LPDWORD rgdwAxes;
+ LPLONG rglDirection;
+ LPDIENVELOPE lpEnvelope;
+ DWORD cbTypeSpecificParams;
+ LPVOID lpvTypeSpecificParams;
+#if(DIRECTINPUT_VERSION >= 0x0600)
+ DWORD dwStartDelay;
+#endif /* DIRECTINPUT_VERSION >= 0x0600 */
+} DIEFFECT, *LPDIEFFECT;
+typedef const DIEFFECT *LPCDIEFFECT;
+typedef DIEFFECT DIEFFECT_DX6;
+typedef LPDIEFFECT LPDIEFFECT_DX6;
+
+typedef struct DIEFFECTINFOA {
+ DWORD dwSize;
+ GUID guid;
+ DWORD dwEffType;
+ DWORD dwStaticParams;
+ DWORD dwDynamicParams;
+ CHAR tszName[MAX_PATH];
+} DIEFFECTINFOA, *LPDIEFFECTINFOA;
+typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
+
+typedef struct DIEFFECTINFOW {
+ DWORD dwSize;
+ GUID guid;
+ DWORD dwEffType;
+ DWORD dwStaticParams;
+ DWORD dwDynamicParams;
+ WCHAR tszName[MAX_PATH];
+} DIEFFECTINFOW, *LPDIEFFECTINFOW;
+typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
+
+DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
+DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
+DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
+
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
+
+typedef struct DIEFFESCAPE {
+ DWORD dwSize;
+ DWORD dwCommand;
+ LPVOID lpvInBuffer;
+ DWORD cbInBuffer;
+ LPVOID lpvOutBuffer;
+ DWORD cbOutBuffer;
+} DIEFFESCAPE, *LPDIEFFESCAPE;
+
+typedef struct DIJOYSTATE {
+ LONG lX;
+ LONG lY;
+ LONG lZ;
+ LONG lRx;
+ LONG lRy;
+ LONG lRz;
+ LONG rglSlider[2];
+ DWORD rgdwPOV[4];
+ BYTE rgbButtons[32];
+} DIJOYSTATE, *LPDIJOYSTATE;
+
+typedef struct DIJOYSTATE2 {
+ LONG lX;
+ LONG lY;
+ LONG lZ;
+ LONG lRx;
+ LONG lRy;
+ LONG lRz;
+ LONG rglSlider[2];
+ DWORD rgdwPOV[4];
+ BYTE rgbButtons[128];
+ LONG lVX; /* 'v' as in velocity */
+ LONG lVY;
+ LONG lVZ;
+ LONG lVRx;
+ LONG lVRy;
+ LONG lVRz;
+ LONG rglVSlider[2];
+ LONG lAX; /* 'a' as in acceleration */
+ LONG lAY;
+ LONG lAZ;
+ LONG lARx;
+ LONG lARy;
+ LONG lARz;
+ LONG rglASlider[2];
+ LONG lFX; /* 'f' as in force */
+ LONG lFY;
+ LONG lFZ;
+ LONG lFRx; /* 'fr' as in rotational force aka torque */
+ LONG lFRy;
+ LONG lFRz;
+ LONG rglFSlider[2];
+} DIJOYSTATE2, *LPDIJOYSTATE2;
+
+#define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
+#define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
+#define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
+#define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
+#define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
+#define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
+#define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
+ (n) * sizeof(LONG))
+#define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
+ (n) * sizeof(DWORD))
+#define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
+#define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
+#define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
+#define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
+#define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
+#define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
+#define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
+#define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
+#define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
+#define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
+#define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
+#define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
+#define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
+#define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
+#define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
+#define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
+#define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
+#define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
+#define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
+#define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
+#define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
+#define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
+#define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
+#define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
+#define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
+#define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
+#define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
+#define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
+#define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
+#define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
+#define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
+#define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
+#define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+
+/* DInput 7 structures, types */
+#if(DIRECTINPUT_VERSION >= 0x0700)
+typedef struct DIFILEEFFECT {
+ DWORD dwSize;
+ GUID GuidEffect;
+ LPCDIEFFECT lpDiEffect;
+ CHAR szFriendlyName[MAX_PATH];
+} DIFILEEFFECT, *LPDIFILEEFFECT;
+
+typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
+#endif /* DIRECTINPUT_VERSION >= 0x0700 */
+
+/* DInput 8 structures and types */
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct _DIACTIONA {
+ UINT_PTR uAppData;
+ DWORD dwSemantic;
+ DWORD dwFlags;
+ __GNU_EXTENSION union {
+ LPCSTR lptszActionName;
+ UINT uResIdString;
+ } DUMMYUNIONNAME;
+ GUID guidInstance;
+ DWORD dwObjID;
+ DWORD dwHow;
+} DIACTIONA, *LPDIACTIONA;
+typedef const DIACTIONA *LPCDIACTIONA;
+
+typedef struct _DIACTIONW {
+ UINT_PTR uAppData;
+ DWORD dwSemantic;
+ DWORD dwFlags;
+ __GNU_EXTENSION union {
+ LPCWSTR lptszActionName;
+ UINT uResIdString;
+ } DUMMYUNIONNAME;
+ GUID guidInstance;
+ DWORD dwObjID;
+ DWORD dwHow;
+} DIACTIONW, *LPDIACTIONW;
+typedef const DIACTIONW *LPCDIACTIONW;
+
+DECL_WINELIB_TYPE_AW(DIACTION)
+DECL_WINELIB_TYPE_AW(LPDIACTION)
+DECL_WINELIB_TYPE_AW(LPCDIACTION)
+
+#define DIA_FORCEFEEDBACK 0x00000001
+#define DIA_APPMAPPED 0x00000002
+#define DIA_APPNOMAP 0x00000004
+#define DIA_NORANGE 0x00000008
+#define DIA_APPFIXED 0x00000010
+
+#define DIAH_UNMAPPED 0x00000000
+#define DIAH_USERCONFIG 0x00000001
+#define DIAH_APPREQUESTED 0x00000002
+#define DIAH_HWAPP 0x00000004
+#define DIAH_HWDEFAULT 0x00000008
+#define DIAH_DEFAULT 0x00000020
+#define DIAH_ERROR 0x80000000
+
+typedef struct _DIACTIONFORMATA {
+ DWORD dwSize;
+ DWORD dwActionSize;
+ DWORD dwDataSize;
+ DWORD dwNumActions;
+ LPDIACTIONA rgoAction;
+ GUID guidActionMap;
+ DWORD dwGenre;
+ DWORD dwBufferSize;
+ LONG lAxisMin;
+ LONG lAxisMax;
+ HINSTANCE hInstString;
+ FILETIME ftTimeStamp;
+ DWORD dwCRC;
+ CHAR tszActionMap[MAX_PATH];
+} DIACTIONFORMATA, *LPDIACTIONFORMATA;
+typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
+
+typedef struct _DIACTIONFORMATW {
+ DWORD dwSize;
+ DWORD dwActionSize;
+ DWORD dwDataSize;
+ DWORD dwNumActions;
+ LPDIACTIONW rgoAction;
+ GUID guidActionMap;
+ DWORD dwGenre;
+ DWORD dwBufferSize;
+ LONG lAxisMin;
+ LONG lAxisMax;
+ HINSTANCE hInstString;
+ FILETIME ftTimeStamp;
+ DWORD dwCRC;
+ WCHAR tszActionMap[MAX_PATH];
+} DIACTIONFORMATW, *LPDIACTIONFORMATW;
+typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
+
+DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
+DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
+DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
+
+#define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
+#define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
+#define DIAFTS_UNUSEDDEVICELOW 0x00000000
+#define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
+
+#define DIDBAM_DEFAULT 0x00000000
+#define DIDBAM_PRESERVE 0x00000001
+#define DIDBAM_INITIALIZE 0x00000002
+#define DIDBAM_HWDEFAULTS 0x00000004
+
+#define DIDSAM_DEFAULT 0x00000000
+#define DIDSAM_NOUSER 0x00000001
+#define DIDSAM_FORCESAVE 0x00000002
+
+#define DICD_DEFAULT 0x00000000
+#define DICD_EDIT 0x00000001
+
+#ifndef D3DCOLOR_DEFINED
+typedef DWORD D3DCOLOR;
+#define D3DCOLOR_DEFINED
+#endif
+
+typedef struct _DICOLORSET {
+ DWORD dwSize;
+ D3DCOLOR cTextFore;
+ D3DCOLOR cTextHighlight;
+ D3DCOLOR cCalloutLine;
+ D3DCOLOR cCalloutHighlight;
+ D3DCOLOR cBorder;
+ D3DCOLOR cControlFill;
+ D3DCOLOR cHighlightFill;
+ D3DCOLOR cAreaFill;
+} DICOLORSET, *LPDICOLORSET;
+typedef const DICOLORSET *LPCDICOLORSET;
+
+typedef struct _DICONFIGUREDEVICESPARAMSA {
+ DWORD dwSize;
+ DWORD dwcUsers;
+ LPSTR lptszUserNames;
+ DWORD dwcFormats;
+ LPDIACTIONFORMATA lprgFormats;
+ HWND hwnd;
+ DICOLORSET dics;
+ LPUNKNOWN lpUnkDDSTarget;
+} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
+typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
+
+typedef struct _DICONFIGUREDEVICESPARAMSW {
+ DWORD dwSize;
+ DWORD dwcUsers;
+ LPWSTR lptszUserNames;
+ DWORD dwcFormats;
+ LPDIACTIONFORMATW lprgFormats;
+ HWND hwnd;
+ DICOLORSET dics;
+ LPUNKNOWN lpUnkDDSTarget;
+} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
+typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
+
+DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
+DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
+DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
+
+#define DIDIFT_CONFIGURATION 0x00000001
+#define DIDIFT_OVERLAY 0x00000002
+
+#define DIDAL_CENTERED 0x00000000
+#define DIDAL_LEFTALIGNED 0x00000001
+#define DIDAL_RIGHTALIGNED 0x00000002
+#define DIDAL_MIDDLE 0x00000000
+#define DIDAL_TOPALIGNED 0x00000004
+#define DIDAL_BOTTOMALIGNED 0x00000008
+
+typedef struct _DIDEVICEIMAGEINFOA {
+ CHAR tszImagePath[MAX_PATH];
+ DWORD dwFlags;
+ DWORD dwViewID;
+ RECT rcOverlay;
+ DWORD dwObjID;
+ DWORD dwcValidPts;
+ POINT rgptCalloutLine[5];
+ RECT rcCalloutRect;
+ DWORD dwTextAlign;
+} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
+typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
+
+typedef struct _DIDEVICEIMAGEINFOW {
+ WCHAR tszImagePath[MAX_PATH];
+ DWORD dwFlags;
+ DWORD dwViewID;
+ RECT rcOverlay;
+ DWORD dwObjID;
+ DWORD dwcValidPts;
+ POINT rgptCalloutLine[5];
+ RECT rcCalloutRect;
+ DWORD dwTextAlign;
+} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
+typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
+
+typedef struct _DIDEVICEIMAGEINFOHEADERA {
+ DWORD dwSize;
+ DWORD dwSizeImageInfo;
+ DWORD dwcViews;
+ DWORD dwcButtons;
+ DWORD dwcAxes;
+ DWORD dwcPOVs;
+ DWORD dwBufferSize;
+ DWORD dwBufferUsed;
+ LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
+} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
+typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
+
+typedef struct _DIDEVICEIMAGEINFOHEADERW {
+ DWORD dwSize;
+ DWORD dwSizeImageInfo;
+ DWORD dwcViews;
+ DWORD dwcButtons;
+ DWORD dwcAxes;
+ DWORD dwcPOVs;
+ DWORD dwBufferSize;
+ DWORD dwBufferUsed;
+ LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
+} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
+typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
+
+#endif /* DI8 */
+
+
+/*****************************************************************************
+ * IDirectInputEffect interface
+ */
+#if (DIRECTINPUT_VERSION >= 0x0500)
+#undef INTERFACE
+#define INTERFACE IDirectInputEffect
+DECLARE_INTERFACE_(IDirectInputEffect,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputEffect methods ***/
+ STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;
+ STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
+ STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;
+ STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;
+ STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;
+ STDMETHOD(Stop)(THIS) PURE;
+ STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
+ STDMETHOD(Download)(THIS) PURE;
+ STDMETHOD(Unload)(THIS) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInputEffect methods ***/
+#define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
+#define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
+#define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
+#define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
+#define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
+#define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
+#define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
+#define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
+#define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
+#define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputEffect_AddRef(p) (p)->AddRef()
+#define IDirectInputEffect_Release(p) (p)->Release()
+/*** IDirectInputEffect methods ***/
+#define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
+#define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
+#define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
+#define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
+#define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
+#define IDirectInputEffect_Stop(p) (p)->Stop()
+#define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
+#define IDirectInputEffect_Download(p) (p)->Download()
+#define IDirectInputEffect_Unload(p) (p)->Unload()
+#define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
+#endif
+
+#endif /* DI5 */
+
+
+/*****************************************************************************
+ * IDirectInputDeviceA interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDeviceA
+DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceA methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDeviceW interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDeviceW
+DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceW methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice_AddRef(p) (p)->AddRef()
+#define IDirectInputDevice_Release(p) (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
+#define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
+#define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
+#define IDirectInputDevice_Acquire(p) (p)->Acquire()
+#define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
+#define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
+#define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
+#define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
+#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
+#define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
+#endif
+
+
+#if (DIRECTINPUT_VERSION >= 0x0500)
+/*****************************************************************************
+ * IDirectInputDevice2A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice2A
+DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceA methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+ /*** IDirectInputDevice2A methods ***/
+ STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+ STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+ STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
+ STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+ STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+ STDMETHOD(Poll)(THIS) PURE;
+ STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDevice2W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice2W
+DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceW methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+ /*** IDirectInputDevice2W methods ***/
+ STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+ STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+ STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
+ STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+ STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+ STDMETHOD(Poll)(THIS) PURE;
+ STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
+#define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
+#define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
+#define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
+#define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
+#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
+#define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
+#define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
+#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice2_AddRef(p) (p)->AddRef()
+#define IDirectInputDevice2_Release(p) (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
+#define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
+#define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
+#define IDirectInputDevice2_Acquire(p) (p)->Acquire()
+#define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
+#define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
+#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
+#define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
+#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
+#define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
+#define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
+#define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
+#define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
+#define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
+#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
+#define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
+#define IDirectInputDevice2_Poll(p) (p)->Poll()
+#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
+#endif
+#endif /* DI5 */
+
+#if DIRECTINPUT_VERSION >= 0x0700
+/*****************************************************************************
+ * IDirectInputDevice7A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice7A
+DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceA methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+ /*** IDirectInputDevice2A methods ***/
+ STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+ STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+ STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
+ STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+ STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+ STDMETHOD(Poll)(THIS) PURE;
+ STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+ /*** IDirectInputDevice7A methods ***/
+ STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+ STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDevice7W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice7W
+DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceW methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+ /*** IDirectInputDevice2W methods ***/
+ STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+ STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+ STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
+ STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+ STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+ STDMETHOD(Poll)(THIS) PURE;
+ STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+ /*** IDirectInputDevice7W methods ***/
+ STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+ STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
+#define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
+#define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
+#define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
+#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
+#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
+#define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
+#define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
+#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
+#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice7_AddRef(p) (p)->AddRef()
+#define IDirectInputDevice7_Release(p) (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
+#define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
+#define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
+#define IDirectInputDevice7_Acquire(p) (p)->Acquire()
+#define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
+#define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
+#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
+#define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
+#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
+#define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
+#define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
+#define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
+#define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
+#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
+#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
+#define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
+#define IDirectInputDevice7_Poll(p) (p)->Poll()
+#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
+#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
+#endif
+
+#endif /* DI7 */
+
+#if DIRECTINPUT_VERSION >= 0x0800
+/*****************************************************************************
+ * IDirectInputDevice8A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice8A
+DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceA methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+ /*** IDirectInputDevice2A methods ***/
+ STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+ STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+ STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
+ STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+ STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+ STDMETHOD(Poll)(THIS) PURE;
+ STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+ /*** IDirectInputDevice7A methods ***/
+ STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+ STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+ /*** IDirectInputDevice8A methods ***/
+ STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
+ STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
+ STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDevice8W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice8W
+DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputDeviceW methods ***/
+ STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+ STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+ STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+ STDMETHOD(Acquire)(THIS) PURE;
+ STDMETHOD(Unacquire)(THIS) PURE;
+ STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+ STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+ STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+ STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+ STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+ STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+ /*** IDirectInputDevice2W methods ***/
+ STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+ STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+ STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
+ STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+ STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+ STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+ STDMETHOD(Poll)(THIS) PURE;
+ STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+ /*** IDirectInputDevice7W methods ***/
+ STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+ STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+ /*** IDirectInputDevice8W methods ***/
+ STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
+ STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
+ STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
+#define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
+#define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
+#define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
+#define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
+#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
+#define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
+#define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
+#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
+#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
+/*** IDirectInputDevice8 methods ***/
+#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
+#define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
+#define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice8_AddRef(p) (p)->AddRef()
+#define IDirectInputDevice8_Release(p) (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
+#define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
+#define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
+#define IDirectInputDevice8_Acquire(p) (p)->Acquire()
+#define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
+#define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
+#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
+#define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
+#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
+#define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
+#define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
+#define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
+#define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
+#define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
+#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
+#define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
+#define IDirectInputDevice8_Poll(p) (p)->Poll()
+#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
+#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
+/*** IDirectInputDevice8 methods ***/
+#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
+#define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
+#define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
+#endif
+
+#endif /* DI8 */
+
+/* "Standard" Mouse report... */
+typedef struct DIMOUSESTATE {
+ LONG lX;
+ LONG lY;
+ LONG lZ;
+ BYTE rgbButtons[4];
+} DIMOUSESTATE;
+
+#if DIRECTINPUT_VERSION >= 0x0700
+/* "Standard" Mouse report for DInput 7... */
+typedef struct DIMOUSESTATE2 {
+ LONG lX;
+ LONG lY;
+ LONG lZ;
+ BYTE rgbButtons[8];
+} DIMOUSESTATE2;
+#endif /* DI7 */
+
+#define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
+#define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
+#define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
+#define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
+#define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
+#define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
+#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
+#if DIRECTINPUT_VERSION >= 0x0700
+#define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
+#define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
+#define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
+#define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
+#endif /* DI7 */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern const DIDATAFORMAT c_dfDIMouse;
+#if DIRECTINPUT_VERSION >= 0x0700
+extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
+#endif /* DI7 */
+extern const DIDATAFORMAT c_dfDIKeyboard;
+#if DIRECTINPUT_VERSION >= 0x0500
+extern const DIDATAFORMAT c_dfDIJoystick;
+extern const DIDATAFORMAT c_dfDIJoystick2;
+#endif /* DI5 */
+#ifdef __cplusplus
+};
+#endif
+
+/*****************************************************************************
+ * IDirectInputA interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputA
+DECLARE_INTERFACE_(IDirectInputA,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputA methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputW interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputW
+DECLARE_INTERFACE_(IDirectInputW,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputW methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInput methods ***/
+#define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput_AddRef(p) (p)->AddRef()
+#define IDirectInput_Release(p) (p)->Release()
+/*** IDirectInput methods ***/
+#define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
+#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
+#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
+#endif
+
+/*****************************************************************************
+ * IDirectInput2A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput2A
+DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputA methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+ /*** IDirectInput2A methods ***/
+ STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInput2W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput2W
+DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputW methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+ /*** IDirectInput2W methods ***/
+ STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInput methods ***/
+#define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput2_AddRef(p) (p)->AddRef()
+#define IDirectInput2_Release(p) (p)->Release()
+/*** IDirectInput methods ***/
+#define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
+#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
+#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
+#endif
+
+/*****************************************************************************
+ * IDirectInput7A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput7A
+DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputA methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+ /*** IDirectInput2A methods ***/
+ STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
+ /*** IDirectInput7A methods ***/
+ STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInput7W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput7W
+DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInputW methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+ /*** IDirectInput2W methods ***/
+ STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
+ /*** IDirectInput7W methods ***/
+ STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInput methods ***/
+#define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
+/*** IDirectInput7 methods ***/
+#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput7_AddRef(p) (p)->AddRef()
+#define IDirectInput7_Release(p) (p)->Release()
+/*** IDirectInput methods ***/
+#define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
+#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
+#define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
+/*** IDirectInput7 methods ***/
+#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
+#endif
+
+
+#if DIRECTINPUT_VERSION >= 0x0800
+/*****************************************************************************
+ * IDirectInput8A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput8A
+DECLARE_INTERFACE_(IDirectInput8A,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInput8A methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+ STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
+ STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInput8W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput8W
+DECLARE_INTERFACE_(IDirectInput8W,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IDirectInput8W methods ***/
+ STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+ STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+ STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+ STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+ STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
+ STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+ STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
+/*** IDirectInput8 methods ***/
+#define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
+#define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
+#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
+#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput8_AddRef(p) (p)->AddRef()
+#define IDirectInput8_Release(p) (p)->Release()
+/*** IDirectInput8 methods ***/
+#define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
+#define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
+#define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b)
+#define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
+#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
+#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
+#endif
+
+#endif /* DI8 */
+
+/* Export functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if DIRECTINPUT_VERSION >= 0x0800
+HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
+#else /* DI < 8 */
+HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
+HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);
+#define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
+
+HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
+#endif /* DI8 */
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __DINPUT_INCLUDED__ */
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dummy.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dummy.go
new file mode 100644
index 0000000..41053ac
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/dummy.go
@@ -0,0 +1,4 @@
+// +build required
+
+// Package dummy prevents go tooling from stripping the c dependencies.
+package dummy
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/xinput.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/xinput.h
new file mode 100644
index 0000000..d3ca726
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw/xinput.h
@@ -0,0 +1,239 @@
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_XINPUT_H
+#define __WINE_XINPUT_H
+
+#include <windef.h>
+
+/*
+ * Bitmasks for the joysticks buttons, determines what has
+ * been pressed on the joystick, these need to be mapped
+ * to whatever device you're using instead of an xbox 360
+ * joystick
+ */
+
+#define XINPUT_GAMEPAD_DPAD_UP 0x0001
+#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
+#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004
+#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008
+#define XINPUT_GAMEPAD_START 0x0010
+#define XINPUT_GAMEPAD_BACK 0x0020
+#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040
+#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080
+#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100
+#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200
+#define XINPUT_GAMEPAD_A 0x1000
+#define XINPUT_GAMEPAD_B 0x2000
+#define XINPUT_GAMEPAD_X 0x4000
+#define XINPUT_GAMEPAD_Y 0x8000
+
+/*
+ * Defines the flags used to determine if the user is pushing
+ * down on a button, not holding a button, etc
+ */
+
+#define XINPUT_KEYSTROKE_KEYDOWN 0x0001
+#define XINPUT_KEYSTROKE_KEYUP 0x0002
+#define XINPUT_KEYSTROKE_REPEAT 0x0004
+
+/*
+ * Defines the codes which are returned by XInputGetKeystroke
+ */
+
+#define VK_PAD_A 0x5800
+#define VK_PAD_B 0x5801
+#define VK_PAD_X 0x5802
+#define VK_PAD_Y 0x5803
+#define VK_PAD_RSHOULDER 0x5804
+#define VK_PAD_LSHOULDER 0x5805
+#define VK_PAD_LTRIGGER 0x5806
+#define VK_PAD_RTRIGGER 0x5807
+#define VK_PAD_DPAD_UP 0x5810
+#define VK_PAD_DPAD_DOWN 0x5811
+#define VK_PAD_DPAD_LEFT 0x5812
+#define VK_PAD_DPAD_RIGHT 0x5813
+#define VK_PAD_START 0x5814
+#define VK_PAD_BACK 0x5815
+#define VK_PAD_LTHUMB_PRESS 0x5816
+#define VK_PAD_RTHUMB_PRESS 0x5817
+#define VK_PAD_LTHUMB_UP 0x5820
+#define VK_PAD_LTHUMB_DOWN 0x5821
+#define VK_PAD_LTHUMB_RIGHT 0x5822
+#define VK_PAD_LTHUMB_LEFT 0x5823
+#define VK_PAD_LTHUMB_UPLEFT 0x5824
+#define VK_PAD_LTHUMB_UPRIGHT 0x5825
+#define VK_PAD_LTHUMB_DOWNRIGHT 0x5826
+#define VK_PAD_LTHUMB_DOWNLEFT 0x5827
+#define VK_PAD_RTHUMB_UP 0x5830
+#define VK_PAD_RTHUMB_DOWN 0x5831
+#define VK_PAD_RTHUMB_RIGHT 0x5832
+#define VK_PAD_RTHUMB_LEFT 0x5833
+#define VK_PAD_RTHUMB_UPLEFT 0x5834
+#define VK_PAD_RTHUMB_UPRIGHT 0x5835
+#define VK_PAD_RTHUMB_DOWNRIGHT 0x5836
+#define VK_PAD_RTHUMB_DOWNLEFT 0x5837
+
+/*
+ * Deadzones are for analogue joystick controls on the joypad
+ * which determine when input should be assumed to be in the
+ * middle of the pad. This is a threshold to stop a joypad
+ * controlling the game when the player isn't touching the
+ * controls.
+ */
+
+#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849
+#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
+#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30
+
+
+/*
+ * Defines what type of abilities the type of joystick has
+ * DEVTYPE_GAMEPAD is available for all joysticks, however
+ * there may be more specific identifiers for other joysticks
+ * which are being used.
+ */
+
+#define XINPUT_DEVTYPE_GAMEPAD 0x01
+#define XINPUT_DEVSUBTYPE_GAMEPAD 0x01
+#define XINPUT_DEVSUBTYPE_WHEEL 0x02
+#define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
+#define XINPUT_DEVSUBTYPE_FLIGHT_SICK 0x04
+#define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
+#define XINPUT_DEVSUBTYPE_GUITAR 0x06
+#define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
+
+/*
+ * These are used with the XInputGetCapabilities function to
+ * determine the abilities to the joystick which has been
+ * plugged in.
+ */
+
+#define XINPUT_CAPS_VOICE_SUPPORTED 0x0004
+#define XINPUT_FLAG_GAMEPAD 0x00000001
+
+/*
+ * Defines the status of the battery if one is used in the
+ * attached joystick. The first two define if the joystick
+ * supports a battery. Disconnected means that the joystick
+ * isn't connected. Wired shows that the joystick is a wired
+ * joystick.
+ */
+
+#define BATTERY_DEVTYPE_GAMEPAD 0x00
+#define BATTERY_DEVTYPE_HEADSET 0x01
+#define BATTERY_TYPE_DISCONNECTED 0x00
+#define BATTERY_TYPE_WIRED 0x01
+#define BATTERY_TYPE_ALKALINE 0x02
+#define BATTERY_TYPE_NIMH 0x03
+#define BATTERY_TYPE_UNKNOWN 0xFF
+#define BATTERY_LEVEL_EMPTY 0x00
+#define BATTERY_LEVEL_LOW 0x01
+#define BATTERY_LEVEL_MEDIUM 0x02
+#define BATTERY_LEVEL_FULL 0x03
+
+/*
+ * How many joysticks can be used with this library. Games that
+ * use the xinput library will not go over this number.
+ */
+
+#define XUSER_MAX_COUNT 4
+#define XUSER_INDEX_ANY 0x000000FF
+
+/*
+ * Defines the structure of an xbox 360 joystick.
+ */
+
+typedef struct _XINPUT_GAMEPAD {
+ WORD wButtons;
+ BYTE bLeftTrigger;
+ BYTE bRightTrigger;
+ SHORT sThumbLX;
+ SHORT sThumbLY;
+ SHORT sThumbRX;
+ SHORT sThumbRY;
+} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
+
+typedef struct _XINPUT_STATE {
+ DWORD dwPacketNumber;
+ XINPUT_GAMEPAD Gamepad;
+} XINPUT_STATE, *PXINPUT_STATE;
+
+/*
+ * Defines the structure of how much vibration is set on both the
+ * right and left motors in a joystick. If you're not using a 360
+ * joystick you will have to map these to your device.
+ */
+
+typedef struct _XINPUT_VIBRATION {
+ WORD wLeftMotorSpeed;
+ WORD wRightMotorSpeed;
+} XINPUT_VIBRATION, *PXINPUT_VIBRATION;
+
+/*
+ * Defines the structure for what kind of abilities the joystick has
+ * such abilities are things such as if the joystick has the ability
+ * to send and receive audio, if the joystick is in fact a driving
+ * wheel or perhaps if the joystick is some kind of dance pad or
+ * guitar.
+ */
+
+typedef struct _XINPUT_CAPABILITIES {
+ BYTE Type;
+ BYTE SubType;
+ WORD Flags;
+ XINPUT_GAMEPAD Gamepad;
+ XINPUT_VIBRATION Vibration;
+} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
+
+/*
+ * Defines the structure for a joystick input event which is
+ * retrieved using the function XInputGetKeystroke
+ */
+typedef struct _XINPUT_KEYSTROKE {
+ WORD VirtualKey;
+ WCHAR Unicode;
+ WORD Flags;
+ BYTE UserIndex;
+ BYTE HidCode;
+} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;
+
+typedef struct _XINPUT_BATTERY_INFORMATION
+{
+ BYTE BatteryType;
+ BYTE BatteryLevel;
+} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void WINAPI XInputEnable(WINBOOL);
+DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
+DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);
+DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);
+DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);
+DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);
+DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_XINPUT_H */
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear.h
new file mode 100644
index 0000000..6c87353
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear.h
@@ -0,0 +1,25539 @@
+/*
+/// # Nuklear
+/// ![](https://cloud.githubusercontent.com/assets/8057201/11761525/ae06f0ca-a0c6-11e5-819d-5610b25f6ef4.gif)
+///
+/// ## Contents
+/// 1. About section
+/// 2. Highlights section
+/// 3. Features section
+/// 4. Usage section
+/// 1. Flags section
+/// 2. Constants section
+/// 3. Dependencies section
+/// 5. Example section
+/// 6. API section
+/// 1. Context section
+/// 2. Input section
+/// 3. Drawing section
+/// 4. Window section
+/// 5. Layouting section
+/// 6. Groups section
+/// 7. Tree section
+/// 8. Properties section
+/// 7. License section
+/// 8. Changelog section
+/// 9. Gallery section
+/// 10. Credits section
+///
+/// ## About
+/// This is a minimal state immediate mode graphical user interface toolkit
+/// written in ANSI C and licensed under public domain. It was designed as a simple
+/// embeddable user interface for application and does not have any dependencies,
+/// a default renderbackend or OS window and input handling but instead provides a very modular
+/// library approach by using simple input state for input and draw
+/// commands describing primitive shapes as output. So instead of providing a
+/// layered library that tries to abstract over a number of platform and
+/// render backends it only focuses on the actual UI.
+///
+/// ## Highlights
+/// - Graphical user interface toolkit
+/// - Single header library
+/// - Written in C89 (a.k.a. ANSI C or ISO C90)
+/// - Small codebase (~18kLOC)
+/// - Focus on portability, efficiency and simplicity
+/// - No dependencies (not even the standard library if not wanted)
+/// - Fully skinnable and customizable
+/// - Low memory footprint with total memory control if needed or wanted
+/// - UTF-8 support
+/// - No global or hidden state
+/// - Customizable library modules (you can compile and use only what you need)
+/// - Optional font baker and vertex buffer output
+///
+/// ## Features
+/// - Absolutely no platform dependent code
+/// - Memory management control ranging from/to
+/// - Ease of use by allocating everything from standard library
+/// - Control every byte of memory inside the library
+/// - Font handling control ranging from/to
+/// - Use your own font implementation for everything
+/// - Use this libraries internal font baking and handling API
+/// - Drawing output control ranging from/to
+/// - Simple shapes for more high level APIs which already have drawing capabilities
+/// - Hardware accessible anti-aliased vertex buffer output
+/// - Customizable colors and properties ranging from/to
+/// - Simple changes to color by filling a simple color table
+/// - Complete control with ability to use skinning to decorate widgets
+/// - Bendable UI library with widget ranging from/to
+/// - Basic widgets like buttons, checkboxes, slider, ...
+/// - Advanced widget like abstract comboboxes, contextual menus,...
+/// - Compile time configuration to only compile what you need
+/// - Subset which can be used if you do not want to link or use the standard library
+/// - Can be easily modified to only update on user input instead of frame updates
+///
+/// ## Usage
+/// This library is self contained in one single header file and can be used either
+/// in header only mode or in implementation mode. The header only mode is used
+/// by default when included and allows including this header in other headers
+/// and does not contain the actual implementation. <br /><br />
+///
+/// The implementation mode requires to define the preprocessor macro
+/// NK_IMPLEMENTATION in *one* .c/.cpp file before #includeing this file, e.g.:
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C
+/// #define NK_IMPLEMENTATION
+/// #include "nuklear.h"
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Also optionally define the symbols listed in the section "OPTIONAL DEFINES"
+/// below in header and implementation mode if you want to use additional functionality
+/// or need more control over the library.
+///
+/// !!! WARNING
+/// Every time nuklear is included define the same compiler flags. This very important not doing so could lead to compiler errors or even worse stack corruptions.
+///
+/// ### Flags
+/// Flag | Description
+/// --------------------------------|------------------------------------------
+/// NK_PRIVATE | If defined declares all functions as static, so they can only be accessed inside the file that contains the implementation
+/// NK_INCLUDE_FIXED_TYPES | If defined it will include header `<stdint.h>` for fixed sized types otherwise nuklear tries to select the correct type. If that fails it will throw a compiler error and you have to select the correct types yourself.
+/// NK_INCLUDE_DEFAULT_ALLOCATOR | If defined it will include header `<stdlib.h>` and provide additional functions to use this library without caring for memory allocation control and therefore ease memory management.
+/// NK_INCLUDE_STANDARD_IO | If defined it will include header `<stdio.h>` and provide additional functions depending on file loading.
+/// NK_INCLUDE_STANDARD_VARARGS | If defined it will include header <stdio.h> and provide additional functions depending on file loading.
+/// NK_INCLUDE_VERTEX_BUFFER_OUTPUT | Defining this adds a vertex draw command list backend to this library, which allows you to convert queue commands into vertex draw commands. This is mainly if you need a hardware accessible format for OpenGL, DirectX, Vulkan, Metal,...
+/// NK_INCLUDE_FONT_BAKING | Defining this adds `stb_truetype` and `stb_rect_pack` implementation to this library and provides font baking and rendering. If you already have font handling or do not want to use this font handler you don't have to define it.
+/// NK_INCLUDE_DEFAULT_FONT | Defining this adds the default font: ProggyClean.ttf into this library which can be loaded into a font atlas and allows using this library without having a truetype font
+/// NK_INCLUDE_COMMAND_USERDATA | Defining this adds a userdata pointer into each command. Can be useful for example if you want to provide custom shaders depending on the used widget. Can be combined with the style structures.
+/// NK_BUTTON_TRIGGER_ON_RELEASE | Different platforms require button clicks occurring either on buttons being pressed (up to down) or released (down to up). By default this library will react on buttons being pressed, but if you define this it will only trigger if a button is released.
+/// NK_ZERO_COMMAND_MEMORY | Defining this will zero out memory for each drawing command added to a drawing queue (inside nk_command_buffer_push). Zeroing command memory is very useful for fast checking (using memcmp) if command buffers are equal and avoid drawing frames when nothing on screen has changed since previous frame.
+///
+/// !!! WARNING
+/// The following flags will pull in the standard C library:
+/// - NK_INCLUDE_DEFAULT_ALLOCATOR
+/// - NK_INCLUDE_STANDARD_IO
+/// - NK_INCLUDE_STANDARD_VARARGS
+///
+/// !!! WARNING
+/// The following flags if defined need to be defined for both header and implementation:
+/// - NK_INCLUDE_FIXED_TYPES
+/// - NK_INCLUDE_DEFAULT_ALLOCATOR
+/// - NK_INCLUDE_STANDARD_VARARGS
+/// - NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+/// - NK_INCLUDE_FONT_BAKING
+/// - NK_INCLUDE_DEFAULT_FONT
+/// - NK_INCLUDE_STANDARD_VARARGS
+/// - NK_INCLUDE_COMMAND_USERDATA
+///
+/// ### Constants
+/// Define | Description
+/// --------------------------------|---------------------------------------
+/// NK_BUFFER_DEFAULT_INITIAL_SIZE | Initial buffer size allocated by all buffers while using the default allocator functions included by defining NK_INCLUDE_DEFAULT_ALLOCATOR. If you don't want to allocate the default 4k memory then redefine it.
+/// NK_MAX_NUMBER_BUFFER | Maximum buffer size for the conversion buffer between float and string Under normal circumstances this should be more than sufficient.
+/// NK_INPUT_MAX | Defines the max number of bytes which can be added as text input in one frame. Under normal circumstances this should be more than sufficient.
+///
+/// !!! WARNING
+/// The following constants if defined need to be defined for both header and implementation:
+/// - NK_MAX_NUMBER_BUFFER
+/// - NK_BUFFER_DEFAULT_INITIAL_SIZE
+/// - NK_INPUT_MAX
+///
+/// ### Dependencies
+/// Function | Description
+/// ------------|---------------------------------------------------------------
+/// NK_ASSERT | If you don't define this, nuklear will use <assert.h> with assert().
+/// NK_MEMSET | You can define this to 'memset' or your own memset implementation replacement. If not nuklear will use its own version.
+/// NK_MEMCPY | You can define this to 'memcpy' or your own memcpy implementation replacement. If not nuklear will use its own version.
+/// NK_SQRT | You can define this to 'sqrt' or your own sqrt implementation replacement. If not nuklear will use its own slow and not highly accurate version.
+/// NK_SIN | You can define this to 'sinf' or your own sine implementation replacement. If not nuklear will use its own approximation implementation.
+/// NK_COS | You can define this to 'cosf' or your own cosine implementation replacement. If not nuklear will use its own approximation implementation.
+/// NK_STRTOD | You can define this to `strtod` or your own string to double conversion implementation replacement. If not defined nuklear will use its own imprecise and possibly unsafe version (does not handle nan or infinity!).
+/// NK_DTOA | You can define this to `dtoa` or your own double to string conversion implementation replacement. If not defined nuklear will use its own imprecise and possibly unsafe version (does not handle nan or infinity!).
+/// NK_VSNPRINTF| If you define `NK_INCLUDE_STANDARD_VARARGS` as well as `NK_INCLUDE_STANDARD_IO` and want to be safe define this to `vsnprintf` on compilers supporting later versions of C or C++. By default nuklear will check for your stdlib version in C as well as compiler version in C++. if `vsnprintf` is available it will define it to `vsnprintf` directly. If not defined and if you have older versions of C or C++ it will be defined to `vsprintf` which is unsafe.
+///
+/// !!! WARNING
+/// The following dependencies will pull in the standard C library if not redefined:
+/// - NK_ASSERT
+///
+/// !!! WARNING
+/// The following dependencies if defined need to be defined for both header and implementation:
+/// - NK_ASSERT
+///
+/// !!! WARNING
+/// The following dependencies if defined need to be defined only for the implementation part:
+/// - NK_MEMSET
+/// - NK_MEMCPY
+/// - NK_SQRT
+/// - NK_SIN
+/// - NK_COS
+/// - NK_STRTOD
+/// - NK_DTOA
+/// - NK_VSNPRINTF
+///
+/// ## Example
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// // init gui state
+/// enum {EASY, HARD};
+/// static int op = EASY;
+/// static float value = 0.6f;
+/// static int i = 20;
+/// struct nk_context ctx;
+///
+/// nk_init_fixed(&ctx, calloc(1, MAX_MEMORY), MAX_MEMORY, &font);
+/// if (nk_begin(&ctx, "Show", nk_rect(50, 50, 220, 220),
+/// NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_CLOSABLE)) {
+/// // fixed widget pixel width
+/// nk_layout_row_static(&ctx, 30, 80, 1);
+/// if (nk_button_label(&ctx, "button")) {
+/// // event handling
+/// }
+///
+/// // fixed widget window ratio width
+/// nk_layout_row_dynamic(&ctx, 30, 2);
+/// if (nk_option_label(&ctx, "easy", op == EASY)) op = EASY;
+/// if (nk_option_label(&ctx, "hard", op == HARD)) op = HARD;
+///
+/// // custom widget pixel width
+/// nk_layout_row_begin(&ctx, NK_STATIC, 30, 2);
+/// {
+/// nk_layout_row_push(&ctx, 50);
+/// nk_label(&ctx, "Volume:", NK_TEXT_LEFT);
+/// nk_layout_row_push(&ctx, 110);
+/// nk_slider_float(&ctx, 0, &value, 1.0f, 0.1f);
+/// }
+/// nk_layout_row_end(&ctx);
+/// }
+/// nk_end(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// ![](https://cloud.githubusercontent.com/assets/8057201/10187981/584ecd68-675c-11e5-897c-822ef534a876.png)
+///
+/// ## API
+///
+*/
+#ifndef NK_SINGLE_FILE
+ #define NK_SINGLE_FILE
+#endif
+
+#ifndef NK_NUKLEAR_H_
+#define NK_NUKLEAR_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * ==============================================================
+ *
+ * CONSTANTS
+ *
+ * ===============================================================
+ */
+#define NK_UNDEFINED (-1.0f)
+#define NK_UTF_INVALID 0xFFFD /* internal invalid utf8 rune */
+#define NK_UTF_SIZE 4 /* describes the number of bytes a glyph consists of*/
+#ifndef NK_INPUT_MAX
+ #define NK_INPUT_MAX 16
+#endif
+#ifndef NK_MAX_NUMBER_BUFFER
+ #define NK_MAX_NUMBER_BUFFER 64
+#endif
+#ifndef NK_SCROLLBAR_HIDING_TIMEOUT
+ #define NK_SCROLLBAR_HIDING_TIMEOUT 4.0f
+#endif
+/*
+ * ==============================================================
+ *
+ * HELPER
+ *
+ * ===============================================================
+ */
+#ifndef NK_API
+ #ifdef NK_PRIVATE
+ #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199409L))
+ #define NK_API static inline
+ #elif defined(__cplusplus)
+ #define NK_API static inline
+ #else
+ #define NK_API static
+ #endif
+ #else
+ #define NK_API extern
+ #endif
+#endif
+#ifndef NK_LIB
+ #ifdef NK_SINGLE_FILE
+ #define NK_LIB static
+ #else
+ #define NK_LIB extern
+ #endif
+#endif
+
+#define NK_INTERN static
+#define NK_STORAGE static
+#define NK_GLOBAL static
+
+#define NK_FLAG(x) (1 << (x))
+#define NK_STRINGIFY(x) #x
+#define NK_MACRO_STRINGIFY(x) NK_STRINGIFY(x)
+#define NK_STRING_JOIN_IMMEDIATE(arg1, arg2) arg1 ## arg2
+#define NK_STRING_JOIN_DELAY(arg1, arg2) NK_STRING_JOIN_IMMEDIATE(arg1, arg2)
+#define NK_STRING_JOIN(arg1, arg2) NK_STRING_JOIN_DELAY(arg1, arg2)
+
+#ifdef _MSC_VER
+ #define NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__COUNTER__)
+#else
+ #define NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__LINE__)
+#endif
+
+#ifndef NK_STATIC_ASSERT
+ #define NK_STATIC_ASSERT(exp) typedef char NK_UNIQUE_NAME(_dummy_array)[(exp)?1:-1]
+#endif
+
+#ifndef NK_FILE_LINE
+#ifdef _MSC_VER
+ #define NK_FILE_LINE __FILE__ ":" NK_MACRO_STRINGIFY(__COUNTER__)
+#else
+ #define NK_FILE_LINE __FILE__ ":" NK_MACRO_STRINGIFY(__LINE__)
+#endif
+#endif
+
+#define NK_MIN(a,b) ((a) < (b) ? (a) : (b))
+#define NK_MAX(a,b) ((a) < (b) ? (b) : (a))
+#define NK_CLAMP(i,v,x) (NK_MAX(NK_MIN(v,x), i))
+
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+ #if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
+ #include <sal.h>
+ #define NK_PRINTF_FORMAT_STRING _Printf_format_string_
+ #else
+ #define NK_PRINTF_FORMAT_STRING
+ #endif
+ #if defined(__GNUC__)
+ #define NK_PRINTF_VARARG_FUNC(fmtargnumber) __attribute__((format(__printf__, fmtargnumber, fmtargnumber+1)))
+ #define NK_PRINTF_VALIST_FUNC(fmtargnumber) __attribute__((format(__printf__, fmtargnumber, 0)))
+ #else
+ #define NK_PRINTF_VARARG_FUNC(fmtargnumber)
+ #define NK_PRINTF_VALIST_FUNC(fmtargnumber)
+ #endif
+ #include <stdarg.h> /* valist, va_start, va_end, ... */
+#endif
+
+/*
+ * ===============================================================
+ *
+ * BASIC
+ *
+ * ===============================================================
+ */
+#ifdef NK_INCLUDE_FIXED_TYPES
+ #include <stdint.h>
+ #define NK_INT8 int8_t
+ #define NK_UINT8 uint8_t
+ #define NK_INT16 int16_t
+ #define NK_UINT16 uint16_t
+ #define NK_INT32 int32_t
+ #define NK_UINT32 uint32_t
+ #define NK_SIZE_TYPE uintptr_t
+ #define NK_POINTER_TYPE uintptr_t
+#else
+ #ifndef NK_INT8
+ #define NK_INT8 char
+ #endif
+ #ifndef NK_UINT8
+ #define NK_UINT8 unsigned char
+ #endif
+ #ifndef NK_INT16
+ #define NK_INT16 signed short
+ #endif
+ #ifndef NK_UINT16
+ #define NK_UINT16 unsigned short
+ #endif
+ #ifndef NK_INT32
+ #if defined(_MSC_VER)
+ #define NK_INT32 __int32
+ #else
+ #define NK_INT32 signed int
+ #endif
+ #endif
+ #ifndef NK_UINT32
+ #if defined(_MSC_VER)
+ #define NK_UINT32 unsigned __int32
+ #else
+ #define NK_UINT32 unsigned int
+ #endif
+ #endif
+ #ifndef NK_SIZE_TYPE
+ #if defined(_WIN64) && defined(_MSC_VER)
+ #define NK_SIZE_TYPE unsigned __int64
+ #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)
+ #define NK_SIZE_TYPE unsigned __int32
+ #elif defined(__GNUC__) || defined(__clang__)
+ #if defined(__x86_64__) || defined(__ppc64__)
+ #define NK_SIZE_TYPE unsigned long
+ #else
+ #define NK_SIZE_TYPE unsigned int
+ #endif
+ #else
+ #define NK_SIZE_TYPE unsigned long
+ #endif
+ #endif
+ #ifndef NK_POINTER_TYPE
+ #if defined(_WIN64) && defined(_MSC_VER)
+ #define NK_POINTER_TYPE unsigned __int64
+ #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)
+ #define NK_POINTER_TYPE unsigned __int32
+ #elif defined(__GNUC__) || defined(__clang__)
+ #if defined(__x86_64__) || defined(__ppc64__)
+ #define NK_POINTER_TYPE unsigned long
+ #else
+ #define NK_POINTER_TYPE unsigned int
+ #endif
+ #else
+ #define NK_POINTER_TYPE unsigned long
+ #endif
+ #endif
+#endif
+
+typedef NK_INT8 nk_char;
+typedef NK_UINT8 nk_uchar;
+typedef NK_UINT8 nk_byte;
+typedef NK_INT16 nk_short;
+typedef NK_UINT16 nk_ushort;
+typedef NK_INT32 nk_int;
+typedef NK_UINT32 nk_uint;
+typedef NK_SIZE_TYPE nk_size;
+typedef NK_POINTER_TYPE nk_ptr;
+
+typedef nk_uint nk_hash;
+typedef nk_uint nk_flags;
+typedef nk_uint nk_rune;
+
+/* Make sure correct type size:
+ * This will fire with a negative subscript error if the type sizes
+ * are set incorrectly by the compiler, and compile out if not */
+NK_STATIC_ASSERT(sizeof(nk_short) == 2);
+NK_STATIC_ASSERT(sizeof(nk_ushort) == 2);
+NK_STATIC_ASSERT(sizeof(nk_uint) == 4);
+NK_STATIC_ASSERT(sizeof(nk_int) == 4);
+NK_STATIC_ASSERT(sizeof(nk_byte) == 1);
+NK_STATIC_ASSERT(sizeof(nk_flags) >= 4);
+NK_STATIC_ASSERT(sizeof(nk_rune) >= 4);
+NK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));
+NK_STATIC_ASSERT(sizeof(nk_ptr) >= sizeof(void*));
+
+/* ============================================================================
+ *
+ * API
+ *
+ * =========================================================================== */
+struct nk_buffer;
+struct nk_allocator;
+struct nk_command_buffer;
+struct nk_draw_command;
+struct nk_convert_config;
+struct nk_style_item;
+struct nk_text_edit;
+struct nk_draw_list;
+struct nk_user_font;
+struct nk_panel;
+struct nk_context;
+struct nk_draw_vertex_layout_element;
+struct nk_style_button;
+struct nk_style_toggle;
+struct nk_style_selectable;
+struct nk_style_slide;
+struct nk_style_progress;
+struct nk_style_scrollbar;
+struct nk_style_edit;
+struct nk_style_property;
+struct nk_style_chart;
+struct nk_style_combo;
+struct nk_style_tab;
+struct nk_style_window_header;
+struct nk_style_window;
+
+enum {nk_false, nk_true};
+struct nk_color {nk_byte r,g,b,a;};
+struct nk_colorf {float r,g,b,a;};
+struct nk_vec2 {float x,y;};
+struct nk_vec2i {short x, y;};
+struct nk_rect {float x,y,w,h;};
+struct nk_recti {short x,y,w,h;};
+typedef char nk_glyph[NK_UTF_SIZE];
+typedef union {void *ptr; int id;} nk_handle;
+struct nk_image {nk_handle handle;unsigned short w,h;unsigned short region[4];};
+struct nk_cursor {struct nk_image img; struct nk_vec2 size, offset;};
+struct nk_scroll {nk_uint x, y;};
+
+enum nk_heading {NK_UP, NK_RIGHT, NK_DOWN, NK_LEFT};
+enum nk_button_behavior {NK_BUTTON_DEFAULT, NK_BUTTON_REPEATER};
+enum nk_modify {NK_FIXED = nk_false, NK_MODIFIABLE = nk_true};
+enum nk_orientation {NK_VERTICAL, NK_HORIZONTAL};
+enum nk_collapse_states {NK_MINIMIZED = nk_false, NK_MAXIMIZED = nk_true};
+enum nk_show_states {NK_HIDDEN = nk_false, NK_SHOWN = nk_true};
+enum nk_chart_type {NK_CHART_LINES, NK_CHART_COLUMN, NK_CHART_MAX};
+enum nk_chart_event {NK_CHART_HOVERING = 0x01, NK_CHART_CLICKED = 0x02};
+enum nk_color_format {NK_RGB, NK_RGBA};
+enum nk_popup_type {NK_POPUP_STATIC, NK_POPUP_DYNAMIC};
+enum nk_layout_format {NK_DYNAMIC, NK_STATIC};
+enum nk_tree_type {NK_TREE_NODE, NK_TREE_TAB};
+
+typedef void*(*nk_plugin_alloc)(nk_handle, void *old, nk_size);
+typedef void (*nk_plugin_free)(nk_handle, void *old);
+typedef int(*nk_plugin_filter)(const struct nk_text_edit*, nk_rune unicode);
+typedef void(*nk_plugin_paste)(nk_handle, struct nk_text_edit*);
+typedef void(*nk_plugin_copy)(nk_handle, const char*, int len);
+
+struct nk_allocator {
+ nk_handle userdata;
+ nk_plugin_alloc alloc;
+ nk_plugin_free free;
+};
+enum nk_symbol_type {
+ NK_SYMBOL_NONE,
+ NK_SYMBOL_X,
+ NK_SYMBOL_UNDERSCORE,
+ NK_SYMBOL_CIRCLE_SOLID,
+ NK_SYMBOL_CIRCLE_OUTLINE,
+ NK_SYMBOL_RECT_SOLID,
+ NK_SYMBOL_RECT_OUTLINE,
+ NK_SYMBOL_TRIANGLE_UP,
+ NK_SYMBOL_TRIANGLE_DOWN,
+ NK_SYMBOL_TRIANGLE_LEFT,
+ NK_SYMBOL_TRIANGLE_RIGHT,
+ NK_SYMBOL_PLUS,
+ NK_SYMBOL_MINUS,
+ NK_SYMBOL_MAX
+};
+/* =============================================================================
+ *
+ * CONTEXT
+ *
+ * =============================================================================*/
+/*/// ### Context
+/// Contexts are the main entry point and the majestro of nuklear and contain all required state.
+/// They are used for window, memory, input, style, stack, commands and time management and need
+/// to be passed into all nuklear GUI specific functions.
+///
+/// #### Usage
+/// To use a context it first has to be initialized which can be achieved by calling
+/// one of either `nk_init_default`, `nk_init_fixed`, `nk_init`, `nk_init_custom`.
+/// Each takes in a font handle and a specific way of handling memory. Memory control
+/// hereby ranges from standard library to just specifying a fixed sized block of memory
+/// which nuklear has to manage itself from.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// // [...]
+/// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// --------------------|-------------------------------------------------------
+/// __nk_init_default__ | Initializes context with standard library memory allocation (malloc,free)
+/// __nk_init_fixed__ | Initializes context from single fixed size memory block
+/// __nk_init__ | Initializes context with memory allocator callbacks for alloc and free
+/// __nk_init_custom__ | Initializes context from two buffers. One for draw commands the other for window/panel/table allocations
+/// __nk_clear__ | Called at the end of the frame to reset and prepare the context for the next frame
+/// __nk_free__ | Shutdown and free all memory allocated inside the context
+/// __nk_set_user_data__| Utility function to pass user data to draw command
+ */
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+/*/// #### nk_init_default
+/// Initializes a `nk_context` struct with a default standard library allocator.
+/// Should be used if you don't want to be bothered with memory management in nuklear.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_init_default(struct nk_context *ctx, const struct nk_user_font *font);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|---------------------------------------------------------------
+/// __ctx__ | Must point to an either stack or heap allocated `nk_context` struct
+/// __font__ | Must point to a previously initialized font handle for more info look at font documentation
+///
+/// Returns either `false(0)` on failure or `true(1)` on success.
+///
+*/
+NK_API int nk_init_default(struct nk_context*, const struct nk_user_font*);
+#endif
+/*/// #### nk_init_fixed
+/// Initializes a `nk_context` struct from single fixed size memory block
+/// Should be used if you want complete control over nuklear's memory management.
+/// Especially recommended for system with little memory or systems with virtual memory.
+/// For the later case you can just allocate for example 16MB of virtual memory
+/// and only the required amount of memory will actually be committed.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_init_fixed(struct nk_context *ctx, void *memory, nk_size size, const struct nk_user_font *font);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// !!! Warning
+/// make sure the passed memory block is aligned correctly for `nk_draw_commands`.
+///
+/// Parameter | Description
+/// ------------|--------------------------------------------------------------
+/// __ctx__ | Must point to an either stack or heap allocated `nk_context` struct
+/// __memory__ | Must point to a previously allocated memory block
+/// __size__ | Must contain the total size of __memory__
+/// __font__ | Must point to a previously initialized font handle for more info look at font documentation
+///
+/// Returns either `false(0)` on failure or `true(1)` on success.
+*/
+NK_API int nk_init_fixed(struct nk_context*, void *memory, nk_size size, const struct nk_user_font*);
+/*/// #### nk_init
+/// Initializes a `nk_context` struct with memory allocation callbacks for nuklear to allocate
+/// memory from. Used internally for `nk_init_default` and provides a kitchen sink allocation
+/// interface to nuklear. Can be useful for cases like monitoring memory consumption.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_init(struct nk_context *ctx, struct nk_allocator *alloc, const struct nk_user_font *font);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|---------------------------------------------------------------
+/// __ctx__ | Must point to an either stack or heap allocated `nk_context` struct
+/// __alloc__ | Must point to a previously allocated memory allocator
+/// __font__ | Must point to a previously initialized font handle for more info look at font documentation
+///
+/// Returns either `false(0)` on failure or `true(1)` on success.
+*/
+NK_API int nk_init(struct nk_context*, struct nk_allocator*, const struct nk_user_font*);
+/*/// #### nk_init_custom
+/// Initializes a `nk_context` struct from two different either fixed or growing
+/// buffers. The first buffer is for allocating draw commands while the second buffer is
+/// used for allocating windows, panels and state tables.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_init_custom(struct nk_context *ctx, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font *font);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|---------------------------------------------------------------
+/// __ctx__ | Must point to an either stack or heap allocated `nk_context` struct
+/// __cmds__ | Must point to a previously initialized memory buffer either fixed or dynamic to store draw commands into
+/// __pool__ | Must point to a previously initialized memory buffer either fixed or dynamic to store windows, panels and tables
+/// __font__ | Must point to a previously initialized font handle for more info look at font documentation
+///
+/// Returns either `false(0)` on failure or `true(1)` on success.
+*/
+NK_API int nk_init_custom(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font*);
+/*/// #### nk_clear
+/// Resets the context state at the end of the frame. This includes mostly
+/// garbage collector tasks like removing windows or table not called and therefore
+/// used anymore.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_clear(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+*/
+NK_API void nk_clear(struct nk_context*);
+/*/// #### nk_free
+/// Frees all memory allocated by nuklear. Not needed if context was
+/// initialized with `nk_init_fixed`.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_free(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+*/
+NK_API void nk_free(struct nk_context*);
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+/*/// #### nk_set_user_data
+/// Sets the currently passed userdata passed down into each draw command.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_set_user_data(struct nk_context *ctx, nk_handle data);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|--------------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __data__ | Handle with either pointer or index to be passed into every draw commands
+*/
+NK_API void nk_set_user_data(struct nk_context*, nk_handle handle);
+#endif
+/* =============================================================================
+ *
+ * INPUT
+ *
+ * =============================================================================*/
+/*/// ### Input
+/// The input API is responsible for holding the current input state composed of
+/// mouse, key and text input states.
+/// It is worth noting that no direct OS or window handling is done in nuklear.
+/// Instead all input state has to be provided by platform specific code. This on one hand
+/// expects more work from the user and complicates usage but on the other hand
+/// provides simple abstraction over a big number of platforms, libraries and other
+/// already provided functionality.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// nk_input_begin(&ctx);
+/// while (GetEvent(&evt)) {
+/// if (evt.type == MOUSE_MOVE)
+/// nk_input_motion(&ctx, evt.motion.x, evt.motion.y);
+/// else if (evt.type == [...]) {
+/// // [...]
+/// }
+/// } nk_input_end(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Usage
+/// Input state needs to be provided to nuklear by first calling `nk_input_begin`
+/// which resets internal state like delta mouse position and button transistions.
+/// After `nk_input_begin` all current input state needs to be provided. This includes
+/// mouse motion, button and key pressed and released, text input and scrolling.
+/// Both event- or state-based input handling are supported by this API
+/// and should work without problems. Finally after all input state has been
+/// mirrored `nk_input_end` needs to be called to finish input process.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// Event evt;
+/// nk_input_begin(&ctx);
+/// while (GetEvent(&evt)) {
+/// if (evt.type == MOUSE_MOVE)
+/// nk_input_motion(&ctx, evt.motion.x, evt.motion.y);
+/// else if (evt.type == [...]) {
+/// // [...]
+/// }
+/// }
+/// nk_input_end(&ctx);
+/// // [...]
+/// nk_clear(&ctx);
+/// } nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// --------------------|-------------------------------------------------------
+/// __nk_input_begin__ | Begins the input mirroring process. Needs to be called before all other `nk_input_xxx` calls
+/// __nk_input_motion__ | Mirrors mouse cursor position
+/// __nk_input_key__ | Mirrors key state with either pressed or released
+/// __nk_input_button__ | Mirrors mouse button state with either pressed or released
+/// __nk_input_scroll__ | Mirrors mouse scroll values
+/// __nk_input_char__ | Adds a single ASCII text character into an internal text buffer
+/// __nk_input_glyph__ | Adds a single multi-byte UTF-8 character into an internal text buffer
+/// __nk_input_unicode__| Adds a single unicode rune into an internal text buffer
+/// __nk_input_end__ | Ends the input mirroring process by calculating state changes. Don't call any `nk_input_xxx` function referenced above after this call
+*/
+enum nk_keys {
+ NK_KEY_NONE,
+ NK_KEY_SHIFT,
+ NK_KEY_CTRL,
+ NK_KEY_DEL,
+ NK_KEY_ENTER,
+ NK_KEY_TAB,
+ NK_KEY_BACKSPACE,
+ NK_KEY_COPY,
+ NK_KEY_CUT,
+ NK_KEY_PASTE,
+ NK_KEY_UP,
+ NK_KEY_DOWN,
+ NK_KEY_LEFT,
+ NK_KEY_RIGHT,
+ /* Shortcuts: text field */
+ NK_KEY_TEXT_INSERT_MODE,
+ NK_KEY_TEXT_REPLACE_MODE,
+ NK_KEY_TEXT_RESET_MODE,
+ NK_KEY_TEXT_LINE_START,
+ NK_KEY_TEXT_LINE_END,
+ NK_KEY_TEXT_START,
+ NK_KEY_TEXT_END,
+ NK_KEY_TEXT_UNDO,
+ NK_KEY_TEXT_REDO,
+ NK_KEY_TEXT_SELECT_ALL,
+ NK_KEY_TEXT_WORD_LEFT,
+ NK_KEY_TEXT_WORD_RIGHT,
+ /* Shortcuts: scrollbar */
+ NK_KEY_SCROLL_START,
+ NK_KEY_SCROLL_END,
+ NK_KEY_SCROLL_DOWN,
+ NK_KEY_SCROLL_UP,
+ NK_KEY_MAX
+};
+enum nk_buttons {
+ NK_BUTTON_LEFT,
+ NK_BUTTON_MIDDLE,
+ NK_BUTTON_RIGHT,
+ NK_BUTTON_DOUBLE,
+ NK_BUTTON_MAX
+};
+/*/// #### nk_input_begin
+/// Begins the input mirroring process by resetting text, scroll
+/// mouse, previous mouse position and movement as well as key state transitions,
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_begin(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+*/
+NK_API void nk_input_begin(struct nk_context*);
+/*/// #### nk_input_motion
+/// Mirrors current mouse position to nuklear
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_motion(struct nk_context *ctx, int x, int y);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __x__ | Must hold an integer describing the current mouse cursor x-position
+/// __y__ | Must hold an integer describing the current mouse cursor y-position
+*/
+NK_API void nk_input_motion(struct nk_context*, int x, int y);
+/*/// #### nk_input_key
+/// Mirrors the state of a specific key to nuklear
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_key(struct nk_context*, enum nk_keys key, int down);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __key__ | Must be any value specified in enum `nk_keys` that needs to be mirrored
+/// __down__ | Must be 0 for key is up and 1 for key is down
+*/
+NK_API void nk_input_key(struct nk_context*, enum nk_keys, int down);
+/*/// #### nk_input_button
+/// Mirrors the state of a specific mouse button to nuklear
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_button(struct nk_context *ctx, enum nk_buttons btn, int x, int y, int down);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __btn__ | Must be any value specified in enum `nk_buttons` that needs to be mirrored
+/// __x__ | Must contain an integer describing mouse cursor x-position on click up/down
+/// __y__ | Must contain an integer describing mouse cursor y-position on click up/down
+/// __down__ | Must be 0 for key is up and 1 for key is down
+*/
+NK_API void nk_input_button(struct nk_context*, enum nk_buttons, int x, int y, int down);
+/*/// #### nk_input_scroll
+/// Copies the last mouse scroll value to nuklear. Is generally
+/// a scroll value. So does not have to come from mouse and could also originate
+/// TODO finish this sentence
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_scroll(struct nk_context *ctx, struct nk_vec2 val);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __val__ | vector with both X- as well as Y-scroll value
+*/
+NK_API void nk_input_scroll(struct nk_context*, struct nk_vec2 val);
+/*/// #### nk_input_char
+/// Copies a single ASCII character into an internal text buffer
+/// This is basically a helper function to quickly push ASCII characters into
+/// nuklear.
+///
+/// !!! Note
+/// Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_char(struct nk_context *ctx, char c);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __c__ | Must be a single ASCII character preferable one that can be printed
+*/
+NK_API void nk_input_char(struct nk_context*, char);
+/*/// #### nk_input_glyph
+/// Converts an encoded unicode rune into UTF-8 and copies the result into an
+/// internal text buffer.
+///
+/// !!! Note
+/// Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_glyph(struct nk_context *ctx, const nk_glyph g);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __g__ | UTF-32 unicode codepoint
+*/
+NK_API void nk_input_glyph(struct nk_context*, const nk_glyph);
+/*/// #### nk_input_unicode
+/// Converts a unicode rune into UTF-8 and copies the result
+/// into an internal text buffer.
+/// !!! Note
+/// Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_unicode(struct nk_context*, nk_rune rune);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+/// __rune__ | UTF-32 unicode codepoint
+*/
+NK_API void nk_input_unicode(struct nk_context*, nk_rune);
+/*/// #### nk_input_end
+/// End the input mirroring process by resetting mouse grabbing
+/// state to ensure the mouse cursor is not grabbed indefinitely.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_input_end(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to a previously initialized `nk_context` struct
+*/
+NK_API void nk_input_end(struct nk_context*);
+/* =============================================================================
+ *
+ * DRAWING
+ *
+ * =============================================================================*/
+/*/// ### Drawing
+/// This library was designed to be render backend agnostic so it does
+/// not draw anything to screen directly. Instead all drawn shapes, widgets
+/// are made of, are buffered into memory and make up a command queue.
+/// Each frame therefore fills the command buffer with draw commands
+/// that then need to be executed by the user and his own render backend.
+/// After that the command buffer needs to be cleared and a new frame can be
+/// started. It is probably important to note that the command buffer is the main
+/// drawing API and the optional vertex buffer API only takes this format and
+/// converts it into a hardware accessible format.
+///
+/// #### Usage
+/// To draw all draw commands accumulated over a frame you need your own render
+/// backend able to draw a number of 2D primitives. This includes at least
+/// filled and stroked rectangles, circles, text, lines, triangles and scissors.
+/// As soon as this criterion is met you can iterate over each draw command
+/// and execute each draw command in a interpreter like fashion:
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// switch (cmd->type) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case //...:
+/// //[...]
+/// }
+/// }
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// In program flow context draw commands need to be executed after input has been
+/// gathered and the complete UI with windows and their contained widgets have
+/// been executed and before calling `nk_clear` which frees all previously
+/// allocated draw commands.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// Event evt;
+/// nk_input_begin(&ctx);
+/// while (GetEvent(&evt)) {
+/// if (evt.type == MOUSE_MOVE)
+/// nk_input_motion(&ctx, evt.motion.x, evt.motion.y);
+/// else if (evt.type == [...]) {
+/// [...]
+/// }
+/// }
+/// nk_input_end(&ctx);
+/// //
+/// // [...]
+/// //
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// switch (cmd->type) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case ...:
+/// // [...]
+/// }
+/// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// You probably noticed that you have to draw all of the UI each frame which is
+/// quite wasteful. While the actual UI updating loop is quite fast rendering
+/// without actually needing it is not. So there are multiple things you could do.
+///
+/// First is only update on input. This of course is only an option if your
+/// application only depends on the UI and does not require any outside calculations.
+/// If you actually only update on input make sure to update the UI two times each
+/// frame and call `nk_clear` directly after the first pass and only draw in
+/// the second pass. In addition it is recommended to also add additional timers
+/// to make sure the UI is not drawn more than a fixed number of frames per second.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// // [...wait for input ]
+/// // [...do two UI passes ...]
+/// do_ui(...)
+/// nk_clear(&ctx);
+/// do_ui(...)
+/// //
+/// // draw
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// switch (cmd->type) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case ...:
+/// //[...]
+/// }
+/// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// The second probably more applicable trick is to only draw if anything changed.
+/// It is not really useful for applications with continuous draw loop but
+/// quite useful for desktop applications. To actually get nuklear to only
+/// draw on changes you first have to define `NK_ZERO_COMMAND_MEMORY` and
+/// allocate a memory buffer that will store each unique drawing output.
+/// After each frame you compare the draw command memory inside the library
+/// with your allocated buffer by memcmp. If memcmp detects differences
+/// you have to copy the command buffer into the allocated buffer
+/// and then draw like usual (this example uses fixed memory but you could
+/// use dynamically allocated memory).
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// //[... other defines ...]
+/// #define NK_ZERO_COMMAND_MEMORY
+/// #include "nuklear.h"
+/// //
+/// // setup context
+/// struct nk_context ctx;
+/// void *last = calloc(1,64*1024);
+/// void *buf = calloc(1,64*1024);
+/// nk_init_fixed(&ctx, buf, 64*1024);
+/// //
+/// // loop
+/// while (1) {
+/// // [...input...]
+/// // [...ui...]
+/// void *cmds = nk_buffer_memory(&ctx.memory);
+/// if (memcmp(cmds, last, ctx.memory.allocated)) {
+/// memcpy(last,cmds,ctx.memory.allocated);
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// switch (cmd->type) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case ...:
+/// // [...]
+/// }
+/// }
+/// }
+/// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Finally while using draw commands makes sense for higher abstracted platforms like
+/// X11 and Win32 or drawing libraries it is often desirable to use graphics
+/// hardware directly. Therefore it is possible to just define
+/// `NK_INCLUDE_VERTEX_BUFFER_OUTPUT` which includes optional vertex output.
+/// To access the vertex output you first have to convert all draw commands into
+/// vertexes by calling `nk_convert` which takes in your preferred vertex format.
+/// After successfully converting all draw commands just iterate over and execute all
+/// vertex draw commands:
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// // fill configuration
+/// struct nk_convert_config cfg = {};
+/// static const struct nk_draw_vertex_layout_element vertex_layout[] = {
+/// {NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct your_vertex, pos)},
+/// {NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct your_vertex, uv)},
+/// {NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct your_vertex, col)},
+/// {NK_VERTEX_LAYOUT_END}
+/// };
+/// cfg.shape_AA = NK_ANTI_ALIASING_ON;
+/// cfg.line_AA = NK_ANTI_ALIASING_ON;
+/// cfg.vertex_layout = vertex_layout;
+/// cfg.vertex_size = sizeof(struct your_vertex);
+/// cfg.vertex_alignment = NK_ALIGNOF(struct your_vertex);
+/// cfg.circle_segment_count = 22;
+/// cfg.curve_segment_count = 22;
+/// cfg.arc_segment_count = 22;
+/// cfg.global_alpha = 1.0f;
+/// cfg.null = dev->null;
+/// //
+/// // setup buffers and convert
+/// struct nk_buffer cmds, verts, idx;
+/// nk_buffer_init_default(&cmds);
+/// nk_buffer_init_default(&verts);
+/// nk_buffer_init_default(&idx);
+/// nk_convert(&ctx, &cmds, &verts, &idx, &cfg);
+/// //
+/// // draw
+/// nk_draw_foreach(cmd, &ctx, &cmds) {
+/// if (!cmd->elem_count) continue;
+/// //[...]
+/// }
+/// nk_buffer_free(&cms);
+/// nk_buffer_free(&verts);
+/// nk_buffer_free(&idx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// --------------------|-------------------------------------------------------
+/// __nk__begin__ | Returns the first draw command in the context draw command list to be drawn
+/// __nk__next__ | Increments the draw command iterator to the next command inside the context draw command list
+/// __nk_foreach__ | Iterates over each draw command inside the context draw command list
+/// __nk_convert__ | Converts from the abstract draw commands list into a hardware accessible vertex format
+/// __nk_draw_begin__ | Returns the first vertex command in the context vertex draw list to be executed
+/// __nk__draw_next__ | Increments the vertex command iterator to the next command inside the context vertex command list
+/// __nk__draw_end__ | Returns the end of the vertex draw list
+/// __nk_draw_foreach__ | Iterates over each vertex draw command inside the vertex draw list
+*/
+enum nk_anti_aliasing {NK_ANTI_ALIASING_OFF, NK_ANTI_ALIASING_ON};
+enum nk_convert_result {
+ NK_CONVERT_SUCCESS = 0,
+ NK_CONVERT_INVALID_PARAM = 1,
+ NK_CONVERT_COMMAND_BUFFER_FULL = NK_FLAG(1),
+ NK_CONVERT_VERTEX_BUFFER_FULL = NK_FLAG(2),
+ NK_CONVERT_ELEMENT_BUFFER_FULL = NK_FLAG(3)
+};
+struct nk_draw_null_texture {
+ nk_handle texture; /* texture handle to a texture with a white pixel */
+ struct nk_vec2 uv; /* coordinates to a white pixel in the texture */
+};
+struct nk_convert_config {
+ float global_alpha; /* global alpha value */
+ enum nk_anti_aliasing line_AA; /* line anti-aliasing flag can be turned off if you are tight on memory */
+ enum nk_anti_aliasing shape_AA; /* shape anti-aliasing flag can be turned off if you are tight on memory */
+ unsigned circle_segment_count; /* number of segments used for circles: default to 22 */
+ unsigned arc_segment_count; /* number of segments used for arcs: default to 22 */
+ unsigned curve_segment_count; /* number of segments used for curves: default to 22 */
+ struct nk_draw_null_texture null; /* handle to texture with a white pixel for shape drawing */
+ const struct nk_draw_vertex_layout_element *vertex_layout; /* describes the vertex output format and packing */
+ nk_size vertex_size; /* sizeof one vertex for vertex packing */
+ nk_size vertex_alignment; /* vertex alignment: Can be obtained by NK_ALIGNOF */
+};
+/*/// #### nk__begin
+/// Returns a draw command list iterator to iterate all draw
+/// commands accumulated over one frame.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// const struct nk_command* nk__begin(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | must point to an previously initialized `nk_context` struct at the end of a frame
+///
+/// Returns draw command pointer pointing to the first command inside the draw command list
+*/
+NK_API const struct nk_command* nk__begin(struct nk_context*);
+/*/// #### nk__next
+/// Returns draw command pointer pointing to the next command inside the draw command list
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// const struct nk_command* nk__next(struct nk_context*, const struct nk_command*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+/// __cmd__ | Must point to an previously a draw command either returned by `nk__begin` or `nk__next`
+///
+/// Returns draw command pointer pointing to the next command inside the draw command list
+*/
+NK_API const struct nk_command* nk__next(struct nk_context*, const struct nk_command*);
+/*/// #### nk_foreach
+/// Iterates over each draw command inside the context draw command list
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// #define nk_foreach(c, ctx)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+/// __cmd__ | Command pointer initialized to NULL
+///
+/// Iterates over each draw command inside the context draw command list
+*/
+#define nk_foreach(c, ctx) for((c) = nk__begin(ctx); (c) != 0; (c) = nk__next(ctx,c))
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+/*/// #### nk_convert
+/// Converts all internal draw commands into vertex draw commands and fills
+/// three buffers with vertexes, vertex draw commands and vertex indices. The vertex format
+/// as well as some other configuration values have to be configured by filling out a
+/// `nk_convert_config` struct.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// nk_flags nk_convert(struct nk_context *ctx, struct nk_buffer *cmds,
+// struct nk_buffer *vertices, struct nk_buffer *elements, const struct nk_convert_config*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+/// __cmds__ | Must point to a previously initialized buffer to hold converted vertex draw commands
+/// __vertices__| Must point to a previously initialized buffer to hold all produced vertices
+/// __elements__| Must point to a previously initialized buffer to hold all produced vertex indices
+/// __config__ | Must point to a filled out `nk_config` struct to configure the conversion process
+///
+/// Returns one of enum nk_convert_result error codes
+///
+/// Parameter | Description
+/// --------------------------------|-----------------------------------------------------------
+/// NK_CONVERT_SUCCESS | Signals a successful draw command to vertex buffer conversion
+/// NK_CONVERT_INVALID_PARAM | An invalid argument was passed in the function call
+/// NK_CONVERT_COMMAND_BUFFER_FULL | The provided buffer for storing draw commands is full or failed to allocate more memory
+/// NK_CONVERT_VERTEX_BUFFER_FULL | The provided buffer for storing vertices is full or failed to allocate more memory
+/// NK_CONVERT_ELEMENT_BUFFER_FULL | The provided buffer for storing indicies is full or failed to allocate more memory
+*/
+NK_API nk_flags nk_convert(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *vertices, struct nk_buffer *elements, const struct nk_convert_config*);
+/*/// #### nk__draw_begin
+/// Returns a draw vertex command buffer iterator to iterate over the vertex draw command buffer
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// const struct nk_draw_command* nk__draw_begin(const struct nk_context*, const struct nk_buffer*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+/// __buf__ | Must point to an previously by `nk_convert` filled out vertex draw command buffer
+///
+/// Returns vertex draw command pointer pointing to the first command inside the vertex draw command buffer
+*/
+NK_API const struct nk_draw_command* nk__draw_begin(const struct nk_context*, const struct nk_buffer*);
+/*/// #### nk__draw_end
+/// Returns the vertex draw command at the end of the vertex draw command buffer
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// const struct nk_draw_command* nk__draw_end(const struct nk_context *ctx, const struct nk_buffer *buf);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+/// __buf__ | Must point to an previously by `nk_convert` filled out vertex draw command buffer
+///
+/// Returns vertex draw command pointer pointing to the end of the last vertex draw command inside the vertex draw command buffer
+*/
+NK_API const struct nk_draw_command* nk__draw_end(const struct nk_context*, const struct nk_buffer*);
+/*/// #### nk__draw_next
+/// Increments the vertex draw command buffer iterator
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// const struct nk_draw_command* nk__draw_next(const struct nk_draw_command*, const struct nk_buffer*, const struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __cmd__ | Must point to an previously either by `nk__draw_begin` or `nk__draw_next` returned vertex draw command
+/// __buf__ | Must point to an previously by `nk_convert` filled out vertex draw command buffer
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+///
+/// Returns vertex draw command pointer pointing to the end of the last vertex draw command inside the vertex draw command buffer
+*/
+NK_API const struct nk_draw_command* nk__draw_next(const struct nk_draw_command*, const struct nk_buffer*, const struct nk_context*);
+/*/// #### nk_draw_foreach
+/// Iterates over each vertex draw command inside a vertex draw command buffer
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// #define nk_draw_foreach(cmd,ctx, b)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __cmd__ | `nk_draw_command`iterator set to NULL
+/// __buf__ | Must point to an previously by `nk_convert` filled out vertex draw command buffer
+/// __ctx__ | Must point to an previously initialized `nk_context` struct at the end of a frame
+*/
+#define nk_draw_foreach(cmd,ctx, b) for((cmd)=nk__draw_begin(ctx, b); (cmd)!=0; (cmd)=nk__draw_next(cmd, b, ctx))
+#endif
+/* =============================================================================
+ *
+ * WINDOW
+ *
+ * =============================================================================
+/// ### Window
+/// Windows are the main persistent state used inside nuklear and are life time
+/// controlled by simply "retouching" (i.e. calling) each window each frame.
+/// All widgets inside nuklear can only be added inside the function pair `nk_begin_xxx`
+/// and `nk_end`. Calling any widgets outside these two functions will result in an
+/// assert in debug or no state change in release mode.<br /><br />
+///
+/// Each window holds frame persistent state like position, size, flags, state tables,
+/// and some garbage collected internal persistent widget state. Each window
+/// is linked into a window stack list which determines the drawing and overlapping
+/// order. The topmost window thereby is the currently active window.<br /><br />
+///
+/// To change window position inside the stack occurs either automatically by
+/// user input by being clicked on or programmatically by calling `nk_window_focus`.
+/// Windows by default are visible unless explicitly being defined with flag
+/// `NK_WINDOW_HIDDEN`, the user clicked the close button on windows with flag
+/// `NK_WINDOW_CLOSABLE` or if a window was explicitly hidden by calling
+/// `nk_window_show`. To explicitly close and destroy a window call `nk_window_close`.<br /><br />
+///
+/// #### Usage
+/// To create and keep a window you have to call one of the two `nk_begin_xxx`
+/// functions to start window declarations and `nk_end` at the end. Furthermore it
+/// is recommended to check the return value of `nk_begin_xxx` and only process
+/// widgets inside the window if the value is not 0. Either way you have to call
+/// `nk_end` at the end of window declarations. Furthermore, do not attempt to
+/// nest `nk_begin_xxx` calls which will hopefully result in an assert or if not
+/// in a segmentation fault.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // [... widgets ...]
+/// }
+/// nk_end(ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// In the grand concept window and widget declarations need to occur after input
+/// handling and before drawing to screen. Not doing so can result in higher
+/// latency or at worst invalid behavior. Furthermore make sure that `nk_clear`
+/// is called at the end of the frame. While nuklear's default platform backends
+/// already call `nk_clear` for you if you write your own backend not calling
+/// `nk_clear` can cause asserts or even worse undefined behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// Event evt;
+/// nk_input_begin(&ctx);
+/// while (GetEvent(&evt)) {
+/// if (evt.type == MOUSE_MOVE)
+/// nk_input_motion(&ctx, evt.motion.x, evt.motion.y);
+/// else if (evt.type == [...]) {
+/// nk_input_xxx(...);
+/// }
+/// }
+/// nk_input_end(&ctx);
+///
+/// if (nk_begin_xxx(...) {
+/// //[...]
+/// }
+/// nk_end(ctx);
+///
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case //...:
+/// //[...]
+/// }
+/// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// ------------------------------------|----------------------------------------
+/// nk_begin | Starts a new window; needs to be called every frame for every window (unless hidden) or otherwise the window gets removed
+/// nk_begin_titled | Extended window start with separated title and identifier to allow multiple windows with same name but not title
+/// nk_end | Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup
+//
+/// nk_window_find | Finds and returns the window with give name
+/// nk_window_get_bounds | Returns a rectangle with screen position and size of the currently processed window.
+/// nk_window_get_position | Returns the position of the currently processed window
+/// nk_window_get_size | Returns the size with width and height of the currently processed window
+/// nk_window_get_width | Returns the width of the currently processed window
+/// nk_window_get_height | Returns the height of the currently processed window
+/// nk_window_get_panel | Returns the underlying panel which contains all processing state of the current window
+/// nk_window_get_content_region | Returns the position and size of the currently visible and non-clipped space inside the currently processed window
+/// nk_window_get_content_region_min | Returns the upper rectangle position of the currently visible and non-clipped space inside the currently processed window
+/// nk_window_get_content_region_max | Returns the upper rectangle position of the currently visible and non-clipped space inside the currently processed window
+/// nk_window_get_content_region_size | Returns the size of the currently visible and non-clipped space inside the currently processed window
+/// nk_window_get_canvas | Returns the draw command buffer. Can be used to draw custom widgets
+/// nk_window_has_focus | Returns if the currently processed window is currently active
+/// nk_window_is_collapsed | Returns if the window with given name is currently minimized/collapsed
+/// nk_window_is_closed | Returns if the currently processed window was closed
+/// nk_window_is_hidden | Returns if the currently processed window was hidden
+/// nk_window_is_active | Same as nk_window_has_focus for some reason
+/// nk_window_is_hovered | Returns if the currently processed window is currently being hovered by mouse
+/// nk_window_is_any_hovered | Return if any window currently hovered
+/// nk_item_is_any_active | Returns if any window or widgets is currently hovered or active
+//
+/// nk_window_set_bounds | Updates position and size of the currently processed window
+/// nk_window_set_position | Updates position of the currently process window
+/// nk_window_set_size | Updates the size of the currently processed window
+/// nk_window_set_focus | Set the currently processed window as active window
+//
+/// nk_window_close | Closes the window with given window name which deletes the window at the end of the frame
+/// nk_window_collapse | Collapses the window with given window name
+/// nk_window_collapse_if | Collapses the window with given window name if the given condition was met
+/// nk_window_show | Hides a visible or reshows a hidden window
+/// nk_window_show_if | Hides/shows a window depending on condition
+*/
+/*
+/// #### nk_panel_flags
+/// Flag | Description
+/// ----------------------------|----------------------------------------
+/// NK_WINDOW_BORDER | Draws a border around the window to visually separate window from the background
+/// NK_WINDOW_MOVABLE | The movable flag indicates that a window can be moved by user input or by dragging the window header
+/// NK_WINDOW_SCALABLE | The scalable flag indicates that a window can be scaled by user input by dragging a scaler icon at the button of the window
+/// NK_WINDOW_CLOSABLE | Adds a closable icon into the header
+/// NK_WINDOW_MINIMIZABLE | Adds a minimize icon into the header
+/// NK_WINDOW_NO_SCROLLBAR | Removes the scrollbar from the window
+/// NK_WINDOW_TITLE | Forces a header at the top at the window showing the title
+/// NK_WINDOW_SCROLL_AUTO_HIDE | Automatically hides the window scrollbar if no user interaction: also requires delta time in `nk_context` to be set each frame
+/// NK_WINDOW_BACKGROUND | Always keep window in the background
+/// NK_WINDOW_SCALE_LEFT | Puts window scaler in the left-ottom corner instead right-bottom
+/// NK_WINDOW_NO_INPUT | Prevents window of scaling, moving or getting focus
+///
+/// #### nk_collapse_states
+/// State | Description
+/// ----------------|-----------------------------------------------------------
+/// __NK_MINIMIZED__| UI section is collased and not visibile until maximized
+/// __NK_MAXIMIZED__| UI section is extended and visibile until minimized
+/// <br /><br />
+*/
+enum nk_panel_flags {
+ NK_WINDOW_BORDER = NK_FLAG(0),
+ NK_WINDOW_MOVABLE = NK_FLAG(1),
+ NK_WINDOW_SCALABLE = NK_FLAG(2),
+ NK_WINDOW_CLOSABLE = NK_FLAG(3),
+ NK_WINDOW_MINIMIZABLE = NK_FLAG(4),
+ NK_WINDOW_NO_SCROLLBAR = NK_FLAG(5),
+ NK_WINDOW_TITLE = NK_FLAG(6),
+ NK_WINDOW_SCROLL_AUTO_HIDE = NK_FLAG(7),
+ NK_WINDOW_BACKGROUND = NK_FLAG(8),
+ NK_WINDOW_SCALE_LEFT = NK_FLAG(9),
+ NK_WINDOW_NO_INPUT = NK_FLAG(10)
+};
+/*/// #### nk_begin
+/// Starts a new window; needs to be called every frame for every
+/// window (unless hidden) or otherwise the window gets removed
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __title__ | Window title and identifier. Needs to be persistent over frames to identify the window
+/// __bounds__ | Initial position and window size. However if you do not define `NK_WINDOW_SCALABLE` or `NK_WINDOW_MOVABLE` you can set window position and size every frame
+/// __flags__ | Window flags defined in the nk_panel_flags section with a number of different window behaviors
+///
+/// Returns `true(1)` if the window can be filled up with widgets from this point
+/// until `nk_end` or `false(0)` otherwise for example if minimized
+*/
+NK_API int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);
+/*/// #### nk_begin_titled
+/// Extended window start with separated title and identifier to allow multiple
+/// windows with same title but not name
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Window identifier. Needs to be persistent over frames to identify the window
+/// __title__ | Window title displayed inside header if flag `NK_WINDOW_TITLE` or either `NK_WINDOW_CLOSABLE` or `NK_WINDOW_MINIMIZED` was set
+/// __bounds__ | Initial position and window size. However if you do not define `NK_WINDOW_SCALABLE` or `NK_WINDOW_MOVABLE` you can set window position and size every frame
+/// __flags__ | Window flags defined in the nk_panel_flags section with a number of different window behaviors
+///
+/// Returns `true(1)` if the window can be filled up with widgets from this point
+/// until `nk_end` or `false(0)` otherwise for example if minimized
+*/
+NK_API int nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags);
+/*/// #### nk_end
+/// Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup.
+/// All widget calls after this functions will result in asserts or no state changes
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_end(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+*/
+NK_API void nk_end(struct nk_context *ctx);
+/*/// #### nk_window_find
+/// Finds and returns a window from passed name
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_end(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Window identifier
+///
+/// Returns a `nk_window` struct pointing to the identified window or NULL if
+/// no window with the given name was found
+*/
+NK_API struct nk_window *nk_window_find(struct nk_context *ctx, const char *name);
+/*/// #### nk_window_get_bounds
+/// Returns a rectangle with screen position and size of the currently processed window
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns a `nk_rect` struct with window upper left window position and size
+*/
+NK_API struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
+/*/// #### nk_window_get_position
+/// Returns the position of the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns a `nk_vec2` struct with window upper left position
+*/
+NK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
+/*/// #### nk_window_get_size
+/// Returns the size with width and height of the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns a `nk_vec2` struct with window width and height
+*/
+NK_API struct nk_vec2 nk_window_get_size(const struct nk_context*);
+/*/// #### nk_window_get_width
+/// Returns the width of the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// float nk_window_get_width(const struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns the current window width
+*/
+NK_API float nk_window_get_width(const struct nk_context*);
+/*/// #### nk_window_get_height
+/// Returns the height of the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// float nk_window_get_height(const struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns the current window height
+*/
+NK_API float nk_window_get_height(const struct nk_context*);
+/*/// #### nk_window_get_panel
+/// Returns the underlying panel which contains all processing state of the current window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// !!! WARNING
+/// Do not keep the returned panel pointer around, it is only valid until `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_panel* nk_window_get_panel(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns a pointer to window internal `nk_panel` state.
+*/
+NK_API struct nk_panel* nk_window_get_panel(struct nk_context*);
+/*/// #### nk_window_get_content_region
+/// Returns the position and size of the currently visible and non-clipped space
+/// inside the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_rect nk_window_get_content_region(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `nk_rect` struct with screen position and size (no scrollbar offset)
+/// of the visible space inside the current window
+*/
+NK_API struct nk_rect nk_window_get_content_region(struct nk_context*);
+/*/// #### nk_window_get_content_region_min
+/// Returns the upper left position of the currently visible and non-clipped
+/// space inside the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_window_get_content_region_min(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// returns `nk_vec2` struct with upper left screen position (no scrollbar offset)
+/// of the visible space inside the current window
+*/
+NK_API struct nk_vec2 nk_window_get_content_region_min(struct nk_context*);
+/*/// #### nk_window_get_content_region_max
+/// Returns the lower right screen position of the currently visible and
+/// non-clipped space inside the currently processed window.
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_window_get_content_region_max(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `nk_vec2` struct with lower right screen position (no scrollbar offset)
+/// of the visible space inside the current window
+*/
+NK_API struct nk_vec2 nk_window_get_content_region_max(struct nk_context*);
+/*/// #### nk_window_get_content_region_size
+/// Returns the size of the currently visible and non-clipped space inside the
+/// currently processed window
+///
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_window_get_content_region_size(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `nk_vec2` struct with size the visible space inside the current window
+*/
+NK_API struct nk_vec2 nk_window_get_content_region_size(struct nk_context*);
+/*/// #### nk_window_get_canvas
+/// Returns the draw command buffer. Can be used to draw custom widgets
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// !!! WARNING
+/// Do not keep the returned command buffer pointer around it is only valid until `nk_end`
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_command_buffer* nk_window_get_canvas(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns a pointer to window internal `nk_command_buffer` struct used as
+/// drawing canvas. Can be used to do custom drawing.
+*/
+NK_API struct nk_command_buffer* nk_window_get_canvas(struct nk_context*);
+/*/// #### nk_window_has_focus
+/// Returns if the currently processed window is currently active
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_has_focus(const struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `false(0)` if current window is not active or `true(1)` if it is
+*/
+NK_API int nk_window_has_focus(const struct nk_context*);
+/*/// #### nk_window_is_hovered
+/// Return if the current window is being hovered
+/// !!! WARNING
+/// Only call this function between calls `nk_begin_xxx` and `nk_end`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_is_hovered(struct nk_context *ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `true(1)` if current window is hovered or `false(0)` otherwise
+*/
+NK_API int nk_window_is_hovered(struct nk_context*);
+/*/// #### nk_window_is_collapsed
+/// Returns if the window with given name is currently minimized/collapsed
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_is_collapsed(struct nk_context *ctx, const char *name);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of window you want to check if it is collapsed
+///
+/// Returns `true(1)` if current window is minimized and `false(0)` if window not
+/// found or is not minimized
+*/
+NK_API int nk_window_is_collapsed(struct nk_context *ctx, const char *name);
+/*/// #### nk_window_is_closed
+/// Returns if the window with given name was closed by calling `nk_close`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_is_closed(struct nk_context *ctx, const char *name);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of window you want to check if it is closed
+///
+/// Returns `true(1)` if current window was closed or `false(0)` window not found or not closed
+*/
+NK_API int nk_window_is_closed(struct nk_context*, const char*);
+/*/// #### nk_window_is_hidden
+/// Returns if the window with given name is hidden
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_is_hidden(struct nk_context *ctx, const char *name);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of window you want to check if it is hidden
+///
+/// Returns `true(1)` if current window is hidden or `false(0)` window not found or visible
+*/
+NK_API int nk_window_is_hidden(struct nk_context*, const char*);
+/*/// #### nk_window_is_active
+/// Same as nk_window_has_focus for some reason
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_is_active(struct nk_context *ctx, const char *name);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of window you want to check if it is active
+///
+/// Returns `true(1)` if current window is active or `false(0)` window not found or not active
+*/
+NK_API int nk_window_is_active(struct nk_context*, const char*);
+/*/// #### nk_window_is_any_hovered
+/// Returns if the any window is being hovered
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_window_is_any_hovered(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `true(1)` if any window is hovered or `false(0)` otherwise
+*/
+NK_API int nk_window_is_any_hovered(struct nk_context*);
+/*/// #### nk_item_is_any_active
+/// Returns if the any window is being hovered or any widget is currently active.
+/// Can be used to decide if input should be processed by UI or your specific input handling.
+/// Example could be UI and 3D camera to move inside a 3D space.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_item_is_any_active(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+///
+/// Returns `true(1)` if any window is hovered or any item is active or `false(0)` otherwise
+*/
+NK_API int nk_item_is_any_active(struct nk_context*);
+/*/// #### nk_window_set_bounds
+/// Updates position and size of window with passed in name
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_set_bounds(struct nk_context*, const char *name, struct nk_rect bounds);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to modify both position and size
+/// __bounds__ | Must point to a `nk_rect` struct with the new position and size
+*/
+NK_API void nk_window_set_bounds(struct nk_context*, const char *name, struct nk_rect bounds);
+/*/// #### nk_window_set_position
+/// Updates position of window with passed name
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to modify both position
+/// __pos__ | Must point to a `nk_vec2` struct with the new position
+*/
+NK_API void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);
+/*/// #### nk_window_set_size
+/// Updates size of window with passed in name
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_set_size(struct nk_context*, const char *name, struct nk_vec2);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to modify both window size
+/// __size__ | Must point to a `nk_vec2` struct with new window size
+*/
+NK_API void nk_window_set_size(struct nk_context*, const char *name, struct nk_vec2);
+/*/// #### nk_window_set_focus
+/// Sets the window with given name as active
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_set_focus(struct nk_context*, const char *name);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to set focus on
+*/
+NK_API void nk_window_set_focus(struct nk_context*, const char *name);
+/*/// #### nk_window_close
+/// Closes a window and marks it for being freed at the end of the frame
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_close(struct nk_context *ctx, const char *name);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to close
+*/
+NK_API void nk_window_close(struct nk_context *ctx, const char *name);
+/*/// #### nk_window_collapse
+/// Updates collapse state of a window with given name
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_collapse(struct nk_context*, const char *name, enum nk_collapse_states state);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to close
+/// __state__ | value out of nk_collapse_states section
+*/
+NK_API void nk_window_collapse(struct nk_context*, const char *name, enum nk_collapse_states state);
+/*/// #### nk_window_collapse_if
+/// Updates collapse state of a window with given name if given condition is met
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_collapse_states, int cond);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to either collapse or maximize
+/// __state__ | value out of nk_collapse_states section the window should be put into
+/// __cond__ | condition that has to be met to actually commit the collapse state change
+*/
+NK_API void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_collapse_states, int cond);
+/*/// #### nk_window_show
+/// updates visibility state of a window with given name
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_show(struct nk_context*, const char *name, enum nk_show_states);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to either collapse or maximize
+/// __state__ | state with either visible or hidden to modify the window with
+*/
+NK_API void nk_window_show(struct nk_context*, const char *name, enum nk_show_states);
+/*/// #### nk_window_show_if
+/// Updates visibility state of a window with given name if a given condition is met
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_window_show_if(struct nk_context*, const char *name, enum nk_show_states, int cond);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __name__ | Identifier of the window to either hide or show
+/// __state__ | state with either visible or hidden to modify the window with
+/// __cond__ | condition that has to be met to actually commit the visbility state change
+*/
+NK_API void nk_window_show_if(struct nk_context*, const char *name, enum nk_show_states, int cond);
+/* =============================================================================
+ *
+ * LAYOUT
+ *
+ * =============================================================================
+/// ### Layouting
+/// Layouting in general describes placing widget inside a window with position and size.
+/// While in this particular implementation there are five different APIs for layouting
+/// each with different trade offs between control and ease of use. <br /><br />
+///
+/// All layouting methods in this library are based around the concept of a row.
+/// A row has a height the window content grows by and a number of columns and each
+/// layouting method specifies how each widget is placed inside the row.
+/// After a row has been allocated by calling a layouting functions and then
+/// filled with widgets will advance an internal pointer over the allocated row. <br /><br />
+///
+/// To actually define a layout you just call the appropriate layouting function
+/// and each subsequent widget call will place the widget as specified. Important
+/// here is that if you define more widgets then columns defined inside the layout
+/// functions it will allocate the next row without you having to make another layouting <br /><br />
+/// call.
+///
+/// Biggest limitation with using all these APIs outside the `nk_layout_space_xxx` API
+/// is that you have to define the row height for each. However the row height
+/// often depends on the height of the font. <br /><br />
+///
+/// To fix that internally nuklear uses a minimum row height that is set to the
+/// height plus padding of currently active font and overwrites the row height
+/// value if zero. <br /><br />
+///
+/// If you manually want to change the minimum row height then
+/// use nk_layout_set_min_row_height, and use nk_layout_reset_min_row_height to
+/// reset it back to be derived from font height. <br /><br />
+///
+/// Also if you change the font in nuklear it will automatically change the minimum
+/// row height for you and. This means if you change the font but still want
+/// a minimum row height smaller than the font you have to repush your value. <br /><br />
+///
+/// For actually more advanced UI I would even recommend using the `nk_layout_space_xxx`
+/// layouting method in combination with a cassowary constraint solver (there are
+/// some versions on github with permissive license model) to take over all control over widget
+/// layouting yourself. However for quick and dirty layouting using all the other layouting
+/// functions should be fine.
+///
+/// #### Usage
+/// 1. __nk_layout_row_dynamic__<br /><br />
+/// The easiest layouting function is `nk_layout_row_dynamic`. It provides each
+/// widgets with same horizontal space inside the row and dynamically grows
+/// if the owning window grows in width. So the number of columns dictates
+/// the size of each widget dynamically by formula:
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// widget_width = (window_width - padding - spacing) * (1/colum_count)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Just like all other layouting APIs if you define more widget than columns this
+/// library will allocate a new row and keep all layouting parameters previously
+/// defined.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // first row with height: 30 composed of two widgets
+/// nk_layout_row_dynamic(&ctx, 30, 2);
+/// nk_widget(...);
+/// nk_widget(...);
+/// //
+/// // second row with same parameter as defined above
+/// nk_widget(...);
+/// nk_widget(...);
+/// //
+/// // third row uses 0 for height which will use auto layouting
+/// nk_layout_row_dynamic(&ctx, 0, 2);
+/// nk_widget(...);
+/// nk_widget(...);
+/// }
+/// nk_end(...);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// 2. __nk_layout_row_static__<br /><br />
+/// Another easy layouting function is `nk_layout_row_static`. It provides each
+/// widget with same horizontal pixel width inside the row and does not grow
+/// if the owning window scales smaller or bigger.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // first row with height: 30 composed of two widgets with width: 80
+/// nk_layout_row_static(&ctx, 30, 80, 2);
+/// nk_widget(...);
+/// nk_widget(...);
+/// //
+/// // second row with same parameter as defined above
+/// nk_widget(...);
+/// nk_widget(...);
+/// //
+/// // third row uses 0 for height which will use auto layouting
+/// nk_layout_row_static(&ctx, 0, 80, 2);
+/// nk_widget(...);
+/// nk_widget(...);
+/// }
+/// nk_end(...);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// 3. __nk_layout_row_xxx__<br /><br />
+/// A little bit more advanced layouting API are functions `nk_layout_row_begin`,
+/// `nk_layout_row_push` and `nk_layout_row_end`. They allow to directly
+/// specify each column pixel or window ratio in a row. It supports either
+/// directly setting per column pixel width or widget window ratio but not
+/// both. Furthermore it is a immediate mode API so each value is directly
+/// pushed before calling a widget. Therefore the layout is not automatically
+/// repeating like the last two layouting functions.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // first row with height: 25 composed of two widgets with width 60 and 40
+/// nk_layout_row_begin(ctx, NK_STATIC, 25, 2);
+/// nk_layout_row_push(ctx, 60);
+/// nk_widget(...);
+/// nk_layout_row_push(ctx, 40);
+/// nk_widget(...);
+/// nk_layout_row_end(ctx);
+/// //
+/// // second row with height: 25 composed of two widgets with window ratio 0.25 and 0.75
+/// nk_layout_row_begin(ctx, NK_DYNAMIC, 25, 2);
+/// nk_layout_row_push(ctx, 0.25f);
+/// nk_widget(...);
+/// nk_layout_row_push(ctx, 0.75f);
+/// nk_widget(...);
+/// nk_layout_row_end(ctx);
+/// //
+/// // third row with auto generated height: composed of two widgets with window ratio 0.25 and 0.75
+/// nk_layout_row_begin(ctx, NK_DYNAMIC, 0, 2);
+/// nk_layout_row_push(ctx, 0.25f);
+/// nk_widget(...);
+/// nk_layout_row_push(ctx, 0.75f);
+/// nk_widget(...);
+/// nk_layout_row_end(ctx);
+/// }
+/// nk_end(...);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// 4. __nk_layout_row__<br /><br />
+/// The array counterpart to API nk_layout_row_xxx is the single nk_layout_row
+/// functions. Instead of pushing either pixel or window ratio for every widget
+/// it allows to define it by array. The trade of for less control is that
+/// `nk_layout_row` is automatically repeating. Otherwise the behavior is the
+/// same.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // two rows with height: 30 composed of two widgets with width 60 and 40
+/// const float size[] = {60,40};
+/// nk_layout_row(ctx, NK_STATIC, 30, 2, ratio);
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// //
+/// // two rows with height: 30 composed of two widgets with window ratio 0.25 and 0.75
+/// const float ratio[] = {0.25, 0.75};
+/// nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio);
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// //
+/// // two rows with auto generated height composed of two widgets with window ratio 0.25 and 0.75
+/// const float ratio[] = {0.25, 0.75};
+/// nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio);
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// }
+/// nk_end(...);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// 5. __nk_layout_row_template_xxx__<br /><br />
+/// The most complex and second most flexible API is a simplified flexbox version without
+/// line wrapping and weights for dynamic widgets. It is an immediate mode API but
+/// unlike `nk_layout_row_xxx` it has auto repeat behavior and needs to be called
+/// before calling the templated widgets.
+/// The row template layout has three different per widget size specifier. The first
+/// one is the `nk_layout_row_template_push_static` with fixed widget pixel width.
+/// They do not grow if the row grows and will always stay the same.
+/// The second size specifier is `nk_layout_row_template_push_variable`
+/// which defines a minimum widget size but it also can grow if more space is available
+/// not taken by other widgets.
+/// Finally there are dynamic widgets with `nk_layout_row_template_push_dynamic`
+/// which are completely flexible and unlike variable widgets can even shrink
+/// to zero if not enough space is provided.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // two rows with height: 30 composed of three widgets
+/// nk_layout_row_template_begin(ctx, 30);
+/// nk_layout_row_template_push_dynamic(ctx);
+/// nk_layout_row_template_push_variable(ctx, 80);
+/// nk_layout_row_template_push_static(ctx, 80);
+/// nk_layout_row_template_end(ctx);
+/// //
+/// // first row
+/// nk_widget(...); // dynamic widget can go to zero if not enough space
+/// nk_widget(...); // variable widget with min 80 pixel but can grow bigger if enough space
+/// nk_widget(...); // static widget with fixed 80 pixel width
+/// //
+/// // second row same layout
+/// nk_widget(...);
+/// nk_widget(...);
+/// nk_widget(...);
+/// }
+/// nk_end(...);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// 6. __nk_layout_space_xxx__<br /><br />
+/// Finally the most flexible API directly allows you to place widgets inside the
+/// window. The space layout API is an immediate mode API which does not support
+/// row auto repeat and directly sets position and size of a widget. Position
+/// and size hereby can be either specified as ratio of allocated space or
+/// allocated space local position and pixel size. Since this API is quite
+/// powerful there are a number of utility functions to get the available space
+/// and convert between local allocated space and screen space.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_begin_xxx(...) {
+/// // static row with height: 500 (you can set column count to INT_MAX if you don't want to be bothered)
+/// nk_layout_space_begin(ctx, NK_STATIC, 500, INT_MAX);
+/// nk_layout_space_push(ctx, nk_rect(0,0,150,200));
+/// nk_widget(...);
+/// nk_layout_space_push(ctx, nk_rect(200,200,100,200));
+/// nk_widget(...);
+/// nk_layout_space_end(ctx);
+/// //
+/// // dynamic row with height: 500 (you can set column count to INT_MAX if you don't want to be bothered)
+/// nk_layout_space_begin(ctx, NK_DYNAMIC, 500, INT_MAX);
+/// nk_layout_space_push(ctx, nk_rect(0.5,0.5,0.1,0.1));
+/// nk_widget(...);
+/// nk_layout_space_push(ctx, nk_rect(0.7,0.6,0.1,0.1));
+/// nk_widget(...);
+/// }
+/// nk_end(...);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// ----------------------------------------|------------------------------------
+/// nk_layout_set_min_row_height | Set the currently used minimum row height to a specified value
+/// nk_layout_reset_min_row_height | Resets the currently used minimum row height to font height
+/// nk_layout_widget_bounds | Calculates current width a static layout row can fit inside a window
+/// nk_layout_ratio_from_pixel | Utility functions to calculate window ratio from pixel size
+//
+/// nk_layout_row_dynamic | Current layout is divided into n same sized growing columns
+/// nk_layout_row_static | Current layout is divided into n same fixed sized columns
+/// nk_layout_row_begin | Starts a new row with given height and number of columns
+/// nk_layout_row_push | Pushes another column with given size or window ratio
+/// nk_layout_row_end | Finished previously started row
+/// nk_layout_row | Specifies row columns in array as either window ratio or size
+//
+/// nk_layout_row_template_begin | Begins the row template declaration
+/// nk_layout_row_template_push_dynamic | Adds a dynamic column that dynamically grows and can go to zero if not enough space
+/// nk_layout_row_template_push_variable | Adds a variable column that dynamically grows but does not shrink below specified pixel width
+/// nk_layout_row_template_push_static | Adds a static column that does not grow and will always have the same size
+/// nk_layout_row_template_end | Marks the end of the row template
+//
+/// nk_layout_space_begin | Begins a new layouting space that allows to specify each widgets position and size
+/// nk_layout_space_push | Pushes position and size of the next widget in own coordinate space either as pixel or ratio
+/// nk_layout_space_end | Marks the end of the layouting space
+//
+/// nk_layout_space_bounds | Callable after nk_layout_space_begin and returns total space allocated
+/// nk_layout_space_to_screen | Converts vector from nk_layout_space coordinate space into screen space
+/// nk_layout_space_to_local | Converts vector from screen space into nk_layout_space coordinates
+/// nk_layout_space_rect_to_screen | Converts rectangle from nk_layout_space coordinate space into screen space
+/// nk_layout_space_rect_to_local | Converts rectangle from screen space into nk_layout_space coordinates
+*/
+/*/// #### nk_layout_set_min_row_height
+/// Sets the currently used minimum row height.
+/// !!! WARNING
+/// The passed height needs to include both your preferred row height
+/// as well as padding. No internal padding is added.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_set_min_row_height(struct nk_context*, float height);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __height__ | New minimum row height to be used for auto generating the row height
+*/
+NK_API void nk_layout_set_min_row_height(struct nk_context*, float height);
+/*/// #### nk_layout_reset_min_row_height
+/// Reset the currently used minimum row height back to `font_height + text_padding + padding`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_reset_min_row_height(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+*/
+NK_API void nk_layout_reset_min_row_height(struct nk_context*);
+/*/// #### nk_layout_widget_bounds
+/// Returns the width of the next row allocate by one of the layouting functions
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_rect nk_layout_widget_bounds(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+///
+/// Return `nk_rect` with both position and size of the next row
+*/
+NK_API struct nk_rect nk_layout_widget_bounds(struct nk_context*);
+/*/// #### nk_layout_ratio_from_pixel
+/// Utility functions to calculate window ratio from pixel size
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// float nk_layout_ratio_from_pixel(struct nk_context*, float pixel_width);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __pixel__ | Pixel_width to convert to window ratio
+///
+/// Returns `nk_rect` with both position and size of the next row
+*/
+NK_API float nk_layout_ratio_from_pixel(struct nk_context*, float pixel_width);
+/*/// #### nk_layout_row_dynamic
+/// Sets current row layout to share horizontal space
+/// between @cols number of widgets evenly. Once called all subsequent widget
+/// calls greater than @cols will allocate a new row with same layout.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __height__ | Holds height of each widget in row or zero for auto layouting
+/// __columns__ | Number of widget inside row
+*/
+NK_API void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols);
+/*/// #### nk_layout_row_static
+/// Sets current row layout to fill @cols number of widgets
+/// in row with same @item_width horizontal size. Once called all subsequent widget
+/// calls greater than @cols will allocate a new row with same layout.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __height__ | Holds height of each widget in row or zero for auto layouting
+/// __width__ | Holds pixel width of each widget in the row
+/// __columns__ | Number of widget inside row
+*/
+NK_API void nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols);
+/*/// #### nk_layout_row_begin
+/// Starts a new dynamic or fixed row with given height and columns.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __fmt__ | either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns
+/// __height__ | holds height of each widget in row or zero for auto layouting
+/// __columns__ | Number of widget inside row
+*/
+NK_API void nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols);
+/*/// #### nk_layout_row_push
+/// Specifies either window ratio or width of a single column
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_push(struct nk_context*, float value);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __value__ | either a window ratio or fixed width depending on @fmt in previous `nk_layout_row_begin` call
+*/
+NK_API void nk_layout_row_push(struct nk_context*, float value);
+/*/// #### nk_layout_row_end
+/// Finished previously started row
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_end(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+*/
+NK_API void nk_layout_row_end(struct nk_context*);
+/*/// #### nk_layout_row
+/// Specifies row columns in array as either window ratio or size
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __fmt__ | Either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns
+/// __height__ | Holds height of each widget in row or zero for auto layouting
+/// __columns__ | Number of widget inside row
+*/
+NK_API void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);
+/*/// #### nk_layout_row_template_begin
+/// Begins the row template declaration
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_template_begin(struct nk_context*, float row_height);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __height__ | Holds height of each widget in row or zero for auto layouting
+*/
+NK_API void nk_layout_row_template_begin(struct nk_context*, float row_height);
+/*/// #### nk_layout_row_template_push_dynamic
+/// Adds a dynamic column that dynamically grows and can go to zero if not enough space
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_template_push_dynamic(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __height__ | Holds height of each widget in row or zero for auto layouting
+*/
+NK_API void nk_layout_row_template_push_dynamic(struct nk_context*);
+/*/// #### nk_layout_row_template_push_variable
+/// Adds a variable column that dynamically grows but does not shrink below specified pixel width
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_template_push_variable(struct nk_context*, float min_width);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __width__ | Holds the minimum pixel width the next column must always be
+*/
+NK_API void nk_layout_row_template_push_variable(struct nk_context*, float min_width);
+/*/// #### nk_layout_row_template_push_static
+/// Adds a static column that does not grow and will always have the same size
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_template_push_static(struct nk_context*, float width);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __width__ | Holds the absolute pixel width value the next column must be
+*/
+NK_API void nk_layout_row_template_push_static(struct nk_context*, float width);
+/*/// #### nk_layout_row_template_end
+/// Marks the end of the row template
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_row_template_end(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+*/
+NK_API void nk_layout_row_template_end(struct nk_context*);
+/*/// #### nk_layout_space_begin
+/// Begins a new layouting space that allows to specify each widgets position and size.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_space_begin(struct nk_context*, enum nk_layout_format, float height, int widget_count);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`
+/// __fmt__ | Either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns
+/// __height__ | Holds height of each widget in row or zero for auto layouting
+/// __columns__ | Number of widgets inside row
+*/
+NK_API void nk_layout_space_begin(struct nk_context*, enum nk_layout_format, float height, int widget_count);
+/*/// #### nk_layout_space_push
+/// Pushes position and size of the next widget in own coordinate space either as pixel or ratio
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_space_push(struct nk_context *ctx, struct nk_rect bounds);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+/// __bounds__ | Position and size in laoyut space local coordinates
+*/
+NK_API void nk_layout_space_push(struct nk_context*, struct nk_rect bounds);
+/*/// #### nk_layout_space_end
+/// Marks the end of the layout space
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_layout_space_end(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+*/
+NK_API void nk_layout_space_end(struct nk_context*);
+/*/// #### nk_layout_space_bounds
+/// Utility function to calculate total space allocated for `nk_layout_space`
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_rect nk_layout_space_bounds(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+///
+/// Returns `nk_rect` holding the total space allocated
+*/
+NK_API struct nk_rect nk_layout_space_bounds(struct nk_context*);
+/*/// #### nk_layout_space_to_screen
+/// Converts vector from nk_layout_space coordinate space into screen space
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_layout_space_to_screen(struct nk_context*, struct nk_vec2);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+/// __vec__ | Position to convert from layout space into screen coordinate space
+///
+/// Returns transformed `nk_vec2` in screen space coordinates
+*/
+NK_API struct nk_vec2 nk_layout_space_to_screen(struct nk_context*, struct nk_vec2);
+/*/// #### nk_layout_space_to_local
+/// Converts vector from layout space into screen space
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_vec2 nk_layout_space_to_local(struct nk_context*, struct nk_vec2);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+/// __vec__ | Position to convert from screen space into layout coordinate space
+///
+/// Returns transformed `nk_vec2` in layout space coordinates
+*/
+NK_API struct nk_vec2 nk_layout_space_to_local(struct nk_context*, struct nk_vec2);
+/*/// #### nk_layout_space_rect_to_screen
+/// Converts rectangle from screen space into layout space
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_rect nk_layout_space_rect_to_screen(struct nk_context*, struct nk_rect);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+/// __bounds__ | Rectangle to convert from layout space into screen space
+///
+/// Returns transformed `nk_rect` in screen space coordinates
+*/
+NK_API struct nk_rect nk_layout_space_rect_to_screen(struct nk_context*, struct nk_rect);
+/*/// #### nk_layout_space_rect_to_local
+/// Converts rectangle from layout space into screen space
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct nk_rect);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
+/// __bounds__ | Rectangle to convert from layout space into screen space
+///
+/// Returns transformed `nk_rect` in layout space coordinates
+*/
+NK_API struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct nk_rect);
+/* =============================================================================
+ *
+ * GROUP
+ *
+ * =============================================================================
+/// ### Groups
+/// Groups are basically windows inside windows. They allow to subdivide space
+/// in a window to layout widgets as a group. Almost all more complex widget
+/// layouting requirements can be solved using groups and basic layouting
+/// fuctionality. Groups just like windows are identified by an unique name and
+/// internally keep track of scrollbar offsets by default. However additional
+/// versions are provided to directly manage the scrollbar.
+///
+/// #### Usage
+/// To create a group you have to call one of the three `nk_group_begin_xxx`
+/// functions to start group declarations and `nk_group_end` at the end. Furthermore it
+/// is required to check the return value of `nk_group_begin_xxx` and only process
+/// widgets inside the window if the value is not 0.
+/// Nesting groups is possible and even encouraged since many layouting schemes
+/// can only be achieved by nesting. Groups, unlike windows, need `nk_group_end`
+/// to be only called if the corosponding `nk_group_begin_xxx` call does not return 0:
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_group_begin_xxx(ctx, ...) {
+/// // [... widgets ...]
+/// nk_group_end(ctx);
+/// }
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// In the grand concept groups can be called after starting a window
+/// with `nk_begin_xxx` and before calling `nk_end`:
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// // Input
+/// Event evt;
+/// nk_input_begin(&ctx);
+/// while (GetEvent(&evt)) {
+/// if (evt.type == MOUSE_MOVE)
+/// nk_input_motion(&ctx, evt.motion.x, evt.motion.y);
+/// else if (evt.type == [...]) {
+/// nk_input_xxx(...);
+/// }
+/// }
+/// nk_input_end(&ctx);
+/// //
+/// // Window
+/// if (nk_begin_xxx(...) {
+/// // [...widgets...]
+/// nk_layout_row_dynamic(...);
+/// if (nk_group_begin_xxx(ctx, ...) {
+/// //[... widgets ...]
+/// nk_group_end(ctx);
+/// }
+/// }
+/// nk_end(ctx);
+/// //
+/// // Draw
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// switch (cmd->type) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case ...:
+/// // [...]
+/// }
+// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/// #### Reference
+/// Function | Description
+/// --------------------------------|-------------------------------------------
+/// nk_group_begin | Start a new group with internal scrollbar handling
+/// nk_group_begin_titled | Start a new group with separeted name and title and internal scrollbar handling
+/// nk_group_end | Ends a group. Should only be called if nk_group_begin returned non-zero
+/// nk_group_scrolled_offset_begin | Start a new group with manual separated handling of scrollbar x- and y-offset
+/// nk_group_scrolled_begin | Start a new group with manual scrollbar handling
+/// nk_group_scrolled_end | Ends a group with manual scrollbar handling. Should only be called if nk_group_begin returned non-zero
+*/
+/*/// #### nk_group_begin
+/// Starts a new widget group. Requires a previous layouting function to specify a pos/size.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_group_begin(struct nk_context*, const char *title, nk_flags);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __title__ | Must be an unique identifier for this group that is also used for the group header
+/// __flags__ | Window flags defined in the nk_panel_flags section with a number of different group behaviors
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_group_begin(struct nk_context*, const char *title, nk_flags);
+/*/// #### nk_group_begin_titled
+/// Starts a new widget group. Requires a previous layouting function to specify a pos/size.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __id__ | Must be an unique identifier for this group
+/// __title__ | Group header title
+/// __flags__ | Window flags defined in the nk_panel_flags section with a number of different group behaviors
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);
+/*/// #### nk_group_end
+/// Ends a widget group
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_group_end(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+*/
+NK_API void nk_group_end(struct nk_context*);
+/*/// #### nk_group_scrolled_offset_begin
+/// starts a new widget group. requires a previous layouting function to specify
+/// a size. Does not keep track of scrollbar.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __x_offset__| Scrollbar x-offset to offset all widgets inside the group horizontally.
+/// __y_offset__| Scrollbar y-offset to offset all widgets inside the group vertically
+/// __title__ | Window unique group title used to both identify and display in the group header
+/// __flags__ | Window flags from the nk_panel_flags section
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags);
+/*/// #### nk_group_scrolled_begin
+/// Starts a new widget group. requires a previous
+/// layouting function to specify a size. Does not keep track of scrollbar.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __off__ | Both x- and y- scroll offset. Allows for manual scrollbar control
+/// __title__ | Window unique group title used to both identify and display in the group header
+/// __flags__ | Window flags from nk_panel_flags section
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);
+/*/// #### nk_group_scrolled_end
+/// Ends a widget group after calling nk_group_scrolled_offset_begin or nk_group_scrolled_begin.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_group_scrolled_end(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+*/
+NK_API void nk_group_scrolled_end(struct nk_context*);
+/* =============================================================================
+ *
+ * TREE
+ *
+ * =============================================================================
+/// ### Tree
+/// Trees represent two different concept. First the concept of a collapsable
+/// UI section that can be either in a hidden or visibile state. They allow the UI
+/// user to selectively minimize the current set of visible UI to comprehend.
+/// The second concept are tree widgets for visual UI representation of trees.<br /><br />
+///
+/// Trees thereby can be nested for tree representations and multiple nested
+/// collapsable UI sections. All trees are started by calling of the
+/// `nk_tree_xxx_push_tree` functions and ended by calling one of the
+/// `nk_tree_xxx_pop_xxx()` functions. Each starting functions takes a title label
+/// and optionally an image to be displayed and the initial collapse state from
+/// the nk_collapse_states section.<br /><br />
+///
+/// The runtime state of the tree is either stored outside the library by the caller
+/// or inside which requires a unique ID. The unique ID can either be generated
+/// automatically from `__FILE__` and `__LINE__` with function `nk_tree_push`,
+/// by `__FILE__` and a user provided ID generated for example by loop index with
+/// function `nk_tree_push_id` or completely provided from outside by user with
+/// function `nk_tree_push_hashed`.
+///
+/// #### Usage
+/// To create a tree you have to call one of the seven `nk_tree_xxx_push_xxx`
+/// functions to start a collapsable UI section and `nk_tree_xxx_pop` to mark the
+/// end.
+/// Each starting function will either return `false(0)` if the tree is collapsed
+/// or hidden and therefore does not need to be filled with content or `true(1)`
+/// if visible and required to be filled.
+///
+/// !!! Note
+/// The tree header does not require and layouting function and instead
+/// calculates a auto height based on the currently used font size
+///
+/// The tree ending functions only need to be called if the tree content is
+/// actually visible. So make sure the tree push function is guarded by `if`
+/// and the pop call is only taken if the tree is visible.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// if (nk_tree_push(ctx, NK_TREE_TAB, "Tree", NK_MINIMIZED)) {
+/// nk_layout_row_dynamic(...);
+/// nk_widget(...);
+/// nk_tree_pop(ctx);
+/// }
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// ----------------------------|-------------------------------------------
+/// nk_tree_push | Start a collapsable UI section with internal state management
+/// nk_tree_push_id | Start a collapsable UI section with internal state management callable in a look
+/// nk_tree_push_hashed | Start a collapsable UI section with internal state management with full control over internal unique ID use to store state
+/// nk_tree_image_push | Start a collapsable UI section with image and label header
+/// nk_tree_image_push_id | Start a collapsable UI section with image and label header and internal state management callable in a look
+/// nk_tree_image_push_hashed | Start a collapsable UI section with image and label header and internal state management with full control over internal unique ID use to store state
+/// nk_tree_pop | Ends a collapsable UI section
+//
+/// nk_tree_state_push | Start a collapsable UI section with external state management
+/// nk_tree_state_image_push | Start a collapsable UI section with image and label header and external state management
+/// nk_tree_state_pop | Ends a collapsabale UI section
+///
+/// #### nk_tree_type
+/// Flag | Description
+/// ----------------|----------------------------------------
+/// NK_TREE_NODE | Highlighted tree header to mark a collapsable UI section
+/// NK_TREE_TAB | Non-highighted tree header closer to tree representations
+*/
+/*/// #### nk_tree_push
+/// Starts a collapsable UI section with internal state management
+/// !!! WARNING
+/// To keep track of the runtime tree collapsable state this function uses
+/// defines `__FILE__` and `__LINE__` to generate a unique ID. If you want
+/// to call this function in a loop please use `nk_tree_push_id` or
+/// `nk_tree_push_hashed` instead.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// #define nk_tree_push(ctx, type, title, state)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __title__ | Label printed in the tree header
+/// __state__ | Initial tree state value out of nk_collapse_states
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+#define nk_tree_push(ctx, type, title, state) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)
+/*/// #### nk_tree_push_id
+/// Starts a collapsable UI section with internal state management callable in a look
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// #define nk_tree_push_id(ctx, type, title, state, id)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __title__ | Label printed in the tree header
+/// __state__ | Initial tree state value out of nk_collapse_states
+/// __id__ | Loop counter index if this function is called in a loop
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+#define nk_tree_push_id(ctx, type, title, state, id) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)
+/*/// #### nk_tree_push_hashed
+/// Start a collapsable UI section with internal state management with full
+/// control over internal unique ID used to store state
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __title__ | Label printed in the tree header
+/// __state__ | Initial tree state value out of nk_collapse_states
+/// __hash__ | Memory block or string to generate the ID from
+/// __len__ | Size of passed memory block or string in __hash__
+/// __seed__ | Seeding value if this function is called in a loop or default to `0`
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
+/*/// #### nk_tree_image_push
+/// Start a collapsable UI section with image and label header
+/// !!! WARNING
+/// To keep track of the runtime tree collapsable state this function uses
+/// defines `__FILE__` and `__LINE__` to generate a unique ID. If you want
+/// to call this function in a loop please use `nk_tree_image_push_id` or
+/// `nk_tree_image_push_hashed` instead.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// #define nk_tree_image_push(ctx, type, img, title, state)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __img__ | Image to display inside the header on the left of the label
+/// __title__ | Label printed in the tree header
+/// __state__ | Initial tree state value out of nk_collapse_states
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+#define nk_tree_image_push(ctx, type, img, title, state) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)
+/*/// #### nk_tree_image_push_id
+/// Start a collapsable UI section with image and label header and internal state
+/// management callable in a look
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// #define nk_tree_image_push_id(ctx, type, img, title, state, id)
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __img__ | Image to display inside the header on the left of the label
+/// __title__ | Label printed in the tree header
+/// __state__ | Initial tree state value out of nk_collapse_states
+/// __id__ | Loop counter index if this function is called in a loop
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+#define nk_tree_image_push_id(ctx, type, img, title, state, id) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)
+/*/// #### nk_tree_image_push_hashed
+/// Start a collapsable UI section with internal state management with full
+/// control over internal unique ID used to store state
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_tree_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __img__ | Image to display inside the header on the left of the label
+/// __title__ | Label printed in the tree header
+/// __state__ | Initial tree state value out of nk_collapse_states
+/// __hash__ | Memory block or string to generate the ID from
+/// __len__ | Size of passed memory block or string in __hash__
+/// __seed__ | Seeding value if this function is called in a loop or default to `0`
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_tree_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
+/*/// #### nk_tree_pop
+/// Ends a collapsabale UI section
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_tree_pop(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`
+*/
+NK_API void nk_tree_pop(struct nk_context*);
+/*/// #### nk_tree_state_push
+/// Start a collapsable UI section with external state management
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states *state);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __title__ | Label printed in the tree header
+/// __state__ | Persistent state to update
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states *state);
+/*/// #### nk_tree_state_image_push
+/// Start a collapsable UI section with image and label header and external state management
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_tree_state_image_push(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`
+/// __img__ | Image to display inside the header on the left of the label
+/// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
+/// __title__ | Label printed in the tree header
+/// __state__ | Persistent state to update
+///
+/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
+*/
+NK_API int nk_tree_state_image_push(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state);
+/*/// #### nk_tree_state_pop
+/// Ends a collapsabale UI section
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_tree_state_pop(struct nk_context*);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// ------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`
+*/
+NK_API void nk_tree_state_pop(struct nk_context*);
+
+#define nk_tree_element_push(ctx, type, title, state, sel) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)
+#define nk_tree_element_push_id(ctx, type, title, state, sel, id) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)
+NK_API int nk_tree_element_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, int *selected, const char *hash, int len, int seed);
+NK_API int nk_tree_element_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, int *selected, const char *hash, int len,int seed);
+NK_API void nk_tree_element_pop(struct nk_context*);
+
+/* =============================================================================
+ *
+ * LIST VIEW
+ *
+ * ============================================================================= */
+struct nk_list_view {
+/* public: */
+ int begin, end, count;
+/* private: */
+ int total_height;
+ struct nk_context *ctx;
+ nk_uint *scroll_pointer;
+ nk_uint scroll_value;
+};
+NK_API int nk_list_view_begin(struct nk_context*, struct nk_list_view *out, const char *id, nk_flags, int row_height, int row_count);
+NK_API void nk_list_view_end(struct nk_list_view*);
+/* =============================================================================
+ *
+ * WIDGET
+ *
+ * ============================================================================= */
+enum nk_widget_layout_states {
+ NK_WIDGET_INVALID, /* The widget cannot be seen and is completely out of view */
+ NK_WIDGET_VALID, /* The widget is completely inside the window and can be updated and drawn */
+ NK_WIDGET_ROM /* The widget is partially visible and cannot be updated */
+};
+enum nk_widget_states {
+ NK_WIDGET_STATE_MODIFIED = NK_FLAG(1),
+ NK_WIDGET_STATE_INACTIVE = NK_FLAG(2), /* widget is neither active nor hovered */
+ NK_WIDGET_STATE_ENTERED = NK_FLAG(3), /* widget has been hovered on the current frame */
+ NK_WIDGET_STATE_HOVER = NK_FLAG(4), /* widget is being hovered */
+ NK_WIDGET_STATE_ACTIVED = NK_FLAG(5),/* widget is currently activated */
+ NK_WIDGET_STATE_LEFT = NK_FLAG(6), /* widget is from this frame on not hovered anymore */
+ NK_WIDGET_STATE_HOVERED = NK_WIDGET_STATE_HOVER|NK_WIDGET_STATE_MODIFIED, /* widget is being hovered */
+ NK_WIDGET_STATE_ACTIVE = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED /* widget is currently activated */
+};
+NK_API enum nk_widget_layout_states nk_widget(struct nk_rect*, const struct nk_context*);
+NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*, struct nk_vec2);
+NK_API struct nk_rect nk_widget_bounds(struct nk_context*);
+NK_API struct nk_vec2 nk_widget_position(struct nk_context*);
+NK_API struct nk_vec2 nk_widget_size(struct nk_context*);
+NK_API float nk_widget_width(struct nk_context*);
+NK_API float nk_widget_height(struct nk_context*);
+NK_API int nk_widget_is_hovered(struct nk_context*);
+NK_API int nk_widget_is_mouse_clicked(struct nk_context*, enum nk_buttons);
+NK_API int nk_widget_has_mouse_click_down(struct nk_context*, enum nk_buttons, int down);
+NK_API void nk_spacing(struct nk_context*, int cols);
+/* =============================================================================
+ *
+ * TEXT
+ *
+ * ============================================================================= */
+enum nk_text_align {
+ NK_TEXT_ALIGN_LEFT = 0x01,
+ NK_TEXT_ALIGN_CENTERED = 0x02,
+ NK_TEXT_ALIGN_RIGHT = 0x04,
+ NK_TEXT_ALIGN_TOP = 0x08,
+ NK_TEXT_ALIGN_MIDDLE = 0x10,
+ NK_TEXT_ALIGN_BOTTOM = 0x20
+};
+enum nk_text_alignment {
+ NK_TEXT_LEFT = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_LEFT,
+ NK_TEXT_CENTERED = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_CENTERED,
+ NK_TEXT_RIGHT = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_RIGHT
+};
+NK_API void nk_text(struct nk_context*, const char*, int, nk_flags);
+NK_API void nk_text_colored(struct nk_context*, const char*, int, nk_flags, struct nk_color);
+NK_API void nk_text_wrap(struct nk_context*, const char*, int);
+NK_API void nk_text_wrap_colored(struct nk_context*, const char*, int, struct nk_color);
+NK_API void nk_label(struct nk_context*, const char*, nk_flags align);
+NK_API void nk_label_colored(struct nk_context*, const char*, nk_flags align, struct nk_color);
+NK_API void nk_label_wrap(struct nk_context*, const char*);
+NK_API void nk_label_colored_wrap(struct nk_context*, const char*, struct nk_color);
+NK_API void nk_image(struct nk_context*, struct nk_image);
+NK_API void nk_image_color(struct nk_context*, struct nk_image, struct nk_color);
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+NK_API void nk_labelf(struct nk_context*, nk_flags, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(3);
+NK_API void nk_labelf_colored(struct nk_context*, nk_flags, struct nk_color, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(4);
+NK_API void nk_labelf_wrap(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(2);
+NK_API void nk_labelf_colored_wrap(struct nk_context*, struct nk_color, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(3);
+NK_API void nk_labelfv(struct nk_context*, nk_flags, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(3);
+NK_API void nk_labelfv_colored(struct nk_context*, nk_flags, struct nk_color, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(4);
+NK_API void nk_labelfv_wrap(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(2);
+NK_API void nk_labelfv_colored_wrap(struct nk_context*, struct nk_color, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(3);
+NK_API void nk_value_bool(struct nk_context*, const char *prefix, int);
+NK_API void nk_value_int(struct nk_context*, const char *prefix, int);
+NK_API void nk_value_uint(struct nk_context*, const char *prefix, unsigned int);
+NK_API void nk_value_float(struct nk_context*, const char *prefix, float);
+NK_API void nk_value_color_byte(struct nk_context*, const char *prefix, struct nk_color);
+NK_API void nk_value_color_float(struct nk_context*, const char *prefix, struct nk_color);
+NK_API void nk_value_color_hex(struct nk_context*, const char *prefix, struct nk_color);
+#endif
+/* =============================================================================
+ *
+ * BUTTON
+ *
+ * ============================================================================= */
+NK_API int nk_button_text(struct nk_context*, const char *title, int len);
+NK_API int nk_button_label(struct nk_context*, const char *title);
+NK_API int nk_button_color(struct nk_context*, struct nk_color);
+NK_API int nk_button_symbol(struct nk_context*, enum nk_symbol_type);
+NK_API int nk_button_image(struct nk_context*, struct nk_image img);
+NK_API int nk_button_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags text_alignment);
+NK_API int nk_button_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
+NK_API int nk_button_image_label(struct nk_context*, struct nk_image img, const char*, nk_flags text_alignment);
+NK_API int nk_button_image_text(struct nk_context*, struct nk_image img, const char*, int, nk_flags alignment);
+NK_API int nk_button_text_styled(struct nk_context*, const struct nk_style_button*, const char *title, int len);
+NK_API int nk_button_label_styled(struct nk_context*, const struct nk_style_button*, const char *title);
+NK_API int nk_button_symbol_styled(struct nk_context*, const struct nk_style_button*, enum nk_symbol_type);
+NK_API int nk_button_image_styled(struct nk_context*, const struct nk_style_button*, struct nk_image img);
+NK_API int nk_button_symbol_text_styled(struct nk_context*,const struct nk_style_button*, enum nk_symbol_type, const char*, int, nk_flags alignment);
+NK_API int nk_button_symbol_label_styled(struct nk_context *ctx, const struct nk_style_button *style, enum nk_symbol_type symbol, const char *title, nk_flags align);
+NK_API int nk_button_image_label_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, nk_flags text_alignment);
+NK_API int nk_button_image_text_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, int, nk_flags alignment);
+NK_API void nk_button_set_behavior(struct nk_context*, enum nk_button_behavior);
+NK_API int nk_button_push_behavior(struct nk_context*, enum nk_button_behavior);
+NK_API int nk_button_pop_behavior(struct nk_context*);
+/* =============================================================================
+ *
+ * CHECKBOX
+ *
+ * ============================================================================= */
+NK_API int nk_check_label(struct nk_context*, const char*, int active);
+NK_API int nk_check_text(struct nk_context*, const char*, int,int active);
+NK_API unsigned nk_check_flags_label(struct nk_context*, const char*, unsigned int flags, unsigned int value);
+NK_API unsigned nk_check_flags_text(struct nk_context*, const char*, int, unsigned int flags, unsigned int value);
+NK_API int nk_checkbox_label(struct nk_context*, const char*, int *active);
+NK_API int nk_checkbox_text(struct nk_context*, const char*, int, int *active);
+NK_API int nk_checkbox_flags_label(struct nk_context*, const char*, unsigned int *flags, unsigned int value);
+NK_API int nk_checkbox_flags_text(struct nk_context*, const char*, int, unsigned int *flags, unsigned int value);
+/* =============================================================================
+ *
+ * RADIO BUTTON
+ *
+ * ============================================================================= */
+NK_API int nk_radio_label(struct nk_context*, const char*, int *active);
+NK_API int nk_radio_text(struct nk_context*, const char*, int, int *active);
+NK_API int nk_option_label(struct nk_context*, const char*, int active);
+NK_API int nk_option_text(struct nk_context*, const char*, int, int active);
+/* =============================================================================
+ *
+ * SELECTABLE
+ *
+ * ============================================================================= */
+NK_API int nk_selectable_label(struct nk_context*, const char*, nk_flags align, int *value);
+NK_API int nk_selectable_text(struct nk_context*, const char*, int, nk_flags align, int *value);
+NK_API int nk_selectable_image_label(struct nk_context*,struct nk_image, const char*, nk_flags align, int *value);
+NK_API int nk_selectable_image_text(struct nk_context*,struct nk_image, const char*, int, nk_flags align, int *value);
+NK_API int nk_selectable_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, int *value);
+NK_API int nk_selectable_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int *value);
+
+NK_API int nk_select_label(struct nk_context*, const char*, nk_flags align, int value);
+NK_API int nk_select_text(struct nk_context*, const char*, int, nk_flags align, int value);
+NK_API int nk_select_image_label(struct nk_context*, struct nk_image,const char*, nk_flags align, int value);
+NK_API int nk_select_image_text(struct nk_context*, struct nk_image,const char*, int, nk_flags align, int value);
+NK_API int nk_select_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, int value);
+NK_API int nk_select_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int value);
+
+/* =============================================================================
+ *
+ * SLIDER
+ *
+ * ============================================================================= */
+NK_API float nk_slide_float(struct nk_context*, float min, float val, float max, float step);
+NK_API int nk_slide_int(struct nk_context*, int min, int val, int max, int step);
+NK_API int nk_slider_float(struct nk_context*, float min, float *val, float max, float step);
+NK_API int nk_slider_int(struct nk_context*, int min, int *val, int max, int step);
+/* =============================================================================
+ *
+ * PROGRESSBAR
+ *
+ * ============================================================================= */
+NK_API int nk_progress(struct nk_context*, nk_size *cur, nk_size max, int modifyable);
+NK_API nk_size nk_prog(struct nk_context*, nk_size cur, nk_size max, int modifyable);
+
+/* =============================================================================
+ *
+ * COLOR PICKER
+ *
+ * ============================================================================= */
+NK_API struct nk_colorf nk_color_picker(struct nk_context*, struct nk_colorf, enum nk_color_format);
+NK_API int nk_color_pick(struct nk_context*, struct nk_colorf*, enum nk_color_format);
+/* =============================================================================
+ *
+ * PROPERTIES
+ *
+ * =============================================================================
+/// ### Properties
+/// Properties are the main value modification widgets in Nuklear. Changing a value
+/// can be achieved by dragging, adding/removing incremental steps on button click
+/// or by directly typing a number.
+///
+/// #### Usage
+/// Each property requires a unique name for identifaction that is also used for
+/// displaying a label. If you want to use the same name multiple times make sure
+/// add a '#' before your name. The '#' will not be shown but will generate a
+/// unique ID. Each propery also takes in a minimum and maximum value. If you want
+/// to make use of the complete number range of a type just use the provided
+/// type limits from `limits.h`. For example `INT_MIN` and `INT_MAX` for
+/// `nk_property_int` and `nk_propertyi`. In additional each property takes in
+/// a increment value that will be added or subtracted if either the increment
+/// decrement button is clicked. Finally there is a value for increment per pixel
+/// dragged that is added or subtracted from the value.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int value = 0;
+/// struct nk_context ctx;
+/// nk_init_xxx(&ctx, ...);
+/// while (1) {
+/// // Input
+/// Event evt;
+/// nk_input_begin(&ctx);
+/// while (GetEvent(&evt)) {
+/// if (evt.type == MOUSE_MOVE)
+/// nk_input_motion(&ctx, evt.motion.x, evt.motion.y);
+/// else if (evt.type == [...]) {
+/// nk_input_xxx(...);
+/// }
+/// }
+/// nk_input_end(&ctx);
+/// //
+/// // Window
+/// if (nk_begin_xxx(...) {
+/// // Property
+/// nk_layout_row_dynamic(...);
+/// nk_property_int(ctx, "ID", INT_MIN, &value, INT_MAX, 1, 1);
+/// }
+/// nk_end(ctx);
+/// //
+/// // Draw
+/// const struct nk_command *cmd = 0;
+/// nk_foreach(cmd, &ctx) {
+/// switch (cmd->type) {
+/// case NK_COMMAND_LINE:
+/// your_draw_line_function(...)
+/// break;
+/// case NK_COMMAND_RECT
+/// your_draw_rect_function(...)
+/// break;
+/// case ...:
+/// // [...]
+/// }
+// nk_clear(&ctx);
+/// }
+/// nk_free(&ctx);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// #### Reference
+/// Function | Description
+/// --------------------|-------------------------------------------
+/// nk_property_int | Integer property directly modifing a passed in value
+/// nk_property_float | Float property directly modifing a passed in value
+/// nk_property_double | Double property directly modifing a passed in value
+/// nk_propertyi | Integer property returning the modified int value
+/// nk_propertyf | Float property returning the modified float value
+/// nk_propertyd | Double property returning the modified double value
+///
+*/
+/*/// #### nk_property_int
+/// Integer property directly modifing a passed in value
+/// !!! WARNING
+/// To generate a unique property ID using the same label make sure to insert
+/// a `#` at the beginning. It will not be shown but guarantees correct behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_property_int(struct nk_context *ctx, const char *name, int min, int *val, int max, int step, float inc_per_pixel);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// --------------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling a layouting function
+/// __name__ | String used both as a label as well as a unique identifier
+/// __min__ | Minimum value not allowed to be underflown
+/// __val__ | Integer pointer to be modified
+/// __max__ | Maximum value not allowed to be overflown
+/// __step__ | Increment added and subtracted on increment and decrement button
+/// __inc_per_pixel__ | Value per pixel added or subtracted on dragging
+*/
+NK_API void nk_property_int(struct nk_context*, const char *name, int min, int *val, int max, int step, float inc_per_pixel);
+/*/// #### nk_property_float
+/// Float property directly modifing a passed in value
+/// !!! WARNING
+/// To generate a unique property ID using the same label make sure to insert
+/// a `#` at the beginning. It will not be shown but guarantees correct behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_property_float(struct nk_context *ctx, const char *name, float min, float *val, float max, float step, float inc_per_pixel);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// --------------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling a layouting function
+/// __name__ | String used both as a label as well as a unique identifier
+/// __min__ | Minimum value not allowed to be underflown
+/// __val__ | Float pointer to be modified
+/// __max__ | Maximum value not allowed to be overflown
+/// __step__ | Increment added and subtracted on increment and decrement button
+/// __inc_per_pixel__ | Value per pixel added or subtracted on dragging
+*/
+NK_API void nk_property_float(struct nk_context*, const char *name, float min, float *val, float max, float step, float inc_per_pixel);
+/*/// #### nk_property_double
+/// Double property directly modifing a passed in value
+/// !!! WARNING
+/// To generate a unique property ID using the same label make sure to insert
+/// a `#` at the beginning. It will not be shown but guarantees correct behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// void nk_property_double(struct nk_context *ctx, const char *name, double min, double *val, double max, double step, double inc_per_pixel);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// --------------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling a layouting function
+/// __name__ | String used both as a label as well as a unique identifier
+/// __min__ | Minimum value not allowed to be underflown
+/// __val__ | Double pointer to be modified
+/// __max__ | Maximum value not allowed to be overflown
+/// __step__ | Increment added and subtracted on increment and decrement button
+/// __inc_per_pixel__ | Value per pixel added or subtracted on dragging
+*/
+NK_API void nk_property_double(struct nk_context*, const char *name, double min, double *val, double max, double step, float inc_per_pixel);
+/*/// #### nk_propertyi
+/// Integer property modifing a passed in value and returning the new value
+/// !!! WARNING
+/// To generate a unique property ID using the same label make sure to insert
+/// a `#` at the beginning. It will not be shown but guarantees correct behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// int nk_propertyi(struct nk_context *ctx, const char *name, int min, int val, int max, int step, float inc_per_pixel);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// --------------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling a layouting function
+/// __name__ | String used both as a label as well as a unique identifier
+/// __min__ | Minimum value not allowed to be underflown
+/// __val__ | Current integer value to be modified and returned
+/// __max__ | Maximum value not allowed to be overflown
+/// __step__ | Increment added and subtracted on increment and decrement button
+/// __inc_per_pixel__ | Value per pixel added or subtracted on dragging
+///
+/// Returns the new modified integer value
+*/
+NK_API int nk_propertyi(struct nk_context*, const char *name, int min, int val, int max, int step, float inc_per_pixel);
+/*/// #### nk_propertyf
+/// Float property modifing a passed in value and returning the new value
+/// !!! WARNING
+/// To generate a unique property ID using the same label make sure to insert
+/// a `#` at the beginning. It will not be shown but guarantees correct behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// float nk_propertyf(struct nk_context *ctx, const char *name, float min, float val, float max, float step, float inc_per_pixel);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// --------------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling a layouting function
+/// __name__ | String used both as a label as well as a unique identifier
+/// __min__ | Minimum value not allowed to be underflown
+/// __val__ | Current float value to be modified and returned
+/// __max__ | Maximum value not allowed to be overflown
+/// __step__ | Increment added and subtracted on increment and decrement button
+/// __inc_per_pixel__ | Value per pixel added or subtracted on dragging
+///
+/// Returns the new modified float value
+*/
+NK_API float nk_propertyf(struct nk_context*, const char *name, float min, float val, float max, float step, float inc_per_pixel);
+/*/// #### nk_propertyd
+/// Float property modifing a passed in value and returning the new value
+/// !!! WARNING
+/// To generate a unique property ID using the same label make sure to insert
+/// a `#` at the beginning. It will not be shown but guarantees correct behavior.
+///
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
+/// float nk_propertyd(struct nk_context *ctx, const char *name, double min, double val, double max, double step, double inc_per_pixel);
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+///
+/// Parameter | Description
+/// --------------------|-----------------------------------------------------------
+/// __ctx__ | Must point to an previously initialized `nk_context` struct after calling a layouting function
+/// __name__ | String used both as a label as well as a unique identifier
+/// __min__ | Minimum value not allowed to be underflown
+/// __val__ | Current double value to be modified and returned
+/// __max__ | Maximum value not allowed to be overflown
+/// __step__ | Increment added and subtracted on increment and decrement button
+/// __inc_per_pixel__ | Value per pixel added or subtracted on dragging
+///
+/// Returns the new modified double value
+*/
+NK_API double nk_propertyd(struct nk_context*, const char *name, double min, double val, double max, double step, float inc_per_pixel);
+/* =============================================================================
+ *
+ * TEXT EDIT
+ *
+ * ============================================================================= */
+enum nk_edit_flags {
+ NK_EDIT_DEFAULT = 0,
+ NK_EDIT_READ_ONLY = NK_FLAG(0),
+ NK_EDIT_AUTO_SELECT = NK_FLAG(1),
+ NK_EDIT_SIG_ENTER = NK_FLAG(2),
+ NK_EDIT_ALLOW_TAB = NK_FLAG(3),
+ NK_EDIT_NO_CURSOR = NK_FLAG(4),
+ NK_EDIT_SELECTABLE = NK_FLAG(5),
+ NK_EDIT_CLIPBOARD = NK_FLAG(6),
+ NK_EDIT_CTRL_ENTER_NEWLINE = NK_FLAG(7),
+ NK_EDIT_NO_HORIZONTAL_SCROLL = NK_FLAG(8),
+ NK_EDIT_ALWAYS_INSERT_MODE = NK_FLAG(9),
+ NK_EDIT_MULTILINE = NK_FLAG(10),
+ NK_EDIT_GOTO_END_ON_ACTIVATE = NK_FLAG(11)
+};
+enum nk_edit_types {
+ NK_EDIT_SIMPLE = NK_EDIT_ALWAYS_INSERT_MODE,
+ NK_EDIT_FIELD = NK_EDIT_SIMPLE|NK_EDIT_SELECTABLE|NK_EDIT_CLIPBOARD,
+ NK_EDIT_BOX = NK_EDIT_ALWAYS_INSERT_MODE| NK_EDIT_SELECTABLE| NK_EDIT_MULTILINE|NK_EDIT_ALLOW_TAB|NK_EDIT_CLIPBOARD,
+ NK_EDIT_EDITOR = NK_EDIT_SELECTABLE|NK_EDIT_MULTILINE|NK_EDIT_ALLOW_TAB| NK_EDIT_CLIPBOARD
+};
+enum nk_edit_events {
+ NK_EDIT_ACTIVE = NK_FLAG(0), /* edit widget is currently being modified */
+ NK_EDIT_INACTIVE = NK_FLAG(1), /* edit widget is not active and is not being modified */
+ NK_EDIT_ACTIVATED = NK_FLAG(2), /* edit widget went from state inactive to state active */
+ NK_EDIT_DEACTIVATED = NK_FLAG(3), /* edit widget went from state active to state inactive */
+ NK_EDIT_COMMITED = NK_FLAG(4) /* edit widget has received an enter and lost focus */
+};
+NK_API nk_flags nk_edit_string(struct nk_context*, nk_flags, char *buffer, int *len, int max, nk_plugin_filter);
+NK_API nk_flags nk_edit_string_zero_terminated(struct nk_context*, nk_flags, char *buffer, int max, nk_plugin_filter);
+NK_API nk_flags nk_edit_buffer(struct nk_context*, nk_flags, struct nk_text_edit*, nk_plugin_filter);
+NK_API void nk_edit_focus(struct nk_context*, nk_flags flags);
+NK_API void nk_edit_unfocus(struct nk_context*);
+/* =============================================================================
+ *
+ * CHART
+ *
+ * ============================================================================= */
+NK_API int nk_chart_begin(struct nk_context*, enum nk_chart_type, int num, float min, float max);
+NK_API int nk_chart_begin_colored(struct nk_context*, enum nk_chart_type, struct nk_color, struct nk_color active, int num, float min, float max);
+NK_API void nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type, int count, float min_value, float max_value);
+NK_API void nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type, struct nk_color, struct nk_color active, int count, float min_value, float max_value);
+NK_API nk_flags nk_chart_push(struct nk_context*, float);
+NK_API nk_flags nk_chart_push_slot(struct nk_context*, float, int);
+NK_API void nk_chart_end(struct nk_context*);
+NK_API void nk_plot(struct nk_context*, enum nk_chart_type, const float *values, int count, int offset);
+NK_API void nk_plot_function(struct nk_context*, enum nk_chart_type, void *userdata, float(*value_getter)(void* user, int index), int count, int offset);
+/* =============================================================================
+ *
+ * POPUP
+ *
+ * ============================================================================= */
+NK_API int nk_popup_begin(struct nk_context*, enum nk_popup_type, const char*, nk_flags, struct nk_rect bounds);
+NK_API void nk_popup_close(struct nk_context*);
+NK_API void nk_popup_end(struct nk_context*);
+/* =============================================================================
+ *
+ * COMBOBOX
+ *
+ * ============================================================================= */
+NK_API int nk_combo(struct nk_context*, const char **items, int count, int selected, int item_height, struct nk_vec2 size);
+NK_API int nk_combo_separator(struct nk_context*, const char *items_separated_by_separator, int separator, int selected, int count, int item_height, struct nk_vec2 size);
+NK_API int nk_combo_string(struct nk_context*, const char *items_separated_by_zeros, int selected, int count, int item_height, struct nk_vec2 size);
+NK_API int nk_combo_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void *userdata, int selected, int count, int item_height, struct nk_vec2 size);
+NK_API void nk_combobox(struct nk_context*, const char **items, int count, int *selected, int item_height, struct nk_vec2 size);
+NK_API void nk_combobox_string(struct nk_context*, const char *items_separated_by_zeros, int *selected, int count, int item_height, struct nk_vec2 size);
+NK_API void nk_combobox_separator(struct nk_context*, const char *items_separated_by_separator, int separator,int *selected, int count, int item_height, struct nk_vec2 size);
+NK_API void nk_combobox_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void*, int *selected, int count, int item_height, struct nk_vec2 size);
+/* =============================================================================
+ *
+ * ABSTRACT COMBOBOX
+ *
+ * ============================================================================= */
+NK_API int nk_combo_begin_text(struct nk_context*, const char *selected, int, struct nk_vec2 size);
+NK_API int nk_combo_begin_label(struct nk_context*, const char *selected, struct nk_vec2 size);
+NK_API int nk_combo_begin_color(struct nk_context*, struct nk_color color, struct nk_vec2 size);
+NK_API int nk_combo_begin_symbol(struct nk_context*, enum nk_symbol_type, struct nk_vec2 size);
+NK_API int nk_combo_begin_symbol_label(struct nk_context*, const char *selected, enum nk_symbol_type, struct nk_vec2 size);
+NK_API int nk_combo_begin_symbol_text(struct nk_context*, const char *selected, int, enum nk_symbol_type, struct nk_vec2 size);
+NK_API int nk_combo_begin_image(struct nk_context*, struct nk_image img, struct nk_vec2 size);
+NK_API int nk_combo_begin_image_label(struct nk_context*, const char *selected, struct nk_image, struct nk_vec2 size);
+NK_API int nk_combo_begin_image_text(struct nk_context*, const char *selected, int, struct nk_image, struct nk_vec2 size);
+NK_API int nk_combo_item_label(struct nk_context*, const char*, nk_flags alignment);
+NK_API int nk_combo_item_text(struct nk_context*, const char*,int, nk_flags alignment);
+NK_API int nk_combo_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
+NK_API int nk_combo_item_image_text(struct nk_context*, struct nk_image, const char*, int,nk_flags alignment);
+NK_API int nk_combo_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
+NK_API int nk_combo_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
+NK_API void nk_combo_close(struct nk_context*);
+NK_API void nk_combo_end(struct nk_context*);
+/* =============================================================================
+ *
+ * CONTEXTUAL
+ *
+ * ============================================================================= */
+NK_API int nk_contextual_begin(struct nk_context*, nk_flags, struct nk_vec2, struct nk_rect trigger_bounds);
+NK_API int nk_contextual_item_text(struct nk_context*, const char*, int,nk_flags align);
+NK_API int nk_contextual_item_label(struct nk_context*, const char*, nk_flags align);
+NK_API int nk_contextual_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
+NK_API int nk_contextual_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);
+NK_API int nk_contextual_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
+NK_API int nk_contextual_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
+NK_API void nk_contextual_close(struct nk_context*);
+NK_API void nk_contextual_end(struct nk_context*);
+/* =============================================================================
+ *
+ * TOOLTIP
+ *
+ * ============================================================================= */
+NK_API void nk_tooltip(struct nk_context*, const char*);
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+NK_API void nk_tooltipf(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(2);
+NK_API void nk_tooltipfv(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(2);
+#endif
+NK_API int nk_tooltip_begin(struct nk_context*, float width);
+NK_API void nk_tooltip_end(struct nk_context*);
+/* =============================================================================
+ *
+ * MENU
+ *
+ * ============================================================================= */
+NK_API void nk_menubar_begin(struct nk_context*);
+NK_API void nk_menubar_end(struct nk_context*);
+NK_API int nk_menu_begin_text(struct nk_context*, const char* title, int title_len, nk_flags align, struct nk_vec2 size);
+NK_API int nk_menu_begin_label(struct nk_context*, const char*, nk_flags align, struct nk_vec2 size);
+NK_API int nk_menu_begin_image(struct nk_context*, const char*, struct nk_image, struct nk_vec2 size);
+NK_API int nk_menu_begin_image_text(struct nk_context*, const char*, int,nk_flags align,struct nk_image, struct nk_vec2 size);
+NK_API int nk_menu_begin_image_label(struct nk_context*, const char*, nk_flags align,struct nk_image, struct nk_vec2 size);
+NK_API int nk_menu_begin_symbol(struct nk_context*, const char*, enum nk_symbol_type, struct nk_vec2 size);
+NK_API int nk_menu_begin_symbol_text(struct nk_context*, const char*, int,nk_flags align,enum nk_symbol_type, struct nk_vec2 size);
+NK_API int nk_menu_begin_symbol_label(struct nk_context*, const char*, nk_flags align,enum nk_symbol_type, struct nk_vec2 size);
+NK_API int nk_menu_item_text(struct nk_context*, const char*, int,nk_flags align);
+NK_API int nk_menu_item_label(struct nk_context*, const char*, nk_flags alignment);
+NK_API int nk_menu_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
+NK_API int nk_menu_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);
+NK_API int nk_menu_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
+NK_API int nk_menu_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
+NK_API void nk_menu_close(struct nk_context*);
+NK_API void nk_menu_end(struct nk_context*);
+/* =============================================================================
+ *
+ * STYLE
+ *
+ * ============================================================================= */
+enum nk_style_colors {
+ NK_COLOR_TEXT,
+ NK_COLOR_WINDOW,
+ NK_COLOR_HEADER,
+ NK_COLOR_BORDER,
+ NK_COLOR_BUTTON,
+ NK_COLOR_BUTTON_HOVER,
+ NK_COLOR_BUTTON_ACTIVE,
+ NK_COLOR_TOGGLE,
+ NK_COLOR_TOGGLE_HOVER,
+ NK_COLOR_TOGGLE_CURSOR,
+ NK_COLOR_SELECT,
+ NK_COLOR_SELECT_ACTIVE,
+ NK_COLOR_SLIDER,
+ NK_COLOR_SLIDER_CURSOR,
+ NK_COLOR_SLIDER_CURSOR_HOVER,
+ NK_COLOR_SLIDER_CURSOR_ACTIVE,
+ NK_COLOR_PROPERTY,
+ NK_COLOR_EDIT,
+ NK_COLOR_EDIT_CURSOR,
+ NK_COLOR_COMBO,
+ NK_COLOR_CHART,
+ NK_COLOR_CHART_COLOR,
+ NK_COLOR_CHART_COLOR_HIGHLIGHT,
+ NK_COLOR_SCROLLBAR,
+ NK_COLOR_SCROLLBAR_CURSOR,
+ NK_COLOR_SCROLLBAR_CURSOR_HOVER,
+ NK_COLOR_SCROLLBAR_CURSOR_ACTIVE,
+ NK_COLOR_TAB_HEADER,
+ NK_COLOR_COUNT
+};
+enum nk_style_cursor {
+ NK_CURSOR_ARROW,
+ NK_CURSOR_TEXT,
+ NK_CURSOR_MOVE,
+ NK_CURSOR_RESIZE_VERTICAL,
+ NK_CURSOR_RESIZE_HORIZONTAL,
+ NK_CURSOR_RESIZE_TOP_LEFT_DOWN_RIGHT,
+ NK_CURSOR_RESIZE_TOP_RIGHT_DOWN_LEFT,
+ NK_CURSOR_COUNT
+};
+NK_API void nk_style_default(struct nk_context*);
+NK_API void nk_style_from_table(struct nk_context*, const struct nk_color*);
+NK_API void nk_style_load_cursor(struct nk_context*, enum nk_style_cursor, const struct nk_cursor*);
+NK_API void nk_style_load_all_cursors(struct nk_context*, struct nk_cursor*);
+NK_API const char* nk_style_get_color_by_name(enum nk_style_colors);
+NK_API void nk_style_set_font(struct nk_context*, const struct nk_user_font*);
+NK_API int nk_style_set_cursor(struct nk_context*, enum nk_style_cursor);
+NK_API void nk_style_show_cursor(struct nk_context*);
+NK_API void nk_style_hide_cursor(struct nk_context*);
+
+NK_API int nk_style_push_font(struct nk_context*, const struct nk_user_font*);
+NK_API int nk_style_push_float(struct nk_context*, float*, float);
+NK_API int nk_style_push_vec2(struct nk_context*, struct nk_vec2*, struct nk_vec2);
+NK_API int nk_style_push_style_item(struct nk_context*, struct nk_style_item*, struct nk_style_item);
+NK_API int nk_style_push_flags(struct nk_context*, nk_flags*, nk_flags);
+NK_API int nk_style_push_color(struct nk_context*, struct nk_color*, struct nk_color);
+
+NK_API int nk_style_pop_font(struct nk_context*);
+NK_API int nk_style_pop_float(struct nk_context*);
+NK_API int nk_style_pop_vec2(struct nk_context*);
+NK_API int nk_style_pop_style_item(struct nk_context*);
+NK_API int nk_style_pop_flags(struct nk_context*);
+NK_API int nk_style_pop_color(struct nk_context*);
+/* =============================================================================
+ *
+ * COLOR
+ *
+ * ============================================================================= */
+NK_API struct nk_color nk_rgb(int r, int g, int b);
+NK_API struct nk_color nk_rgb_iv(const int *rgb);
+NK_API struct nk_color nk_rgb_bv(const nk_byte* rgb);
+NK_API struct nk_color nk_rgb_f(float r, float g, float b);
+NK_API struct nk_color nk_rgb_fv(const float *rgb);
+NK_API struct nk_color nk_rgb_cf(struct nk_colorf c);
+NK_API struct nk_color nk_rgb_hex(const char *rgb);
+
+NK_API struct nk_color nk_rgba(int r, int g, int b, int a);
+NK_API struct nk_color nk_rgba_u32(nk_uint);
+NK_API struct nk_color nk_rgba_iv(const int *rgba);
+NK_API struct nk_color nk_rgba_bv(const nk_byte *rgba);
+NK_API struct nk_color nk_rgba_f(float r, float g, float b, float a);
+NK_API struct nk_color nk_rgba_fv(const float *rgba);
+NK_API struct nk_color nk_rgba_cf(struct nk_colorf c);
+NK_API struct nk_color nk_rgba_hex(const char *rgb);
+
+NK_API struct nk_colorf nk_hsva_colorf(float h, float s, float v, float a);
+NK_API struct nk_colorf nk_hsva_colorfv(float *c);
+NK_API void nk_colorf_hsva_f(float *out_h, float *out_s, float *out_v, float *out_a, struct nk_colorf in);
+NK_API void nk_colorf_hsva_fv(float *hsva, struct nk_colorf in);
+
+NK_API struct nk_color nk_hsv(int h, int s, int v);
+NK_API struct nk_color nk_hsv_iv(const int *hsv);
+NK_API struct nk_color nk_hsv_bv(const nk_byte *hsv);
+NK_API struct nk_color nk_hsv_f(float h, float s, float v);
+NK_API struct nk_color nk_hsv_fv(const float *hsv);
+
+NK_API struct nk_color nk_hsva(int h, int s, int v, int a);
+NK_API struct nk_color nk_hsva_iv(const int *hsva);
+NK_API struct nk_color nk_hsva_bv(const nk_byte *hsva);
+NK_API struct nk_color nk_hsva_f(float h, float s, float v, float a);
+NK_API struct nk_color nk_hsva_fv(const float *hsva);
+
+/* color (conversion nuklear --> user) */
+NK_API void nk_color_f(float *r, float *g, float *b, float *a, struct nk_color);
+NK_API void nk_color_fv(float *rgba_out, struct nk_color);
+NK_API struct nk_colorf nk_color_cf(struct nk_color);
+NK_API void nk_color_d(double *r, double *g, double *b, double *a, struct nk_color);
+NK_API void nk_color_dv(double *rgba_out, struct nk_color);
+
+NK_API nk_uint nk_color_u32(struct nk_color);
+NK_API void nk_color_hex_rgba(char *output, struct nk_color);
+NK_API void nk_color_hex_rgb(char *output, struct nk_color);
+
+NK_API void nk_color_hsv_i(int *out_h, int *out_s, int *out_v, struct nk_color);
+NK_API void nk_color_hsv_b(nk_byte *out_h, nk_byte *out_s, nk_byte *out_v, struct nk_color);
+NK_API void nk_color_hsv_iv(int *hsv_out, struct nk_color);
+NK_API void nk_color_hsv_bv(nk_byte *hsv_out, struct nk_color);
+NK_API void nk_color_hsv_f(float *out_h, float *out_s, float *out_v, struct nk_color);
+NK_API void nk_color_hsv_fv(float *hsv_out, struct nk_color);
+
+NK_API void nk_color_hsva_i(int *h, int *s, int *v, int *a, struct nk_color);
+NK_API void nk_color_hsva_b(nk_byte *h, nk_byte *s, nk_byte *v, nk_byte *a, struct nk_color);
+NK_API void nk_color_hsva_iv(int *hsva_out, struct nk_color);
+NK_API void nk_color_hsva_bv(nk_byte *hsva_out, struct nk_color);
+NK_API void nk_color_hsva_f(float *out_h, float *out_s, float *out_v, float *out_a, struct nk_color);
+NK_API void nk_color_hsva_fv(float *hsva_out, struct nk_color);
+/* =============================================================================
+ *
+ * IMAGE
+ *
+ * ============================================================================= */
+NK_API nk_handle nk_handle_ptr(void*);
+NK_API nk_handle nk_handle_id(int);
+NK_API struct nk_image nk_image_handle(nk_handle);
+NK_API struct nk_image nk_image_ptr(void*);
+NK_API struct nk_image nk_image_id(int);
+NK_API int nk_image_is_subimage(const struct nk_image* img);
+NK_API struct nk_image nk_subimage_ptr(void*, unsigned short w, unsigned short h, struct nk_rect sub_region);
+NK_API struct nk_image nk_subimage_id(int, unsigned short w, unsigned short h, struct nk_rect sub_region);
+NK_API struct nk_image nk_subimage_handle(nk_handle, unsigned short w, unsigned short h, struct nk_rect sub_region);
+/* =============================================================================
+ *
+ * MATH
+ *
+ * ============================================================================= */
+NK_API nk_hash nk_murmur_hash(const void *key, int len, nk_hash seed);
+NK_API void nk_triangle_from_direction(struct nk_vec2 *result, struct nk_rect r, float pad_x, float pad_y, enum nk_heading);
+
+NK_API struct nk_vec2 nk_vec2(float x, float y);
+NK_API struct nk_vec2 nk_vec2i(int x, int y);
+NK_API struct nk_vec2 nk_vec2v(const float *xy);
+NK_API struct nk_vec2 nk_vec2iv(const int *xy);
+
+NK_API struct nk_rect nk_get_null_rect(void);
+NK_API struct nk_rect nk_rect(float x, float y, float w, float h);
+NK_API struct nk_rect nk_recti(int x, int y, int w, int h);
+NK_API struct nk_rect nk_recta(struct nk_vec2 pos, struct nk_vec2 size);
+NK_API struct nk_rect nk_rectv(const float *xywh);
+NK_API struct nk_rect nk_rectiv(const int *xywh);
+NK_API struct nk_vec2 nk_rect_pos(struct nk_rect);
+NK_API struct nk_vec2 nk_rect_size(struct nk_rect);
+/* =============================================================================
+ *
+ * STRING
+ *
+ * ============================================================================= */
+NK_API int nk_strlen(const char *str);
+NK_API int nk_stricmp(const char *s1, const char *s2);
+NK_API int nk_stricmpn(const char *s1, const char *s2, int n);
+NK_API int nk_strtoi(const char *str, const char **endptr);
+NK_API float nk_strtof(const char *str, const char **endptr);
+NK_API double nk_strtod(const char *str, const char **endptr);
+NK_API int nk_strfilter(const char *text, const char *regexp);
+NK_API int nk_strmatch_fuzzy_string(char const *str, char const *pattern, int *out_score);
+NK_API int nk_strmatch_fuzzy_text(const char *txt, int txt_len, const char *pattern, int *out_score);
+/* =============================================================================
+ *
+ * UTF-8
+ *
+ * ============================================================================= */
+NK_API int nk_utf_decode(const char*, nk_rune*, int);
+NK_API int nk_utf_encode(nk_rune, char*, int);
+NK_API int nk_utf_len(const char*, int byte_len);
+NK_API const char* nk_utf_at(const char *buffer, int length, int index, nk_rune *unicode, int *len);
+/* ===============================================================
+ *
+ * FONT
+ *
+ * ===============================================================*/
+/* Font handling in this library was designed to be quite customizable and lets
+ you decide what you want to use and what you want to provide. There are three
+ different ways to use the font atlas. The first two will use your font
+ handling scheme and only requires essential data to run nuklear. The next
+ slightly more advanced features is font handling with vertex buffer output.
+ Finally the most complex API wise is using nuklear's font baking API.
+
+ 1.) Using your own implementation without vertex buffer output
+ --------------------------------------------------------------
+ So first up the easiest way to do font handling is by just providing a
+ `nk_user_font` struct which only requires the height in pixel of the used
+ font and a callback to calculate the width of a string. This way of handling
+ fonts is best fitted for using the normal draw shape command API where you
+ do all the text drawing yourself and the library does not require any kind
+ of deeper knowledge about which font handling mechanism you use.
+ IMPORTANT: the `nk_user_font` pointer provided to nuklear has to persist
+ over the complete life time! I know this sucks but it is currently the only
+ way to switch between fonts.
+
+ float your_text_width_calculation(nk_handle handle, float height, const char *text, int len)
+ {
+ your_font_type *type = handle.ptr;
+ float text_width = ...;
+ return text_width;
+ }
+
+ struct nk_user_font font;
+ font.userdata.ptr = &your_font_class_or_struct;
+ font.height = your_font_height;
+ font.width = your_text_width_calculation;
+
+ struct nk_context ctx;
+ nk_init_default(&ctx, &font);
+
+ 2.) Using your own implementation with vertex buffer output
+ --------------------------------------------------------------
+ While the first approach works fine if you don't want to use the optional
+ vertex buffer output it is not enough if you do. To get font handling working
+ for these cases you have to provide two additional parameters inside the
+ `nk_user_font`. First a texture atlas handle used to draw text as subimages
+ of a bigger font atlas texture and a callback to query a character's glyph
+ information (offset, size, ...). So it is still possible to provide your own
+ font and use the vertex buffer output.
+
+ float your_text_width_calculation(nk_handle handle, float height, const char *text, int len)
+ {
+ your_font_type *type = handle.ptr;
+ float text_width = ...;
+ return text_width;
+ }
+ void query_your_font_glyph(nk_handle handle, float font_height, struct nk_user_font_glyph *glyph, nk_rune codepoint, nk_rune next_codepoint)
+ {
+ your_font_type *type = handle.ptr;
+ glyph.width = ...;
+ glyph.height = ...;
+ glyph.xadvance = ...;
+ glyph.uv[0].x = ...;
+ glyph.uv[0].y = ...;
+ glyph.uv[1].x = ...;
+ glyph.uv[1].y = ...;
+ glyph.offset.x = ...;
+ glyph.offset.y = ...;
+ }
+
+ struct nk_user_font font;
+ font.userdata.ptr = &your_font_class_or_struct;
+ font.height = your_font_height;
+ font.width = your_text_width_calculation;
+ font.query = query_your_font_glyph;
+ font.texture.id = your_font_texture;
+
+ struct nk_context ctx;
+ nk_init_default(&ctx, &font);
+
+ 3.) Nuklear font baker
+ ------------------------------------
+ The final approach if you do not have a font handling functionality or don't
+ want to use it in this library is by using the optional font baker.
+ The font baker APIs can be used to create a font plus font atlas texture
+ and can be used with or without the vertex buffer output.
+
+ It still uses the `nk_user_font` struct and the two different approaches
+ previously stated still work. The font baker is not located inside
+ `nk_context` like all other systems since it can be understood as more of
+ an extension to nuklear and does not really depend on any `nk_context` state.
+
+ Font baker need to be initialized first by one of the nk_font_atlas_init_xxx
+ functions. If you don't care about memory just call the default version
+ `nk_font_atlas_init_default` which will allocate all memory from the standard library.
+ If you want to control memory allocation but you don't care if the allocated
+ memory is temporary and therefore can be freed directly after the baking process
+ is over or permanent you can call `nk_font_atlas_init`.
+
+ After successfully initializing the font baker you can add Truetype(.ttf) fonts from
+ different sources like memory or from file by calling one of the `nk_font_atlas_add_xxx`.
+ functions. Adding font will permanently store each font, font config and ttf memory block(!)
+ inside the font atlas and allows to reuse the font atlas. If you don't want to reuse
+ the font baker by for example adding additional fonts you can call
+ `nk_font_atlas_cleanup` after the baking process is over (after calling nk_font_atlas_end).
+
+ As soon as you added all fonts you wanted you can now start the baking process
+ for every selected glyph to image by calling `nk_font_atlas_bake`.
+ The baking process returns image memory, width and height which can be used to
+ either create your own image object or upload it to any graphics library.
+ No matter which case you finally have to call `nk_font_atlas_end` which
+ will free all temporary memory including the font atlas image so make sure
+ you created our texture beforehand. `nk_font_atlas_end` requires a handle
+ to your font texture or object and optionally fills a `struct nk_draw_null_texture`
+ which can be used for the optional vertex output. If you don't want it just
+ set the argument to `NULL`.
+
+ At this point you are done and if you don't want to reuse the font atlas you
+ can call `nk_font_atlas_cleanup` to free all truetype blobs and configuration
+ memory. Finally if you don't use the font atlas and any of it's fonts anymore
+ you need to call `nk_font_atlas_clear` to free all memory still being used.
+
+ struct nk_font_atlas atlas;
+ nk_font_atlas_init_default(&atlas);
+ nk_font_atlas_begin(&atlas);
+ nk_font *font = nk_font_atlas_add_from_file(&atlas, "Path/To/Your/TTF_Font.ttf", 13, 0);
+ nk_font *font2 = nk_font_atlas_add_from_file(&atlas, "Path/To/Your/TTF_Font2.ttf", 16, 0);
+ const void* img = nk_font_atlas_bake(&atlas, &img_width, &img_height, NK_FONT_ATLAS_RGBA32);
+ nk_font_atlas_end(&atlas, nk_handle_id(texture), 0);
+
+ struct nk_context ctx;
+ nk_init_default(&ctx, &font->handle);
+ while (1) {
+
+ }
+ nk_font_atlas_clear(&atlas);
+
+ The font baker API is probably the most complex API inside this library and
+ I would suggest reading some of my examples `example/` to get a grip on how
+ to use the font atlas. There are a number of details I left out. For example
+ how to merge fonts, configure a font with `nk_font_config` to use other languages,
+ use another texture coordinate format and a lot more:
+
+ struct nk_font_config cfg = nk_font_config(font_pixel_height);
+ cfg.merge_mode = nk_false or nk_true;
+ cfg.range = nk_font_korean_glyph_ranges();
+ cfg.coord_type = NK_COORD_PIXEL;
+ nk_font *font = nk_font_atlas_add_from_file(&atlas, "Path/To/Your/TTF_Font.ttf", 13, &cfg);
+
+*/
+struct nk_user_font_glyph;
+typedef float(*nk_text_width_f)(nk_handle, float h, const char*, int len);
+typedef void(*nk_query_font_glyph_f)(nk_handle handle, float font_height,
+ struct nk_user_font_glyph *glyph,
+ nk_rune codepoint, nk_rune next_codepoint);
+
+#if defined(NK_INCLUDE_VERTEX_BUFFER_OUTPUT) || defined(NK_INCLUDE_SOFTWARE_FONT)
+struct nk_user_font_glyph {
+ struct nk_vec2 uv[2];
+ /* texture coordinates */
+ struct nk_vec2 offset;
+ /* offset between top left and glyph */
+ float width, height;
+ /* size of the glyph */
+ float xadvance;
+ /* offset to the next glyph */
+};
+#endif
+
+struct nk_user_font {
+ nk_handle userdata;
+ /* user provided font handle */
+ float height;
+ /* max height of the font */
+ nk_text_width_f width;
+ /* font string width in pixel callback */
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+ nk_query_font_glyph_f query;
+ /* font glyph callback to query drawing info */
+ nk_handle texture;
+ /* texture handle to the used font atlas or texture */
+#endif
+};
+
+#ifdef NK_INCLUDE_FONT_BAKING
+enum nk_font_coord_type {
+ NK_COORD_UV, /* texture coordinates inside font glyphs are clamped between 0-1 */
+ NK_COORD_PIXEL /* texture coordinates inside font glyphs are in absolute pixel */
+};
+
+struct nk_font;
+struct nk_baked_font {
+ float height;
+ /* height of the font */
+ float ascent, descent;
+ /* font glyphs ascent and descent */
+ nk_rune glyph_offset;
+ /* glyph array offset inside the font glyph baking output array */
+ nk_rune glyph_count;
+ /* number of glyphs of this font inside the glyph baking array output */
+ const nk_rune *ranges;
+ /* font codepoint ranges as pairs of (from/to) and 0 as last element */
+};
+
+struct nk_font_config {
+ struct nk_font_config *next;
+ /* NOTE: only used internally */
+ void *ttf_blob;
+ /* pointer to loaded TTF file memory block.
+ * NOTE: not needed for nk_font_atlas_add_from_memory and nk_font_atlas_add_from_file. */
+ nk_size ttf_size;
+ /* size of the loaded TTF file memory block
+ * NOTE: not needed for nk_font_atlas_add_from_memory and nk_font_atlas_add_from_file. */
+
+ unsigned char ttf_data_owned_by_atlas;
+ /* used inside font atlas: default to: 0*/
+ unsigned char merge_mode;
+ /* merges this font into the last font */
+ unsigned char pixel_snap;
+ /* align every character to pixel boundary (if true set oversample (1,1)) */
+ unsigned char oversample_v, oversample_h;
+ /* rasterize at hight quality for sub-pixel position */
+ unsigned char padding[3];
+
+ float size;
+ /* baked pixel height of the font */
+ enum nk_font_coord_type coord_type;
+ /* texture coordinate format with either pixel or UV coordinates */
+ struct nk_vec2 spacing;
+ /* extra pixel spacing between glyphs */
+ const nk_rune *range;
+ /* list of unicode ranges (2 values per range, zero terminated) */
+ struct nk_baked_font *font;
+ /* font to setup in the baking process: NOTE: not needed for font atlas */
+ nk_rune fallback_glyph;
+ /* fallback glyph to use if a given rune is not found */
+ struct nk_font_config *n;
+ struct nk_font_config *p;
+};
+
+struct nk_font_glyph {
+ nk_rune codepoint;
+ float xadvance;
+ float x0, y0, x1, y1, w, h;
+ float u0, v0, u1, v1;
+};
+
+struct nk_font {
+ struct nk_font *next;
+ struct nk_user_font handle;
+ struct nk_baked_font info;
+ float scale;
+ struct nk_font_glyph *glyphs;
+ const struct nk_font_glyph *fallback;
+ nk_rune fallback_codepoint;
+ nk_handle texture;
+ struct nk_font_config *config;
+};
+
+enum nk_font_atlas_format {
+ NK_FONT_ATLAS_ALPHA8,
+ NK_FONT_ATLAS_RGBA32
+};
+
+struct nk_font_atlas {
+ void *pixel;
+ int tex_width;
+ int tex_height;
+
+ struct nk_allocator permanent;
+ struct nk_allocator temporary;
+
+ struct nk_recti custom;
+ struct nk_cursor cursors[NK_CURSOR_COUNT];
+
+ int glyph_count;
+ struct nk_font_glyph *glyphs;
+ struct nk_font *default_font;
+ struct nk_font *fonts;
+ struct nk_font_config *config;
+ int font_num;
+};
+
+/* some language glyph codepoint ranges */
+NK_API const nk_rune *nk_font_default_glyph_ranges(void);
+NK_API const nk_rune *nk_font_chinese_glyph_ranges(void);
+NK_API const nk_rune *nk_font_cyrillic_glyph_ranges(void);
+NK_API const nk_rune *nk_font_korean_glyph_ranges(void);
+
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void nk_font_atlas_init_default(struct nk_font_atlas*);
+#endif
+NK_API void nk_font_atlas_init(struct nk_font_atlas*, struct nk_allocator*);
+NK_API void nk_font_atlas_init_custom(struct nk_font_atlas*, struct nk_allocator *persistent, struct nk_allocator *transient);
+NK_API void nk_font_atlas_begin(struct nk_font_atlas*);
+NK_API struct nk_font_config nk_font_config(float pixel_height);
+NK_API struct nk_font *nk_font_atlas_add(struct nk_font_atlas*, const struct nk_font_config*);
+#ifdef NK_INCLUDE_DEFAULT_FONT
+NK_API struct nk_font* nk_font_atlas_add_default(struct nk_font_atlas*, float height, const struct nk_font_config*);
+#endif
+NK_API struct nk_font* nk_font_atlas_add_from_memory(struct nk_font_atlas *atlas, void *memory, nk_size size, float height, const struct nk_font_config *config);
+#ifdef NK_INCLUDE_STANDARD_IO
+NK_API struct nk_font* nk_font_atlas_add_from_file(struct nk_font_atlas *atlas, const char *file_path, float height, const struct nk_font_config*);
+#endif
+NK_API struct nk_font *nk_font_atlas_add_compressed(struct nk_font_atlas*, void *memory, nk_size size, float height, const struct nk_font_config*);
+NK_API struct nk_font* nk_font_atlas_add_compressed_base85(struct nk_font_atlas*, const char *data, float height, const struct nk_font_config *config);
+NK_API const void* nk_font_atlas_bake(struct nk_font_atlas*, int *width, int *height, enum nk_font_atlas_format);
+NK_API void nk_font_atlas_end(struct nk_font_atlas*, nk_handle tex, struct nk_draw_null_texture*);
+NK_API const struct nk_font_glyph* nk_font_find_glyph(struct nk_font*, nk_rune unicode);
+NK_API void nk_font_atlas_cleanup(struct nk_font_atlas *atlas);
+NK_API void nk_font_atlas_clear(struct nk_font_atlas*);
+
+#endif
+
+/* ==============================================================
+ *
+ * MEMORY BUFFER
+ *
+ * ===============================================================*/
+/* A basic (double)-buffer with linear allocation and resetting as only
+ freeing policy. The buffer's main purpose is to control all memory management
+ inside the GUI toolkit and still leave memory control as much as possible in
+ the hand of the user while also making sure the library is easy to use if
+ not as much control is needed.
+ In general all memory inside this library can be provided from the user in
+ three different ways.
+
+ The first way and the one providing most control is by just passing a fixed
+ size memory block. In this case all control lies in the hand of the user
+ since he can exactly control where the memory comes from and how much memory
+ the library should consume. Of course using the fixed size API removes the
+ ability to automatically resize a buffer if not enough memory is provided so
+ you have to take over the resizing. While being a fixed sized buffer sounds
+ quite limiting, it is very effective in this library since the actual memory
+ consumption is quite stable and has a fixed upper bound for a lot of cases.
+
+ If you don't want to think about how much memory the library should allocate
+ at all time or have a very dynamic UI with unpredictable memory consumption
+ habits but still want control over memory allocation you can use the dynamic
+ allocator based API. The allocator consists of two callbacks for allocating
+ and freeing memory and optional userdata so you can plugin your own allocator.
+
+ The final and easiest way can be used by defining
+ NK_INCLUDE_DEFAULT_ALLOCATOR which uses the standard library memory
+ allocation functions malloc and free and takes over complete control over
+ memory in this library.
+*/
+struct nk_memory_status {
+ void *memory;
+ unsigned int type;
+ nk_size size;
+ nk_size allocated;
+ nk_size needed;
+ nk_size calls;
+};
+
+enum nk_allocation_type {
+ NK_BUFFER_FIXED,
+ NK_BUFFER_DYNAMIC
+};
+
+enum nk_buffer_allocation_type {
+ NK_BUFFER_FRONT,
+ NK_BUFFER_BACK,
+ NK_BUFFER_MAX
+};
+
+struct nk_buffer_marker {
+ int active;
+ nk_size offset;
+};
+
+struct nk_memory {void *ptr;nk_size size;};
+struct nk_buffer {
+ struct nk_buffer_marker marker[NK_BUFFER_MAX];
+ /* buffer marker to free a buffer to a certain offset */
+ struct nk_allocator pool;
+ /* allocator callback for dynamic buffers */
+ enum nk_allocation_type type;
+ /* memory management type */
+ struct nk_memory memory;
+ /* memory and size of the current memory block */
+ float grow_factor;
+ /* growing factor for dynamic memory management */
+ nk_size allocated;
+ /* total amount of memory allocated */
+ nk_size needed;
+ /* totally consumed memory given that enough memory is present */
+ nk_size calls;
+ /* number of allocation calls */
+ nk_size size;
+ /* current size of the buffer */
+};
+
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void nk_buffer_init_default(struct nk_buffer*);
+#endif
+NK_API void nk_buffer_init(struct nk_buffer*, const struct nk_allocator*, nk_size size);
+NK_API void nk_buffer_init_fixed(struct nk_buffer*, void *memory, nk_size size);
+NK_API void nk_buffer_info(struct nk_memory_status*, struct nk_buffer*);
+NK_API void nk_buffer_push(struct nk_buffer*, enum nk_buffer_allocation_type type, const void *memory, nk_size size, nk_size align);
+NK_API void nk_buffer_mark(struct nk_buffer*, enum nk_buffer_allocation_type type);
+NK_API void nk_buffer_reset(struct nk_buffer*, enum nk_buffer_allocation_type type);
+NK_API void nk_buffer_clear(struct nk_buffer*);
+NK_API void nk_buffer_free(struct nk_buffer*);
+NK_API void *nk_buffer_memory(struct nk_buffer*);
+NK_API const void *nk_buffer_memory_const(const struct nk_buffer*);
+NK_API nk_size nk_buffer_total(struct nk_buffer*);
+
+/* ==============================================================
+ *
+ * STRING
+ *
+ * ===============================================================*/
+/* Basic string buffer which is only used in context with the text editor
+ * to manage and manipulate dynamic or fixed size string content. This is _NOT_
+ * the default string handling method. The only instance you should have any contact
+ * with this API is if you interact with an `nk_text_edit` object inside one of the
+ * copy and paste functions and even there only for more advanced cases. */
+struct nk_str {
+ struct nk_buffer buffer;
+ int len; /* in codepoints/runes/glyphs */
+};
+
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void nk_str_init_default(struct nk_str*);
+#endif
+NK_API void nk_str_init(struct nk_str*, const struct nk_allocator*, nk_size size);
+NK_API void nk_str_init_fixed(struct nk_str*, void *memory, nk_size size);
+NK_API void nk_str_clear(struct nk_str*);
+NK_API void nk_str_free(struct nk_str*);
+
+NK_API int nk_str_append_text_char(struct nk_str*, const char*, int);
+NK_API int nk_str_append_str_char(struct nk_str*, const char*);
+NK_API int nk_str_append_text_utf8(struct nk_str*, const char*, int);
+NK_API int nk_str_append_str_utf8(struct nk_str*, const char*);
+NK_API int nk_str_append_text_runes(struct nk_str*, const nk_rune*, int);
+NK_API int nk_str_append_str_runes(struct nk_str*, const nk_rune*);
+
+NK_API int nk_str_insert_at_char(struct nk_str*, int pos, const char*, int);
+NK_API int nk_str_insert_at_rune(struct nk_str*, int pos, const char*, int);
+
+NK_API int nk_str_insert_text_char(struct nk_str*, int pos, const char*, int);
+NK_API int nk_str_insert_str_char(struct nk_str*, int pos, const char*);
+NK_API int nk_str_insert_text_utf8(struct nk_str*, int pos, const char*, int);
+NK_API int nk_str_insert_str_utf8(struct nk_str*, int pos, const char*);
+NK_API int nk_str_insert_text_runes(struct nk_str*, int pos, const nk_rune*, int);
+NK_API int nk_str_insert_str_runes(struct nk_str*, int pos, const nk_rune*);
+
+NK_API void nk_str_remove_chars(struct nk_str*, int len);
+NK_API void nk_str_remove_runes(struct nk_str *str, int len);
+NK_API void nk_str_delete_chars(struct nk_str*, int pos, int len);
+NK_API void nk_str_delete_runes(struct nk_str*, int pos, int len);
+
+NK_API char *nk_str_at_char(struct nk_str*, int pos);
+NK_API char *nk_str_at_rune(struct nk_str*, int pos, nk_rune *unicode, int *len);
+NK_API nk_rune nk_str_rune_at(const struct nk_str*, int pos);
+NK_API const char *nk_str_at_char_const(const struct nk_str*, int pos);
+NK_API const char *nk_str_at_const(const struct nk_str*, int pos, nk_rune *unicode, int *len);
+
+NK_API char *nk_str_get(struct nk_str*);
+NK_API const char *nk_str_get_const(const struct nk_str*);
+NK_API int nk_str_len(struct nk_str*);
+NK_API int nk_str_len_char(struct nk_str*);
+
+/*===============================================================
+ *
+ * TEXT EDITOR
+ *
+ * ===============================================================*/
+/* Editing text in this library is handled by either `nk_edit_string` or
+ * `nk_edit_buffer`. But like almost everything in this library there are multiple
+ * ways of doing it and a balance between control and ease of use with memory
+ * as well as functionality controlled by flags.
+ *
+ * This library generally allows three different levels of memory control:
+ * First of is the most basic way of just providing a simple char array with
+ * string length. This method is probably the easiest way of handling simple
+ * user text input. Main upside is complete control over memory while the biggest
+ * downside in comparison with the other two approaches is missing undo/redo.
+ *
+ * For UIs that require undo/redo the second way was created. It is based on
+ * a fixed size nk_text_edit struct, which has an internal undo/redo stack.
+ * This is mainly useful if you want something more like a text editor but don't want
+ * to have a dynamically growing buffer.
+ *
+ * The final way is using a dynamically growing nk_text_edit struct, which
+ * has both a default version if you don't care where memory comes from and an
+ * allocator version if you do. While the text editor is quite powerful for its
+ * complexity I would not recommend editing gigabytes of data with it.
+ * It is rather designed for uses cases which make sense for a GUI library not for
+ * an full blown text editor.
+ */
+#ifndef NK_TEXTEDIT_UNDOSTATECOUNT
+#define NK_TEXTEDIT_UNDOSTATECOUNT 99
+#endif
+
+#ifndef NK_TEXTEDIT_UNDOCHARCOUNT
+#define NK_TEXTEDIT_UNDOCHARCOUNT 999
+#endif
+
+struct nk_text_edit;
+struct nk_clipboard {
+ nk_handle userdata;
+ nk_plugin_paste paste;
+ nk_plugin_copy copy;
+};
+
+struct nk_text_undo_record {
+ int where;
+ short insert_length;
+ short delete_length;
+ short char_storage;
+};
+
+struct nk_text_undo_state {
+ struct nk_text_undo_record undo_rec[NK_TEXTEDIT_UNDOSTATECOUNT];
+ nk_rune undo_char[NK_TEXTEDIT_UNDOCHARCOUNT];
+ short undo_point;
+ short redo_point;
+ short undo_char_point;
+ short redo_char_point;
+};
+
+enum nk_text_edit_type {
+ NK_TEXT_EDIT_SINGLE_LINE,
+ NK_TEXT_EDIT_MULTI_LINE
+};
+
+enum nk_text_edit_mode {
+ NK_TEXT_EDIT_MODE_VIEW,
+ NK_TEXT_EDIT_MODE_INSERT,
+ NK_TEXT_EDIT_MODE_REPLACE
+};
+
+struct nk_text_edit {
+ struct nk_clipboard clip;
+ struct nk_str string;
+ nk_plugin_filter filter;
+ struct nk_vec2 scrollbar;
+
+ int cursor;
+ int select_start;
+ int select_end;
+ unsigned char mode;
+ unsigned char cursor_at_end_of_line;
+ unsigned char initialized;
+ unsigned char has_preferred_x;
+ unsigned char single_line;
+ unsigned char active;
+ unsigned char padding1;
+ float preferred_x;
+ struct nk_text_undo_state undo;
+};
+
+/* filter function */
+NK_API int nk_filter_default(const struct nk_text_edit*, nk_rune unicode);
+NK_API int nk_filter_ascii(const struct nk_text_edit*, nk_rune unicode);
+NK_API int nk_filter_float(const struct nk_text_edit*, nk_rune unicode);
+NK_API int nk_filter_decimal(const struct nk_text_edit*, nk_rune unicode);
+NK_API int nk_filter_hex(const struct nk_text_edit*, nk_rune unicode);
+NK_API int nk_filter_oct(const struct nk_text_edit*, nk_rune unicode);
+NK_API int nk_filter_binary(const struct nk_text_edit*, nk_rune unicode);
+
+/* text editor */
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void nk_textedit_init_default(struct nk_text_edit*);
+#endif
+NK_API void nk_textedit_init(struct nk_text_edit*, struct nk_allocator*, nk_size size);
+NK_API void nk_textedit_init_fixed(struct nk_text_edit*, void *memory, nk_size size);
+NK_API void nk_textedit_free(struct nk_text_edit*);
+NK_API void nk_textedit_text(struct nk_text_edit*, const char*, int total_len);
+NK_API void nk_textedit_delete(struct nk_text_edit*, int where, int len);
+NK_API void nk_textedit_delete_selection(struct nk_text_edit*);
+NK_API void nk_textedit_select_all(struct nk_text_edit*);
+NK_API int nk_textedit_cut(struct nk_text_edit*);
+NK_API int nk_textedit_paste(struct nk_text_edit*, char const*, int len);
+NK_API void nk_textedit_undo(struct nk_text_edit*);
+NK_API void nk_textedit_redo(struct nk_text_edit*);
+
+/* ===============================================================
+ *
+ * DRAWING
+ *
+ * ===============================================================*/
+/* This library was designed to be render backend agnostic so it does
+ not draw anything to screen. Instead all drawn shapes, widgets
+ are made of, are buffered into memory and make up a command queue.
+ Each frame therefore fills the command buffer with draw commands
+ that then need to be executed by the user and his own render backend.
+ After that the command buffer needs to be cleared and a new frame can be
+ started. It is probably important to note that the command buffer is the main
+ drawing API and the optional vertex buffer API only takes this format and
+ converts it into a hardware accessible format.
+
+ To use the command queue to draw your own widgets you can access the
+ command buffer of each window by calling `nk_window_get_canvas` after
+ previously having called `nk_begin`:
+
+ void draw_red_rectangle_widget(struct nk_context *ctx)
+ {
+ struct nk_command_buffer *canvas;
+ struct nk_input *input = &ctx->input;
+ canvas = nk_window_get_canvas(ctx);
+
+ struct nk_rect space;
+ enum nk_widget_layout_states state;
+ state = nk_widget(&space, ctx);
+ if (!state) return;
+
+ if (state != NK_WIDGET_ROM)
+ update_your_widget_by_user_input(...);
+ nk_fill_rect(canvas, space, 0, nk_rgb(255,0,0));
+ }
+
+ if (nk_begin(...)) {
+ nk_layout_row_dynamic(ctx, 25, 1);
+ draw_red_rectangle_widget(ctx);
+ }
+ nk_end(..)
+
+ Important to know if you want to create your own widgets is the `nk_widget`
+ call. It allocates space on the panel reserved for this widget to be used,
+ but also returns the state of the widget space. If your widget is not seen and does
+ not have to be updated it is '0' and you can just return. If it only has
+ to be drawn the state will be `NK_WIDGET_ROM` otherwise you can do both
+ update and draw your widget. The reason for separating is to only draw and
+ update what is actually necessary which is crucial for performance.
+*/
+enum nk_command_type {
+ NK_COMMAND_NOP,
+ NK_COMMAND_SCISSOR,
+ NK_COMMAND_LINE,
+ NK_COMMAND_CURVE,
+ NK_COMMAND_RECT,
+ NK_COMMAND_RECT_FILLED,
+ NK_COMMAND_RECT_MULTI_COLOR,
+ NK_COMMAND_CIRCLE,
+ NK_COMMAND_CIRCLE_FILLED,
+ NK_COMMAND_ARC,
+ NK_COMMAND_ARC_FILLED,
+ NK_COMMAND_TRIANGLE,
+ NK_COMMAND_TRIANGLE_FILLED,
+ NK_COMMAND_POLYGON,
+ NK_COMMAND_POLYGON_FILLED,
+ NK_COMMAND_POLYLINE,
+ NK_COMMAND_TEXT,
+ NK_COMMAND_IMAGE,
+ NK_COMMAND_CUSTOM
+};
+
+/* command base and header of every command inside the buffer */
+struct nk_command {
+ enum nk_command_type type;
+ nk_size next;
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ nk_handle userdata;
+#endif
+};
+
+struct nk_command_scissor {
+ struct nk_command header;
+ short x, y;
+ unsigned short w, h;
+};
+
+struct nk_command_line {
+ struct nk_command header;
+ unsigned short line_thickness;
+ struct nk_vec2i begin;
+ struct nk_vec2i end;
+ struct nk_color color;
+};
+
+struct nk_command_curve {
+ struct nk_command header;
+ unsigned short line_thickness;
+ struct nk_vec2i begin;
+ struct nk_vec2i end;
+ struct nk_vec2i ctrl[2];
+ struct nk_color color;
+};
+
+struct nk_command_rect {
+ struct nk_command header;
+ unsigned short rounding;
+ unsigned short line_thickness;
+ short x, y;
+ unsigned short w, h;
+ struct nk_color color;
+};
+
+struct nk_command_rect_filled {
+ struct nk_command header;
+ unsigned short rounding;
+ short x, y;
+ unsigned short w, h;
+ struct nk_color color;
+};
+
+struct nk_command_rect_multi_color {
+ struct nk_command header;
+ short x, y;
+ unsigned short w, h;
+ struct nk_color left;
+ struct nk_color top;
+ struct nk_color bottom;
+ struct nk_color right;
+};
+
+struct nk_command_triangle {
+ struct nk_command header;
+ unsigned short line_thickness;
+ struct nk_vec2i a;
+ struct nk_vec2i b;
+ struct nk_vec2i c;
+ struct nk_color color;
+};
+
+struct nk_command_triangle_filled {
+ struct nk_command header;
+ struct nk_vec2i a;
+ struct nk_vec2i b;
+ struct nk_vec2i c;
+ struct nk_color color;
+};
+
+struct nk_command_circle {
+ struct nk_command header;
+ short x, y;
+ unsigned short line_thickness;
+ unsigned short w, h;
+ struct nk_color color;
+};
+
+struct nk_command_circle_filled {
+ struct nk_command header;
+ short x, y;
+ unsigned short w, h;
+ struct nk_color color;
+};
+
+struct nk_command_arc {
+ struct nk_command header;
+ short cx, cy;
+ unsigned short r;
+ unsigned short line_thickness;
+ float a[2];
+ struct nk_color color;
+};
+
+struct nk_command_arc_filled {
+ struct nk_command header;
+ short cx, cy;
+ unsigned short r;
+ float a[2];
+ struct nk_color color;
+};
+
+struct nk_command_polygon {
+ struct nk_command header;
+ struct nk_color color;
+ unsigned short line_thickness;
+ unsigned short point_count;
+ struct nk_vec2i points[1];
+};
+
+struct nk_command_polygon_filled {
+ struct nk_command header;
+ struct nk_color color;
+ unsigned short point_count;
+ struct nk_vec2i points[1];
+};
+
+struct nk_command_polyline {
+ struct nk_command header;
+ struct nk_color color;
+ unsigned short line_thickness;
+ unsigned short point_count;
+ struct nk_vec2i points[1];
+};
+
+struct nk_command_image {
+ struct nk_command header;
+ short x, y;
+ unsigned short w, h;
+ struct nk_image img;
+ struct nk_color col;
+};
+
+typedef void (*nk_command_custom_callback)(void *canvas, short x,short y,
+ unsigned short w, unsigned short h, nk_handle callback_data);
+struct nk_command_custom {
+ struct nk_command header;
+ short x, y;
+ unsigned short w, h;
+ nk_handle callback_data;
+ nk_command_custom_callback callback;
+};
+
+struct nk_command_text {
+ struct nk_command header;
+ const struct nk_user_font *font;
+ struct nk_color background;
+ struct nk_color foreground;
+ short x, y;
+ unsigned short w, h;
+ float height;
+ int length;
+ char string[1];
+};
+
+enum nk_command_clipping {
+ NK_CLIPPING_OFF = nk_false,
+ NK_CLIPPING_ON = nk_true
+};
+
+struct nk_command_buffer {
+ struct nk_buffer *base;
+ struct nk_rect clip;
+ int use_clipping;
+ nk_handle userdata;
+ nk_size begin, end, last;
+};
+
+/* shape outlines */
+NK_API void nk_stroke_line(struct nk_command_buffer *b, float x0, float y0, float x1, float y1, float line_thickness, struct nk_color);
+NK_API void nk_stroke_curve(struct nk_command_buffer*, float, float, float, float, float, float, float, float, float line_thickness, struct nk_color);
+NK_API void nk_stroke_rect(struct nk_command_buffer*, struct nk_rect, float rounding, float line_thickness, struct nk_color);
+NK_API void nk_stroke_circle(struct nk_command_buffer*, struct nk_rect, float line_thickness, struct nk_color);
+NK_API void nk_stroke_arc(struct nk_command_buffer*, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, struct nk_color);
+NK_API void nk_stroke_triangle(struct nk_command_buffer*, float, float, float, float, float, float, float line_thichness, struct nk_color);
+NK_API void nk_stroke_polyline(struct nk_command_buffer*, float *points, int point_count, float line_thickness, struct nk_color col);
+NK_API void nk_stroke_polygon(struct nk_command_buffer*, float*, int point_count, float line_thickness, struct nk_color);
+
+/* filled shades */
+NK_API void nk_fill_rect(struct nk_command_buffer*, struct nk_rect, float rounding, struct nk_color);
+NK_API void nk_fill_rect_multi_color(struct nk_command_buffer*, struct nk_rect, struct nk_color left, struct nk_color top, struct nk_color right, struct nk_color bottom);
+NK_API void nk_fill_circle(struct nk_command_buffer*, struct nk_rect, struct nk_color);
+NK_API void nk_fill_arc(struct nk_command_buffer*, float cx, float cy, float radius, float a_min, float a_max, struct nk_color);
+NK_API void nk_fill_triangle(struct nk_command_buffer*, float x0, float y0, float x1, float y1, float x2, float y2, struct nk_color);
+NK_API void nk_fill_polygon(struct nk_command_buffer*, float*, int point_count, struct nk_color);
+
+/* misc */
+NK_API void nk_draw_image(struct nk_command_buffer*, struct nk_rect, const struct nk_image*, struct nk_color);
+NK_API void nk_draw_text(struct nk_command_buffer*, struct nk_rect, const char *text, int len, const struct nk_user_font*, struct nk_color, struct nk_color);
+NK_API void nk_push_scissor(struct nk_command_buffer*, struct nk_rect);
+NK_API void nk_push_custom(struct nk_command_buffer*, struct nk_rect, nk_command_custom_callback, nk_handle usr);
+
+/* ===============================================================
+ *
+ * INPUT
+ *
+ * ===============================================================*/
+struct nk_mouse_button {
+ int down;
+ unsigned int clicked;
+ struct nk_vec2 clicked_pos;
+};
+struct nk_mouse {
+ struct nk_mouse_button buttons[NK_BUTTON_MAX];
+ struct nk_vec2 pos;
+ struct nk_vec2 prev;
+ struct nk_vec2 delta;
+ struct nk_vec2 scroll_delta;
+ unsigned char grab;
+ unsigned char grabbed;
+ unsigned char ungrab;
+};
+
+struct nk_key {
+ int down;
+ unsigned int clicked;
+};
+struct nk_keyboard {
+ struct nk_key keys[NK_KEY_MAX];
+ char text[NK_INPUT_MAX];
+ int text_len;
+};
+
+struct nk_input {
+ struct nk_keyboard keyboard;
+ struct nk_mouse mouse;
+};
+
+NK_API int nk_input_has_mouse_click(const struct nk_input*, enum nk_buttons);
+NK_API int nk_input_has_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);
+NK_API int nk_input_has_mouse_click_down_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect, int down);
+NK_API int nk_input_is_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);
+NK_API int nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id, struct nk_rect b, int down);
+NK_API int nk_input_any_mouse_click_in_rect(const struct nk_input*, struct nk_rect);
+NK_API int nk_input_is_mouse_prev_hovering_rect(const struct nk_input*, struct nk_rect);
+NK_API int nk_input_is_mouse_hovering_rect(const struct nk_input*, struct nk_rect);
+NK_API int nk_input_mouse_clicked(const struct nk_input*, enum nk_buttons, struct nk_rect);
+NK_API int nk_input_is_mouse_down(const struct nk_input*, enum nk_buttons);
+NK_API int nk_input_is_mouse_pressed(const struct nk_input*, enum nk_buttons);
+NK_API int nk_input_is_mouse_released(const struct nk_input*, enum nk_buttons);
+NK_API int nk_input_is_key_pressed(const struct nk_input*, enum nk_keys);
+NK_API int nk_input_is_key_released(const struct nk_input*, enum nk_keys);
+NK_API int nk_input_is_key_down(const struct nk_input*, enum nk_keys);
+
+/* ===============================================================
+ *
+ * DRAW LIST
+ *
+ * ===============================================================*/
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+/* The optional vertex buffer draw list provides a 2D drawing context
+ with antialiasing functionality which takes basic filled or outlined shapes
+ or a path and outputs vertexes, elements and draw commands.
+ The actual draw list API is not required to be used directly while using this
+ library since converting the default library draw command output is done by
+ just calling `nk_convert` but I decided to still make this library accessible
+ since it can be useful.
+
+ The draw list is based on a path buffering and polygon and polyline
+ rendering API which allows a lot of ways to draw 2D content to screen.
+ In fact it is probably more powerful than needed but allows even more crazy
+ things than this library provides by default.
+*/
+typedef nk_ushort nk_draw_index;
+enum nk_draw_list_stroke {
+ NK_STROKE_OPEN = nk_false,
+ /* build up path has no connection back to the beginning */
+ NK_STROKE_CLOSED = nk_true
+ /* build up path has a connection back to the beginning */
+};
+
+enum nk_draw_vertex_layout_attribute {
+ NK_VERTEX_POSITION,
+ NK_VERTEX_COLOR,
+ NK_VERTEX_TEXCOORD,
+ NK_VERTEX_ATTRIBUTE_COUNT
+};
+
+enum nk_draw_vertex_layout_format {
+ NK_FORMAT_SCHAR,
+ NK_FORMAT_SSHORT,
+ NK_FORMAT_SINT,
+ NK_FORMAT_UCHAR,
+ NK_FORMAT_USHORT,
+ NK_FORMAT_UINT,
+ NK_FORMAT_FLOAT,
+ NK_FORMAT_DOUBLE,
+
+NK_FORMAT_COLOR_BEGIN,
+ NK_FORMAT_R8G8B8 = NK_FORMAT_COLOR_BEGIN,
+ NK_FORMAT_R16G15B16,
+ NK_FORMAT_R32G32B32,
+
+ NK_FORMAT_R8G8B8A8,
+ NK_FORMAT_B8G8R8A8,
+ NK_FORMAT_R16G15B16A16,
+ NK_FORMAT_R32G32B32A32,
+ NK_FORMAT_R32G32B32A32_FLOAT,
+ NK_FORMAT_R32G32B32A32_DOUBLE,
+
+ NK_FORMAT_RGB32,
+ NK_FORMAT_RGBA32,
+NK_FORMAT_COLOR_END = NK_FORMAT_RGBA32,
+ NK_FORMAT_COUNT
+};
+
+#define NK_VERTEX_LAYOUT_END NK_VERTEX_ATTRIBUTE_COUNT,NK_FORMAT_COUNT,0
+struct nk_draw_vertex_layout_element {
+ enum nk_draw_vertex_layout_attribute attribute;
+ enum nk_draw_vertex_layout_format format;
+ nk_size offset;
+};
+
+struct nk_draw_command {
+ unsigned int elem_count;
+ /* number of elements in the current draw batch */
+ struct nk_rect clip_rect;
+ /* current screen clipping rectangle */
+ nk_handle texture;
+ /* current texture to set */
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ nk_handle userdata;
+#endif
+};
+
+struct nk_draw_list {
+ struct nk_rect clip_rect;
+ struct nk_vec2 circle_vtx[12];
+ struct nk_convert_config config;
+
+ struct nk_buffer *buffer;
+ struct nk_buffer *vertices;
+ struct nk_buffer *elements;
+
+ unsigned int element_count;
+ unsigned int vertex_count;
+ unsigned int cmd_count;
+ nk_size cmd_offset;
+
+ unsigned int path_count;
+ unsigned int path_offset;
+
+ enum nk_anti_aliasing line_AA;
+ enum nk_anti_aliasing shape_AA;
+
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ nk_handle userdata;
+#endif
+};
+
+/* draw list */
+NK_API void nk_draw_list_init(struct nk_draw_list*);
+NK_API void nk_draw_list_setup(struct nk_draw_list*, const struct nk_convert_config*, struct nk_buffer *cmds, struct nk_buffer *vertices, struct nk_buffer *elements, enum nk_anti_aliasing line_aa,enum nk_anti_aliasing shape_aa);
+
+/* drawing */
+#define nk_draw_list_foreach(cmd, can, b) for((cmd)=nk__draw_list_begin(can, b); (cmd)!=0; (cmd)=nk__draw_list_next(cmd, b, can))
+NK_API const struct nk_draw_command* nk__draw_list_begin(const struct nk_draw_list*, const struct nk_buffer*);
+NK_API const struct nk_draw_command* nk__draw_list_next(const struct nk_draw_command*, const struct nk_buffer*, const struct nk_draw_list*);
+NK_API const struct nk_draw_command* nk__draw_list_end(const struct nk_draw_list*, const struct nk_buffer*);
+
+/* path */
+NK_API void nk_draw_list_path_clear(struct nk_draw_list*);
+NK_API void nk_draw_list_path_line_to(struct nk_draw_list*, struct nk_vec2 pos);
+NK_API void nk_draw_list_path_arc_to_fast(struct nk_draw_list*, struct nk_vec2 center, float radius, int a_min, int a_max);
+NK_API void nk_draw_list_path_arc_to(struct nk_draw_list*, struct nk_vec2 center, float radius, float a_min, float a_max, unsigned int segments);
+NK_API void nk_draw_list_path_rect_to(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, float rounding);
+NK_API void nk_draw_list_path_curve_to(struct nk_draw_list*, struct nk_vec2 p2, struct nk_vec2 p3, struct nk_vec2 p4, unsigned int num_segments);
+NK_API void nk_draw_list_path_fill(struct nk_draw_list*, struct nk_color);
+NK_API void nk_draw_list_path_stroke(struct nk_draw_list*, struct nk_color, enum nk_draw_list_stroke closed, float thickness);
+
+/* stroke */
+NK_API void nk_draw_list_stroke_line(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, struct nk_color, float thickness);
+NK_API void nk_draw_list_stroke_rect(struct nk_draw_list*, struct nk_rect rect, struct nk_color, float rounding, float thickness);
+NK_API void nk_draw_list_stroke_triangle(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, struct nk_vec2 c, struct nk_color, float thickness);
+NK_API void nk_draw_list_stroke_circle(struct nk_draw_list*, struct nk_vec2 center, float radius, struct nk_color, unsigned int segs, float thickness);
+NK_API void nk_draw_list_stroke_curve(struct nk_draw_list*, struct nk_vec2 p0, struct nk_vec2 cp0, struct nk_vec2 cp1, struct nk_vec2 p1, struct nk_color, unsigned int segments, float thickness);
+NK_API void nk_draw_list_stroke_poly_line(struct nk_draw_list*, const struct nk_vec2 *pnts, const unsigned int cnt, struct nk_color, enum nk_draw_list_stroke, float thickness, enum nk_anti_aliasing);
+
+/* fill */
+NK_API void nk_draw_list_fill_rect(struct nk_draw_list*, struct nk_rect rect, struct nk_color, float rounding);
+NK_API void nk_draw_list_fill_rect_multi_color(struct nk_draw_list*, struct nk_rect rect, struct nk_color left, struct nk_color top, struct nk_color right, struct nk_color bottom);
+NK_API void nk_draw_list_fill_triangle(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, struct nk_vec2 c, struct nk_color);
+NK_API void nk_draw_list_fill_circle(struct nk_draw_list*, struct nk_vec2 center, float radius, struct nk_color col, unsigned int segs);
+NK_API void nk_draw_list_fill_poly_convex(struct nk_draw_list*, const struct nk_vec2 *points, const unsigned int count, struct nk_color, enum nk_anti_aliasing);
+
+/* misc */
+NK_API void nk_draw_list_add_image(struct nk_draw_list*, struct nk_image texture, struct nk_rect rect, struct nk_color);
+NK_API void nk_draw_list_add_text(struct nk_draw_list*, const struct nk_user_font*, struct nk_rect, const char *text, int len, float font_height, struct nk_color);
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+NK_API void nk_draw_list_push_userdata(struct nk_draw_list*, nk_handle userdata);
+#endif
+
+#endif
+
+/* ===============================================================
+ *
+ * GUI
+ *
+ * ===============================================================*/
+enum nk_style_item_type {
+ NK_STYLE_ITEM_COLOR,
+ NK_STYLE_ITEM_IMAGE
+};
+
+union nk_style_item_data {
+ struct nk_image image;
+ struct nk_color color;
+};
+
+struct nk_style_item {
+ enum nk_style_item_type type;
+ union nk_style_item_data data;
+};
+
+struct nk_style_text {
+ struct nk_color color;
+ struct nk_vec2 padding;
+};
+
+struct nk_style_button {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* text */
+ struct nk_color text_background;
+ struct nk_color text_normal;
+ struct nk_color text_hover;
+ struct nk_color text_active;
+ nk_flags text_alignment;
+
+ /* properties */
+ float border;
+ float rounding;
+ struct nk_vec2 padding;
+ struct nk_vec2 image_padding;
+ struct nk_vec2 touch_padding;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle userdata);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle userdata);
+};
+
+struct nk_style_toggle {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* cursor */
+ struct nk_style_item cursor_normal;
+ struct nk_style_item cursor_hover;
+
+ /* text */
+ struct nk_color text_normal;
+ struct nk_color text_hover;
+ struct nk_color text_active;
+ struct nk_color text_background;
+ nk_flags text_alignment;
+
+ /* properties */
+ struct nk_vec2 padding;
+ struct nk_vec2 touch_padding;
+ float spacing;
+ float border;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle);
+};
+
+struct nk_style_selectable {
+ /* background (inactive) */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item pressed;
+
+ /* background (active) */
+ struct nk_style_item normal_active;
+ struct nk_style_item hover_active;
+ struct nk_style_item pressed_active;
+
+ /* text color (inactive) */
+ struct nk_color text_normal;
+ struct nk_color text_hover;
+ struct nk_color text_pressed;
+
+ /* text color (active) */
+ struct nk_color text_normal_active;
+ struct nk_color text_hover_active;
+ struct nk_color text_pressed_active;
+ struct nk_color text_background;
+ nk_flags text_alignment;
+
+ /* properties */
+ float rounding;
+ struct nk_vec2 padding;
+ struct nk_vec2 touch_padding;
+ struct nk_vec2 image_padding;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle);
+};
+
+struct nk_style_slider {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* background bar */
+ struct nk_color bar_normal;
+ struct nk_color bar_hover;
+ struct nk_color bar_active;
+ struct nk_color bar_filled;
+
+ /* cursor */
+ struct nk_style_item cursor_normal;
+ struct nk_style_item cursor_hover;
+ struct nk_style_item cursor_active;
+
+ /* properties */
+ float border;
+ float rounding;
+ float bar_height;
+ struct nk_vec2 padding;
+ struct nk_vec2 spacing;
+ struct nk_vec2 cursor_size;
+
+ /* optional buttons */
+ int show_buttons;
+ struct nk_style_button inc_button;
+ struct nk_style_button dec_button;
+ enum nk_symbol_type inc_symbol;
+ enum nk_symbol_type dec_symbol;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle);
+};
+
+struct nk_style_progress {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* cursor */
+ struct nk_style_item cursor_normal;
+ struct nk_style_item cursor_hover;
+ struct nk_style_item cursor_active;
+ struct nk_color cursor_border_color;
+
+ /* properties */
+ float rounding;
+ float border;
+ float cursor_border;
+ float cursor_rounding;
+ struct nk_vec2 padding;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle);
+};
+
+struct nk_style_scrollbar {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* cursor */
+ struct nk_style_item cursor_normal;
+ struct nk_style_item cursor_hover;
+ struct nk_style_item cursor_active;
+ struct nk_color cursor_border_color;
+
+ /* properties */
+ float border;
+ float rounding;
+ float border_cursor;
+ float rounding_cursor;
+ struct nk_vec2 padding;
+
+ /* optional buttons */
+ int show_buttons;
+ struct nk_style_button inc_button;
+ struct nk_style_button dec_button;
+ enum nk_symbol_type inc_symbol;
+ enum nk_symbol_type dec_symbol;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle);
+};
+
+struct nk_style_edit {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+ struct nk_style_scrollbar scrollbar;
+
+ /* cursor */
+ struct nk_color cursor_normal;
+ struct nk_color cursor_hover;
+ struct nk_color cursor_text_normal;
+ struct nk_color cursor_text_hover;
+
+ /* text (unselected) */
+ struct nk_color text_normal;
+ struct nk_color text_hover;
+ struct nk_color text_active;
+
+ /* text (selected) */
+ struct nk_color selected_normal;
+ struct nk_color selected_hover;
+ struct nk_color selected_text_normal;
+ struct nk_color selected_text_hover;
+
+ /* properties */
+ float border;
+ float rounding;
+ float cursor_size;
+ struct nk_vec2 scrollbar_size;
+ struct nk_vec2 padding;
+ float row_padding;
+};
+
+struct nk_style_property {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* text */
+ struct nk_color label_normal;
+ struct nk_color label_hover;
+ struct nk_color label_active;
+
+ /* symbols */
+ enum nk_symbol_type sym_left;
+ enum nk_symbol_type sym_right;
+
+ /* properties */
+ float border;
+ float rounding;
+ struct nk_vec2 padding;
+
+ struct nk_style_edit edit;
+ struct nk_style_button inc_button;
+ struct nk_style_button dec_button;
+
+ /* optional user callbacks */
+ nk_handle userdata;
+ void(*draw_begin)(struct nk_command_buffer*, nk_handle);
+ void(*draw_end)(struct nk_command_buffer*, nk_handle);
+};
+
+struct nk_style_chart {
+ /* colors */
+ struct nk_style_item background;
+ struct nk_color border_color;
+ struct nk_color selected_color;
+ struct nk_color color;
+
+ /* properties */
+ float border;
+ float rounding;
+ struct nk_vec2 padding;
+};
+
+struct nk_style_combo {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+ struct nk_color border_color;
+
+ /* label */
+ struct nk_color label_normal;
+ struct nk_color label_hover;
+ struct nk_color label_active;
+
+ /* symbol */
+ struct nk_color symbol_normal;
+ struct nk_color symbol_hover;
+ struct nk_color symbol_active;
+
+ /* button */
+ struct nk_style_button button;
+ enum nk_symbol_type sym_normal;
+ enum nk_symbol_type sym_hover;
+ enum nk_symbol_type sym_active;
+
+ /* properties */
+ float border;
+ float rounding;
+ struct nk_vec2 content_padding;
+ struct nk_vec2 button_padding;
+ struct nk_vec2 spacing;
+};
+
+struct nk_style_tab {
+ /* background */
+ struct nk_style_item background;
+ struct nk_color border_color;
+ struct nk_color text;
+
+ /* button */
+ struct nk_style_button tab_maximize_button;
+ struct nk_style_button tab_minimize_button;
+ struct nk_style_button node_maximize_button;
+ struct nk_style_button node_minimize_button;
+ enum nk_symbol_type sym_minimize;
+ enum nk_symbol_type sym_maximize;
+
+ /* properties */
+ float border;
+ float rounding;
+ float indent;
+ struct nk_vec2 padding;
+ struct nk_vec2 spacing;
+};
+
+enum nk_style_header_align {
+ NK_HEADER_LEFT,
+ NK_HEADER_RIGHT
+};
+struct nk_style_window_header {
+ /* background */
+ struct nk_style_item normal;
+ struct nk_style_item hover;
+ struct nk_style_item active;
+
+ /* button */
+ struct nk_style_button close_button;
+ struct nk_style_button minimize_button;
+ enum nk_symbol_type close_symbol;
+ enum nk_symbol_type minimize_symbol;
+ enum nk_symbol_type maximize_symbol;
+
+ /* title */
+ struct nk_color label_normal;
+ struct nk_color label_hover;
+ struct nk_color label_active;
+
+ /* properties */
+ enum nk_style_header_align align;
+ struct nk_vec2 padding;
+ struct nk_vec2 label_padding;
+ struct nk_vec2 spacing;
+};
+
+struct nk_style_window {
+ struct nk_style_window_header header;
+ struct nk_style_item fixed_background;
+ struct nk_color background;
+
+ struct nk_color border_color;
+ struct nk_color popup_border_color;
+ struct nk_color combo_border_color;
+ struct nk_color contextual_border_color;
+ struct nk_color menu_border_color;
+ struct nk_color group_border_color;
+ struct nk_color tooltip_border_color;
+ struct nk_style_item scaler;
+
+ float border;
+ float combo_border;
+ float contextual_border;
+ float menu_border;
+ float group_border;
+ float tooltip_border;
+ float popup_border;
+ float min_row_height_padding;
+
+ float rounding;
+ struct nk_vec2 spacing;
+ struct nk_vec2 scrollbar_size;
+ struct nk_vec2 min_size;
+
+ struct nk_vec2 padding;
+ struct nk_vec2 group_padding;
+ struct nk_vec2 popup_padding;
+ struct nk_vec2 combo_padding;
+ struct nk_vec2 contextual_padding;
+ struct nk_vec2 menu_padding;
+ struct nk_vec2 tooltip_padding;
+};
+
+struct nk_style {
+ const struct nk_user_font *font;
+ const struct nk_cursor *cursors[NK_CURSOR_COUNT];
+ const struct nk_cursor *cursor_active;
+ struct nk_cursor *cursor_last;
+ int cursor_visible;
+
+ struct nk_style_text text;
+ struct nk_style_button button;
+ struct nk_style_button contextual_button;
+ struct nk_style_button menu_button;
+ struct nk_style_toggle option;
+ struct nk_style_toggle checkbox;
+ struct nk_style_selectable selectable;
+ struct nk_style_slider slider;
+ struct nk_style_progress progress;
+ struct nk_style_property property;
+ struct nk_style_edit edit;
+ struct nk_style_chart chart;
+ struct nk_style_scrollbar scrollh;
+ struct nk_style_scrollbar scrollv;
+ struct nk_style_tab tab;
+ struct nk_style_combo combo;
+ struct nk_style_window window;
+};
+
+NK_API struct nk_style_item nk_style_item_image(struct nk_image img);
+NK_API struct nk_style_item nk_style_item_color(struct nk_color);
+NK_API struct nk_style_item nk_style_item_hide(void);
+
+/*==============================================================
+ * PANEL
+ * =============================================================*/
+#ifndef NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS
+#define NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS 16
+#endif
+#ifndef NK_CHART_MAX_SLOT
+#define NK_CHART_MAX_SLOT 4
+#endif
+
+enum nk_panel_type {
+ NK_PANEL_NONE = 0,
+ NK_PANEL_WINDOW = NK_FLAG(0),
+ NK_PANEL_GROUP = NK_FLAG(1),
+ NK_PANEL_POPUP = NK_FLAG(2),
+ NK_PANEL_CONTEXTUAL = NK_FLAG(4),
+ NK_PANEL_COMBO = NK_FLAG(5),
+ NK_PANEL_MENU = NK_FLAG(6),
+ NK_PANEL_TOOLTIP = NK_FLAG(7)
+};
+enum nk_panel_set {
+ NK_PANEL_SET_NONBLOCK = NK_PANEL_CONTEXTUAL|NK_PANEL_COMBO|NK_PANEL_MENU|NK_PANEL_TOOLTIP,
+ NK_PANEL_SET_POPUP = NK_PANEL_SET_NONBLOCK|NK_PANEL_POPUP,
+ NK_PANEL_SET_SUB = NK_PANEL_SET_POPUP|NK_PANEL_GROUP
+};
+
+struct nk_chart_slot {
+ enum nk_chart_type type;
+ struct nk_color color;
+ struct nk_color highlight;
+ float min, max, range;
+ int count;
+ struct nk_vec2 last;
+ int index;
+};
+
+struct nk_chart {
+ int slot;
+ float x, y, w, h;
+ struct nk_chart_slot slots[NK_CHART_MAX_SLOT];
+};
+
+enum nk_panel_row_layout_type {
+ NK_LAYOUT_DYNAMIC_FIXED = 0,
+ NK_LAYOUT_DYNAMIC_ROW,
+ NK_LAYOUT_DYNAMIC_FREE,
+ NK_LAYOUT_DYNAMIC,
+ NK_LAYOUT_STATIC_FIXED,
+ NK_LAYOUT_STATIC_ROW,
+ NK_LAYOUT_STATIC_FREE,
+ NK_LAYOUT_STATIC,
+ NK_LAYOUT_TEMPLATE,
+ NK_LAYOUT_COUNT
+};
+struct nk_row_layout {
+ enum nk_panel_row_layout_type type;
+ int index;
+ float height;
+ float min_height;
+ int columns;
+ const float *ratio;
+ float item_width;
+ float item_height;
+ float item_offset;
+ float filled;
+ struct nk_rect item;
+ int tree_depth;
+ float templates[NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS];
+};
+
+struct nk_popup_buffer {
+ nk_size begin;
+ nk_size parent;
+ nk_size last;
+ nk_size end;
+ int active;
+};
+
+struct nk_menu_state {
+ float x, y, w, h;
+ struct nk_scroll offset;
+};
+
+struct nk_panel {
+ enum nk_panel_type type;
+ nk_flags flags;
+ struct nk_rect bounds;
+ nk_uint *offset_x;
+ nk_uint *offset_y;
+ float at_x, at_y, max_x;
+ float footer_height;
+ float header_height;
+ float border;
+ unsigned int has_scrolling;
+ struct nk_rect clip;
+ struct nk_menu_state menu;
+ struct nk_row_layout row;
+ struct nk_chart chart;
+ struct nk_command_buffer *buffer;
+ struct nk_panel *parent;
+};
+
+/*==============================================================
+ * WINDOW
+ * =============================================================*/
+#ifndef NK_WINDOW_MAX_NAME
+#define NK_WINDOW_MAX_NAME 64
+#endif
+
+struct nk_table;
+enum nk_window_flags {
+ NK_WINDOW_PRIVATE = NK_FLAG(11),
+ NK_WINDOW_DYNAMIC = NK_WINDOW_PRIVATE,
+ /* special window type growing up in height while being filled to a certain maximum height */
+ NK_WINDOW_ROM = NK_FLAG(12),
+ /* sets window widgets into a read only mode and does not allow input changes */
+ NK_WINDOW_NOT_INTERACTIVE = NK_WINDOW_ROM|NK_WINDOW_NO_INPUT,
+ /* prevents all interaction caused by input to either window or widgets inside */
+ NK_WINDOW_HIDDEN = NK_FLAG(13),
+ /* Hides window and stops any window interaction and drawing */
+ NK_WINDOW_CLOSED = NK_FLAG(14),
+ /* Directly closes and frees the window at the end of the frame */
+ NK_WINDOW_MINIMIZED = NK_FLAG(15),
+ /* marks the window as minimized */
+ NK_WINDOW_REMOVE_ROM = NK_FLAG(16)
+ /* Removes read only mode at the end of the window */
+};
+
+struct nk_popup_state {
+ struct nk_window *win;
+ enum nk_panel_type type;
+ struct nk_popup_buffer buf;
+ nk_hash name;
+ int active;
+ unsigned combo_count;
+ unsigned con_count, con_old;
+ unsigned active_con;
+ struct nk_rect header;
+};
+
+struct nk_edit_state {
+ nk_hash name;
+ unsigned int seq;
+ unsigned int old;
+ int active, prev;
+ int cursor;
+ int sel_start;
+ int sel_end;
+ struct nk_scroll scrollbar;
+ unsigned char mode;
+ unsigned char single_line;
+};
+
+struct nk_property_state {
+ int active, prev;
+ char buffer[NK_MAX_NUMBER_BUFFER];
+ int length;
+ int cursor;
+ int select_start;
+ int select_end;
+ nk_hash name;
+ unsigned int seq;
+ unsigned int old;
+ int state;
+};
+
+struct nk_window {
+ unsigned int seq;
+ nk_hash name;
+ char name_string[NK_WINDOW_MAX_NAME];
+ nk_flags flags;
+
+ struct nk_rect bounds;
+ struct nk_scroll scrollbar;
+ struct nk_command_buffer buffer;
+ struct nk_panel *layout;
+ float scrollbar_hiding_timer;
+
+ /* persistent widget state */
+ struct nk_property_state property;
+ struct nk_popup_state popup;
+ struct nk_edit_state edit;
+ unsigned int scrolled;
+
+ struct nk_table *tables;
+ unsigned int table_count;
+
+ /* window list hooks */
+ struct nk_window *next;
+ struct nk_window *prev;
+ struct nk_window *parent;
+};
+
+/*==============================================================
+ * STACK
+ * =============================================================*/
+/* The style modifier stack can be used to temporarily change a
+ * property inside `nk_style`. For example if you want a special
+ * red button you can temporarily push the old button color onto a stack
+ * draw the button with a red color and then you just pop the old color
+ * back from the stack:
+ *
+ * nk_style_push_style_item(ctx, &ctx->style.button.normal, nk_style_item_color(nk_rgb(255,0,0)));
+ * nk_style_push_style_item(ctx, &ctx->style.button.hover, nk_style_item_color(nk_rgb(255,0,0)));
+ * nk_style_push_style_item(ctx, &ctx->style.button.active, nk_style_item_color(nk_rgb(255,0,0)));
+ * nk_style_push_vec2(ctx, &cx->style.button.padding, nk_vec2(2,2));
+ *
+ * nk_button(...);
+ *
+ * nk_style_pop_style_item(ctx);
+ * nk_style_pop_style_item(ctx);
+ * nk_style_pop_style_item(ctx);
+ * nk_style_pop_vec2(ctx);
+ *
+ * Nuklear has a stack for style_items, float properties, vector properties,
+ * flags, colors, fonts and for button_behavior. Each has it's own fixed size stack
+ * which can be changed at compile time.
+ */
+#ifndef NK_BUTTON_BEHAVIOR_STACK_SIZE
+#define NK_BUTTON_BEHAVIOR_STACK_SIZE 8
+#endif
+
+#ifndef NK_FONT_STACK_SIZE
+#define NK_FONT_STACK_SIZE 8
+#endif
+
+#ifndef NK_STYLE_ITEM_STACK_SIZE
+#define NK_STYLE_ITEM_STACK_SIZE 16
+#endif
+
+#ifndef NK_FLOAT_STACK_SIZE
+#define NK_FLOAT_STACK_SIZE 32
+#endif
+
+#ifndef NK_VECTOR_STACK_SIZE
+#define NK_VECTOR_STACK_SIZE 16
+#endif
+
+#ifndef NK_FLAGS_STACK_SIZE
+#define NK_FLAGS_STACK_SIZE 32
+#endif
+
+#ifndef NK_COLOR_STACK_SIZE
+#define NK_COLOR_STACK_SIZE 32
+#endif
+
+#define NK_CONFIGURATION_STACK_TYPE(prefix, name, type)\
+ struct nk_config_stack_##name##_element {\
+ prefix##_##type *address;\
+ prefix##_##type old_value;\
+ }
+#define NK_CONFIG_STACK(type,size)\
+ struct nk_config_stack_##type {\
+ int head;\
+ struct nk_config_stack_##type##_element elements[size];\
+ }
+
+#define nk_float float
+NK_CONFIGURATION_STACK_TYPE(struct nk, style_item, style_item);
+NK_CONFIGURATION_STACK_TYPE(nk ,float, float);
+NK_CONFIGURATION_STACK_TYPE(struct nk, vec2, vec2);
+NK_CONFIGURATION_STACK_TYPE(nk ,flags, flags);
+NK_CONFIGURATION_STACK_TYPE(struct nk, color, color);
+NK_CONFIGURATION_STACK_TYPE(const struct nk, user_font, user_font*);
+NK_CONFIGURATION_STACK_TYPE(enum nk, button_behavior, button_behavior);
+
+NK_CONFIG_STACK(style_item, NK_STYLE_ITEM_STACK_SIZE);
+NK_CONFIG_STACK(float, NK_FLOAT_STACK_SIZE);
+NK_CONFIG_STACK(vec2, NK_VECTOR_STACK_SIZE);
+NK_CONFIG_STACK(flags, NK_FLAGS_STACK_SIZE);
+NK_CONFIG_STACK(color, NK_COLOR_STACK_SIZE);
+NK_CONFIG_STACK(user_font, NK_FONT_STACK_SIZE);
+NK_CONFIG_STACK(button_behavior, NK_BUTTON_BEHAVIOR_STACK_SIZE);
+
+struct nk_configuration_stacks {
+ struct nk_config_stack_style_item style_items;
+ struct nk_config_stack_float floats;
+ struct nk_config_stack_vec2 vectors;
+ struct nk_config_stack_flags flags;
+ struct nk_config_stack_color colors;
+ struct nk_config_stack_user_font fonts;
+ struct nk_config_stack_button_behavior button_behaviors;
+};
+
+/*==============================================================
+ * CONTEXT
+ * =============================================================*/
+#define NK_VALUE_PAGE_CAPACITY \
+ (((NK_MAX(sizeof(struct nk_window),sizeof(struct nk_panel)) / sizeof(nk_uint))) / 2)
+
+struct nk_table {
+ unsigned int seq;
+ unsigned int size;
+ nk_hash keys[NK_VALUE_PAGE_CAPACITY];
+ nk_uint values[NK_VALUE_PAGE_CAPACITY];
+ struct nk_table *next, *prev;
+};
+
+union nk_page_data {
+ struct nk_table tbl;
+ struct nk_panel pan;
+ struct nk_window win;
+};
+
+struct nk_page_element {
+ union nk_page_data data;
+ struct nk_page_element *next;
+ struct nk_page_element *prev;
+};
+
+struct nk_page {
+ unsigned int size;
+ struct nk_page *next;
+ struct nk_page_element win[1];
+};
+
+struct nk_pool {
+ struct nk_allocator alloc;
+ enum nk_allocation_type type;
+ unsigned int page_count;
+ struct nk_page *pages;
+ struct nk_page_element *freelist;
+ unsigned capacity;
+ nk_size size;
+ nk_size cap;
+};
+
+struct nk_context {
+/* public: can be accessed freely */
+ struct nk_input input;
+ struct nk_style style;
+ struct nk_buffer memory;
+ struct nk_clipboard clip;
+ nk_flags last_widget_state;
+ enum nk_button_behavior button_behavior;
+ struct nk_configuration_stacks stacks;
+ float delta_time_seconds;
+
+/* private:
+ should only be accessed if you
+ know what you are doing */
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+ struct nk_draw_list draw_list;
+#endif
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ nk_handle userdata;
+#endif
+ /* text editor objects are quite big because of an internal
+ * undo/redo stack. Therefore it does not make sense to have one for
+ * each window for temporary use cases, so I only provide *one* instance
+ * for all windows. This works because the content is cleared anyway */
+ struct nk_text_edit text_edit;
+ /* draw buffer used for overlay drawing operation like cursor */
+ struct nk_command_buffer overlay;
+
+ /* windows */
+ int build;
+ int use_pool;
+ struct nk_pool pool;
+ struct nk_window *begin;
+ struct nk_window *end;
+ struct nk_window *active;
+ struct nk_window *current;
+ struct nk_page_element *freelist;
+ unsigned int count;
+ unsigned int seq;
+};
+
+/* ==============================================================
+ * MATH
+ * =============================================================== */
+#define NK_PI 3.141592654f
+#define NK_UTF_INVALID 0xFFFD
+#define NK_MAX_FLOAT_PRECISION 2
+
+#define NK_UNUSED(x) ((void)(x))
+#define NK_SATURATE(x) (NK_MAX(0, NK_MIN(1.0f, x)))
+#define NK_LEN(a) (sizeof(a)/sizeof(a)[0])
+#define NK_ABS(a) (((a) < 0) ? -(a) : (a))
+#define NK_BETWEEN(x, a, b) ((a) <= (x) && (x) < (b))
+#define NK_INBOX(px, py, x, y, w, h)\
+ (NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h))
+#define NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1) \
+ (!(((x1 > (x0 + w0)) || ((x1 + w1) < x0) || (y1 > (y0 + h0)) || (y1 + h1) < y0)))
+#define NK_CONTAINS(x, y, w, h, bx, by, bw, bh)\
+ (NK_INBOX(x,y, bx, by, bw, bh) && NK_INBOX(x+w,y+h, bx, by, bw, bh))
+
+#define nk_vec2_sub(a, b) nk_vec2((a).x - (b).x, (a).y - (b).y)
+#define nk_vec2_add(a, b) nk_vec2((a).x + (b).x, (a).y + (b).y)
+#define nk_vec2_len_sqr(a) ((a).x*(a).x+(a).y*(a).y)
+#define nk_vec2_muls(a, t) nk_vec2((a).x * (t), (a).y * (t))
+
+#define nk_ptr_add(t, p, i) ((t*)((void*)((nk_byte*)(p) + (i))))
+#define nk_ptr_add_const(t, p, i) ((const t*)((const void*)((const nk_byte*)(p) + (i))))
+#define nk_zero_struct(s) nk_zero(&s, sizeof(s))
+
+/* ==============================================================
+ * ALIGNMENT
+ * =============================================================== */
+/* Pointer to Integer type conversion for pointer alignment */
+#if defined(__PTRDIFF_TYPE__) /* This case should work for GCC*/
+# define NK_UINT_TO_PTR(x) ((void*)(__PTRDIFF_TYPE__)(x))
+# define NK_PTR_TO_UINT(x) ((nk_size)(__PTRDIFF_TYPE__)(x))
+#elif !defined(__GNUC__) /* works for compilers other than LLVM */
+# define NK_UINT_TO_PTR(x) ((void*)&((char*)0)[x])
+# define NK_PTR_TO_UINT(x) ((nk_size)(((char*)x)-(char*)0))
+#elif defined(NK_USE_FIXED_TYPES) /* used if we have <stdint.h> */
+# define NK_UINT_TO_PTR(x) ((void*)(uintptr_t)(x))
+# define NK_PTR_TO_UINT(x) ((uintptr_t)(x))
+#else /* generates warning but works */
+# define NK_UINT_TO_PTR(x) ((void*)(x))
+# define NK_PTR_TO_UINT(x) ((nk_size)(x))
+#endif
+
+#define NK_ALIGN_PTR(x, mask)\
+ (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x) + (mask-1)) & ~(mask-1))))
+#define NK_ALIGN_PTR_BACK(x, mask)\
+ (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x)) & ~(mask-1))))
+
+#define NK_OFFSETOF(st,m) ((nk_ptr)&(((st*)0)->m))
+#define NK_CONTAINER_OF(ptr,type,member)\
+ (type*)((void*)((char*)(1 ? (ptr): &((type*)0)->member) - NK_OFFSETOF(type, member)))
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
+template<typename T> struct nk_alignof;
+template<typename T, int size_diff> struct nk_helper{enum {value = size_diff};};
+template<typename T> struct nk_helper<T,0>{enum {value = nk_alignof<T>::value};};
+template<typename T> struct nk_alignof{struct Big {T x; char c;}; enum {
+ diff = sizeof(Big) - sizeof(T), value = nk_helper<Big, diff>::value};};
+#define NK_ALIGNOF(t) (nk_alignof<t>::value)
+#elif defined(_MSC_VER)
+#define NK_ALIGNOF(t) (__alignof(t))
+#else
+#define NK_ALIGNOF(t) ((char*)(&((struct {char c; t _h;}*)0)->_h) - (char*)0)
+#endif
+
+#endif /* NK_NUKLEAR_H_ */
+
+
+#ifdef NK_IMPLEMENTATION
+
+#ifndef NK_INTERNAL_H
+#define NK_INTERNAL_H
+
+#ifndef NK_POOL_DEFAULT_CAPACITY
+#define NK_POOL_DEFAULT_CAPACITY 16
+#endif
+
+#ifndef NK_DEFAULT_COMMAND_BUFFER_SIZE
+#define NK_DEFAULT_COMMAND_BUFFER_SIZE (4*1024)
+#endif
+
+#ifndef NK_BUFFER_DEFAULT_INITIAL_SIZE
+#define NK_BUFFER_DEFAULT_INITIAL_SIZE (4*1024)
+#endif
+
+/* standard library headers */
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+#include <stdlib.h> /* malloc, free */
+#endif
+#ifdef NK_INCLUDE_STANDARD_IO
+#include <stdio.h> /* fopen, fclose,... */
+#endif
+#ifndef NK_ASSERT
+#include <assert.h>
+#define NK_ASSERT(expr) assert(expr)
+#endif
+
+#ifndef NK_MEMSET
+#define NK_MEMSET nk_memset
+#endif
+#ifndef NK_MEMCPY
+#define NK_MEMCPY nk_memcopy
+#endif
+#ifndef NK_SQRT
+#define NK_SQRT nk_sqrt
+#endif
+#ifndef NK_SIN
+#define NK_SIN nk_sin
+#endif
+#ifndef NK_COS
+#define NK_COS nk_cos
+#endif
+#ifndef NK_STRTOD
+#define NK_STRTOD nk_strtod
+#endif
+#ifndef NK_DTOA
+#define NK_DTOA nk_dtoa
+#endif
+
+#define NK_DEFAULT (-1)
+
+#ifndef NK_VSNPRINTF
+/* If your compiler does support `vsnprintf` I would highly recommend
+ * defining this to vsnprintf instead since `vsprintf` is basically
+ * unbelievable unsafe and should *NEVER* be used. But I have to support
+ * it since C89 only provides this unsafe version. */
+ #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) ||\
+ (defined(__cplusplus) && (__cplusplus >= 201103L)) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) ||\
+ (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) ||\
+ defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE)
+ #define NK_VSNPRINTF(s,n,f,a) vsnprintf(s,n,f,a)
+ #else
+ #define NK_VSNPRINTF(s,n,f,a) vsprintf(s,f,a)
+ #endif
+#endif
+
+#define NK_SCHAR_MIN (-127)
+#define NK_SCHAR_MAX 127
+#define NK_UCHAR_MIN 0
+#define NK_UCHAR_MAX 256
+#define NK_SSHORT_MIN (-32767)
+#define NK_SSHORT_MAX 32767
+#define NK_USHORT_MIN 0
+#define NK_USHORT_MAX 65535
+#define NK_SINT_MIN (-2147483647)
+#define NK_SINT_MAX 2147483647
+#define NK_UINT_MIN 0
+#define NK_UINT_MAX 4294967295u
+
+/* Make sure correct type size:
+ * This will fire with a negative subscript error if the type sizes
+ * are set incorrectly by the compiler, and compile out if not */
+NK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));
+NK_STATIC_ASSERT(sizeof(nk_ptr) == sizeof(void*));
+NK_STATIC_ASSERT(sizeof(nk_flags) >= 4);
+NK_STATIC_ASSERT(sizeof(nk_rune) >= 4);
+NK_STATIC_ASSERT(sizeof(nk_ushort) == 2);
+NK_STATIC_ASSERT(sizeof(nk_short) == 2);
+NK_STATIC_ASSERT(sizeof(nk_uint) == 4);
+NK_STATIC_ASSERT(sizeof(nk_int) == 4);
+NK_STATIC_ASSERT(sizeof(nk_byte) == 1);
+
+NK_GLOBAL const struct nk_rect nk_null_rect = {-8192.0f, -8192.0f, 16384, 16384};
+#define NK_FLOAT_PRECISION 0.00000000000001
+
+NK_GLOBAL const struct nk_color nk_red = {255,0,0,255};
+NK_GLOBAL const struct nk_color nk_green = {0,255,0,255};
+NK_GLOBAL const struct nk_color nk_blue = {0,0,255,255};
+NK_GLOBAL const struct nk_color nk_white = {255,255,255,255};
+NK_GLOBAL const struct nk_color nk_black = {0,0,0,255};
+NK_GLOBAL const struct nk_color nk_yellow = {255,255,0,255};
+
+/* widget */
+#define nk_widget_state_reset(s)\
+ if ((*(s)) & NK_WIDGET_STATE_MODIFIED)\
+ (*(s)) = NK_WIDGET_STATE_INACTIVE|NK_WIDGET_STATE_MODIFIED;\
+ else (*(s)) = NK_WIDGET_STATE_INACTIVE;
+
+/* math */
+NK_LIB float nk_inv_sqrt(float n);
+NK_LIB float nk_sqrt(float x);
+NK_LIB float nk_sin(float x);
+NK_LIB float nk_cos(float x);
+NK_LIB nk_uint nk_round_up_pow2(nk_uint v);
+NK_LIB struct nk_rect nk_shrink_rect(struct nk_rect r, float amount);
+NK_LIB struct nk_rect nk_pad_rect(struct nk_rect r, struct nk_vec2 pad);
+NK_LIB void nk_unify(struct nk_rect *clip, const struct nk_rect *a, float x0, float y0, float x1, float y1);
+NK_LIB double nk_pow(double x, int n);
+NK_LIB int nk_ifloord(double x);
+NK_LIB int nk_ifloorf(float x);
+NK_LIB int nk_iceilf(float x);
+NK_LIB int nk_log10(double n);
+
+/* util */
+enum {NK_DO_NOT_STOP_ON_NEW_LINE, NK_STOP_ON_NEW_LINE};
+NK_LIB int nk_is_lower(int c);
+NK_LIB int nk_is_upper(int c);
+NK_LIB int nk_to_upper(int c);
+NK_LIB int nk_to_lower(int c);
+NK_LIB void* nk_memcopy(void *dst, const void *src, nk_size n);
+NK_LIB void nk_memset(void *ptr, int c0, nk_size size);
+NK_LIB void nk_zero(void *ptr, nk_size size);
+NK_LIB char *nk_itoa(char *s, long n);
+NK_LIB int nk_string_float_limit(char *string, int prec);
+NK_LIB char *nk_dtoa(char *s, double n);
+NK_LIB int nk_text_clamp(const struct nk_user_font *font, const char *text, int text_len, float space, int *glyphs, float *text_width, nk_rune *sep_list, int sep_count);
+NK_LIB struct nk_vec2 nk_text_calculate_text_bounds(const struct nk_user_font *font, const char *begin, int byte_len, float row_height, const char **remaining, struct nk_vec2 *out_offset, int *glyphs, int op);
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+NK_LIB int nk_strfmt(char *buf, int buf_size, const char *fmt, va_list args);
+#endif
+#ifdef NK_INCLUDE_STANDARD_IO
+NK_LIB char *nk_file_load(const char* path, nk_size* siz, struct nk_allocator *alloc);
+#endif
+
+/* buffer */
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_LIB void* nk_malloc(nk_handle unused, void *old,nk_size size);
+NK_LIB void nk_mfree(nk_handle unused, void *ptr);
+#endif
+NK_LIB void* nk_buffer_align(void *unaligned, nk_size align, nk_size *alignment, enum nk_buffer_allocation_type type);
+NK_LIB void* nk_buffer_alloc(struct nk_buffer *b, enum nk_buffer_allocation_type type, nk_size size, nk_size align);
+NK_LIB void* nk_buffer_realloc(struct nk_buffer *b, nk_size capacity, nk_size *size);
+
+/* draw */
+NK_LIB void nk_command_buffer_init(struct nk_command_buffer *cb, struct nk_buffer *b, enum nk_command_clipping clip);
+NK_LIB void nk_command_buffer_reset(struct nk_command_buffer *b);
+NK_LIB void* nk_command_buffer_push(struct nk_command_buffer* b, enum nk_command_type t, nk_size size);
+NK_LIB void nk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type, struct nk_rect content, struct nk_color background, struct nk_color foreground, float border_width, const struct nk_user_font *font);
+
+/* buffering */
+NK_LIB void nk_start_buffer(struct nk_context *ctx, struct nk_command_buffer *b);
+NK_LIB void nk_start(struct nk_context *ctx, struct nk_window *win);
+NK_LIB void nk_start_popup(struct nk_context *ctx, struct nk_window *win);
+NK_LIB void nk_finish_popup(struct nk_context *ctx, struct nk_window*);
+NK_LIB void nk_finish_buffer(struct nk_context *ctx, struct nk_command_buffer *b);
+NK_LIB void nk_finish(struct nk_context *ctx, struct nk_window *w);
+NK_LIB void nk_build(struct nk_context *ctx);
+
+/* text editor */
+NK_LIB void nk_textedit_clear_state(struct nk_text_edit *state, enum nk_text_edit_type type, nk_plugin_filter filter);
+NK_LIB void nk_textedit_click(struct nk_text_edit *state, float x, float y, const struct nk_user_font *font, float row_height);
+NK_LIB void nk_textedit_drag(struct nk_text_edit *state, float x, float y, const struct nk_user_font *font, float row_height);
+NK_LIB void nk_textedit_key(struct nk_text_edit *state, enum nk_keys key, int shift_mod, const struct nk_user_font *font, float row_height);
+
+/* window */
+enum nk_window_insert_location {
+ NK_INSERT_BACK, /* inserts window into the back of list (front of screen) */
+ NK_INSERT_FRONT /* inserts window into the front of list (back of screen) */
+};
+NK_LIB void *nk_create_window(struct nk_context *ctx);
+NK_LIB void nk_remove_window(struct nk_context*, struct nk_window*);
+NK_LIB void nk_free_window(struct nk_context *ctx, struct nk_window *win);
+NK_LIB struct nk_window *nk_find_window(struct nk_context *ctx, nk_hash hash, const char *name);
+NK_LIB void nk_insert_window(struct nk_context *ctx, struct nk_window *win, enum nk_window_insert_location loc);
+
+/* pool */
+NK_LIB void nk_pool_init(struct nk_pool *pool, struct nk_allocator *alloc, unsigned int capacity);
+NK_LIB void nk_pool_free(struct nk_pool *pool);
+NK_LIB void nk_pool_init_fixed(struct nk_pool *pool, void *memory, nk_size size);
+NK_LIB struct nk_page_element *nk_pool_alloc(struct nk_pool *pool);
+
+/* page-element */
+NK_LIB struct nk_page_element* nk_create_page_element(struct nk_context *ctx);
+NK_LIB void nk_link_page_element_into_freelist(struct nk_context *ctx, struct nk_page_element *elem);
+NK_LIB void nk_free_page_element(struct nk_context *ctx, struct nk_page_element *elem);
+
+/* table */
+NK_LIB struct nk_table* nk_create_table(struct nk_context *ctx);
+NK_LIB void nk_remove_table(struct nk_window *win, struct nk_table *tbl);
+NK_LIB void nk_free_table(struct nk_context *ctx, struct nk_table *tbl);
+NK_LIB void nk_push_table(struct nk_window *win, struct nk_table *tbl);
+NK_LIB nk_uint *nk_add_value(struct nk_context *ctx, struct nk_window *win, nk_hash name, nk_uint value);
+NK_LIB nk_uint *nk_find_value(struct nk_window *win, nk_hash name);
+
+/* panel */
+NK_LIB void *nk_create_panel(struct nk_context *ctx);
+NK_LIB void nk_free_panel(struct nk_context*, struct nk_panel *pan);
+NK_LIB int nk_panel_has_header(nk_flags flags, const char *title);
+NK_LIB struct nk_vec2 nk_panel_get_padding(const struct nk_style *style, enum nk_panel_type type);
+NK_LIB float nk_panel_get_border(const struct nk_style *style, nk_flags flags, enum nk_panel_type type);
+NK_LIB struct nk_color nk_panel_get_border_color(const struct nk_style *style, enum nk_panel_type type);
+NK_LIB int nk_panel_is_sub(enum nk_panel_type type);
+NK_LIB int nk_panel_is_nonblock(enum nk_panel_type type);
+NK_LIB int nk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type panel_type);
+NK_LIB void nk_panel_end(struct nk_context *ctx);
+
+/* layout */
+NK_LIB float nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type, float total_space, int columns);
+NK_LIB void nk_panel_layout(const struct nk_context *ctx, struct nk_window *win, float height, int cols);
+NK_LIB void nk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt, float height, int cols, int width);
+NK_LIB void nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win);
+NK_LIB void nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, struct nk_window *win, int modify);
+NK_LIB void nk_panel_alloc_space(struct nk_rect *bounds, const struct nk_context *ctx);
+NK_LIB void nk_layout_peek(struct nk_rect *bounds, struct nk_context *ctx);
+
+/* popup */
+NK_LIB int nk_nonblock_begin(struct nk_context *ctx, nk_flags flags, struct nk_rect body, struct nk_rect header, enum nk_panel_type panel_type);
+
+/* text */
+struct nk_text {
+ struct nk_vec2 padding;
+ struct nk_color background;
+ struct nk_color text;
+};
+NK_LIB void nk_widget_text(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, nk_flags a, const struct nk_user_font *f);
+NK_LIB void nk_widget_text_wrap(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, const struct nk_user_font *f);
+
+/* button */
+NK_LIB int nk_button_behavior(nk_flags *state, struct nk_rect r, const struct nk_input *i, enum nk_button_behavior behavior);
+NK_LIB const struct nk_style_item* nk_draw_button(struct nk_command_buffer *out, const struct nk_rect *bounds, nk_flags state, const struct nk_style_button *style);
+NK_LIB int nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r, const struct nk_style_button *style, const struct nk_input *in, enum nk_button_behavior behavior, struct nk_rect *content);
+NK_LIB void nk_draw_button_text(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state, const struct nk_style_button *style, const char *txt, int len, nk_flags text_alignment, const struct nk_user_font *font);
+NK_LIB int nk_do_button_text(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *string, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_input *in, const struct nk_user_font *font);
+NK_LIB void nk_draw_button_symbol(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state, const struct nk_style_button *style, enum nk_symbol_type type, const struct nk_user_font *font);
+NK_LIB int nk_do_button_symbol(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, enum nk_symbol_type symbol, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_input *in, const struct nk_user_font *font);
+NK_LIB void nk_draw_button_image(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state, const struct nk_style_button *style, const struct nk_image *img);
+NK_LIB int nk_do_button_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, struct nk_image img, enum nk_button_behavior b, const struct nk_style_button *style, const struct nk_input *in);
+NK_LIB void nk_draw_button_text_symbol(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *label, const struct nk_rect *symbol, nk_flags state, const struct nk_style_button *style, const char *str, int len, enum nk_symbol_type type, const struct nk_user_font *font);
+NK_LIB int nk_do_button_text_symbol(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, enum nk_symbol_type symbol, const char *str, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_user_font *font, const struct nk_input *in);
+NK_LIB void nk_draw_button_text_image(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *label, const struct nk_rect *image, nk_flags state, const struct nk_style_button *style, const char *str, int len, const struct nk_user_font *font, const struct nk_image *img);
+NK_LIB int nk_do_button_text_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, struct nk_image img, const char* str, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_user_font *font, const struct nk_input *in);
+
+/* toggle */
+enum nk_toggle_type {
+ NK_TOGGLE_CHECK,
+ NK_TOGGLE_OPTION
+};
+NK_LIB int nk_toggle_behavior(const struct nk_input *in, struct nk_rect select, nk_flags *state, int active);
+NK_LIB void nk_draw_checkbox(struct nk_command_buffer *out, nk_flags state, const struct nk_style_toggle *style, int active, const struct nk_rect *label, const struct nk_rect *selector, const struct nk_rect *cursors, const char *string, int len, const struct nk_user_font *font);
+NK_LIB void nk_draw_option(struct nk_command_buffer *out, nk_flags state, const struct nk_style_toggle *style, int active, const struct nk_rect *label, const struct nk_rect *selector, const struct nk_rect *cursors, const char *string, int len, const struct nk_user_font *font);
+NK_LIB int nk_do_toggle(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r, int *active, const char *str, int len, enum nk_toggle_type type, const struct nk_style_toggle *style, const struct nk_input *in, const struct nk_user_font *font);
+
+/* progress */
+NK_LIB nk_size nk_progress_behavior(nk_flags *state, struct nk_input *in, struct nk_rect r, struct nk_rect cursor, nk_size max, nk_size value, int modifiable);
+NK_LIB void nk_draw_progress(struct nk_command_buffer *out, nk_flags state, const struct nk_style_progress *style, const struct nk_rect *bounds, const struct nk_rect *scursor, nk_size value, nk_size max);
+NK_LIB nk_size nk_do_progress(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, nk_size value, nk_size max, int modifiable, const struct nk_style_progress *style, struct nk_input *in);
+
+/* slider */
+NK_LIB float nk_slider_behavior(nk_flags *state, struct nk_rect *logical_cursor, struct nk_rect *visual_cursor, struct nk_input *in, struct nk_rect bounds, float slider_min, float slider_max, float slider_value, float slider_step, float slider_steps);
+NK_LIB void nk_draw_slider(struct nk_command_buffer *out, nk_flags state, const struct nk_style_slider *style, const struct nk_rect *bounds, const struct nk_rect *visual_cursor, float min, float value, float max);
+NK_LIB float nk_do_slider(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, float min, float val, float max, float step, const struct nk_style_slider *style, struct nk_input *in, const struct nk_user_font *font);
+
+/* scrollbar */
+NK_LIB float nk_scrollbar_behavior(nk_flags *state, struct nk_input *in, int has_scrolling, const struct nk_rect *scroll, const struct nk_rect *cursor, const struct nk_rect *empty0, const struct nk_rect *empty1, float scroll_offset, float target, float scroll_step, enum nk_orientation o);
+NK_LIB void nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state, const struct nk_style_scrollbar *style, const struct nk_rect *bounds, const struct nk_rect *scroll);
+NK_LIB float nk_do_scrollbarv(nk_flags *state, struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling, float offset, float target, float step, float button_pixel_inc, const struct nk_style_scrollbar *style, struct nk_input *in, const struct nk_user_font *font);
+NK_LIB float nk_do_scrollbarh(nk_flags *state, struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling, float offset, float target, float step, float button_pixel_inc, const struct nk_style_scrollbar *style, struct nk_input *in, const struct nk_user_font *font);
+
+/* selectable */
+NK_LIB void nk_draw_selectable(struct nk_command_buffer *out, nk_flags state, const struct nk_style_selectable *style, int active, const struct nk_rect *bounds, const struct nk_rect *icon, const struct nk_image *img, enum nk_symbol_type sym, const char *string, int len, nk_flags align, const struct nk_user_font *font);
+NK_LIB int nk_do_selectable(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, int *value, const struct nk_style_selectable *style, const struct nk_input *in, const struct nk_user_font *font);
+NK_LIB int nk_do_selectable_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, int *value, const struct nk_image *img, const struct nk_style_selectable *style, const struct nk_input *in, const struct nk_user_font *font);
+
+/* edit */
+NK_LIB void nk_edit_draw_text(struct nk_command_buffer *out, const struct nk_style_edit *style, float pos_x, float pos_y, float x_offset, const char *text, int byte_len, float row_height, const struct nk_user_font *font, struct nk_color background, struct nk_color foreground, int is_selected);
+NK_LIB nk_flags nk_do_edit(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, nk_flags flags, nk_plugin_filter filter, struct nk_text_edit *edit, const struct nk_style_edit *style, struct nk_input *in, const struct nk_user_font *font);
+
+/* color-picker */
+NK_LIB int nk_color_picker_behavior(nk_flags *state, const struct nk_rect *bounds, const struct nk_rect *matrix, const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar, struct nk_colorf *color, const struct nk_input *in);
+NK_LIB void nk_draw_color_picker(struct nk_command_buffer *o, const struct nk_rect *matrix, const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar, struct nk_colorf col);
+NK_LIB int nk_do_color_picker(nk_flags *state, struct nk_command_buffer *out, struct nk_colorf *col, enum nk_color_format fmt, struct nk_rect bounds, struct nk_vec2 padding, const struct nk_input *in, const struct nk_user_font *font);
+
+/* property */
+enum nk_property_status {
+ NK_PROPERTY_DEFAULT,
+ NK_PROPERTY_EDIT,
+ NK_PROPERTY_DRAG
+};
+enum nk_property_filter {
+ NK_FILTER_INT,
+ NK_FILTER_FLOAT
+};
+enum nk_property_kind {
+ NK_PROPERTY_INT,
+ NK_PROPERTY_FLOAT,
+ NK_PROPERTY_DOUBLE
+};
+union nk_property {
+ int i;
+ float f;
+ double d;
+};
+struct nk_property_variant {
+ enum nk_property_kind kind;
+ union nk_property value;
+ union nk_property min_value;
+ union nk_property max_value;
+ union nk_property step;
+};
+NK_LIB struct nk_property_variant nk_property_variant_int(int value, int min_value, int max_value, int step);
+NK_LIB struct nk_property_variant nk_property_variant_float(float value, float min_value, float max_value, float step);
+NK_LIB struct nk_property_variant nk_property_variant_double(double value, double min_value, double max_value, double step);
+
+NK_LIB void nk_drag_behavior(nk_flags *state, const struct nk_input *in, struct nk_rect drag, struct nk_property_variant *variant, float inc_per_pixel);
+NK_LIB void nk_property_behavior(nk_flags *ws, const struct nk_input *in, struct nk_rect property, struct nk_rect label, struct nk_rect edit, struct nk_rect empty, int *state, struct nk_property_variant *variant, float inc_per_pixel);
+NK_LIB void nk_draw_property(struct nk_command_buffer *out, const struct nk_style_property *style, const struct nk_rect *bounds, const struct nk_rect *label, nk_flags state, const char *name, int len, const struct nk_user_font *font);
+NK_LIB void nk_do_property(nk_flags *ws, struct nk_command_buffer *out, struct nk_rect property, const char *name, struct nk_property_variant *variant, float inc_per_pixel, char *buffer, int *len, int *state, int *cursor, int *select_begin, int *select_end, const struct nk_style_property *style, enum nk_property_filter filter, struct nk_input *in, const struct nk_user_font *font, struct nk_text_edit *text_edit, enum nk_button_behavior behavior);
+NK_LIB void nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant *variant, float inc_per_pixel, const enum nk_property_filter filter);
+
+#endif
+
+
+
+
+
+/* ===============================================================
+ *
+ * MATH
+ *
+ * ===============================================================*/
+/* Since nuklear is supposed to work on all systems providing floating point
+ math without any dependencies I also had to implement my own math functions
+ for sqrt, sin and cos. Since the actual highly accurate implementations for
+ the standard library functions are quite complex and I do not need high
+ precision for my use cases I use approximations.
+
+ Sqrt
+ ----
+ For square root nuklear uses the famous fast inverse square root:
+ https://en.wikipedia.org/wiki/Fast_inverse_square_root with
+ slightly tweaked magic constant. While on today's hardware it is
+ probably not faster it is still fast and accurate enough for
+ nuklear's use cases. IMPORTANT: this requires float format IEEE 754
+
+ Sine/Cosine
+ -----------
+ All constants inside both function are generated Remez's minimax
+ approximations for value range 0...2*PI. The reason why I decided to
+ approximate exactly that range is that nuklear only needs sine and
+ cosine to generate circles which only requires that exact range.
+ In addition I used Remez instead of Taylor for additional precision:
+ www.lolengine.net/blog/2011/12/21/better-function-approximations.
+
+ The tool I used to generate constants for both sine and cosine
+ (it can actually approximate a lot more functions) can be
+ found here: www.lolengine.net/wiki/oss/lolremez
+*/
+NK_LIB float
+nk_inv_sqrt(float n)
+{
+ float x2;
+ const float threehalfs = 1.5f;
+ union {nk_uint i; float f;} conv = {0};
+ conv.f = n;
+ x2 = n * 0.5f;
+ conv.i = 0x5f375A84 - (conv.i >> 1);
+ conv.f = conv.f * (threehalfs - (x2 * conv.f * conv.f));
+ return conv.f;
+}
+NK_LIB float
+nk_sqrt(float x)
+{
+ return x * nk_inv_sqrt(x);
+}
+NK_LIB float
+nk_sin(float x)
+{
+ NK_STORAGE const float a0 = +1.91059300966915117e-31f;
+ NK_STORAGE const float a1 = +1.00086760103908896f;
+ NK_STORAGE const float a2 = -1.21276126894734565e-2f;
+ NK_STORAGE const float a3 = -1.38078780785773762e-1f;
+ NK_STORAGE const float a4 = -2.67353392911981221e-2f;
+ NK_STORAGE const float a5 = +2.08026600266304389e-2f;
+ NK_STORAGE const float a6 = -3.03996055049204407e-3f;
+ NK_STORAGE const float a7 = +1.38235642404333740e-4f;
+ return a0 + x*(a1 + x*(a2 + x*(a3 + x*(a4 + x*(a5 + x*(a6 + x*a7))))));
+}
+NK_LIB float
+nk_cos(float x)
+{
+ NK_STORAGE const float a0 = +1.00238601909309722f;
+ NK_STORAGE const float a1 = -3.81919947353040024e-2f;
+ NK_STORAGE const float a2 = -3.94382342128062756e-1f;
+ NK_STORAGE const float a3 = -1.18134036025221444e-1f;
+ NK_STORAGE const float a4 = +1.07123798512170878e-1f;
+ NK_STORAGE const float a5 = -1.86637164165180873e-2f;
+ NK_STORAGE const float a6 = +9.90140908664079833e-4f;
+ NK_STORAGE const float a7 = -5.23022132118824778e-14f;
+ return a0 + x*(a1 + x*(a2 + x*(a3 + x*(a4 + x*(a5 + x*(a6 + x*a7))))));
+}
+NK_LIB nk_uint
+nk_round_up_pow2(nk_uint v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ v++;
+ return v;
+}
+NK_LIB double
+nk_pow(double x, int n)
+{
+ /* check the sign of n */
+ double r = 1;
+ int plus = n >= 0;
+ n = (plus) ? n : -n;
+ while (n > 0) {
+ if ((n & 1) == 1)
+ r *= x;
+ n /= 2;
+ x *= x;
+ }
+ return plus ? r : 1.0 / r;
+}
+NK_LIB int
+nk_ifloord(double x)
+{
+ x = (double)((int)x - ((x < 0.0) ? 1 : 0));
+ return (int)x;
+}
+NK_LIB int
+nk_ifloorf(float x)
+{
+ x = (float)((int)x - ((x < 0.0f) ? 1 : 0));
+ return (int)x;
+}
+NK_LIB int
+nk_iceilf(float x)
+{
+ if (x >= 0) {
+ int i = (int)x;
+ return (x > i) ? i+1: i;
+ } else {
+ int t = (int)x;
+ float r = x - (float)t;
+ return (r > 0.0f) ? t+1: t;
+ }
+}
+NK_LIB int
+nk_log10(double n)
+{
+ int neg;
+ int ret;
+ int exp = 0;
+
+ neg = (n < 0) ? 1 : 0;
+ ret = (neg) ? (int)-n : (int)n;
+ while ((ret / 10) > 0) {
+ ret /= 10;
+ exp++;
+ }
+ if (neg) exp = -exp;
+ return exp;
+}
+NK_API struct nk_rect
+nk_get_null_rect(void)
+{
+ return nk_null_rect;
+}
+NK_API struct nk_rect
+nk_rect(float x, float y, float w, float h)
+{
+ struct nk_rect r;
+ r.x = x; r.y = y;
+ r.w = w; r.h = h;
+ return r;
+}
+NK_API struct nk_rect
+nk_recti(int x, int y, int w, int h)
+{
+ struct nk_rect r;
+ r.x = (float)x;
+ r.y = (float)y;
+ r.w = (float)w;
+ r.h = (float)h;
+ return r;
+}
+NK_API struct nk_rect
+nk_recta(struct nk_vec2 pos, struct nk_vec2 size)
+{
+ return nk_rect(pos.x, pos.y, size.x, size.y);
+}
+NK_API struct nk_rect
+nk_rectv(const float *r)
+{
+ return nk_rect(r[0], r[1], r[2], r[3]);
+}
+NK_API struct nk_rect
+nk_rectiv(const int *r)
+{
+ return nk_recti(r[0], r[1], r[2], r[3]);
+}
+NK_API struct nk_vec2
+nk_rect_pos(struct nk_rect r)
+{
+ struct nk_vec2 ret;
+ ret.x = r.x; ret.y = r.y;
+ return ret;
+}
+NK_API struct nk_vec2
+nk_rect_size(struct nk_rect r)
+{
+ struct nk_vec2 ret;
+ ret.x = r.w; ret.y = r.h;
+ return ret;
+}
+NK_LIB struct nk_rect
+nk_shrink_rect(struct nk_rect r, float amount)
+{
+ struct nk_rect res;
+ r.w = NK_MAX(r.w, 2 * amount);
+ r.h = NK_MAX(r.h, 2 * amount);
+ res.x = r.x + amount;
+ res.y = r.y + amount;
+ res.w = r.w - 2 * amount;
+ res.h = r.h - 2 * amount;
+ return res;
+}
+NK_LIB struct nk_rect
+nk_pad_rect(struct nk_rect r, struct nk_vec2 pad)
+{
+ r.w = NK_MAX(r.w, 2 * pad.x);
+ r.h = NK_MAX(r.h, 2 * pad.y);
+ r.x += pad.x; r.y += pad.y;
+ r.w -= 2 * pad.x;
+ r.h -= 2 * pad.y;
+ return r;
+}
+NK_API struct nk_vec2
+nk_vec2(float x, float y)
+{
+ struct nk_vec2 ret;
+ ret.x = x; ret.y = y;
+ return ret;
+}
+NK_API struct nk_vec2
+nk_vec2i(int x, int y)
+{
+ struct nk_vec2 ret;
+ ret.x = (float)x;
+ ret.y = (float)y;
+ return ret;
+}
+NK_API struct nk_vec2
+nk_vec2v(const float *v)
+{
+ return nk_vec2(v[0], v[1]);
+}
+NK_API struct nk_vec2
+nk_vec2iv(const int *v)
+{
+ return nk_vec2i(v[0], v[1]);
+}
+NK_LIB void
+nk_unify(struct nk_rect *clip, const struct nk_rect *a, float x0, float y0,
+ float x1, float y1)
+{
+ NK_ASSERT(a);
+ NK_ASSERT(clip);
+ clip->x = NK_MAX(a->x, x0);
+ clip->y = NK_MAX(a->y, y0);
+ clip->w = NK_MIN(a->x + a->w, x1) - clip->x;
+ clip->h = NK_MIN(a->y + a->h, y1) - clip->y;
+ clip->w = NK_MAX(0, clip->w);
+ clip->h = NK_MAX(0, clip->h);
+}
+
+NK_API void
+nk_triangle_from_direction(struct nk_vec2 *result, struct nk_rect r,
+ float pad_x, float pad_y, enum nk_heading direction)
+{
+ float w_half, h_half;
+ NK_ASSERT(result);
+
+ r.w = NK_MAX(2 * pad_x, r.w);
+ r.h = NK_MAX(2 * pad_y, r.h);
+ r.w = r.w - 2 * pad_x;
+ r.h = r.h - 2 * pad_y;
+
+ r.x = r.x + pad_x;
+ r.y = r.y + pad_y;
+
+ w_half = r.w / 2.0f;
+ h_half = r.h / 2.0f;
+
+ if (direction == NK_UP) {
+ result[0] = nk_vec2(r.x + w_half, r.y);
+ result[1] = nk_vec2(r.x + r.w, r.y + r.h);
+ result[2] = nk_vec2(r.x, r.y + r.h);
+ } else if (direction == NK_RIGHT) {
+ result[0] = nk_vec2(r.x, r.y);
+ result[1] = nk_vec2(r.x + r.w, r.y + h_half);
+ result[2] = nk_vec2(r.x, r.y + r.h);
+ } else if (direction == NK_DOWN) {
+ result[0] = nk_vec2(r.x, r.y);
+ result[1] = nk_vec2(r.x + r.w, r.y);
+ result[2] = nk_vec2(r.x + w_half, r.y + r.h);
+ } else {
+ result[0] = nk_vec2(r.x, r.y + h_half);
+ result[1] = nk_vec2(r.x + r.w, r.y);
+ result[2] = nk_vec2(r.x + r.w, r.y + r.h);
+ }
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * UTIL
+ *
+ * ===============================================================*/
+NK_INTERN int nk_str_match_here(const char *regexp, const char *text);
+NK_INTERN int nk_str_match_star(int c, const char *regexp, const char *text);
+NK_LIB int nk_is_lower(int c) {return (c >= 'a' && c <= 'z') || (c >= 0xE0 && c <= 0xFF);}
+NK_LIB int nk_is_upper(int c){return (c >= 'A' && c <= 'Z') || (c >= 0xC0 && c <= 0xDF);}
+NK_LIB int nk_to_upper(int c) {return (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;}
+NK_LIB int nk_to_lower(int c) {return (c >= 'A' && c <= 'Z') ? (c - ('a' + 'A')) : c;}
+
+NK_LIB void*
+nk_memcopy(void *dst0, const void *src0, nk_size length)
+{
+ nk_ptr t;
+ char *dst = (char*)dst0;
+ const char *src = (const char*)src0;
+ if (length == 0 || dst == src)
+ goto done;
+
+ #define nk_word int
+ #define nk_wsize sizeof(nk_word)
+ #define nk_wmask (nk_wsize-1)
+ #define NK_TLOOP(s) if (t) NK_TLOOP1(s)
+ #define NK_TLOOP1(s) do { s; } while (--t)
+
+ if (dst < src) {
+ t = (nk_ptr)src; /* only need low bits */
+ if ((t | (nk_ptr)dst) & nk_wmask) {
+ if ((t ^ (nk_ptr)dst) & nk_wmask || length < nk_wsize)
+ t = length;
+ else
+ t = nk_wsize - (t & nk_wmask);
+ length -= t;
+ NK_TLOOP1(*dst++ = *src++);
+ }
+ t = length / nk_wsize;
+ NK_TLOOP(*(nk_word*)(void*)dst = *(const nk_word*)(const void*)src;
+ src += nk_wsize; dst += nk_wsize);
+ t = length & nk_wmask;
+ NK_TLOOP(*dst++ = *src++);
+ } else {
+ src += length;
+ dst += length;
+ t = (nk_ptr)src;
+ if ((t | (nk_ptr)dst) & nk_wmask) {
+ if ((t ^ (nk_ptr)dst) & nk_wmask || length <= nk_wsize)
+ t = length;
+ else
+ t &= nk_wmask;
+ length -= t;
+ NK_TLOOP1(*--dst = *--src);
+ }
+ t = length / nk_wsize;
+ NK_TLOOP(src -= nk_wsize; dst -= nk_wsize;
+ *(nk_word*)(void*)dst = *(const nk_word*)(const void*)src);
+ t = length & nk_wmask;
+ NK_TLOOP(*--dst = *--src);
+ }
+ #undef nk_word
+ #undef nk_wsize
+ #undef nk_wmask
+ #undef NK_TLOOP
+ #undef NK_TLOOP1
+done:
+ return (dst0);
+}
+NK_LIB void
+nk_memset(void *ptr, int c0, nk_size size)
+{
+ #define nk_word unsigned
+ #define nk_wsize sizeof(nk_word)
+ #define nk_wmask (nk_wsize - 1)
+ nk_byte *dst = (nk_byte*)ptr;
+ unsigned c = 0;
+ nk_size t = 0;
+
+ if ((c = (nk_byte)c0) != 0) {
+ c = (c << 8) | c; /* at least 16-bits */
+ if (sizeof(unsigned int) > 2)
+ c = (c << 16) | c; /* at least 32-bits*/
+ }
+
+ /* too small of a word count */
+ dst = (nk_byte*)ptr;
+ if (size < 3 * nk_wsize) {
+ while (size--) *dst++ = (nk_byte)c0;
+ return;
+ }
+
+ /* align destination */
+ if ((t = NK_PTR_TO_UINT(dst) & nk_wmask) != 0) {
+ t = nk_wsize -t;
+ size -= t;
+ do {
+ *dst++ = (nk_byte)c0;
+ } while (--t != 0);
+ }
+
+ /* fill word */
+ t = size / nk_wsize;
+ do {
+ *(nk_word*)((void*)dst) = c;
+ dst += nk_wsize;
+ } while (--t != 0);
+
+ /* fill trailing bytes */
+ t = (size & nk_wmask);
+ if (t != 0) {
+ do {
+ *dst++ = (nk_byte)c0;
+ } while (--t != 0);
+ }
+
+ #undef nk_word
+ #undef nk_wsize
+ #undef nk_wmask
+}
+NK_LIB void
+nk_zero(void *ptr, nk_size size)
+{
+ NK_ASSERT(ptr);
+ NK_MEMSET(ptr, 0, size);
+}
+NK_API int
+nk_strlen(const char *str)
+{
+ int siz = 0;
+ NK_ASSERT(str);
+ while (str && *str++ != '\0') siz++;
+ return siz;
+}
+NK_API int
+nk_strtoi(const char *str, const char **endptr)
+{
+ int neg = 1;
+ const char *p = str;
+ int value = 0;
+
+ NK_ASSERT(str);
+ if (!str) return 0;
+
+ /* skip whitespace */
+ while (*p == ' ') p++;
+ if (*p == '-') {
+ neg = -1;
+ p++;
+ }
+ while (*p && *p >= '0' && *p <= '9') {
+ value = value * 10 + (int) (*p - '0');
+ p++;
+ }
+ if (endptr)
+ *endptr = p;
+ return neg*value;
+}
+NK_API double
+nk_strtod(const char *str, const char **endptr)
+{
+ double m;
+ double neg = 1.0;
+ const char *p = str;
+ double value = 0;
+ double number = 0;
+
+ NK_ASSERT(str);
+ if (!str) return 0;
+
+ /* skip whitespace */
+ while (*p == ' ') p++;
+ if (*p == '-') {
+ neg = -1.0;
+ p++;
+ }
+
+ while (*p && *p != '.' && *p != 'e') {
+ value = value * 10.0 + (double) (*p - '0');
+ p++;
+ }
+
+ if (*p == '.') {
+ p++;
+ for(m = 0.1; *p && *p != 'e'; p++ ) {
+ value = value + (double) (*p - '0') * m;
+ m *= 0.1;
+ }
+ }
+ if (*p == 'e') {
+ int i, pow, div;
+ p++;
+ if (*p == '-') {
+ div = nk_true;
+ p++;
+ } else if (*p == '+') {
+ div = nk_false;
+ p++;
+ } else div = nk_false;
+
+ for (pow = 0; *p; p++)
+ pow = pow * 10 + (int) (*p - '0');
+
+ for (m = 1.0, i = 0; i < pow; i++)
+ m *= 10.0;
+
+ if (div)
+ value /= m;
+ else value *= m;
+ }
+ number = value * neg;
+ if (endptr)
+ *endptr = p;
+ return number;
+}
+NK_API float
+nk_strtof(const char *str, const char **endptr)
+{
+ float float_value;
+ double double_value;
+ double_value = NK_STRTOD(str, endptr);
+ float_value = (float)double_value;
+ return float_value;
+}
+NK_API int
+nk_stricmp(const char *s1, const char *s2)
+{
+ nk_int c1,c2,d;
+ do {
+ c1 = *s1++;
+ c2 = *s2++;
+ d = c1 - c2;
+ while (d) {
+ if (c1 <= 'Z' && c1 >= 'A') {
+ d += ('a' - 'A');
+ if (!d) break;
+ }
+ if (c2 <= 'Z' && c2 >= 'A') {
+ d -= ('a' - 'A');
+ if (!d) break;
+ }
+ return ((d >= 0) << 1) - 1;
+ }
+ } while (c1);
+ return 0;
+}
+NK_API int
+nk_stricmpn(const char *s1, const char *s2, int n)
+{
+ int c1,c2,d;
+ NK_ASSERT(n >= 0);
+ do {
+ c1 = *s1++;
+ c2 = *s2++;
+ if (!n--) return 0;
+
+ d = c1 - c2;
+ while (d) {
+ if (c1 <= 'Z' && c1 >= 'A') {
+ d += ('a' - 'A');
+ if (!d) break;
+ }
+ if (c2 <= 'Z' && c2 >= 'A') {
+ d -= ('a' - 'A');
+ if (!d) break;
+ }
+ return ((d >= 0) << 1) - 1;
+ }
+ } while (c1);
+ return 0;
+}
+NK_INTERN int
+nk_str_match_here(const char *regexp, const char *text)
+{
+ if (regexp[0] == '\0')
+ return 1;
+ if (regexp[1] == '*')
+ return nk_str_match_star(regexp[0], regexp+2, text);
+ if (regexp[0] == '$' && regexp[1] == '\0')
+ return *text == '\0';
+ if (*text!='\0' && (regexp[0]=='.' || regexp[0]==*text))
+ return nk_str_match_here(regexp+1, text+1);
+ return 0;
+}
+NK_INTERN int
+nk_str_match_star(int c, const char *regexp, const char *text)
+{
+ do {/* a '* matches zero or more instances */
+ if (nk_str_match_here(regexp, text))
+ return 1;
+ } while (*text != '\0' && (*text++ == c || c == '.'));
+ return 0;
+}
+NK_API int
+nk_strfilter(const char *text, const char *regexp)
+{
+ /*
+ c matches any literal character c
+ . matches any single character
+ ^ matches the beginning of the input string
+ $ matches the end of the input string
+ * matches zero or more occurrences of the previous character*/
+ if (regexp[0] == '^')
+ return nk_str_match_here(regexp+1, text);
+ do { /* must look even if string is empty */
+ if (nk_str_match_here(regexp, text))
+ return 1;
+ } while (*text++ != '\0');
+ return 0;
+}
+NK_API int
+nk_strmatch_fuzzy_text(const char *str, int str_len,
+ const char *pattern, int *out_score)
+{
+ /* Returns true if each character in pattern is found sequentially within str
+ * if found then out_score is also set. Score value has no intrinsic meaning.
+ * Range varies with pattern. Can only compare scores with same search pattern. */
+
+ /* bonus for adjacent matches */
+ #define NK_ADJACENCY_BONUS 5
+ /* bonus if match occurs after a separator */
+ #define NK_SEPARATOR_BONUS 10
+ /* bonus if match is uppercase and prev is lower */
+ #define NK_CAMEL_BONUS 10
+ /* penalty applied for every letter in str before the first match */
+ #define NK_LEADING_LETTER_PENALTY (-3)
+ /* maximum penalty for leading letters */
+ #define NK_MAX_LEADING_LETTER_PENALTY (-9)
+ /* penalty for every letter that doesn't matter */
+ #define NK_UNMATCHED_LETTER_PENALTY (-1)
+
+ /* loop variables */
+ int score = 0;
+ char const * pattern_iter = pattern;
+ int str_iter = 0;
+ int prev_matched = nk_false;
+ int prev_lower = nk_false;
+ /* true so if first letter match gets separator bonus*/
+ int prev_separator = nk_true;
+
+ /* use "best" matched letter if multiple string letters match the pattern */
+ char const * best_letter = 0;
+ int best_letter_score = 0;
+
+ /* loop over strings */
+ NK_ASSERT(str);
+ NK_ASSERT(pattern);
+ if (!str || !str_len || !pattern) return 0;
+ while (str_iter < str_len)
+ {
+ const char pattern_letter = *pattern_iter;
+ const char str_letter = str[str_iter];
+
+ int next_match = *pattern_iter != '\0' &&
+ nk_to_lower(pattern_letter) == nk_to_lower(str_letter);
+ int rematch = best_letter && nk_to_upper(*best_letter) == nk_to_upper(str_letter);
+
+ int advanced = next_match && best_letter;
+ int pattern_repeat = best_letter && *pattern_iter != '\0';
+ pattern_repeat = pattern_repeat &&
+ nk_to_lower(*best_letter) == nk_to_lower(pattern_letter);
+
+ if (advanced || pattern_repeat) {
+ score += best_letter_score;
+ best_letter = 0;
+ best_letter_score = 0;
+ }
+
+ if (next_match || rematch)
+ {
+ int new_score = 0;
+ /* Apply penalty for each letter before the first pattern match */
+ if (pattern_iter == pattern) {
+ int count = (int)(&str[str_iter] - str);
+ int penalty = NK_LEADING_LETTER_PENALTY * count;
+ if (penalty < NK_MAX_LEADING_LETTER_PENALTY)
+ penalty = NK_MAX_LEADING_LETTER_PENALTY;
+
+ score += penalty;
+ }
+
+ /* apply bonus for consecutive bonuses */
+ if (prev_matched)
+ new_score += NK_ADJACENCY_BONUS;
+
+ /* apply bonus for matches after a separator */
+ if (prev_separator)
+ new_score += NK_SEPARATOR_BONUS;
+
+ /* apply bonus across camel case boundaries */
+ if (prev_lower && nk_is_upper(str_letter))
+ new_score += NK_CAMEL_BONUS;
+
+ /* update pattern iter IFF the next pattern letter was matched */
+ if (next_match)
+ ++pattern_iter;
+
+ /* update best letter in str which may be for a "next" letter or a rematch */
+ if (new_score >= best_letter_score) {
+ /* apply penalty for now skipped letter */
+ if (best_letter != 0)
+ score += NK_UNMATCHED_LETTER_PENALTY;
+
+ best_letter = &str[str_iter];
+ best_letter_score = new_score;
+ }
+ prev_matched = nk_true;
+ } else {
+ score += NK_UNMATCHED_LETTER_PENALTY;
+ prev_matched = nk_false;
+ }
+
+ /* separators should be more easily defined */
+ prev_lower = nk_is_lower(str_letter) != 0;
+ prev_separator = str_letter == '_' || str_letter == ' ';
+
+ ++str_iter;
+ }
+
+ /* apply score for last match */
+ if (best_letter)
+ score += best_letter_score;
+
+ /* did not match full pattern */
+ if (*pattern_iter != '\0')
+ return nk_false;
+
+ if (out_score)
+ *out_score = score;
+ return nk_true;
+}
+NK_API int
+nk_strmatch_fuzzy_string(char const *str, char const *pattern, int *out_score)
+{
+ return nk_strmatch_fuzzy_text(str, nk_strlen(str), pattern, out_score);
+}
+NK_LIB int
+nk_string_float_limit(char *string, int prec)
+{
+ int dot = 0;
+ char *c = string;
+ while (*c) {
+ if (*c == '.') {
+ dot = 1;
+ c++;
+ continue;
+ }
+ if (dot == (prec+1)) {
+ *c = 0;
+ break;
+ }
+ if (dot > 0) dot++;
+ c++;
+ }
+ return (int)(c - string);
+}
+NK_INTERN void
+nk_strrev_ascii(char *s)
+{
+ int len = nk_strlen(s);
+ int end = len / 2;
+ int i = 0;
+ char t;
+ for (; i < end; ++i) {
+ t = s[i];
+ s[i] = s[len - 1 - i];
+ s[len -1 - i] = t;
+ }
+}
+NK_LIB char*
+nk_itoa(char *s, long n)
+{
+ long i = 0;
+ if (n == 0) {
+ s[i++] = '0';
+ s[i] = 0;
+ return s;
+ }
+ if (n < 0) {
+ s[i++] = '-';
+ n = -n;
+ }
+ while (n > 0) {
+ s[i++] = (char)('0' + (n % 10));
+ n /= 10;
+ }
+ s[i] = 0;
+ if (s[0] == '-')
+ ++s;
+
+ nk_strrev_ascii(s);
+ return s;
+}
+NK_LIB char*
+nk_dtoa(char *s, double n)
+{
+ int useExp = 0;
+ int digit = 0, m = 0, m1 = 0;
+ char *c = s;
+ int neg = 0;
+
+ NK_ASSERT(s);
+ if (!s) return 0;
+
+ if (n == 0.0) {
+ s[0] = '0'; s[1] = '\0';
+ return s;
+ }
+
+ neg = (n < 0);
+ if (neg) n = -n;
+
+ /* calculate magnitude */
+ m = nk_log10(n);
+ useExp = (m >= 14 || (neg && m >= 9) || m <= -9);
+ if (neg) *(c++) = '-';
+
+ /* set up for scientific notation */
+ if (useExp) {
+ if (m < 0)
+ m -= 1;
+ n = n / (double)nk_pow(10.0, m);
+ m1 = m;
+ m = 0;
+ }
+ if (m < 1.0) {
+ m = 0;
+ }
+
+ /* convert the number */
+ while (n > NK_FLOAT_PRECISION || m >= 0) {
+ double weight = nk_pow(10.0, m);
+ if (weight > 0) {
+ double t = (double)n / weight;
+ digit = nk_ifloord(t);
+ n -= ((double)digit * weight);
+ *(c++) = (char)('0' + (char)digit);
+ }
+ if (m == 0 && n > 0)
+ *(c++) = '.';
+ m--;
+ }
+
+ if (useExp) {
+ /* convert the exponent */
+ int i, j;
+ *(c++) = 'e';
+ if (m1 > 0) {
+ *(c++) = '+';
+ } else {
+ *(c++) = '-';
+ m1 = -m1;
+ }
+ m = 0;
+ while (m1 > 0) {
+ *(c++) = (char)('0' + (char)(m1 % 10));
+ m1 /= 10;
+ m++;
+ }
+ c -= m;
+ for (i = 0, j = m-1; i<j; i++, j--) {
+ /* swap without temporary */
+ c[i] ^= c[j];
+ c[j] ^= c[i];
+ c[i] ^= c[j];
+ }
+ c += m;
+ }
+ *(c) = '\0';
+ return s;
+}
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+#ifndef NK_INCLUDE_STANDARD_IO
+NK_INTERN int
+nk_vsnprintf(char *buf, int buf_size, const char *fmt, va_list args)
+{
+ enum nk_arg_type {
+ NK_ARG_TYPE_CHAR,
+ NK_ARG_TYPE_SHORT,
+ NK_ARG_TYPE_DEFAULT,
+ NK_ARG_TYPE_LONG
+ };
+ enum nk_arg_flags {
+ NK_ARG_FLAG_LEFT = 0x01,
+ NK_ARG_FLAG_PLUS = 0x02,
+ NK_ARG_FLAG_SPACE = 0x04,
+ NK_ARG_FLAG_NUM = 0x10,
+ NK_ARG_FLAG_ZERO = 0x20
+ };
+
+ char number_buffer[NK_MAX_NUMBER_BUFFER];
+ enum nk_arg_type arg_type = NK_ARG_TYPE_DEFAULT;
+ int precision = NK_DEFAULT;
+ int width = NK_DEFAULT;
+ nk_flags flag = 0;
+
+ int len = 0;
+ int result = -1;
+ const char *iter = fmt;
+
+ NK_ASSERT(buf);
+ NK_ASSERT(buf_size);
+ if (!buf || !buf_size || !fmt) return 0;
+ for (iter = fmt; *iter && len < buf_size; iter++) {
+ /* copy all non-format characters */
+ while (*iter && (*iter != '%') && (len < buf_size))
+ buf[len++] = *iter++;
+ if (!(*iter) || len >= buf_size) break;
+ iter++;
+
+ /* flag arguments */
+ while (*iter) {
+ if (*iter == '-') flag |= NK_ARG_FLAG_LEFT;
+ else if (*iter == '+') flag |= NK_ARG_FLAG_PLUS;
+ else if (*iter == ' ') flag |= NK_ARG_FLAG_SPACE;
+ else if (*iter == '#') flag |= NK_ARG_FLAG_NUM;
+ else if (*iter == '0') flag |= NK_ARG_FLAG_ZERO;
+ else break;
+ iter++;
+ }
+
+ /* width argument */
+ width = NK_DEFAULT;
+ if (*iter >= '1' && *iter <= '9') {
+ const char *end;
+ width = nk_strtoi(iter, &end);
+ if (end == iter)
+ width = -1;
+ else iter = end;
+ } else if (*iter == '*') {
+ width = va_arg(args, int);
+ iter++;
+ }
+
+ /* precision argument */
+ precision = NK_DEFAULT;
+ if (*iter == '.') {
+ iter++;
+ if (*iter == '*') {
+ precision = va_arg(args, int);
+ iter++;
+ } else {
+ const char *end;
+ precision = nk_strtoi(iter, &end);
+ if (end == iter)
+ precision = -1;
+ else iter = end;
+ }
+ }
+
+ /* length modifier */
+ if (*iter == 'h') {
+ if (*(iter+1) == 'h') {
+ arg_type = NK_ARG_TYPE_CHAR;
+ iter++;
+ } else arg_type = NK_ARG_TYPE_SHORT;
+ iter++;
+ } else if (*iter == 'l') {
+ arg_type = NK_ARG_TYPE_LONG;
+ iter++;
+ } else arg_type = NK_ARG_TYPE_DEFAULT;
+
+ /* specifier */
+ if (*iter == '%') {
+ NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
+ NK_ASSERT(precision == NK_DEFAULT);
+ NK_ASSERT(width == NK_DEFAULT);
+ if (len < buf_size)
+ buf[len++] = '%';
+ } else if (*iter == 's') {
+ /* string */
+ const char *str = va_arg(args, const char*);
+ NK_ASSERT(str != buf && "buffer and argument are not allowed to overlap!");
+ NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
+ NK_ASSERT(precision == NK_DEFAULT);
+ NK_ASSERT(width == NK_DEFAULT);
+ if (str == buf) return -1;
+ while (str && *str && len < buf_size)
+ buf[len++] = *str++;
+ } else if (*iter == 'n') {
+ /* current length callback */
+ signed int *n = va_arg(args, int*);
+ NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
+ NK_ASSERT(precision == NK_DEFAULT);
+ NK_ASSERT(width == NK_DEFAULT);
+ if (n) *n = len;
+ } else if (*iter == 'c' || *iter == 'i' || *iter == 'd') {
+ /* signed integer */
+ long value = 0;
+ const char *num_iter;
+ int num_len, num_print, padding;
+ int cur_precision = NK_MAX(precision, 1);
+ int cur_width = NK_MAX(width, 0);
+
+ /* retrieve correct value type */
+ if (arg_type == NK_ARG_TYPE_CHAR)
+ value = (signed char)va_arg(args, int);
+ else if (arg_type == NK_ARG_TYPE_SHORT)
+ value = (signed short)va_arg(args, int);
+ else if (arg_type == NK_ARG_TYPE_LONG)
+ value = va_arg(args, signed long);
+ else if (*iter == 'c')
+ value = (unsigned char)va_arg(args, int);
+ else value = va_arg(args, signed int);
+
+ /* convert number to string */
+ nk_itoa(number_buffer, value);
+ num_len = nk_strlen(number_buffer);
+ padding = NK_MAX(cur_width - NK_MAX(cur_precision, num_len), 0);
+ if ((flag & NK_ARG_FLAG_PLUS) || (flag & NK_ARG_FLAG_SPACE))
+ padding = NK_MAX(padding-1, 0);
+
+ /* fill left padding up to a total of `width` characters */
+ if (!(flag & NK_ARG_FLAG_LEFT)) {
+ while (padding-- > 0 && (len < buf_size)) {
+ if ((flag & NK_ARG_FLAG_ZERO) && (precision == NK_DEFAULT))
+ buf[len++] = '0';
+ else buf[len++] = ' ';
+ }
+ }
+
+ /* copy string value representation into buffer */
+ if ((flag & NK_ARG_FLAG_PLUS) && value >= 0 && len < buf_size)
+ buf[len++] = '+';
+ else if ((flag & NK_ARG_FLAG_SPACE) && value >= 0 && len < buf_size)
+ buf[len++] = ' ';
+
+ /* fill up to precision number of digits with '0' */
+ num_print = NK_MAX(cur_precision, num_len);
+ while (precision && (num_print > num_len) && (len < buf_size)) {
+ buf[len++] = '0';
+ num_print--;
+ }
+
+ /* copy string value representation into buffer */
+ num_iter = number_buffer;
+ while (precision && *num_iter && len < buf_size)
+ buf[len++] = *num_iter++;
+
+ /* fill right padding up to width characters */
+ if (flag & NK_ARG_FLAG_LEFT) {
+ while ((padding-- > 0) && (len < buf_size))
+ buf[len++] = ' ';
+ }
+ } else if (*iter == 'o' || *iter == 'x' || *iter == 'X' || *iter == 'u') {
+ /* unsigned integer */
+ unsigned long value = 0;
+ int num_len = 0, num_print, padding = 0;
+ int cur_precision = NK_MAX(precision, 1);
+ int cur_width = NK_MAX(width, 0);
+ unsigned int base = (*iter == 'o') ? 8: (*iter == 'u')? 10: 16;
+
+ /* print oct/hex/dec value */
+ const char *upper_output_format = "0123456789ABCDEF";
+ const char *lower_output_format = "0123456789abcdef";
+ const char *output_format = (*iter == 'x') ?
+ lower_output_format: upper_output_format;
+
+ /* retrieve correct value type */
+ if (arg_type == NK_ARG_TYPE_CHAR)
+ value = (unsigned char)va_arg(args, int);
+ else if (arg_type == NK_ARG_TYPE_SHORT)
+ value = (unsigned short)va_arg(args, int);
+ else if (arg_type == NK_ARG_TYPE_LONG)
+ value = va_arg(args, unsigned long);
+ else value = va_arg(args, unsigned int);
+
+ do {
+ /* convert decimal number into hex/oct number */
+ int digit = output_format[value % base];
+ if (num_len < NK_MAX_NUMBER_BUFFER)
+ number_buffer[num_len++] = (char)digit;
+ value /= base;
+ } while (value > 0);
+
+ num_print = NK_MAX(cur_precision, num_len);
+ padding = NK_MAX(cur_width - NK_MAX(cur_precision, num_len), 0);
+ if (flag & NK_ARG_FLAG_NUM)
+ padding = NK_MAX(padding-1, 0);
+
+ /* fill left padding up to a total of `width` characters */
+ if (!(flag & NK_ARG_FLAG_LEFT)) {
+ while ((padding-- > 0) && (len < buf_size)) {
+ if ((flag & NK_ARG_FLAG_ZERO) && (precision == NK_DEFAULT))
+ buf[len++] = '0';
+ else buf[len++] = ' ';
+ }
+ }
+
+ /* fill up to precision number of digits */
+ if (num_print && (flag & NK_ARG_FLAG_NUM)) {
+ if ((*iter == 'o') && (len < buf_size)) {
+ buf[len++] = '0';
+ } else if ((*iter == 'x') && ((len+1) < buf_size)) {
+ buf[len++] = '0';
+ buf[len++] = 'x';
+ } else if ((*iter == 'X') && ((len+1) < buf_size)) {
+ buf[len++] = '0';
+ buf[len++] = 'X';
+ }
+ }
+ while (precision && (num_print > num_len) && (len < buf_size)) {
+ buf[len++] = '0';
+ num_print--;
+ }
+
+ /* reverse number direction */
+ while (num_len > 0) {
+ if (precision && (len < buf_size))
+ buf[len++] = number_buffer[num_len-1];
+ num_len--;
+ }
+
+ /* fill right padding up to width characters */
+ if (flag & NK_ARG_FLAG_LEFT) {
+ while ((padding-- > 0) && (len < buf_size))
+ buf[len++] = ' ';
+ }
+ } else if (*iter == 'f') {
+ /* floating point */
+ const char *num_iter;
+ int cur_precision = (precision < 0) ? 6: precision;
+ int prefix, cur_width = NK_MAX(width, 0);
+ double value = va_arg(args, double);
+ int num_len = 0, frac_len = 0, dot = 0;
+ int padding = 0;
+
+ NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
+ NK_DTOA(number_buffer, value);
+ num_len = nk_strlen(number_buffer);
+
+ /* calculate padding */
+ num_iter = number_buffer;
+ while (*num_iter && *num_iter != '.')
+ num_iter++;
+
+ prefix = (*num_iter == '.')?(int)(num_iter - number_buffer)+1:0;
+ padding = NK_MAX(cur_width - (prefix + NK_MIN(cur_precision, num_len - prefix)) , 0);
+ if ((flag & NK_ARG_FLAG_PLUS) || (flag & NK_ARG_FLAG_SPACE))
+ padding = NK_MAX(padding-1, 0);
+
+ /* fill left padding up to a total of `width` characters */
+ if (!(flag & NK_ARG_FLAG_LEFT)) {
+ while (padding-- > 0 && (len < buf_size)) {
+ if (flag & NK_ARG_FLAG_ZERO)
+ buf[len++] = '0';
+ else buf[len++] = ' ';
+ }
+ }
+
+ /* copy string value representation into buffer */
+ num_iter = number_buffer;
+ if ((flag & NK_ARG_FLAG_PLUS) && (value >= 0) && (len < buf_size))
+ buf[len++] = '+';
+ else if ((flag & NK_ARG_FLAG_SPACE) && (value >= 0) && (len < buf_size))
+ buf[len++] = ' ';
+ while (*num_iter) {
+ if (dot) frac_len++;
+ if (len < buf_size)
+ buf[len++] = *num_iter;
+ if (*num_iter == '.') dot = 1;
+ if (frac_len >= cur_precision) break;
+ num_iter++;
+ }
+
+ /* fill number up to precision */
+ while (frac_len < cur_precision) {
+ if (!dot && len < buf_size) {
+ buf[len++] = '.';
+ dot = 1;
+ }
+ if (len < buf_size)
+ buf[len++] = '0';
+ frac_len++;
+ }
+
+ /* fill right padding up to width characters */
+ if (flag & NK_ARG_FLAG_LEFT) {
+ while ((padding-- > 0) && (len < buf_size))
+ buf[len++] = ' ';
+ }
+ } else {
+ /* Specifier not supported: g,G,e,E,p,z */
+ NK_ASSERT(0 && "specifier is not supported!");
+ return result;
+ }
+ }
+ buf[(len >= buf_size)?(buf_size-1):len] = 0;
+ result = (len >= buf_size)?-1:len;
+ return result;
+}
+#endif
+NK_LIB int
+nk_strfmt(char *buf, int buf_size, const char *fmt, va_list args)
+{
+ int result = -1;
+ NK_ASSERT(buf);
+ NK_ASSERT(buf_size);
+ if (!buf || !buf_size || !fmt) return 0;
+#ifdef NK_INCLUDE_STANDARD_IO
+ result = NK_VSNPRINTF(buf, (nk_size)buf_size, fmt, args);
+ result = (result >= buf_size) ? -1: result;
+ buf[buf_size-1] = 0;
+#else
+ result = nk_vsnprintf(buf, buf_size, fmt, args);
+#endif
+ return result;
+}
+#endif
+NK_API nk_hash
+nk_murmur_hash(const void * key, int len, nk_hash seed)
+{
+ /* 32-Bit MurmurHash3: https://code.google.com/p/smhasher/wiki/MurmurHash3*/
+ #define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r)))
+ union {const nk_uint *i; const nk_byte *b;} conv = {0};
+ const nk_byte *data = (const nk_byte*)key;
+ const int nblocks = len/4;
+ nk_uint h1 = seed;
+ const nk_uint c1 = 0xcc9e2d51;
+ const nk_uint c2 = 0x1b873593;
+ const nk_byte *tail;
+ const nk_uint *blocks;
+ nk_uint k1;
+ int i;
+
+ /* body */
+ if (!key) return 0;
+ conv.b = (data + nblocks*4);
+ blocks = (const nk_uint*)conv.i;
+ for (i = -nblocks; i; ++i) {
+ k1 = blocks[i];
+ k1 *= c1;
+ k1 = NK_ROTL(k1,15);
+ k1 *= c2;
+
+ h1 ^= k1;
+ h1 = NK_ROTL(h1,13);
+ h1 = h1*5+0xe6546b64;
+ }
+
+ /* tail */
+ tail = (const nk_byte*)(data + nblocks*4);
+ k1 = 0;
+ switch (len & 3) {
+ case 3: k1 ^= (nk_uint)(tail[2] << 16); /* fallthrough */
+ case 2: k1 ^= (nk_uint)(tail[1] << 8u); /* fallthrough */
+ case 1: k1 ^= tail[0];
+ k1 *= c1;
+ k1 = NK_ROTL(k1,15);
+ k1 *= c2;
+ h1 ^= k1;
+ break;
+ default: break;
+ }
+
+ /* finalization */
+ h1 ^= (nk_uint)len;
+ /* fmix32 */
+ h1 ^= h1 >> 16;
+ h1 *= 0x85ebca6b;
+ h1 ^= h1 >> 13;
+ h1 *= 0xc2b2ae35;
+ h1 ^= h1 >> 16;
+
+ #undef NK_ROTL
+ return h1;
+}
+#ifdef NK_INCLUDE_STANDARD_IO
+NK_LIB char*
+nk_file_load(const char* path, nk_size* siz, struct nk_allocator *alloc)
+{
+ char *buf;
+ FILE *fd;
+ long ret;
+
+ NK_ASSERT(path);
+ NK_ASSERT(siz);
+ NK_ASSERT(alloc);
+ if (!path || !siz || !alloc)
+ return 0;
+
+ fd = fopen(path, "rb");
+ if (!fd) return 0;
+ fseek(fd, 0, SEEK_END);
+ ret = ftell(fd);
+ if (ret < 0) {
+ fclose(fd);
+ return 0;
+ }
+ *siz = (nk_size)ret;
+ fseek(fd, 0, SEEK_SET);
+ buf = (char*)alloc->alloc(alloc->userdata,0, *siz);
+ NK_ASSERT(buf);
+ if (!buf) {
+ fclose(fd);
+ return 0;
+ }
+ *siz = (nk_size)fread(buf, 1,*siz, fd);
+ fclose(fd);
+ return buf;
+}
+#endif
+NK_LIB int
+nk_text_clamp(const struct nk_user_font *font, const char *text,
+ int text_len, float space, int *glyphs, float *text_width,
+ nk_rune *sep_list, int sep_count)
+{
+ int i = 0;
+ int glyph_len = 0;
+ float last_width = 0;
+ nk_rune unicode = 0;
+ float width = 0;
+ int len = 0;
+ int g = 0;
+ float s;
+
+ int sep_len = 0;
+ int sep_g = 0;
+ float sep_width = 0;
+ sep_count = NK_MAX(sep_count,0);
+
+ glyph_len = nk_utf_decode(text, &unicode, text_len);
+ while (glyph_len && (width < space) && (len < text_len)) {
+ len += glyph_len;
+ s = font->width(font->userdata, font->height, text, len);
+ for (i = 0; i < sep_count; ++i) {
+ if (unicode != sep_list[i]) continue;
+ sep_width = last_width = width;
+ sep_g = g+1;
+ sep_len = len;
+ break;
+ }
+ if (i == sep_count){
+ last_width = sep_width = width;
+ sep_g = g+1;
+ }
+ width = s;
+ glyph_len = nk_utf_decode(&text[len], &unicode, text_len - len);
+ g++;
+ }
+ if (len >= text_len) {
+ *glyphs = g;
+ *text_width = last_width;
+ return len;
+ } else {
+ *glyphs = sep_g;
+ *text_width = sep_width;
+ return (!sep_len) ? len: sep_len;
+ }
+}
+NK_LIB struct nk_vec2
+nk_text_calculate_text_bounds(const struct nk_user_font *font,
+ const char *begin, int byte_len, float row_height, const char **remaining,
+ struct nk_vec2 *out_offset, int *glyphs, int op)
+{
+ float line_height = row_height;
+ struct nk_vec2 text_size = nk_vec2(0,0);
+ float line_width = 0.0f;
+
+ float glyph_width;
+ int glyph_len = 0;
+ nk_rune unicode = 0;
+ int text_len = 0;
+ if (!begin || byte_len <= 0 || !font)
+ return nk_vec2(0,row_height);
+
+ glyph_len = nk_utf_decode(begin, &unicode, byte_len);
+ if (!glyph_len) return text_size;
+ glyph_width = font->width(font->userdata, font->height, begin, glyph_len);
+
+ *glyphs = 0;
+ while ((text_len < byte_len) && glyph_len) {
+ if (unicode == '\n') {
+ text_size.x = NK_MAX(text_size.x, line_width);
+ text_size.y += line_height;
+ line_width = 0;
+ *glyphs+=1;
+ if (op == NK_STOP_ON_NEW_LINE)
+ break;
+
+ text_len++;
+ glyph_len = nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);
+ continue;
+ }
+
+ if (unicode == '\r') {
+ text_len++;
+ *glyphs+=1;
+ glyph_len = nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);
+ continue;
+ }
+
+ *glyphs = *glyphs + 1;
+ text_len += glyph_len;
+ line_width += (float)glyph_width;
+ glyph_len = nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);
+ glyph_width = font->width(font->userdata, font->height, begin+text_len, glyph_len);
+ continue;
+ }
+
+ if (text_size.x < line_width)
+ text_size.x = line_width;
+ if (out_offset)
+ *out_offset = nk_vec2(line_width, text_size.y + line_height);
+ if (line_width > 0 || text_size.y == 0.0f)
+ text_size.y += line_height;
+ if (remaining)
+ *remaining = begin+text_len;
+ return text_size;
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * COLOR
+ *
+ * ===============================================================*/
+NK_INTERN int
+nk_parse_hex(const char *p, int length)
+{
+ int i = 0;
+ int len = 0;
+ while (len < length) {
+ i <<= 4;
+ if (p[len] >= 'a' && p[len] <= 'f')
+ i += ((p[len] - 'a') + 10);
+ else if (p[len] >= 'A' && p[len] <= 'F')
+ i += ((p[len] - 'A') + 10);
+ else i += (p[len] - '0');
+ len++;
+ }
+ return i;
+}
+NK_API struct nk_color
+nk_rgba(int r, int g, int b, int a)
+{
+ struct nk_color ret;
+ ret.r = (nk_byte)NK_CLAMP(0, r, 255);
+ ret.g = (nk_byte)NK_CLAMP(0, g, 255);
+ ret.b = (nk_byte)NK_CLAMP(0, b, 255);
+ ret.a = (nk_byte)NK_CLAMP(0, a, 255);
+ return ret;
+}
+NK_API struct nk_color
+nk_rgb_hex(const char *rgb)
+{
+ struct nk_color col;
+ const char *c = rgb;
+ if (*c == '#') c++;
+ col.r = (nk_byte)nk_parse_hex(c, 2);
+ col.g = (nk_byte)nk_parse_hex(c+2, 2);
+ col.b = (nk_byte)nk_parse_hex(c+4, 2);
+ col.a = 255;
+ return col;
+}
+NK_API struct nk_color
+nk_rgba_hex(const char *rgb)
+{
+ struct nk_color col;
+ const char *c = rgb;
+ if (*c == '#') c++;
+ col.r = (nk_byte)nk_parse_hex(c, 2);
+ col.g = (nk_byte)nk_parse_hex(c+2, 2);
+ col.b = (nk_byte)nk_parse_hex(c+4, 2);
+ col.a = (nk_byte)nk_parse_hex(c+6, 2);
+ return col;
+}
+NK_API void
+nk_color_hex_rgba(char *output, struct nk_color col)
+{
+ #define NK_TO_HEX(i) ((i) <= 9 ? '0' + (i): 'A' - 10 + (i))
+ output[0] = (char)NK_TO_HEX((col.r & 0xF0) >> 4);
+ output[1] = (char)NK_TO_HEX((col.r & 0x0F));
+ output[2] = (char)NK_TO_HEX((col.g & 0xF0) >> 4);
+ output[3] = (char)NK_TO_HEX((col.g & 0x0F));
+ output[4] = (char)NK_TO_HEX((col.b & 0xF0) >> 4);
+ output[5] = (char)NK_TO_HEX((col.b & 0x0F));
+ output[6] = (char)NK_TO_HEX((col.a & 0xF0) >> 4);
+ output[7] = (char)NK_TO_HEX((col.a & 0x0F));
+ output[8] = '\0';
+ #undef NK_TO_HEX
+}
+NK_API void
+nk_color_hex_rgb(char *output, struct nk_color col)
+{
+ #define NK_TO_HEX(i) ((i) <= 9 ? '0' + (i): 'A' - 10 + (i))
+ output[0] = (char)NK_TO_HEX((col.r & 0xF0) >> 4);
+ output[1] = (char)NK_TO_HEX((col.r & 0x0F));
+ output[2] = (char)NK_TO_HEX((col.g & 0xF0) >> 4);
+ output[3] = (char)NK_TO_HEX((col.g & 0x0F));
+ output[4] = (char)NK_TO_HEX((col.b & 0xF0) >> 4);
+ output[5] = (char)NK_TO_HEX((col.b & 0x0F));
+ output[6] = '\0';
+ #undef NK_TO_HEX
+}
+NK_API struct nk_color
+nk_rgba_iv(const int *c)
+{
+ return nk_rgba(c[0], c[1], c[2], c[3]);
+}
+NK_API struct nk_color
+nk_rgba_bv(const nk_byte *c)
+{
+ return nk_rgba(c[0], c[1], c[2], c[3]);
+}
+NK_API struct nk_color
+nk_rgb(int r, int g, int b)
+{
+ struct nk_color ret;
+ ret.r = (nk_byte)NK_CLAMP(0, r, 255);
+ ret.g = (nk_byte)NK_CLAMP(0, g, 255);
+ ret.b = (nk_byte)NK_CLAMP(0, b, 255);
+ ret.a = (nk_byte)255;
+ return ret;
+}
+NK_API struct nk_color
+nk_rgb_iv(const int *c)
+{
+ return nk_rgb(c[0], c[1], c[2]);
+}
+NK_API struct nk_color
+nk_rgb_bv(const nk_byte* c)
+{
+ return nk_rgb(c[0], c[1], c[2]);
+}
+NK_API struct nk_color
+nk_rgba_u32(nk_uint in)
+{
+ struct nk_color ret;
+ ret.r = (in & 0xFF);
+ ret.g = ((in >> 8) & 0xFF);
+ ret.b = ((in >> 16) & 0xFF);
+ ret.a = (nk_byte)((in >> 24) & 0xFF);
+ return ret;
+}
+NK_API struct nk_color
+nk_rgba_f(float r, float g, float b, float a)
+{
+ struct nk_color ret;
+ ret.r = (nk_byte)(NK_SATURATE(r) * 255.0f);
+ ret.g = (nk_byte)(NK_SATURATE(g) * 255.0f);
+ ret.b = (nk_byte)(NK_SATURATE(b) * 255.0f);
+ ret.a = (nk_byte)(NK_SATURATE(a) * 255.0f);
+ return ret;
+}
+NK_API struct nk_color
+nk_rgba_fv(const float *c)
+{
+ return nk_rgba_f(c[0], c[1], c[2], c[3]);
+}
+NK_API struct nk_color
+nk_rgba_cf(struct nk_colorf c)
+{
+ return nk_rgba_f(c.r, c.g, c.b, c.a);
+}
+NK_API struct nk_color
+nk_rgb_f(float r, float g, float b)
+{
+ struct nk_color ret;
+ ret.r = (nk_byte)(NK_SATURATE(r) * 255.0f);
+ ret.g = (nk_byte)(NK_SATURATE(g) * 255.0f);
+ ret.b = (nk_byte)(NK_SATURATE(b) * 255.0f);
+ ret.a = 255;
+ return ret;
+}
+NK_API struct nk_color
+nk_rgb_fv(const float *c)
+{
+ return nk_rgb_f(c[0], c[1], c[2]);
+}
+NK_API struct nk_color
+nk_rgb_cf(struct nk_colorf c)
+{
+ return nk_rgb_f(c.r, c.g, c.b);
+}
+NK_API struct nk_color
+nk_hsv(int h, int s, int v)
+{
+ return nk_hsva(h, s, v, 255);
+}
+NK_API struct nk_color
+nk_hsv_iv(const int *c)
+{
+ return nk_hsv(c[0], c[1], c[2]);
+}
+NK_API struct nk_color
+nk_hsv_bv(const nk_byte *c)
+{
+ return nk_hsv(c[0], c[1], c[2]);
+}
+NK_API struct nk_color
+nk_hsv_f(float h, float s, float v)
+{
+ return nk_hsva_f(h, s, v, 1.0f);
+}
+NK_API struct nk_color
+nk_hsv_fv(const float *c)
+{
+ return nk_hsv_f(c[0], c[1], c[2]);
+}
+NK_API struct nk_color
+nk_hsva(int h, int s, int v, int a)
+{
+ float hf = ((float)NK_CLAMP(0, h, 255)) / 255.0f;
+ float sf = ((float)NK_CLAMP(0, s, 255)) / 255.0f;
+ float vf = ((float)NK_CLAMP(0, v, 255)) / 255.0f;
+ float af = ((float)NK_CLAMP(0, a, 255)) / 255.0f;
+ return nk_hsva_f(hf, sf, vf, af);
+}
+NK_API struct nk_color
+nk_hsva_iv(const int *c)
+{
+ return nk_hsva(c[0], c[1], c[2], c[3]);
+}
+NK_API struct nk_color
+nk_hsva_bv(const nk_byte *c)
+{
+ return nk_hsva(c[0], c[1], c[2], c[3]);
+}
+NK_API struct nk_colorf
+nk_hsva_colorf(float h, float s, float v, float a)
+{
+ int i;
+ float p, q, t, f;
+ struct nk_colorf out = {0,0,0,0};
+ if (s <= 0.0f) {
+ out.r = v; out.g = v; out.b = v; out.a = a;
+ return out;
+ }
+ h = h / (60.0f/360.0f);
+ i = (int)h;
+ f = h - (float)i;
+ p = v * (1.0f - s);
+ q = v * (1.0f - (s * f));
+ t = v * (1.0f - s * (1.0f - f));
+
+ switch (i) {
+ case 0: default: out.r = v; out.g = t; out.b = p; break;
+ case 1: out.r = q; out.g = v; out.b = p; break;
+ case 2: out.r = p; out.g = v; out.b = t; break;
+ case 3: out.r = p; out.g = q; out.b = v; break;
+ case 4: out.r = t; out.g = p; out.b = v; break;
+ case 5: out.r = v; out.g = p; out.b = q; break;}
+ out.a = a;
+ return out;
+}
+NK_API struct nk_colorf
+nk_hsva_colorfv(float *c)
+{
+ return nk_hsva_colorf(c[0], c[1], c[2], c[3]);
+}
+NK_API struct nk_color
+nk_hsva_f(float h, float s, float v, float a)
+{
+ struct nk_colorf c = nk_hsva_colorf(h, s, v, a);
+ return nk_rgba_f(c.r, c.g, c.b, c.a);
+}
+NK_API struct nk_color
+nk_hsva_fv(const float *c)
+{
+ return nk_hsva_f(c[0], c[1], c[2], c[3]);
+}
+NK_API nk_uint
+nk_color_u32(struct nk_color in)
+{
+ nk_uint out = (nk_uint)in.r;
+ out |= ((nk_uint)in.g << 8);
+ out |= ((nk_uint)in.b << 16);
+ out |= ((nk_uint)in.a << 24);
+ return out;
+}
+NK_API void
+nk_color_f(float *r, float *g, float *b, float *a, struct nk_color in)
+{
+ NK_STORAGE const float s = 1.0f/255.0f;
+ *r = (float)in.r * s;
+ *g = (float)in.g * s;
+ *b = (float)in.b * s;
+ *a = (float)in.a * s;
+}
+NK_API void
+nk_color_fv(float *c, struct nk_color in)
+{
+ nk_color_f(&c[0], &c[1], &c[2], &c[3], in);
+}
+NK_API struct nk_colorf
+nk_color_cf(struct nk_color in)
+{
+ struct nk_colorf o;
+ nk_color_f(&o.r, &o.g, &o.b, &o.a, in);
+ return o;
+}
+NK_API void
+nk_color_d(double *r, double *g, double *b, double *a, struct nk_color in)
+{
+ NK_STORAGE const double s = 1.0/255.0;
+ *r = (double)in.r * s;
+ *g = (double)in.g * s;
+ *b = (double)in.b * s;
+ *a = (double)in.a * s;
+}
+NK_API void
+nk_color_dv(double *c, struct nk_color in)
+{
+ nk_color_d(&c[0], &c[1], &c[2], &c[3], in);
+}
+NK_API void
+nk_color_hsv_f(float *out_h, float *out_s, float *out_v, struct nk_color in)
+{
+ float a;
+ nk_color_hsva_f(out_h, out_s, out_v, &a, in);
+}
+NK_API void
+nk_color_hsv_fv(float *out, struct nk_color in)
+{
+ float a;
+ nk_color_hsva_f(&out[0], &out[1], &out[2], &a, in);
+}
+NK_API void
+nk_colorf_hsva_f(float *out_h, float *out_s,
+ float *out_v, float *out_a, struct nk_colorf in)
+{
+ float chroma;
+ float K = 0.0f;
+ if (in.g < in.b) {
+ const float t = in.g; in.g = in.b; in.b = t;
+ K = -1.f;
+ }
+ if (in.r < in.g) {
+ const float t = in.r; in.r = in.g; in.g = t;
+ K = -2.f/6.0f - K;
+ }
+ chroma = in.r - ((in.g < in.b) ? in.g: in.b);
+ *out_h = NK_ABS(K + (in.g - in.b)/(6.0f * chroma + 1e-20f));
+ *out_s = chroma / (in.r + 1e-20f);
+ *out_v = in.r;
+ *out_a = in.a;
+
+}
+NK_API void
+nk_colorf_hsva_fv(float *hsva, struct nk_colorf in)
+{
+ nk_colorf_hsva_f(&hsva[0], &hsva[1], &hsva[2], &hsva[3], in);
+}
+NK_API void
+nk_color_hsva_f(float *out_h, float *out_s,
+ float *out_v, float *out_a, struct nk_color in)
+{
+ struct nk_colorf col;
+ nk_color_f(&col.r,&col.g,&col.b,&col.a, in);
+ nk_colorf_hsva_f(out_h, out_s, out_v, out_a, col);
+}
+NK_API void
+nk_color_hsva_fv(float *out, struct nk_color in)
+{
+ nk_color_hsva_f(&out[0], &out[1], &out[2], &out[3], in);
+}
+NK_API void
+nk_color_hsva_i(int *out_h, int *out_s, int *out_v,
+ int *out_a, struct nk_color in)
+{
+ float h,s,v,a;
+ nk_color_hsva_f(&h, &s, &v, &a, in);
+ *out_h = (nk_byte)(h * 255.0f);
+ *out_s = (nk_byte)(s * 255.0f);
+ *out_v = (nk_byte)(v * 255.0f);
+ *out_a = (nk_byte)(a * 255.0f);
+}
+NK_API void
+nk_color_hsva_iv(int *out, struct nk_color in)
+{
+ nk_color_hsva_i(&out[0], &out[1], &out[2], &out[3], in);
+}
+NK_API void
+nk_color_hsva_bv(nk_byte *out, struct nk_color in)
+{
+ int tmp[4];
+ nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);
+ out[0] = (nk_byte)tmp[0];
+ out[1] = (nk_byte)tmp[1];
+ out[2] = (nk_byte)tmp[2];
+ out[3] = (nk_byte)tmp[3];
+}
+NK_API void
+nk_color_hsva_b(nk_byte *h, nk_byte *s, nk_byte *v, nk_byte *a, struct nk_color in)
+{
+ int tmp[4];
+ nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);
+ *h = (nk_byte)tmp[0];
+ *s = (nk_byte)tmp[1];
+ *v = (nk_byte)tmp[2];
+ *a = (nk_byte)tmp[3];
+}
+NK_API void
+nk_color_hsv_i(int *out_h, int *out_s, int *out_v, struct nk_color in)
+{
+ int a;
+ nk_color_hsva_i(out_h, out_s, out_v, &a, in);
+}
+NK_API void
+nk_color_hsv_b(nk_byte *out_h, nk_byte *out_s, nk_byte *out_v, struct nk_color in)
+{
+ int tmp[4];
+ nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);
+ *out_h = (nk_byte)tmp[0];
+ *out_s = (nk_byte)tmp[1];
+ *out_v = (nk_byte)tmp[2];
+}
+NK_API void
+nk_color_hsv_iv(int *out, struct nk_color in)
+{
+ nk_color_hsv_i(&out[0], &out[1], &out[2], in);
+}
+NK_API void
+nk_color_hsv_bv(nk_byte *out, struct nk_color in)
+{
+ int tmp[4];
+ nk_color_hsv_i(&tmp[0], &tmp[1], &tmp[2], in);
+ out[0] = (nk_byte)tmp[0];
+ out[1] = (nk_byte)tmp[1];
+ out[2] = (nk_byte)tmp[2];
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * UTF-8
+ *
+ * ===============================================================*/
+NK_GLOBAL const nk_byte nk_utfbyte[NK_UTF_SIZE+1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
+NK_GLOBAL const nk_byte nk_utfmask[NK_UTF_SIZE+1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
+NK_GLOBAL const nk_uint nk_utfmin[NK_UTF_SIZE+1] = {0, 0, 0x80, 0x800, 0x10000};
+NK_GLOBAL const nk_uint nk_utfmax[NK_UTF_SIZE+1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
+
+NK_INTERN int
+nk_utf_validate(nk_rune *u, int i)
+{
+ NK_ASSERT(u);
+ if (!u) return 0;
+ if (!NK_BETWEEN(*u, nk_utfmin[i], nk_utfmax[i]) ||
+ NK_BETWEEN(*u, 0xD800, 0xDFFF))
+ *u = NK_UTF_INVALID;
+ for (i = 1; *u > nk_utfmax[i]; ++i);
+ return i;
+}
+NK_INTERN nk_rune
+nk_utf_decode_byte(char c, int *i)
+{
+ NK_ASSERT(i);
+ if (!i) return 0;
+ for(*i = 0; *i < (int)NK_LEN(nk_utfmask); ++(*i)) {
+ if (((nk_byte)c & nk_utfmask[*i]) == nk_utfbyte[*i])
+ return (nk_byte)(c & ~nk_utfmask[*i]);
+ }
+ return 0;
+}
+NK_API int
+nk_utf_decode(const char *c, nk_rune *u, int clen)
+{
+ int i, j, len, type=0;
+ nk_rune udecoded;
+
+ NK_ASSERT(c);
+ NK_ASSERT(u);
+
+ if (!c || !u) return 0;
+ if (!clen) return 0;
+ *u = NK_UTF_INVALID;
+
+ udecoded = nk_utf_decode_byte(c[0], &len);
+ if (!NK_BETWEEN(len, 1, NK_UTF_SIZE))
+ return 1;
+
+ for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
+ udecoded = (udecoded << 6) | nk_utf_decode_byte(c[i], &type);
+ if (type != 0)
+ return j;
+ }
+ if (j < len)
+ return 0;
+ *u = udecoded;
+ nk_utf_validate(u, len);
+ return len;
+}
+NK_INTERN char
+nk_utf_encode_byte(nk_rune u, int i)
+{
+ return (char)((nk_utfbyte[i]) | ((nk_byte)u & ~nk_utfmask[i]));
+}
+NK_API int
+nk_utf_encode(nk_rune u, char *c, int clen)
+{
+ int len, i;
+ len = nk_utf_validate(&u, 0);
+ if (clen < len || !len || len > NK_UTF_SIZE)
+ return 0;
+
+ for (i = len - 1; i != 0; --i) {
+ c[i] = nk_utf_encode_byte(u, 0);
+ u >>= 6;
+ }
+ c[0] = nk_utf_encode_byte(u, len);
+ return len;
+}
+NK_API int
+nk_utf_len(const char *str, int len)
+{
+ const char *text;
+ int glyphs = 0;
+ int text_len;
+ int glyph_len;
+ int src_len = 0;
+ nk_rune unicode;
+
+ NK_ASSERT(str);
+ if (!str || !len) return 0;
+
+ text = str;
+ text_len = len;
+ glyph_len = nk_utf_decode(text, &unicode, text_len);
+ while (glyph_len && src_len < len) {
+ glyphs++;
+ src_len = src_len + glyph_len;
+ glyph_len = nk_utf_decode(text + src_len, &unicode, text_len - src_len);
+ }
+ return glyphs;
+}
+NK_API const char*
+nk_utf_at(const char *buffer, int length, int index,
+ nk_rune *unicode, int *len)
+{
+ int i = 0;
+ int src_len = 0;
+ int glyph_len = 0;
+ const char *text;
+ int text_len;
+
+ NK_ASSERT(buffer);
+ NK_ASSERT(unicode);
+ NK_ASSERT(len);
+
+ if (!buffer || !unicode || !len) return 0;
+ if (index < 0) {
+ *unicode = NK_UTF_INVALID;
+ *len = 0;
+ return 0;
+ }
+
+ text = buffer;
+ text_len = length;
+ glyph_len = nk_utf_decode(text, unicode, text_len);
+ while (glyph_len) {
+ if (i == index) {
+ *len = glyph_len;
+ break;
+ }
+
+ i++;
+ src_len = src_len + glyph_len;
+ glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);
+ }
+ if (i != index) return 0;
+ return buffer + src_len;
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * BUFFER
+ *
+ * ===============================================================*/
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_LIB void*
+nk_malloc(nk_handle unused, void *old,nk_size size)
+{
+ NK_UNUSED(unused);
+ NK_UNUSED(old);
+ return malloc(size);
+}
+NK_LIB void
+nk_mfree(nk_handle unused, void *ptr)
+{
+ NK_UNUSED(unused);
+ free(ptr);
+}
+NK_API void
+nk_buffer_init_default(struct nk_buffer *buffer)
+{
+ struct nk_allocator alloc;
+ alloc.userdata.ptr = 0;
+ alloc.alloc = nk_malloc;
+ alloc.free = nk_mfree;
+ nk_buffer_init(buffer, &alloc, NK_BUFFER_DEFAULT_INITIAL_SIZE);
+}
+#endif
+
+NK_API void
+nk_buffer_init(struct nk_buffer *b, const struct nk_allocator *a,
+ nk_size initial_size)
+{
+ NK_ASSERT(b);
+ NK_ASSERT(a);
+ NK_ASSERT(initial_size);
+ if (!b || !a || !initial_size) return;
+
+ nk_zero(b, sizeof(*b));
+ b->type = NK_BUFFER_DYNAMIC;
+ b->memory.ptr = a->alloc(a->userdata,0, initial_size);
+ b->memory.size = initial_size;
+ b->size = initial_size;
+ b->grow_factor = 2.0f;
+ b->pool = *a;
+}
+NK_API void
+nk_buffer_init_fixed(struct nk_buffer *b, void *m, nk_size size)
+{
+ NK_ASSERT(b);
+ NK_ASSERT(m);
+ NK_ASSERT(size);
+ if (!b || !m || !size) return;
+
+ nk_zero(b, sizeof(*b));
+ b->type = NK_BUFFER_FIXED;
+ b->memory.ptr = m;
+ b->memory.size = size;
+ b->size = size;
+}
+NK_LIB void*
+nk_buffer_align(void *unaligned,
+ nk_size align, nk_size *alignment,
+ enum nk_buffer_allocation_type type)
+{
+ void *memory = 0;
+ switch (type) {
+ default:
+ case NK_BUFFER_MAX:
+ case NK_BUFFER_FRONT:
+ if (align) {
+ memory = NK_ALIGN_PTR(unaligned, align);
+ *alignment = (nk_size)((nk_byte*)memory - (nk_byte*)unaligned);
+ } else {
+ memory = unaligned;
+ *alignment = 0;
+ }
+ break;
+ case NK_BUFFER_BACK:
+ if (align) {
+ memory = NK_ALIGN_PTR_BACK(unaligned, align);
+ *alignment = (nk_size)((nk_byte*)unaligned - (nk_byte*)memory);
+ } else {
+ memory = unaligned;
+ *alignment = 0;
+ }
+ break;
+ }
+ return memory;
+}
+NK_LIB void*
+nk_buffer_realloc(struct nk_buffer *b, nk_size capacity, nk_size *size)
+{
+ void *temp;
+ nk_size buffer_size;
+
+ NK_ASSERT(b);
+ NK_ASSERT(size);
+ if (!b || !size || !b->pool.alloc || !b->pool.free)
+ return 0;
+
+ buffer_size = b->memory.size;
+ temp = b->pool.alloc(b->pool.userdata, b->memory.ptr, capacity);
+ NK_ASSERT(temp);
+ if (!temp) return 0;
+
+ *size = capacity;
+ if (temp != b->memory.ptr) {
+ NK_MEMCPY(temp, b->memory.ptr, buffer_size);
+ b->pool.free(b->pool.userdata, b->memory.ptr);
+ }
+
+ if (b->size == buffer_size) {
+ /* no back buffer so just set correct size */
+ b->size = capacity;
+ return temp;
+ } else {
+ /* copy back buffer to the end of the new buffer */
+ void *dst, *src;
+ nk_size back_size;
+ back_size = buffer_size - b->size;
+ dst = nk_ptr_add(void, temp, capacity - back_size);
+ src = nk_ptr_add(void, temp, b->size);
+ NK_MEMCPY(dst, src, back_size);
+ b->size = capacity - back_size;
+ }
+ return temp;
+}
+NK_LIB void*
+nk_buffer_alloc(struct nk_buffer *b, enum nk_buffer_allocation_type type,
+ nk_size size, nk_size align)
+{
+ int full;
+ nk_size alignment;
+ void *unaligned;
+ void *memory;
+
+ NK_ASSERT(b);
+ NK_ASSERT(size);
+ if (!b || !size) return 0;
+ b->needed += size;
+
+ /* calculate total size with needed alignment + size */
+ if (type == NK_BUFFER_FRONT)
+ unaligned = nk_ptr_add(void, b->memory.ptr, b->allocated);
+ else unaligned = nk_ptr_add(void, b->memory.ptr, b->size - size);
+ memory = nk_buffer_align(unaligned, align, &alignment, type);
+
+ /* check if buffer has enough memory*/
+ if (type == NK_BUFFER_FRONT)
+ full = ((b->allocated + size + alignment) > b->size);
+ else full = ((b->size - NK_MIN(b->size,(size + alignment))) <= b->allocated);
+
+ if (full) {
+ nk_size capacity;
+ if (b->type != NK_BUFFER_DYNAMIC)
+ return 0;
+ NK_ASSERT(b->pool.alloc && b->pool.free);
+ if (b->type != NK_BUFFER_DYNAMIC || !b->pool.alloc || !b->pool.free)
+ return 0;
+
+ /* buffer is full so allocate bigger buffer if dynamic */
+ capacity = (nk_size)((float)b->memory.size * b->grow_factor);
+ capacity = NK_MAX(capacity, nk_round_up_pow2((nk_uint)(b->allocated + size)));
+ b->memory.ptr = nk_buffer_realloc(b, capacity, &b->memory.size);
+ if (!b->memory.ptr) return 0;
+
+ /* align newly allocated pointer */
+ if (type == NK_BUFFER_FRONT)
+ unaligned = nk_ptr_add(void, b->memory.ptr, b->allocated);
+ else unaligned = nk_ptr_add(void, b->memory.ptr, b->size - size);
+ memory = nk_buffer_align(unaligned, align, &alignment, type);
+ }
+ if (type == NK_BUFFER_FRONT)
+ b->allocated += size + alignment;
+ else b->size -= (size + alignment);
+ b->needed += alignment;
+ b->calls++;
+ return memory;
+}
+NK_API void
+nk_buffer_push(struct nk_buffer *b, enum nk_buffer_allocation_type type,
+ const void *memory, nk_size size, nk_size align)
+{
+ void *mem = nk_buffer_alloc(b, type, size, align);
+ if (!mem) return;
+ NK_MEMCPY(mem, memory, size);
+}
+NK_API void
+nk_buffer_mark(struct nk_buffer *buffer, enum nk_buffer_allocation_type type)
+{
+ NK_ASSERT(buffer);
+ if (!buffer) return;
+ buffer->marker[type].active = nk_true;
+ if (type == NK_BUFFER_BACK)
+ buffer->marker[type].offset = buffer->size;
+ else buffer->marker[type].offset = buffer->allocated;
+}
+NK_API void
+nk_buffer_reset(struct nk_buffer *buffer, enum nk_buffer_allocation_type type)
+{
+ NK_ASSERT(buffer);
+ if (!buffer) return;
+ if (type == NK_BUFFER_BACK) {
+ /* reset back buffer either back to marker or empty */
+ buffer->needed -= (buffer->memory.size - buffer->marker[type].offset);
+ if (buffer->marker[type].active)
+ buffer->size = buffer->marker[type].offset;
+ else buffer->size = buffer->memory.size;
+ buffer->marker[type].active = nk_false;
+ } else {
+ /* reset front buffer either back to back marker or empty */
+ buffer->needed -= (buffer->allocated - buffer->marker[type].offset);
+ if (buffer->marker[type].active)
+ buffer->allocated = buffer->marker[type].offset;
+ else buffer->allocated = 0;
+ buffer->marker[type].active = nk_false;
+ }
+}
+NK_API void
+nk_buffer_clear(struct nk_buffer *b)
+{
+ NK_ASSERT(b);
+ if (!b) return;
+ b->allocated = 0;
+ b->size = b->memory.size;
+ b->calls = 0;
+ b->needed = 0;
+}
+NK_API void
+nk_buffer_free(struct nk_buffer *b)
+{
+ NK_ASSERT(b);
+ if (!b || !b->memory.ptr) return;
+ if (b->type == NK_BUFFER_FIXED) return;
+ if (!b->pool.free) return;
+ NK_ASSERT(b->pool.free);
+ b->pool.free(b->pool.userdata, b->memory.ptr);
+}
+NK_API void
+nk_buffer_info(struct nk_memory_status *s, struct nk_buffer *b)
+{
+ NK_ASSERT(b);
+ NK_ASSERT(s);
+ if (!s || !b) return;
+ s->allocated = b->allocated;
+ s->size = b->memory.size;
+ s->needed = b->needed;
+ s->memory = b->memory.ptr;
+ s->calls = b->calls;
+}
+NK_API void*
+nk_buffer_memory(struct nk_buffer *buffer)
+{
+ NK_ASSERT(buffer);
+ if (!buffer) return 0;
+ return buffer->memory.ptr;
+}
+NK_API const void*
+nk_buffer_memory_const(const struct nk_buffer *buffer)
+{
+ NK_ASSERT(buffer);
+ if (!buffer) return 0;
+ return buffer->memory.ptr;
+}
+NK_API nk_size
+nk_buffer_total(struct nk_buffer *buffer)
+{
+ NK_ASSERT(buffer);
+ if (!buffer) return 0;
+ return buffer->memory.size;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * STRING
+ *
+ * ===============================================================*/
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void
+nk_str_init_default(struct nk_str *str)
+{
+ struct nk_allocator alloc;
+ alloc.userdata.ptr = 0;
+ alloc.alloc = nk_malloc;
+ alloc.free = nk_mfree;
+ nk_buffer_init(&str->buffer, &alloc, 32);
+ str->len = 0;
+}
+#endif
+
+NK_API void
+nk_str_init(struct nk_str *str, const struct nk_allocator *alloc, nk_size size)
+{
+ nk_buffer_init(&str->buffer, alloc, size);
+ str->len = 0;
+}
+NK_API void
+nk_str_init_fixed(struct nk_str *str, void *memory, nk_size size)
+{
+ nk_buffer_init_fixed(&str->buffer, memory, size);
+ str->len = 0;
+}
+NK_API int
+nk_str_append_text_char(struct nk_str *s, const char *str, int len)
+{
+ char *mem;
+ NK_ASSERT(s);
+ NK_ASSERT(str);
+ if (!s || !str || !len) return 0;
+ mem = (char*)nk_buffer_alloc(&s->buffer, NK_BUFFER_FRONT, (nk_size)len * sizeof(char), 0);
+ if (!mem) return 0;
+ NK_MEMCPY(mem, str, (nk_size)len * sizeof(char));
+ s->len += nk_utf_len(str, len);
+ return len;
+}
+NK_API int
+nk_str_append_str_char(struct nk_str *s, const char *str)
+{
+ return nk_str_append_text_char(s, str, nk_strlen(str));
+}
+NK_API int
+nk_str_append_text_utf8(struct nk_str *str, const char *text, int len)
+{
+ int i = 0;
+ int byte_len = 0;
+ nk_rune unicode;
+ if (!str || !text || !len) return 0;
+ for (i = 0; i < len; ++i)
+ byte_len += nk_utf_decode(text+byte_len, &unicode, 4);
+ nk_str_append_text_char(str, text, byte_len);
+ return len;
+}
+NK_API int
+nk_str_append_str_utf8(struct nk_str *str, const char *text)
+{
+ int runes = 0;
+ int byte_len = 0;
+ int num_runes = 0;
+ int glyph_len = 0;
+ nk_rune unicode;
+ if (!str || !text) return 0;
+
+ glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);
+ while (unicode != '\0' && glyph_len) {
+ glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);
+ byte_len += glyph_len;
+ num_runes++;
+ }
+ nk_str_append_text_char(str, text, byte_len);
+ return runes;
+}
+NK_API int
+nk_str_append_text_runes(struct nk_str *str, const nk_rune *text, int len)
+{
+ int i = 0;
+ int byte_len = 0;
+ nk_glyph glyph;
+
+ NK_ASSERT(str);
+ if (!str || !text || !len) return 0;
+ for (i = 0; i < len; ++i) {
+ byte_len = nk_utf_encode(text[i], glyph, NK_UTF_SIZE);
+ if (!byte_len) break;
+ nk_str_append_text_char(str, glyph, byte_len);
+ }
+ return len;
+}
+NK_API int
+nk_str_append_str_runes(struct nk_str *str, const nk_rune *runes)
+{
+ int i = 0;
+ nk_glyph glyph;
+ int byte_len;
+ NK_ASSERT(str);
+ if (!str || !runes) return 0;
+ while (runes[i] != '\0') {
+ byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);
+ nk_str_append_text_char(str, glyph, byte_len);
+ i++;
+ }
+ return i;
+}
+NK_API int
+nk_str_insert_at_char(struct nk_str *s, int pos, const char *str, int len)
+{
+ int i;
+ void *mem;
+ char *src;
+ char *dst;
+
+ int copylen;
+ NK_ASSERT(s);
+ NK_ASSERT(str);
+ NK_ASSERT(len >= 0);
+ if (!s || !str || !len || (nk_size)pos > s->buffer.allocated) return 0;
+ if ((s->buffer.allocated + (nk_size)len >= s->buffer.memory.size) &&
+ (s->buffer.type == NK_BUFFER_FIXED)) return 0;
+
+ copylen = (int)s->buffer.allocated - pos;
+ if (!copylen) {
+ nk_str_append_text_char(s, str, len);
+ return 1;
+ }
+ mem = nk_buffer_alloc(&s->buffer, NK_BUFFER_FRONT, (nk_size)len * sizeof(char), 0);
+ if (!mem) return 0;
+
+ /* memmove */
+ NK_ASSERT(((int)pos + (int)len + ((int)copylen - 1)) >= 0);
+ NK_ASSERT(((int)pos + ((int)copylen - 1)) >= 0);
+ dst = nk_ptr_add(char, s->buffer.memory.ptr, pos + len + (copylen - 1));
+ src = nk_ptr_add(char, s->buffer.memory.ptr, pos + (copylen-1));
+ for (i = 0; i < copylen; ++i) *dst-- = *src--;
+ mem = nk_ptr_add(void, s->buffer.memory.ptr, pos);
+ NK_MEMCPY(mem, str, (nk_size)len * sizeof(char));
+ s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);
+ return 1;
+}
+NK_API int
+nk_str_insert_at_rune(struct nk_str *str, int pos, const char *cstr, int len)
+{
+ int glyph_len;
+ nk_rune unicode;
+ const char *begin;
+ const char *buffer;
+
+ NK_ASSERT(str);
+ NK_ASSERT(cstr);
+ NK_ASSERT(len);
+ if (!str || !cstr || !len) return 0;
+ begin = nk_str_at_rune(str, pos, &unicode, &glyph_len);
+ if (!str->len)
+ return nk_str_append_text_char(str, cstr, len);
+ buffer = nk_str_get_const(str);
+ if (!begin) return 0;
+ return nk_str_insert_at_char(str, (int)(begin - buffer), cstr, len);
+}
+NK_API int
+nk_str_insert_text_char(struct nk_str *str, int pos, const char *text, int len)
+{
+ return nk_str_insert_text_utf8(str, pos, text, len);
+}
+NK_API int
+nk_str_insert_str_char(struct nk_str *str, int pos, const char *text)
+{
+ return nk_str_insert_text_utf8(str, pos, text, nk_strlen(text));
+}
+NK_API int
+nk_str_insert_text_utf8(struct nk_str *str, int pos, const char *text, int len)
+{
+ int i = 0;
+ int byte_len = 0;
+ nk_rune unicode;
+
+ NK_ASSERT(str);
+ NK_ASSERT(text);
+ if (!str || !text || !len) return 0;
+ for (i = 0; i < len; ++i)
+ byte_len += nk_utf_decode(text+byte_len, &unicode, 4);
+ nk_str_insert_at_rune(str, pos, text, byte_len);
+ return len;
+}
+NK_API int
+nk_str_insert_str_utf8(struct nk_str *str, int pos, const char *text)
+{
+ int runes = 0;
+ int byte_len = 0;
+ int num_runes = 0;
+ int glyph_len = 0;
+ nk_rune unicode;
+ if (!str || !text) return 0;
+
+ glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);
+ while (unicode != '\0' && glyph_len) {
+ glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);
+ byte_len += glyph_len;
+ num_runes++;
+ }
+ nk_str_insert_at_rune(str, pos, text, byte_len);
+ return runes;
+}
+NK_API int
+nk_str_insert_text_runes(struct nk_str *str, int pos, const nk_rune *runes, int len)
+{
+ int i = 0;
+ int byte_len = 0;
+ nk_glyph glyph;
+
+ NK_ASSERT(str);
+ if (!str || !runes || !len) return 0;
+ for (i = 0; i < len; ++i) {
+ byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);
+ if (!byte_len) break;
+ nk_str_insert_at_rune(str, pos+i, glyph, byte_len);
+ }
+ return len;
+}
+NK_API int
+nk_str_insert_str_runes(struct nk_str *str, int pos, const nk_rune *runes)
+{
+ int i = 0;
+ nk_glyph glyph;
+ int byte_len;
+ NK_ASSERT(str);
+ if (!str || !runes) return 0;
+ while (runes[i] != '\0') {
+ byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);
+ nk_str_insert_at_rune(str, pos+i, glyph, byte_len);
+ i++;
+ }
+ return i;
+}
+NK_API void
+nk_str_remove_chars(struct nk_str *s, int len)
+{
+ NK_ASSERT(s);
+ NK_ASSERT(len >= 0);
+ if (!s || len < 0 || (nk_size)len > s->buffer.allocated) return;
+ NK_ASSERT(((int)s->buffer.allocated - (int)len) >= 0);
+ s->buffer.allocated -= (nk_size)len;
+ s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);
+}
+NK_API void
+nk_str_remove_runes(struct nk_str *str, int len)
+{
+ int index;
+ const char *begin;
+ const char *end;
+ nk_rune unicode;
+
+ NK_ASSERT(str);
+ NK_ASSERT(len >= 0);
+ if (!str || len < 0) return;
+ if (len >= str->len) {
+ str->len = 0;
+ return;
+ }
+
+ index = str->len - len;
+ begin = nk_str_at_rune(str, index, &unicode, &len);
+ end = (const char*)str->buffer.memory.ptr + str->buffer.allocated;
+ nk_str_remove_chars(str, (int)(end-begin)+1);
+}
+NK_API void
+nk_str_delete_chars(struct nk_str *s, int pos, int len)
+{
+ NK_ASSERT(s);
+ if (!s || !len || (nk_size)pos > s->buffer.allocated ||
+ (nk_size)(pos + len) > s->buffer.allocated) return;
+
+ if ((nk_size)(pos + len) < s->buffer.allocated) {
+ /* memmove */
+ char *dst = nk_ptr_add(char, s->buffer.memory.ptr, pos);
+ char *src = nk_ptr_add(char, s->buffer.memory.ptr, pos + len);
+ NK_MEMCPY(dst, src, s->buffer.allocated - (nk_size)(pos + len));
+ NK_ASSERT(((int)s->buffer.allocated - (int)len) >= 0);
+ s->buffer.allocated -= (nk_size)len;
+ } else nk_str_remove_chars(s, len);
+ s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);
+}
+NK_API void
+nk_str_delete_runes(struct nk_str *s, int pos, int len)
+{
+ char *temp;
+ nk_rune unicode;
+ char *begin;
+ char *end;
+ int unused;
+
+ NK_ASSERT(s);
+ NK_ASSERT(s->len >= pos + len);
+ if (s->len < pos + len)
+ len = NK_CLAMP(0, (s->len - pos), s->len);
+ if (!len) return;
+
+ temp = (char *)s->buffer.memory.ptr;
+ begin = nk_str_at_rune(s, pos, &unicode, &unused);
+ if (!begin) return;
+ s->buffer.memory.ptr = begin;
+ end = nk_str_at_rune(s, len, &unicode, &unused);
+ s->buffer.memory.ptr = temp;
+ if (!end) return;
+ nk_str_delete_chars(s, (int)(begin - temp), (int)(end - begin));
+}
+NK_API char*
+nk_str_at_char(struct nk_str *s, int pos)
+{
+ NK_ASSERT(s);
+ if (!s || pos > (int)s->buffer.allocated) return 0;
+ return nk_ptr_add(char, s->buffer.memory.ptr, pos);
+}
+NK_API char*
+nk_str_at_rune(struct nk_str *str, int pos, nk_rune *unicode, int *len)
+{
+ int i = 0;
+ int src_len = 0;
+ int glyph_len = 0;
+ char *text;
+ int text_len;
+
+ NK_ASSERT(str);
+ NK_ASSERT(unicode);
+ NK_ASSERT(len);
+
+ if (!str || !unicode || !len) return 0;
+ if (pos < 0) {
+ *unicode = 0;
+ *len = 0;
+ return 0;
+ }
+
+ text = (char*)str->buffer.memory.ptr;
+ text_len = (int)str->buffer.allocated;
+ glyph_len = nk_utf_decode(text, unicode, text_len);
+ while (glyph_len) {
+ if (i == pos) {
+ *len = glyph_len;
+ break;
+ }
+
+ i++;
+ src_len = src_len + glyph_len;
+ glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);
+ }
+ if (i != pos) return 0;
+ return text + src_len;
+}
+NK_API const char*
+nk_str_at_char_const(const struct nk_str *s, int pos)
+{
+ NK_ASSERT(s);
+ if (!s || pos > (int)s->buffer.allocated) return 0;
+ return nk_ptr_add(char, s->buffer.memory.ptr, pos);
+}
+NK_API const char*
+nk_str_at_const(const struct nk_str *str, int pos, nk_rune *unicode, int *len)
+{
+ int i = 0;
+ int src_len = 0;
+ int glyph_len = 0;
+ char *text;
+ int text_len;
+
+ NK_ASSERT(str);
+ NK_ASSERT(unicode);
+ NK_ASSERT(len);
+
+ if (!str || !unicode || !len) return 0;
+ if (pos < 0) {
+ *unicode = 0;
+ *len = 0;
+ return 0;
+ }
+
+ text = (char*)str->buffer.memory.ptr;
+ text_len = (int)str->buffer.allocated;
+ glyph_len = nk_utf_decode(text, unicode, text_len);
+ while (glyph_len) {
+ if (i == pos) {
+ *len = glyph_len;
+ break;
+ }
+
+ i++;
+ src_len = src_len + glyph_len;
+ glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);
+ }
+ if (i != pos) return 0;
+ return text + src_len;
+}
+NK_API nk_rune
+nk_str_rune_at(const struct nk_str *str, int pos)
+{
+ int len;
+ nk_rune unicode = 0;
+ nk_str_at_const(str, pos, &unicode, &len);
+ return unicode;
+}
+NK_API char*
+nk_str_get(struct nk_str *s)
+{
+ NK_ASSERT(s);
+ if (!s || !s->len || !s->buffer.allocated) return 0;
+ return (char*)s->buffer.memory.ptr;
+}
+NK_API const char*
+nk_str_get_const(const struct nk_str *s)
+{
+ NK_ASSERT(s);
+ if (!s || !s->len || !s->buffer.allocated) return 0;
+ return (const char*)s->buffer.memory.ptr;
+}
+NK_API int
+nk_str_len(struct nk_str *s)
+{
+ NK_ASSERT(s);
+ if (!s || !s->len || !s->buffer.allocated) return 0;
+ return s->len;
+}
+NK_API int
+nk_str_len_char(struct nk_str *s)
+{
+ NK_ASSERT(s);
+ if (!s || !s->len || !s->buffer.allocated) return 0;
+ return (int)s->buffer.allocated;
+}
+NK_API void
+nk_str_clear(struct nk_str *str)
+{
+ NK_ASSERT(str);
+ nk_buffer_clear(&str->buffer);
+ str->len = 0;
+}
+NK_API void
+nk_str_free(struct nk_str *str)
+{
+ NK_ASSERT(str);
+ nk_buffer_free(&str->buffer);
+ str->len = 0;
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * DRAW
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_command_buffer_init(struct nk_command_buffer *cb,
+ struct nk_buffer *b, enum nk_command_clipping clip)
+{
+ NK_ASSERT(cb);
+ NK_ASSERT(b);
+ if (!cb || !b) return;
+ cb->base = b;
+ cb->use_clipping = (int)clip;
+ cb->begin = b->allocated;
+ cb->end = b->allocated;
+ cb->last = b->allocated;
+}
+NK_LIB void
+nk_command_buffer_reset(struct nk_command_buffer *b)
+{
+ NK_ASSERT(b);
+ if (!b) return;
+ b->begin = 0;
+ b->end = 0;
+ b->last = 0;
+ b->clip = nk_null_rect;
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ b->userdata.ptr = 0;
+#endif
+}
+NK_LIB void*
+nk_command_buffer_push(struct nk_command_buffer* b,
+ enum nk_command_type t, nk_size size)
+{
+ NK_STORAGE const nk_size align = NK_ALIGNOF(struct nk_command);
+ struct nk_command *cmd;
+ nk_size alignment;
+ void *unaligned;
+ void *memory;
+
+ NK_ASSERT(b);
+ NK_ASSERT(b->base);
+ if (!b) return 0;
+ cmd = (struct nk_command*)nk_buffer_alloc(b->base,NK_BUFFER_FRONT,size,align);
+ if (!cmd) return 0;
+
+ /* make sure the offset to the next command is aligned */
+ b->last = (nk_size)((nk_byte*)cmd - (nk_byte*)b->base->memory.ptr);
+ unaligned = (nk_byte*)cmd + size;
+ memory = NK_ALIGN_PTR(unaligned, align);
+ alignment = (nk_size)((nk_byte*)memory - (nk_byte*)unaligned);
+#ifdef NK_ZERO_COMMAND_MEMORY
+ NK_MEMSET(cmd, 0, size + alignment);
+#endif
+
+ cmd->type = t;
+ cmd->next = b->base->allocated + alignment;
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ cmd->userdata = b->userdata;
+#endif
+ b->end = cmd->next;
+ return cmd;
+}
+NK_API void
+nk_push_scissor(struct nk_command_buffer *b, struct nk_rect r)
+{
+ struct nk_command_scissor *cmd;
+ NK_ASSERT(b);
+ if (!b) return;
+
+ b->clip.x = r.x;
+ b->clip.y = r.y;
+ b->clip.w = r.w;
+ b->clip.h = r.h;
+ cmd = (struct nk_command_scissor*)
+ nk_command_buffer_push(b, NK_COMMAND_SCISSOR, sizeof(*cmd));
+
+ if (!cmd) return;
+ cmd->x = (short)r.x;
+ cmd->y = (short)r.y;
+ cmd->w = (unsigned short)NK_MAX(0, r.w);
+ cmd->h = (unsigned short)NK_MAX(0, r.h);
+}
+NK_API void
+nk_stroke_line(struct nk_command_buffer *b, float x0, float y0,
+ float x1, float y1, float line_thickness, struct nk_color c)
+{
+ struct nk_command_line *cmd;
+ NK_ASSERT(b);
+ if (!b || line_thickness <= 0) return;
+ cmd = (struct nk_command_line*)
+ nk_command_buffer_push(b, NK_COMMAND_LINE, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->begin.x = (short)x0;
+ cmd->begin.y = (short)y0;
+ cmd->end.x = (short)x1;
+ cmd->end.y = (short)y1;
+ cmd->color = c;
+}
+NK_API void
+nk_stroke_curve(struct nk_command_buffer *b, float ax, float ay,
+ float ctrl0x, float ctrl0y, float ctrl1x, float ctrl1y,
+ float bx, float by, float line_thickness, struct nk_color col)
+{
+ struct nk_command_curve *cmd;
+ NK_ASSERT(b);
+ if (!b || col.a == 0 || line_thickness <= 0) return;
+
+ cmd = (struct nk_command_curve*)
+ nk_command_buffer_push(b, NK_COMMAND_CURVE, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->begin.x = (short)ax;
+ cmd->begin.y = (short)ay;
+ cmd->ctrl[0].x = (short)ctrl0x;
+ cmd->ctrl[0].y = (short)ctrl0y;
+ cmd->ctrl[1].x = (short)ctrl1x;
+ cmd->ctrl[1].y = (short)ctrl1y;
+ cmd->end.x = (short)bx;
+ cmd->end.y = (short)by;
+ cmd->color = col;
+}
+NK_API void
+nk_stroke_rect(struct nk_command_buffer *b, struct nk_rect rect,
+ float rounding, float line_thickness, struct nk_color c)
+{
+ struct nk_command_rect *cmd;
+ NK_ASSERT(b);
+ if (!b || c.a == 0 || rect.w == 0 || rect.h == 0 || line_thickness <= 0) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,
+ clip->x, clip->y, clip->w, clip->h)) return;
+ }
+ cmd = (struct nk_command_rect*)
+ nk_command_buffer_push(b, NK_COMMAND_RECT, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->rounding = (unsigned short)rounding;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->x = (short)rect.x;
+ cmd->y = (short)rect.y;
+ cmd->w = (unsigned short)NK_MAX(0, rect.w);
+ cmd->h = (unsigned short)NK_MAX(0, rect.h);
+ cmd->color = c;
+}
+NK_API void
+nk_fill_rect(struct nk_command_buffer *b, struct nk_rect rect,
+ float rounding, struct nk_color c)
+{
+ struct nk_command_rect_filled *cmd;
+ NK_ASSERT(b);
+ if (!b || c.a == 0 || rect.w == 0 || rect.h == 0) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,
+ clip->x, clip->y, clip->w, clip->h)) return;
+ }
+
+ cmd = (struct nk_command_rect_filled*)
+ nk_command_buffer_push(b, NK_COMMAND_RECT_FILLED, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->rounding = (unsigned short)rounding;
+ cmd->x = (short)rect.x;
+ cmd->y = (short)rect.y;
+ cmd->w = (unsigned short)NK_MAX(0, rect.w);
+ cmd->h = (unsigned short)NK_MAX(0, rect.h);
+ cmd->color = c;
+}
+NK_API void
+nk_fill_rect_multi_color(struct nk_command_buffer *b, struct nk_rect rect,
+ struct nk_color left, struct nk_color top, struct nk_color right,
+ struct nk_color bottom)
+{
+ struct nk_command_rect_multi_color *cmd;
+ NK_ASSERT(b);
+ if (!b || rect.w == 0 || rect.h == 0) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,
+ clip->x, clip->y, clip->w, clip->h)) return;
+ }
+
+ cmd = (struct nk_command_rect_multi_color*)
+ nk_command_buffer_push(b, NK_COMMAND_RECT_MULTI_COLOR, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->x = (short)rect.x;
+ cmd->y = (short)rect.y;
+ cmd->w = (unsigned short)NK_MAX(0, rect.w);
+ cmd->h = (unsigned short)NK_MAX(0, rect.h);
+ cmd->left = left;
+ cmd->top = top;
+ cmd->right = right;
+ cmd->bottom = bottom;
+}
+NK_API void
+nk_stroke_circle(struct nk_command_buffer *b, struct nk_rect r,
+ float line_thickness, struct nk_color c)
+{
+ struct nk_command_circle *cmd;
+ if (!b || r.w == 0 || r.h == 0 || line_thickness <= 0) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INTERSECT(r.x, r.y, r.w, r.h, clip->x, clip->y, clip->w, clip->h))
+ return;
+ }
+
+ cmd = (struct nk_command_circle*)
+ nk_command_buffer_push(b, NK_COMMAND_CIRCLE, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->x = (short)r.x;
+ cmd->y = (short)r.y;
+ cmd->w = (unsigned short)NK_MAX(r.w, 0);
+ cmd->h = (unsigned short)NK_MAX(r.h, 0);
+ cmd->color = c;
+}
+NK_API void
+nk_fill_circle(struct nk_command_buffer *b, struct nk_rect r, struct nk_color c)
+{
+ struct nk_command_circle_filled *cmd;
+ NK_ASSERT(b);
+ if (!b || c.a == 0 || r.w == 0 || r.h == 0) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INTERSECT(r.x, r.y, r.w, r.h, clip->x, clip->y, clip->w, clip->h))
+ return;
+ }
+
+ cmd = (struct nk_command_circle_filled*)
+ nk_command_buffer_push(b, NK_COMMAND_CIRCLE_FILLED, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->x = (short)r.x;
+ cmd->y = (short)r.y;
+ cmd->w = (unsigned short)NK_MAX(r.w, 0);
+ cmd->h = (unsigned short)NK_MAX(r.h, 0);
+ cmd->color = c;
+}
+NK_API void
+nk_stroke_arc(struct nk_command_buffer *b, float cx, float cy, float radius,
+ float a_min, float a_max, float line_thickness, struct nk_color c)
+{
+ struct nk_command_arc *cmd;
+ if (!b || c.a == 0 || line_thickness <= 0) return;
+ cmd = (struct nk_command_arc*)
+ nk_command_buffer_push(b, NK_COMMAND_ARC, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->cx = (short)cx;
+ cmd->cy = (short)cy;
+ cmd->r = (unsigned short)radius;
+ cmd->a[0] = a_min;
+ cmd->a[1] = a_max;
+ cmd->color = c;
+}
+NK_API void
+nk_fill_arc(struct nk_command_buffer *b, float cx, float cy, float radius,
+ float a_min, float a_max, struct nk_color c)
+{
+ struct nk_command_arc_filled *cmd;
+ NK_ASSERT(b);
+ if (!b || c.a == 0) return;
+ cmd = (struct nk_command_arc_filled*)
+ nk_command_buffer_push(b, NK_COMMAND_ARC_FILLED, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->cx = (short)cx;
+ cmd->cy = (short)cy;
+ cmd->r = (unsigned short)radius;
+ cmd->a[0] = a_min;
+ cmd->a[1] = a_max;
+ cmd->color = c;
+}
+NK_API void
+nk_stroke_triangle(struct nk_command_buffer *b, float x0, float y0, float x1,
+ float y1, float x2, float y2, float line_thickness, struct nk_color c)
+{
+ struct nk_command_triangle *cmd;
+ NK_ASSERT(b);
+ if (!b || c.a == 0 || line_thickness <= 0) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INBOX(x0, y0, clip->x, clip->y, clip->w, clip->h) &&
+ !NK_INBOX(x1, y1, clip->x, clip->y, clip->w, clip->h) &&
+ !NK_INBOX(x2, y2, clip->x, clip->y, clip->w, clip->h))
+ return;
+ }
+
+ cmd = (struct nk_command_triangle*)
+ nk_command_buffer_push(b, NK_COMMAND_TRIANGLE, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->a.x = (short)x0;
+ cmd->a.y = (short)y0;
+ cmd->b.x = (short)x1;
+ cmd->b.y = (short)y1;
+ cmd->c.x = (short)x2;
+ cmd->c.y = (short)y2;
+ cmd->color = c;
+}
+NK_API void
+nk_fill_triangle(struct nk_command_buffer *b, float x0, float y0, float x1,
+ float y1, float x2, float y2, struct nk_color c)
+{
+ struct nk_command_triangle_filled *cmd;
+ NK_ASSERT(b);
+ if (!b || c.a == 0) return;
+ if (!b) return;
+ if (b->use_clipping) {
+ const struct nk_rect *clip = &b->clip;
+ if (!NK_INBOX(x0, y0, clip->x, clip->y, clip->w, clip->h) &&
+ !NK_INBOX(x1, y1, clip->x, clip->y, clip->w, clip->h) &&
+ !NK_INBOX(x2, y2, clip->x, clip->y, clip->w, clip->h))
+ return;
+ }
+
+ cmd = (struct nk_command_triangle_filled*)
+ nk_command_buffer_push(b, NK_COMMAND_TRIANGLE_FILLED, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->a.x = (short)x0;
+ cmd->a.y = (short)y0;
+ cmd->b.x = (short)x1;
+ cmd->b.y = (short)y1;
+ cmd->c.x = (short)x2;
+ cmd->c.y = (short)y2;
+ cmd->color = c;
+}
+NK_API void
+nk_stroke_polygon(struct nk_command_buffer *b, float *points, int point_count,
+ float line_thickness, struct nk_color col)
+{
+ int i;
+ nk_size size = 0;
+ struct nk_command_polygon *cmd;
+
+ NK_ASSERT(b);
+ if (!b || col.a == 0 || line_thickness <= 0) return;
+ size = sizeof(*cmd) + sizeof(short) * 2 * (nk_size)point_count;
+ cmd = (struct nk_command_polygon*) nk_command_buffer_push(b, NK_COMMAND_POLYGON, size);
+ if (!cmd) return;
+ cmd->color = col;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ cmd->point_count = (unsigned short)point_count;
+ for (i = 0; i < point_count; ++i) {
+ cmd->points[i].x = (short)points[i*2];
+ cmd->points[i].y = (short)points[i*2+1];
+ }
+}
+NK_API void
+nk_fill_polygon(struct nk_command_buffer *b, float *points, int point_count,
+ struct nk_color col)
+{
+ int i;
+ nk_size size = 0;
+ struct nk_command_polygon_filled *cmd;
+
+ NK_ASSERT(b);
+ if (!b || col.a == 0) return;
+ size = sizeof(*cmd) + sizeof(short) * 2 * (nk_size)point_count;
+ cmd = (struct nk_command_polygon_filled*)
+ nk_command_buffer_push(b, NK_COMMAND_POLYGON_FILLED, size);
+ if (!cmd) return;
+ cmd->color = col;
+ cmd->point_count = (unsigned short)point_count;
+ for (i = 0; i < point_count; ++i) {
+ cmd->points[i].x = (short)points[i*2+0];
+ cmd->points[i].y = (short)points[i*2+1];
+ }
+}
+NK_API void
+nk_stroke_polyline(struct nk_command_buffer *b, float *points, int point_count,
+ float line_thickness, struct nk_color col)
+{
+ int i;
+ nk_size size = 0;
+ struct nk_command_polyline *cmd;
+
+ NK_ASSERT(b);
+ if (!b || col.a == 0 || line_thickness <= 0) return;
+ size = sizeof(*cmd) + sizeof(short) * 2 * (nk_size)point_count;
+ cmd = (struct nk_command_polyline*) nk_command_buffer_push(b, NK_COMMAND_POLYLINE, size);
+ if (!cmd) return;
+ cmd->color = col;
+ cmd->point_count = (unsigned short)point_count;
+ cmd->line_thickness = (unsigned short)line_thickness;
+ for (i = 0; i < point_count; ++i) {
+ cmd->points[i].x = (short)points[i*2];
+ cmd->points[i].y = (short)points[i*2+1];
+ }
+}
+NK_API void
+nk_draw_image(struct nk_command_buffer *b, struct nk_rect r,
+ const struct nk_image *img, struct nk_color col)
+{
+ struct nk_command_image *cmd;
+ NK_ASSERT(b);
+ if (!b) return;
+ if (b->use_clipping) {
+ const struct nk_rect *c = &b->clip;
+ if (c->w == 0 || c->h == 0 || !NK_INTERSECT(r.x, r.y, r.w, r.h, c->x, c->y, c->w, c->h))
+ return;
+ }
+
+ cmd = (struct nk_command_image*)
+ nk_command_buffer_push(b, NK_COMMAND_IMAGE, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->x = (short)r.x;
+ cmd->y = (short)r.y;
+ cmd->w = (unsigned short)NK_MAX(0, r.w);
+ cmd->h = (unsigned short)NK_MAX(0, r.h);
+ cmd->img = *img;
+ cmd->col = col;
+}
+NK_API void
+nk_push_custom(struct nk_command_buffer *b, struct nk_rect r,
+ nk_command_custom_callback cb, nk_handle usr)
+{
+ struct nk_command_custom *cmd;
+ NK_ASSERT(b);
+ if (!b) return;
+ if (b->use_clipping) {
+ const struct nk_rect *c = &b->clip;
+ if (c->w == 0 || c->h == 0 || !NK_INTERSECT(r.x, r.y, r.w, r.h, c->x, c->y, c->w, c->h))
+ return;
+ }
+
+ cmd = (struct nk_command_custom*)
+ nk_command_buffer_push(b, NK_COMMAND_CUSTOM, sizeof(*cmd));
+ if (!cmd) return;
+ cmd->x = (short)r.x;
+ cmd->y = (short)r.y;
+ cmd->w = (unsigned short)NK_MAX(0, r.w);
+ cmd->h = (unsigned short)NK_MAX(0, r.h);
+ cmd->callback_data = usr;
+ cmd->callback = cb;
+}
+NK_API void
+nk_draw_text(struct nk_command_buffer *b, struct nk_rect r,
+ const char *string, int length, const struct nk_user_font *font,
+ struct nk_color bg, struct nk_color fg)
+{
+ float text_width = 0;
+ struct nk_command_text *cmd;
+
+ NK_ASSERT(b);
+ NK_ASSERT(font);
+ if (!b || !string || !length || (bg.a == 0 && fg.a == 0)) return;
+ if (b->use_clipping) {
+ const struct nk_rect *c = &b->clip;
+ if (c->w == 0 || c->h == 0 || !NK_INTERSECT(r.x, r.y, r.w, r.h, c->x, c->y, c->w, c->h))
+ return;
+ }
+
+ /* make sure text fits inside bounds */
+ text_width = font->width(font->userdata, font->height, string, length);
+ if (text_width > r.w){
+ int glyphs = 0;
+ float txt_width = (float)text_width;
+ length = nk_text_clamp(font, string, length, r.w, &glyphs, &txt_width, 0,0);
+ }
+
+ if (!length) return;
+ cmd = (struct nk_command_text*)
+ nk_command_buffer_push(b, NK_COMMAND_TEXT, sizeof(*cmd) + (nk_size)(length + 1));
+ if (!cmd) return;
+ cmd->x = (short)r.x;
+ cmd->y = (short)r.y;
+ cmd->w = (unsigned short)r.w;
+ cmd->h = (unsigned short)r.h;
+ cmd->background = bg;
+ cmd->foreground = fg;
+ cmd->font = font;
+ cmd->length = length;
+ cmd->height = font->height;
+ NK_MEMCPY(cmd->string, string, (nk_size)length);
+ cmd->string[length] = '\0';
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * VERTEX
+ *
+ * ===============================================================*/
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+NK_API void
+nk_draw_list_init(struct nk_draw_list *list)
+{
+ nk_size i = 0;
+ NK_ASSERT(list);
+ if (!list) return;
+ nk_zero(list, sizeof(*list));
+ for (i = 0; i < NK_LEN(list->circle_vtx); ++i) {
+ const float a = ((float)i / (float)NK_LEN(list->circle_vtx)) * 2 * NK_PI;
+ list->circle_vtx[i].x = (float)NK_COS(a);
+ list->circle_vtx[i].y = (float)NK_SIN(a);
+ }
+}
+NK_API void
+nk_draw_list_setup(struct nk_draw_list *canvas, const struct nk_convert_config *config,
+ struct nk_buffer *cmds, struct nk_buffer *vertices, struct nk_buffer *elements,
+ enum nk_anti_aliasing line_aa, enum nk_anti_aliasing shape_aa)
+{
+ NK_ASSERT(canvas);
+ NK_ASSERT(config);
+ NK_ASSERT(cmds);
+ NK_ASSERT(vertices);
+ NK_ASSERT(elements);
+ if (!canvas || !config || !cmds || !vertices || !elements)
+ return;
+
+ canvas->buffer = cmds;
+ canvas->config = *config;
+ canvas->elements = elements;
+ canvas->vertices = vertices;
+ canvas->line_AA = line_aa;
+ canvas->shape_AA = shape_aa;
+ canvas->clip_rect = nk_null_rect;
+
+ canvas->cmd_offset = 0;
+ canvas->element_count = 0;
+ canvas->vertex_count = 0;
+ canvas->cmd_offset = 0;
+ canvas->cmd_count = 0;
+ canvas->path_count = 0;
+}
+NK_API const struct nk_draw_command*
+nk__draw_list_begin(const struct nk_draw_list *canvas, const struct nk_buffer *buffer)
+{
+ nk_byte *memory;
+ nk_size offset;
+ const struct nk_draw_command *cmd;
+
+ NK_ASSERT(buffer);
+ if (!buffer || !buffer->size || !canvas->cmd_count)
+ return 0;
+
+ memory = (nk_byte*)buffer->memory.ptr;
+ offset = buffer->memory.size - canvas->cmd_offset;
+ cmd = nk_ptr_add(const struct nk_draw_command, memory, offset);
+ return cmd;
+}
+NK_API const struct nk_draw_command*
+nk__draw_list_end(const struct nk_draw_list *canvas, const struct nk_buffer *buffer)
+{
+ nk_size size;
+ nk_size offset;
+ nk_byte *memory;
+ const struct nk_draw_command *end;
+
+ NK_ASSERT(buffer);
+ NK_ASSERT(canvas);
+ if (!buffer || !canvas)
+ return 0;
+
+ memory = (nk_byte*)buffer->memory.ptr;
+ size = buffer->memory.size;
+ offset = size - canvas->cmd_offset;
+ end = nk_ptr_add(const struct nk_draw_command, memory, offset);
+ end -= (canvas->cmd_count-1);
+ return end;
+}
+NK_API const struct nk_draw_command*
+nk__draw_list_next(const struct nk_draw_command *cmd,
+ const struct nk_buffer *buffer, const struct nk_draw_list *canvas)
+{
+ const struct nk_draw_command *end;
+ NK_ASSERT(buffer);
+ NK_ASSERT(canvas);
+ if (!cmd || !buffer || !canvas)
+ return 0;
+
+ end = nk__draw_list_end(canvas, buffer);
+ if (cmd <= end) return 0;
+ return (cmd-1);
+}
+NK_INTERN struct nk_vec2*
+nk_draw_list_alloc_path(struct nk_draw_list *list, int count)
+{
+ struct nk_vec2 *points;
+ NK_STORAGE const nk_size point_align = NK_ALIGNOF(struct nk_vec2);
+ NK_STORAGE const nk_size point_size = sizeof(struct nk_vec2);
+ points = (struct nk_vec2*)
+ nk_buffer_alloc(list->buffer, NK_BUFFER_FRONT,
+ point_size * (nk_size)count, point_align);
+
+ if (!points) return 0;
+ if (!list->path_offset) {
+ void *memory = nk_buffer_memory(list->buffer);
+ list->path_offset = (unsigned int)((nk_byte*)points - (nk_byte*)memory);
+ }
+ list->path_count += (unsigned int)count;
+ return points;
+}
+NK_INTERN struct nk_vec2
+nk_draw_list_path_last(struct nk_draw_list *list)
+{
+ void *memory;
+ struct nk_vec2 *point;
+ NK_ASSERT(list->path_count);
+ memory = nk_buffer_memory(list->buffer);
+ point = nk_ptr_add(struct nk_vec2, memory, list->path_offset);
+ point += (list->path_count-1);
+ return *point;
+}
+NK_INTERN struct nk_draw_command*
+nk_draw_list_push_command(struct nk_draw_list *list, struct nk_rect clip,
+ nk_handle texture)
+{
+ NK_STORAGE const nk_size cmd_align = NK_ALIGNOF(struct nk_draw_command);
+ NK_STORAGE const nk_size cmd_size = sizeof(struct nk_draw_command);
+ struct nk_draw_command *cmd;
+
+ NK_ASSERT(list);
+ cmd = (struct nk_draw_command*)
+ nk_buffer_alloc(list->buffer, NK_BUFFER_BACK, cmd_size, cmd_align);
+
+ if (!cmd) return 0;
+ if (!list->cmd_count) {
+ nk_byte *memory = (nk_byte*)nk_buffer_memory(list->buffer);
+ nk_size total = nk_buffer_total(list->buffer);
+ memory = nk_ptr_add(nk_byte, memory, total);
+ list->cmd_offset = (nk_size)(memory - (nk_byte*)cmd);
+ }
+
+ cmd->elem_count = 0;
+ cmd->clip_rect = clip;
+ cmd->texture = texture;
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ cmd->userdata = list->userdata;
+#endif
+
+ list->cmd_count++;
+ list->clip_rect = clip;
+ return cmd;
+}
+NK_INTERN struct nk_draw_command*
+nk_draw_list_command_last(struct nk_draw_list *list)
+{
+ void *memory;
+ nk_size size;
+ struct nk_draw_command *cmd;
+ NK_ASSERT(list->cmd_count);
+
+ memory = nk_buffer_memory(list->buffer);
+ size = nk_buffer_total(list->buffer);
+ cmd = nk_ptr_add(struct nk_draw_command, memory, size - list->cmd_offset);
+ return (cmd - (list->cmd_count-1));
+}
+NK_INTERN void
+nk_draw_list_add_clip(struct nk_draw_list *list, struct nk_rect rect)
+{
+ NK_ASSERT(list);
+ if (!list) return;
+ if (!list->cmd_count) {
+ nk_draw_list_push_command(list, rect, list->config.null.texture);
+ } else {
+ struct nk_draw_command *prev = nk_draw_list_command_last(list);
+ if (prev->elem_count == 0)
+ prev->clip_rect = rect;
+ nk_draw_list_push_command(list, rect, prev->texture);
+ }
+}
+NK_INTERN void
+nk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)
+{
+ NK_ASSERT(list);
+ if (!list) return;
+ if (!list->cmd_count) {
+ nk_draw_list_push_command(list, nk_null_rect, texture);
+ } else {
+ struct nk_draw_command *prev = nk_draw_list_command_last(list);
+ if (prev->elem_count == 0) {
+ prev->texture = texture;
+ #ifdef NK_INCLUDE_COMMAND_USERDATA
+ prev->userdata = list->userdata;
+ #endif
+ } else if (prev->texture.id != texture.id
+ #ifdef NK_INCLUDE_COMMAND_USERDATA
+ || prev->userdata.id != list->userdata.id
+ #endif
+ ) nk_draw_list_push_command(list, prev->clip_rect, texture);
+ }
+}
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+NK_API void
+nk_draw_list_push_userdata(struct nk_draw_list *list, nk_handle userdata)
+{
+ list->userdata = userdata;
+}
+#endif
+NK_INTERN void*
+nk_draw_list_alloc_vertices(struct nk_draw_list *list, nk_size count)
+{
+ void *vtx;
+ NK_ASSERT(list);
+ if (!list) return 0;
+ vtx = nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT,
+ list->config.vertex_size*count, list->config.vertex_alignment);
+ if (!vtx) return 0;
+ list->vertex_count += (unsigned int)count;
+
+ /* This assert triggers because your are drawing a lot of stuff and nuklear
+ * defined `nk_draw_index` as `nk_ushort` to safe space be default.
+ *
+ * So you reached the maximum number of indicies or rather vertexes.
+ * To solve this issue please change typdef `nk_draw_index` to `nk_uint`
+ * and don't forget to specify the new element size in your drawing
+ * backend (OpenGL, DirectX, ...). For example in OpenGL for `glDrawElements`
+ * instead of specifing `GL_UNSIGNED_SHORT` you have to define `GL_UNSIGNED_INT`.
+ * Sorry for the inconvenience. */
+ NK_ASSERT((sizeof(nk_draw_index) == 2 && list->vertex_count < NK_USHORT_MAX &&
+ "To many verticies for 16-bit vertex indicies. Please read comment above on how to solve this problem"));
+ return vtx;
+}
+NK_INTERN nk_draw_index*
+nk_draw_list_alloc_elements(struct nk_draw_list *list, nk_size count)
+{
+ nk_draw_index *ids;
+ struct nk_draw_command *cmd;
+ NK_STORAGE const nk_size elem_align = NK_ALIGNOF(nk_draw_index);
+ NK_STORAGE const nk_size elem_size = sizeof(nk_draw_index);
+ NK_ASSERT(list);
+ if (!list) return 0;
+
+ ids = (nk_draw_index*)
+ nk_buffer_alloc(list->elements, NK_BUFFER_FRONT, elem_size*count, elem_align);
+ if (!ids) return 0;
+ cmd = nk_draw_list_command_last(list);
+ list->element_count += (unsigned int)count;
+ cmd->elem_count += (unsigned int)count;
+ return ids;
+}
+NK_INTERN int
+nk_draw_vertex_layout_element_is_end_of_layout(
+ const struct nk_draw_vertex_layout_element *element)
+{
+ return (element->attribute == NK_VERTEX_ATTRIBUTE_COUNT ||
+ element->format == NK_FORMAT_COUNT);
+}
+NK_INTERN void
+nk_draw_vertex_color(void *attr, const float *vals,
+ enum nk_draw_vertex_layout_format format)
+{
+ /* if this triggers you tried to provide a value format for a color */
+ float val[4];
+ NK_ASSERT(format >= NK_FORMAT_COLOR_BEGIN);
+ NK_ASSERT(format <= NK_FORMAT_COLOR_END);
+ if (format < NK_FORMAT_COLOR_BEGIN || format > NK_FORMAT_COLOR_END) return;
+
+ val[0] = NK_SATURATE(vals[0]);
+ val[1] = NK_SATURATE(vals[1]);
+ val[2] = NK_SATURATE(vals[2]);
+ val[3] = NK_SATURATE(vals[3]);
+
+ switch (format) {
+ default: NK_ASSERT(0 && "Invalid vertex layout color format"); break;
+ case NK_FORMAT_R8G8B8A8:
+ case NK_FORMAT_R8G8B8: {
+ struct nk_color col = nk_rgba_fv(val);
+ NK_MEMCPY(attr, &col.r, sizeof(col));
+ } break;
+ case NK_FORMAT_B8G8R8A8: {
+ struct nk_color col = nk_rgba_fv(val);
+ struct nk_color bgra = nk_rgba(col.b, col.g, col.r, col.a);
+ NK_MEMCPY(attr, &bgra, sizeof(bgra));
+ } break;
+ case NK_FORMAT_R16G15B16: {
+ nk_ushort col[3];
+ col[0] = (nk_ushort)(val[0]*(float)NK_USHORT_MAX);
+ col[1] = (nk_ushort)(val[1]*(float)NK_USHORT_MAX);
+ col[2] = (nk_ushort)(val[2]*(float)NK_USHORT_MAX);
+ NK_MEMCPY(attr, col, sizeof(col));
+ } break;
+ case NK_FORMAT_R16G15B16A16: {
+ nk_ushort col[4];
+ col[0] = (nk_ushort)(val[0]*(float)NK_USHORT_MAX);
+ col[1] = (nk_ushort)(val[1]*(float)NK_USHORT_MAX);
+ col[2] = (nk_ushort)(val[2]*(float)NK_USHORT_MAX);
+ col[3] = (nk_ushort)(val[3]*(float)NK_USHORT_MAX);
+ NK_MEMCPY(attr, col, sizeof(col));
+ } break;
+ case NK_FORMAT_R32G32B32: {
+ nk_uint col[3];
+ col[0] = (nk_uint)(val[0]*(float)NK_UINT_MAX);
+ col[1] = (nk_uint)(val[1]*(float)NK_UINT_MAX);
+ col[2] = (nk_uint)(val[2]*(float)NK_UINT_MAX);
+ NK_MEMCPY(attr, col, sizeof(col));
+ } break;
+ case NK_FORMAT_R32G32B32A32: {
+ nk_uint col[4];
+ col[0] = (nk_uint)(val[0]*(float)NK_UINT_MAX);
+ col[1] = (nk_uint)(val[1]*(float)NK_UINT_MAX);
+ col[2] = (nk_uint)(val[2]*(float)NK_UINT_MAX);
+ col[3] = (nk_uint)(val[3]*(float)NK_UINT_MAX);
+ NK_MEMCPY(attr, col, sizeof(col));
+ } break;
+ case NK_FORMAT_R32G32B32A32_FLOAT:
+ NK_MEMCPY(attr, val, sizeof(float)*4);
+ break;
+ case NK_FORMAT_R32G32B32A32_DOUBLE: {
+ double col[4];
+ col[0] = (double)val[0];
+ col[1] = (double)val[1];
+ col[2] = (double)val[2];
+ col[3] = (double)val[3];
+ NK_MEMCPY(attr, col, sizeof(col));
+ } break;
+ case NK_FORMAT_RGB32:
+ case NK_FORMAT_RGBA32: {
+ struct nk_color col = nk_rgba_fv(val);
+ nk_uint color = nk_color_u32(col);
+ NK_MEMCPY(attr, &color, sizeof(color));
+ } break; }
+}
+NK_INTERN void
+nk_draw_vertex_element(void *dst, const float *values, int value_count,
+ enum nk_draw_vertex_layout_format format)
+{
+ int value_index;
+ void *attribute = dst;
+ /* if this triggers you tried to provide a color format for a value */
+ NK_ASSERT(format < NK_FORMAT_COLOR_BEGIN);
+ if (format >= NK_FORMAT_COLOR_BEGIN && format <= NK_FORMAT_COLOR_END) return;
+ for (value_index = 0; value_index < value_count; ++value_index) {
+ switch (format) {
+ default: NK_ASSERT(0 && "invalid vertex layout format"); break;
+ case NK_FORMAT_SCHAR: {
+ char value = (char)NK_CLAMP((float)NK_SCHAR_MIN, values[value_index], (float)NK_SCHAR_MAX);
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(char));
+ } break;
+ case NK_FORMAT_SSHORT: {
+ nk_short value = (nk_short)NK_CLAMP((float)NK_SSHORT_MIN, values[value_index], (float)NK_SSHORT_MAX);
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(value));
+ } break;
+ case NK_FORMAT_SINT: {
+ nk_int value = (nk_int)NK_CLAMP((float)NK_SINT_MIN, values[value_index], (float)NK_SINT_MAX);
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(nk_int));
+ } break;
+ case NK_FORMAT_UCHAR: {
+ unsigned char value = (unsigned char)NK_CLAMP((float)NK_UCHAR_MIN, values[value_index], (float)NK_UCHAR_MAX);
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(unsigned char));
+ } break;
+ case NK_FORMAT_USHORT: {
+ nk_ushort value = (nk_ushort)NK_CLAMP((float)NK_USHORT_MIN, values[value_index], (float)NK_USHORT_MAX);
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(value));
+ } break;
+ case NK_FORMAT_UINT: {
+ nk_uint value = (nk_uint)NK_CLAMP((float)NK_UINT_MIN, values[value_index], (float)NK_UINT_MAX);
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(nk_uint));
+ } break;
+ case NK_FORMAT_FLOAT:
+ NK_MEMCPY(attribute, &values[value_index], sizeof(values[value_index]));
+ attribute = (void*)((char*)attribute + sizeof(float));
+ break;
+ case NK_FORMAT_DOUBLE: {
+ double value = (double)values[value_index];
+ NK_MEMCPY(attribute, &value, sizeof(value));
+ attribute = (void*)((char*)attribute + sizeof(double));
+ } break;
+ }
+ }
+}
+NK_INTERN void*
+nk_draw_vertex(void *dst, const struct nk_convert_config *config,
+ struct nk_vec2 pos, struct nk_vec2 uv, struct nk_colorf color)
+{
+ void *result = (void*)((char*)dst + config->vertex_size);
+ const struct nk_draw_vertex_layout_element *elem_iter = config->vertex_layout;
+ while (!nk_draw_vertex_layout_element_is_end_of_layout(elem_iter)) {
+ void *address = (void*)((char*)dst + elem_iter->offset);
+ switch (elem_iter->attribute) {
+ case NK_VERTEX_ATTRIBUTE_COUNT:
+ default: NK_ASSERT(0 && "wrong element attribute"); break;
+ case NK_VERTEX_POSITION: nk_draw_vertex_element(address, &pos.x, 2, elem_iter->format); break;
+ case NK_VERTEX_TEXCOORD: nk_draw_vertex_element(address, &uv.x, 2, elem_iter->format); break;
+ case NK_VERTEX_COLOR: nk_draw_vertex_color(address, &color.r, elem_iter->format); break;
+ }
+ elem_iter++;
+ }
+ return result;
+}
+NK_API void
+nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *points,
+ const unsigned int points_count, struct nk_color color, enum nk_draw_list_stroke closed,
+ float thickness, enum nk_anti_aliasing aliasing)
+{
+ nk_size count;
+ int thick_line;
+ struct nk_colorf col;
+ struct nk_colorf col_trans;
+ NK_ASSERT(list);
+ if (!list || points_count < 2) return;
+
+ color.a = (nk_byte)((float)color.a * list->config.global_alpha);
+ count = points_count;
+ if (!closed) count = points_count-1;
+ thick_line = thickness > 1.0f;
+
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ nk_draw_list_push_userdata(list, list->userdata);
+#endif
+
+ color.a = (nk_byte)((float)color.a * list->config.global_alpha);
+ nk_color_fv(&col.r, color);
+ col_trans = col;
+ col_trans.a = 0;
+
+ if (aliasing == NK_ANTI_ALIASING_ON) {
+ /* ANTI-ALIASED STROKE */
+ const float AA_SIZE = 1.0f;
+ NK_STORAGE const nk_size pnt_align = NK_ALIGNOF(struct nk_vec2);
+ NK_STORAGE const nk_size pnt_size = sizeof(struct nk_vec2);
+
+ /* allocate vertices and elements */
+ nk_size i1 = 0;
+ nk_size vertex_offset;
+ nk_size index = list->vertex_count;
+
+ const nk_size idx_count = (thick_line) ? (count * 18) : (count * 12);
+ const nk_size vtx_count = (thick_line) ? (points_count * 4): (points_count *3);
+
+ void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
+ nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);
+
+ nk_size size;
+ struct nk_vec2 *normals, *temp;
+ if (!vtx || !ids) return;
+
+ /* temporary allocate normals + points */
+ vertex_offset = (nk_size)((nk_byte*)vtx - (nk_byte*)list->vertices->memory.ptr);
+ nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
+ size = pnt_size * ((thick_line) ? 5 : 3) * points_count;
+ normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
+ if (!normals) return;
+ temp = normals + points_count;
+
+ /* make sure vertex pointer is still correct */
+ vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);
+
+ /* calculate normals */
+ for (i1 = 0; i1 < count; ++i1) {
+ const nk_size i2 = ((i1 + 1) == points_count) ? 0 : (i1 + 1);
+ struct nk_vec2 diff = nk_vec2_sub(points[i2], points[i1]);
+ float len;
+
+ /* vec2 inverted length */
+ len = nk_vec2_len_sqr(diff);
+ if (len != 0.0f)
+ len = nk_inv_sqrt(len);
+ else len = 1.0f;
+
+ diff = nk_vec2_muls(diff, len);
+ normals[i1].x = diff.y;
+ normals[i1].y = -diff.x;
+ }
+
+ if (!closed)
+ normals[points_count-1] = normals[points_count-2];
+
+ if (!thick_line) {
+ nk_size idx1, i;
+ if (!closed) {
+ struct nk_vec2 d;
+ temp[0] = nk_vec2_add(points[0], nk_vec2_muls(normals[0], AA_SIZE));
+ temp[1] = nk_vec2_sub(points[0], nk_vec2_muls(normals[0], AA_SIZE));
+ d = nk_vec2_muls(normals[points_count-1], AA_SIZE);
+ temp[(points_count-1) * 2 + 0] = nk_vec2_add(points[points_count-1], d);
+ temp[(points_count-1) * 2 + 1] = nk_vec2_sub(points[points_count-1], d);
+ }
+
+ /* fill elements */
+ idx1 = index;
+ for (i1 = 0; i1 < count; i1++) {
+ struct nk_vec2 dm;
+ float dmr2;
+ nk_size i2 = ((i1 + 1) == points_count) ? 0 : (i1 + 1);
+ nk_size idx2 = ((i1+1) == points_count) ? index: (idx1 + 3);
+
+ /* average normals */
+ dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);
+ dmr2 = dm.x * dm.x + dm.y* dm.y;
+ if (dmr2 > 0.000001f) {
+ float scale = 1.0f/dmr2;
+ scale = NK_MIN(100.0f, scale);
+ dm = nk_vec2_muls(dm, scale);
+ }
+
+ dm = nk_vec2_muls(dm, AA_SIZE);
+ temp[i2*2+0] = nk_vec2_add(points[i2], dm);
+ temp[i2*2+1] = nk_vec2_sub(points[i2], dm);
+
+ ids[0] = (nk_draw_index)(idx2 + 0); ids[1] = (nk_draw_index)(idx1+0);
+ ids[2] = (nk_draw_index)(idx1 + 2); ids[3] = (nk_draw_index)(idx1+2);
+ ids[4] = (nk_draw_index)(idx2 + 2); ids[5] = (nk_draw_index)(idx2+0);
+ ids[6] = (nk_draw_index)(idx2 + 1); ids[7] = (nk_draw_index)(idx1+1);
+ ids[8] = (nk_draw_index)(idx1 + 0); ids[9] = (nk_draw_index)(idx1+0);
+ ids[10]= (nk_draw_index)(idx2 + 0); ids[11]= (nk_draw_index)(idx2+1);
+ ids += 12;
+ idx1 = idx2;
+ }
+
+ /* fill vertices */
+ for (i = 0; i < points_count; ++i) {
+ const struct nk_vec2 uv = list->config.null.uv;
+ vtx = nk_draw_vertex(vtx, &list->config, points[i], uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+0], uv, col_trans);
+ vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+1], uv, col_trans);
+ }
+ } else {
+ nk_size idx1, i;
+ const float half_inner_thickness = (thickness - AA_SIZE) * 0.5f;
+ if (!closed) {
+ struct nk_vec2 d1 = nk_vec2_muls(normals[0], half_inner_thickness + AA_SIZE);
+ struct nk_vec2 d2 = nk_vec2_muls(normals[0], half_inner_thickness);
+
+ temp[0] = nk_vec2_add(points[0], d1);
+ temp[1] = nk_vec2_add(points[0], d2);
+ temp[2] = nk_vec2_sub(points[0], d2);
+ temp[3] = nk_vec2_sub(points[0], d1);
+
+ d1 = nk_vec2_muls(normals[points_count-1], half_inner_thickness + AA_SIZE);
+ d2 = nk_vec2_muls(normals[points_count-1], half_inner_thickness);
+
+ temp[(points_count-1)*4+0] = nk_vec2_add(points[points_count-1], d1);
+ temp[(points_count-1)*4+1] = nk_vec2_add(points[points_count-1], d2);
+ temp[(points_count-1)*4+2] = nk_vec2_sub(points[points_count-1], d2);
+ temp[(points_count-1)*4+3] = nk_vec2_sub(points[points_count-1], d1);
+ }
+
+ /* add all elements */
+ idx1 = index;
+ for (i1 = 0; i1 < count; ++i1) {
+ struct nk_vec2 dm_out, dm_in;
+ const nk_size i2 = ((i1+1) == points_count) ? 0: (i1 + 1);
+ nk_size idx2 = ((i1+1) == points_count) ? index: (idx1 + 4);
+
+ /* average normals */
+ struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);
+ float dmr2 = dm.x * dm.x + dm.y* dm.y;
+ if (dmr2 > 0.000001f) {
+ float scale = 1.0f/dmr2;
+ scale = NK_MIN(100.0f, scale);
+ dm = nk_vec2_muls(dm, scale);
+ }
+
+ dm_out = nk_vec2_muls(dm, ((half_inner_thickness) + AA_SIZE));
+ dm_in = nk_vec2_muls(dm, half_inner_thickness);
+ temp[i2*4+0] = nk_vec2_add(points[i2], dm_out);
+ temp[i2*4+1] = nk_vec2_add(points[i2], dm_in);
+ temp[i2*4+2] = nk_vec2_sub(points[i2], dm_in);
+ temp[i2*4+3] = nk_vec2_sub(points[i2], dm_out);
+
+ /* add indexes */
+ ids[0] = (nk_draw_index)(idx2 + 1); ids[1] = (nk_draw_index)(idx1+1);
+ ids[2] = (nk_draw_index)(idx1 + 2); ids[3] = (nk_draw_index)(idx1+2);
+ ids[4] = (nk_draw_index)(idx2 + 2); ids[5] = (nk_draw_index)(idx2+1);
+ ids[6] = (nk_draw_index)(idx2 + 1); ids[7] = (nk_draw_index)(idx1+1);
+ ids[8] = (nk_draw_index)(idx1 + 0); ids[9] = (nk_draw_index)(idx1+0);
+ ids[10]= (nk_draw_index)(idx2 + 0); ids[11] = (nk_draw_index)(idx2+1);
+ ids[12]= (nk_draw_index)(idx2 + 2); ids[13] = (nk_draw_index)(idx1+2);
+ ids[14]= (nk_draw_index)(idx1 + 3); ids[15] = (nk_draw_index)(idx1+3);
+ ids[16]= (nk_draw_index)(idx2 + 3); ids[17] = (nk_draw_index)(idx2+2);
+ ids += 18;
+ idx1 = idx2;
+ }
+
+ /* add vertices */
+ for (i = 0; i < points_count; ++i) {
+ const struct nk_vec2 uv = list->config.null.uv;
+ vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+0], uv, col_trans);
+ vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+1], uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+2], uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+3], uv, col_trans);
+ }
+ }
+ /* free temporary normals + points */
+ nk_buffer_reset(list->vertices, NK_BUFFER_FRONT);
+ } else {
+ /* NON ANTI-ALIASED STROKE */
+ nk_size i1 = 0;
+ nk_size idx = list->vertex_count;
+ const nk_size idx_count = count * 6;
+ const nk_size vtx_count = count * 4;
+ void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
+ nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);
+ if (!vtx || !ids) return;
+
+ for (i1 = 0; i1 < count; ++i1) {
+ float dx, dy;
+ const struct nk_vec2 uv = list->config.null.uv;
+ const nk_size i2 = ((i1+1) == points_count) ? 0 : i1 + 1;
+ const struct nk_vec2 p1 = points[i1];
+ const struct nk_vec2 p2 = points[i2];
+ struct nk_vec2 diff = nk_vec2_sub(p2, p1);
+ float len;
+
+ /* vec2 inverted length */
+ len = nk_vec2_len_sqr(diff);
+ if (len != 0.0f)
+ len = nk_inv_sqrt(len);
+ else len = 1.0f;
+ diff = nk_vec2_muls(diff, len);
+
+ /* add vertices */
+ dx = diff.x * (thickness * 0.5f);
+ dy = diff.y * (thickness * 0.5f);
+
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p1.x + dy, p1.y - dx), uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p2.x + dy, p2.y - dx), uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p2.x - dy, p2.y + dx), uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p1.x - dy, p1.y + dx), uv, col);
+
+ ids[0] = (nk_draw_index)(idx+0); ids[1] = (nk_draw_index)(idx+1);
+ ids[2] = (nk_draw_index)(idx+2); ids[3] = (nk_draw_index)(idx+0);
+ ids[4] = (nk_draw_index)(idx+2); ids[5] = (nk_draw_index)(idx+3);
+
+ ids += 6;
+ idx += 4;
+ }
+ }
+}
+NK_API void
+nk_draw_list_fill_poly_convex(struct nk_draw_list *list,
+ const struct nk_vec2 *points, const unsigned int points_count,
+ struct nk_color color, enum nk_anti_aliasing aliasing)
+{
+ struct nk_colorf col;
+ struct nk_colorf col_trans;
+
+ NK_STORAGE const nk_size pnt_align = NK_ALIGNOF(struct nk_vec2);
+ NK_STORAGE const nk_size pnt_size = sizeof(struct nk_vec2);
+ NK_ASSERT(list);
+ if (!list || points_count < 3) return;
+
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ nk_draw_list_push_userdata(list, list->userdata);
+#endif
+
+ color.a = (nk_byte)((float)color.a * list->config.global_alpha);
+ nk_color_fv(&col.r, color);
+ col_trans = col;
+ col_trans.a = 0;
+
+ if (aliasing == NK_ANTI_ALIASING_ON) {
+ nk_size i = 0;
+ nk_size i0 = 0;
+ nk_size i1 = 0;
+
+ const float AA_SIZE = 1.0f;
+ nk_size vertex_offset = 0;
+ nk_size index = list->vertex_count;
+
+ const nk_size idx_count = (points_count-2)*3 + points_count*6;
+ const nk_size vtx_count = (points_count*2);
+
+ void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
+ nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);
+
+ nk_size size = 0;
+ struct nk_vec2 *normals = 0;
+ unsigned int vtx_inner_idx = (unsigned int)(index + 0);
+ unsigned int vtx_outer_idx = (unsigned int)(index + 1);
+ if (!vtx || !ids) return;
+
+ /* temporary allocate normals */
+ vertex_offset = (nk_size)((nk_byte*)vtx - (nk_byte*)list->vertices->memory.ptr);
+ nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
+ size = pnt_size * points_count;
+ normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
+ if (!normals) return;
+ vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);
+
+ /* add elements */
+ for (i = 2; i < points_count; i++) {
+ ids[0] = (nk_draw_index)(vtx_inner_idx);
+ ids[1] = (nk_draw_index)(vtx_inner_idx + ((i-1) << 1));
+ ids[2] = (nk_draw_index)(vtx_inner_idx + (i << 1));
+ ids += 3;
+ }
+
+ /* compute normals */
+ for (i0 = points_count-1, i1 = 0; i1 < points_count; i0 = i1++) {
+ struct nk_vec2 p0 = points[i0];
+ struct nk_vec2 p1 = points[i1];
+ struct nk_vec2 diff = nk_vec2_sub(p1, p0);
+
+ /* vec2 inverted length */
+ float len = nk_vec2_len_sqr(diff);
+ if (len != 0.0f)
+ len = nk_inv_sqrt(len);
+ else len = 1.0f;
+ diff = nk_vec2_muls(diff, len);
+
+ normals[i0].x = diff.y;
+ normals[i0].y = -diff.x;
+ }
+
+ /* add vertices + indexes */
+ for (i0 = points_count-1, i1 = 0; i1 < points_count; i0 = i1++) {
+ const struct nk_vec2 uv = list->config.null.uv;
+ struct nk_vec2 n0 = normals[i0];
+ struct nk_vec2 n1 = normals[i1];
+ struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(n0, n1), 0.5f);
+ float dmr2 = dm.x*dm.x + dm.y*dm.y;
+ if (dmr2 > 0.000001f) {
+ float scale = 1.0f / dmr2;
+ scale = NK_MIN(scale, 100.0f);
+ dm = nk_vec2_muls(dm, scale);
+ }
+ dm = nk_vec2_muls(dm, AA_SIZE * 0.5f);
+
+ /* add vertices */
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2_sub(points[i1], dm), uv, col);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2_add(points[i1], dm), uv, col_trans);
+
+ /* add indexes */
+ ids[0] = (nk_draw_index)(vtx_inner_idx+(i1<<1));
+ ids[1] = (nk_draw_index)(vtx_inner_idx+(i0<<1));
+ ids[2] = (nk_draw_index)(vtx_outer_idx+(i0<<1));
+ ids[3] = (nk_draw_index)(vtx_outer_idx+(i0<<1));
+ ids[4] = (nk_draw_index)(vtx_outer_idx+(i1<<1));
+ ids[5] = (nk_draw_index)(vtx_inner_idx+(i1<<1));
+ ids += 6;
+ }
+ /* free temporary normals + points */
+ nk_buffer_reset(list->vertices, NK_BUFFER_FRONT);
+ } else {
+ nk_size i = 0;
+ nk_size index = list->vertex_count;
+ const nk_size idx_count = (points_count-2)*3;
+ const nk_size vtx_count = points_count;
+ void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
+ nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);
+
+ if (!vtx || !ids) return;
+ for (i = 0; i < vtx_count; ++i)
+ vtx = nk_draw_vertex(vtx, &list->config, points[i], list->config.null.uv, col);
+ for (i = 2; i < points_count; ++i) {
+ ids[0] = (nk_draw_index)index;
+ ids[1] = (nk_draw_index)(index+ i - 1);
+ ids[2] = (nk_draw_index)(index+i);
+ ids += 3;
+ }
+ }
+}
+NK_API void
+nk_draw_list_path_clear(struct nk_draw_list *list)
+{
+ NK_ASSERT(list);
+ if (!list) return;
+ nk_buffer_reset(list->buffer, NK_BUFFER_FRONT);
+ list->path_count = 0;
+ list->path_offset = 0;
+}
+NK_API void
+nk_draw_list_path_line_to(struct nk_draw_list *list, struct nk_vec2 pos)
+{
+ struct nk_vec2 *points = 0;
+ struct nk_draw_command *cmd = 0;
+ NK_ASSERT(list);
+ if (!list) return;
+ if (!list->cmd_count)
+ nk_draw_list_add_clip(list, nk_null_rect);
+
+ cmd = nk_draw_list_command_last(list);
+ if (cmd && cmd->texture.ptr != list->config.null.texture.ptr)
+ nk_draw_list_push_image(list, list->config.null.texture);
+
+ points = nk_draw_list_alloc_path(list, 1);
+ if (!points) return;
+ points[0] = pos;
+}
+NK_API void
+nk_draw_list_path_arc_to_fast(struct nk_draw_list *list, struct nk_vec2 center,
+ float radius, int a_min, int a_max)
+{
+ int a = 0;
+ NK_ASSERT(list);
+ if (!list) return;
+ if (a_min <= a_max) {
+ for (a = a_min; a <= a_max; a++) {
+ const struct nk_vec2 c = list->circle_vtx[(nk_size)a % NK_LEN(list->circle_vtx)];
+ const float x = center.x + c.x * radius;
+ const float y = center.y + c.y * radius;
+ nk_draw_list_path_line_to(list, nk_vec2(x, y));
+ }
+ }
+}
+NK_API void
+nk_draw_list_path_arc_to(struct nk_draw_list *list, struct nk_vec2 center,
+ float radius, float a_min, float a_max, unsigned int segments)
+{
+ unsigned int i = 0;
+ NK_ASSERT(list);
+ if (!list) return;
+ if (radius == 0.0f) return;
+
+ /* This algorithm for arc drawing relies on these two trigonometric identities[1]:
+ sin(a + b) = sin(a) * cos(b) + cos(a) * sin(b)
+ cos(a + b) = cos(a) * cos(b) - sin(a) * sin(b)
+
+ Two coordinates (x, y) of a point on a circle centered on
+ the origin can be written in polar form as:
+ x = r * cos(a)
+ y = r * sin(a)
+ where r is the radius of the circle,
+ a is the angle between (x, y) and the origin.
+
+ This allows us to rotate the coordinates around the
+ origin by an angle b using the following transformation:
+ x' = r * cos(a + b) = x * cos(b) - y * sin(b)
+ y' = r * sin(a + b) = y * cos(b) + x * sin(b)
+
+ [1] https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Angle_sum_and_difference_identities
+ */
+ {const float d_angle = (a_max - a_min) / (float)segments;
+ const float sin_d = (float)NK_SIN(d_angle);
+ const float cos_d = (float)NK_COS(d_angle);
+
+ float cx = (float)NK_COS(a_min) * radius;
+ float cy = (float)NK_SIN(a_min) * radius;
+ for(i = 0; i <= segments; ++i) {
+ float new_cx, new_cy;
+ const float x = center.x + cx;
+ const float y = center.y + cy;
+ nk_draw_list_path_line_to(list, nk_vec2(x, y));
+
+ new_cx = cx * cos_d - cy * sin_d;
+ new_cy = cy * cos_d + cx * sin_d;
+ cx = new_cx;
+ cy = new_cy;
+ }}
+}
+NK_API void
+nk_draw_list_path_rect_to(struct nk_draw_list *list, struct nk_vec2 a,
+ struct nk_vec2 b, float rounding)
+{
+ float r;
+ NK_ASSERT(list);
+ if (!list) return;
+ r = rounding;
+ r = NK_MIN(r, ((b.x-a.x) < 0) ? -(b.x-a.x): (b.x-a.x));
+ r = NK_MIN(r, ((b.y-a.y) < 0) ? -(b.y-a.y): (b.y-a.y));
+
+ if (r == 0.0f) {
+ nk_draw_list_path_line_to(list, a);
+ nk_draw_list_path_line_to(list, nk_vec2(b.x,a.y));
+ nk_draw_list_path_line_to(list, b);
+ nk_draw_list_path_line_to(list, nk_vec2(a.x,b.y));
+ } else {
+ nk_draw_list_path_arc_to_fast(list, nk_vec2(a.x + r, a.y + r), r, 6, 9);
+ nk_draw_list_path_arc_to_fast(list, nk_vec2(b.x - r, a.y + r), r, 9, 12);
+ nk_draw_list_path_arc_to_fast(list, nk_vec2(b.x - r, b.y - r), r, 0, 3);
+ nk_draw_list_path_arc_to_fast(list, nk_vec2(a.x + r, b.y - r), r, 3, 6);
+ }
+}
+NK_API void
+nk_draw_list_path_curve_to(struct nk_draw_list *list, struct nk_vec2 p2,
+ struct nk_vec2 p3, struct nk_vec2 p4, unsigned int num_segments)
+{
+ float t_step;
+ unsigned int i_step;
+ struct nk_vec2 p1;
+
+ NK_ASSERT(list);
+ NK_ASSERT(list->path_count);
+ if (!list || !list->path_count) return;
+ num_segments = NK_MAX(num_segments, 1);
+
+ p1 = nk_draw_list_path_last(list);
+ t_step = 1.0f/(float)num_segments;
+ for (i_step = 1; i_step <= num_segments; ++i_step) {
+ float t = t_step * (float)i_step;
+ float u = 1.0f - t;
+ float w1 = u*u*u;
+ float w2 = 3*u*u*t;
+ float w3 = 3*u*t*t;
+ float w4 = t * t *t;
+ float x = w1 * p1.x + w2 * p2.x + w3 * p3.x + w4 * p4.x;
+ float y = w1 * p1.y + w2 * p2.y + w3 * p3.y + w4 * p4.y;
+ nk_draw_list_path_line_to(list, nk_vec2(x,y));
+ }
+}
+NK_API void
+nk_draw_list_path_fill(struct nk_draw_list *list, struct nk_color color)
+{
+ struct nk_vec2 *points;
+ NK_ASSERT(list);
+ if (!list) return;
+ points = (struct nk_vec2*)nk_buffer_memory(list->buffer);
+ nk_draw_list_fill_poly_convex(list, points, list->path_count, color, list->config.shape_AA);
+ nk_draw_list_path_clear(list);
+}
+NK_API void
+nk_draw_list_path_stroke(struct nk_draw_list *list, struct nk_color color,
+ enum nk_draw_list_stroke closed, float thickness)
+{
+ struct nk_vec2 *points;
+ NK_ASSERT(list);
+ if (!list) return;
+ points = (struct nk_vec2*)nk_buffer_memory(list->buffer);
+ nk_draw_list_stroke_poly_line(list, points, list->path_count, color,
+ closed, thickness, list->config.line_AA);
+ nk_draw_list_path_clear(list);
+}
+NK_API void
+nk_draw_list_stroke_line(struct nk_draw_list *list, struct nk_vec2 a,
+ struct nk_vec2 b, struct nk_color col, float thickness)
+{
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ if (list->line_AA == NK_ANTI_ALIASING_ON) {
+ nk_draw_list_path_line_to(list, a);
+ nk_draw_list_path_line_to(list, b);
+ } else {
+ nk_draw_list_path_line_to(list, nk_vec2_sub(a,nk_vec2(0.5f,0.5f)));
+ nk_draw_list_path_line_to(list, nk_vec2_sub(b,nk_vec2(0.5f,0.5f)));
+ }
+ nk_draw_list_path_stroke(list, col, NK_STROKE_OPEN, thickness);
+}
+NK_API void
+nk_draw_list_fill_rect(struct nk_draw_list *list, struct nk_rect rect,
+ struct nk_color col, float rounding)
+{
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+
+ if (list->line_AA == NK_ANTI_ALIASING_ON) {
+ nk_draw_list_path_rect_to(list, nk_vec2(rect.x, rect.y),
+ nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);
+ } else {
+ nk_draw_list_path_rect_to(list, nk_vec2(rect.x-0.5f, rect.y-0.5f),
+ nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);
+ } nk_draw_list_path_fill(list, col);
+}
+NK_API void
+nk_draw_list_stroke_rect(struct nk_draw_list *list, struct nk_rect rect,
+ struct nk_color col, float rounding, float thickness)
+{
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ if (list->line_AA == NK_ANTI_ALIASING_ON) {
+ nk_draw_list_path_rect_to(list, nk_vec2(rect.x, rect.y),
+ nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);
+ } else {
+ nk_draw_list_path_rect_to(list, nk_vec2(rect.x-0.5f, rect.y-0.5f),
+ nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);
+ } nk_draw_list_path_stroke(list, col, NK_STROKE_CLOSED, thickness);
+}
+NK_API void
+nk_draw_list_fill_rect_multi_color(struct nk_draw_list *list, struct nk_rect rect,
+ struct nk_color left, struct nk_color top, struct nk_color right,
+ struct nk_color bottom)
+{
+ void *vtx;
+ struct nk_colorf col_left, col_top;
+ struct nk_colorf col_right, col_bottom;
+ nk_draw_index *idx;
+ nk_draw_index index;
+
+ nk_color_fv(&col_left.r, left);
+ nk_color_fv(&col_right.r, right);
+ nk_color_fv(&col_top.r, top);
+ nk_color_fv(&col_bottom.r, bottom);
+
+ NK_ASSERT(list);
+ if (!list) return;
+
+ nk_draw_list_push_image(list, list->config.null.texture);
+ index = (nk_draw_index)list->vertex_count;
+ vtx = nk_draw_list_alloc_vertices(list, 4);
+ idx = nk_draw_list_alloc_elements(list, 6);
+ if (!vtx || !idx) return;
+
+ idx[0] = (nk_draw_index)(index+0); idx[1] = (nk_draw_index)(index+1);
+ idx[2] = (nk_draw_index)(index+2); idx[3] = (nk_draw_index)(index+0);
+ idx[4] = (nk_draw_index)(index+2); idx[5] = (nk_draw_index)(index+3);
+
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y), list->config.null.uv, col_left);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y), list->config.null.uv, col_top);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y + rect.h), list->config.null.uv, col_right);
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y + rect.h), list->config.null.uv, col_bottom);
+}
+NK_API void
+nk_draw_list_fill_triangle(struct nk_draw_list *list, struct nk_vec2 a,
+ struct nk_vec2 b, struct nk_vec2 c, struct nk_color col)
+{
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ nk_draw_list_path_line_to(list, a);
+ nk_draw_list_path_line_to(list, b);
+ nk_draw_list_path_line_to(list, c);
+ nk_draw_list_path_fill(list, col);
+}
+NK_API void
+nk_draw_list_stroke_triangle(struct nk_draw_list *list, struct nk_vec2 a,
+ struct nk_vec2 b, struct nk_vec2 c, struct nk_color col, float thickness)
+{
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ nk_draw_list_path_line_to(list, a);
+ nk_draw_list_path_line_to(list, b);
+ nk_draw_list_path_line_to(list, c);
+ nk_draw_list_path_stroke(list, col, NK_STROKE_CLOSED, thickness);
+}
+NK_API void
+nk_draw_list_fill_circle(struct nk_draw_list *list, struct nk_vec2 center,
+ float radius, struct nk_color col, unsigned int segs)
+{
+ float a_max;
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ a_max = NK_PI * 2.0f * ((float)segs - 1.0f) / (float)segs;
+ nk_draw_list_path_arc_to(list, center, radius, 0.0f, a_max, segs);
+ nk_draw_list_path_fill(list, col);
+}
+NK_API void
+nk_draw_list_stroke_circle(struct nk_draw_list *list, struct nk_vec2 center,
+ float radius, struct nk_color col, unsigned int segs, float thickness)
+{
+ float a_max;
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ a_max = NK_PI * 2.0f * ((float)segs - 1.0f) / (float)segs;
+ nk_draw_list_path_arc_to(list, center, radius, 0.0f, a_max, segs);
+ nk_draw_list_path_stroke(list, col, NK_STROKE_CLOSED, thickness);
+}
+NK_API void
+nk_draw_list_stroke_curve(struct nk_draw_list *list, struct nk_vec2 p0,
+ struct nk_vec2 cp0, struct nk_vec2 cp1, struct nk_vec2 p1,
+ struct nk_color col, unsigned int segments, float thickness)
+{
+ NK_ASSERT(list);
+ if (!list || !col.a) return;
+ nk_draw_list_path_line_to(list, p0);
+ nk_draw_list_path_curve_to(list, cp0, cp1, p1, segments);
+ nk_draw_list_path_stroke(list, col, NK_STROKE_OPEN, thickness);
+}
+NK_INTERN void
+nk_draw_list_push_rect_uv(struct nk_draw_list *list, struct nk_vec2 a,
+ struct nk_vec2 c, struct nk_vec2 uva, struct nk_vec2 uvc,
+ struct nk_color color)
+{
+ void *vtx;
+ struct nk_vec2 uvb;
+ struct nk_vec2 uvd;
+ struct nk_vec2 b;
+ struct nk_vec2 d;
+
+ struct nk_colorf col;
+ nk_draw_index *idx;
+ nk_draw_index index;
+ NK_ASSERT(list);
+ if (!list) return;
+
+ nk_color_fv(&col.r, color);
+ uvb = nk_vec2(uvc.x, uva.y);
+ uvd = nk_vec2(uva.x, uvc.y);
+ b = nk_vec2(c.x, a.y);
+ d = nk_vec2(a.x, c.y);
+
+ index = (nk_draw_index)list->vertex_count;
+ vtx = nk_draw_list_alloc_vertices(list, 4);
+ idx = nk_draw_list_alloc_elements(list, 6);
+ if (!vtx || !idx) return;
+
+ idx[0] = (nk_draw_index)(index+0); idx[1] = (nk_draw_index)(index+1);
+ idx[2] = (nk_draw_index)(index+2); idx[3] = (nk_draw_index)(index+0);
+ idx[4] = (nk_draw_index)(index+2); idx[5] = (nk_draw_index)(index+3);
+
+ vtx = nk_draw_vertex(vtx, &list->config, a, uva, col);
+ vtx = nk_draw_vertex(vtx, &list->config, b, uvb, col);
+ vtx = nk_draw_vertex(vtx, &list->config, c, uvc, col);
+ vtx = nk_draw_vertex(vtx, &list->config, d, uvd, col);
+}
+NK_API void
+nk_draw_list_add_image(struct nk_draw_list *list, struct nk_image texture,
+ struct nk_rect rect, struct nk_color color)
+{
+ NK_ASSERT(list);
+ if (!list) return;
+ /* push new command with given texture */
+ nk_draw_list_push_image(list, texture.handle);
+ if (nk_image_is_subimage(&texture)) {
+ /* add region inside of the texture */
+ struct nk_vec2 uv[2];
+ uv[0].x = (float)texture.region[0]/(float)texture.w;
+ uv[0].y = (float)texture.region[1]/(float)texture.h;
+ uv[1].x = (float)(texture.region[0] + texture.region[2])/(float)texture.w;
+ uv[1].y = (float)(texture.region[1] + texture.region[3])/(float)texture.h;
+ nk_draw_list_push_rect_uv(list, nk_vec2(rect.x, rect.y),
+ nk_vec2(rect.x + rect.w, rect.y + rect.h), uv[0], uv[1], color);
+ } else nk_draw_list_push_rect_uv(list, nk_vec2(rect.x, rect.y),
+ nk_vec2(rect.x + rect.w, rect.y + rect.h),
+ nk_vec2(0.0f, 0.0f), nk_vec2(1.0f, 1.0f),color);
+}
+NK_API void
+nk_draw_list_add_text(struct nk_draw_list *list, const struct nk_user_font *font,
+ struct nk_rect rect, const char *text, int len, float font_height,
+ struct nk_color fg)
+{
+ float x = 0;
+ int text_len = 0;
+ nk_rune unicode = 0;
+ nk_rune next = 0;
+ int glyph_len = 0;
+ int next_glyph_len = 0;
+ struct nk_user_font_glyph g;
+
+ NK_ASSERT(list);
+ if (!list || !len || !text) return;
+ if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,
+ list->clip_rect.x, list->clip_rect.y, list->clip_rect.w, list->clip_rect.h)) return;
+
+ nk_draw_list_push_image(list, font->texture);
+ x = rect.x;
+ glyph_len = nk_utf_decode(text, &unicode, len);
+ if (!glyph_len) return;
+
+ /* draw every glyph image */
+ fg.a = (nk_byte)((float)fg.a * list->config.global_alpha);
+ while (text_len < len && glyph_len) {
+ float gx, gy, gh, gw;
+ float char_width = 0;
+ if (unicode == NK_UTF_INVALID) break;
+
+ /* query currently drawn glyph information */
+ next_glyph_len = nk_utf_decode(text + text_len + glyph_len, &next, (int)len - text_len);
+ font->query(font->userdata, font_height, &g, unicode,
+ (next == NK_UTF_INVALID) ? '\0' : next);
+
+ /* calculate and draw glyph drawing rectangle and image */
+ gx = x + g.offset.x;
+ gy = rect.y + g.offset.y;
+ gw = g.width; gh = g.height;
+ char_width = g.xadvance;
+ nk_draw_list_push_rect_uv(list, nk_vec2(gx,gy), nk_vec2(gx + gw, gy+ gh),
+ g.uv[0], g.uv[1], fg);
+
+ /* offset next glyph */
+ text_len += glyph_len;
+ x += char_width;
+ glyph_len = next_glyph_len;
+ unicode = next;
+ }
+}
+NK_API nk_flags
+nk_convert(struct nk_context *ctx, struct nk_buffer *cmds,
+ struct nk_buffer *vertices, struct nk_buffer *elements,
+ const struct nk_convert_config *config)
+{
+ nk_flags res = NK_CONVERT_SUCCESS;
+ const struct nk_command *cmd;
+ NK_ASSERT(ctx);
+ NK_ASSERT(cmds);
+ NK_ASSERT(vertices);
+ NK_ASSERT(elements);
+ NK_ASSERT(config);
+ NK_ASSERT(config->vertex_layout);
+ NK_ASSERT(config->vertex_size);
+ if (!ctx || !cmds || !vertices || !elements || !config || !config->vertex_layout)
+ return NK_CONVERT_INVALID_PARAM;
+
+ nk_draw_list_setup(&ctx->draw_list, config, cmds, vertices, elements,
+ config->line_AA, config->shape_AA);
+ nk_foreach(cmd, ctx)
+ {
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ ctx->draw_list.userdata = cmd->userdata;
+#endif
+ switch (cmd->type) {
+ case NK_COMMAND_NOP: break;
+ case NK_COMMAND_SCISSOR: {
+ const struct nk_command_scissor *s = (const struct nk_command_scissor*)cmd;
+ nk_draw_list_add_clip(&ctx->draw_list, nk_rect(s->x, s->y, s->w, s->h));
+ } break;
+ case NK_COMMAND_LINE: {
+ const struct nk_command_line *l = (const struct nk_command_line*)cmd;
+ nk_draw_list_stroke_line(&ctx->draw_list, nk_vec2(l->begin.x, l->begin.y),
+ nk_vec2(l->end.x, l->end.y), l->color, l->line_thickness);
+ } break;
+ case NK_COMMAND_CURVE: {
+ const struct nk_command_curve *q = (const struct nk_command_curve*)cmd;
+ nk_draw_list_stroke_curve(&ctx->draw_list, nk_vec2(q->begin.x, q->begin.y),
+ nk_vec2(q->ctrl[0].x, q->ctrl[0].y), nk_vec2(q->ctrl[1].x,
+ q->ctrl[1].y), nk_vec2(q->end.x, q->end.y), q->color,
+ config->curve_segment_count, q->line_thickness);
+ } break;
+ case NK_COMMAND_RECT: {
+ const struct nk_command_rect *r = (const struct nk_command_rect*)cmd;
+ nk_draw_list_stroke_rect(&ctx->draw_list, nk_rect(r->x, r->y, r->w, r->h),
+ r->color, (float)r->rounding, r->line_thickness);
+ } break;
+ case NK_COMMAND_RECT_FILLED: {
+ const struct nk_command_rect_filled *r = (const struct nk_command_rect_filled*)cmd;
+ nk_draw_list_fill_rect(&ctx->draw_list, nk_rect(r->x, r->y, r->w, r->h),
+ r->color, (float)r->rounding);
+ } break;
+ case NK_COMMAND_RECT_MULTI_COLOR: {
+ const struct nk_command_rect_multi_color *r = (const struct nk_command_rect_multi_color*)cmd;
+ nk_draw_list_fill_rect_multi_color(&ctx->draw_list, nk_rect(r->x, r->y, r->w, r->h),
+ r->left, r->top, r->right, r->bottom);
+ } break;
+ case NK_COMMAND_CIRCLE: {
+ const struct nk_command_circle *c = (const struct nk_command_circle*)cmd;
+ nk_draw_list_stroke_circle(&ctx->draw_list, nk_vec2((float)c->x + (float)c->w/2,
+ (float)c->y + (float)c->h/2), (float)c->w/2, c->color,
+ config->circle_segment_count, c->line_thickness);
+ } break;
+ case NK_COMMAND_CIRCLE_FILLED: {
+ const struct nk_command_circle_filled *c = (const struct nk_command_circle_filled *)cmd;
+ nk_draw_list_fill_circle(&ctx->draw_list, nk_vec2((float)c->x + (float)c->w/2,
+ (float)c->y + (float)c->h/2), (float)c->w/2, c->color,
+ config->circle_segment_count);
+ } break;
+ case NK_COMMAND_ARC: {
+ const struct nk_command_arc *c = (const struct nk_command_arc*)cmd;
+ nk_draw_list_path_line_to(&ctx->draw_list, nk_vec2(c->cx, c->cy));
+ nk_draw_list_path_arc_to(&ctx->draw_list, nk_vec2(c->cx, c->cy), c->r,
+ c->a[0], c->a[1], config->arc_segment_count);
+ nk_draw_list_path_stroke(&ctx->draw_list, c->color, NK_STROKE_CLOSED, c->line_thickness);
+ } break;
+ case NK_COMMAND_ARC_FILLED: {
+ const struct nk_command_arc_filled *c = (const struct nk_command_arc_filled*)cmd;
+ nk_draw_list_path_line_to(&ctx->draw_list, nk_vec2(c->cx, c->cy));
+ nk_draw_list_path_arc_to(&ctx->draw_list, nk_vec2(c->cx, c->cy), c->r,
+ c->a[0], c->a[1], config->arc_segment_count);
+ nk_draw_list_path_fill(&ctx->draw_list, c->color);
+ } break;
+ case NK_COMMAND_TRIANGLE: {
+ const struct nk_command_triangle *t = (const struct nk_command_triangle*)cmd;
+ nk_draw_list_stroke_triangle(&ctx->draw_list, nk_vec2(t->a.x, t->a.y),
+ nk_vec2(t->b.x, t->b.y), nk_vec2(t->c.x, t->c.y), t->color,
+ t->line_thickness);
+ } break;
+ case NK_COMMAND_TRIANGLE_FILLED: {
+ const struct nk_command_triangle_filled *t = (const struct nk_command_triangle_filled*)cmd;
+ nk_draw_list_fill_triangle(&ctx->draw_list, nk_vec2(t->a.x, t->a.y),
+ nk_vec2(t->b.x, t->b.y), nk_vec2(t->c.x, t->c.y), t->color);
+ } break;
+ case NK_COMMAND_POLYGON: {
+ int i;
+ const struct nk_command_polygon*p = (const struct nk_command_polygon*)cmd;
+ for (i = 0; i < p->point_count; ++i) {
+ struct nk_vec2 pnt = nk_vec2((float)p->points[i].x, (float)p->points[i].y);
+ nk_draw_list_path_line_to(&ctx->draw_list, pnt);
+ }
+ nk_draw_list_path_stroke(&ctx->draw_list, p->color, NK_STROKE_CLOSED, p->line_thickness);
+ } break;
+ case NK_COMMAND_POLYGON_FILLED: {
+ int i;
+ const struct nk_command_polygon_filled *p = (const struct nk_command_polygon_filled*)cmd;
+ for (i = 0; i < p->point_count; ++i) {
+ struct nk_vec2 pnt = nk_vec2((float)p->points[i].x, (float)p->points[i].y);
+ nk_draw_list_path_line_to(&ctx->draw_list, pnt);
+ }
+ nk_draw_list_path_fill(&ctx->draw_list, p->color);
+ } break;
+ case NK_COMMAND_POLYLINE: {
+ int i;
+ const struct nk_command_polyline *p = (const struct nk_command_polyline*)cmd;
+ for (i = 0; i < p->point_count; ++i) {
+ struct nk_vec2 pnt = nk_vec2((float)p->points[i].x, (float)p->points[i].y);
+ nk_draw_list_path_line_to(&ctx->draw_list, pnt);
+ }
+ nk_draw_list_path_stroke(&ctx->draw_list, p->color, NK_STROKE_OPEN, p->line_thickness);
+ } break;
+ case NK_COMMAND_TEXT: {
+ const struct nk_command_text *t = (const struct nk_command_text*)cmd;
+ nk_draw_list_add_text(&ctx->draw_list, t->font, nk_rect(t->x, t->y, t->w, t->h),
+ t->string, t->length, t->height, t->foreground);
+ } break;
+ case NK_COMMAND_IMAGE: {
+ const struct nk_command_image *i = (const struct nk_command_image*)cmd;
+ nk_draw_list_add_image(&ctx->draw_list, i->img, nk_rect(i->x, i->y, i->w, i->h), i->col);
+ } break;
+ case NK_COMMAND_CUSTOM: {
+ const struct nk_command_custom *c = (const struct nk_command_custom*)cmd;
+ c->callback(&ctx->draw_list, c->x, c->y, c->w, c->h, c->callback_data);
+ } break;
+ default: break;
+ }
+ }
+ res |= (cmds->needed > cmds->allocated + (cmds->memory.size - cmds->size)) ? NK_CONVERT_COMMAND_BUFFER_FULL: 0;
+ res |= (vertices->needed > vertices->allocated) ? NK_CONVERT_VERTEX_BUFFER_FULL: 0;
+ res |= (elements->needed > elements->allocated) ? NK_CONVERT_ELEMENT_BUFFER_FULL: 0;
+ return res;
+}
+NK_API const struct nk_draw_command*
+nk__draw_begin(const struct nk_context *ctx,
+ const struct nk_buffer *buffer)
+{
+ return nk__draw_list_begin(&ctx->draw_list, buffer);
+}
+NK_API const struct nk_draw_command*
+nk__draw_end(const struct nk_context *ctx, const struct nk_buffer *buffer)
+{
+ return nk__draw_list_end(&ctx->draw_list, buffer);
+}
+NK_API const struct nk_draw_command*
+nk__draw_next(const struct nk_draw_command *cmd,
+ const struct nk_buffer *buffer, const struct nk_context *ctx)
+{
+ return nk__draw_list_next(cmd, buffer, &ctx->draw_list);
+}
+#endif
+
+
+
+
+
+#ifdef NK_INCLUDE_FONT_BAKING
+/* -------------------------------------------------------------
+ *
+ * RECT PACK
+ *
+ * --------------------------------------------------------------*/
+/* stb_rect_pack.h - v0.05 - public domain - rectangle packing */
+/* Sean Barrett 2014 */
+#define NK_RP__MAXVAL 0xffff
+typedef unsigned short nk_rp_coord;
+
+struct nk_rp_rect {
+ /* reserved for your use: */
+ int id;
+ /* input: */
+ nk_rp_coord w, h;
+ /* output: */
+ nk_rp_coord x, y;
+ int was_packed;
+ /* non-zero if valid packing */
+}; /* 16 bytes, nominally */
+
+struct nk_rp_node {
+ nk_rp_coord x,y;
+ struct nk_rp_node *next;
+};
+
+struct nk_rp_context {
+ int width;
+ int height;
+ int align;
+ int init_mode;
+ int heuristic;
+ int num_nodes;
+ struct nk_rp_node *active_head;
+ struct nk_rp_node *free_head;
+ struct nk_rp_node extra[2];
+ /* we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2' */
+};
+
+struct nk_rp__findresult {
+ int x,y;
+ struct nk_rp_node **prev_link;
+};
+
+enum NK_RP_HEURISTIC {
+ NK_RP_HEURISTIC_Skyline_default=0,
+ NK_RP_HEURISTIC_Skyline_BL_sortHeight = NK_RP_HEURISTIC_Skyline_default,
+ NK_RP_HEURISTIC_Skyline_BF_sortHeight
+};
+enum NK_RP_INIT_STATE{NK_RP__INIT_skyline = 1};
+
+NK_INTERN void
+nk_rp_setup_allow_out_of_mem(struct nk_rp_context *context, int allow_out_of_mem)
+{
+ if (allow_out_of_mem)
+ /* if it's ok to run out of memory, then don't bother aligning them; */
+ /* this gives better packing, but may fail due to OOM (even though */
+ /* the rectangles easily fit). @TODO a smarter approach would be to only */
+ /* quantize once we've hit OOM, then we could get rid of this parameter. */
+ context->align = 1;
+ else {
+ /* if it's not ok to run out of memory, then quantize the widths */
+ /* so that num_nodes is always enough nodes. */
+ /* */
+ /* I.e. num_nodes * align >= width */
+ /* align >= width / num_nodes */
+ /* align = ceil(width/num_nodes) */
+ context->align = (context->width + context->num_nodes-1) / context->num_nodes;
+ }
+}
+NK_INTERN void
+nk_rp_init_target(struct nk_rp_context *context, int width, int height,
+ struct nk_rp_node *nodes, int num_nodes)
+{
+ int i;
+#ifndef STBRP_LARGE_RECTS
+ NK_ASSERT(width <= 0xffff && height <= 0xffff);
+#endif
+
+ for (i=0; i < num_nodes-1; ++i)
+ nodes[i].next = &nodes[i+1];
+ nodes[i].next = 0;
+ context->init_mode = NK_RP__INIT_skyline;
+ context->heuristic = NK_RP_HEURISTIC_Skyline_default;
+ context->free_head = &nodes[0];
+ context->active_head = &context->extra[0];
+ context->width = width;
+ context->height = height;
+ context->num_nodes = num_nodes;
+ nk_rp_setup_allow_out_of_mem(context, 0);
+
+ /* node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly) */
+ context->extra[0].x = 0;
+ context->extra[0].y = 0;
+ context->extra[0].next = &context->extra[1];
+ context->extra[1].x = (nk_rp_coord) width;
+ context->extra[1].y = 65535;
+ context->extra[1].next = 0;
+}
+/* find minimum y position if it starts at x1 */
+NK_INTERN int
+nk_rp__skyline_find_min_y(struct nk_rp_context *c, struct nk_rp_node *first,
+ int x0, int width, int *pwaste)
+{
+ struct nk_rp_node *node = first;
+ int x1 = x0 + width;
+ int min_y, visited_width, waste_area;
+ NK_ASSERT(first->x <= x0);
+ NK_UNUSED(c);
+
+ NK_ASSERT(node->next->x > x0);
+ /* we ended up handling this in the caller for efficiency */
+ NK_ASSERT(node->x <= x0);
+
+ min_y = 0;
+ waste_area = 0;
+ visited_width = 0;
+ while (node->x < x1)
+ {
+ if (node->y > min_y) {
+ /* raise min_y higher. */
+ /* we've accounted for all waste up to min_y, */
+ /* but we'll now add more waste for everything we've visited */
+ waste_area += visited_width * (node->y - min_y);
+ min_y = node->y;
+ /* the first time through, visited_width might be reduced */
+ if (node->x < x0)
+ visited_width += node->next->x - x0;
+ else
+ visited_width += node->next->x - node->x;
+ } else {
+ /* add waste area */
+ int under_width = node->next->x - node->x;
+ if (under_width + visited_width > width)
+ under_width = width - visited_width;
+ waste_area += under_width * (min_y - node->y);
+ visited_width += under_width;
+ }
+ node = node->next;
+ }
+ *pwaste = waste_area;
+ return min_y;
+}
+NK_INTERN struct nk_rp__findresult
+nk_rp__skyline_find_best_pos(struct nk_rp_context *c, int width, int height)
+{
+ int best_waste = (1<<30), best_x, best_y = (1 << 30);
+ struct nk_rp__findresult fr;
+ struct nk_rp_node **prev, *node, *tail, **best = 0;
+
+ /* align to multiple of c->align */
+ width = (width + c->align - 1);
+ width -= width % c->align;
+ NK_ASSERT(width % c->align == 0);
+
+ node = c->active_head;
+ prev = &c->active_head;
+ while (node->x + width <= c->width) {
+ int y,waste;
+ y = nk_rp__skyline_find_min_y(c, node, node->x, width, &waste);
+ /* actually just want to test BL */
+ if (c->heuristic == NK_RP_HEURISTIC_Skyline_BL_sortHeight) {
+ /* bottom left */
+ if (y < best_y) {
+ best_y = y;
+ best = prev;
+ }
+ } else {
+ /* best-fit */
+ if (y + height <= c->height) {
+ /* can only use it if it first vertically */
+ if (y < best_y || (y == best_y && waste < best_waste)) {
+ best_y = y;
+ best_waste = waste;
+ best = prev;
+ }
+ }
+ }
+ prev = &node->next;
+ node = node->next;
+ }
+ best_x = (best == 0) ? 0 : (*best)->x;
+
+ /* if doing best-fit (BF), we also have to try aligning right edge to each node position */
+ /* */
+ /* e.g, if fitting */
+ /* */
+ /* ____________________ */
+ /* |____________________| */
+ /* */
+ /* into */
+ /* */
+ /* | | */
+ /* | ____________| */
+ /* |____________| */
+ /* */
+ /* then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned */
+ /* */
+ /* This makes BF take about 2x the time */
+ if (c->heuristic == NK_RP_HEURISTIC_Skyline_BF_sortHeight)
+ {
+ tail = c->active_head;
+ node = c->active_head;
+ prev = &c->active_head;
+ /* find first node that's admissible */
+ while (tail->x < width)
+ tail = tail->next;
+ while (tail)
+ {
+ int xpos = tail->x - width;
+ int y,waste;
+ NK_ASSERT(xpos >= 0);
+ /* find the left position that matches this */
+ while (node->next->x <= xpos) {
+ prev = &node->next;
+ node = node->next;
+ }
+ NK_ASSERT(node->next->x > xpos && node->x <= xpos);
+ y = nk_rp__skyline_find_min_y(c, node, xpos, width, &waste);
+ if (y + height < c->height) {
+ if (y <= best_y) {
+ if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
+ best_x = xpos;
+ NK_ASSERT(y <= best_y);
+ best_y = y;
+ best_waste = waste;
+ best = prev;
+ }
+ }
+ }
+ tail = tail->next;
+ }
+ }
+ fr.prev_link = best;
+ fr.x = best_x;
+ fr.y = best_y;
+ return fr;
+}
+NK_INTERN struct nk_rp__findresult
+nk_rp__skyline_pack_rectangle(struct nk_rp_context *context, int width, int height)
+{
+ /* find best position according to heuristic */
+ struct nk_rp__findresult res = nk_rp__skyline_find_best_pos(context, width, height);
+ struct nk_rp_node *node, *cur;
+
+ /* bail if: */
+ /* 1. it failed */
+ /* 2. the best node doesn't fit (we don't always check this) */
+ /* 3. we're out of memory */
+ if (res.prev_link == 0 || res.y + height > context->height || context->free_head == 0) {
+ res.prev_link = 0;
+ return res;
+ }
+
+ /* on success, create new node */
+ node = context->free_head;
+ node->x = (nk_rp_coord) res.x;
+ node->y = (nk_rp_coord) (res.y + height);
+
+ context->free_head = node->next;
+
+ /* insert the new node into the right starting point, and */
+ /* let 'cur' point to the remaining nodes needing to be */
+ /* stitched back in */
+ cur = *res.prev_link;
+ if (cur->x < res.x) {
+ /* preserve the existing one, so start testing with the next one */
+ struct nk_rp_node *next = cur->next;
+ cur->next = node;
+ cur = next;
+ } else {
+ *res.prev_link = node;
+ }
+
+ /* from here, traverse cur and free the nodes, until we get to one */
+ /* that shouldn't be freed */
+ while (cur->next && cur->next->x <= res.x + width) {
+ struct nk_rp_node *next = cur->next;
+ /* move the current node to the free list */
+ cur->next = context->free_head;
+ context->free_head = cur;
+ cur = next;
+ }
+ /* stitch the list back in */
+ node->next = cur;
+
+ if (cur->x < res.x + width)
+ cur->x = (nk_rp_coord) (res.x + width);
+ return res;
+}
+NK_INTERN int
+nk_rect_height_compare(const void *a, const void *b)
+{
+ const struct nk_rp_rect *p = (const struct nk_rp_rect *) a;
+ const struct nk_rp_rect *q = (const struct nk_rp_rect *) b;
+ if (p->h > q->h)
+ return -1;
+ if (p->h < q->h)
+ return 1;
+ return (p->w > q->w) ? -1 : (p->w < q->w);
+}
+NK_INTERN int
+nk_rect_original_order(const void *a, const void *b)
+{
+ const struct nk_rp_rect *p = (const struct nk_rp_rect *) a;
+ const struct nk_rp_rect *q = (const struct nk_rp_rect *) b;
+ return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
+}
+NK_INTERN void
+nk_rp_qsort(struct nk_rp_rect *array, unsigned int len, int(*cmp)(const void*,const void*))
+{
+ /* iterative quick sort */
+ #define NK_MAX_SORT_STACK 64
+ unsigned right, left = 0, stack[NK_MAX_SORT_STACK], pos = 0;
+ unsigned seed = len/2 * 69069+1;
+ for (;;) {
+ for (; left+1 < len; len++) {
+ struct nk_rp_rect pivot, tmp;
+ if (pos == NK_MAX_SORT_STACK) len = stack[pos = 0];
+ pivot = array[left+seed%(len-left)];
+ seed = seed * 69069 + 1;
+ stack[pos++] = len;
+ for (right = left-1;;) {
+ while (cmp(&array[++right], &pivot) < 0);
+ while (cmp(&pivot, &array[--len]) < 0);
+ if (right >= len) break;
+ tmp = array[right];
+ array[right] = array[len];
+ array[len] = tmp;
+ }
+ }
+ if (pos == 0) break;
+ left = len;
+ len = stack[--pos];
+ }
+ #undef NK_MAX_SORT_STACK
+}
+NK_INTERN void
+nk_rp_pack_rects(struct nk_rp_context *context, struct nk_rp_rect *rects, int num_rects)
+{
+ int i;
+ /* we use the 'was_packed' field internally to allow sorting/unsorting */
+ for (i=0; i < num_rects; ++i) {
+ rects[i].was_packed = i;
+ }
+
+ /* sort according to heuristic */
+ nk_rp_qsort(rects, (unsigned)num_rects, nk_rect_height_compare);
+
+ for (i=0; i < num_rects; ++i) {
+ struct nk_rp__findresult fr = nk_rp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
+ if (fr.prev_link) {
+ rects[i].x = (nk_rp_coord) fr.x;
+ rects[i].y = (nk_rp_coord) fr.y;
+ } else {
+ rects[i].x = rects[i].y = NK_RP__MAXVAL;
+ }
+ }
+
+ /* unsort */
+ nk_rp_qsort(rects, (unsigned)num_rects, nk_rect_original_order);
+
+ /* set was_packed flags */
+ for (i=0; i < num_rects; ++i)
+ rects[i].was_packed = !(rects[i].x == NK_RP__MAXVAL && rects[i].y == NK_RP__MAXVAL);
+}
+
+/*
+ * ==============================================================
+ *
+ * TRUETYPE
+ *
+ * ===============================================================
+ */
+/* stb_truetype.h - v1.07 - public domain */
+#define NK_TT_MAX_OVERSAMPLE 8
+#define NK_TT__OVER_MASK (NK_TT_MAX_OVERSAMPLE-1)
+
+struct nk_tt_bakedchar {
+ unsigned short x0,y0,x1,y1;
+ /* coordinates of bbox in bitmap */
+ float xoff,yoff,xadvance;
+};
+
+struct nk_tt_aligned_quad{
+ float x0,y0,s0,t0; /* top-left */
+ float x1,y1,s1,t1; /* bottom-right */
+};
+
+struct nk_tt_packedchar {
+ unsigned short x0,y0,x1,y1;
+ /* coordinates of bbox in bitmap */
+ float xoff,yoff,xadvance;
+ float xoff2,yoff2;
+};
+
+struct nk_tt_pack_range {
+ float font_size;
+ int first_unicode_codepoint_in_range;
+ /* if non-zero, then the chars are continuous, and this is the first codepoint */
+ int *array_of_unicode_codepoints;
+ /* if non-zero, then this is an array of unicode codepoints */
+ int num_chars;
+ struct nk_tt_packedchar *chardata_for_range; /* output */
+ unsigned char h_oversample, v_oversample;
+ /* don't set these, they're used internally */
+};
+
+struct nk_tt_pack_context {
+ void *pack_info;
+ int width;
+ int height;
+ int stride_in_bytes;
+ int padding;
+ unsigned int h_oversample, v_oversample;
+ unsigned char *pixels;
+ void *nodes;
+};
+
+struct nk_tt_fontinfo {
+ const unsigned char* data; /* pointer to .ttf file */
+ int fontstart;/* offset of start of font */
+ int numGlyphs;/* number of glyphs, needed for range checking */
+ int loca,head,glyf,hhea,hmtx,kern; /* table locations as offset from start of .ttf */
+ int index_map; /* a cmap mapping for our chosen character encoding */
+ int indexToLocFormat; /* format needed to map from glyph index to glyph */
+};
+
+enum {
+ NK_TT_vmove=1,
+ NK_TT_vline,
+ NK_TT_vcurve
+};
+
+struct nk_tt_vertex {
+ short x,y,cx,cy;
+ unsigned char type,padding;
+};
+
+struct nk_tt__bitmap{
+ int w,h,stride;
+ unsigned char *pixels;
+};
+
+struct nk_tt__hheap_chunk {
+ struct nk_tt__hheap_chunk *next;
+};
+struct nk_tt__hheap {
+ struct nk_allocator alloc;
+ struct nk_tt__hheap_chunk *head;
+ void *first_free;
+ int num_remaining_in_head_chunk;
+};
+
+struct nk_tt__edge {
+ float x0,y0, x1,y1;
+ int invert;
+};
+
+struct nk_tt__active_edge {
+ struct nk_tt__active_edge *next;
+ float fx,fdx,fdy;
+ float direction;
+ float sy;
+ float ey;
+};
+struct nk_tt__point {float x,y;};
+
+#define NK_TT_MACSTYLE_DONTCARE 0
+#define NK_TT_MACSTYLE_BOLD 1
+#define NK_TT_MACSTYLE_ITALIC 2
+#define NK_TT_MACSTYLE_UNDERSCORE 4
+#define NK_TT_MACSTYLE_NONE 8
+/* <= not same as 0, this makes us check the bitfield is 0 */
+
+enum { /* platformID */
+ NK_TT_PLATFORM_ID_UNICODE =0,
+ NK_TT_PLATFORM_ID_MAC =1,
+ NK_TT_PLATFORM_ID_ISO =2,
+ NK_TT_PLATFORM_ID_MICROSOFT =3
+};
+
+enum { /* encodingID for NK_TT_PLATFORM_ID_UNICODE */
+ NK_TT_UNICODE_EID_UNICODE_1_0 =0,
+ NK_TT_UNICODE_EID_UNICODE_1_1 =1,
+ NK_TT_UNICODE_EID_ISO_10646 =2,
+ NK_TT_UNICODE_EID_UNICODE_2_0_BMP=3,
+ NK_TT_UNICODE_EID_UNICODE_2_0_FULL=4
+};
+
+enum { /* encodingID for NK_TT_PLATFORM_ID_MICROSOFT */
+ NK_TT_MS_EID_SYMBOL =0,
+ NK_TT_MS_EID_UNICODE_BMP =1,
+ NK_TT_MS_EID_SHIFTJIS =2,
+ NK_TT_MS_EID_UNICODE_FULL =10
+};
+
+enum { /* encodingID for NK_TT_PLATFORM_ID_MAC; same as Script Manager codes */
+ NK_TT_MAC_EID_ROMAN =0, NK_TT_MAC_EID_ARABIC =4,
+ NK_TT_MAC_EID_JAPANESE =1, NK_TT_MAC_EID_HEBREW =5,
+ NK_TT_MAC_EID_CHINESE_TRAD =2, NK_TT_MAC_EID_GREEK =6,
+ NK_TT_MAC_EID_KOREAN =3, NK_TT_MAC_EID_RUSSIAN =7
+};
+
+enum { /* languageID for NK_TT_PLATFORM_ID_MICROSOFT; same as LCID... */
+ /* problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs */
+ NK_TT_MS_LANG_ENGLISH =0x0409, NK_TT_MS_LANG_ITALIAN =0x0410,
+ NK_TT_MS_LANG_CHINESE =0x0804, NK_TT_MS_LANG_JAPANESE =0x0411,
+ NK_TT_MS_LANG_DUTCH =0x0413, NK_TT_MS_LANG_KOREAN =0x0412,
+ NK_TT_MS_LANG_FRENCH =0x040c, NK_TT_MS_LANG_RUSSIAN =0x0419,
+ NK_TT_MS_LANG_GERMAN =0x0407, NK_TT_MS_LANG_SPANISH =0x0409,
+ NK_TT_MS_LANG_HEBREW =0x040d, NK_TT_MS_LANG_SWEDISH =0x041D
+};
+
+enum { /* languageID for NK_TT_PLATFORM_ID_MAC */
+ NK_TT_MAC_LANG_ENGLISH =0 , NK_TT_MAC_LANG_JAPANESE =11,
+ NK_TT_MAC_LANG_ARABIC =12, NK_TT_MAC_LANG_KOREAN =23,
+ NK_TT_MAC_LANG_DUTCH =4 , NK_TT_MAC_LANG_RUSSIAN =32,
+ NK_TT_MAC_LANG_FRENCH =1 , NK_TT_MAC_LANG_SPANISH =6 ,
+ NK_TT_MAC_LANG_GERMAN =2 , NK_TT_MAC_LANG_SWEDISH =5 ,
+ NK_TT_MAC_LANG_HEBREW =10, NK_TT_MAC_LANG_CHINESE_SIMPLIFIED =33,
+ NK_TT_MAC_LANG_ITALIAN =3 , NK_TT_MAC_LANG_CHINESE_TRAD =19
+};
+
+#define nk_ttBYTE(p) (* (const nk_byte *) (p))
+#define nk_ttCHAR(p) (* (const char *) (p))
+
+#if defined(NK_BIGENDIAN) && !defined(NK_ALLOW_UNALIGNED_TRUETYPE)
+ #define nk_ttUSHORT(p) (* (nk_ushort *) (p))
+ #define nk_ttSHORT(p) (* (nk_short *) (p))
+ #define nk_ttULONG(p) (* (nk_uint *) (p))
+ #define nk_ttLONG(p) (* (nk_int *) (p))
+#else
+ static nk_ushort nk_ttUSHORT(const nk_byte *p) { return (nk_ushort)(p[0]*256 + p[1]); }
+ static nk_short nk_ttSHORT(const nk_byte *p) { return (nk_short)(p[0]*256 + p[1]); }
+ static nk_uint nk_ttULONG(const nk_byte *p) { return (nk_uint)((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]); }
+#endif
+
+#define nk_tt_tag4(p,c0,c1,c2,c3)\
+ ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3))
+#define nk_tt_tag(p,str) nk_tt_tag4(p,str[0],str[1],str[2],str[3])
+
+NK_INTERN int nk_tt_GetGlyphShape(const struct nk_tt_fontinfo *info, struct nk_allocator *alloc,
+ int glyph_index, struct nk_tt_vertex **pvertices);
+
+NK_INTERN nk_uint
+nk_tt__find_table(const nk_byte *data, nk_uint fontstart, const char *tag)
+{
+ /* @OPTIMIZE: binary search */
+ nk_int num_tables = nk_ttUSHORT(data+fontstart+4);
+ nk_uint tabledir = fontstart + 12;
+ nk_int i;
+ for (i = 0; i < num_tables; ++i) {
+ nk_uint loc = tabledir + (nk_uint)(16*i);
+ if (nk_tt_tag(data+loc+0, tag))
+ return nk_ttULONG(data+loc+8);
+ }
+ return 0;
+}
+NK_INTERN int
+nk_tt_InitFont(struct nk_tt_fontinfo *info, const unsigned char *data2, int fontstart)
+{
+ nk_uint cmap, t;
+ nk_int i,numTables;
+ const nk_byte *data = (const nk_byte *) data2;
+
+ info->data = data;
+ info->fontstart = fontstart;
+
+ cmap = nk_tt__find_table(data, (nk_uint)fontstart, "cmap"); /* required */
+ info->loca = (int)nk_tt__find_table(data, (nk_uint)fontstart, "loca"); /* required */
+ info->head = (int)nk_tt__find_table(data, (nk_uint)fontstart, "head"); /* required */
+ info->glyf = (int)nk_tt__find_table(data, (nk_uint)fontstart, "glyf"); /* required */
+ info->hhea = (int)nk_tt__find_table(data, (nk_uint)fontstart, "hhea"); /* required */
+ info->hmtx = (int)nk_tt__find_table(data, (nk_uint)fontstart, "hmtx"); /* required */
+ info->kern = (int)nk_tt__find_table(data, (nk_uint)fontstart, "kern"); /* not required */
+ if (!cmap || !info->loca || !info->head || !info->glyf || !info->hhea || !info->hmtx)
+ return 0;
+
+ t = nk_tt__find_table(data, (nk_uint)fontstart, "maxp");
+ if (t) info->numGlyphs = nk_ttUSHORT(data+t+4);
+ else info->numGlyphs = 0xffff;
+
+ /* find a cmap encoding table we understand *now* to avoid searching */
+ /* later. (todo: could make this installable) */
+ /* the same regardless of glyph. */
+ numTables = nk_ttUSHORT(data + cmap + 2);
+ info->index_map = 0;
+ for (i=0; i < numTables; ++i)
+ {
+ nk_uint encoding_record = cmap + 4 + 8 * (nk_uint)i;
+ /* find an encoding we understand: */
+ switch(nk_ttUSHORT(data+encoding_record)) {
+ case NK_TT_PLATFORM_ID_MICROSOFT:
+ switch (nk_ttUSHORT(data+encoding_record+2)) {
+ case NK_TT_MS_EID_UNICODE_BMP:
+ case NK_TT_MS_EID_UNICODE_FULL:
+ /* MS/Unicode */
+ info->index_map = (int)(cmap + nk_ttULONG(data+encoding_record+4));
+ break;
+ default: break;
+ } break;
+ case NK_TT_PLATFORM_ID_UNICODE:
+ /* Mac/iOS has these */
+ /* all the encodingIDs are unicode, so we don't bother to check it */
+ info->index_map = (int)(cmap + nk_ttULONG(data+encoding_record+4));
+ break;
+ default: break;
+ }
+ }
+ if (info->index_map == 0)
+ return 0;
+ info->indexToLocFormat = nk_ttUSHORT(data+info->head + 50);
+ return 1;
+}
+NK_INTERN int
+nk_tt_FindGlyphIndex(const struct nk_tt_fontinfo *info, int unicode_codepoint)
+{
+ const nk_byte *data = info->data;
+ nk_uint index_map = (nk_uint)info->index_map;
+
+ nk_ushort format = nk_ttUSHORT(data + index_map + 0);
+ if (format == 0) { /* apple byte encoding */
+ nk_int bytes = nk_ttUSHORT(data + index_map + 2);
+ if (unicode_codepoint < bytes-6)
+ return nk_ttBYTE(data + index_map + 6 + unicode_codepoint);
+ return 0;
+ } else if (format == 6) {
+ nk_uint first = nk_ttUSHORT(data + index_map + 6);
+ nk_uint count = nk_ttUSHORT(data + index_map + 8);
+ if ((nk_uint) unicode_codepoint >= first && (nk_uint) unicode_codepoint < first+count)
+ return nk_ttUSHORT(data + index_map + 10 + (unicode_codepoint - (int)first)*2);
+ return 0;
+ } else if (format == 2) {
+ NK_ASSERT(0); /* @TODO: high-byte mapping for japanese/chinese/korean */
+ return 0;
+ } else if (format == 4) { /* standard mapping for windows fonts: binary search collection of ranges */
+ nk_ushort segcount = nk_ttUSHORT(data+index_map+6) >> 1;
+ nk_ushort searchRange = nk_ttUSHORT(data+index_map+8) >> 1;
+ nk_ushort entrySelector = nk_ttUSHORT(data+index_map+10);
+ nk_ushort rangeShift = nk_ttUSHORT(data+index_map+12) >> 1;
+
+ /* do a binary search of the segments */
+ nk_uint endCount = index_map + 14;
+ nk_uint search = endCount;
+
+ if (unicode_codepoint > 0xffff)
+ return 0;
+
+ /* they lie from endCount .. endCount + segCount */
+ /* but searchRange is the nearest power of two, so... */
+ if (unicode_codepoint >= nk_ttUSHORT(data + search + rangeShift*2))
+ search += (nk_uint)(rangeShift*2);
+
+ /* now decrement to bias correctly to find smallest */
+ search -= 2;
+ while (entrySelector) {
+ nk_ushort end;
+ searchRange >>= 1;
+ end = nk_ttUSHORT(data + search + searchRange*2);
+ if (unicode_codepoint > end)
+ search += (nk_uint)(searchRange*2);
+ --entrySelector;
+ }
+ search += 2;
+
+ {
+ nk_ushort offset, start;
+ nk_ushort item = (nk_ushort) ((search - endCount) >> 1);
+
+ NK_ASSERT(unicode_codepoint <= nk_ttUSHORT(data + endCount + 2*item));
+ start = nk_ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item);
+ if (unicode_codepoint < start)
+ return 0;
+
+ offset = nk_ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item);
+ if (offset == 0)
+ return (nk_ushort) (unicode_codepoint + nk_ttSHORT(data + index_map + 14 + segcount*4 + 2 + 2*item));
+
+ return nk_ttUSHORT(data + offset + (unicode_codepoint-start)*2 + index_map + 14 + segcount*6 + 2 + 2*item);
+ }
+ } else if (format == 12 || format == 13) {
+ nk_uint ngroups = nk_ttULONG(data+index_map+12);
+ nk_int low,high;
+ low = 0; high = (nk_int)ngroups;
+ /* Binary search the right group. */
+ while (low < high) {
+ nk_int mid = low + ((high-low) >> 1); /* rounds down, so low <= mid < high */
+ nk_uint start_char = nk_ttULONG(data+index_map+16+mid*12);
+ nk_uint end_char = nk_ttULONG(data+index_map+16+mid*12+4);
+ if ((nk_uint) unicode_codepoint < start_char)
+ high = mid;
+ else if ((nk_uint) unicode_codepoint > end_char)
+ low = mid+1;
+ else {
+ nk_uint start_glyph = nk_ttULONG(data+index_map+16+mid*12+8);
+ if (format == 12)
+ return (int)start_glyph + (int)unicode_codepoint - (int)start_char;
+ else /* format == 13 */
+ return (int)start_glyph;
+ }
+ }
+ return 0; /* not found */
+ }
+ /* @TODO */
+ NK_ASSERT(0);
+ return 0;
+}
+NK_INTERN void
+nk_tt_setvertex(struct nk_tt_vertex *v, nk_byte type, nk_int x, nk_int y, nk_int cx, nk_int cy)
+{
+ v->type = type;
+ v->x = (nk_short) x;
+ v->y = (nk_short) y;
+ v->cx = (nk_short) cx;
+ v->cy = (nk_short) cy;
+}
+NK_INTERN int
+nk_tt__GetGlyfOffset(const struct nk_tt_fontinfo *info, int glyph_index)
+{
+ int g1,g2;
+ if (glyph_index >= info->numGlyphs) return -1; /* glyph index out of range */
+ if (info->indexToLocFormat >= 2) return -1; /* unknown index->glyph map format */
+
+ if (info->indexToLocFormat == 0) {
+ g1 = info->glyf + nk_ttUSHORT(info->data + info->loca + glyph_index * 2) * 2;
+ g2 = info->glyf + nk_ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2;
+ } else {
+ g1 = info->glyf + (int)nk_ttULONG (info->data + info->loca + glyph_index * 4);
+ g2 = info->glyf + (int)nk_ttULONG (info->data + info->loca + glyph_index * 4 + 4);
+ }
+ return g1==g2 ? -1 : g1; /* if length is 0, return -1 */
+}
+NK_INTERN int
+nk_tt_GetGlyphBox(const struct nk_tt_fontinfo *info, int glyph_index,
+ int *x0, int *y0, int *x1, int *y1)
+{
+ int g = nk_tt__GetGlyfOffset(info, glyph_index);
+ if (g < 0) return 0;
+
+ if (x0) *x0 = nk_ttSHORT(info->data + g + 2);
+ if (y0) *y0 = nk_ttSHORT(info->data + g + 4);
+ if (x1) *x1 = nk_ttSHORT(info->data + g + 6);
+ if (y1) *y1 = nk_ttSHORT(info->data + g + 8);
+ return 1;
+}
+NK_INTERN int
+nk_tt__close_shape(struct nk_tt_vertex *vertices, int num_vertices, int was_off,
+ int start_off, nk_int sx, nk_int sy, nk_int scx, nk_int scy, nk_int cx, nk_int cy)
+{
+ if (start_off) {
+ if (was_off)
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy);
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, sx,sy,scx,scy);
+ } else {
+ if (was_off)
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve,sx,sy,cx,cy);
+ else
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vline,sx,sy,0,0);
+ }
+ return num_vertices;
+}
+NK_INTERN int
+nk_tt_GetGlyphShape(const struct nk_tt_fontinfo *info, struct nk_allocator *alloc,
+ int glyph_index, struct nk_tt_vertex **pvertices)
+{
+ nk_short numberOfContours;
+ const nk_byte *endPtsOfContours;
+ const nk_byte *data = info->data;
+ struct nk_tt_vertex *vertices=0;
+ int num_vertices=0;
+ int g = nk_tt__GetGlyfOffset(info, glyph_index);
+ *pvertices = 0;
+
+ if (g < 0) return 0;
+ numberOfContours = nk_ttSHORT(data + g);
+ if (numberOfContours > 0) {
+ nk_byte flags=0,flagcount;
+ nk_int ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0;
+ nk_int x,y,cx,cy,sx,sy, scx,scy;
+ const nk_byte *points;
+ endPtsOfContours = (data + g + 10);
+ ins = nk_ttUSHORT(data + g + 10 + numberOfContours * 2);
+ points = data + g + 10 + numberOfContours * 2 + 2 + ins;
+
+ n = 1+nk_ttUSHORT(endPtsOfContours + numberOfContours*2-2);
+ m = n + 2*numberOfContours; /* a loose bound on how many vertices we might need */
+ vertices = (struct nk_tt_vertex *)alloc->alloc(alloc->userdata, 0, (nk_size)m * sizeof(vertices[0]));
+ if (vertices == 0)
+ return 0;
+
+ next_move = 0;
+ flagcount=0;
+
+ /* in first pass, we load uninterpreted data into the allocated array */
+ /* above, shifted to the end of the array so we won't overwrite it when */
+ /* we create our final data starting from the front */
+ off = m - n; /* starting offset for uninterpreted data, regardless of how m ends up being calculated */
+
+ /* first load flags */
+ for (i=0; i < n; ++i) {
+ if (flagcount == 0) {
+ flags = *points++;
+ if (flags & 8)
+ flagcount = *points++;
+ } else --flagcount;
+ vertices[off+i].type = flags;
+ }
+
+ /* now load x coordinates */
+ x=0;
+ for (i=0; i < n; ++i) {
+ flags = vertices[off+i].type;
+ if (flags & 2) {
+ nk_short dx = *points++;
+ x += (flags & 16) ? dx : -dx; /* ??? */
+ } else {
+ if (!(flags & 16)) {
+ x = x + (nk_short) (points[0]*256 + points[1]);
+ points += 2;
+ }
+ }
+ vertices[off+i].x = (nk_short) x;
+ }
+
+ /* now load y coordinates */
+ y=0;
+ for (i=0; i < n; ++i) {
+ flags = vertices[off+i].type;
+ if (flags & 4) {
+ nk_short dy = *points++;
+ y += (flags & 32) ? dy : -dy; /* ??? */
+ } else {
+ if (!(flags & 32)) {
+ y = y + (nk_short) (points[0]*256 + points[1]);
+ points += 2;
+ }
+ }
+ vertices[off+i].y = (nk_short) y;
+ }
+
+ /* now convert them to our format */
+ num_vertices=0;
+ sx = sy = cx = cy = scx = scy = 0;
+ for (i=0; i < n; ++i)
+ {
+ flags = vertices[off+i].type;
+ x = (nk_short) vertices[off+i].x;
+ y = (nk_short) vertices[off+i].y;
+
+ if (next_move == i) {
+ if (i != 0)
+ num_vertices = nk_tt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
+
+ /* now start the new one */
+ start_off = !(flags & 1);
+ if (start_off) {
+ /* if we start off with an off-curve point, then when we need to find a point on the curve */
+ /* where we can start, and we need to save some state for when we wraparound. */
+ scx = x;
+ scy = y;
+ if (!(vertices[off+i+1].type & 1)) {
+ /* next point is also a curve point, so interpolate an on-point curve */
+ sx = (x + (nk_int) vertices[off+i+1].x) >> 1;
+ sy = (y + (nk_int) vertices[off+i+1].y) >> 1;
+ } else {
+ /* otherwise just use the next point as our start point */
+ sx = (nk_int) vertices[off+i+1].x;
+ sy = (nk_int) vertices[off+i+1].y;
+ ++i; /* we're using point i+1 as the starting point, so skip it */
+ }
+ } else {
+ sx = x;
+ sy = y;
+ }
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vmove,sx,sy,0,0);
+ was_off = 0;
+ next_move = 1 + nk_ttUSHORT(endPtsOfContours+j*2);
+ ++j;
+ } else {
+ if (!(flags & 1))
+ { /* if it's a curve */
+ if (was_off) /* two off-curve control points in a row means interpolate an on-curve midpoint */
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy);
+ cx = x;
+ cy = y;
+ was_off = 1;
+ } else {
+ if (was_off)
+ nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, x,y, cx, cy);
+ else nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vline, x,y,0,0);
+ was_off = 0;
+ }
+ }
+ }
+ num_vertices = nk_tt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
+ } else if (numberOfContours == -1) {
+ /* Compound shapes. */
+ int more = 1;
+ const nk_byte *comp = data + g + 10;
+ num_vertices = 0;
+ vertices = 0;
+
+ while (more)
+ {
+ nk_ushort flags, gidx;
+ int comp_num_verts = 0, i;
+ struct nk_tt_vertex *comp_verts = 0, *tmp = 0;
+ float mtx[6] = {1,0,0,1,0,0}, m, n;
+
+ flags = (nk_ushort)nk_ttSHORT(comp); comp+=2;
+ gidx = (nk_ushort)nk_ttSHORT(comp); comp+=2;
+
+ if (flags & 2) { /* XY values */
+ if (flags & 1) { /* shorts */
+ mtx[4] = nk_ttSHORT(comp); comp+=2;
+ mtx[5] = nk_ttSHORT(comp); comp+=2;
+ } else {
+ mtx[4] = nk_ttCHAR(comp); comp+=1;
+ mtx[5] = nk_ttCHAR(comp); comp+=1;
+ }
+ } else {
+ /* @TODO handle matching point */
+ NK_ASSERT(0);
+ }
+ if (flags & (1<<3)) { /* WE_HAVE_A_SCALE */
+ mtx[0] = mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ mtx[1] = mtx[2] = 0;
+ } else if (flags & (1<<6)) { /* WE_HAVE_AN_X_AND_YSCALE */
+ mtx[0] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ mtx[1] = mtx[2] = 0;
+ mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ } else if (flags & (1<<7)) { /* WE_HAVE_A_TWO_BY_TWO */
+ mtx[0] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ mtx[1] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ mtx[2] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;
+ }
+
+ /* Find transformation scales. */
+ m = (float) NK_SQRT(mtx[0]*mtx[0] + mtx[1]*mtx[1]);
+ n = (float) NK_SQRT(mtx[2]*mtx[2] + mtx[3]*mtx[3]);
+
+ /* Get indexed glyph. */
+ comp_num_verts = nk_tt_GetGlyphShape(info, alloc, gidx, &comp_verts);
+ if (comp_num_verts > 0)
+ {
+ /* Transform vertices. */
+ for (i = 0; i < comp_num_verts; ++i) {
+ struct nk_tt_vertex* v = &comp_verts[i];
+ short x,y;
+ x=v->x; y=v->y;
+ v->x = (short)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));
+ v->y = (short)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));
+ x=v->cx; y=v->cy;
+ v->cx = (short)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));
+ v->cy = (short)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));
+ }
+ /* Append vertices. */
+ tmp = (struct nk_tt_vertex*)alloc->alloc(alloc->userdata, 0,
+ (nk_size)(num_vertices+comp_num_verts)*sizeof(struct nk_tt_vertex));
+ if (!tmp) {
+ if (vertices) alloc->free(alloc->userdata, vertices);
+ if (comp_verts) alloc->free(alloc->userdata, comp_verts);
+ return 0;
+ }
+ if (num_vertices > 0) NK_MEMCPY(tmp, vertices, (nk_size)num_vertices*sizeof(struct nk_tt_vertex));
+ NK_MEMCPY(tmp+num_vertices, comp_verts, (nk_size)comp_num_verts*sizeof(struct nk_tt_vertex));
+ if (vertices) alloc->free(alloc->userdata,vertices);
+ vertices = tmp;
+ alloc->free(alloc->userdata,comp_verts);
+ num_vertices += comp_num_verts;
+ }
+ /* More components ? */
+ more = flags & (1<<5);
+ }
+ } else if (numberOfContours < 0) {
+ /* @TODO other compound variations? */
+ NK_ASSERT(0);
+ } else {
+ /* numberOfCounters == 0, do nothing */
+ }
+ *pvertices = vertices;
+ return num_vertices;
+}
+NK_INTERN void
+nk_tt_GetGlyphHMetrics(const struct nk_tt_fontinfo *info, int glyph_index,
+ int *advanceWidth, int *leftSideBearing)
+{
+ nk_ushort numOfLongHorMetrics = nk_ttUSHORT(info->data+info->hhea + 34);
+ if (glyph_index < numOfLongHorMetrics) {
+ if (advanceWidth)
+ *advanceWidth = nk_ttSHORT(info->data + info->hmtx + 4*glyph_index);
+ if (leftSideBearing)
+ *leftSideBearing = nk_ttSHORT(info->data + info->hmtx + 4*glyph_index + 2);
+ } else {
+ if (advanceWidth)
+ *advanceWidth = nk_ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1));
+ if (leftSideBearing)
+ *leftSideBearing = nk_ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));
+ }
+}
+NK_INTERN void
+nk_tt_GetFontVMetrics(const struct nk_tt_fontinfo *info,
+ int *ascent, int *descent, int *lineGap)
+{
+ if (ascent ) *ascent = nk_ttSHORT(info->data+info->hhea + 4);
+ if (descent) *descent = nk_ttSHORT(info->data+info->hhea + 6);
+ if (lineGap) *lineGap = nk_ttSHORT(info->data+info->hhea + 8);
+}
+NK_INTERN float
+nk_tt_ScaleForPixelHeight(const struct nk_tt_fontinfo *info, float height)
+{
+ int fheight = nk_ttSHORT(info->data + info->hhea + 4) - nk_ttSHORT(info->data + info->hhea + 6);
+ return (float) height / (float)fheight;
+}
+NK_INTERN float
+nk_tt_ScaleForMappingEmToPixels(const struct nk_tt_fontinfo *info, float pixels)
+{
+ int unitsPerEm = nk_ttUSHORT(info->data + info->head + 18);
+ return pixels / (float)unitsPerEm;
+}
+
+/*-------------------------------------------------------------
+ * antialiasing software rasterizer
+ * --------------------------------------------------------------*/
+NK_INTERN void
+nk_tt_GetGlyphBitmapBoxSubpixel(const struct nk_tt_fontinfo *font,
+ int glyph, float scale_x, float scale_y,float shift_x, float shift_y,
+ int *ix0, int *iy0, int *ix1, int *iy1)
+{
+ int x0,y0,x1,y1;
+ if (!nk_tt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) {
+ /* e.g. space character */
+ if (ix0) *ix0 = 0;
+ if (iy0) *iy0 = 0;
+ if (ix1) *ix1 = 0;
+ if (iy1) *iy1 = 0;
+ } else {
+ /* move to integral bboxes (treating pixels as little squares, what pixels get touched)? */
+ if (ix0) *ix0 = nk_ifloorf((float)x0 * scale_x + shift_x);
+ if (iy0) *iy0 = nk_ifloorf((float)-y1 * scale_y + shift_y);
+ if (ix1) *ix1 = nk_iceilf ((float)x1 * scale_x + shift_x);
+ if (iy1) *iy1 = nk_iceilf ((float)-y0 * scale_y + shift_y);
+ }
+}
+NK_INTERN void
+nk_tt_GetGlyphBitmapBox(const struct nk_tt_fontinfo *font, int glyph,
+ float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1)
+{
+ nk_tt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y,0.0f,0.0f, ix0, iy0, ix1, iy1);
+}
+
+/*-------------------------------------------------------------
+ * Rasterizer
+ * --------------------------------------------------------------*/
+NK_INTERN void*
+nk_tt__hheap_alloc(struct nk_tt__hheap *hh, nk_size size)
+{
+ if (hh->first_free) {
+ void *p = hh->first_free;
+ hh->first_free = * (void **) p;
+ return p;
+ } else {
+ if (hh->num_remaining_in_head_chunk == 0) {
+ int count = (size < 32 ? 2000 : size < 128 ? 800 : 100);
+ struct nk_tt__hheap_chunk *c = (struct nk_tt__hheap_chunk *)
+ hh->alloc.alloc(hh->alloc.userdata, 0,
+ sizeof(struct nk_tt__hheap_chunk) + size * (nk_size)count);
+ if (c == 0) return 0;
+ c->next = hh->head;
+ hh->head = c;
+ hh->num_remaining_in_head_chunk = count;
+ }
+ --hh->num_remaining_in_head_chunk;
+ return (char *) (hh->head) + size * (nk_size)hh->num_remaining_in_head_chunk;
+ }
+}
+NK_INTERN void
+nk_tt__hheap_free(struct nk_tt__hheap *hh, void *p)
+{
+ *(void **) p = hh->first_free;
+ hh->first_free = p;
+}
+NK_INTERN void
+nk_tt__hheap_cleanup(struct nk_tt__hheap *hh)
+{
+ struct nk_tt__hheap_chunk *c = hh->head;
+ while (c) {
+ struct nk_tt__hheap_chunk *n = c->next;
+ hh->alloc.free(hh->alloc.userdata, c);
+ c = n;
+ }
+}
+NK_INTERN struct nk_tt__active_edge*
+nk_tt__new_active(struct nk_tt__hheap *hh, struct nk_tt__edge *e,
+ int off_x, float start_point)
+{
+ struct nk_tt__active_edge *z = (struct nk_tt__active_edge *)
+ nk_tt__hheap_alloc(hh, sizeof(*z));
+ float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+ /*STBTT_assert(e->y0 <= start_point); */
+ if (!z) return z;
+ z->fdx = dxdy;
+ z->fdy = (dxdy != 0) ? (1/dxdy): 0;
+ z->fx = e->x0 + dxdy * (start_point - e->y0);
+ z->fx -= (float)off_x;
+ z->direction = e->invert ? 1.0f : -1.0f;
+ z->sy = e->y0;
+ z->ey = e->y1;
+ z->next = 0;
+ return z;
+}
+NK_INTERN void
+nk_tt__handle_clipped_edge(float *scanline, int x, struct nk_tt__active_edge *e,
+ float x0, float y0, float x1, float y1)
+{
+ if (y0 == y1) return;
+ NK_ASSERT(y0 < y1);
+ NK_ASSERT(e->sy <= e->ey);
+ if (y0 > e->ey) return;
+ if (y1 < e->sy) return;
+ if (y0 < e->sy) {
+ x0 += (x1-x0) * (e->sy - y0) / (y1-y0);
+ y0 = e->sy;
+ }
+ if (y1 > e->ey) {
+ x1 += (x1-x0) * (e->ey - y1) / (y1-y0);
+ y1 = e->ey;
+ }
+
+ if (x0 == x) NK_ASSERT(x1 <= x+1);
+ else if (x0 == x+1) NK_ASSERT(x1 >= x);
+ else if (x0 <= x) NK_ASSERT(x1 <= x);
+ else if (x0 >= x+1) NK_ASSERT(x1 >= x+1);
+ else NK_ASSERT(x1 >= x && x1 <= x+1);
+
+ if (x0 <= x && x1 <= x)
+ scanline[x] += e->direction * (y1-y0);
+ else if (x0 >= x+1 && x1 >= x+1);
+ else {
+ NK_ASSERT(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1);
+ /* coverage = 1 - average x position */
+ scanline[x] += (float)e->direction * (float)(y1-y0) * (1.0f-((x0-(float)x)+(x1-(float)x))/2.0f);
+ }
+}
+NK_INTERN void
+nk_tt__fill_active_edges_new(float *scanline, float *scanline_fill, int len,
+ struct nk_tt__active_edge *e, float y_top)
+{
+ float y_bottom = y_top+1;
+ while (e)
+ {
+ /* brute force every pixel */
+ /* compute intersection points with top & bottom */
+ NK_ASSERT(e->ey >= y_top);
+ if (e->fdx == 0) {
+ float x0 = e->fx;
+ if (x0 < len) {
+ if (x0 >= 0) {
+ nk_tt__handle_clipped_edge(scanline,(int) x0,e, x0,y_top, x0,y_bottom);
+ nk_tt__handle_clipped_edge(scanline_fill-1,(int) x0+1,e, x0,y_top, x0,y_bottom);
+ } else {
+ nk_tt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom);
+ }
+ }
+ } else {
+ float x0 = e->fx;
+ float dx = e->fdx;
+ float xb = x0 + dx;
+ float x_top, x_bottom;
+ float y0,y1;
+ float dy = e->fdy;
+ NK_ASSERT(e->sy <= y_bottom && e->ey >= y_top);
+
+ /* compute endpoints of line segment clipped to this scanline (if the */
+ /* line segment starts on this scanline. x0 is the intersection of the */
+ /* line with y_top, but that may be off the line segment. */
+ if (e->sy > y_top) {
+ x_top = x0 + dx * (e->sy - y_top);
+ y0 = e->sy;
+ } else {
+ x_top = x0;
+ y0 = y_top;
+ }
+
+ if (e->ey < y_bottom) {
+ x_bottom = x0 + dx * (e->ey - y_top);
+ y1 = e->ey;
+ } else {
+ x_bottom = xb;
+ y1 = y_bottom;
+ }
+
+ if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len)
+ {
+ /* from here on, we don't have to range check x values */
+ if ((int) x_top == (int) x_bottom) {
+ float height;
+ /* simple case, only spans one pixel */
+ int x = (int) x_top;
+ height = y1 - y0;
+ NK_ASSERT(x >= 0 && x < len);
+ scanline[x] += e->direction * (1.0f-(((float)x_top - (float)x) + ((float)x_bottom-(float)x))/2.0f) * (float)height;
+ scanline_fill[x] += e->direction * (float)height; /* everything right of this pixel is filled */
+ } else {
+ int x,x1,x2;
+ float y_crossing, step, sign, area;
+ /* covers 2+ pixels */
+ if (x_top > x_bottom)
+ {
+ /* flip scanline vertically; signed area is the same */
+ float t;
+ y0 = y_bottom - (y0 - y_top);
+ y1 = y_bottom - (y1 - y_top);
+ t = y0; y0 = y1; y1 = t;
+ t = x_bottom; x_bottom = x_top; x_top = t;
+ dx = -dx;
+ dy = -dy;
+ t = x0; x0 = xb; xb = t;
+ }
+
+ x1 = (int) x_top;
+ x2 = (int) x_bottom;
+ /* compute intersection with y axis at x1+1 */
+ y_crossing = ((float)x1+1 - (float)x0) * (float)dy + (float)y_top;
+
+ sign = e->direction;
+ /* area of the rectangle covered from y0..y_crossing */
+ area = sign * (y_crossing-y0);
+ /* area of the triangle (x_top,y0), (x+1,y0), (x+1,y_crossing) */
+ scanline[x1] += area * (1.0f-((float)((float)x_top - (float)x1)+(float)(x1+1-x1))/2.0f);
+
+ step = sign * dy;
+ for (x = x1+1; x < x2; ++x) {
+ scanline[x] += area + step/2;
+ area += step;
+ }
+ y_crossing += (float)dy * (float)(x2 - (x1+1));
+
+ scanline[x2] += area + sign * (1.0f-((float)(x2-x2)+((float)x_bottom-(float)x2))/2.0f) * (y1-y_crossing);
+ scanline_fill[x2] += sign * (y1-y0);
+ }
+ }
+ else
+ {
+ /* if edge goes outside of box we're drawing, we require */
+ /* clipping logic. since this does not match the intended use */
+ /* of this library, we use a different, very slow brute */
+ /* force implementation */
+ int x;
+ for (x=0; x < len; ++x)
+ {
+ /* cases: */
+ /* */
+ /* there can be up to two intersections with the pixel. any intersection */
+ /* with left or right edges can be handled by splitting into two (or three) */
+ /* regions. intersections with top & bottom do not necessitate case-wise logic. */
+ /* */
+ /* the old way of doing this found the intersections with the left & right edges, */
+ /* then used some simple logic to produce up to three segments in sorted order */
+ /* from top-to-bottom. however, this had a problem: if an x edge was epsilon */
+ /* across the x border, then the corresponding y position might not be distinct */
+ /* from the other y segment, and it might ignored as an empty segment. to avoid */
+ /* that, we need to explicitly produce segments based on x positions. */
+
+ /* rename variables to clear pairs */
+ float ya = y_top;
+ float x1 = (float) (x);
+ float x2 = (float) (x+1);
+ float x3 = xb;
+ float y3 = y_bottom;
+ float yb,y2;
+
+ yb = ((float)x - x0) / dx + y_top;
+ y2 = ((float)x+1 - x0) / dx + y_top;
+
+ if (x0 < x1 && x3 > x2) { /* three segments descending down-right */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x1,yb);
+ nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x2,y2);
+ nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);
+ } else if (x3 < x1 && x0 > x2) { /* three segments descending down-left */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x2,y2);
+ nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x1,yb);
+ nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x3,y3);
+ } else if (x0 < x1 && x3 > x1) { /* two segments across x, down-right */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x1,yb);
+ nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x3,y3);
+ } else if (x3 < x1 && x0 > x1) { /* two segments across x, down-left */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x1,yb);
+ nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x3,y3);
+ } else if (x0 < x2 && x3 > x2) { /* two segments across x+1, down-right */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x2,y2);
+ nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);
+ } else if (x3 < x2 && x0 > x2) { /* two segments across x+1, down-left */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x2,y2);
+ nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);
+ } else { /* one segment */
+ nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x3,y3);
+ }
+ }
+ }
+ }
+ e = e->next;
+ }
+}
+NK_INTERN void
+nk_tt__rasterize_sorted_edges(struct nk_tt__bitmap *result, struct nk_tt__edge *e,
+ int n, int vsubsample, int off_x, int off_y, struct nk_allocator *alloc)
+{
+ /* directly AA rasterize edges w/o supersampling */
+ struct nk_tt__hheap hh;
+ struct nk_tt__active_edge *active = 0;
+ int y,j=0, i;
+ float scanline_data[129], *scanline, *scanline2;
+
+ NK_UNUSED(vsubsample);
+ nk_zero_struct(hh);
+ hh.alloc = *alloc;
+
+ if (result->w > 64)
+ scanline = (float *) alloc->alloc(alloc->userdata,0, (nk_size)(result->w*2+1) * sizeof(float));
+ else scanline = scanline_data;
+
+ scanline2 = scanline + result->w;
+ y = off_y;
+ e[n].y0 = (float) (off_y + result->h) + 1;
+
+ while (j < result->h)
+ {
+ /* find center of pixel for this scanline */
+ float scan_y_top = (float)y + 0.0f;
+ float scan_y_bottom = (float)y + 1.0f;
+ struct nk_tt__active_edge **step = &active;
+
+ NK_MEMSET(scanline , 0, (nk_size)result->w*sizeof(scanline[0]));
+ NK_MEMSET(scanline2, 0, (nk_size)(result->w+1)*sizeof(scanline[0]));
+
+ /* update all active edges; */
+ /* remove all active edges that terminate before the top of this scanline */
+ while (*step) {
+ struct nk_tt__active_edge * z = *step;
+ if (z->ey <= scan_y_top) {
+ *step = z->next; /* delete from list */
+ NK_ASSERT(z->direction);
+ z->direction = 0;
+ nk_tt__hheap_free(&hh, z);
+ } else {
+ step = &((*step)->next); /* advance through list */
+ }
+ }
+
+ /* insert all edges that start before the bottom of this scanline */
+ while (e->y0 <= scan_y_bottom) {
+ if (e->y0 != e->y1) {
+ struct nk_tt__active_edge *z = nk_tt__new_active(&hh, e, off_x, scan_y_top);
+ if (z != 0) {
+ NK_ASSERT(z->ey >= scan_y_top);
+ /* insert at front */
+ z->next = active;
+ active = z;
+ }
+ }
+ ++e;
+ }
+
+ /* now process all active edges */
+ if (active)
+ nk_tt__fill_active_edges_new(scanline, scanline2+1, result->w, active, scan_y_top);
+
+ {
+ float sum = 0;
+ for (i=0; i < result->w; ++i) {
+ float k;
+ int m;
+ sum += scanline2[i];
+ k = scanline[i] + sum;
+ k = (float) NK_ABS(k) * 255.0f + 0.5f;
+ m = (int) k;
+ if (m > 255) m = 255;
+ result->pixels[j*result->stride + i] = (unsigned char) m;
+ }
+ }
+ /* advance all the edges */
+ step = &active;
+ while (*step) {
+ struct nk_tt__active_edge *z = *step;
+ z->fx += z->fdx; /* advance to position for current scanline */
+ step = &((*step)->next); /* advance through list */
+ }
+ ++y;
+ ++j;
+ }
+ nk_tt__hheap_cleanup(&hh);
+ if (scanline != scanline_data)
+ alloc->free(alloc->userdata, scanline);
+}
+NK_INTERN void
+nk_tt__sort_edges_ins_sort(struct nk_tt__edge *p, int n)
+{
+ int i,j;
+ #define NK_TT__COMPARE(a,b) ((a)->y0 < (b)->y0)
+ for (i=1; i < n; ++i) {
+ struct nk_tt__edge t = p[i], *a = &t;
+ j = i;
+ while (j > 0) {
+ struct nk_tt__edge *b = &p[j-1];
+ int c = NK_TT__COMPARE(a,b);
+ if (!c) break;
+ p[j] = p[j-1];
+ --j;
+ }
+ if (i != j)
+ p[j] = t;
+ }
+}
+NK_INTERN void
+nk_tt__sort_edges_quicksort(struct nk_tt__edge *p, int n)
+{
+ /* threshold for transitioning to insertion sort */
+ while (n > 12) {
+ struct nk_tt__edge t;
+ int c01,c12,c,m,i,j;
+
+ /* compute median of three */
+ m = n >> 1;
+ c01 = NK_TT__COMPARE(&p[0],&p[m]);
+ c12 = NK_TT__COMPARE(&p[m],&p[n-1]);
+
+ /* if 0 >= mid >= end, or 0 < mid < end, then use mid */
+ if (c01 != c12) {
+ /* otherwise, we'll need to swap something else to middle */
+ int z;
+ c = NK_TT__COMPARE(&p[0],&p[n-1]);
+ /* 0>mid && mid<n: 0>n => n; 0<n => 0 */
+ /* 0<mid && mid>n: 0>n => 0; 0<n => n */
+ z = (c == c12) ? 0 : n-1;
+ t = p[z];
+ p[z] = p[m];
+ p[m] = t;
+ }
+
+ /* now p[m] is the median-of-three */
+ /* swap it to the beginning so it won't move around */
+ t = p[0];
+ p[0] = p[m];
+ p[m] = t;
+
+ /* partition loop */
+ i=1;
+ j=n-1;
+ for(;;) {
+ /* handling of equality is crucial here */
+ /* for sentinels & efficiency with duplicates */
+ for (;;++i) {
+ if (!NK_TT__COMPARE(&p[i], &p[0])) break;
+ }
+ for (;;--j) {
+ if (!NK_TT__COMPARE(&p[0], &p[j])) break;
+ }
+
+ /* make sure we haven't crossed */
+ if (i >= j) break;
+ t = p[i];
+ p[i] = p[j];
+ p[j] = t;
+
+ ++i;
+ --j;
+
+ }
+
+ /* recurse on smaller side, iterate on larger */
+ if (j < (n-i)) {
+ nk_tt__sort_edges_quicksort(p,j);
+ p = p+i;
+ n = n-i;
+ } else {
+ nk_tt__sort_edges_quicksort(p+i, n-i);
+ n = j;
+ }
+ }
+}
+NK_INTERN void
+nk_tt__sort_edges(struct nk_tt__edge *p, int n)
+{
+ nk_tt__sort_edges_quicksort(p, n);
+ nk_tt__sort_edges_ins_sort(p, n);
+}
+NK_INTERN void
+nk_tt__rasterize(struct nk_tt__bitmap *result, struct nk_tt__point *pts,
+ int *wcount, int windings, float scale_x, float scale_y,
+ float shift_x, float shift_y, int off_x, int off_y, int invert,
+ struct nk_allocator *alloc)
+{
+ float y_scale_inv = invert ? -scale_y : scale_y;
+ struct nk_tt__edge *e;
+ int n,i,j,k,m;
+ int vsubsample = 1;
+ /* vsubsample should divide 255 evenly; otherwise we won't reach full opacity */
+
+ /* now we have to blow out the windings into explicit edge lists */
+ n = 0;
+ for (i=0; i < windings; ++i)
+ n += wcount[i];
+
+ e = (struct nk_tt__edge*)
+ alloc->alloc(alloc->userdata, 0,(sizeof(*e) * (nk_size)(n+1)));
+ if (e == 0) return;
+ n = 0;
+
+ m=0;
+ for (i=0; i < windings; ++i)
+ {
+ struct nk_tt__point *p = pts + m;
+ m += wcount[i];
+ j = wcount[i]-1;
+ for (k=0; k < wcount[i]; j=k++) {
+ int a=k,b=j;
+ /* skip the edge if horizontal */
+ if (p[j].y == p[k].y)
+ continue;
+
+ /* add edge from j to k to the list */
+ e[n].invert = 0;
+ if (invert ? p[j].y > p[k].y : p[j].y < p[k].y) {
+ e[n].invert = 1;
+ a=j,b=k;
+ }
+ e[n].x0 = p[a].x * scale_x + shift_x;
+ e[n].y0 = (p[a].y * y_scale_inv + shift_y) * (float)vsubsample;
+ e[n].x1 = p[b].x * scale_x + shift_x;
+ e[n].y1 = (p[b].y * y_scale_inv + shift_y) * (float)vsubsample;
+ ++n;
+ }
+ }
+
+ /* now sort the edges by their highest point (should snap to integer, and then by x) */
+ /*STBTT_sort(e, n, sizeof(e[0]), nk_tt__edge_compare); */
+ nk_tt__sort_edges(e, n);
+ /* now, traverse the scanlines and find the intersections on each scanline, use xor winding rule */
+ nk_tt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, alloc);
+ alloc->free(alloc->userdata, e);
+}
+NK_INTERN void
+nk_tt__add_point(struct nk_tt__point *points, int n, float x, float y)
+{
+ if (!points) return; /* during first pass, it's unallocated */
+ points[n].x = x;
+ points[n].y = y;
+}
+NK_INTERN int
+nk_tt__tesselate_curve(struct nk_tt__point *points, int *num_points,
+ float x0, float y0, float x1, float y1, float x2, float y2,
+ float objspace_flatness_squared, int n)
+{
+ /* tesselate until threshold p is happy...
+ * @TODO warped to compensate for non-linear stretching */
+ /* midpoint */
+ float mx = (x0 + 2*x1 + x2)/4;
+ float my = (y0 + 2*y1 + y2)/4;
+ /* versus directly drawn line */
+ float dx = (x0+x2)/2 - mx;
+ float dy = (y0+y2)/2 - my;
+ if (n > 16) /* 65536 segments on one curve better be enough! */
+ return 1;
+
+ /* half-pixel error allowed... need to be smaller if AA */
+ if (dx*dx+dy*dy > objspace_flatness_squared) {
+ nk_tt__tesselate_curve(points, num_points, x0,y0,
+ (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1);
+ nk_tt__tesselate_curve(points, num_points, mx,my,
+ (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1);
+ } else {
+ nk_tt__add_point(points, *num_points,x2,y2);
+ *num_points = *num_points+1;
+ }
+ return 1;
+}
+NK_INTERN struct nk_tt__point*
+nk_tt_FlattenCurves(struct nk_tt_vertex *vertices, int num_verts,
+ float objspace_flatness, int **contour_lengths, int *num_contours,
+ struct nk_allocator *alloc)
+{
+ /* returns number of contours */
+ struct nk_tt__point *points=0;
+ int num_points=0;
+ float objspace_flatness_squared = objspace_flatness * objspace_flatness;
+ int i;
+ int n=0;
+ int start=0;
+ int pass;
+
+ /* count how many "moves" there are to get the contour count */
+ for (i=0; i < num_verts; ++i)
+ if (vertices[i].type == NK_TT_vmove) ++n;
+
+ *num_contours = n;
+ if (n == 0) return 0;
+
+ *contour_lengths = (int *)
+ alloc->alloc(alloc->userdata,0, (sizeof(**contour_lengths) * (nk_size)n));
+ if (*contour_lengths == 0) {
+ *num_contours = 0;
+ return 0;
+ }
+
+ /* make two passes through the points so we don't need to realloc */
+ for (pass=0; pass < 2; ++pass)
+ {
+ float x=0,y=0;
+ if (pass == 1) {
+ points = (struct nk_tt__point *)
+ alloc->alloc(alloc->userdata,0, (nk_size)num_points * sizeof(points[0]));
+ if (points == 0) goto error;
+ }
+ num_points = 0;
+ n= -1;
+
+ for (i=0; i < num_verts; ++i)
+ {
+ switch (vertices[i].type) {
+ case NK_TT_vmove:
+ /* start the next contour */
+ if (n >= 0)
+ (*contour_lengths)[n] = num_points - start;
+ ++n;
+ start = num_points;
+
+ x = vertices[i].x, y = vertices[i].y;
+ nk_tt__add_point(points, num_points++, x,y);
+ break;
+ case NK_TT_vline:
+ x = vertices[i].x, y = vertices[i].y;
+ nk_tt__add_point(points, num_points++, x, y);
+ break;
+ case NK_TT_vcurve:
+ nk_tt__tesselate_curve(points, &num_points, x,y,
+ vertices[i].cx, vertices[i].cy,
+ vertices[i].x, vertices[i].y,
+ objspace_flatness_squared, 0);
+ x = vertices[i].x, y = vertices[i].y;
+ break;
+ default: break;
+ }
+ }
+ (*contour_lengths)[n] = num_points - start;
+ }
+ return points;
+
+error:
+ alloc->free(alloc->userdata, points);
+ alloc->free(alloc->userdata, *contour_lengths);
+ *contour_lengths = 0;
+ *num_contours = 0;
+ return 0;
+}
+NK_INTERN void
+nk_tt_Rasterize(struct nk_tt__bitmap *result, float flatness_in_pixels,
+ struct nk_tt_vertex *vertices, int num_verts,
+ float scale_x, float scale_y, float shift_x, float shift_y,
+ int x_off, int y_off, int invert, struct nk_allocator *alloc)
+{
+ float scale = scale_x > scale_y ? scale_y : scale_x;
+ int winding_count, *winding_lengths;
+ struct nk_tt__point *windings = nk_tt_FlattenCurves(vertices, num_verts,
+ flatness_in_pixels / scale, &winding_lengths, &winding_count, alloc);
+
+ NK_ASSERT(alloc);
+ if (windings) {
+ nk_tt__rasterize(result, windings, winding_lengths, winding_count,
+ scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, alloc);
+ alloc->free(alloc->userdata, winding_lengths);
+ alloc->free(alloc->userdata, windings);
+ }
+}
+NK_INTERN void
+nk_tt_MakeGlyphBitmapSubpixel(const struct nk_tt_fontinfo *info, unsigned char *output,
+ int out_w, int out_h, int out_stride, float scale_x, float scale_y,
+ float shift_x, float shift_y, int glyph, struct nk_allocator *alloc)
+{
+ int ix0,iy0;
+ struct nk_tt_vertex *vertices;
+ int num_verts = nk_tt_GetGlyphShape(info, alloc, glyph, &vertices);
+ struct nk_tt__bitmap gbm;
+
+ nk_tt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x,
+ shift_y, &ix0,&iy0,0,0);
+ gbm.pixels = output;
+ gbm.w = out_w;
+ gbm.h = out_h;
+ gbm.stride = out_stride;
+
+ if (gbm.w && gbm.h)
+ nk_tt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y,
+ shift_x, shift_y, ix0,iy0, 1, alloc);
+ alloc->free(alloc->userdata, vertices);
+}
+
+/*-------------------------------------------------------------
+ * Bitmap baking
+ * --------------------------------------------------------------*/
+NK_INTERN int
+nk_tt_PackBegin(struct nk_tt_pack_context *spc, unsigned char *pixels,
+ int pw, int ph, int stride_in_bytes, int padding, struct nk_allocator *alloc)
+{
+ int num_nodes = pw - padding;
+ struct nk_rp_context *context = (struct nk_rp_context *)
+ alloc->alloc(alloc->userdata,0, sizeof(*context));
+ struct nk_rp_node *nodes = (struct nk_rp_node*)
+ alloc->alloc(alloc->userdata,0, (sizeof(*nodes ) * (nk_size)num_nodes));
+
+ if (context == 0 || nodes == 0) {
+ if (context != 0) alloc->free(alloc->userdata, context);
+ if (nodes != 0) alloc->free(alloc->userdata, nodes);
+ return 0;
+ }
+
+ spc->width = pw;
+ spc->height = ph;
+ spc->pixels = pixels;
+ spc->pack_info = context;
+ spc->nodes = nodes;
+ spc->padding = padding;
+ spc->stride_in_bytes = (stride_in_bytes != 0) ? stride_in_bytes : pw;
+ spc->h_oversample = 1;
+ spc->v_oversample = 1;
+
+ nk_rp_init_target(context, pw-padding, ph-padding, nodes, num_nodes);
+ if (pixels)
+ NK_MEMSET(pixels, 0, (nk_size)(pw*ph)); /* background of 0 around pixels */
+ return 1;
+}
+NK_INTERN void
+nk_tt_PackEnd(struct nk_tt_pack_context *spc, struct nk_allocator *alloc)
+{
+ alloc->free(alloc->userdata, spc->nodes);
+ alloc->free(alloc->userdata, spc->pack_info);
+}
+NK_INTERN void
+nk_tt_PackSetOversampling(struct nk_tt_pack_context *spc,
+ unsigned int h_oversample, unsigned int v_oversample)
+{
+ NK_ASSERT(h_oversample <= NK_TT_MAX_OVERSAMPLE);
+ NK_ASSERT(v_oversample <= NK_TT_MAX_OVERSAMPLE);
+ if (h_oversample <= NK_TT_MAX_OVERSAMPLE)
+ spc->h_oversample = h_oversample;
+ if (v_oversample <= NK_TT_MAX_OVERSAMPLE)
+ spc->v_oversample = v_oversample;
+}
+NK_INTERN void
+nk_tt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes,
+ int kernel_width)
+{
+ unsigned char buffer[NK_TT_MAX_OVERSAMPLE];
+ int safe_w = w - kernel_width;
+ int j;
+
+ for (j=0; j < h; ++j)
+ {
+ int i;
+ unsigned int total;
+ NK_MEMSET(buffer, 0, (nk_size)kernel_width);
+
+ total = 0;
+
+ /* make kernel_width a constant in common cases so compiler can optimize out the divide */
+ switch (kernel_width) {
+ case 2:
+ for (i=0; i <= safe_w; ++i) {
+ total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char) (total / 2);
+ }
+ break;
+ case 3:
+ for (i=0; i <= safe_w; ++i) {
+ total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char) (total / 3);
+ }
+ break;
+ case 4:
+ for (i=0; i <= safe_w; ++i) {
+ total += (unsigned int)pixels[i] - buffer[i & NK_TT__OVER_MASK];
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char) (total / 4);
+ }
+ break;
+ case 5:
+ for (i=0; i <= safe_w; ++i) {
+ total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char) (total / 5);
+ }
+ break;
+ default:
+ for (i=0; i <= safe_w; ++i) {
+ total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char) (total / (unsigned int)kernel_width);
+ }
+ break;
+ }
+
+ for (; i < w; ++i) {
+ NK_ASSERT(pixels[i] == 0);
+ total -= (unsigned int)(buffer[i & NK_TT__OVER_MASK]);
+ pixels[i] = (unsigned char) (total / (unsigned int)kernel_width);
+ }
+ pixels += stride_in_bytes;
+ }
+}
+NK_INTERN void
+nk_tt__v_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes,
+ int kernel_width)
+{
+ unsigned char buffer[NK_TT_MAX_OVERSAMPLE];
+ int safe_h = h - kernel_width;
+ int j;
+
+ for (j=0; j < w; ++j)
+ {
+ int i;
+ unsigned int total;
+ NK_MEMSET(buffer, 0, (nk_size)kernel_width);
+
+ total = 0;
+
+ /* make kernel_width a constant in common cases so compiler can optimize out the divide */
+ switch (kernel_width) {
+ case 2:
+ for (i=0; i <= safe_h; ++i) {
+ total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];
+ pixels[i*stride_in_bytes] = (unsigned char) (total / 2);
+ }
+ break;
+ case 3:
+ for (i=0; i <= safe_h; ++i) {
+ total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];
+ pixels[i*stride_in_bytes] = (unsigned char) (total / 3);
+ }
+ break;
+ case 4:
+ for (i=0; i <= safe_h; ++i) {
+ total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];
+ pixels[i*stride_in_bytes] = (unsigned char) (total / 4);
+ }
+ break;
+ case 5:
+ for (i=0; i <= safe_h; ++i) {
+ total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];
+ pixels[i*stride_in_bytes] = (unsigned char) (total / 5);
+ }
+ break;
+ default:
+ for (i=0; i <= safe_h; ++i) {
+ total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);
+ buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];
+ pixels[i*stride_in_bytes] = (unsigned char) (total / (unsigned int)kernel_width);
+ }
+ break;
+ }
+
+ for (; i < h; ++i) {
+ NK_ASSERT(pixels[i*stride_in_bytes] == 0);
+ total -= (unsigned int)(buffer[i & NK_TT__OVER_MASK]);
+ pixels[i*stride_in_bytes] = (unsigned char) (total / (unsigned int)kernel_width);
+ }
+ pixels += 1;
+ }
+}
+NK_INTERN float
+nk_tt__oversample_shift(int oversample)
+{
+ if (!oversample)
+ return 0.0f;
+
+ /* The prefilter is a box filter of width "oversample", */
+ /* which shifts phase by (oversample - 1)/2 pixels in */
+ /* oversampled space. We want to shift in the opposite */
+ /* direction to counter this. */
+ return (float)-(oversample - 1) / (2.0f * (float)oversample);
+}
+NK_INTERN int
+nk_tt_PackFontRangesGatherRects(struct nk_tt_pack_context *spc,
+ struct nk_tt_fontinfo *info, struct nk_tt_pack_range *ranges,
+ int num_ranges, struct nk_rp_rect *rects)
+{
+ /* rects array must be big enough to accommodate all characters in the given ranges */
+ int i,j,k;
+ k = 0;
+
+ for (i=0; i < num_ranges; ++i) {
+ float fh = ranges[i].font_size;
+ float scale = (fh > 0) ? nk_tt_ScaleForPixelHeight(info, fh):
+ nk_tt_ScaleForMappingEmToPixels(info, -fh);
+ ranges[i].h_oversample = (unsigned char) spc->h_oversample;
+ ranges[i].v_oversample = (unsigned char) spc->v_oversample;
+ for (j=0; j < ranges[i].num_chars; ++j) {
+ int x0,y0,x1,y1;
+ int codepoint = ranges[i].first_unicode_codepoint_in_range ?
+ ranges[i].first_unicode_codepoint_in_range + j :
+ ranges[i].array_of_unicode_codepoints[j];
+
+ int glyph = nk_tt_FindGlyphIndex(info, codepoint);
+ nk_tt_GetGlyphBitmapBoxSubpixel(info,glyph, scale * (float)spc->h_oversample,
+ scale * (float)spc->v_oversample, 0,0, &x0,&y0,&x1,&y1);
+ rects[k].w = (nk_rp_coord) (x1-x0 + spc->padding + (int)spc->h_oversample-1);
+ rects[k].h = (nk_rp_coord) (y1-y0 + spc->padding + (int)spc->v_oversample-1);
+ ++k;
+ }
+ }
+ return k;
+}
+NK_INTERN int
+nk_tt_PackFontRangesRenderIntoRects(struct nk_tt_pack_context *spc,
+ struct nk_tt_fontinfo *info, struct nk_tt_pack_range *ranges,
+ int num_ranges, struct nk_rp_rect *rects, struct nk_allocator *alloc)
+{
+ int i,j,k, return_value = 1;
+ /* save current values */
+ int old_h_over = (int)spc->h_oversample;
+ int old_v_over = (int)spc->v_oversample;
+ /* rects array must be big enough to accommodate all characters in the given ranges */
+
+ k = 0;
+ for (i=0; i < num_ranges; ++i)
+ {
+ float fh = ranges[i].font_size;
+ float recip_h,recip_v,sub_x,sub_y;
+ float scale = fh > 0 ? nk_tt_ScaleForPixelHeight(info, fh):
+ nk_tt_ScaleForMappingEmToPixels(info, -fh);
+
+ spc->h_oversample = ranges[i].h_oversample;
+ spc->v_oversample = ranges[i].v_oversample;
+
+ recip_h = 1.0f / (float)spc->h_oversample;
+ recip_v = 1.0f / (float)spc->v_oversample;
+
+ sub_x = nk_tt__oversample_shift((int)spc->h_oversample);
+ sub_y = nk_tt__oversample_shift((int)spc->v_oversample);
+
+ for (j=0; j < ranges[i].num_chars; ++j)
+ {
+ struct nk_rp_rect *r = &rects[k];
+ if (r->was_packed)
+ {
+ struct nk_tt_packedchar *bc = &ranges[i].chardata_for_range[j];
+ int advance, lsb, x0,y0,x1,y1;
+ int codepoint = ranges[i].first_unicode_codepoint_in_range ?
+ ranges[i].first_unicode_codepoint_in_range + j :
+ ranges[i].array_of_unicode_codepoints[j];
+ int glyph = nk_tt_FindGlyphIndex(info, codepoint);
+ nk_rp_coord pad = (nk_rp_coord) spc->padding;
+
+ /* pad on left and top */
+ r->x = (nk_rp_coord)((int)r->x + (int)pad);
+ r->y = (nk_rp_coord)((int)r->y + (int)pad);
+ r->w = (nk_rp_coord)((int)r->w - (int)pad);
+ r->h = (nk_rp_coord)((int)r->h - (int)pad);
+
+ nk_tt_GetGlyphHMetrics(info, glyph, &advance, &lsb);
+ nk_tt_GetGlyphBitmapBox(info, glyph, scale * (float)spc->h_oversample,
+ (scale * (float)spc->v_oversample), &x0,&y0,&x1,&y1);
+ nk_tt_MakeGlyphBitmapSubpixel(info, spc->pixels + r->x + r->y*spc->stride_in_bytes,
+ (int)(r->w - spc->h_oversample+1), (int)(r->h - spc->v_oversample+1),
+ spc->stride_in_bytes, scale * (float)spc->h_oversample,
+ scale * (float)spc->v_oversample, 0,0, glyph, alloc);
+
+ if (spc->h_oversample > 1)
+ nk_tt__h_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,
+ r->w, r->h, spc->stride_in_bytes, (int)spc->h_oversample);
+
+ if (spc->v_oversample > 1)
+ nk_tt__v_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,
+ r->w, r->h, spc->stride_in_bytes, (int)spc->v_oversample);
+
+ bc->x0 = (nk_ushort) r->x;
+ bc->y0 = (nk_ushort) r->y;
+ bc->x1 = (nk_ushort) (r->x + r->w);
+ bc->y1 = (nk_ushort) (r->y + r->h);
+ bc->xadvance = scale * (float)advance;
+ bc->xoff = (float) x0 * recip_h + sub_x;
+ bc->yoff = (float) y0 * recip_v + sub_y;
+ bc->xoff2 = ((float)x0 + r->w) * recip_h + sub_x;
+ bc->yoff2 = ((float)y0 + r->h) * recip_v + sub_y;
+ } else {
+ return_value = 0; /* if any fail, report failure */
+ }
+ ++k;
+ }
+ }
+ /* restore original values */
+ spc->h_oversample = (unsigned int)old_h_over;
+ spc->v_oversample = (unsigned int)old_v_over;
+ return return_value;
+}
+NK_INTERN void
+nk_tt_GetPackedQuad(struct nk_tt_packedchar *chardata, int pw, int ph,
+ int char_index, float *xpos, float *ypos, struct nk_tt_aligned_quad *q,
+ int align_to_integer)
+{
+ float ipw = 1.0f / (float)pw, iph = 1.0f / (float)ph;
+ struct nk_tt_packedchar *b = (struct nk_tt_packedchar*)(chardata + char_index);
+ if (align_to_integer) {
+ int tx = nk_ifloorf((*xpos + b->xoff) + 0.5f);
+ int ty = nk_ifloorf((*ypos + b->yoff) + 0.5f);
+
+ float x = (float)tx;
+ float y = (float)ty;
+
+ q->x0 = x;
+ q->y0 = y;
+ q->x1 = x + b->xoff2 - b->xoff;
+ q->y1 = y + b->yoff2 - b->yoff;
+ } else {
+ q->x0 = *xpos + b->xoff;
+ q->y0 = *ypos + b->yoff;
+ q->x1 = *xpos + b->xoff2;
+ q->y1 = *ypos + b->yoff2;
+ }
+ q->s0 = b->x0 * ipw;
+ q->t0 = b->y0 * iph;
+ q->s1 = b->x1 * ipw;
+ q->t1 = b->y1 * iph;
+ *xpos += b->xadvance;
+}
+
+/* -------------------------------------------------------------
+ *
+ * FONT BAKING
+ *
+ * --------------------------------------------------------------*/
+struct nk_font_bake_data {
+ struct nk_tt_fontinfo info;
+ struct nk_rp_rect *rects;
+ struct nk_tt_pack_range *ranges;
+ nk_rune range_count;
+};
+
+struct nk_font_baker {
+ struct nk_allocator alloc;
+ struct nk_tt_pack_context spc;
+ struct nk_font_bake_data *build;
+ struct nk_tt_packedchar *packed_chars;
+ struct nk_rp_rect *rects;
+ struct nk_tt_pack_range *ranges;
+};
+
+NK_GLOBAL const nk_size nk_rect_align = NK_ALIGNOF(struct nk_rp_rect);
+NK_GLOBAL const nk_size nk_range_align = NK_ALIGNOF(struct nk_tt_pack_range);
+NK_GLOBAL const nk_size nk_char_align = NK_ALIGNOF(struct nk_tt_packedchar);
+NK_GLOBAL const nk_size nk_build_align = NK_ALIGNOF(struct nk_font_bake_data);
+NK_GLOBAL const nk_size nk_baker_align = NK_ALIGNOF(struct nk_font_baker);
+
+NK_INTERN int
+nk_range_count(const nk_rune *range)
+{
+ const nk_rune *iter = range;
+ NK_ASSERT(range);
+ if (!range) return 0;
+ while (*(iter++) != 0);
+ return (iter == range) ? 0 : (int)((iter - range)/2);
+}
+NK_INTERN int
+nk_range_glyph_count(const nk_rune *range, int count)
+{
+ int i = 0;
+ int total_glyphs = 0;
+ for (i = 0; i < count; ++i) {
+ int diff;
+ nk_rune f = range[(i*2)+0];
+ nk_rune t = range[(i*2)+1];
+ NK_ASSERT(t >= f);
+ diff = (int)((t - f) + 1);
+ total_glyphs += diff;
+ }
+ return total_glyphs;
+}
+NK_API const nk_rune*
+nk_font_default_glyph_ranges(void)
+{
+ NK_STORAGE const nk_rune ranges[] = {0x0020, 0x00FF, 0};
+ return ranges;
+}
+NK_API const nk_rune*
+nk_font_chinese_glyph_ranges(void)
+{
+ NK_STORAGE const nk_rune ranges[] = {
+ 0x0020, 0x00FF,
+ 0x3000, 0x30FF,
+ 0x31F0, 0x31FF,
+ 0xFF00, 0xFFEF,
+ 0x4e00, 0x9FAF,
+ 0
+ };
+ return ranges;
+}
+NK_API const nk_rune*
+nk_font_cyrillic_glyph_ranges(void)
+{
+ NK_STORAGE const nk_rune ranges[] = {
+ 0x0020, 0x00FF,
+ 0x0400, 0x052F,
+ 0x2DE0, 0x2DFF,
+ 0xA640, 0xA69F,
+ 0
+ };
+ return ranges;
+}
+NK_API const nk_rune*
+nk_font_korean_glyph_ranges(void)
+{
+ NK_STORAGE const nk_rune ranges[] = {
+ 0x0020, 0x00FF,
+ 0x3131, 0x3163,
+ 0xAC00, 0xD79D,
+ 0
+ };
+ return ranges;
+}
+NK_INTERN void
+nk_font_baker_memory(nk_size *temp, int *glyph_count,
+ struct nk_font_config *config_list, int count)
+{
+ int range_count = 0;
+ int total_range_count = 0;
+ struct nk_font_config *iter, *i;
+
+ NK_ASSERT(config_list);
+ NK_ASSERT(glyph_count);
+ if (!config_list) {
+ *temp = 0;
+ *glyph_count = 0;
+ return;
+ }
+ *glyph_count = 0;
+ for (iter = config_list; iter; iter = iter->next) {
+ i = iter;
+ do {if (!i->range) iter->range = nk_font_default_glyph_ranges();
+ range_count = nk_range_count(i->range);
+ total_range_count += range_count;
+ *glyph_count += nk_range_glyph_count(i->range, range_count);
+ } while ((i = i->n) != iter);
+ }
+ *temp = (nk_size)*glyph_count * sizeof(struct nk_rp_rect);
+ *temp += (nk_size)total_range_count * sizeof(struct nk_tt_pack_range);
+ *temp += (nk_size)*glyph_count * sizeof(struct nk_tt_packedchar);
+ *temp += (nk_size)count * sizeof(struct nk_font_bake_data);
+ *temp += sizeof(struct nk_font_baker);
+ *temp += nk_rect_align + nk_range_align + nk_char_align;
+ *temp += nk_build_align + nk_baker_align;
+}
+NK_INTERN struct nk_font_baker*
+nk_font_baker(void *memory, int glyph_count, int count, struct nk_allocator *alloc)
+{
+ struct nk_font_baker *baker;
+ if (!memory) return 0;
+ /* setup baker inside a memory block */
+ baker = (struct nk_font_baker*)NK_ALIGN_PTR(memory, nk_baker_align);
+ baker->build = (struct nk_font_bake_data*)NK_ALIGN_PTR((baker + 1), nk_build_align);
+ baker->packed_chars = (struct nk_tt_packedchar*)NK_ALIGN_PTR((baker->build + count), nk_char_align);
+ baker->rects = (struct nk_rp_rect*)NK_ALIGN_PTR((baker->packed_chars + glyph_count), nk_rect_align);
+ baker->ranges = (struct nk_tt_pack_range*)NK_ALIGN_PTR((baker->rects + glyph_count), nk_range_align);
+ baker->alloc = *alloc;
+ return baker;
+}
+NK_INTERN int
+nk_font_bake_pack(struct nk_font_baker *baker,
+ nk_size *image_memory, int *width, int *height, struct nk_recti *custom,
+ const struct nk_font_config *config_list, int count,
+ struct nk_allocator *alloc)
+{
+ NK_STORAGE const nk_size max_height = 1024 * 32;
+ const struct nk_font_config *config_iter, *it;
+ int total_glyph_count = 0;
+ int total_range_count = 0;
+ int range_count = 0;
+ int i = 0;
+
+ NK_ASSERT(image_memory);
+ NK_ASSERT(width);
+ NK_ASSERT(height);
+ NK_ASSERT(config_list);
+ NK_ASSERT(count);
+ NK_ASSERT(alloc);
+
+ if (!image_memory || !width || !height || !config_list || !count) return nk_false;
+ for (config_iter = config_list; config_iter; config_iter = config_iter->next) {
+ it = config_iter;
+ do {range_count = nk_range_count(it->range);
+ total_range_count += range_count;
+ total_glyph_count += nk_range_glyph_count(it->range, range_count);
+ } while ((it = it->n) != config_iter);
+ }
+ /* setup font baker from temporary memory */
+ for (config_iter = config_list; config_iter; config_iter = config_iter->next) {
+ it = config_iter;
+ do {if (!nk_tt_InitFont(&baker->build[i++].info, (const unsigned char*)it->ttf_blob, 0))
+ return nk_false;
+ } while ((it = it->n) != config_iter);
+ }
+ *height = 0;
+ *width = (total_glyph_count > 1000) ? 1024 : 512;
+ nk_tt_PackBegin(&baker->spc, 0, (int)*width, (int)max_height, 0, 1, alloc);
+ {
+ int input_i = 0;
+ int range_n = 0;
+ int rect_n = 0;
+ int char_n = 0;
+
+ if (custom) {
+ /* pack custom user data first so it will be in the upper left corner*/
+ struct nk_rp_rect custom_space;
+ nk_zero(&custom_space, sizeof(custom_space));
+ custom_space.w = (nk_rp_coord)(custom->w);
+ custom_space.h = (nk_rp_coord)(custom->h);
+
+ nk_tt_PackSetOversampling(&baker->spc, 1, 1);
+ nk_rp_pack_rects((struct nk_rp_context*)baker->spc.pack_info, &custom_space, 1);
+ *height = NK_MAX(*height, (int)(custom_space.y + custom_space.h));
+
+ custom->x = (short)custom_space.x;
+ custom->y = (short)custom_space.y;
+ custom->w = (short)custom_space.w;
+ custom->h = (short)custom_space.h;
+ }
+
+ /* first font pass: pack all glyphs */
+ for (input_i = 0, config_iter = config_list; input_i < count && config_iter;
+ config_iter = config_iter->next) {
+ it = config_iter;
+ do {int n = 0;
+ int glyph_count;
+ const nk_rune *in_range;
+ const struct nk_font_config *cfg = it;
+ struct nk_font_bake_data *tmp = &baker->build[input_i++];
+
+ /* count glyphs + ranges in current font */
+ glyph_count = 0; range_count = 0;
+ for (in_range = cfg->range; in_range[0] && in_range[1]; in_range += 2) {
+ glyph_count += (int)(in_range[1] - in_range[0]) + 1;
+ range_count++;
+ }
+
+ /* setup ranges */
+ tmp->ranges = baker->ranges + range_n;
+ tmp->range_count = (nk_rune)range_count;
+ range_n += range_count;
+ for (i = 0; i < range_count; ++i) {
+ in_range = &cfg->range[i * 2];
+ tmp->ranges[i].font_size = cfg->size;
+ tmp->ranges[i].first_unicode_codepoint_in_range = (int)in_range[0];
+ tmp->ranges[i].num_chars = (int)(in_range[1]- in_range[0]) + 1;
+ tmp->ranges[i].chardata_for_range = baker->packed_chars + char_n;
+ char_n += tmp->ranges[i].num_chars;
+ }
+
+ /* pack */
+ tmp->rects = baker->rects + rect_n;
+ rect_n += glyph_count;
+ nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
+ n = nk_tt_PackFontRangesGatherRects(&baker->spc, &tmp->info,
+ tmp->ranges, (int)tmp->range_count, tmp->rects);
+ nk_rp_pack_rects((struct nk_rp_context*)baker->spc.pack_info, tmp->rects, (int)n);
+
+ /* texture height */
+ for (i = 0; i < n; ++i) {
+ if (tmp->rects[i].was_packed)
+ *height = NK_MAX(*height, tmp->rects[i].y + tmp->rects[i].h);
+ }
+ } while ((it = it->n) != config_iter);
+ }
+ NK_ASSERT(rect_n == total_glyph_count);
+ NK_ASSERT(char_n == total_glyph_count);
+ NK_ASSERT(range_n == total_range_count);
+ }
+ *height = (int)nk_round_up_pow2((nk_uint)*height);
+ *image_memory = (nk_size)(*width) * (nk_size)(*height);
+ return nk_true;
+}
+NK_INTERN void
+nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int height,
+ struct nk_font_glyph *glyphs, int glyphs_count,
+ const struct nk_font_config *config_list, int font_count)
+{
+ int input_i = 0;
+ nk_rune glyph_n = 0;
+ const struct nk_font_config *config_iter;
+ const struct nk_font_config *it;
+
+ NK_ASSERT(image_memory);
+ NK_ASSERT(width);
+ NK_ASSERT(height);
+ NK_ASSERT(config_list);
+ NK_ASSERT(baker);
+ NK_ASSERT(font_count);
+ NK_ASSERT(glyphs_count);
+ if (!image_memory || !width || !height || !config_list ||
+ !font_count || !glyphs || !glyphs_count)
+ return;
+
+ /* second font pass: render glyphs */
+ nk_zero(image_memory, (nk_size)((nk_size)width * (nk_size)height));
+ baker->spc.pixels = (unsigned char*)image_memory;
+ baker->spc.height = (int)height;
+ for (input_i = 0, config_iter = config_list; input_i < font_count && config_iter;
+ config_iter = config_iter->next) {
+ it = config_iter;
+ do {const struct nk_font_config *cfg = it;
+ struct nk_font_bake_data *tmp = &baker->build[input_i++];
+ nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
+ nk_tt_PackFontRangesRenderIntoRects(&baker->spc, &tmp->info, tmp->ranges,
+ (int)tmp->range_count, tmp->rects, &baker->alloc);
+ } while ((it = it->n) != config_iter);
+ } nk_tt_PackEnd(&baker->spc, &baker->alloc);
+
+ /* third pass: setup font and glyphs */
+ for (input_i = 0, config_iter = config_list; input_i < font_count && config_iter;
+ config_iter = config_iter->next) {
+ it = config_iter;
+ do {nk_size i = 0;
+ int char_idx = 0;
+ nk_rune glyph_count = 0;
+ const struct nk_font_config *cfg = it;
+ struct nk_font_bake_data *tmp = &baker->build[input_i++];
+ struct nk_baked_font *dst_font = cfg->font;
+
+ float font_scale = nk_tt_ScaleForPixelHeight(&tmp->info, cfg->size);
+ int unscaled_ascent, unscaled_descent, unscaled_line_gap;
+ nk_tt_GetFontVMetrics(&tmp->info, &unscaled_ascent, &unscaled_descent,
+ &unscaled_line_gap);
+
+ /* fill baked font */
+ if (!cfg->merge_mode) {
+ dst_font->ranges = cfg->range;
+ dst_font->height = cfg->size;
+ dst_font->ascent = ((float)unscaled_ascent * font_scale);
+ dst_font->descent = ((float)unscaled_descent * font_scale);
+ dst_font->glyph_offset = glyph_n;
+ }
+
+ /* fill own baked font glyph array */
+ for (i = 0; i < tmp->range_count; ++i) {
+ struct nk_tt_pack_range *range = &tmp->ranges[i];
+ for (char_idx = 0; char_idx < range->num_chars; char_idx++)
+ {
+ nk_rune codepoint = 0;
+ float dummy_x = 0, dummy_y = 0;
+ struct nk_tt_aligned_quad q;
+ struct nk_font_glyph *glyph;
+
+ /* query glyph bounds from stb_truetype */
+ const struct nk_tt_packedchar *pc = &range->chardata_for_range[char_idx];
+ if (!pc->x0 && !pc->x1 && !pc->y0 && !pc->y1) continue;
+ codepoint = (nk_rune)(range->first_unicode_codepoint_in_range + char_idx);
+ nk_tt_GetPackedQuad(range->chardata_for_range, (int)width,
+ (int)height, char_idx, &dummy_x, &dummy_y, &q, 0);
+
+ /* fill own glyph type with data */
+ glyph = &glyphs[dst_font->glyph_offset + dst_font->glyph_count + (unsigned int)glyph_count];
+ glyph->codepoint = codepoint;
+ glyph->x0 = q.x0; glyph->y0 = q.y0;
+ glyph->x1 = q.x1; glyph->y1 = q.y1;
+ glyph->y0 += (dst_font->ascent + 0.5f);
+ glyph->y1 += (dst_font->ascent + 0.5f);
+ glyph->w = glyph->x1 - glyph->x0 + 0.5f;
+ glyph->h = glyph->y1 - glyph->y0;
+
+ if (cfg->coord_type == NK_COORD_PIXEL) {
+ glyph->u0 = q.s0 * (float)width;
+ glyph->v0 = q.t0 * (float)height;
+ glyph->u1 = q.s1 * (float)width;
+ glyph->v1 = q.t1 * (float)height;
+ } else {
+ glyph->u0 = q.s0;
+ glyph->v0 = q.t0;
+ glyph->u1 = q.s1;
+ glyph->v1 = q.t1;
+ }
+ glyph->xadvance = (pc->xadvance + cfg->spacing.x);
+ if (cfg->pixel_snap)
+ glyph->xadvance = (float)(int)(glyph->xadvance + 0.5f);
+ glyph_count++;
+ }
+ }
+ dst_font->glyph_count += glyph_count;
+ glyph_n += glyph_count;
+ } while ((it = it->n) != config_iter);
+ }
+}
+NK_INTERN void
+nk_font_bake_custom_data(void *img_memory, int img_width, int img_height,
+ struct nk_recti img_dst, const char *texture_data_mask, int tex_width,
+ int tex_height, char white, char black)
+{
+ nk_byte *pixels;
+ int y = 0;
+ int x = 0;
+ int n = 0;
+
+ NK_ASSERT(img_memory);
+ NK_ASSERT(img_width);
+ NK_ASSERT(img_height);
+ NK_ASSERT(texture_data_mask);
+ NK_UNUSED(tex_height);
+ if (!img_memory || !img_width || !img_height || !texture_data_mask)
+ return;
+
+ pixels = (nk_byte*)img_memory;
+ for (y = 0, n = 0; y < tex_height; ++y) {
+ for (x = 0; x < tex_width; ++x, ++n) {
+ const int off0 = ((img_dst.x + x) + (img_dst.y + y) * img_width);
+ const int off1 = off0 + 1 + tex_width;
+ pixels[off0] = (texture_data_mask[n] == white) ? 0xFF : 0x00;
+ pixels[off1] = (texture_data_mask[n] == black) ? 0xFF : 0x00;
+ }
+ }
+}
+NK_INTERN void
+nk_font_bake_convert(void *out_memory, int img_width, int img_height,
+ const void *in_memory)
+{
+ int n = 0;
+ nk_rune *dst;
+ const nk_byte *src;
+
+ NK_ASSERT(out_memory);
+ NK_ASSERT(in_memory);
+ NK_ASSERT(img_width);
+ NK_ASSERT(img_height);
+ if (!out_memory || !in_memory || !img_height || !img_width) return;
+
+ dst = (nk_rune*)out_memory;
+ src = (const nk_byte*)in_memory;
+ for (n = (int)(img_width * img_height); n > 0; n--)
+ *dst++ = ((nk_rune)(*src++) << 24) | 0x00FFFFFF;
+}
+
+/* -------------------------------------------------------------
+ *
+ * FONT
+ *
+ * --------------------------------------------------------------*/
+NK_INTERN float
+nk_font_text_width(nk_handle handle, float height, const char *text, int len)
+{
+ nk_rune unicode;
+ int text_len = 0;
+ float text_width = 0;
+ int glyph_len = 0;
+ float scale = 0;
+
+ struct nk_font *font = (struct nk_font*)handle.ptr;
+ NK_ASSERT(font);
+ NK_ASSERT(font->glyphs);
+ if (!font || !text || !len)
+ return 0;
+
+ scale = height/font->info.height;
+ glyph_len = text_len = nk_utf_decode(text, &unicode, (int)len);
+ if (!glyph_len) return 0;
+ while (text_len <= (int)len && glyph_len) {
+ const struct nk_font_glyph *g;
+ if (unicode == NK_UTF_INVALID) break;
+
+ /* query currently drawn glyph information */
+ g = nk_font_find_glyph(font, unicode);
+ text_width += g->xadvance * scale;
+
+ /* offset next glyph */
+ glyph_len = nk_utf_decode(text + text_len, &unicode, (int)len - text_len);
+ text_len += glyph_len;
+ }
+ return text_width;
+}
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+NK_INTERN void
+nk_font_query_font_glyph(nk_handle handle, float height,
+ struct nk_user_font_glyph *glyph, nk_rune codepoint, nk_rune next_codepoint)
+{
+ float scale;
+ const struct nk_font_glyph *g;
+ struct nk_font *font;
+
+ NK_ASSERT(glyph);
+ NK_UNUSED(next_codepoint);
+
+ font = (struct nk_font*)handle.ptr;
+ NK_ASSERT(font);
+ NK_ASSERT(font->glyphs);
+ if (!font || !glyph)
+ return;
+
+ scale = height/font->info.height;
+ g = nk_font_find_glyph(font, codepoint);
+ glyph->width = (g->x1 - g->x0) * scale;
+ glyph->height = (g->y1 - g->y0) * scale;
+ glyph->offset = nk_vec2(g->x0 * scale, g->y0 * scale);
+ glyph->xadvance = (g->xadvance * scale);
+ glyph->uv[0] = nk_vec2(g->u0, g->v0);
+ glyph->uv[1] = nk_vec2(g->u1, g->v1);
+}
+#endif
+NK_API const struct nk_font_glyph*
+nk_font_find_glyph(struct nk_font *font, nk_rune unicode)
+{
+ int i = 0;
+ int count;
+ int total_glyphs = 0;
+ const struct nk_font_glyph *glyph = 0;
+ const struct nk_font_config *iter = 0;
+
+ NK_ASSERT(font);
+ NK_ASSERT(font->glyphs);
+ NK_ASSERT(font->info.ranges);
+ if (!font || !font->glyphs) return 0;
+
+ glyph = font->fallback;
+ iter = font->config;
+ do {count = nk_range_count(iter->range);
+ for (i = 0; i < count; ++i) {
+ nk_rune f = iter->range[(i*2)+0];
+ nk_rune t = iter->range[(i*2)+1];
+ int diff = (int)((t - f) + 1);
+ if (unicode >= f && unicode <= t)
+ return &font->glyphs[((nk_rune)total_glyphs + (unicode - f))];
+ total_glyphs += diff;
+ }
+ } while ((iter = iter->n) != font->config);
+ return glyph;
+}
+NK_INTERN void
+nk_font_init(struct nk_font *font, float pixel_height,
+ nk_rune fallback_codepoint, struct nk_font_glyph *glyphs,
+ const struct nk_baked_font *baked_font, nk_handle atlas)
+{
+ struct nk_baked_font baked;
+ NK_ASSERT(font);
+ NK_ASSERT(glyphs);
+ NK_ASSERT(baked_font);
+ if (!font || !glyphs || !baked_font)
+ return;
+
+ baked = *baked_font;
+ font->fallback = 0;
+ font->info = baked;
+ font->scale = (float)pixel_height / (float)font->info.height;
+ font->glyphs = &glyphs[baked_font->glyph_offset];
+ font->texture = atlas;
+ font->fallback_codepoint = fallback_codepoint;
+ font->fallback = nk_font_find_glyph(font, fallback_codepoint);
+
+ font->handle.height = font->info.height * font->scale;
+ font->handle.width = nk_font_text_width;
+ font->handle.userdata.ptr = font;
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+ font->handle.query = nk_font_query_font_glyph;
+ font->handle.texture = font->texture;
+#endif
+}
+
+/* ---------------------------------------------------------------------------
+ *
+ * DEFAULT FONT
+ *
+ * ProggyClean.ttf
+ * Copyright (c) 2004, 2005 Tristan Grimmer
+ * MIT license (see License.txt in http://www.upperbounds.net/download/ProggyClean.ttf.zip)
+ * Download and more information at http://upperbounds.net
+ *-----------------------------------------------------------------------------*/
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Woverlength-strings"
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverlength-strings"
+#endif
+
+#ifdef NK_INCLUDE_DEFAULT_FONT
+
+NK_GLOBAL const char nk_proggy_clean_ttf_compressed_data_base85[11980+1] =
+ "7])#######hV0qs'/###[),##/l:$#Q6>##5[n42>c-TH`->>#/e>11NNV=Bv(*:.F?uu#(gRU.o0XGH`$vhLG1hxt9?W`#,5LsCp#-i>.r$<$6pD>Lb';9Crc6tgXmKVeU2cD4Eo3R/"
+ "2*>]b(MC;$jPfY.;h^`IWM9<Lh2TlS+f-s$o6Q<BWH`YiU.xfLq$N;$0iR/GX:U(jcW2p/W*q?-qmnUCI;jHSAiFWM.R*kU@C=GH?a9wp8f$e.-4^Qg1)Q-GL(lf(r/7GrRgwV%MS=C#"
+ "`8ND>Qo#t'X#(v#Y9w0#1D$CIf;W'#pWUPXOuxXuU(H9M(1<q-UE31#^-V'8IRUo7Qf./L>=Ke$$'5F%)]0^#0X@U.a<r:QLtFsLcL6##lOj)#.Y5<-R&KgLwqJfLgN&;Q?gI^#DY2uL"
+ "i@^rMl9t=cWq6##weg>$FBjVQTSDgEKnIS7EM9>ZY9w0#L;>>#Mx&4Mvt//L[MkA#W@lK.N'[0#7RL_&#w+F%HtG9M#XL`N&.,GM4Pg;-<nLENhvx>-VsM.M0rJfLH2eTM`*oJMHRC`N"
+ "kfimM2J,W-jXS:)r0wK#@Fge$U>`w'N7G#$#fB#$E^$#:9:hk+eOe--6x)F7*E%?76%^GMHePW-Z5l'&GiF#$956:rS?dA#fiK:)Yr+`&#0j@'DbG&#^$PG.Ll+DNa<XCMKEV*N)LN/N"
+ "*b=%Q6pia-Xg8I$<MR&,VdJe$<(7G;Ckl'&hF;;$<_=X(b.RS%%)###MPBuuE1V:v&cX&#2m#(&cV]`k9OhLMbn%s$G2,B$BfD3X*sp5#l,$R#]x_X1xKX%b5U*[r5iMfUo9U`N99hG)"
+ "tm+/Us9pG)XPu`<0s-)WTt(gCRxIg(%6sfh=ktMKn3j)<6<b5Sk_/0(^]AaN#(p/L>&VZ>1i%h1S9u5o@YaaW$e+b<TWFn/Z:Oh(Cx2$lNEoN^e)#CFY@@I;BOQ*sRwZtZxRcU7uW6CX"
+ "ow0i(?$Q[cjOd[P4d)]>ROPOpxTO7Stwi1::iB1q)C_=dV26J;2,]7op$]uQr@_V7$q^%lQwtuHY]=DX,n3L#0PHDO4f9>dC@O>HBuKPpP*E,N+b3L#lpR/MrTEH.IAQk.a>D[.e;mc."
+ "x]Ip.PH^'/aqUO/$1WxLoW0[iLA<QT;5HKD+@qQ'NQ(3_PLhE48R.qAPSwQ0/WK?Z,[x?-J;jQTWA0X@KJ(_Y8N-:/M74:/-ZpKrUss?d#dZq]DAbkU*JqkL+nwX@@47`5>w=4h(9.`G"
+ "CRUxHPeR`5Mjol(dUWxZa(>STrPkrJiWx`5U7F#.g*jrohGg`cg:lSTvEY/EV_7H4Q9[Z%cnv;JQYZ5q.l7Zeas:HOIZOB?G<Nald$qs]@]L<J7bR*>gv:[7MI2k).'2($5FNP&EQ(,)"
+ "U]W]+fh18.vsai00);D3@4ku5P?DP8aJt+;qUM]=+b'8@;mViBKx0DE[-auGl8:PJ&Dj+M6OC]O^((##]`0i)drT;-7X`=-H3[igUnPG-NZlo.#k@h#=Ork$m>a>$-?Tm$UV(?#P6YY#"
+ "'/###xe7q.73rI3*pP/$1>s9)W,JrM7SN]'/4C#v$U`0#V.[0>xQsH$fEmPMgY2u7Kh(G%siIfLSoS+MK2eTM$=5,M8p`A.;_R%#u[K#$x4AG8.kK/HSB==-'Ie/QTtG?-.*^N-4B/ZM"
+ "_3YlQC7(p7q)&](`6_c)$/*JL(L-^(]$wIM`dPtOdGA,U3:w2M-0<q-]L_?^)1vw'.,MRsqVr.L;aN&#/EgJ)PBc[-f>+WomX2u7lqM2iEumMTcsF?-aT=Z-97UEnXglEn1K-bnEO`gu"
+ "Ft(c%=;Am_Qs@jLooI&NX;]0#j4#F14;gl8-GQpgwhrq8'=l_f-b49'UOqkLu7-##oDY2L(te+Mch&gLYtJ,MEtJfLh'x'M=$CS-ZZ%P]8bZ>#S?YY#%Q&q'3^Fw&?D)UDNrocM3A76/"
+ "/oL?#h7gl85[qW/NDOk%16ij;+:1a'iNIdb-ou8.P*w,v5#EI$TWS>Pot-R*H'-SEpA:g)f+O$%%`kA#G=8RMmG1&O`>to8bC]T&$,n.LoO>29sp3dt-52U%VM#q7'DHpg+#Z9%H[K<L"
+ "%a2E-grWVM3@2=-k22tL]4$##6We'8UJCKE[d_=%wI;'6X-GsLX4j^SgJ$##R*w,vP3wK#iiW&#*h^D&R?jp7+/u&#(AP##XU8c$fSYW-J95_-Dp[g9wcO&#M-h1OcJlc-*vpw0xUX&#"
+ "OQFKNX@QI'IoPp7nb,QU//MQ&ZDkKP)X<WSVL(68uVl&#c'[0#(s1X&xm$Y%B7*K:eDA323j998GXbA#pwMs-jgD$9QISB-A_(aN4xoFM^@C58D0+Q+q3n0#3U1InDjF682-SjMXJK)("
+ "h$hxua_K]ul92%'BOU&#BRRh-slg8KDlr:%L71Ka:.A;%YULjDPmL<LYs8i#XwJOYaKPKc1h:'9Ke,g)b),78=I39B;xiY$bgGw-&.Zi9InXDuYa%G*f2Bq7mn9^#p1vv%#(Wi-;/Z5h"
+ "o;#2:;%d&#x9v68C5g?ntX0X)pT`;%pB3q7mgGN)3%(P8nTd5L7GeA-GL@+%J3u2:(Yf>et`e;)f#Km8&+DC$I46>#Kr]]u-[=99tts1.qb#q72g1WJO81q+eN'03'eM>&1XxY-caEnO"
+ "j%2n8)),?ILR5^.Ibn<-X-Mq7[a82Lq:F&#ce+S9wsCK*x`569E8ew'He]h:sI[2LM$[guka3ZRd6:t%IG:;$%YiJ:Nq=?eAw;/:nnDq0(CYcMpG)qLN4$##&J<j$UpK<Q4a1]MupW^-"
+ "sj_$%[HK%'F####QRZJ::Y3EGl4'@%FkiAOg#p[##O`gukTfBHagL<LHw%q&OV0##F=6/:chIm0@eCP8X]:kFI%hl8hgO@RcBhS-@Qb$%+m=hPDLg*%K8ln(wcf3/'DW-$.lR?n[nCH-"
+ "eXOONTJlh:.RYF%3'p6sq:UIMA945&^HFS87@$EP2iG<-lCO$%c`uKGD3rC$x0BL8aFn--`ke%#HMP'vh1/R&O_J9'um,.<tx[@%wsJk&bUT2`0uMv7gg#qp/ij.L56'hl;.s5CUrxjO"
+ "M7-##.l+Au'A&O:-T72L]P`&=;ctp'XScX*rU.>-XTt,%OVU4)S1+R-#dg0/Nn?Ku1^0f$B*P:Rowwm-`0PKjYDDM'3]d39VZHEl4,.j']Pk-M.h^&:0FACm$maq-&sgw0t7/6(^xtk%"
+ "LuH88Fj-ekm>GA#_>568x6(OFRl-IZp`&b,_P'$M<Jnq79VsJW/mWS*PUiq76;]/NM_>hLbxfc$mj`,O;&%W2m`Zh:/)Uetw:aJ%]K9h:TcF]u_-Sj9,VK3M.*'&0D[Ca]J9gp8,kAW]"
+ "%(?A%R$f<->Zts'^kn=-^@c4%-pY6qI%J%1IGxfLU9CP8cbPlXv);C=b),<2mOvP8up,UVf3839acAWAW-W?#ao/^#%KYo8fRULNd2.>%m]UK:n%r$'sw]J;5pAoO_#2mO3n,'=H5(et"
+ "Hg*`+RLgv>=4U8guD$I%D:W>-r5V*%j*W:Kvej.Lp$<M-SGZ':+Q_k+uvOSLiEo(<aD/K<CCc`'Lx>'?;++O'>()jLR-^u68PHm8ZFWe+ej8h:9r6L*0//c&iH&R8pRbA#Kjm%upV1g:"
+ "a_#Ur7FuA#(tRh#.Y5K+@?3<-8m0$PEn;J:rh6?I6uG<-`wMU'ircp0LaE_OtlMb&1#6T.#FDKu#1Lw%u%+GM+X'e?YLfjM[VO0MbuFp7;>Q&#WIo)0@F%q7c#4XAXN-U&VB<HFF*qL("
+ "$/V,;(kXZejWO`<[5?\?ewY(*9=%wDc;,u<'9t3W-(H1th3+G]ucQ]kLs7df($/*JL]@*t7Bu_G3_7mp7<iaQjO@.kLg;x3B0lqp7Hf,^Ze7-##@/c58Mo(3;knp0%)A7?-W+eI'o8)b<"
+ "nKnw'Ho8C=Y>pqB>0ie&jhZ[?iLR@@_AvA-iQC(=ksRZRVp7`.=+NpBC%rh&3]R:8XDmE5^V8O(x<<aG/1N$#FX$0V5Y6x'aErI3I$7x%E`v<-BY,)%-?Psf*l?%C3.mM(=/M0:JxG'?"
+ "7WhH%o'a<-80g0NBxoO(GH<dM]n.+%q@jH?f.UsJ2Ggs&4<-e47&Kl+f//9@`b+?.TeN_&B8Ss?v;^Trk;f#YvJkl&w$]>-+k?'(<S:68tq*WoDfZu';mM?8X[ma8W%*`-=;D.(nc7/;"
+ ")g:T1=^J$&BRV(-lTmNB6xqB[@0*o.erM*<SWF]u2=st-*(6v>^](H.aREZSi,#1:[IXaZFOm<-ui#qUq2$##Ri;u75OK#(RtaW-K-F`S+cF]uN`-KMQ%rP/Xri.LRcB##=YL3BgM/3M"
+ "D?@f&1'BW-)Ju<L25gl8uhVm1hL$##*8###'A3/LkKW+(^rWX?5W_8g)a(m&K8P>#bmmWCMkk&#TR`C,5d>g)F;t,4:@_l8G/5h4vUd%&%950:VXD'QdWoY-F$BtUwmfe$YqL'8(PWX("
+ "P?^@Po3$##`MSs?DWBZ/S>+4%>fX,VWv/w'KD`LP5IbH;rTV>n3cEK8U#bX]l-/V+^lj3;vlMb&[5YQ8#pekX9JP3XUC72L,,?+Ni&co7ApnO*5NK,((W-i:$,kp'UDAO(G0Sq7MVjJs"
+ "bIu)'Z,*[>br5fX^:FPAWr-m2KgL<LUN098kTF&#lvo58=/vjDo;.;)Ka*hLR#/k=rKbxuV`>Q_nN6'8uTG&#1T5g)uLv:873UpTLgH+#FgpH'_o1780Ph8KmxQJ8#H72L4@768@Tm&Q"
+ "h4CB/5OvmA&,Q&QbUoi$a_%3M01H)4x7I^&KQVgtFnV+;[Pc>[m4k//,]1?#`VY[Jr*3&&slRfLiVZJ:]?=K3Sw=[$=uRB?3xk48@aeg<Z'<$#4H)6,>e0jT6'N#(q%.O=?2S]u*(m<-"
+ "V8J'(1)G][68hW$5'q[GC&5j`TE?m'esFGNRM)j,ffZ?-qx8;->g4t*:CIP/[Qap7/9'#(1sao7w-.qNUdkJ)tCF&#B^;xGvn2r9FEPFFFcL@.iFNkTve$m%#QvQS8U@)2Z+3K:AKM5i"
+ "sZ88+dKQ)W6>J%CL<KE>`.d*(B`-n8D9oK<Up]c$X$(,)M8Zt7/[rdkqTgl-0cuGMv'?>-XV1q['-5k'cAZ69e;D_?$ZPP&s^+7])$*$#@QYi9,5P&#9r+$%CE=68>K8r0=dSC%%(@p7"
+ ".m7jilQ02'0-VWAg<a/''3u.=4L$Y)6k/K:_[3=&jvL<L0C/2'v:^;-DIBW,B4E68:kZ;%?8(Q8BH=kO65BW?xSG&#@uU,DS*,?.+(o(#1vCS8#CHF>TlGW'b)Tq7VT9q^*^$$.:&N@@"
+ "$&)WHtPm*5_rO0&e%K&#-30j(E4#'Zb.o/(Tpm$>K'f@[PvFl,hfINTNU6u'0pao7%XUp9]5.>%h`8_=VYbxuel.NTSsJfLacFu3B'lQSu/m6-Oqem8T+oE--$0a/k]uj9EwsG>%veR*"
+ "hv^BFpQj:K'#SJ,sB-'#](j.Lg92rTw-*n%@/;39rrJF,l#qV%OrtBeC6/,;qB3ebNW[?,Hqj2L.1NP&GjUR=1D8QaS3Up&@*9wP?+lo7b?@%'k4`p0Z$22%K3+iCZj?XJN4Nm&+YF]u"
+ "@-W$U%VEQ/,,>>#)D<h#`)h0:<Q6909ua+&VU%n2:cG3FJ-%@Bj-DgLr`Hw&HAKjKjseK</xKT*)B,N9X3]krc12t'pgTV(Lv-tL[xg_%=M_q7a^x?7Ubd>#%8cY#YZ?=,`Wdxu/ae&#"
+ "w6)R89tI#6@s'(6Bf7a&?S=^ZI_kS&ai`&=tE72L_D,;^R)7[$s<Eh#c&)q.MXI%#v9ROa5FZO%sF7q7Nwb&#ptUJ:aqJe$Sl68%.D###EC><?-aF&#RNQv>o8lKN%5/$(vdfq7+ebA#"
+ "u1p]ovUKW&Y%q]'>$1@-[xfn$7ZTp7mM,G,Ko7a&Gu%G[RMxJs[0MM%wci.LFDK)(<c`Q8N)jEIF*+?P2a8g%)$q]o2aH8C&<SibC/q,(e:v;-b#6[$NtDZ84Je2KNvB#$P5?tQ3nt(0"
+ "d=j.LQf./Ll33+(;q3L-w=8dX$#WF&uIJ@-bfI>%:_i2B5CsR8&9Z&#=mPEnm0f`<&c)QL5uJ#%u%lJj+D-r;BoF&#4DoS97h5g)E#o:&S4weDF,9^Hoe`h*L+_a*NrLW-1pG_&2UdB8"
+ "6e%B/:=>)N4xeW.*wft-;$'58-ESqr<b?UI(_%@[P46>#U`'6AQ]m&6/`Z>#S?YY#Vc;r7U2&326d=w&H####?TZ`*4?&.MK?LP8Vxg>$[QXc%QJv92.(Db*B)gb*BM9dM*hJMAo*c&#"
+ "b0v=Pjer]$gG&JXDf->'StvU7505l9$AFvgYRI^&<^b68?j#q9QX4SM'RO#&sL1IM.rJfLUAj221]d##DW=m83u5;'bYx,*Sl0hL(W;;$doB&O/TQ:(Z^xBdLjL<Lni;''X.`$#8+1GD"
+ ":k$YUWsbn8ogh6rxZ2Z9]%nd+>V#*8U_72Lh+2Q8Cj0i:6hp&$C/:p(HK>T8Y[gHQ4`4)'$Ab(Nof%V'8hL&#<NEdtg(n'=S1A(Q1/I&4([%dM`,Iu'1:_hL>SfD07&6D<fp8dHM7/g+"
+ "tlPN9J*rKaPct&?'uBCem^jn%9_K)<,C5K3s=5g&GmJb*[SYq7K;TRLGCsM-$$;S%:Y@r7AK0pprpL<Lrh,q7e/%KWK:50I^+m'vi`3?%Zp+<-d+$L-Sv:@.o19n$s0&39;kn;S%BSq*"
+ "$3WoJSCLweV[aZ'MQIjO<7;X-X;&+dMLvu#^UsGEC9WEc[X(wI7#2.(F0jV*eZf<-Qv3J-c+J5AlrB#$p(H68LvEA'q3n0#m,[`*8Ft)FcYgEud]CWfm68,(aLA$@EFTgLXoBq/UPlp7"
+ ":d[/;r_ix=:TF`S5H-b<LI&HY(K=h#)]Lk$K14lVfm:x$H<3^Ql<M`$OhapBnkup'D#L$Pb_`N*g]2e;X/Dtg,bsj&K#2[-:iYr'_wgH)NUIR8a1n#S?Yej'h8^58UbZd+^FKD*T@;6A"
+ "7aQC[K8d-(v6GI$x:T<&'Gp5Uf>@M.*J:;$-rv29'M]8qMv-tLp,'886iaC=Hb*YJoKJ,(j%K=H`K.v9HggqBIiZu'QvBT.#=)0ukruV&.)3=(^1`o*Pj4<-<aN((^7('#Z0wK#5GX@7"
+ "u][`*S^43933A4rl][`*O4CgLEl]v$1Q3AeF37dbXk,.)vj#x'd`;qgbQR%FW,2(?LO=s%Sc68%NP'##Aotl8x=BE#j1UD([3$M(]UI2LX3RpKN@;/#f'f/&_mt&F)XdF<9t4)Qa.*kT"
+ "LwQ'(TTB9.xH'>#MJ+gLq9-##@HuZPN0]u:h7.T..G:;$/Usj(T7`Q8tT72LnYl<-qx8;-HV7Q-&Xdx%1a,hC=0u+HlsV>nuIQL-5<N?)NBS)QN*_I,?&)2'IM%L3I)X((e/dl2&8'<M"
+ ":^#M*Q+[T.Xri.LYS3v%fF`68h;b-X[/En'CR.q7E)p'/kle2HM,u;^%OKC-N+Ll%F9CF<Nf'^#t2L,;27W:0O@6##U6W7:$rJfLWHj$#)woqBefIZ.PK<b*t7ed;p*_m;4ExK#h@&]>"
+ "_>@kXQtMacfD.m-VAb8;IReM3$wf0''hra*so568'Ip&vRs849'MRYSp%:t:h5qSgwpEr$B>Q,;s(C#$)`svQuF$##-D,##,g68@2[T;.XSdN9Qe)rpt._K-#5wF)sP'##p#C0c%-Gb%"
+ "hd+<-j'Ai*x&&HMkT]C'OSl##5RG[JXaHN;d'uA#x._U;.`PU@(Z3dt4r152@:v,'R.Sj'w#0<-;kPI)FfJ&#AYJ&#//)>-k=m=*XnK$>=)72L]0I%>.G690a:$##<,);?;72#?x9+d;"
+ "^V'9;jY@;)br#q^YQpx:X#Te$Z^'=-=bGhLf:D6&bNwZ9-ZD#n^9HhLMr5G;']d&6'wYmTFmL<LD)F^%[tC'8;+9E#C$g%#5Y>q9wI>P(9mI[>kC-ekLC/R&CH+s'B;K-M6$EB%is00:"
+ "+A4[7xks.LrNk0&E)wILYF@2L'0Nb$+pv<(2.768/FrY&h$^3i&@+G%JT'<-,v`3;_)I9M^AE]CN?Cl2AZg+%4iTpT3<n-&%H%b<FDj2M<hH=&Eh<2Len$b*aTX=-8QxN)k11IM1c^j%"
+ "9s<L<NFSo)B?+<-(GxsF,^-Eh@$4dXhN$+#rxK8'je'D7k`e;)2pYwPA'_p9&@^18ml1^[@g4t*[JOa*[=Qp7(qJ_oOL^('7fB&Hq-:sf,sNj8xq^>$U4O]GKx'm9)b@p7YsvK3w^YR-"
+ "CdQ*:Ir<($u&)#(&?L9Rg3H)4fiEp^iI9O8KnTj,]H?D*r7'M;PwZ9K0E^k&-cpI;.p/6_vwoFMV<->#%Xi.LxVnrU(4&8/P+:hLSKj$#U%]49t'I:rgMi'FL@a:0Y-uA[39',(vbma*"
+ "hU%<-SRF`Tt:542R_VV$p@[p8DV[A,?1839FWdF<TddF<9Ah-6&9tWoDlh]&1SpGMq>Ti1O*H&#(AL8[_P%.M>v^-))qOT*F5Cq0`Ye%+$B6i:7@0IX<N+T+0MlMBPQ*Vj>SsD<U4JHY"
+ "8kD2)2fU/M#$e.)T4,_=8hLim[&);?UkK'-x?'(:siIfL<$pFM`i<?%W(mGDHM%>iWP,##P`%/L<eXi:@Z9C.7o=@(pXdAO/NLQ8lPl+HPOQa8wD8=^GlPa8TKI1CjhsCTSLJM'/Wl>-"
+ "S(qw%sf/@%#B6;/U7K]uZbi^Oc^2n<bhPmUkMw>%t<)'mEVE''n`WnJra$^TKvX5B>;_aSEK',(hwa0:i4G?.Bci.(X[?b*($,=-n<.Q%`(X=?+@Am*Js0&=3bh8K]mL<LoNs'6,'85`"
+ "0?t/'_U59@]ddF<#LdF<eWdF<OuN/45rY<-L@&#+fm>69=Lb,OcZV/);TTm8VI;?%OtJ<(b4mq7M6:u?KRdF<gR@2L=FNU-<b[(9c/ML3m;Z[$oF3g)GAWqpARc=<ROu7cL5l;-[A]%/"
+ "+fsd;l#SafT/f*W]0=O'$(Tb<[)*@e775R-:Yob%g*>l*:xP?Yb.5)%w_I?7uk5JC+FS(m#i'k.'a0i)9<7b'fs'59hq$*5Uhv##pi^8+hIEBF`nvo`;'l0.^S1<-wUK2/Coh58KKhLj"
+ "M=SO*rfO`+qC`W-On.=AJ56>>i2@2LH6A:&5q`?9I3@@'04&p2/LVa*T-4<-i3;M9UvZd+N7>b*eIwg:CC)c<>nO&#<IGe;__.thjZl<%w(Wk2xmp4Q@I#I9,DF]u7-P=.-_:YJ]aS@V"
+ "?6*C()dOp7:WL,b&3Rg/.cmM9&r^>$(>.Z-I&J(Q0Hd5Q%7Co-b`-c<N(6r@ip+AurK<m86QIth*#v;-OBqi+L7wDE-Ir8K['m+DDSLwK&/.?-V%U_%3:qKNu$_b*B-kp7NaD'QdWQPK"
+ "Yq[@>P)hI;*_F]u`Rb[.j8_Q/<&>uu+VsH$sM9TA%?)(vmJ80),P7E>)tjD%2L=-t#fK[%`v=Q8<FfNkgg^oIbah*#8/Qt$F&:K*-(N/'+1vMB,u()-a.VUU*#[e%gAAO(S>WlA2);Sa"
+ ">gXm8YB`1d@K#n]76-a$U,mF<fX]idqd)<3,]J7JmW4`6]uks=4-72L(jEk+:bJ0M^q-8Dm_Z?0olP1C9Sa&H[d&c$ooQUj]Exd*3ZM@-WGW2%s',B-_M%>%Ul:#/'xoFM9QX-$.QN'>"
+ "[%$Z$uF6pA6Ki2O5:8w*vP1<-1`[G,)-m#>0`P&#eb#.3i)rtB61(o'$?X3B</R90;eZ]%Ncq;-Tl]#F>2Qft^ae_5tKL9MUe9b*sLEQ95C&`=G?@Mj=wh*'3E>=-<)Gt*Iw)'QG:`@I"
+ "wOf7&]1i'S01B+Ev/Nac#9S;=;YQpg_6U`*kVY39xK,[/6Aj7:'1Bm-_1EYfa1+o&o4hp7KN_Q(OlIo@S%;jVdn0'1<Vc52=u`3^o-n1'g4v58Hj&6_t7$##?M)c<$bgQ_'SY((-xkA#"
+ "Y(,p'H9rIVY-b,'%bCPF7.J<Up^,(dU1VY*5#WkTU>h19w,WQhLI)3S#f$2(eb,jr*b;3Vw]*7NH%$c4Vs,eD9>XW8?N]o+(*pgC%/72LV-u<Hp,3@e^9UB1J+ak9-TN/mhKPg+AJYd$"
+ "MlvAF_jCK*.O-^(63adMT->W%iewS8W6m2rtCpo'RS1R84=@paTKt)>=%&1[)*vp'u+x,VrwN;&]kuO9JDbg=pO$J*.jVe;u'm0dr9l,<*wMK*Oe=g8lV_KEBFkO'oU]^=[-792#ok,)"
+ "i]lR8qQ2oA8wcRCZ^7w/Njh;?.stX?Q1>S1q4Bn$)K1<-rGdO'$Wr.Lc.CG)$/*JL4tNR/,SVO3,aUw'DJN:)Ss;wGn9A32ijw%FL+Z0Fn.U9;reSq)bmI32U==5ALuG&#Vf1398/pVo"
+ "1*c-(aY168o<`JsSbk-,1N;$>0:OUas(3:8Z972LSfF8eb=c-;>SPw7.6hn3m`9^Xkn(r.qS[0;T%&Qc=+STRxX'q1BNk3&*eu2;&8q$&x>Q#Q7^Tf+6<(d%ZVmj2bDi%.3L2n+4W'$P"
+ "iDDG)g,r%+?,$@?uou5tSe2aN_AQU*<h`e-GI7)?OK2A.d7_c)?wQ5AS@DL3r#7fSkgl6-++D:'A,uq7SvlB$pcpH'q3n0#_%dY#xCpr-l<F0NR@-##FEV6NTF6##$l84N1w?AO>'IAO"
+ "URQ##V^Fv-XFbGM7Fl(N<3DhLGF%q.1rC$#:T__&Pi68%0xi_&[qFJ(77j_&JWoF.V735&T,[R*:xFR*K5>>#`bW-?4Ne_&6Ne_&6Ne_&n`kr-#GJcM6X;uM6X;uM(.a..^2TkL%oR(#"
+ ";u.T%fAr%4tJ8&><1=GHZ_+m9/#H1F^R#SC#*N=BA9(D?v[UiFY>>^8p,KKF.W]L29uLkLlu/+4T<XoIB&hx=T1PcDaB&;HH+-AFr?(m9HZV)FKS8JCw;SD=6[^/DZUL`EUDf]GGlG&>"
+ "w$)F./^n3+rlo+DB;5sIYGNk+i1t-69Jg--0pao7Sm#K)pdHW&;LuDNH@H>#/X-TI(;P>#,Gc>#0Su>#4`1?#8lC?#<xU?#@.i?#D:%@#HF7@#LRI@#P_[@#Tkn@#Xw*A#]-=A#a9OA#"
+ "d<F&#*;G##.GY##2Sl##6`($#:l:$#>xL$#B.`$#F:r$#JF.%#NR@%#R_R%#Vke%#Zww%#_-4&#3^Rh%Sflr-k'MS.o?.5/sWel/wpEM0%3'/1)K^f1-d>G21&v(35>V`39V7A4=onx4"
+ "A1OY5EI0;6Ibgr6M$HS7Q<)58C5w,;WoA*#[%T*#`1g*#d=#+#hI5+#lUG+#pbY+#tnl+#x$),#&1;,#*=M,#.I`,#2Ur,#6b.-#;w[H#iQtA#m^0B#qjBB#uvTB##-hB#'9$C#+E6C#"
+ "/QHC#3^ZC#7jmC#;v)D#?,<D#C8ND#GDaD#KPsD#O]/E#g1A5#KA*1#gC17#MGd;#8(02#L-d3#rWM4#Hga1#,<w0#T.j<#O#'2#CYN1#qa^:#_4m3#o@/=#eG8=#t8J5#`+78#4uI-#"
+ "m3B2#SB[8#Q0@8#i[*9#iOn8#1Nm;#^sN9#qh<9#:=x-#P;K2#$%X9#bC+.#Rg;<#mN=.#MTF.#RZO.#2?)4#Y#(/#[)1/#b;L/#dAU/#0Sv;#lY$0#n`-0#sf60#(F24#wrH0#%/e0#"
+ "TmD<#%JSMFove:CTBEXI:<eh2g)B,3h2^G3i;#d3jD>)4kMYD4lVu`4m`:&5niUA5@(A5BA1]PBB:xlBCC=2CDLXMCEUtiCf&0g2'tN?PGT4CPGT4CPGT4CPGT4CPGT4CPGT4CPGT4CP"
+ "GT4CPGT4CPGT4CPGT4CPGT4CPGT4CP-qekC`.9kEg^+F$kwViFJTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5o,^<-28ZI'O?;xp"
+ "O?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xp;7q-#lLYI:xvD=#";
+
+#endif /* NK_INCLUDE_DEFAULT_FONT */
+
+#define NK_CURSOR_DATA_W 90
+#define NK_CURSOR_DATA_H 27
+NK_GLOBAL const char nk_custom_cursor_data[NK_CURSOR_DATA_W * NK_CURSOR_DATA_H + 1] =
+{
+ "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX"
+ "..- -X.....X- X.X - X.X -X.....X - X.....X"
+ "--- -XXX.XXX- X...X - X...X -X....X - X....X"
+ "X - X.X - X.....X - X.....X -X...X - X...X"
+ "XX - X.X -X.......X- X.......X -X..X.X - X.X..X"
+ "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X"
+ "X..X - X.X - X.X - X.X -XX X.X - X.X XX"
+ "X...X - X.X - X.X - XX X.X XX - X.X - X.X "
+ "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X "
+ "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X "
+ "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X "
+ "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X "
+ "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X "
+ "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X "
+ "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X "
+ "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X "
+ "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX "
+ "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------"
+ "X.X X..X - -X.......X- X.......X - XX XX - "
+ "XX X..X - - X.....X - X.....X - X.X X.X - "
+ " X..X - X...X - X...X - X..X X..X - "
+ " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - "
+ "------------ - X - X -X.....................X- "
+ " ----------------------------------- X...XXXXXXXXXXXXX...X - "
+ " - X..X X..X - "
+ " - X.X X.X - "
+ " - XX XX - "
+};
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC diagnostic pop
+#endif
+
+NK_GLOBAL unsigned char *nk__barrier;
+NK_GLOBAL unsigned char *nk__barrier2;
+NK_GLOBAL unsigned char *nk__barrier3;
+NK_GLOBAL unsigned char *nk__barrier4;
+NK_GLOBAL unsigned char *nk__dout;
+
+NK_INTERN unsigned int
+nk_decompress_length(unsigned char *input)
+{
+ return (unsigned int)((input[8] << 24) + (input[9] << 16) + (input[10] << 8) + input[11]);
+}
+NK_INTERN void
+nk__match(unsigned char *data, unsigned int length)
+{
+ /* INVERSE of memmove... write each byte before copying the next...*/
+ NK_ASSERT (nk__dout + length <= nk__barrier);
+ if (nk__dout + length > nk__barrier) { nk__dout += length; return; }
+ if (data < nk__barrier4) { nk__dout = nk__barrier+1; return; }
+ while (length--) *nk__dout++ = *data++;
+}
+NK_INTERN void
+nk__lit(unsigned char *data, unsigned int length)
+{
+ NK_ASSERT (nk__dout + length <= nk__barrier);
+ if (nk__dout + length > nk__barrier) { nk__dout += length; return; }
+ if (data < nk__barrier2) { nk__dout = nk__barrier+1; return; }
+ NK_MEMCPY(nk__dout, data, length);
+ nk__dout += length;
+}
+NK_INTERN unsigned char*
+nk_decompress_token(unsigned char *i)
+{
+ #define nk__in2(x) ((i[x] << 8) + i[(x)+1])
+ #define nk__in3(x) ((i[x] << 16) + nk__in2((x)+1))
+ #define nk__in4(x) ((i[x] << 24) + nk__in3((x)+1))
+
+ if (*i >= 0x20) { /* use fewer if's for cases that expand small */
+ if (*i >= 0x80) nk__match(nk__dout-i[1]-1, (unsigned int)i[0] - 0x80 + 1), i += 2;
+ else if (*i >= 0x40) nk__match(nk__dout-(nk__in2(0) - 0x4000 + 1), (unsigned int)i[2]+1), i += 3;
+ else /* *i >= 0x20 */ nk__lit(i+1, (unsigned int)i[0] - 0x20 + 1), i += 1 + (i[0] - 0x20 + 1);
+ } else { /* more ifs for cases that expand large, since overhead is amortized */
+ if (*i >= 0x18) nk__match(nk__dout-(unsigned int)(nk__in3(0) - 0x180000 + 1), (unsigned int)i[3]+1), i += 4;
+ else if (*i >= 0x10) nk__match(nk__dout-(unsigned int)(nk__in3(0) - 0x100000 + 1), (unsigned int)nk__in2(3)+1), i += 5;
+ else if (*i >= 0x08) nk__lit(i+2, (unsigned int)nk__in2(0) - 0x0800 + 1), i += 2 + (nk__in2(0) - 0x0800 + 1);
+ else if (*i == 0x07) nk__lit(i+3, (unsigned int)nk__in2(1) + 1), i += 3 + (nk__in2(1) + 1);
+ else if (*i == 0x06) nk__match(nk__dout-(unsigned int)(nk__in3(1)+1), i[4]+1u), i += 5;
+ else if (*i == 0x04) nk__match(nk__dout-(unsigned int)(nk__in3(1)+1), (unsigned int)nk__in2(4)+1u), i += 6;
+ }
+ return i;
+}
+NK_INTERN unsigned int
+nk_adler32(unsigned int adler32, unsigned char *buffer, unsigned int buflen)
+{
+ const unsigned long ADLER_MOD = 65521;
+ unsigned long s1 = adler32 & 0xffff, s2 = adler32 >> 16;
+ unsigned long blocklen, i;
+
+ blocklen = buflen % 5552;
+ while (buflen) {
+ for (i=0; i + 7 < blocklen; i += 8) {
+ s1 += buffer[0]; s2 += s1;
+ s1 += buffer[1]; s2 += s1;
+ s1 += buffer[2]; s2 += s1;
+ s1 += buffer[3]; s2 += s1;
+ s1 += buffer[4]; s2 += s1;
+ s1 += buffer[5]; s2 += s1;
+ s1 += buffer[6]; s2 += s1;
+ s1 += buffer[7]; s2 += s1;
+ buffer += 8;
+ }
+ for (; i < blocklen; ++i) {
+ s1 += *buffer++; s2 += s1;
+ }
+
+ s1 %= ADLER_MOD; s2 %= ADLER_MOD;
+ buflen -= (unsigned int)blocklen;
+ blocklen = 5552;
+ }
+ return (unsigned int)(s2 << 16) + (unsigned int)s1;
+}
+NK_INTERN unsigned int
+nk_decompress(unsigned char *output, unsigned char *i, unsigned int length)
+{
+ unsigned int olen;
+ if (nk__in4(0) != 0x57bC0000) return 0;
+ if (nk__in4(4) != 0) return 0; /* error! stream is > 4GB */
+ olen = nk_decompress_length(i);
+ nk__barrier2 = i;
+ nk__barrier3 = i+length;
+ nk__barrier = output + olen;
+ nk__barrier4 = output;
+ i += 16;
+
+ nk__dout = output;
+ for (;;) {
+ unsigned char *old_i = i;
+ i = nk_decompress_token(i);
+ if (i == old_i) {
+ if (*i == 0x05 && i[1] == 0xfa) {
+ NK_ASSERT(nk__dout == output + olen);
+ if (nk__dout != output + olen) return 0;
+ if (nk_adler32(1, output, olen) != (unsigned int) nk__in4(2))
+ return 0;
+ return olen;
+ } else {
+ NK_ASSERT(0); /* NOTREACHED */
+ return 0;
+ }
+ }
+ NK_ASSERT(nk__dout <= output + olen);
+ if (nk__dout > output + olen)
+ return 0;
+ }
+}
+NK_INTERN unsigned int
+nk_decode_85_byte(char c)
+{
+ return (unsigned int)((c >= '\\') ? c-36 : c-35);
+}
+NK_INTERN void
+nk_decode_85(unsigned char* dst, const unsigned char* src)
+{
+ while (*src)
+ {
+ unsigned int tmp =
+ nk_decode_85_byte((char)src[0]) +
+ 85 * (nk_decode_85_byte((char)src[1]) +
+ 85 * (nk_decode_85_byte((char)src[2]) +
+ 85 * (nk_decode_85_byte((char)src[3]) +
+ 85 * nk_decode_85_byte((char)src[4]))));
+
+ /* we can't assume little-endianess. */
+ dst[0] = (unsigned char)((tmp >> 0) & 0xFF);
+ dst[1] = (unsigned char)((tmp >> 8) & 0xFF);
+ dst[2] = (unsigned char)((tmp >> 16) & 0xFF);
+ dst[3] = (unsigned char)((tmp >> 24) & 0xFF);
+
+ src += 5;
+ dst += 4;
+ }
+}
+
+/* -------------------------------------------------------------
+ *
+ * FONT ATLAS
+ *
+ * --------------------------------------------------------------*/
+NK_API struct nk_font_config
+nk_font_config(float pixel_height)
+{
+ struct nk_font_config cfg;
+ nk_zero_struct(cfg);
+ cfg.ttf_blob = 0;
+ cfg.ttf_size = 0;
+ cfg.ttf_data_owned_by_atlas = 0;
+ cfg.size = pixel_height;
+ cfg.oversample_h = 3;
+ cfg.oversample_v = 1;
+ cfg.pixel_snap = 0;
+ cfg.coord_type = NK_COORD_UV;
+ cfg.spacing = nk_vec2(0,0);
+ cfg.range = nk_font_default_glyph_ranges();
+ cfg.merge_mode = 0;
+ cfg.fallback_glyph = '?';
+ cfg.font = 0;
+ cfg.n = 0;
+ return cfg;
+}
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void
+nk_font_atlas_init_default(struct nk_font_atlas *atlas)
+{
+ NK_ASSERT(atlas);
+ if (!atlas) return;
+ nk_zero_struct(*atlas);
+ atlas->temporary.userdata.ptr = 0;
+ atlas->temporary.alloc = nk_malloc;
+ atlas->temporary.free = nk_mfree;
+ atlas->permanent.userdata.ptr = 0;
+ atlas->permanent.alloc = nk_malloc;
+ atlas->permanent.free = nk_mfree;
+}
+#endif
+NK_API void
+nk_font_atlas_init(struct nk_font_atlas *atlas, struct nk_allocator *alloc)
+{
+ NK_ASSERT(atlas);
+ NK_ASSERT(alloc);
+ if (!atlas || !alloc) return;
+ nk_zero_struct(*atlas);
+ atlas->permanent = *alloc;
+ atlas->temporary = *alloc;
+}
+NK_API void
+nk_font_atlas_init_custom(struct nk_font_atlas *atlas,
+ struct nk_allocator *permanent, struct nk_allocator *temporary)
+{
+ NK_ASSERT(atlas);
+ NK_ASSERT(permanent);
+ NK_ASSERT(temporary);
+ if (!atlas || !permanent || !temporary) return;
+ nk_zero_struct(*atlas);
+ atlas->permanent = *permanent;
+ atlas->temporary = *temporary;
+}
+NK_API void
+nk_font_atlas_begin(struct nk_font_atlas *atlas)
+{
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc && atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc && atlas->permanent.free);
+ if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free ||
+ !atlas->temporary.alloc || !atlas->temporary.free) return;
+ if (atlas->glyphs) {
+ atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);
+ atlas->glyphs = 0;
+ }
+ if (atlas->pixel) {
+ atlas->permanent.free(atlas->permanent.userdata, atlas->pixel);
+ atlas->pixel = 0;
+ }
+}
+NK_API struct nk_font*
+nk_font_atlas_add(struct nk_font_atlas *atlas, const struct nk_font_config *config)
+{
+ struct nk_font *font = 0;
+ struct nk_font_config *cfg;
+
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+
+ NK_ASSERT(config);
+ NK_ASSERT(config->ttf_blob);
+ NK_ASSERT(config->ttf_size);
+ NK_ASSERT(config->size > 0.0f);
+
+ if (!atlas || !config || !config->ttf_blob || !config->ttf_size || config->size <= 0.0f||
+ !atlas->permanent.alloc || !atlas->permanent.free ||
+ !atlas->temporary.alloc || !atlas->temporary.free)
+ return 0;
+
+ /* allocate font config */
+ cfg = (struct nk_font_config*)
+ atlas->permanent.alloc(atlas->permanent.userdata,0, sizeof(struct nk_font_config));
+ NK_MEMCPY(cfg, config, sizeof(*config));
+ cfg->n = cfg;
+ cfg->p = cfg;
+
+ if (!config->merge_mode) {
+ /* insert font config into list */
+ if (!atlas->config) {
+ atlas->config = cfg;
+ cfg->next = 0;
+ } else {
+ struct nk_font_config *i = atlas->config;
+ while (i->next) i = i->next;
+ i->next = cfg;
+ cfg->next = 0;
+ }
+ /* allocate new font */
+ font = (struct nk_font*)
+ atlas->permanent.alloc(atlas->permanent.userdata,0, sizeof(struct nk_font));
+ NK_ASSERT(font);
+ nk_zero(font, sizeof(*font));
+ if (!font) return 0;
+ font->config = cfg;
+
+ /* insert font into list */
+ if (!atlas->fonts) {
+ atlas->fonts = font;
+ font->next = 0;
+ } else {
+ struct nk_font *i = atlas->fonts;
+ while (i->next) i = i->next;
+ i->next = font;
+ font->next = 0;
+ }
+ cfg->font = &font->info;
+ } else {
+ /* extend previously added font */
+ struct nk_font *f = 0;
+ struct nk_font_config *c = 0;
+ NK_ASSERT(atlas->font_num);
+ f = atlas->fonts;
+ c = f->config;
+ cfg->font = &f->info;
+
+ cfg->n = c;
+ cfg->p = c->p;
+ c->p->n = cfg;
+ c->p = cfg;
+ }
+ /* create own copy of .TTF font blob */
+ if (!config->ttf_data_owned_by_atlas) {
+ cfg->ttf_blob = atlas->permanent.alloc(atlas->permanent.userdata,0, cfg->ttf_size);
+ NK_ASSERT(cfg->ttf_blob);
+ if (!cfg->ttf_blob) {
+ atlas->font_num++;
+ return 0;
+ }
+ NK_MEMCPY(cfg->ttf_blob, config->ttf_blob, cfg->ttf_size);
+ cfg->ttf_data_owned_by_atlas = 1;
+ }
+ atlas->font_num++;
+ return font;
+}
+NK_API struct nk_font*
+nk_font_atlas_add_from_memory(struct nk_font_atlas *atlas, void *memory,
+ nk_size size, float height, const struct nk_font_config *config)
+{
+ struct nk_font_config cfg;
+ NK_ASSERT(memory);
+ NK_ASSERT(size);
+
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+ if (!atlas || !atlas->temporary.alloc || !atlas->temporary.free || !memory || !size ||
+ !atlas->permanent.alloc || !atlas->permanent.free)
+ return 0;
+
+ cfg = (config) ? *config: nk_font_config(height);
+ cfg.ttf_blob = memory;
+ cfg.ttf_size = size;
+ cfg.size = height;
+ cfg.ttf_data_owned_by_atlas = 0;
+ return nk_font_atlas_add(atlas, &cfg);
+}
+#ifdef NK_INCLUDE_STANDARD_IO
+NK_API struct nk_font*
+nk_font_atlas_add_from_file(struct nk_font_atlas *atlas, const char *file_path,
+ float height, const struct nk_font_config *config)
+{
+ nk_size size;
+ char *memory;
+ struct nk_font_config cfg;
+
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+
+ if (!atlas || !file_path) return 0;
+ memory = nk_file_load(file_path, &size, &atlas->permanent);
+ if (!memory) return 0;
+
+ cfg = (config) ? *config: nk_font_config(height);
+ cfg.ttf_blob = memory;
+ cfg.ttf_size = size;
+ cfg.size = height;
+ cfg.ttf_data_owned_by_atlas = 1;
+ return nk_font_atlas_add(atlas, &cfg);
+}
+#endif
+NK_API struct nk_font*
+nk_font_atlas_add_compressed(struct nk_font_atlas *atlas,
+ void *compressed_data, nk_size compressed_size, float height,
+ const struct nk_font_config *config)
+{
+ unsigned int decompressed_size;
+ void *decompressed_data;
+ struct nk_font_config cfg;
+
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+
+ NK_ASSERT(compressed_data);
+ NK_ASSERT(compressed_size);
+ if (!atlas || !compressed_data || !atlas->temporary.alloc || !atlas->temporary.free ||
+ !atlas->permanent.alloc || !atlas->permanent.free)
+ return 0;
+
+ decompressed_size = nk_decompress_length((unsigned char*)compressed_data);
+ decompressed_data = atlas->permanent.alloc(atlas->permanent.userdata,0,decompressed_size);
+ NK_ASSERT(decompressed_data);
+ if (!decompressed_data) return 0;
+ nk_decompress((unsigned char*)decompressed_data, (unsigned char*)compressed_data,
+ (unsigned int)compressed_size);
+
+ cfg = (config) ? *config: nk_font_config(height);
+ cfg.ttf_blob = decompressed_data;
+ cfg.ttf_size = decompressed_size;
+ cfg.size = height;
+ cfg.ttf_data_owned_by_atlas = 1;
+ return nk_font_atlas_add(atlas, &cfg);
+}
+NK_API struct nk_font*
+nk_font_atlas_add_compressed_base85(struct nk_font_atlas *atlas,
+ const char *data_base85, float height, const struct nk_font_config *config)
+{
+ int compressed_size;
+ void *compressed_data;
+ struct nk_font *font;
+
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+
+ NK_ASSERT(data_base85);
+ if (!atlas || !data_base85 || !atlas->temporary.alloc || !atlas->temporary.free ||
+ !atlas->permanent.alloc || !atlas->permanent.free)
+ return 0;
+
+ compressed_size = (((int)nk_strlen(data_base85) + 4) / 5) * 4;
+ compressed_data = atlas->temporary.alloc(atlas->temporary.userdata,0, (nk_size)compressed_size);
+ NK_ASSERT(compressed_data);
+ if (!compressed_data) return 0;
+ nk_decode_85((unsigned char*)compressed_data, (const unsigned char*)data_base85);
+ font = nk_font_atlas_add_compressed(atlas, compressed_data,
+ (nk_size)compressed_size, height, config);
+ atlas->temporary.free(atlas->temporary.userdata, compressed_data);
+ return font;
+}
+
+#ifdef NK_INCLUDE_DEFAULT_FONT
+NK_API struct nk_font*
+nk_font_atlas_add_default(struct nk_font_atlas *atlas,
+ float pixel_height, const struct nk_font_config *config)
+{
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+ return nk_font_atlas_add_compressed_base85(atlas,
+ nk_proggy_clean_ttf_compressed_data_base85, pixel_height, config);
+}
+#endif
+NK_API const void*
+nk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,
+ enum nk_font_atlas_format fmt)
+{
+ int i = 0;
+ void *tmp = 0;
+ nk_size tmp_size, img_size;
+ struct nk_font *font_iter;
+ struct nk_font_baker *baker;
+
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+
+ NK_ASSERT(width);
+ NK_ASSERT(height);
+ if (!atlas || !width || !height ||
+ !atlas->temporary.alloc || !atlas->temporary.free ||
+ !atlas->permanent.alloc || !atlas->permanent.free)
+ return 0;
+
+#ifdef NK_INCLUDE_DEFAULT_FONT
+ /* no font added so just use default font */
+ if (!atlas->font_num)
+ atlas->default_font = nk_font_atlas_add_default(atlas, 13.0f, 0);
+#endif
+ NK_ASSERT(atlas->font_num);
+ if (!atlas->font_num) return 0;
+
+ /* allocate temporary baker memory required for the baking process */
+ nk_font_baker_memory(&tmp_size, &atlas->glyph_count, atlas->config, atlas->font_num);
+ tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);
+ NK_ASSERT(tmp);
+ if (!tmp) goto failed;
+
+ /* allocate glyph memory for all fonts */
+ baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);
+ atlas->glyphs = (struct nk_font_glyph*)atlas->permanent.alloc(
+ atlas->permanent.userdata,0, sizeof(struct nk_font_glyph)*(nk_size)atlas->glyph_count);
+ NK_ASSERT(atlas->glyphs);
+ if (!atlas->glyphs)
+ goto failed;
+
+ /* pack all glyphs into a tight fit space */
+ atlas->custom.w = (NK_CURSOR_DATA_W*2)+1;
+ atlas->custom.h = NK_CURSOR_DATA_H + 1;
+ if (!nk_font_bake_pack(baker, &img_size, width, height, &atlas->custom,
+ atlas->config, atlas->font_num, &atlas->temporary))
+ goto failed;
+
+ /* allocate memory for the baked image font atlas */
+ atlas->pixel = atlas->temporary.alloc(atlas->temporary.userdata,0, img_size);
+ NK_ASSERT(atlas->pixel);
+ if (!atlas->pixel)
+ goto failed;
+
+ /* bake glyphs and custom white pixel into image */
+ nk_font_bake(baker, atlas->pixel, *width, *height,
+ atlas->glyphs, atlas->glyph_count, atlas->config, atlas->font_num);
+ nk_font_bake_custom_data(atlas->pixel, *width, *height, atlas->custom,
+ nk_custom_cursor_data, NK_CURSOR_DATA_W, NK_CURSOR_DATA_H, '.', 'X');
+
+ if (fmt == NK_FONT_ATLAS_RGBA32) {
+ /* convert alpha8 image into rgba32 image */
+ void *img_rgba = atlas->temporary.alloc(atlas->temporary.userdata,0,
+ (nk_size)(*width * *height * 4));
+ NK_ASSERT(img_rgba);
+ if (!img_rgba) goto failed;
+ nk_font_bake_convert(img_rgba, *width, *height, atlas->pixel);
+ atlas->temporary.free(atlas->temporary.userdata, atlas->pixel);
+ atlas->pixel = img_rgba;
+ }
+ atlas->tex_width = *width;
+ atlas->tex_height = *height;
+
+ /* initialize each font */
+ for (font_iter = atlas->fonts; font_iter; font_iter = font_iter->next) {
+ struct nk_font *font = font_iter;
+ struct nk_font_config *config = font->config;
+ nk_font_init(font, config->size, config->fallback_glyph, atlas->glyphs,
+ config->font, nk_handle_ptr(0));
+ }
+
+ /* initialize each cursor */
+ {NK_STORAGE const struct nk_vec2 nk_cursor_data[NK_CURSOR_COUNT][3] = {
+ /* Pos Size Offset */
+ {{ 0, 3}, {12,19}, { 0, 0}},
+ {{13, 0}, { 7,16}, { 4, 8}},
+ {{31, 0}, {23,23}, {11,11}},
+ {{21, 0}, { 9, 23}, { 5,11}},
+ {{55,18}, {23, 9}, {11, 5}},
+ {{73, 0}, {17,17}, { 9, 9}},
+ {{55, 0}, {17,17}, { 9, 9}}
+ };
+ for (i = 0; i < NK_CURSOR_COUNT; ++i) {
+ struct nk_cursor *cursor = &atlas->cursors[i];
+ cursor->img.w = (unsigned short)*width;
+ cursor->img.h = (unsigned short)*height;
+ cursor->img.region[0] = (unsigned short)(atlas->custom.x + nk_cursor_data[i][0].x);
+ cursor->img.region[1] = (unsigned short)(atlas->custom.y + nk_cursor_data[i][0].y);
+ cursor->img.region[2] = (unsigned short)nk_cursor_data[i][1].x;
+ cursor->img.region[3] = (unsigned short)nk_cursor_data[i][1].y;
+ cursor->size = nk_cursor_data[i][1];
+ cursor->offset = nk_cursor_data[i][2];
+ }}
+ /* free temporary memory */
+ atlas->temporary.free(atlas->temporary.userdata, tmp);
+ return atlas->pixel;
+
+failed:
+ /* error so cleanup all memory */
+ if (tmp) atlas->temporary.free(atlas->temporary.userdata, tmp);
+ if (atlas->glyphs) {
+ atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);
+ atlas->glyphs = 0;
+ }
+ if (atlas->pixel) {
+ atlas->temporary.free(atlas->temporary.userdata, atlas->pixel);
+ atlas->pixel = 0;
+ }
+ return 0;
+}
+NK_API void
+nk_font_atlas_end(struct nk_font_atlas *atlas, nk_handle texture,
+ struct nk_draw_null_texture *null)
+{
+ int i = 0;
+ struct nk_font *font_iter;
+ NK_ASSERT(atlas);
+ if (!atlas) {
+ if (!null) return;
+ null->texture = texture;
+ null->uv = nk_vec2(0.5f,0.5f);
+ }
+ if (null) {
+ null->texture = texture;
+ null->uv.x = (atlas->custom.x + 0.5f)/(float)atlas->tex_width;
+ null->uv.y = (atlas->custom.y + 0.5f)/(float)atlas->tex_height;
+ }
+ for (font_iter = atlas->fonts; font_iter; font_iter = font_iter->next) {
+ font_iter->texture = texture;
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+ font_iter->handle.texture = texture;
+#endif
+ }
+ for (i = 0; i < NK_CURSOR_COUNT; ++i)
+ atlas->cursors[i].img.handle = texture;
+
+ atlas->temporary.free(atlas->temporary.userdata, atlas->pixel);
+ atlas->pixel = 0;
+ atlas->tex_width = 0;
+ atlas->tex_height = 0;
+ atlas->custom.x = 0;
+ atlas->custom.y = 0;
+ atlas->custom.w = 0;
+ atlas->custom.h = 0;
+}
+NK_API void
+nk_font_atlas_cleanup(struct nk_font_atlas *atlas)
+{
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+ if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free) return;
+ if (atlas->config) {
+ struct nk_font_config *iter;
+ for (iter = atlas->config; iter; iter = iter->next) {
+ struct nk_font_config *i;
+ for (i = iter->n; i != iter; i = i->n) {
+ atlas->permanent.free(atlas->permanent.userdata, i->ttf_blob);
+ i->ttf_blob = 0;
+ }
+ atlas->permanent.free(atlas->permanent.userdata, iter->ttf_blob);
+ iter->ttf_blob = 0;
+ }
+ }
+}
+NK_API void
+nk_font_atlas_clear(struct nk_font_atlas *atlas)
+{
+ NK_ASSERT(atlas);
+ NK_ASSERT(atlas->temporary.alloc);
+ NK_ASSERT(atlas->temporary.free);
+ NK_ASSERT(atlas->permanent.alloc);
+ NK_ASSERT(atlas->permanent.free);
+ if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free) return;
+
+ if (atlas->config) {
+ struct nk_font_config *iter, *next;
+ for (iter = atlas->config; iter; iter = next) {
+ struct nk_font_config *i, *n;
+ for (i = iter->n; i != iter; i = n) {
+ n = i->n;
+ if (i->ttf_blob)
+ atlas->permanent.free(atlas->permanent.userdata, i->ttf_blob);
+ atlas->permanent.free(atlas->permanent.userdata, i);
+ }
+ next = iter->next;
+ if (i->ttf_blob)
+ atlas->permanent.free(atlas->permanent.userdata, iter->ttf_blob);
+ atlas->permanent.free(atlas->permanent.userdata, iter);
+ }
+ atlas->config = 0;
+ }
+ if (atlas->fonts) {
+ struct nk_font *iter, *next;
+ for (iter = atlas->fonts; iter; iter = next) {
+ next = iter->next;
+ atlas->permanent.free(atlas->permanent.userdata, iter);
+ }
+ atlas->fonts = 0;
+ }
+ if (atlas->glyphs)
+ atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);
+ nk_zero_struct(*atlas);
+}
+#endif
+
+
+
+
+
+/* ===============================================================
+ *
+ * INPUT
+ *
+ * ===============================================================*/
+NK_API void
+nk_input_begin(struct nk_context *ctx)
+{
+ int i;
+ struct nk_input *in;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ in = &ctx->input;
+ for (i = 0; i < NK_BUTTON_MAX; ++i)
+ in->mouse.buttons[i].clicked = 0;
+
+ in->keyboard.text_len = 0;
+ in->mouse.scroll_delta = nk_vec2(0,0);
+ in->mouse.prev.x = in->mouse.pos.x;
+ in->mouse.prev.y = in->mouse.pos.y;
+ in->mouse.delta.x = 0;
+ in->mouse.delta.y = 0;
+ for (i = 0; i < NK_KEY_MAX; i++)
+ in->keyboard.keys[i].clicked = 0;
+}
+NK_API void
+nk_input_end(struct nk_context *ctx)
+{
+ struct nk_input *in;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ in = &ctx->input;
+ if (in->mouse.grab)
+ in->mouse.grab = 0;
+ if (in->mouse.ungrab) {
+ in->mouse.grabbed = 0;
+ in->mouse.ungrab = 0;
+ in->mouse.grab = 0;
+ }
+}
+NK_API void
+nk_input_motion(struct nk_context *ctx, int x, int y)
+{
+ struct nk_input *in;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ in = &ctx->input;
+ in->mouse.pos.x = (float)x;
+ in->mouse.pos.y = (float)y;
+ in->mouse.delta.x = in->mouse.pos.x - in->mouse.prev.x;
+ in->mouse.delta.y = in->mouse.pos.y - in->mouse.prev.y;
+}
+NK_API void
+nk_input_key(struct nk_context *ctx, enum nk_keys key, int down)
+{
+ struct nk_input *in;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ in = &ctx->input;
+ if (in->keyboard.keys[key].down != down)
+ in->keyboard.keys[key].clicked++;
+ in->keyboard.keys[key].down = down;
+}
+NK_API void
+nk_input_button(struct nk_context *ctx, enum nk_buttons id, int x, int y, int down)
+{
+ struct nk_mouse_button *btn;
+ struct nk_input *in;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ in = &ctx->input;
+ if (in->mouse.buttons[id].down == down) return;
+
+ btn = &in->mouse.buttons[id];
+ btn->clicked_pos.x = (float)x;
+ btn->clicked_pos.y = (float)y;
+ btn->down = down;
+ btn->clicked++;
+}
+NK_API void
+nk_input_scroll(struct nk_context *ctx, struct nk_vec2 val)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ ctx->input.mouse.scroll_delta.x += val.x;
+ ctx->input.mouse.scroll_delta.y += val.y;
+}
+NK_API void
+nk_input_glyph(struct nk_context *ctx, const nk_glyph glyph)
+{
+ int len = 0;
+ nk_rune unicode;
+ struct nk_input *in;
+
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ in = &ctx->input;
+
+ len = nk_utf_decode(glyph, &unicode, NK_UTF_SIZE);
+ if (len && ((in->keyboard.text_len + len) < NK_INPUT_MAX)) {
+ nk_utf_encode(unicode, &in->keyboard.text[in->keyboard.text_len],
+ NK_INPUT_MAX - in->keyboard.text_len);
+ in->keyboard.text_len += len;
+ }
+}
+NK_API void
+nk_input_char(struct nk_context *ctx, char c)
+{
+ nk_glyph glyph;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ glyph[0] = c;
+ nk_input_glyph(ctx, glyph);
+}
+NK_API void
+nk_input_unicode(struct nk_context *ctx, nk_rune unicode)
+{
+ nk_glyph rune;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ nk_utf_encode(unicode, rune, NK_UTF_SIZE);
+ nk_input_glyph(ctx, rune);
+}
+NK_API int
+nk_input_has_mouse_click(const struct nk_input *i, enum nk_buttons id)
+{
+ const struct nk_mouse_button *btn;
+ if (!i) return nk_false;
+ btn = &i->mouse.buttons[id];
+ return (btn->clicked && btn->down == nk_false) ? nk_true : nk_false;
+}
+NK_API int
+nk_input_has_mouse_click_in_rect(const struct nk_input *i, enum nk_buttons id,
+ struct nk_rect b)
+{
+ const struct nk_mouse_button *btn;
+ if (!i) return nk_false;
+ btn = &i->mouse.buttons[id];
+ if (!NK_INBOX(btn->clicked_pos.x,btn->clicked_pos.y,b.x,b.y,b.w,b.h))
+ return nk_false;
+ return nk_true;
+}
+NK_API int
+nk_input_has_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id,
+ struct nk_rect b, int down)
+{
+ const struct nk_mouse_button *btn;
+ if (!i) return nk_false;
+ btn = &i->mouse.buttons[id];
+ return nk_input_has_mouse_click_in_rect(i, id, b) && (btn->down == down);
+}
+NK_API int
+nk_input_is_mouse_click_in_rect(const struct nk_input *i, enum nk_buttons id,
+ struct nk_rect b)
+{
+ const struct nk_mouse_button *btn;
+ if (!i) return nk_false;
+ btn = &i->mouse.buttons[id];
+ return (nk_input_has_mouse_click_down_in_rect(i, id, b, nk_false) &&
+ btn->clicked) ? nk_true : nk_false;
+}
+NK_API int
+nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id,
+ struct nk_rect b, int down)
+{
+ const struct nk_mouse_button *btn;
+ if (!i) return nk_false;
+ btn = &i->mouse.buttons[id];
+ return (nk_input_has_mouse_click_down_in_rect(i, id, b, down) &&
+ btn->clicked) ? nk_true : nk_false;
+}
+NK_API int
+nk_input_any_mouse_click_in_rect(const struct nk_input *in, struct nk_rect b)
+{
+ int i, down = 0;
+ for (i = 0; i < NK_BUTTON_MAX; ++i)
+ down = down || nk_input_is_mouse_click_in_rect(in, (enum nk_buttons)i, b);
+ return down;
+}
+NK_API int
+nk_input_is_mouse_hovering_rect(const struct nk_input *i, struct nk_rect rect)
+{
+ if (!i) return nk_false;
+ return NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h);
+}
+NK_API int
+nk_input_is_mouse_prev_hovering_rect(const struct nk_input *i, struct nk_rect rect)
+{
+ if (!i) return nk_false;
+ return NK_INBOX(i->mouse.prev.x, i->mouse.prev.y, rect.x, rect.y, rect.w, rect.h);
+}
+NK_API int
+nk_input_mouse_clicked(const struct nk_input *i, enum nk_buttons id, struct nk_rect rect)
+{
+ if (!i) return nk_false;
+ if (!nk_input_is_mouse_hovering_rect(i, rect)) return nk_false;
+ return nk_input_is_mouse_click_in_rect(i, id, rect);
+}
+NK_API int
+nk_input_is_mouse_down(const struct nk_input *i, enum nk_buttons id)
+{
+ if (!i) return nk_false;
+ return i->mouse.buttons[id].down;
+}
+NK_API int
+nk_input_is_mouse_pressed(const struct nk_input *i, enum nk_buttons id)
+{
+ const struct nk_mouse_button *b;
+ if (!i) return nk_false;
+ b = &i->mouse.buttons[id];
+ if (b->down && b->clicked)
+ return nk_true;
+ return nk_false;
+}
+NK_API int
+nk_input_is_mouse_released(const struct nk_input *i, enum nk_buttons id)
+{
+ if (!i) return nk_false;
+ return (!i->mouse.buttons[id].down && i->mouse.buttons[id].clicked);
+}
+NK_API int
+nk_input_is_key_pressed(const struct nk_input *i, enum nk_keys key)
+{
+ const struct nk_key *k;
+ if (!i) return nk_false;
+ k = &i->keyboard.keys[key];
+ if ((k->down && k->clicked) || (!k->down && k->clicked >= 2))
+ return nk_true;
+ return nk_false;
+}
+NK_API int
+nk_input_is_key_released(const struct nk_input *i, enum nk_keys key)
+{
+ const struct nk_key *k;
+ if (!i) return nk_false;
+ k = &i->keyboard.keys[key];
+ if ((!k->down && k->clicked) || (k->down && k->clicked >= 2))
+ return nk_true;
+ return nk_false;
+}
+NK_API int
+nk_input_is_key_down(const struct nk_input *i, enum nk_keys key)
+{
+ const struct nk_key *k;
+ if (!i) return nk_false;
+ k = &i->keyboard.keys[key];
+ if (k->down) return nk_true;
+ return nk_false;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * STYLE
+ *
+ * ===============================================================*/
+NK_API void nk_style_default(struct nk_context *ctx){nk_style_from_table(ctx, 0);}
+#define NK_COLOR_MAP(NK_COLOR)\
+ NK_COLOR(NK_COLOR_TEXT, 175,175,175,255) \
+ NK_COLOR(NK_COLOR_WINDOW, 45, 45, 45, 255) \
+ NK_COLOR(NK_COLOR_HEADER, 40, 40, 40, 255) \
+ NK_COLOR(NK_COLOR_BORDER, 65, 65, 65, 255) \
+ NK_COLOR(NK_COLOR_BUTTON, 50, 50, 50, 255) \
+ NK_COLOR(NK_COLOR_BUTTON_HOVER, 40, 40, 40, 255) \
+ NK_COLOR(NK_COLOR_BUTTON_ACTIVE, 35, 35, 35, 255) \
+ NK_COLOR(NK_COLOR_TOGGLE, 100,100,100,255) \
+ NK_COLOR(NK_COLOR_TOGGLE_HOVER, 120,120,120,255) \
+ NK_COLOR(NK_COLOR_TOGGLE_CURSOR, 45, 45, 45, 255) \
+ NK_COLOR(NK_COLOR_SELECT, 45, 45, 45, 255) \
+ NK_COLOR(NK_COLOR_SELECT_ACTIVE, 35, 35, 35,255) \
+ NK_COLOR(NK_COLOR_SLIDER, 38, 38, 38, 255) \
+ NK_COLOR(NK_COLOR_SLIDER_CURSOR, 100,100,100,255) \
+ NK_COLOR(NK_COLOR_SLIDER_CURSOR_HOVER, 120,120,120,255) \
+ NK_COLOR(NK_COLOR_SLIDER_CURSOR_ACTIVE, 150,150,150,255) \
+ NK_COLOR(NK_COLOR_PROPERTY, 38, 38, 38, 255) \
+ NK_COLOR(NK_COLOR_EDIT, 38, 38, 38, 255) \
+ NK_COLOR(NK_COLOR_EDIT_CURSOR, 175,175,175,255) \
+ NK_COLOR(NK_COLOR_COMBO, 45, 45, 45, 255) \
+ NK_COLOR(NK_COLOR_CHART, 120,120,120,255) \
+ NK_COLOR(NK_COLOR_CHART_COLOR, 45, 45, 45, 255) \
+ NK_COLOR(NK_COLOR_CHART_COLOR_HIGHLIGHT, 255, 0, 0, 255) \
+ NK_COLOR(NK_COLOR_SCROLLBAR, 40, 40, 40, 255) \
+ NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR, 100,100,100,255) \
+ NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR_HOVER, 120,120,120,255) \
+ NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR_ACTIVE, 150,150,150,255) \
+ NK_COLOR(NK_COLOR_TAB_HEADER, 40, 40, 40,255)
+
+NK_GLOBAL const struct nk_color
+nk_default_color_style[NK_COLOR_COUNT] = {
+#define NK_COLOR(a,b,c,d,e) {b,c,d,e},
+ NK_COLOR_MAP(NK_COLOR)
+#undef NK_COLOR
+};
+NK_GLOBAL const char *nk_color_names[NK_COLOR_COUNT] = {
+#define NK_COLOR(a,b,c,d,e) #a,
+ NK_COLOR_MAP(NK_COLOR)
+#undef NK_COLOR
+};
+
+NK_API const char*
+nk_style_get_color_by_name(enum nk_style_colors c)
+{
+ return nk_color_names[c];
+}
+NK_API struct nk_style_item
+nk_style_item_image(struct nk_image img)
+{
+ struct nk_style_item i;
+ i.type = NK_STYLE_ITEM_IMAGE;
+ i.data.image = img;
+ return i;
+}
+NK_API struct nk_style_item
+nk_style_item_color(struct nk_color col)
+{
+ struct nk_style_item i;
+ i.type = NK_STYLE_ITEM_COLOR;
+ i.data.color = col;
+ return i;
+}
+NK_API struct nk_style_item
+nk_style_item_hide(void)
+{
+ struct nk_style_item i;
+ i.type = NK_STYLE_ITEM_COLOR;
+ i.data.color = nk_rgba(0,0,0,0);
+ return i;
+}
+NK_API void
+nk_style_from_table(struct nk_context *ctx, const struct nk_color *table)
+{
+ struct nk_style *style;
+ struct nk_style_text *text;
+ struct nk_style_button *button;
+ struct nk_style_toggle *toggle;
+ struct nk_style_selectable *select;
+ struct nk_style_slider *slider;
+ struct nk_style_progress *prog;
+ struct nk_style_scrollbar *scroll;
+ struct nk_style_edit *edit;
+ struct nk_style_property *property;
+ struct nk_style_combo *combo;
+ struct nk_style_chart *chart;
+ struct nk_style_tab *tab;
+ struct nk_style_window *win;
+
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ style = &ctx->style;
+ table = (!table) ? nk_default_color_style: table;
+
+ /* default text */
+ text = &style->text;
+ text->color = table[NK_COLOR_TEXT];
+ text->padding = nk_vec2(0,0);
+
+ /* default button */
+ button = &style->button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_BUTTON]);
+ button->hover = nk_style_item_color(table[NK_COLOR_BUTTON_HOVER]);
+ button->active = nk_style_item_color(table[NK_COLOR_BUTTON_ACTIVE]);
+ button->border_color = table[NK_COLOR_BORDER];
+ button->text_background = table[NK_COLOR_BUTTON];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(2.0f,2.0f);
+ button->image_padding = nk_vec2(0.0f,0.0f);
+ button->touch_padding = nk_vec2(0.0f, 0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 1.0f;
+ button->rounding = 4.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+
+ /* contextual button */
+ button = &style->contextual_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->hover = nk_style_item_color(table[NK_COLOR_BUTTON_HOVER]);
+ button->active = nk_style_item_color(table[NK_COLOR_BUTTON_ACTIVE]);
+ button->border_color = table[NK_COLOR_WINDOW];
+ button->text_background = table[NK_COLOR_WINDOW];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(2.0f,2.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+
+ /* menu button */
+ button = &style->menu_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->hover = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->active = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->border_color = table[NK_COLOR_WINDOW];
+ button->text_background = table[NK_COLOR_WINDOW];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(2.0f,2.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 1.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+
+ /* checkbox toggle */
+ toggle = &style->checkbox;
+ nk_zero_struct(*toggle);
+ toggle->normal = nk_style_item_color(table[NK_COLOR_TOGGLE]);
+ toggle->hover = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);
+ toggle->active = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);
+ toggle->cursor_normal = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);
+ toggle->cursor_hover = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);
+ toggle->userdata = nk_handle_ptr(0);
+ toggle->text_background = table[NK_COLOR_WINDOW];
+ toggle->text_normal = table[NK_COLOR_TEXT];
+ toggle->text_hover = table[NK_COLOR_TEXT];
+ toggle->text_active = table[NK_COLOR_TEXT];
+ toggle->padding = nk_vec2(2.0f, 2.0f);
+ toggle->touch_padding = nk_vec2(0,0);
+ toggle->border_color = nk_rgba(0,0,0,0);
+ toggle->border = 0.0f;
+ toggle->spacing = 4;
+
+ /* option toggle */
+ toggle = &style->option;
+ nk_zero_struct(*toggle);
+ toggle->normal = nk_style_item_color(table[NK_COLOR_TOGGLE]);
+ toggle->hover = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);
+ toggle->active = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);
+ toggle->cursor_normal = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);
+ toggle->cursor_hover = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);
+ toggle->userdata = nk_handle_ptr(0);
+ toggle->text_background = table[NK_COLOR_WINDOW];
+ toggle->text_normal = table[NK_COLOR_TEXT];
+ toggle->text_hover = table[NK_COLOR_TEXT];
+ toggle->text_active = table[NK_COLOR_TEXT];
+ toggle->padding = nk_vec2(3.0f, 3.0f);
+ toggle->touch_padding = nk_vec2(0,0);
+ toggle->border_color = nk_rgba(0,0,0,0);
+ toggle->border = 0.0f;
+ toggle->spacing = 4;
+
+ /* selectable */
+ select = &style->selectable;
+ nk_zero_struct(*select);
+ select->normal = nk_style_item_color(table[NK_COLOR_SELECT]);
+ select->hover = nk_style_item_color(table[NK_COLOR_SELECT]);
+ select->pressed = nk_style_item_color(table[NK_COLOR_SELECT]);
+ select->normal_active = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);
+ select->hover_active = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);
+ select->pressed_active = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);
+ select->text_normal = table[NK_COLOR_TEXT];
+ select->text_hover = table[NK_COLOR_TEXT];
+ select->text_pressed = table[NK_COLOR_TEXT];
+ select->text_normal_active = table[NK_COLOR_TEXT];
+ select->text_hover_active = table[NK_COLOR_TEXT];
+ select->text_pressed_active = table[NK_COLOR_TEXT];
+ select->padding = nk_vec2(2.0f,2.0f);
+ select->image_padding = nk_vec2(2.0f,2.0f);
+ select->touch_padding = nk_vec2(0,0);
+ select->userdata = nk_handle_ptr(0);
+ select->rounding = 0.0f;
+ select->draw_begin = 0;
+ select->draw_end = 0;
+
+ /* slider */
+ slider = &style->slider;
+ nk_zero_struct(*slider);
+ slider->normal = nk_style_item_hide();
+ slider->hover = nk_style_item_hide();
+ slider->active = nk_style_item_hide();
+ slider->bar_normal = table[NK_COLOR_SLIDER];
+ slider->bar_hover = table[NK_COLOR_SLIDER];
+ slider->bar_active = table[NK_COLOR_SLIDER];
+ slider->bar_filled = table[NK_COLOR_SLIDER_CURSOR];
+ slider->cursor_normal = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR]);
+ slider->cursor_hover = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_HOVER]);
+ slider->cursor_active = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_ACTIVE]);
+ slider->inc_symbol = NK_SYMBOL_TRIANGLE_RIGHT;
+ slider->dec_symbol = NK_SYMBOL_TRIANGLE_LEFT;
+ slider->cursor_size = nk_vec2(16,16);
+ slider->padding = nk_vec2(2,2);
+ slider->spacing = nk_vec2(2,2);
+ slider->userdata = nk_handle_ptr(0);
+ slider->show_buttons = nk_false;
+ slider->bar_height = 8;
+ slider->rounding = 0;
+ slider->draw_begin = 0;
+ slider->draw_end = 0;
+
+ /* slider buttons */
+ button = &style->slider.inc_button;
+ button->normal = nk_style_item_color(nk_rgb(40,40,40));
+ button->hover = nk_style_item_color(nk_rgb(42,42,42));
+ button->active = nk_style_item_color(nk_rgb(44,44,44));
+ button->border_color = nk_rgb(65,65,65);
+ button->text_background = nk_rgb(40,40,40);
+ button->text_normal = nk_rgb(175,175,175);
+ button->text_hover = nk_rgb(175,175,175);
+ button->text_active = nk_rgb(175,175,175);
+ button->padding = nk_vec2(8.0f,8.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 1.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+ style->slider.dec_button = style->slider.inc_button;
+
+ /* progressbar */
+ prog = &style->progress;
+ nk_zero_struct(*prog);
+ prog->normal = nk_style_item_color(table[NK_COLOR_SLIDER]);
+ prog->hover = nk_style_item_color(table[NK_COLOR_SLIDER]);
+ prog->active = nk_style_item_color(table[NK_COLOR_SLIDER]);
+ prog->cursor_normal = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR]);
+ prog->cursor_hover = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_HOVER]);
+ prog->cursor_active = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_ACTIVE]);
+ prog->border_color = nk_rgba(0,0,0,0);
+ prog->cursor_border_color = nk_rgba(0,0,0,0);
+ prog->userdata = nk_handle_ptr(0);
+ prog->padding = nk_vec2(4,4);
+ prog->rounding = 0;
+ prog->border = 0;
+ prog->cursor_rounding = 0;
+ prog->cursor_border = 0;
+ prog->draw_begin = 0;
+ prog->draw_end = 0;
+
+ /* scrollbars */
+ scroll = &style->scrollh;
+ nk_zero_struct(*scroll);
+ scroll->normal = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
+ scroll->hover = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
+ scroll->active = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
+ scroll->cursor_normal = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR]);
+ scroll->cursor_hover = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_HOVER]);
+ scroll->cursor_active = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE]);
+ scroll->dec_symbol = NK_SYMBOL_CIRCLE_SOLID;
+ scroll->inc_symbol = NK_SYMBOL_CIRCLE_SOLID;
+ scroll->userdata = nk_handle_ptr(0);
+ scroll->border_color = table[NK_COLOR_SCROLLBAR];
+ scroll->cursor_border_color = table[NK_COLOR_SCROLLBAR];
+ scroll->padding = nk_vec2(0,0);
+ scroll->show_buttons = nk_false;
+ scroll->border = 0;
+ scroll->rounding = 0;
+ scroll->border_cursor = 0;
+ scroll->rounding_cursor = 0;
+ scroll->draw_begin = 0;
+ scroll->draw_end = 0;
+ style->scrollv = style->scrollh;
+
+ /* scrollbars buttons */
+ button = &style->scrollh.inc_button;
+ button->normal = nk_style_item_color(nk_rgb(40,40,40));
+ button->hover = nk_style_item_color(nk_rgb(42,42,42));
+ button->active = nk_style_item_color(nk_rgb(44,44,44));
+ button->border_color = nk_rgb(65,65,65);
+ button->text_background = nk_rgb(40,40,40);
+ button->text_normal = nk_rgb(175,175,175);
+ button->text_hover = nk_rgb(175,175,175);
+ button->text_active = nk_rgb(175,175,175);
+ button->padding = nk_vec2(4.0f,4.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 1.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+ style->scrollh.dec_button = style->scrollh.inc_button;
+ style->scrollv.inc_button = style->scrollh.inc_button;
+ style->scrollv.dec_button = style->scrollh.inc_button;
+
+ /* edit */
+ edit = &style->edit;
+ nk_zero_struct(*edit);
+ edit->normal = nk_style_item_color(table[NK_COLOR_EDIT]);
+ edit->hover = nk_style_item_color(table[NK_COLOR_EDIT]);
+ edit->active = nk_style_item_color(table[NK_COLOR_EDIT]);
+ edit->cursor_normal = table[NK_COLOR_TEXT];
+ edit->cursor_hover = table[NK_COLOR_TEXT];
+ edit->cursor_text_normal= table[NK_COLOR_EDIT];
+ edit->cursor_text_hover = table[NK_COLOR_EDIT];
+ edit->border_color = table[NK_COLOR_BORDER];
+ edit->text_normal = table[NK_COLOR_TEXT];
+ edit->text_hover = table[NK_COLOR_TEXT];
+ edit->text_active = table[NK_COLOR_TEXT];
+ edit->selected_normal = table[NK_COLOR_TEXT];
+ edit->selected_hover = table[NK_COLOR_TEXT];
+ edit->selected_text_normal = table[NK_COLOR_EDIT];
+ edit->selected_text_hover = table[NK_COLOR_EDIT];
+ edit->scrollbar_size = nk_vec2(10,10);
+ edit->scrollbar = style->scrollv;
+ edit->padding = nk_vec2(4,4);
+ edit->row_padding = 2;
+ edit->cursor_size = 4;
+ edit->border = 1;
+ edit->rounding = 0;
+
+ /* property */
+ property = &style->property;
+ nk_zero_struct(*property);
+ property->normal = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ property->hover = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ property->active = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ property->border_color = table[NK_COLOR_BORDER];
+ property->label_normal = table[NK_COLOR_TEXT];
+ property->label_hover = table[NK_COLOR_TEXT];
+ property->label_active = table[NK_COLOR_TEXT];
+ property->sym_left = NK_SYMBOL_TRIANGLE_LEFT;
+ property->sym_right = NK_SYMBOL_TRIANGLE_RIGHT;
+ property->userdata = nk_handle_ptr(0);
+ property->padding = nk_vec2(4,4);
+ property->border = 1;
+ property->rounding = 10;
+ property->draw_begin = 0;
+ property->draw_end = 0;
+
+ /* property buttons */
+ button = &style->property.dec_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ button->hover = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ button->active = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ button->border_color = nk_rgba(0,0,0,0);
+ button->text_background = table[NK_COLOR_PROPERTY];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(0.0f,0.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+ style->property.inc_button = style->property.dec_button;
+
+ /* property edit */
+ edit = &style->property.edit;
+ nk_zero_struct(*edit);
+ edit->normal = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ edit->hover = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ edit->active = nk_style_item_color(table[NK_COLOR_PROPERTY]);
+ edit->border_color = nk_rgba(0,0,0,0);
+ edit->cursor_normal = table[NK_COLOR_TEXT];
+ edit->cursor_hover = table[NK_COLOR_TEXT];
+ edit->cursor_text_normal= table[NK_COLOR_EDIT];
+ edit->cursor_text_hover = table[NK_COLOR_EDIT];
+ edit->text_normal = table[NK_COLOR_TEXT];
+ edit->text_hover = table[NK_COLOR_TEXT];
+ edit->text_active = table[NK_COLOR_TEXT];
+ edit->selected_normal = table[NK_COLOR_TEXT];
+ edit->selected_hover = table[NK_COLOR_TEXT];
+ edit->selected_text_normal = table[NK_COLOR_EDIT];
+ edit->selected_text_hover = table[NK_COLOR_EDIT];
+ edit->padding = nk_vec2(0,0);
+ edit->cursor_size = 8;
+ edit->border = 0;
+ edit->rounding = 0;
+
+ /* chart */
+ chart = &style->chart;
+ nk_zero_struct(*chart);
+ chart->background = nk_style_item_color(table[NK_COLOR_CHART]);
+ chart->border_color = table[NK_COLOR_BORDER];
+ chart->selected_color = table[NK_COLOR_CHART_COLOR_HIGHLIGHT];
+ chart->color = table[NK_COLOR_CHART_COLOR];
+ chart->padding = nk_vec2(4,4);
+ chart->border = 0;
+ chart->rounding = 0;
+
+ /* combo */
+ combo = &style->combo;
+ combo->normal = nk_style_item_color(table[NK_COLOR_COMBO]);
+ combo->hover = nk_style_item_color(table[NK_COLOR_COMBO]);
+ combo->active = nk_style_item_color(table[NK_COLOR_COMBO]);
+ combo->border_color = table[NK_COLOR_BORDER];
+ combo->label_normal = table[NK_COLOR_TEXT];
+ combo->label_hover = table[NK_COLOR_TEXT];
+ combo->label_active = table[NK_COLOR_TEXT];
+ combo->sym_normal = NK_SYMBOL_TRIANGLE_DOWN;
+ combo->sym_hover = NK_SYMBOL_TRIANGLE_DOWN;
+ combo->sym_active = NK_SYMBOL_TRIANGLE_DOWN;
+ combo->content_padding = nk_vec2(4,4);
+ combo->button_padding = nk_vec2(0,4);
+ combo->spacing = nk_vec2(4,0);
+ combo->border = 1;
+ combo->rounding = 0;
+
+ /* combo button */
+ button = &style->combo.button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_COMBO]);
+ button->hover = nk_style_item_color(table[NK_COLOR_COMBO]);
+ button->active = nk_style_item_color(table[NK_COLOR_COMBO]);
+ button->border_color = nk_rgba(0,0,0,0);
+ button->text_background = table[NK_COLOR_COMBO];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(2.0f,2.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+
+ /* tab */
+ tab = &style->tab;
+ tab->background = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);
+ tab->border_color = table[NK_COLOR_BORDER];
+ tab->text = table[NK_COLOR_TEXT];
+ tab->sym_minimize = NK_SYMBOL_TRIANGLE_RIGHT;
+ tab->sym_maximize = NK_SYMBOL_TRIANGLE_DOWN;
+ tab->padding = nk_vec2(4,4);
+ tab->spacing = nk_vec2(4,4);
+ tab->indent = 10.0f;
+ tab->border = 1;
+ tab->rounding = 0;
+
+ /* tab button */
+ button = &style->tab.tab_minimize_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);
+ button->hover = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);
+ button->active = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);
+ button->border_color = nk_rgba(0,0,0,0);
+ button->text_background = table[NK_COLOR_TAB_HEADER];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(2.0f,2.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+ style->tab.tab_maximize_button =*button;
+
+ /* node button */
+ button = &style->tab.node_minimize_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->hover = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->active = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ button->border_color = nk_rgba(0,0,0,0);
+ button->text_background = table[NK_COLOR_TAB_HEADER];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(2.0f,2.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+ style->tab.node_maximize_button =*button;
+
+ /* window header */
+ win = &style->window;
+ win->header.align = NK_HEADER_RIGHT;
+ win->header.close_symbol = NK_SYMBOL_X;
+ win->header.minimize_symbol = NK_SYMBOL_MINUS;
+ win->header.maximize_symbol = NK_SYMBOL_PLUS;
+ win->header.normal = nk_style_item_color(table[NK_COLOR_HEADER]);
+ win->header.hover = nk_style_item_color(table[NK_COLOR_HEADER]);
+ win->header.active = nk_style_item_color(table[NK_COLOR_HEADER]);
+ win->header.label_normal = table[NK_COLOR_TEXT];
+ win->header.label_hover = table[NK_COLOR_TEXT];
+ win->header.label_active = table[NK_COLOR_TEXT];
+ win->header.label_padding = nk_vec2(4,4);
+ win->header.padding = nk_vec2(4,4);
+ win->header.spacing = nk_vec2(0,0);
+
+ /* window header close button */
+ button = &style->window.header.close_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_HEADER]);
+ button->hover = nk_style_item_color(table[NK_COLOR_HEADER]);
+ button->active = nk_style_item_color(table[NK_COLOR_HEADER]);
+ button->border_color = nk_rgba(0,0,0,0);
+ button->text_background = table[NK_COLOR_HEADER];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(0.0f,0.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+
+ /* window header minimize button */
+ button = &style->window.header.minimize_button;
+ nk_zero_struct(*button);
+ button->normal = nk_style_item_color(table[NK_COLOR_HEADER]);
+ button->hover = nk_style_item_color(table[NK_COLOR_HEADER]);
+ button->active = nk_style_item_color(table[NK_COLOR_HEADER]);
+ button->border_color = nk_rgba(0,0,0,0);
+ button->text_background = table[NK_COLOR_HEADER];
+ button->text_normal = table[NK_COLOR_TEXT];
+ button->text_hover = table[NK_COLOR_TEXT];
+ button->text_active = table[NK_COLOR_TEXT];
+ button->padding = nk_vec2(0.0f,0.0f);
+ button->touch_padding = nk_vec2(0.0f,0.0f);
+ button->userdata = nk_handle_ptr(0);
+ button->text_alignment = NK_TEXT_CENTERED;
+ button->border = 0.0f;
+ button->rounding = 0.0f;
+ button->draw_begin = 0;
+ button->draw_end = 0;
+
+ /* window */
+ win->background = table[NK_COLOR_WINDOW];
+ win->fixed_background = nk_style_item_color(table[NK_COLOR_WINDOW]);
+ win->border_color = table[NK_COLOR_BORDER];
+ win->popup_border_color = table[NK_COLOR_BORDER];
+ win->combo_border_color = table[NK_COLOR_BORDER];
+ win->contextual_border_color = table[NK_COLOR_BORDER];
+ win->menu_border_color = table[NK_COLOR_BORDER];
+ win->group_border_color = table[NK_COLOR_BORDER];
+ win->tooltip_border_color = table[NK_COLOR_BORDER];
+ win->scaler = nk_style_item_color(table[NK_COLOR_TEXT]);
+
+ win->rounding = 0.0f;
+ win->spacing = nk_vec2(4,4);
+ win->scrollbar_size = nk_vec2(10,10);
+ win->min_size = nk_vec2(64,64);
+
+ win->combo_border = 1.0f;
+ win->contextual_border = 1.0f;
+ win->menu_border = 1.0f;
+ win->group_border = 1.0f;
+ win->tooltip_border = 1.0f;
+ win->popup_border = 1.0f;
+ win->border = 2.0f;
+ win->min_row_height_padding = 8;
+
+ win->padding = nk_vec2(4,4);
+ win->group_padding = nk_vec2(4,4);
+ win->popup_padding = nk_vec2(4,4);
+ win->combo_padding = nk_vec2(4,4);
+ win->contextual_padding = nk_vec2(4,4);
+ win->menu_padding = nk_vec2(4,4);
+ win->tooltip_padding = nk_vec2(4,4);
+}
+NK_API void
+nk_style_set_font(struct nk_context *ctx, const struct nk_user_font *font)
+{
+ struct nk_style *style;
+ NK_ASSERT(ctx);
+
+ if (!ctx) return;
+ style = &ctx->style;
+ style->font = font;
+ ctx->stacks.fonts.head = 0;
+ if (ctx->current)
+ nk_layout_reset_min_row_height(ctx);
+}
+NK_API int
+nk_style_push_font(struct nk_context *ctx, const struct nk_user_font *font)
+{
+ struct nk_config_stack_user_font *font_stack;
+ struct nk_config_stack_user_font_element *element;
+
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+
+ font_stack = &ctx->stacks.fonts;
+ NK_ASSERT(font_stack->head < (int)NK_LEN(font_stack->elements));
+ if (font_stack->head >= (int)NK_LEN(font_stack->elements))
+ return 0;
+
+ element = &font_stack->elements[font_stack->head++];
+ element->address = &ctx->style.font;
+ element->old_value = ctx->style.font;
+ ctx->style.font = font;
+ return 1;
+}
+NK_API int
+nk_style_pop_font(struct nk_context *ctx)
+{
+ struct nk_config_stack_user_font *font_stack;
+ struct nk_config_stack_user_font_element *element;
+
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+
+ font_stack = &ctx->stacks.fonts;
+ NK_ASSERT(font_stack->head > 0);
+ if (font_stack->head < 1)
+ return 0;
+
+ element = &font_stack->elements[--font_stack->head];
+ *element->address = element->old_value;
+ return 1;
+}
+#define NK_STYLE_PUSH_IMPLEMENATION(prefix, type, stack) \
+nk_style_push_##type(struct nk_context *ctx, prefix##_##type *address, prefix##_##type value)\
+{\
+ struct nk_config_stack_##type * type_stack;\
+ struct nk_config_stack_##type##_element *element;\
+ NK_ASSERT(ctx);\
+ if (!ctx) return 0;\
+ type_stack = &ctx->stacks.stack;\
+ NK_ASSERT(type_stack->head < (int)NK_LEN(type_stack->elements));\
+ if (type_stack->head >= (int)NK_LEN(type_stack->elements))\
+ return 0;\
+ element = &type_stack->elements[type_stack->head++];\
+ element->address = address;\
+ element->old_value = *address;\
+ *address = value;\
+ return 1;\
+}
+#define NK_STYLE_POP_IMPLEMENATION(type, stack) \
+nk_style_pop_##type(struct nk_context *ctx)\
+{\
+ struct nk_config_stack_##type *type_stack;\
+ struct nk_config_stack_##type##_element *element;\
+ NK_ASSERT(ctx);\
+ if (!ctx) return 0;\
+ type_stack = &ctx->stacks.stack;\
+ NK_ASSERT(type_stack->head > 0);\
+ if (type_stack->head < 1)\
+ return 0;\
+ element = &type_stack->elements[--type_stack->head];\
+ *element->address = element->old_value;\
+ return 1;\
+}
+NK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk, style_item, style_items)
+NK_API int NK_STYLE_PUSH_IMPLEMENATION(nk,float, floats)
+NK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk, vec2, vectors)
+NK_API int NK_STYLE_PUSH_IMPLEMENATION(nk,flags, flags)
+NK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk,color, colors)
+
+NK_API int NK_STYLE_POP_IMPLEMENATION(style_item, style_items)
+NK_API int NK_STYLE_POP_IMPLEMENATION(float,floats)
+NK_API int NK_STYLE_POP_IMPLEMENATION(vec2, vectors)
+NK_API int NK_STYLE_POP_IMPLEMENATION(flags,flags)
+NK_API int NK_STYLE_POP_IMPLEMENATION(color,colors)
+
+NK_API int
+nk_style_set_cursor(struct nk_context *ctx, enum nk_style_cursor c)
+{
+ struct nk_style *style;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ style = &ctx->style;
+ if (style->cursors[c]) {
+ style->cursor_active = style->cursors[c];
+ return 1;
+ }
+ return 0;
+}
+NK_API void
+nk_style_show_cursor(struct nk_context *ctx)
+{
+ ctx->style.cursor_visible = nk_true;
+}
+NK_API void
+nk_style_hide_cursor(struct nk_context *ctx)
+{
+ ctx->style.cursor_visible = nk_false;
+}
+NK_API void
+nk_style_load_cursor(struct nk_context *ctx, enum nk_style_cursor cursor,
+ const struct nk_cursor *c)
+{
+ struct nk_style *style;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ style = &ctx->style;
+ style->cursors[cursor] = c;
+}
+NK_API void
+nk_style_load_all_cursors(struct nk_context *ctx, struct nk_cursor *cursors)
+{
+ int i = 0;
+ struct nk_style *style;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ style = &ctx->style;
+ for (i = 0; i < NK_CURSOR_COUNT; ++i)
+ style->cursors[i] = &cursors[i];
+ style->cursor_visible = nk_true;
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * CONTEXT
+ *
+ * ===============================================================*/
+NK_INTERN void
+nk_setup(struct nk_context *ctx, const struct nk_user_font *font)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ nk_zero_struct(*ctx);
+ nk_style_default(ctx);
+ ctx->seq = 1;
+ if (font) ctx->style.font = font;
+#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+ nk_draw_list_init(&ctx->draw_list);
+#endif
+}
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API int
+nk_init_default(struct nk_context *ctx, const struct nk_user_font *font)
+{
+ struct nk_allocator alloc;
+ alloc.userdata.ptr = 0;
+ alloc.alloc = nk_malloc;
+ alloc.free = nk_mfree;
+ return nk_init(ctx, &alloc, font);
+}
+#endif
+NK_API int
+nk_init_fixed(struct nk_context *ctx, void *memory, nk_size size,
+ const struct nk_user_font *font)
+{
+ NK_ASSERT(memory);
+ if (!memory) return 0;
+ nk_setup(ctx, font);
+ nk_buffer_init_fixed(&ctx->memory, memory, size);
+ ctx->use_pool = nk_false;
+ return 1;
+}
+NK_API int
+nk_init_custom(struct nk_context *ctx, struct nk_buffer *cmds,
+ struct nk_buffer *pool, const struct nk_user_font *font)
+{
+ NK_ASSERT(cmds);
+ NK_ASSERT(pool);
+ if (!cmds || !pool) return 0;
+
+ nk_setup(ctx, font);
+ ctx->memory = *cmds;
+ if (pool->type == NK_BUFFER_FIXED) {
+ /* take memory from buffer and alloc fixed pool */
+ nk_pool_init_fixed(&ctx->pool, pool->memory.ptr, pool->memory.size);
+ } else {
+ /* create dynamic pool from buffer allocator */
+ struct nk_allocator *alloc = &pool->pool;
+ nk_pool_init(&ctx->pool, alloc, NK_POOL_DEFAULT_CAPACITY);
+ }
+ ctx->use_pool = nk_true;
+ return 1;
+}
+NK_API int
+nk_init(struct nk_context *ctx, struct nk_allocator *alloc,
+ const struct nk_user_font *font)
+{
+ NK_ASSERT(alloc);
+ if (!alloc) return 0;
+ nk_setup(ctx, font);
+ nk_buffer_init(&ctx->memory, alloc, NK_DEFAULT_COMMAND_BUFFER_SIZE);
+ nk_pool_init(&ctx->pool, alloc, NK_POOL_DEFAULT_CAPACITY);
+ ctx->use_pool = nk_true;
+ return 1;
+}
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+NK_API void
+nk_set_user_data(struct nk_context *ctx, nk_handle handle)
+{
+ if (!ctx) return;
+ ctx->userdata = handle;
+ if (ctx->current)
+ ctx->current->buffer.userdata = handle;
+}
+#endif
+NK_API void
+nk_free(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ nk_buffer_free(&ctx->memory);
+ if (ctx->use_pool)
+ nk_pool_free(&ctx->pool);
+
+ nk_zero(&ctx->input, sizeof(ctx->input));
+ nk_zero(&ctx->style, sizeof(ctx->style));
+ nk_zero(&ctx->memory, sizeof(ctx->memory));
+
+ ctx->seq = 0;
+ ctx->build = 0;
+ ctx->begin = 0;
+ ctx->end = 0;
+ ctx->active = 0;
+ ctx->current = 0;
+ ctx->freelist = 0;
+ ctx->count = 0;
+}
+NK_API void
+nk_clear(struct nk_context *ctx)
+{
+ struct nk_window *iter;
+ struct nk_window *next;
+ NK_ASSERT(ctx);
+
+ if (!ctx) return;
+ if (ctx->use_pool)
+ nk_buffer_clear(&ctx->memory);
+ else nk_buffer_reset(&ctx->memory, NK_BUFFER_FRONT);
+
+ ctx->build = 0;
+ ctx->memory.calls = 0;
+ ctx->last_widget_state = 0;
+ ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_ARROW];
+ NK_MEMSET(&ctx->overlay, 0, sizeof(ctx->overlay));
+
+ /* garbage collector */
+ iter = ctx->begin;
+ while (iter) {
+ /* make sure valid minimized windows do not get removed */
+ if ((iter->flags & NK_WINDOW_MINIMIZED) &&
+ !(iter->flags & NK_WINDOW_CLOSED) &&
+ iter->seq == ctx->seq) {
+ iter = iter->next;
+ continue;
+ }
+ /* remove hotness from hidden or closed windows*/
+ if (((iter->flags & NK_WINDOW_HIDDEN) ||
+ (iter->flags & NK_WINDOW_CLOSED)) &&
+ iter == ctx->active) {
+ ctx->active = iter->prev;
+ ctx->end = iter->prev;
+ if (!ctx->end)
+ ctx->begin = 0;
+ if (ctx->active)
+ ctx->active->flags &= ~(unsigned)NK_WINDOW_ROM;
+ }
+ /* free unused popup windows */
+ if (iter->popup.win && iter->popup.win->seq != ctx->seq) {
+ nk_free_window(ctx, iter->popup.win);
+ iter->popup.win = 0;
+ }
+ /* remove unused window state tables */
+ {struct nk_table *n, *it = iter->tables;
+ while (it) {
+ n = it->next;
+ if (it->seq != ctx->seq) {
+ nk_remove_table(iter, it);
+ nk_zero(it, sizeof(union nk_page_data));
+ nk_free_table(ctx, it);
+ if (it == iter->tables)
+ iter->tables = n;
+ } it = n;
+ }}
+ /* window itself is not used anymore so free */
+ if (iter->seq != ctx->seq || iter->flags & NK_WINDOW_CLOSED) {
+ next = iter->next;
+ nk_remove_window(ctx, iter);
+ nk_free_window(ctx, iter);
+ iter = next;
+ } else iter = iter->next;
+ }
+ ctx->seq++;
+}
+NK_LIB void
+nk_start_buffer(struct nk_context *ctx, struct nk_command_buffer *buffer)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(buffer);
+ if (!ctx || !buffer) return;
+ buffer->begin = ctx->memory.allocated;
+ buffer->end = buffer->begin;
+ buffer->last = buffer->begin;
+ buffer->clip = nk_null_rect;
+}
+NK_LIB void
+nk_start(struct nk_context *ctx, struct nk_window *win)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(win);
+ nk_start_buffer(ctx, &win->buffer);
+}
+NK_LIB void
+nk_start_popup(struct nk_context *ctx, struct nk_window *win)
+{
+ struct nk_popup_buffer *buf;
+ NK_ASSERT(ctx);
+ NK_ASSERT(win);
+ if (!ctx || !win) return;
+
+ /* save buffer fill state for popup */
+ buf = &win->popup.buf;
+ buf->begin = win->buffer.end;
+ buf->end = win->buffer.end;
+ buf->parent = win->buffer.last;
+ buf->last = buf->begin;
+ buf->active = nk_true;
+}
+NK_LIB void
+nk_finish_popup(struct nk_context *ctx, struct nk_window *win)
+{
+ struct nk_popup_buffer *buf;
+ NK_ASSERT(ctx);
+ NK_ASSERT(win);
+ if (!ctx || !win) return;
+
+ buf = &win->popup.buf;
+ buf->last = win->buffer.last;
+ buf->end = win->buffer.end;
+}
+NK_LIB void
+nk_finish_buffer(struct nk_context *ctx, struct nk_command_buffer *buffer)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(buffer);
+ if (!ctx || !buffer) return;
+ buffer->end = ctx->memory.allocated;
+}
+NK_LIB void
+nk_finish(struct nk_context *ctx, struct nk_window *win)
+{
+ struct nk_popup_buffer *buf;
+ struct nk_command *parent_last;
+ void *memory;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(win);
+ if (!ctx || !win) return;
+ nk_finish_buffer(ctx, &win->buffer);
+ if (!win->popup.buf.active) return;
+
+ buf = &win->popup.buf;
+ memory = ctx->memory.memory.ptr;
+ parent_last = nk_ptr_add(struct nk_command, memory, buf->parent);
+ parent_last->next = buf->end;
+}
+NK_LIB void
+nk_build(struct nk_context *ctx)
+{
+ struct nk_window *it = 0;
+ struct nk_command *cmd = 0;
+ nk_byte *buffer = 0;
+
+ /* draw cursor overlay */
+ if (!ctx->style.cursor_active)
+ ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_ARROW];
+ if (ctx->style.cursor_active && !ctx->input.mouse.grabbed && ctx->style.cursor_visible) {
+ struct nk_rect mouse_bounds;
+ const struct nk_cursor *cursor = ctx->style.cursor_active;
+ nk_command_buffer_init(&ctx->overlay, &ctx->memory, NK_CLIPPING_OFF);
+ nk_start_buffer(ctx, &ctx->overlay);
+
+ mouse_bounds.x = ctx->input.mouse.pos.x - cursor->offset.x;
+ mouse_bounds.y = ctx->input.mouse.pos.y - cursor->offset.y;
+ mouse_bounds.w = cursor->size.x;
+ mouse_bounds.h = cursor->size.y;
+
+ nk_draw_image(&ctx->overlay, mouse_bounds, &cursor->img, nk_white);
+ nk_finish_buffer(ctx, &ctx->overlay);
+ }
+ /* build one big draw command list out of all window buffers */
+ it = ctx->begin;
+ buffer = (nk_byte*)ctx->memory.memory.ptr;
+ while (it != 0) {
+ struct nk_window *next = it->next;
+ if (it->buffer.last == it->buffer.begin || (it->flags & NK_WINDOW_HIDDEN)||
+ it->seq != ctx->seq)
+ goto cont;
+
+ cmd = nk_ptr_add(struct nk_command, buffer, it->buffer.last);
+ while (next && ((next->buffer.last == next->buffer.begin) ||
+ (next->flags & NK_WINDOW_HIDDEN) || next->seq != ctx->seq))
+ next = next->next; /* skip empty command buffers */
+
+ if (next) cmd->next = next->buffer.begin;
+ cont: it = next;
+ }
+ /* append all popup draw commands into lists */
+ it = ctx->begin;
+ while (it != 0) {
+ struct nk_window *next = it->next;
+ struct nk_popup_buffer *buf;
+ if (!it->popup.buf.active)
+ goto skip;
+
+ buf = &it->popup.buf;
+ cmd->next = buf->begin;
+ cmd = nk_ptr_add(struct nk_command, buffer, buf->last);
+ buf->active = nk_false;
+ skip: it = next;
+ }
+ if (cmd) {
+ /* append overlay commands */
+ if (ctx->overlay.end != ctx->overlay.begin)
+ cmd->next = ctx->overlay.begin;
+ else cmd->next = ctx->memory.allocated;
+ }
+}
+NK_API const struct nk_command*
+nk__begin(struct nk_context *ctx)
+{
+ struct nk_window *iter;
+ nk_byte *buffer;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ if (!ctx->count) return 0;
+
+ buffer = (nk_byte*)ctx->memory.memory.ptr;
+ if (!ctx->build) {
+ nk_build(ctx);
+ ctx->build = nk_true;
+ }
+ iter = ctx->begin;
+ while (iter && ((iter->buffer.begin == iter->buffer.end) ||
+ (iter->flags & NK_WINDOW_HIDDEN) || iter->seq != ctx->seq))
+ iter = iter->next;
+ if (!iter) return 0;
+ return nk_ptr_add_const(struct nk_command, buffer, iter->buffer.begin);
+}
+
+NK_API const struct nk_command*
+nk__next(struct nk_context *ctx, const struct nk_command *cmd)
+{
+ nk_byte *buffer;
+ const struct nk_command *next;
+ NK_ASSERT(ctx);
+ if (!ctx || !cmd || !ctx->count) return 0;
+ if (cmd->next >= ctx->memory.allocated) return 0;
+ buffer = (nk_byte*)ctx->memory.memory.ptr;
+ next = nk_ptr_add_const(struct nk_command, buffer, cmd->next);
+ return next;
+}
+
+
+
+
+
+
+/* ===============================================================
+ *
+ * POOL
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_pool_init(struct nk_pool *pool, struct nk_allocator *alloc,
+ unsigned int capacity)
+{
+ nk_zero(pool, sizeof(*pool));
+ pool->alloc = *alloc;
+ pool->capacity = capacity;
+ pool->type = NK_BUFFER_DYNAMIC;
+ pool->pages = 0;
+}
+NK_LIB void
+nk_pool_free(struct nk_pool *pool)
+{
+ struct nk_page *iter = pool->pages;
+ if (!pool) return;
+ if (pool->type == NK_BUFFER_FIXED) return;
+ while (iter) {
+ struct nk_page *next = iter->next;
+ pool->alloc.free(pool->alloc.userdata, iter);
+ iter = next;
+ }
+}
+NK_LIB void
+nk_pool_init_fixed(struct nk_pool *pool, void *memory, nk_size size)
+{
+ nk_zero(pool, sizeof(*pool));
+ NK_ASSERT(size >= sizeof(struct nk_page));
+ if (size < sizeof(struct nk_page)) return;
+ pool->capacity = (unsigned)(size - sizeof(struct nk_page)) / sizeof(struct nk_page_element);
+ pool->pages = (struct nk_page*)memory;
+ pool->type = NK_BUFFER_FIXED;
+ pool->size = size;
+}
+NK_LIB struct nk_page_element*
+nk_pool_alloc(struct nk_pool *pool)
+{
+ if (!pool->pages || pool->pages->size >= pool->capacity) {
+ /* allocate new page */
+ struct nk_page *page;
+ if (pool->type == NK_BUFFER_FIXED) {
+ NK_ASSERT(pool->pages);
+ if (!pool->pages) return 0;
+ NK_ASSERT(pool->pages->size < pool->capacity);
+ return 0;
+ } else {
+ nk_size size = sizeof(struct nk_page);
+ size += NK_POOL_DEFAULT_CAPACITY * sizeof(union nk_page_data);
+ page = (struct nk_page*)pool->alloc.alloc(pool->alloc.userdata,0, size);
+ page->next = pool->pages;
+ pool->pages = page;
+ page->size = 0;
+ }
+ } return &pool->pages->win[pool->pages->size++];
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * PAGE ELEMENT
+ *
+ * ===============================================================*/
+NK_LIB struct nk_page_element*
+nk_create_page_element(struct nk_context *ctx)
+{
+ struct nk_page_element *elem;
+ if (ctx->freelist) {
+ /* unlink page element from free list */
+ elem = ctx->freelist;
+ ctx->freelist = elem->next;
+ } else if (ctx->use_pool) {
+ /* allocate page element from memory pool */
+ elem = nk_pool_alloc(&ctx->pool);
+ NK_ASSERT(elem);
+ if (!elem) return 0;
+ } else {
+ /* allocate new page element from back of fixed size memory buffer */
+ NK_STORAGE const nk_size size = sizeof(struct nk_page_element);
+ NK_STORAGE const nk_size align = NK_ALIGNOF(struct nk_page_element);
+ elem = (struct nk_page_element*)nk_buffer_alloc(&ctx->memory, NK_BUFFER_BACK, size, align);
+ NK_ASSERT(elem);
+ if (!elem) return 0;
+ }
+ nk_zero_struct(*elem);
+ elem->next = 0;
+ elem->prev = 0;
+ return elem;
+}
+NK_LIB void
+nk_link_page_element_into_freelist(struct nk_context *ctx,
+ struct nk_page_element *elem)
+{
+ /* link table into freelist */
+ if (!ctx->freelist) {
+ ctx->freelist = elem;
+ } else {
+ elem->next = ctx->freelist;
+ ctx->freelist = elem;
+ }
+}
+NK_LIB void
+nk_free_page_element(struct nk_context *ctx, struct nk_page_element *elem)
+{
+ /* we have a pool so just add to free list */
+ if (ctx->use_pool) {
+ nk_link_page_element_into_freelist(ctx, elem);
+ return;
+ }
+ /* if possible remove last element from back of fixed memory buffer */
+ {void *elem_end = (void*)(elem + 1);
+ void *buffer_end = (nk_byte*)ctx->memory.memory.ptr + ctx->memory.size;
+ if (elem_end == buffer_end)
+ ctx->memory.size -= sizeof(struct nk_page_element);
+ else nk_link_page_element_into_freelist(ctx, elem);}
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * TABLE
+ *
+ * ===============================================================*/
+NK_LIB struct nk_table*
+nk_create_table(struct nk_context *ctx)
+{
+ struct nk_page_element *elem;
+ elem = nk_create_page_element(ctx);
+ if (!elem) return 0;
+ nk_zero_struct(*elem);
+ return &elem->data.tbl;
+}
+NK_LIB void
+nk_free_table(struct nk_context *ctx, struct nk_table *tbl)
+{
+ union nk_page_data *pd = NK_CONTAINER_OF(tbl, union nk_page_data, tbl);
+ struct nk_page_element *pe = NK_CONTAINER_OF(pd, struct nk_page_element, data);
+ nk_free_page_element(ctx, pe);
+}
+NK_LIB void
+nk_push_table(struct nk_window *win, struct nk_table *tbl)
+{
+ if (!win->tables) {
+ win->tables = tbl;
+ tbl->next = 0;
+ tbl->prev = 0;
+ tbl->size = 0;
+ win->table_count = 1;
+ return;
+ }
+ win->tables->prev = tbl;
+ tbl->next = win->tables;
+ tbl->prev = 0;
+ tbl->size = 0;
+ win->tables = tbl;
+ win->table_count++;
+}
+NK_LIB void
+nk_remove_table(struct nk_window *win, struct nk_table *tbl)
+{
+ if (win->tables == tbl)
+ win->tables = tbl->next;
+ if (tbl->next)
+ tbl->next->prev = tbl->prev;
+ if (tbl->prev)
+ tbl->prev->next = tbl->next;
+ tbl->next = 0;
+ tbl->prev = 0;
+}
+NK_LIB nk_uint*
+nk_add_value(struct nk_context *ctx, struct nk_window *win,
+ nk_hash name, nk_uint value)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(win);
+ if (!win || !ctx) return 0;
+ if (!win->tables || win->tables->size >= NK_VALUE_PAGE_CAPACITY) {
+ struct nk_table *tbl = nk_create_table(ctx);
+ NK_ASSERT(tbl);
+ if (!tbl) return 0;
+ nk_push_table(win, tbl);
+ }
+ win->tables->seq = win->seq;
+ win->tables->keys[win->tables->size] = name;
+ win->tables->values[win->tables->size] = value;
+ return &win->tables->values[win->tables->size++];
+}
+NK_LIB nk_uint*
+nk_find_value(struct nk_window *win, nk_hash name)
+{
+ struct nk_table *iter = win->tables;
+ while (iter) {
+ unsigned int i = 0;
+ unsigned int size = iter->size;
+ for (i = 0; i < size; ++i) {
+ if (iter->keys[i] == name) {
+ iter->seq = win->seq;
+ return &iter->values[i];
+ }
+ } size = NK_VALUE_PAGE_CAPACITY;
+ iter = iter->next;
+ }
+ return 0;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * PANEL
+ *
+ * ===============================================================*/
+NK_LIB void*
+nk_create_panel(struct nk_context *ctx)
+{
+ struct nk_page_element *elem;
+ elem = nk_create_page_element(ctx);
+ if (!elem) return 0;
+ nk_zero_struct(*elem);
+ return &elem->data.pan;
+}
+NK_LIB void
+nk_free_panel(struct nk_context *ctx, struct nk_panel *pan)
+{
+ union nk_page_data *pd = NK_CONTAINER_OF(pan, union nk_page_data, pan);
+ struct nk_page_element *pe = NK_CONTAINER_OF(pd, struct nk_page_element, data);
+ nk_free_page_element(ctx, pe);
+}
+NK_LIB int
+nk_panel_has_header(nk_flags flags, const char *title)
+{
+ int active = 0;
+ active = (flags & (NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE));
+ active = active || (flags & NK_WINDOW_TITLE);
+ active = active && !(flags & NK_WINDOW_HIDDEN) && title;
+ return active;
+}
+NK_LIB struct nk_vec2
+nk_panel_get_padding(const struct nk_style *style, enum nk_panel_type type)
+{
+ switch (type) {
+ default:
+ case NK_PANEL_WINDOW: return style->window.padding;
+ case NK_PANEL_GROUP: return style->window.group_padding;
+ case NK_PANEL_POPUP: return style->window.popup_padding;
+ case NK_PANEL_CONTEXTUAL: return style->window.contextual_padding;
+ case NK_PANEL_COMBO: return style->window.combo_padding;
+ case NK_PANEL_MENU: return style->window.menu_padding;
+ case NK_PANEL_TOOLTIP: return style->window.menu_padding;}
+}
+NK_LIB float
+nk_panel_get_border(const struct nk_style *style, nk_flags flags,
+ enum nk_panel_type type)
+{
+ if (flags & NK_WINDOW_BORDER) {
+ switch (type) {
+ default:
+ case NK_PANEL_WINDOW: return style->window.border;
+ case NK_PANEL_GROUP: return style->window.group_border;
+ case NK_PANEL_POPUP: return style->window.popup_border;
+ case NK_PANEL_CONTEXTUAL: return style->window.contextual_border;
+ case NK_PANEL_COMBO: return style->window.combo_border;
+ case NK_PANEL_MENU: return style->window.menu_border;
+ case NK_PANEL_TOOLTIP: return style->window.menu_border;
+ }} else return 0;
+}
+NK_LIB struct nk_color
+nk_panel_get_border_color(const struct nk_style *style, enum nk_panel_type type)
+{
+ switch (type) {
+ default:
+ case NK_PANEL_WINDOW: return style->window.border_color;
+ case NK_PANEL_GROUP: return style->window.group_border_color;
+ case NK_PANEL_POPUP: return style->window.popup_border_color;
+ case NK_PANEL_CONTEXTUAL: return style->window.contextual_border_color;
+ case NK_PANEL_COMBO: return style->window.combo_border_color;
+ case NK_PANEL_MENU: return style->window.menu_border_color;
+ case NK_PANEL_TOOLTIP: return style->window.menu_border_color;}
+}
+NK_LIB int
+nk_panel_is_sub(enum nk_panel_type type)
+{
+ return (type & NK_PANEL_SET_SUB)?1:0;
+}
+NK_LIB int
+nk_panel_is_nonblock(enum nk_panel_type type)
+{
+ return (type & NK_PANEL_SET_NONBLOCK)?1:0;
+}
+NK_LIB int
+nk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type panel_type)
+{
+ struct nk_input *in;
+ struct nk_window *win;
+ struct nk_panel *layout;
+ struct nk_command_buffer *out;
+ const struct nk_style *style;
+ const struct nk_user_font *font;
+
+ struct nk_vec2 scrollbar_size;
+ struct nk_vec2 panel_padding;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout) return 0;
+ nk_zero(ctx->current->layout, sizeof(*ctx->current->layout));
+ if ((ctx->current->flags & NK_WINDOW_HIDDEN) || (ctx->current->flags & NK_WINDOW_CLOSED)) {
+ nk_zero(ctx->current->layout, sizeof(struct nk_panel));
+ ctx->current->layout->type = panel_type;
+ return 0;
+ }
+ /* pull state into local stack */
+ style = &ctx->style;
+ font = style->font;
+ win = ctx->current;
+ layout = win->layout;
+ out = &win->buffer;
+ in = (win->flags & NK_WINDOW_NO_INPUT) ? 0: &ctx->input;
+#ifdef NK_INCLUDE_COMMAND_USERDATA
+ win->buffer.userdata = ctx->userdata;
+#endif
+ /* pull style configuration into local stack */
+ scrollbar_size = style->window.scrollbar_size;
+ panel_padding = nk_panel_get_padding(style, panel_type);
+
+ /* window movement */
+ if ((win->flags & NK_WINDOW_MOVABLE) && !(win->flags & NK_WINDOW_ROM)) {
+ int left_mouse_down;
+ int left_mouse_clicked;
+ int left_mouse_click_in_cursor;
+
+ /* calculate draggable window space */
+ struct nk_rect header;
+ header.x = win->bounds.x;
+ header.y = win->bounds.y;
+ header.w = win->bounds.w;
+ if (nk_panel_has_header(win->flags, title)) {
+ header.h = font->height + 2.0f * style->window.header.padding.y;
+ header.h += 2.0f * style->window.header.label_padding.y;
+ } else header.h = panel_padding.y;
+
+ /* window movement by dragging */
+ left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;
+ left_mouse_clicked = (int)in->mouse.buttons[NK_BUTTON_LEFT].clicked;
+ left_mouse_click_in_cursor = nk_input_has_mouse_click_down_in_rect(in,
+ NK_BUTTON_LEFT, header, nk_true);
+ if (left_mouse_down && left_mouse_click_in_cursor && !left_mouse_clicked) {
+ win->bounds.x = win->bounds.x + in->mouse.delta.x;
+ win->bounds.y = win->bounds.y + in->mouse.delta.y;
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x += in->mouse.delta.x;
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y += in->mouse.delta.y;
+ ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_MOVE];
+ }
+ }
+
+ /* setup panel */
+ layout->type = panel_type;
+ layout->flags = win->flags;
+ layout->bounds = win->bounds;
+ layout->bounds.x += panel_padding.x;
+ layout->bounds.w -= 2*panel_padding.x;
+ if (win->flags & NK_WINDOW_BORDER) {
+ layout->border = nk_panel_get_border(style, win->flags, panel_type);
+ layout->bounds = nk_shrink_rect(layout->bounds, layout->border);
+ } else layout->border = 0;
+ layout->at_y = layout->bounds.y;
+ layout->at_x = layout->bounds.x;
+ layout->max_x = 0;
+ layout->header_height = 0;
+ layout->footer_height = 0;
+ nk_layout_reset_min_row_height(ctx);
+ layout->row.index = 0;
+ layout->row.columns = 0;
+ layout->row.ratio = 0;
+ layout->row.item_width = 0;
+ layout->row.tree_depth = 0;
+ layout->row.height = panel_padding.y;
+ layout->has_scrolling = nk_true;
+ if (!(win->flags & NK_WINDOW_NO_SCROLLBAR))
+ layout->bounds.w -= scrollbar_size.x;
+ if (!nk_panel_is_nonblock(panel_type)) {
+ layout->footer_height = 0;
+ if (!(win->flags & NK_WINDOW_NO_SCROLLBAR) || win->flags & NK_WINDOW_SCALABLE)
+ layout->footer_height = scrollbar_size.y;
+ layout->bounds.h -= layout->footer_height;
+ }
+
+ /* panel header */
+ if (nk_panel_has_header(win->flags, title))
+ {
+ struct nk_text text;
+ struct nk_rect header;
+ const struct nk_style_item *background = 0;
+
+ /* calculate header bounds */
+ header.x = win->bounds.x;
+ header.y = win->bounds.y;
+ header.w = win->bounds.w;
+ header.h = font->height + 2.0f * style->window.header.padding.y;
+ header.h += (2.0f * style->window.header.label_padding.y);
+
+ /* shrink panel by header */
+ layout->header_height = header.h;
+ layout->bounds.y += header.h;
+ layout->bounds.h -= header.h;
+ layout->at_y += header.h;
+
+ /* select correct header background and text color */
+ if (ctx->active == win) {
+ background = &style->window.header.active;
+ text.text = style->window.header.label_active;
+ } else if (nk_input_is_mouse_hovering_rect(&ctx->input, header)) {
+ background = &style->window.header.hover;
+ text.text = style->window.header.label_hover;
+ } else {
+ background = &style->window.header.normal;
+ text.text = style->window.header.label_normal;
+ }
+
+ /* draw header background */
+ header.h += 1.0f;
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ text.background = nk_rgba(0,0,0,0);
+ nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(out, header, 0, background->data.color);
+ }
+
+ /* window close button */
+ {struct nk_rect button;
+ button.y = header.y + style->window.header.padding.y;
+ button.h = header.h - 2 * style->window.header.padding.y;
+ button.w = button.h;
+ if (win->flags & NK_WINDOW_CLOSABLE) {
+ nk_flags ws = 0;
+ if (style->window.header.align == NK_HEADER_RIGHT) {
+ button.x = (header.w + header.x) - (button.w + style->window.header.padding.x);
+ header.w -= button.w + style->window.header.spacing.x + style->window.header.padding.x;
+ } else {
+ button.x = header.x + style->window.header.padding.x;
+ header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;
+ }
+
+ if (nk_do_button_symbol(&ws, &win->buffer, button,
+ style->window.header.close_symbol, NK_BUTTON_DEFAULT,
+ &style->window.header.close_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
+ {
+ layout->flags |= NK_WINDOW_HIDDEN;
+ layout->flags &= (nk_flags)~NK_WINDOW_MINIMIZED;
+ }
+ }
+
+ /* window minimize button */
+ if (win->flags & NK_WINDOW_MINIMIZABLE) {
+ nk_flags ws = 0;
+ if (style->window.header.align == NK_HEADER_RIGHT) {
+ button.x = (header.w + header.x) - button.w;
+ if (!(win->flags & NK_WINDOW_CLOSABLE)) {
+ button.x -= style->window.header.padding.x;
+ header.w -= style->window.header.padding.x;
+ }
+ header.w -= button.w + style->window.header.spacing.x;
+ } else {
+ button.x = header.x;
+ header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;
+ }
+ if (nk_do_button_symbol(&ws, &win->buffer, button, (layout->flags & NK_WINDOW_MINIMIZED)?
+ style->window.header.maximize_symbol: style->window.header.minimize_symbol,
+ NK_BUTTON_DEFAULT, &style->window.header.minimize_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
+ layout->flags = (layout->flags & NK_WINDOW_MINIMIZED) ?
+ layout->flags & (nk_flags)~NK_WINDOW_MINIMIZED:
+ layout->flags | NK_WINDOW_MINIMIZED;
+ }}
+
+ {/* window header title */
+ int text_len = nk_strlen(title);
+ struct nk_rect label = {0,0,0,0};
+ float t = font->width(font->userdata, font->height, title, text_len);
+ text.padding = nk_vec2(0,0);
+
+ label.x = header.x + style->window.header.padding.x;
+ label.x += style->window.header.label_padding.x;
+ label.y = header.y + style->window.header.label_padding.y;
+ label.h = font->height + 2 * style->window.header.label_padding.y;
+ label.w = t + 2 * style->window.header.spacing.x;
+ label.w = NK_CLAMP(0, label.w, header.x + header.w - label.x);
+ nk_widget_text(out, label,(const char*)title, text_len, &text, NK_TEXT_LEFT, font);}
+ }
+
+ /* draw window background */
+ if (!(layout->flags & NK_WINDOW_MINIMIZED) && !(layout->flags & NK_WINDOW_DYNAMIC)) {
+ struct nk_rect body;
+ body.x = win->bounds.x;
+ body.w = win->bounds.w;
+ body.y = (win->bounds.y + layout->header_height);
+ body.h = (win->bounds.h - layout->header_height);
+ if (style->window.fixed_background.type == NK_STYLE_ITEM_IMAGE)
+ nk_draw_image(out, body, &style->window.fixed_background.data.image, nk_white);
+ else nk_fill_rect(out, body, 0, style->window.fixed_background.data.color);
+ }
+
+ /* set clipping rectangle */
+ {struct nk_rect clip;
+ layout->clip = layout->bounds;
+ nk_unify(&clip, &win->buffer.clip, layout->clip.x, layout->clip.y,
+ layout->clip.x + layout->clip.w, layout->clip.y + layout->clip.h);
+ nk_push_scissor(out, clip);
+ layout->clip = clip;}
+ return !(layout->flags & NK_WINDOW_HIDDEN) && !(layout->flags & NK_WINDOW_MINIMIZED);
+}
+NK_LIB void
+nk_panel_end(struct nk_context *ctx)
+{
+ struct nk_input *in;
+ struct nk_window *window;
+ struct nk_panel *layout;
+ const struct nk_style *style;
+ struct nk_command_buffer *out;
+
+ struct nk_vec2 scrollbar_size;
+ struct nk_vec2 panel_padding;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ window = ctx->current;
+ layout = window->layout;
+ style = &ctx->style;
+ out = &window->buffer;
+ in = (layout->flags & NK_WINDOW_ROM || layout->flags & NK_WINDOW_NO_INPUT) ? 0 :&ctx->input;
+ if (!nk_panel_is_sub(layout->type))
+ nk_push_scissor(out, nk_null_rect);
+
+ /* cache configuration data */
+ scrollbar_size = style->window.scrollbar_size;
+ panel_padding = nk_panel_get_padding(style, layout->type);
+
+ /* update the current cursor Y-position to point over the last added widget */
+ layout->at_y += layout->row.height;
+
+ /* dynamic panels */
+ if (layout->flags & NK_WINDOW_DYNAMIC && !(layout->flags & NK_WINDOW_MINIMIZED))
+ {
+ /* update panel height to fit dynamic growth */
+ struct nk_rect empty_space;
+ if (layout->at_y < (layout->bounds.y + layout->bounds.h))
+ layout->bounds.h = layout->at_y - layout->bounds.y;
+
+ /* fill top empty space */
+ empty_space.x = window->bounds.x;
+ empty_space.y = layout->bounds.y;
+ empty_space.h = panel_padding.y;
+ empty_space.w = window->bounds.w;
+ nk_fill_rect(out, empty_space, 0, style->window.background);
+
+ /* fill left empty space */
+ empty_space.x = window->bounds.x;
+ empty_space.y = layout->bounds.y;
+ empty_space.w = panel_padding.x + layout->border;
+ empty_space.h = layout->bounds.h;
+ nk_fill_rect(out, empty_space, 0, style->window.background);
+
+ /* fill right empty space */
+ empty_space.x = layout->bounds.x + layout->bounds.w - layout->border;
+ empty_space.y = layout->bounds.y;
+ empty_space.w = panel_padding.x + layout->border;
+ empty_space.h = layout->bounds.h;
+ if (*layout->offset_y == 0 && !(layout->flags & NK_WINDOW_NO_SCROLLBAR))
+ empty_space.w += scrollbar_size.x;
+ nk_fill_rect(out, empty_space, 0, style->window.background);
+
+ /* fill bottom empty space */
+ if (*layout->offset_x != 0 && !(layout->flags & NK_WINDOW_NO_SCROLLBAR)) {
+ empty_space.x = window->bounds.x;
+ empty_space.y = layout->bounds.y + layout->bounds.h;
+ empty_space.w = window->bounds.w;
+ empty_space.h = scrollbar_size.y;
+ nk_fill_rect(out, empty_space, 0, style->window.background);
+ }
+ }
+
+ /* scrollbars */
+ if (!(layout->flags & NK_WINDOW_NO_SCROLLBAR) &&
+ !(layout->flags & NK_WINDOW_MINIMIZED) &&
+ window->scrollbar_hiding_timer < NK_SCROLLBAR_HIDING_TIMEOUT)
+ {
+ struct nk_rect scroll;
+ int scroll_has_scrolling;
+ float scroll_target;
+ float scroll_offset;
+ float scroll_step;
+ float scroll_inc;
+
+ /* mouse wheel scrolling */
+ if (nk_panel_is_sub(layout->type))
+ {
+ /* sub-window mouse wheel scrolling */
+ struct nk_window *root_window = window;
+ struct nk_panel *root_panel = window->layout;
+ while (root_panel->parent)
+ root_panel = root_panel->parent;
+ while (root_window->parent)
+ root_window = root_window->parent;
+
+ /* only allow scrolling if parent window is active */
+ scroll_has_scrolling = 0;
+ if ((root_window == ctx->active) && layout->has_scrolling) {
+ /* and panel is being hovered and inside clip rect*/
+ if (nk_input_is_mouse_hovering_rect(in, layout->bounds) &&
+ NK_INTERSECT(layout->bounds.x, layout->bounds.y, layout->bounds.w, layout->bounds.h,
+ root_panel->clip.x, root_panel->clip.y, root_panel->clip.w, root_panel->clip.h))
+ {
+ /* deactivate all parent scrolling */
+ root_panel = window->layout;
+ while (root_panel->parent) {
+ root_panel->has_scrolling = nk_false;
+ root_panel = root_panel->parent;
+ }
+ root_panel->has_scrolling = nk_false;
+ scroll_has_scrolling = nk_true;
+ }
+ }
+ } else if (!nk_panel_is_sub(layout->type)) {
+ /* window mouse wheel scrolling */
+ scroll_has_scrolling = (window == ctx->active) && layout->has_scrolling;
+ if (in && (in->mouse.scroll_delta.y > 0 || in->mouse.scroll_delta.x > 0) && scroll_has_scrolling)
+ window->scrolled = nk_true;
+ else window->scrolled = nk_false;
+ } else scroll_has_scrolling = nk_false;
+
+ {
+ /* vertical scrollbar */
+ nk_flags state = 0;
+ scroll.x = layout->bounds.x + layout->bounds.w + panel_padding.x;
+ scroll.y = layout->bounds.y;
+ scroll.w = scrollbar_size.x;
+ scroll.h = layout->bounds.h;
+
+ scroll_offset = (float)*layout->offset_y;
+ scroll_step = scroll.h * 0.10f;
+ scroll_inc = scroll.h * 0.01f;
+ scroll_target = (float)(int)(layout->at_y - scroll.y);
+ scroll_offset = nk_do_scrollbarv(&state, out, scroll, scroll_has_scrolling,
+ scroll_offset, scroll_target, scroll_step, scroll_inc,
+ &ctx->style.scrollv, in, style->font);
+ *layout->offset_y = (nk_uint)scroll_offset;
+ if (in && scroll_has_scrolling)
+ in->mouse.scroll_delta.y = 0;
+ }
+ {
+ /* horizontal scrollbar */
+ nk_flags state = 0;
+ scroll.x = layout->bounds.x;
+ scroll.y = layout->bounds.y + layout->bounds.h;
+ scroll.w = layout->bounds.w;
+ scroll.h = scrollbar_size.y;
+
+ scroll_offset = (float)*layout->offset_x;
+ scroll_target = (float)(int)(layout->max_x - scroll.x);
+ scroll_step = layout->max_x * 0.05f;
+ scroll_inc = layout->max_x * 0.005f;
+ scroll_offset = nk_do_scrollbarh(&state, out, scroll, scroll_has_scrolling,
+ scroll_offset, scroll_target, scroll_step, scroll_inc,
+ &ctx->style.scrollh, in, style->font);
+ *layout->offset_x = (nk_uint)scroll_offset;
+ }
+ }
+
+ /* hide scroll if no user input */
+ if (window->flags & NK_WINDOW_SCROLL_AUTO_HIDE) {
+ int has_input = ctx->input.mouse.delta.x != 0 || ctx->input.mouse.delta.y != 0 || ctx->input.mouse.scroll_delta.y != 0;
+ int is_window_hovered = nk_window_is_hovered(ctx);
+ int any_item_active = (ctx->last_widget_state & NK_WIDGET_STATE_MODIFIED);
+ if ((!has_input && is_window_hovered) || (!is_window_hovered && !any_item_active))
+ window->scrollbar_hiding_timer += ctx->delta_time_seconds;
+ else window->scrollbar_hiding_timer = 0;
+ } else window->scrollbar_hiding_timer = 0;
+
+ /* window border */
+ if (layout->flags & NK_WINDOW_BORDER)
+ {
+ struct nk_color border_color = nk_panel_get_border_color(style, layout->type);
+ const float padding_y = (layout->flags & NK_WINDOW_MINIMIZED)
+ ? (style->window.border + window->bounds.y + layout->header_height)
+ : ((layout->flags & NK_WINDOW_DYNAMIC)
+ ? (layout->bounds.y + layout->bounds.h + layout->footer_height)
+ : (window->bounds.y + window->bounds.h));
+ struct nk_rect b = window->bounds;
+ b.h = padding_y - window->bounds.y;
+ nk_stroke_rect(out, b, 0, layout->border, border_color);
+ }
+
+ /* scaler */
+ if ((layout->flags & NK_WINDOW_SCALABLE) && in && !(layout->flags & NK_WINDOW_MINIMIZED))
+ {
+ /* calculate scaler bounds */
+ struct nk_rect scaler;
+ scaler.w = scrollbar_size.x;
+ scaler.h = scrollbar_size.y;
+ scaler.y = layout->bounds.y + layout->bounds.h;
+ if (layout->flags & NK_WINDOW_SCALE_LEFT)
+ scaler.x = layout->bounds.x - panel_padding.x * 0.5f;
+ else scaler.x = layout->bounds.x + layout->bounds.w + panel_padding.x;
+ if (layout->flags & NK_WINDOW_NO_SCROLLBAR)
+ scaler.x -= scaler.w;
+
+ /* draw scaler */
+ {const struct nk_style_item *item = &style->window.scaler;
+ if (item->type == NK_STYLE_ITEM_IMAGE)
+ nk_draw_image(out, scaler, &item->data.image, nk_white);
+ else {
+ if (layout->flags & NK_WINDOW_SCALE_LEFT) {
+ nk_fill_triangle(out, scaler.x, scaler.y, scaler.x,
+ scaler.y + scaler.h, scaler.x + scaler.w,
+ scaler.y + scaler.h, item->data.color);
+ } else {
+ nk_fill_triangle(out, scaler.x + scaler.w, scaler.y, scaler.x + scaler.w,
+ scaler.y + scaler.h, scaler.x, scaler.y + scaler.h, item->data.color);
+ }
+ }}
+
+ /* do window scaling */
+ if (!(window->flags & NK_WINDOW_ROM)) {
+ struct nk_vec2 window_size = style->window.min_size;
+ int left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;
+ int left_mouse_click_in_scaler = nk_input_has_mouse_click_down_in_rect(in,
+ NK_BUTTON_LEFT, scaler, nk_true);
+
+ if (left_mouse_down && left_mouse_click_in_scaler) {
+ float delta_x = in->mouse.delta.x;
+ if (layout->flags & NK_WINDOW_SCALE_LEFT) {
+ delta_x = -delta_x;
+ window->bounds.x += in->mouse.delta.x;
+ }
+ /* dragging in x-direction */
+ if (window->bounds.w + delta_x >= window_size.x) {
+ if ((delta_x < 0) || (delta_x > 0 && in->mouse.pos.x >= scaler.x)) {
+ window->bounds.w = window->bounds.w + delta_x;
+ scaler.x += in->mouse.delta.x;
+ }
+ }
+ /* dragging in y-direction (only possible if static window) */
+ if (!(layout->flags & NK_WINDOW_DYNAMIC)) {
+ if (window_size.y < window->bounds.h + in->mouse.delta.y) {
+ if ((in->mouse.delta.y < 0) || (in->mouse.delta.y > 0 && in->mouse.pos.y >= scaler.y)) {
+ window->bounds.h = window->bounds.h + in->mouse.delta.y;
+ scaler.y += in->mouse.delta.y;
+ }
+ }
+ }
+ ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_RESIZE_TOP_RIGHT_DOWN_LEFT];
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = scaler.x + scaler.w/2.0f;
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y = scaler.y + scaler.h/2.0f;
+ }
+ }
+ }
+ if (!nk_panel_is_sub(layout->type)) {
+ /* window is hidden so clear command buffer */
+ if (layout->flags & NK_WINDOW_HIDDEN)
+ nk_command_buffer_reset(&window->buffer);
+ /* window is visible and not tab */
+ else nk_finish(ctx, window);
+ }
+
+ /* NK_WINDOW_REMOVE_ROM flag was set so remove NK_WINDOW_ROM */
+ if (layout->flags & NK_WINDOW_REMOVE_ROM) {
+ layout->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ layout->flags &= ~(nk_flags)NK_WINDOW_REMOVE_ROM;
+ }
+ window->flags = layout->flags;
+
+ /* property garbage collector */
+ if (window->property.active && window->property.old != window->property.seq &&
+ window->property.active == window->property.prev) {
+ nk_zero(&window->property, sizeof(window->property));
+ } else {
+ window->property.old = window->property.seq;
+ window->property.prev = window->property.active;
+ window->property.seq = 0;
+ }
+ /* edit garbage collector */
+ if (window->edit.active && window->edit.old != window->edit.seq &&
+ window->edit.active == window->edit.prev) {
+ nk_zero(&window->edit, sizeof(window->edit));
+ } else {
+ window->edit.old = window->edit.seq;
+ window->edit.prev = window->edit.active;
+ window->edit.seq = 0;
+ }
+ /* contextual garbage collector */
+ if (window->popup.active_con && window->popup.con_old != window->popup.con_count) {
+ window->popup.con_count = 0;
+ window->popup.con_old = 0;
+ window->popup.active_con = 0;
+ } else {
+ window->popup.con_old = window->popup.con_count;
+ window->popup.con_count = 0;
+ }
+ window->popup.combo_count = 0;
+ /* helper to make sure you have a 'nk_tree_push' for every 'nk_tree_pop' */
+ NK_ASSERT(!layout->row.tree_depth);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * WINDOW
+ *
+ * ===============================================================*/
+NK_LIB void*
+nk_create_window(struct nk_context *ctx)
+{
+ struct nk_page_element *elem;
+ elem = nk_create_page_element(ctx);
+ if (!elem) return 0;
+ elem->data.win.seq = ctx->seq;
+ return &elem->data.win;
+}
+NK_LIB void
+nk_free_window(struct nk_context *ctx, struct nk_window *win)
+{
+ /* unlink windows from list */
+ struct nk_table *it = win->tables;
+ if (win->popup.win) {
+ nk_free_window(ctx, win->popup.win);
+ win->popup.win = 0;
+ }
+ win->next = 0;
+ win->prev = 0;
+
+ while (it) {
+ /*free window state tables */
+ struct nk_table *n = it->next;
+ nk_remove_table(win, it);
+ nk_free_table(ctx, it);
+ if (it == win->tables)
+ win->tables = n;
+ it = n;
+ }
+
+ /* link windows into freelist */
+ {union nk_page_data *pd = NK_CONTAINER_OF(win, union nk_page_data, win);
+ struct nk_page_element *pe = NK_CONTAINER_OF(pd, struct nk_page_element, data);
+ nk_free_page_element(ctx, pe);}
+}
+NK_LIB struct nk_window*
+nk_find_window(struct nk_context *ctx, nk_hash hash, const char *name)
+{
+ struct nk_window *iter;
+ iter = ctx->begin;
+ while (iter) {
+ NK_ASSERT(iter != iter->next);
+ if (iter->name == hash) {
+ int max_len = nk_strlen(iter->name_string);
+ if (!nk_stricmpn(iter->name_string, name, max_len))
+ return iter;
+ }
+ iter = iter->next;
+ }
+ return 0;
+}
+NK_LIB void
+nk_insert_window(struct nk_context *ctx, struct nk_window *win,
+ enum nk_window_insert_location loc)
+{
+ const struct nk_window *iter;
+ NK_ASSERT(ctx);
+ NK_ASSERT(win);
+ if (!win || !ctx) return;
+
+ iter = ctx->begin;
+ while (iter) {
+ NK_ASSERT(iter != iter->next);
+ NK_ASSERT(iter != win);
+ if (iter == win) return;
+ iter = iter->next;
+ }
+
+ if (!ctx->begin) {
+ win->next = 0;
+ win->prev = 0;
+ ctx->begin = win;
+ ctx->end = win;
+ ctx->count = 1;
+ return;
+ }
+ if (loc == NK_INSERT_BACK) {
+ struct nk_window *end;
+ end = ctx->end;
+ end->flags |= NK_WINDOW_ROM;
+ end->next = win;
+ win->prev = ctx->end;
+ win->next = 0;
+ ctx->end = win;
+ ctx->active = ctx->end;
+ ctx->end->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ } else {
+ /*ctx->end->flags |= NK_WINDOW_ROM;*/
+ ctx->begin->prev = win;
+ win->next = ctx->begin;
+ win->prev = 0;
+ ctx->begin = win;
+ ctx->begin->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ }
+ ctx->count++;
+}
+NK_LIB void
+nk_remove_window(struct nk_context *ctx, struct nk_window *win)
+{
+ if (win == ctx->begin || win == ctx->end) {
+ if (win == ctx->begin) {
+ ctx->begin = win->next;
+ if (win->next)
+ win->next->prev = 0;
+ }
+ if (win == ctx->end) {
+ ctx->end = win->prev;
+ if (win->prev)
+ win->prev->next = 0;
+ }
+ } else {
+ if (win->next)
+ win->next->prev = win->prev;
+ if (win->prev)
+ win->prev->next = win->next;
+ }
+ if (win == ctx->active || !ctx->active) {
+ ctx->active = ctx->end;
+ if (ctx->end)
+ ctx->end->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ }
+ win->next = 0;
+ win->prev = 0;
+ ctx->count--;
+}
+NK_API int
+nk_begin(struct nk_context *ctx, const char *title,
+ struct nk_rect bounds, nk_flags flags)
+{
+ return nk_begin_titled(ctx, title, title, bounds, flags);
+}
+NK_API int
+nk_begin_titled(struct nk_context *ctx, const char *name, const char *title,
+ struct nk_rect bounds, nk_flags flags)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ nk_hash title_hash;
+ int title_len;
+ int ret = 0;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+ NK_ASSERT(title);
+ NK_ASSERT(ctx->style.font && ctx->style.font->width && "if this triggers you forgot to add a font");
+ NK_ASSERT(!ctx->current && "if this triggers you missed a `nk_end` call");
+ if (!ctx || ctx->current || !title || !name)
+ return 0;
+
+ /* find or create window */
+ style = &ctx->style;
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) {
+ /* create new window */
+ nk_size name_length = (nk_size)nk_strlen(name);
+ win = (struct nk_window*)nk_create_window(ctx);
+ NK_ASSERT(win);
+ if (!win) return 0;
+
+ if (flags & NK_WINDOW_BACKGROUND)
+ nk_insert_window(ctx, win, NK_INSERT_FRONT);
+ else nk_insert_window(ctx, win, NK_INSERT_BACK);
+ nk_command_buffer_init(&win->buffer, &ctx->memory, NK_CLIPPING_ON);
+
+ win->flags = flags;
+ win->bounds = bounds;
+ win->name = title_hash;
+ name_length = NK_MIN(name_length, NK_WINDOW_MAX_NAME-1);
+ NK_MEMCPY(win->name_string, name, name_length);
+ win->name_string[name_length] = 0;
+ win->popup.win = 0;
+ if (!ctx->active)
+ ctx->active = win;
+ } else {
+ /* update window */
+ win->flags &= ~(nk_flags)(NK_WINDOW_PRIVATE-1);
+ win->flags |= flags;
+ if (!(win->flags & (NK_WINDOW_MOVABLE | NK_WINDOW_SCALABLE)))
+ win->bounds = bounds;
+ /* If this assert triggers you either:
+ *
+ * I.) Have more than one window with the same name or
+ * II.) You forgot to actually draw the window.
+ * More specific you did not call `nk_clear` (nk_clear will be
+ * automatically called for you if you are using one of the
+ * provided demo backends). */
+ NK_ASSERT(win->seq != ctx->seq);
+ win->seq = ctx->seq;
+ if (!ctx->active && !(win->flags & NK_WINDOW_HIDDEN)) {
+ ctx->active = win;
+ ctx->end = win;
+ }
+ }
+ if (win->flags & NK_WINDOW_HIDDEN) {
+ ctx->current = win;
+ win->layout = 0;
+ return 0;
+ } else nk_start(ctx, win);
+
+ /* window overlapping */
+ if (!(win->flags & NK_WINDOW_HIDDEN) && !(win->flags & NK_WINDOW_NO_INPUT))
+ {
+ int inpanel, ishovered;
+ struct nk_window *iter = win;
+ float h = ctx->style.font->height + 2.0f * style->window.header.padding.y +
+ (2.0f * style->window.header.label_padding.y);
+ struct nk_rect win_bounds = (!(win->flags & NK_WINDOW_MINIMIZED))?
+ win->bounds: nk_rect(win->bounds.x, win->bounds.y, win->bounds.w, h);
+
+ /* activate window if hovered and no other window is overlapping this window */
+ inpanel = nk_input_has_mouse_click_down_in_rect(&ctx->input, NK_BUTTON_LEFT, win_bounds, nk_true);
+ inpanel = inpanel && ctx->input.mouse.buttons[NK_BUTTON_LEFT].clicked;
+ ishovered = nk_input_is_mouse_hovering_rect(&ctx->input, win_bounds);
+ if ((win != ctx->active) && ishovered && !ctx->input.mouse.buttons[NK_BUTTON_LEFT].down) {
+ iter = win->next;
+ while (iter) {
+ struct nk_rect iter_bounds = (!(iter->flags & NK_WINDOW_MINIMIZED))?
+ iter->bounds: nk_rect(iter->bounds.x, iter->bounds.y, iter->bounds.w, h);
+ if (NK_INTERSECT(win_bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,
+ iter_bounds.x, iter_bounds.y, iter_bounds.w, iter_bounds.h) &&
+ (!(iter->flags & NK_WINDOW_HIDDEN)))
+ break;
+
+ if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&
+ NK_INTERSECT(win->bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,
+ iter->popup.win->bounds.x, iter->popup.win->bounds.y,
+ iter->popup.win->bounds.w, iter->popup.win->bounds.h))
+ break;
+ iter = iter->next;
+ }
+ }
+
+ /* activate window if clicked */
+ if (iter && inpanel && (win != ctx->end)) {
+ iter = win->next;
+ while (iter) {
+ /* try to find a panel with higher priority in the same position */
+ struct nk_rect iter_bounds = (!(iter->flags & NK_WINDOW_MINIMIZED))?
+ iter->bounds: nk_rect(iter->bounds.x, iter->bounds.y, iter->bounds.w, h);
+ if (NK_INBOX(ctx->input.mouse.pos.x, ctx->input.mouse.pos.y,
+ iter_bounds.x, iter_bounds.y, iter_bounds.w, iter_bounds.h) &&
+ !(iter->flags & NK_WINDOW_HIDDEN))
+ break;
+ if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&
+ NK_INTERSECT(win_bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,
+ iter->popup.win->bounds.x, iter->popup.win->bounds.y,
+ iter->popup.win->bounds.w, iter->popup.win->bounds.h))
+ break;
+ iter = iter->next;
+ }
+ }
+ if (iter && !(win->flags & NK_WINDOW_ROM) && (win->flags & NK_WINDOW_BACKGROUND)) {
+ win->flags |= (nk_flags)NK_WINDOW_ROM;
+ iter->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ ctx->active = iter;
+ if (!(iter->flags & NK_WINDOW_BACKGROUND)) {
+ /* current window is active in that position so transfer to top
+ * at the highest priority in stack */
+ nk_remove_window(ctx, iter);
+ nk_insert_window(ctx, iter, NK_INSERT_BACK);
+ }
+ } else {
+ if (!iter && ctx->end != win) {
+ if (!(win->flags & NK_WINDOW_BACKGROUND)) {
+ /* current window is active in that position so transfer to top
+ * at the highest priority in stack */
+ nk_remove_window(ctx, win);
+ nk_insert_window(ctx, win, NK_INSERT_BACK);
+ }
+ win->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ ctx->active = win;
+ }
+ if (ctx->end != win && !(win->flags & NK_WINDOW_BACKGROUND))
+ win->flags |= NK_WINDOW_ROM;
+ }
+ }
+ win->layout = (struct nk_panel*)nk_create_panel(ctx);
+ ctx->current = win;
+ ret = nk_panel_begin(ctx, title, NK_PANEL_WINDOW);
+ win->layout->offset_x = &win->scrollbar.x;
+ win->layout->offset_y = &win->scrollbar.y;
+ return ret;
+}
+NK_API void
+nk_end(struct nk_context *ctx)
+{
+ struct nk_panel *layout;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current && "if this triggers you forgot to call `nk_begin`");
+ if (!ctx || !ctx->current)
+ return;
+
+ layout = ctx->current->layout;
+ if (!layout || (layout->type == NK_PANEL_WINDOW && (ctx->current->flags & NK_WINDOW_HIDDEN))) {
+ ctx->current = 0;
+ return;
+ }
+ nk_panel_end(ctx);
+ nk_free_panel(ctx, ctx->current->layout);
+ ctx->current = 0;
+}
+NK_API struct nk_rect
+nk_window_get_bounds(const struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return nk_rect(0,0,0,0);
+ return ctx->current->bounds;
+}
+NK_API struct nk_vec2
+nk_window_get_position(const struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return nk_vec2(0,0);
+ return nk_vec2(ctx->current->bounds.x, ctx->current->bounds.y);
+}
+NK_API struct nk_vec2
+nk_window_get_size(const struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return nk_vec2(0,0);
+ return nk_vec2(ctx->current->bounds.w, ctx->current->bounds.h);
+}
+NK_API float
+nk_window_get_width(const struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return 0;
+ return ctx->current->bounds.w;
+}
+NK_API float
+nk_window_get_height(const struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return 0;
+ return ctx->current->bounds.h;
+}
+NK_API struct nk_rect
+nk_window_get_content_region(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return nk_rect(0,0,0,0);
+ return ctx->current->layout->clip;
+}
+NK_API struct nk_vec2
+nk_window_get_content_region_min(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current) return nk_vec2(0,0);
+ return nk_vec2(ctx->current->layout->clip.x, ctx->current->layout->clip.y);
+}
+NK_API struct nk_vec2
+nk_window_get_content_region_max(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current) return nk_vec2(0,0);
+ return nk_vec2(ctx->current->layout->clip.x + ctx->current->layout->clip.w,
+ ctx->current->layout->clip.y + ctx->current->layout->clip.h);
+}
+NK_API struct nk_vec2
+nk_window_get_content_region_size(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current) return nk_vec2(0,0);
+ return nk_vec2(ctx->current->layout->clip.w, ctx->current->layout->clip.h);
+}
+NK_API struct nk_command_buffer*
+nk_window_get_canvas(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current) return 0;
+ return &ctx->current->buffer;
+}
+NK_API struct nk_panel*
+nk_window_get_panel(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return 0;
+ return ctx->current->layout;
+}
+NK_API int
+nk_window_has_focus(const struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current) return 0;
+ return ctx->current == ctx->active;
+}
+NK_API int
+nk_window_is_hovered(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return 0;
+ if(ctx->current->flags & NK_WINDOW_HIDDEN)
+ return 0;
+ return nk_input_is_mouse_hovering_rect(&ctx->input, ctx->current->bounds);
+}
+NK_API int
+nk_window_is_any_hovered(struct nk_context *ctx)
+{
+ struct nk_window *iter;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ iter = ctx->begin;
+ while (iter) {
+ /* check if window is being hovered */
+ if(!(iter->flags & NK_WINDOW_HIDDEN)) {
+ /* check if window popup is being hovered */
+ if (iter->popup.active && iter->popup.win && nk_input_is_mouse_hovering_rect(&ctx->input, iter->popup.win->bounds))
+ return 1;
+
+ if (iter->flags & NK_WINDOW_MINIMIZED) {
+ struct nk_rect header = iter->bounds;
+ header.h = ctx->style.font->height + 2 * ctx->style.window.header.padding.y;
+ if (nk_input_is_mouse_hovering_rect(&ctx->input, header))
+ return 1;
+ } else if (nk_input_is_mouse_hovering_rect(&ctx->input, iter->bounds)) {
+ return 1;
+ }
+ }
+ iter = iter->next;
+ }
+ return 0;
+}
+NK_API int
+nk_item_is_any_active(struct nk_context *ctx)
+{
+ int any_hovered = nk_window_is_any_hovered(ctx);
+ int any_active = (ctx->last_widget_state & NK_WIDGET_STATE_MODIFIED);
+ return any_hovered || any_active;
+}
+NK_API int
+nk_window_is_collapsed(struct nk_context *ctx, const char *name)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) return 0;
+ return win->flags & NK_WINDOW_MINIMIZED;
+}
+NK_API int
+nk_window_is_closed(struct nk_context *ctx, const char *name)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return 1;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) return 1;
+ return (win->flags & NK_WINDOW_CLOSED);
+}
+NK_API int
+nk_window_is_hidden(struct nk_context *ctx, const char *name)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return 1;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) return 1;
+ return (win->flags & NK_WINDOW_HIDDEN);
+}
+NK_API int
+nk_window_is_active(struct nk_context *ctx, const char *name)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) return 0;
+ return win == ctx->active;
+}
+NK_API struct nk_window*
+nk_window_find(struct nk_context *ctx, const char *name)
+{
+ int title_len;
+ nk_hash title_hash;
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ return nk_find_window(ctx, title_hash, name);
+}
+NK_API void
+nk_window_close(struct nk_context *ctx, const char *name)
+{
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ win = nk_window_find(ctx, name);
+ if (!win) return;
+ NK_ASSERT(ctx->current != win && "You cannot close a currently active window");
+ if (ctx->current == win) return;
+ win->flags |= NK_WINDOW_HIDDEN;
+ win->flags |= NK_WINDOW_CLOSED;
+}
+NK_API void
+nk_window_set_bounds(struct nk_context *ctx,
+ const char *name, struct nk_rect bounds)
+{
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ win = nk_window_find(ctx, name);
+ if (!win) return;
+ NK_ASSERT(ctx->current != win && "You cannot update a currently in procecss window");
+ win->bounds = bounds;
+}
+NK_API void
+nk_window_set_position(struct nk_context *ctx,
+ const char *name, struct nk_vec2 pos)
+{
+ struct nk_window *win = nk_window_find(ctx, name);
+ if (!win) return;
+ win->bounds.x = pos.x;
+ win->bounds.y = pos.y;
+}
+NK_API void
+nk_window_set_size(struct nk_context *ctx,
+ const char *name, struct nk_vec2 size)
+{
+ struct nk_window *win = nk_window_find(ctx, name);
+ if (!win) return;
+ win->bounds.w = size.x;
+ win->bounds.h = size.y;
+}
+NK_API void
+nk_window_collapse(struct nk_context *ctx, const char *name,
+ enum nk_collapse_states c)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) return;
+ if (c == NK_MINIMIZED)
+ win->flags |= NK_WINDOW_MINIMIZED;
+ else win->flags &= ~(nk_flags)NK_WINDOW_MINIMIZED;
+}
+NK_API void
+nk_window_collapse_if(struct nk_context *ctx, const char *name,
+ enum nk_collapse_states c, int cond)
+{
+ NK_ASSERT(ctx);
+ if (!ctx || !cond) return;
+ nk_window_collapse(ctx, name, c);
+}
+NK_API void
+nk_window_show(struct nk_context *ctx, const char *name, enum nk_show_states s)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (!win) return;
+ if (s == NK_HIDDEN) {
+ win->flags |= NK_WINDOW_HIDDEN;
+ } else win->flags &= ~(nk_flags)NK_WINDOW_HIDDEN;
+}
+NK_API void
+nk_window_show_if(struct nk_context *ctx, const char *name,
+ enum nk_show_states s, int cond)
+{
+ NK_ASSERT(ctx);
+ if (!ctx || !cond) return;
+ nk_window_show(ctx, name, s);
+}
+
+NK_API void
+nk_window_set_focus(struct nk_context *ctx, const char *name)
+{
+ int title_len;
+ nk_hash title_hash;
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+
+ title_len = (int)nk_strlen(name);
+ title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);
+ win = nk_find_window(ctx, title_hash, name);
+ if (win && ctx->end != win) {
+ nk_remove_window(ctx, win);
+ nk_insert_window(ctx, win, NK_INSERT_BACK);
+ }
+ ctx->active = win;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * POPUP
+ *
+ * ===============================================================*/
+NK_API int
+nk_popup_begin(struct nk_context *ctx, enum nk_popup_type type,
+ const char *title, nk_flags flags, struct nk_rect rect)
+{
+ struct nk_window *popup;
+ struct nk_window *win;
+ struct nk_panel *panel;
+
+ int title_len;
+ nk_hash title_hash;
+ nk_size allocated;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(title);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ panel = win->layout;
+ NK_ASSERT(!(panel->type & NK_PANEL_SET_POPUP) && "popups are not allowed to have popups");
+ (void)panel;
+ title_len = (int)nk_strlen(title);
+ title_hash = nk_murmur_hash(title, (int)title_len, NK_PANEL_POPUP);
+
+ popup = win->popup.win;
+ if (!popup) {
+ popup = (struct nk_window*)nk_create_window(ctx);
+ popup->parent = win;
+ win->popup.win = popup;
+ win->popup.active = 0;
+ win->popup.type = NK_PANEL_POPUP;
+ }
+
+ /* make sure we have correct popup */
+ if (win->popup.name != title_hash) {
+ if (!win->popup.active) {
+ nk_zero(popup, sizeof(*popup));
+ win->popup.name = title_hash;
+ win->popup.active = 1;
+ win->popup.type = NK_PANEL_POPUP;
+ } else return 0;
+ }
+
+ /* popup position is local to window */
+ ctx->current = popup;
+ rect.x += win->layout->clip.x;
+ rect.y += win->layout->clip.y;
+
+ /* setup popup data */
+ popup->parent = win;
+ popup->bounds = rect;
+ popup->seq = ctx->seq;
+ popup->layout = (struct nk_panel*)nk_create_panel(ctx);
+ popup->flags = flags;
+ popup->flags |= NK_WINDOW_BORDER;
+ if (type == NK_POPUP_DYNAMIC)
+ popup->flags |= NK_WINDOW_DYNAMIC;
+
+ popup->buffer = win->buffer;
+ nk_start_popup(ctx, win);
+ allocated = ctx->memory.allocated;
+ nk_push_scissor(&popup->buffer, nk_null_rect);
+
+ if (nk_panel_begin(ctx, title, NK_PANEL_POPUP)) {
+ /* popup is running therefore invalidate parent panels */
+ struct nk_panel *root;
+ root = win->layout;
+ while (root) {
+ root->flags |= NK_WINDOW_ROM;
+ root->flags &= ~(nk_flags)NK_WINDOW_REMOVE_ROM;
+ root = root->parent;
+ }
+ win->popup.active = 1;
+ popup->layout->offset_x = &popup->scrollbar.x;
+ popup->layout->offset_y = &popup->scrollbar.y;
+ popup->layout->parent = win->layout;
+ return 1;
+ } else {
+ /* popup was closed/is invalid so cleanup */
+ struct nk_panel *root;
+ root = win->layout;
+ while (root) {
+ root->flags |= NK_WINDOW_REMOVE_ROM;
+ root = root->parent;
+ }
+ win->popup.buf.active = 0;
+ win->popup.active = 0;
+ ctx->memory.allocated = allocated;
+ ctx->current = win;
+ nk_free_panel(ctx, popup->layout);
+ popup->layout = 0;
+ return 0;
+ }
+}
+NK_LIB int
+nk_nonblock_begin(struct nk_context *ctx,
+ nk_flags flags, struct nk_rect body, struct nk_rect header,
+ enum nk_panel_type panel_type)
+{
+ struct nk_window *popup;
+ struct nk_window *win;
+ struct nk_panel *panel;
+ int is_active = nk_true;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ /* popups cannot have popups */
+ win = ctx->current;
+ panel = win->layout;
+ NK_ASSERT(!(panel->type & NK_PANEL_SET_POPUP));
+ (void)panel;
+ popup = win->popup.win;
+ if (!popup) {
+ /* create window for nonblocking popup */
+ popup = (struct nk_window*)nk_create_window(ctx);
+ popup->parent = win;
+ win->popup.win = popup;
+ win->popup.type = panel_type;
+ nk_command_buffer_init(&popup->buffer, &ctx->memory, NK_CLIPPING_ON);
+ } else {
+ /* close the popup if user pressed outside or in the header */
+ int pressed, in_body, in_header;
+ pressed = nk_input_is_mouse_pressed(&ctx->input, NK_BUTTON_LEFT);
+ in_body = nk_input_is_mouse_hovering_rect(&ctx->input, body);
+ in_header = nk_input_is_mouse_hovering_rect(&ctx->input, header);
+ if (pressed && (!in_body || in_header))
+ is_active = nk_false;
+ }
+ win->popup.header = header;
+
+ if (!is_active) {
+ /* remove read only mode from all parent panels */
+ struct nk_panel *root = win->layout;
+ while (root) {
+ root->flags |= NK_WINDOW_REMOVE_ROM;
+ root = root->parent;
+ }
+ return is_active;
+ }
+ popup->bounds = body;
+ popup->parent = win;
+ popup->layout = (struct nk_panel*)nk_create_panel(ctx);
+ popup->flags = flags;
+ popup->flags |= NK_WINDOW_BORDER;
+ popup->flags |= NK_WINDOW_DYNAMIC;
+ popup->seq = ctx->seq;
+ win->popup.active = 1;
+ NK_ASSERT(popup->layout);
+
+ nk_start_popup(ctx, win);
+ popup->buffer = win->buffer;
+ nk_push_scissor(&popup->buffer, nk_null_rect);
+ ctx->current = popup;
+
+ nk_panel_begin(ctx, 0, panel_type);
+ win->buffer = popup->buffer;
+ popup->layout->parent = win->layout;
+ popup->layout->offset_x = &popup->scrollbar.x;
+ popup->layout->offset_y = &popup->scrollbar.y;
+
+ /* set read only mode to all parent panels */
+ {struct nk_panel *root;
+ root = win->layout;
+ while (root) {
+ root->flags |= NK_WINDOW_ROM;
+ root = root->parent;
+ }}
+ return is_active;
+}
+NK_API void
+nk_popup_close(struct nk_context *ctx)
+{
+ struct nk_window *popup;
+ NK_ASSERT(ctx);
+ if (!ctx || !ctx->current) return;
+
+ popup = ctx->current;
+ NK_ASSERT(popup->parent);
+ NK_ASSERT(popup->layout->type & NK_PANEL_SET_POPUP);
+ popup->flags |= NK_WINDOW_HIDDEN;
+}
+NK_API void
+nk_popup_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_window *popup;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ popup = ctx->current;
+ if (!popup->parent) return;
+ win = popup->parent;
+ if (popup->flags & NK_WINDOW_HIDDEN) {
+ struct nk_panel *root;
+ root = win->layout;
+ while (root) {
+ root->flags |= NK_WINDOW_REMOVE_ROM;
+ root = root->parent;
+ }
+ win->popup.active = 0;
+ }
+ nk_push_scissor(&popup->buffer, nk_null_rect);
+ nk_end(ctx);
+
+ win->buffer = popup->buffer;
+ nk_finish_popup(ctx, win);
+ ctx->current = win;
+ nk_push_scissor(&win->buffer, win->layout->clip);
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * CONTEXTUAL
+ *
+ * ===============================================================*/
+NK_API int
+nk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,
+ struct nk_rect trigger_bounds)
+{
+ struct nk_window *win;
+ struct nk_window *popup;
+ struct nk_rect body;
+
+ NK_STORAGE const struct nk_rect null_rect = {-1,-1,0,0};
+ int is_clicked = 0;
+ int is_open = 0;
+ int ret = 0;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ ++win->popup.con_count;
+ if (ctx->current != ctx->active)
+ return 0;
+
+ /* check if currently active contextual is active */
+ popup = win->popup.win;
+ is_open = (popup && win->popup.type == NK_PANEL_CONTEXTUAL);
+ is_clicked = nk_input_mouse_clicked(&ctx->input, NK_BUTTON_RIGHT, trigger_bounds);
+ if (win->popup.active_con && win->popup.con_count != win->popup.active_con)
+ return 0;
+ if (!is_open && win->popup.active_con)
+ win->popup.active_con = 0;
+ if ((!is_open && !is_clicked))
+ return 0;
+
+ /* calculate contextual position on click */
+ win->popup.active_con = win->popup.con_count;
+ if (is_clicked) {
+ body.x = ctx->input.mouse.pos.x;
+ body.y = ctx->input.mouse.pos.y;
+ } else {
+ body.x = popup->bounds.x;
+ body.y = popup->bounds.y;
+ }
+ body.w = size.x;
+ body.h = size.y;
+
+ /* start nonblocking contextual popup */
+ ret = nk_nonblock_begin(ctx, flags|NK_WINDOW_NO_SCROLLBAR, body,
+ null_rect, NK_PANEL_CONTEXTUAL);
+ if (ret) win->popup.type = NK_PANEL_CONTEXTUAL;
+ else {
+ win->popup.active_con = 0;
+ win->popup.type = NK_PANEL_NONE;
+ if (win->popup.win)
+ win->popup.win->flags = 0;
+ }
+ return ret;
+}
+NK_API int
+nk_contextual_item_text(struct nk_context *ctx, const char *text, int len,
+ nk_flags alignment)
+{
+ struct nk_window *win;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding);
+ if (!state) return nk_false;
+
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_text(&ctx->last_widget_state, &win->buffer, bounds,
+ text, len, alignment, NK_BUTTON_DEFAULT, &style->contextual_button, in, style->font)) {
+ nk_contextual_close(ctx);
+ return nk_true;
+ }
+ return nk_false;
+}
+NK_API int
+nk_contextual_item_label(struct nk_context *ctx, const char *label, nk_flags align)
+{
+ return nk_contextual_item_text(ctx, label, nk_strlen(label), align);
+}
+NK_API int
+nk_contextual_item_image_text(struct nk_context *ctx, struct nk_image img,
+ const char *text, int len, nk_flags align)
+{
+ struct nk_window *win;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding);
+ if (!state) return nk_false;
+
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_text_image(&ctx->last_widget_state, &win->buffer, bounds,
+ img, text, len, align, NK_BUTTON_DEFAULT, &style->contextual_button, style->font, in)){
+ nk_contextual_close(ctx);
+ return nk_true;
+ }
+ return nk_false;
+}
+NK_API int
+nk_contextual_item_image_label(struct nk_context *ctx, struct nk_image img,
+ const char *label, nk_flags align)
+{
+ return nk_contextual_item_image_text(ctx, img, label, nk_strlen(label), align);
+}
+NK_API int
+nk_contextual_item_symbol_text(struct nk_context *ctx, enum nk_symbol_type symbol,
+ const char *text, int len, nk_flags align)
+{
+ struct nk_window *win;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding);
+ if (!state) return nk_false;
+
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer, bounds,
+ symbol, text, len, align, NK_BUTTON_DEFAULT, &style->contextual_button, style->font, in)) {
+ nk_contextual_close(ctx);
+ return nk_true;
+ }
+ return nk_false;
+}
+NK_API int
+nk_contextual_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type symbol,
+ const char *text, nk_flags align)
+{
+ return nk_contextual_item_symbol_text(ctx, symbol, text, nk_strlen(text), align);
+}
+NK_API void
+nk_contextual_close(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
+ nk_popup_close(ctx);
+}
+NK_API void
+nk_contextual_end(struct nk_context *ctx)
+{
+ struct nk_window *popup;
+ struct nk_panel *panel;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return;
+
+ popup = ctx->current;
+ panel = popup->layout;
+ NK_ASSERT(popup->parent);
+ NK_ASSERT(panel->type & NK_PANEL_SET_POPUP);
+ if (panel->flags & NK_WINDOW_DYNAMIC) {
+ /* Close behavior
+ This is a bit of a hack solution since we do not know before we end our popup
+ how big it will be. We therefore do not directly know when a
+ click outside the non-blocking popup must close it at that direct frame.
+ Instead it will be closed in the next frame.*/
+ struct nk_rect body = {0,0,0,0};
+ if (panel->at_y < (panel->bounds.y + panel->bounds.h)) {
+ struct nk_vec2 padding = nk_panel_get_padding(&ctx->style, panel->type);
+ body = panel->bounds;
+ body.y = (panel->at_y + panel->footer_height + panel->border + padding.y + panel->row.height);
+ body.h = (panel->bounds.y + panel->bounds.h) - body.y;
+ }
+ {int pressed = nk_input_is_mouse_pressed(&ctx->input, NK_BUTTON_LEFT);
+ int in_body = nk_input_is_mouse_hovering_rect(&ctx->input, body);
+ if (pressed && in_body)
+ popup->flags |= NK_WINDOW_HIDDEN;
+ }
+ }
+ if (popup->flags & NK_WINDOW_HIDDEN)
+ popup->seq = 0;
+ nk_popup_end(ctx);
+ return;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * MENU
+ *
+ * ===============================================================*/
+NK_API void
+nk_menubar_begin(struct nk_context *ctx)
+{
+ struct nk_panel *layout;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ layout = ctx->current->layout;
+ NK_ASSERT(layout->at_y == layout->bounds.y);
+ /* if this assert triggers you allocated space between nk_begin and nk_menubar_begin.
+ If you want a menubar the first nuklear function after `nk_begin` has to be a
+ `nk_menubar_begin` call. Inside the menubar you then have to allocate space for
+ widgets (also supports multiple rows).
+ Example:
+ if (nk_begin(...)) {
+ nk_menubar_begin(...);
+ nk_layout_xxxx(...);
+ nk_button(...);
+ nk_layout_xxxx(...);
+ nk_button(...);
+ nk_menubar_end(...);
+ }
+ nk_end(...);
+ */
+ if (layout->flags & NK_WINDOW_HIDDEN || layout->flags & NK_WINDOW_MINIMIZED)
+ return;
+
+ layout->menu.x = layout->at_x;
+ layout->menu.y = layout->at_y + layout->row.height;
+ layout->menu.w = layout->bounds.w;
+ layout->menu.offset.x = *layout->offset_x;
+ layout->menu.offset.y = *layout->offset_y;
+ *layout->offset_y = 0;
+}
+NK_API void
+nk_menubar_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ struct nk_command_buffer *out;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ out = &win->buffer;
+ layout = win->layout;
+ if (layout->flags & NK_WINDOW_HIDDEN || layout->flags & NK_WINDOW_MINIMIZED)
+ return;
+
+ layout->menu.h = layout->at_y - layout->menu.y;
+ layout->bounds.y += layout->menu.h + ctx->style.window.spacing.y + layout->row.height;
+ layout->bounds.h -= layout->menu.h + ctx->style.window.spacing.y + layout->row.height;
+
+ *layout->offset_x = layout->menu.offset.x;
+ *layout->offset_y = layout->menu.offset.y;
+ layout->at_y = layout->bounds.y - layout->row.height;
+
+ layout->clip.y = layout->bounds.y;
+ layout->clip.h = layout->bounds.h;
+ nk_push_scissor(out, layout->clip);
+}
+NK_INTERN int
+nk_menu_begin(struct nk_context *ctx, struct nk_window *win,
+ const char *id, int is_clicked, struct nk_rect header, struct nk_vec2 size)
+{
+ int is_open = 0;
+ int is_active = 0;
+ struct nk_rect body;
+ struct nk_window *popup;
+ nk_hash hash = nk_murmur_hash(id, (int)nk_strlen(id), NK_PANEL_MENU);
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ body.x = header.x;
+ body.w = size.x;
+ body.y = header.y + header.h;
+ body.h = size.y;
+
+ popup = win->popup.win;
+ is_open = popup ? nk_true : nk_false;
+ is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_MENU);
+ if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||
+ (!is_open && !is_active && !is_clicked)) return 0;
+ if (!nk_nonblock_begin(ctx, NK_WINDOW_NO_SCROLLBAR, body, header, NK_PANEL_MENU))
+ return 0;
+
+ win->popup.type = NK_PANEL_MENU;
+ win->popup.name = hash;
+ return 1;
+}
+NK_API int
+nk_menu_begin_text(struct nk_context *ctx, const char *title, int len,
+ nk_flags align, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ const struct nk_input *in;
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ nk_flags state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ state = nk_widget(&header, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || win->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_text(&ctx->last_widget_state, &win->buffer, header,
+ title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in, ctx->style.font))
+ is_clicked = nk_true;
+ return nk_menu_begin(ctx, win, title, is_clicked, header, size);
+}
+NK_API int nk_menu_begin_label(struct nk_context *ctx,
+ const char *text, nk_flags align, struct nk_vec2 size)
+{
+ return nk_menu_begin_text(ctx, text, nk_strlen(text), align, size);
+}
+NK_API int
+nk_menu_begin_image(struct nk_context *ctx, const char *id, struct nk_image img,
+ struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_rect header;
+ const struct nk_input *in;
+ int is_clicked = nk_false;
+ nk_flags state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ state = nk_widget(&header, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_image(&ctx->last_widget_state, &win->buffer, header,
+ img, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in))
+ is_clicked = nk_true;
+ return nk_menu_begin(ctx, win, id, is_clicked, header, size);
+}
+NK_API int
+nk_menu_begin_symbol(struct nk_context *ctx, const char *id,
+ enum nk_symbol_type sym, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ const struct nk_input *in;
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ nk_flags state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ state = nk_widget(&header, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_symbol(&ctx->last_widget_state, &win->buffer, header,
+ sym, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in, ctx->style.font))
+ is_clicked = nk_true;
+ return nk_menu_begin(ctx, win, id, is_clicked, header, size);
+}
+NK_API int
+nk_menu_begin_image_text(struct nk_context *ctx, const char *title, int len,
+ nk_flags align, struct nk_image img, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_rect header;
+ const struct nk_input *in;
+ int is_clicked = nk_false;
+ nk_flags state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ state = nk_widget(&header, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_text_image(&ctx->last_widget_state, &win->buffer,
+ header, img, title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button,
+ ctx->style.font, in))
+ is_clicked = nk_true;
+ return nk_menu_begin(ctx, win, title, is_clicked, header, size);
+}
+NK_API int
+nk_menu_begin_image_label(struct nk_context *ctx,
+ const char *title, nk_flags align, struct nk_image img, struct nk_vec2 size)
+{
+ return nk_menu_begin_image_text(ctx, title, nk_strlen(title), align, img, size);
+}
+NK_API int
+nk_menu_begin_symbol_text(struct nk_context *ctx, const char *title, int len,
+ nk_flags align, enum nk_symbol_type sym, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_rect header;
+ const struct nk_input *in;
+ int is_clicked = nk_false;
+ nk_flags state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ state = nk_widget(&header, ctx);
+ if (!state) return 0;
+
+ in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ if (nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer,
+ header, sym, title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button,
+ ctx->style.font, in)) is_clicked = nk_true;
+ return nk_menu_begin(ctx, win, title, is_clicked, header, size);
+}
+NK_API int
+nk_menu_begin_symbol_label(struct nk_context *ctx,
+ const char *title, nk_flags align, enum nk_symbol_type sym, struct nk_vec2 size )
+{
+ return nk_menu_begin_symbol_text(ctx, title, nk_strlen(title), align,sym,size);
+}
+NK_API int
+nk_menu_item_text(struct nk_context *ctx, const char *title, int len, nk_flags align)
+{
+ return nk_contextual_item_text(ctx, title, len, align);
+}
+NK_API int
+nk_menu_item_label(struct nk_context *ctx, const char *label, nk_flags align)
+{
+ return nk_contextual_item_label(ctx, label, align);
+}
+NK_API int
+nk_menu_item_image_label(struct nk_context *ctx, struct nk_image img,
+ const char *label, nk_flags align)
+{
+ return nk_contextual_item_image_label(ctx, img, label, align);
+}
+NK_API int
+nk_menu_item_image_text(struct nk_context *ctx, struct nk_image img,
+ const char *text, int len, nk_flags align)
+{
+ return nk_contextual_item_image_text(ctx, img, text, len, align);
+}
+NK_API int nk_menu_item_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *text, int len, nk_flags align)
+{
+ return nk_contextual_item_symbol_text(ctx, sym, text, len, align);
+}
+NK_API int nk_menu_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *label, nk_flags align)
+{
+ return nk_contextual_item_symbol_label(ctx, sym, label, align);
+}
+NK_API void nk_menu_close(struct nk_context *ctx)
+{
+ nk_contextual_close(ctx);
+}
+NK_API void
+nk_menu_end(struct nk_context *ctx)
+{
+ nk_contextual_end(ctx);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * LAYOUT
+ *
+ * ===============================================================*/
+NK_API void
+nk_layout_set_min_row_height(struct nk_context *ctx, float height)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ layout->row.min_height = height;
+}
+NK_API void
+nk_layout_reset_min_row_height(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ layout->row.min_height = ctx->style.font->height;
+ layout->row.min_height += ctx->style.text.padding.y*2;
+ layout->row.min_height += ctx->style.window.min_row_height_padding*2;
+}
+NK_LIB float
+nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type,
+ float total_space, int columns)
+{
+ float panel_padding;
+ float panel_spacing;
+ float panel_space;
+
+ struct nk_vec2 spacing;
+ struct nk_vec2 padding;
+
+ spacing = style->window.spacing;
+ padding = nk_panel_get_padding(style, type);
+
+ /* calculate the usable panel space */
+ panel_padding = 2 * padding.x;
+ panel_spacing = (float)NK_MAX(columns - 1, 0) * spacing.x;
+ panel_space = total_space - panel_padding - panel_spacing;
+ return panel_space;
+}
+NK_LIB void
+nk_panel_layout(const struct nk_context *ctx, struct nk_window *win,
+ float height, int cols)
+{
+ struct nk_panel *layout;
+ const struct nk_style *style;
+ struct nk_command_buffer *out;
+
+ struct nk_vec2 item_spacing;
+ struct nk_color color;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ /* prefetch some configuration data */
+ layout = win->layout;
+ style = &ctx->style;
+ out = &win->buffer;
+ color = style->window.background;
+ item_spacing = style->window.spacing;
+
+ /* if one of these triggers you forgot to add an `if` condition around either
+ a window, group, popup, combobox or contextual menu `begin` and `end` block.
+ Example:
+ if (nk_begin(...) {...} nk_end(...); or
+ if (nk_group_begin(...) { nk_group_end(...);} */
+ NK_ASSERT(!(layout->flags & NK_WINDOW_MINIMIZED));
+ NK_ASSERT(!(layout->flags & NK_WINDOW_HIDDEN));
+ NK_ASSERT(!(layout->flags & NK_WINDOW_CLOSED));
+
+ /* update the current row and set the current row layout */
+ layout->row.index = 0;
+ layout->at_y += layout->row.height;
+ layout->row.columns = cols;
+ if (height == 0.0f)
+ layout->row.height = NK_MAX(height, layout->row.min_height) + item_spacing.y;
+ else layout->row.height = height + item_spacing.y;
+
+ layout->row.item_offset = 0;
+ if (layout->flags & NK_WINDOW_DYNAMIC) {
+ /* draw background for dynamic panels */
+ struct nk_rect background;
+ background.x = win->bounds.x;
+ background.w = win->bounds.w;
+ background.y = layout->at_y - 1.0f;
+ background.h = layout->row.height + 1.0f;
+ nk_fill_rect(out, background, 0, color);
+ }
+}
+NK_LIB void
+nk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt,
+ float height, int cols, int width)
+{
+ /* update the current row and set the current row layout */
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ nk_panel_layout(ctx, win, height, cols);
+ if (fmt == NK_DYNAMIC)
+ win->layout->row.type = NK_LAYOUT_DYNAMIC_FIXED;
+ else win->layout->row.type = NK_LAYOUT_STATIC_FIXED;
+
+ win->layout->row.ratio = 0;
+ win->layout->row.filled = 0;
+ win->layout->row.item_offset = 0;
+ win->layout->row.item_width = (float)width;
+}
+NK_API float
+nk_layout_ratio_from_pixel(struct nk_context *ctx, float pixel_width)
+{
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ NK_ASSERT(pixel_width);
+ if (!ctx || !ctx->current || !ctx->current->layout) return 0;
+ win = ctx->current;
+ return NK_CLAMP(0.0f, pixel_width/win->bounds.x, 1.0f);
+}
+NK_API void
+nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols)
+{
+ nk_row_layout(ctx, NK_DYNAMIC, height, cols, 0);
+}
+NK_API void
+nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols)
+{
+ nk_row_layout(ctx, NK_STATIC, height, cols, item_width);
+}
+NK_API void
+nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt,
+ float row_height, int cols)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ nk_panel_layout(ctx, win, row_height, cols);
+ if (fmt == NK_DYNAMIC)
+ layout->row.type = NK_LAYOUT_DYNAMIC_ROW;
+ else layout->row.type = NK_LAYOUT_STATIC_ROW;
+
+ layout->row.ratio = 0;
+ layout->row.filled = 0;
+ layout->row.item_width = 0;
+ layout->row.item_offset = 0;
+ layout->row.columns = cols;
+}
+NK_API void
+nk_layout_row_push(struct nk_context *ctx, float ratio_or_width)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ NK_ASSERT(layout->row.type == NK_LAYOUT_STATIC_ROW || layout->row.type == NK_LAYOUT_DYNAMIC_ROW);
+ if (layout->row.type != NK_LAYOUT_STATIC_ROW && layout->row.type != NK_LAYOUT_DYNAMIC_ROW)
+ return;
+
+ if (layout->row.type == NK_LAYOUT_DYNAMIC_ROW) {
+ float ratio = ratio_or_width;
+ if ((ratio + layout->row.filled) > 1.0f) return;
+ if (ratio > 0.0f)
+ layout->row.item_width = NK_SATURATE(ratio);
+ else layout->row.item_width = 1.0f - layout->row.filled;
+ } else layout->row.item_width = ratio_or_width;
+}
+NK_API void
+nk_layout_row_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ NK_ASSERT(layout->row.type == NK_LAYOUT_STATIC_ROW || layout->row.type == NK_LAYOUT_DYNAMIC_ROW);
+ if (layout->row.type != NK_LAYOUT_STATIC_ROW && layout->row.type != NK_LAYOUT_DYNAMIC_ROW)
+ return;
+ layout->row.item_width = 0;
+ layout->row.item_offset = 0;
+}
+NK_API void
+nk_layout_row(struct nk_context *ctx, enum nk_layout_format fmt,
+ float height, int cols, const float *ratio)
+{
+ int i;
+ int n_undef = 0;
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ nk_panel_layout(ctx, win, height, cols);
+ if (fmt == NK_DYNAMIC) {
+ /* calculate width of undefined widget ratios */
+ float r = 0;
+ layout->row.ratio = ratio;
+ for (i = 0; i < cols; ++i) {
+ if (ratio[i] < 0.0f)
+ n_undef++;
+ else r += ratio[i];
+ }
+ r = NK_SATURATE(1.0f - r);
+ layout->row.type = NK_LAYOUT_DYNAMIC;
+ layout->row.item_width = (r > 0 && n_undef > 0) ? (r / (float)n_undef):0;
+ } else {
+ layout->row.ratio = ratio;
+ layout->row.type = NK_LAYOUT_STATIC;
+ layout->row.item_width = 0;
+ layout->row.item_offset = 0;
+ }
+ layout->row.item_offset = 0;
+ layout->row.filled = 0;
+}
+NK_API void
+nk_layout_row_template_begin(struct nk_context *ctx, float height)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ nk_panel_layout(ctx, win, height, 1);
+ layout->row.type = NK_LAYOUT_TEMPLATE;
+ layout->row.columns = 0;
+ layout->row.ratio = 0;
+ layout->row.item_width = 0;
+ layout->row.item_height = 0;
+ layout->row.item_offset = 0;
+ layout->row.filled = 0;
+ layout->row.item.x = 0;
+ layout->row.item.y = 0;
+ layout->row.item.w = 0;
+ layout->row.item.h = 0;
+}
+NK_API void
+nk_layout_row_template_push_dynamic(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
+ NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
+ if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
+ if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;
+ layout->row.templates[layout->row.columns++] = -1.0f;
+}
+NK_API void
+nk_layout_row_template_push_variable(struct nk_context *ctx, float min_width)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
+ NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
+ if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
+ if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;
+ layout->row.templates[layout->row.columns++] = -min_width;
+}
+NK_API void
+nk_layout_row_template_push_static(struct nk_context *ctx, float width)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
+ NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
+ if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
+ if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;
+ layout->row.templates[layout->row.columns++] = width;
+}
+NK_API void
+nk_layout_row_template_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ int i = 0;
+ int variable_count = 0;
+ int min_variable_count = 0;
+ float min_fixed_width = 0.0f;
+ float total_fixed_width = 0.0f;
+ float max_variable_width = 0.0f;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
+ if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
+ for (i = 0; i < layout->row.columns; ++i) {
+ float width = layout->row.templates[i];
+ if (width >= 0.0f) {
+ total_fixed_width += width;
+ min_fixed_width += width;
+ } else if (width < -1.0f) {
+ width = -width;
+ total_fixed_width += width;
+ max_variable_width = NK_MAX(max_variable_width, width);
+ variable_count++;
+ } else {
+ min_variable_count++;
+ variable_count++;
+ }
+ }
+ if (variable_count) {
+ float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,
+ layout->bounds.w, layout->row.columns);
+ float var_width = (NK_MAX(space-min_fixed_width,0.0f)) / (float)variable_count;
+ int enough_space = var_width >= max_variable_width;
+ if (!enough_space)
+ var_width = (NK_MAX(space-total_fixed_width,0)) / (float)min_variable_count;
+ for (i = 0; i < layout->row.columns; ++i) {
+ float *width = &layout->row.templates[i];
+ *width = (*width >= 0.0f)? *width: (*width < -1.0f && !enough_space)? -(*width): var_width;
+ }
+ }
+}
+NK_API void
+nk_layout_space_begin(struct nk_context *ctx, enum nk_layout_format fmt,
+ float height, int widget_count)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ nk_panel_layout(ctx, win, height, widget_count);
+ if (fmt == NK_STATIC)
+ layout->row.type = NK_LAYOUT_STATIC_FREE;
+ else layout->row.type = NK_LAYOUT_DYNAMIC_FREE;
+
+ layout->row.ratio = 0;
+ layout->row.filled = 0;
+ layout->row.item_width = 0;
+ layout->row.item_offset = 0;
+}
+NK_API void
+nk_layout_space_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ layout->row.item_width = 0;
+ layout->row.item_height = 0;
+ layout->row.item_offset = 0;
+ nk_zero(&layout->row.item, sizeof(layout->row.item));
+}
+NK_API void
+nk_layout_space_push(struct nk_context *ctx, struct nk_rect rect)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ layout->row.item = rect;
+}
+NK_API struct nk_rect
+nk_layout_space_bounds(struct nk_context *ctx)
+{
+ struct nk_rect ret;
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ win = ctx->current;
+ layout = win->layout;
+
+ ret.x = layout->clip.x;
+ ret.y = layout->clip.y;
+ ret.w = layout->clip.w;
+ ret.h = layout->row.height;
+ return ret;
+}
+NK_API struct nk_rect
+nk_layout_widget_bounds(struct nk_context *ctx)
+{
+ struct nk_rect ret;
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ win = ctx->current;
+ layout = win->layout;
+
+ ret.x = layout->at_x;
+ ret.y = layout->at_y;
+ ret.w = layout->bounds.w - NK_MAX(layout->at_x - layout->bounds.x,0);
+ ret.h = layout->row.height;
+ return ret;
+}
+NK_API struct nk_vec2
+nk_layout_space_to_screen(struct nk_context *ctx, struct nk_vec2 ret)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ win = ctx->current;
+ layout = win->layout;
+
+ ret.x += layout->at_x - (float)*layout->offset_x;
+ ret.y += layout->at_y - (float)*layout->offset_y;
+ return ret;
+}
+NK_API struct nk_vec2
+nk_layout_space_to_local(struct nk_context *ctx, struct nk_vec2 ret)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ win = ctx->current;
+ layout = win->layout;
+
+ ret.x += -layout->at_x + (float)*layout->offset_x;
+ ret.y += -layout->at_y + (float)*layout->offset_y;
+ return ret;
+}
+NK_API struct nk_rect
+nk_layout_space_rect_to_screen(struct nk_context *ctx, struct nk_rect ret)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ win = ctx->current;
+ layout = win->layout;
+
+ ret.x += layout->at_x - (float)*layout->offset_x;
+ ret.y += layout->at_y - (float)*layout->offset_y;
+ return ret;
+}
+NK_API struct nk_rect
+nk_layout_space_rect_to_local(struct nk_context *ctx, struct nk_rect ret)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ win = ctx->current;
+ layout = win->layout;
+
+ ret.x += -layout->at_x + (float)*layout->offset_x;
+ ret.y += -layout->at_y + (float)*layout->offset_y;
+ return ret;
+}
+NK_LIB void
+nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win)
+{
+ struct nk_panel *layout = win->layout;
+ struct nk_vec2 spacing = ctx->style.window.spacing;
+ const float row_height = layout->row.height - spacing.y;
+ nk_panel_layout(ctx, win, row_height, layout->row.columns);
+}
+NK_LIB void
+nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx,
+ struct nk_window *win, int modify)
+{
+ struct nk_panel *layout;
+ const struct nk_style *style;
+
+ struct nk_vec2 spacing;
+ struct nk_vec2 padding;
+
+ float item_offset = 0;
+ float item_width = 0;
+ float item_spacing = 0;
+ float panel_space = 0;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ style = &ctx->style;
+ NK_ASSERT(bounds);
+
+ spacing = style->window.spacing;
+ padding = nk_panel_get_padding(style, layout->type);
+ panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,
+ layout->bounds.w, layout->row.columns);
+
+ /* calculate the width of one item inside the current layout space */
+ switch (layout->row.type) {
+ case NK_LAYOUT_DYNAMIC_FIXED: {
+ /* scaling fixed size widgets item width */
+ item_width = NK_MAX(1.0f,panel_space) / (float)layout->row.columns;
+ item_offset = (float)layout->row.index * item_width;
+ item_spacing = (float)layout->row.index * spacing.x;
+ } break;
+ case NK_LAYOUT_DYNAMIC_ROW: {
+ /* scaling single ratio widget width */
+ item_width = layout->row.item_width * panel_space;
+ item_offset = layout->row.item_offset;
+ item_spacing = 0;
+
+ if (modify) {
+ layout->row.item_offset += item_width + spacing.x;
+ layout->row.filled += layout->row.item_width;
+ layout->row.index = 0;
+ }
+ } break;
+ case NK_LAYOUT_DYNAMIC_FREE: {
+ /* panel width depended free widget placing */
+ bounds->x = layout->at_x + (layout->bounds.w * layout->row.item.x);
+ bounds->x -= (float)*layout->offset_x;
+ bounds->y = layout->at_y + (layout->row.height * layout->row.item.y);
+ bounds->y -= (float)*layout->offset_y;
+ bounds->w = layout->bounds.w * layout->row.item.w;
+ bounds->h = layout->row.height * layout->row.item.h;
+ return;
+ }
+ case NK_LAYOUT_DYNAMIC: {
+ /* scaling arrays of panel width ratios for every widget */
+ float ratio;
+ NK_ASSERT(layout->row.ratio);
+ ratio = (layout->row.ratio[layout->row.index] < 0) ?
+ layout->row.item_width : layout->row.ratio[layout->row.index];
+
+ item_spacing = (float)layout->row.index * spacing.x;
+ item_width = (ratio * panel_space);
+ item_offset = layout->row.item_offset;
+
+ if (modify) {
+ layout->row.item_offset += item_width;
+ layout->row.filled += ratio;
+ }
+ } break;
+ case NK_LAYOUT_STATIC_FIXED: {
+ /* non-scaling fixed widgets item width */
+ item_width = layout->row.item_width;
+ item_offset = (float)layout->row.index * item_width;
+ item_spacing = (float)layout->row.index * spacing.x;
+ } break;
+ case NK_LAYOUT_STATIC_ROW: {
+ /* scaling single ratio widget width */
+ item_width = layout->row.item_width;
+ item_offset = layout->row.item_offset;
+ item_spacing = (float)layout->row.index * spacing.x;
+ if (modify) layout->row.item_offset += item_width;
+ } break;
+ case NK_LAYOUT_STATIC_FREE: {
+ /* free widget placing */
+ bounds->x = layout->at_x + layout->row.item.x;
+ bounds->w = layout->row.item.w;
+ if (((bounds->x + bounds->w) > layout->max_x) && modify)
+ layout->max_x = (bounds->x + bounds->w);
+ bounds->x -= (float)*layout->offset_x;
+ bounds->y = layout->at_y + layout->row.item.y;
+ bounds->y -= (float)*layout->offset_y;
+ bounds->h = layout->row.item.h;
+ return;
+ }
+ case NK_LAYOUT_STATIC: {
+ /* non-scaling array of panel pixel width for every widget */
+ item_spacing = (float)layout->row.index * spacing.x;
+ item_width = layout->row.ratio[layout->row.index];
+ item_offset = layout->row.item_offset;
+ if (modify) layout->row.item_offset += item_width;
+ } break;
+ case NK_LAYOUT_TEMPLATE: {
+ /* stretchy row layout with combined dynamic/static widget width*/
+ NK_ASSERT(layout->row.index < layout->row.columns);
+ NK_ASSERT(layout->row.index < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
+ item_width = layout->row.templates[layout->row.index];
+ item_offset = layout->row.item_offset;
+ item_spacing = (float)layout->row.index * spacing.x;
+ if (modify) layout->row.item_offset += item_width;
+ } break;
+ default: NK_ASSERT(0); break;
+ };
+
+ /* set the bounds of the newly allocated widget */
+ bounds->w = item_width;
+ bounds->h = layout->row.height - spacing.y;
+ bounds->y = layout->at_y - (float)*layout->offset_y;
+ bounds->x = layout->at_x + item_offset + item_spacing + padding.x;
+ if (((bounds->x + bounds->w) > layout->max_x) && modify)
+ layout->max_x = bounds->x + bounds->w;
+ bounds->x -= (float)*layout->offset_x;
+}
+NK_LIB void
+nk_panel_alloc_space(struct nk_rect *bounds, const struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ /* check if the end of the row has been hit and begin new row if so */
+ win = ctx->current;
+ layout = win->layout;
+ if (layout->row.index >= layout->row.columns)
+ nk_panel_alloc_row(ctx, win);
+
+ /* calculate widget position and size */
+ nk_layout_widget_space(bounds, ctx, win, nk_true);
+ layout->row.index++;
+}
+NK_LIB void
+nk_layout_peek(struct nk_rect *bounds, struct nk_context *ctx)
+{
+ float y;
+ int index;
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ y = layout->at_y;
+ index = layout->row.index;
+ if (layout->row.index >= layout->row.columns) {
+ layout->at_y += layout->row.height;
+ layout->row.index = 0;
+ }
+ nk_layout_widget_space(bounds, ctx, win, nk_false);
+ if (!layout->row.index) {
+ bounds->x -= layout->row.item_offset;
+ }
+ layout->at_y = y;
+ layout->row.index = index;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * TREE
+ *
+ * ===============================================================*/
+NK_INTERN int
+nk_tree_state_base(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image *img, const char *title, enum nk_collapse_states *state)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_style *style;
+ struct nk_command_buffer *out;
+ const struct nk_input *in;
+ const struct nk_style_button *button;
+ enum nk_symbol_type symbol;
+ float row_height;
+
+ struct nk_vec2 item_spacing;
+ struct nk_rect header = {0,0,0,0};
+ struct nk_rect sym = {0,0,0,0};
+ struct nk_text text;
+
+ nk_flags ws = 0;
+ enum nk_widget_layout_states widget_state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ /* cache some data */
+ win = ctx->current;
+ layout = win->layout;
+ out = &win->buffer;
+ style = &ctx->style;
+ item_spacing = style->window.spacing;
+
+ /* calculate header bounds and draw background */
+ row_height = style->font->height + 2 * style->tab.padding.y;
+ nk_layout_set_min_row_height(ctx, row_height);
+ nk_layout_row_dynamic(ctx, row_height, 1);
+ nk_layout_reset_min_row_height(ctx);
+
+ widget_state = nk_widget(&header, ctx);
+ if (type == NK_TREE_TAB) {
+ const struct nk_style_item *background = &style->tab.background;
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(out, header, &background->data.image, nk_white);
+ text.background = nk_rgba(0,0,0,0);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(out, header, 0, style->tab.border_color);
+ nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
+ style->tab.rounding, background->data.color);
+ }
+ } else text.background = style->window.background;
+
+ /* update node state */
+ in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0;
+ in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0;
+ if (nk_button_behavior(&ws, header, in, NK_BUTTON_DEFAULT))
+ *state = (*state == NK_MAXIMIZED) ? NK_MINIMIZED : NK_MAXIMIZED;
+
+ /* select correct button style */
+ if (*state == NK_MAXIMIZED) {
+ symbol = style->tab.sym_maximize;
+ if (type == NK_TREE_TAB)
+ button = &style->tab.tab_maximize_button;
+ else button = &style->tab.node_maximize_button;
+ } else {
+ symbol = style->tab.sym_minimize;
+ if (type == NK_TREE_TAB)
+ button = &style->tab.tab_minimize_button;
+ else button = &style->tab.node_minimize_button;
+ }
+
+ {/* draw triangle button */
+ sym.w = sym.h = style->font->height;
+ sym.y = header.y + style->tab.padding.y;
+ sym.x = header.x + style->tab.padding.x;
+ nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT,
+ button, 0, style->font);
+
+ if (img) {
+ /* draw optional image icon */
+ sym.x = sym.x + sym.w + 4 * item_spacing.x;
+ nk_draw_image(&win->buffer, sym, img, nk_white);
+ sym.w = style->font->height + style->tab.spacing.x;}
+ }
+
+ {/* draw label */
+ struct nk_rect label;
+ header.w = NK_MAX(header.w, sym.w + item_spacing.x);
+ label.x = sym.x + sym.w + item_spacing.x;
+ label.y = sym.y;
+ label.w = header.w - (sym.w + item_spacing.y + style->tab.indent);
+ label.h = style->font->height;
+ text.text = style->tab.text;
+ text.padding = nk_vec2(0,0);
+ nk_widget_text(out, label, title, nk_strlen(title), &text,
+ NK_TEXT_LEFT, style->font);}
+
+ /* increase x-axis cursor widget position pointer */
+ if (*state == NK_MAXIMIZED) {
+ layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;
+ layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);
+ layout->bounds.w -= (style->tab.indent + style->window.padding.x);
+ layout->row.tree_depth++;
+ return nk_true;
+ } else return nk_false;
+}
+NK_INTERN int
+nk_tree_base(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image *img, const char *title, enum nk_collapse_states initial_state,
+ const char *hash, int len, int line)
+{
+ struct nk_window *win = ctx->current;
+ int title_len = 0;
+ nk_hash tree_hash = 0;
+ nk_uint *state = 0;
+
+ /* retrieve tree state from internal widget state tables */
+ if (!hash) {
+ title_len = (int)nk_strlen(title);
+ tree_hash = nk_murmur_hash(title, (int)title_len, (nk_hash)line);
+ } else tree_hash = nk_murmur_hash(hash, len, (nk_hash)line);
+ state = nk_find_value(win, tree_hash);
+ if (!state) {
+ state = nk_add_value(ctx, win, tree_hash, 0);
+ *state = initial_state;
+ }
+ return nk_tree_state_base(ctx, type, img, title, (enum nk_collapse_states*)state);
+}
+NK_API int
+nk_tree_state_push(struct nk_context *ctx, enum nk_tree_type type,
+ const char *title, enum nk_collapse_states *state)
+{
+ return nk_tree_state_base(ctx, type, 0, title, state);
+}
+NK_API int
+nk_tree_state_image_push(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image img, const char *title, enum nk_collapse_states *state)
+{
+ return nk_tree_state_base(ctx, type, &img, title, state);
+}
+NK_API void
+nk_tree_state_pop(struct nk_context *ctx)
+{
+ struct nk_window *win = 0;
+ struct nk_panel *layout = 0;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ layout->at_x -= ctx->style.tab.indent + ctx->style.window.padding.x;
+ layout->bounds.w += ctx->style.tab.indent + ctx->style.window.padding.x;
+ NK_ASSERT(layout->row.tree_depth);
+ layout->row.tree_depth--;
+}
+NK_API int
+nk_tree_push_hashed(struct nk_context *ctx, enum nk_tree_type type,
+ const char *title, enum nk_collapse_states initial_state,
+ const char *hash, int len, int line)
+{
+ return nk_tree_base(ctx, type, 0, title, initial_state, hash, len, line);
+}
+NK_API int
+nk_tree_image_push_hashed(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image img, const char *title, enum nk_collapse_states initial_state,
+ const char *hash, int len,int seed)
+{
+ return nk_tree_base(ctx, type, &img, title, initial_state, hash, len, seed);
+}
+NK_API void
+nk_tree_pop(struct nk_context *ctx)
+{
+ nk_tree_state_pop(ctx);
+}
+NK_INTERN int
+nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image *img, const char *title, int title_len,
+ enum nk_collapse_states *state, int *selected)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_style *style;
+ struct nk_command_buffer *out;
+ const struct nk_input *in;
+ const struct nk_style_button *button;
+ enum nk_symbol_type symbol;
+ float row_height;
+ struct nk_vec2 padding;
+
+ int text_len;
+ float text_width;
+
+ struct nk_vec2 item_spacing;
+ struct nk_rect header = {0,0,0,0};
+ struct nk_rect sym = {0,0,0,0};
+ struct nk_text text;
+
+ nk_flags ws = 0;
+ enum nk_widget_layout_states widget_state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ /* cache some data */
+ win = ctx->current;
+ layout = win->layout;
+ out = &win->buffer;
+ style = &ctx->style;
+ item_spacing = style->window.spacing;
+ padding = style->selectable.padding;
+
+ /* calculate header bounds and draw background */
+ row_height = style->font->height + 2 * style->tab.padding.y;
+ nk_layout_set_min_row_height(ctx, row_height);
+ nk_layout_row_dynamic(ctx, row_height, 1);
+ nk_layout_reset_min_row_height(ctx);
+
+ widget_state = nk_widget(&header, ctx);
+ if (type == NK_TREE_TAB) {
+ const struct nk_style_item *background = &style->tab.background;
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(out, header, &background->data.image, nk_white);
+ text.background = nk_rgba(0,0,0,0);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(out, header, 0, style->tab.border_color);
+ nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
+ style->tab.rounding, background->data.color);
+ }
+ } else text.background = style->window.background;
+
+ in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0;
+ in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0;
+
+ /* select correct button style */
+ if (*state == NK_MAXIMIZED) {
+ symbol = style->tab.sym_maximize;
+ if (type == NK_TREE_TAB)
+ button = &style->tab.tab_maximize_button;
+ else button = &style->tab.node_maximize_button;
+ } else {
+ symbol = style->tab.sym_minimize;
+ if (type == NK_TREE_TAB)
+ button = &style->tab.tab_minimize_button;
+ else button = &style->tab.node_minimize_button;
+ }
+ {/* draw triangle button */
+ sym.w = sym.h = style->font->height;
+ sym.y = header.y + style->tab.padding.y;
+ sym.x = header.x + style->tab.padding.x;
+ if (nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT, button, in, style->font))
+ *state = (*state == NK_MAXIMIZED) ? NK_MINIMIZED : NK_MAXIMIZED;}
+
+ /* draw label */
+ {nk_flags dummy = 0;
+ struct nk_rect label;
+ /* calculate size of the text and tooltip */
+ text_len = nk_strlen(title);
+ text_width = style->font->width(style->font->userdata, style->font->height, title, text_len);
+ text_width += (4 * padding.x);
+
+ header.w = NK_MAX(header.w, sym.w + item_spacing.x);
+ label.x = sym.x + sym.w + item_spacing.x;
+ label.y = sym.y;
+ label.w = NK_MIN(header.w - (sym.w + item_spacing.y + style->tab.indent), text_width);
+ label.h = style->font->height;
+
+ if (img) {
+ nk_do_selectable_image(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,
+ selected, img, &style->selectable, in, style->font);
+ } else nk_do_selectable(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,
+ selected, &style->selectable, in, style->font);
+ }
+ /* increase x-axis cursor widget position pointer */
+ if (*state == NK_MAXIMIZED) {
+ layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;
+ layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);
+ layout->bounds.w -= (style->tab.indent + style->window.padding.x);
+ layout->row.tree_depth++;
+ return nk_true;
+ } else return nk_false;
+}
+NK_INTERN int
+nk_tree_element_base(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image *img, const char *title, enum nk_collapse_states initial_state,
+ int *selected, const char *hash, int len, int line)
+{
+ struct nk_window *win = ctx->current;
+ int title_len = 0;
+ nk_hash tree_hash = 0;
+ nk_uint *state = 0;
+
+ /* retrieve tree state from internal widget state tables */
+ if (!hash) {
+ title_len = (int)nk_strlen(title);
+ tree_hash = nk_murmur_hash(title, (int)title_len, (nk_hash)line);
+ } else tree_hash = nk_murmur_hash(hash, len, (nk_hash)line);
+ state = nk_find_value(win, tree_hash);
+ if (!state) {
+ state = nk_add_value(ctx, win, tree_hash, 0);
+ *state = initial_state;
+ } return nk_tree_element_image_push_hashed_base(ctx, type, img, title,
+ nk_strlen(title), (enum nk_collapse_states*)state, selected);
+}
+NK_API int
+nk_tree_element_push_hashed(struct nk_context *ctx, enum nk_tree_type type,
+ const char *title, enum nk_collapse_states initial_state,
+ int *selected, const char *hash, int len, int seed)
+{
+ return nk_tree_element_base(ctx, type, 0, title, initial_state, selected, hash, len, seed);
+}
+NK_API int
+nk_tree_element_image_push_hashed(struct nk_context *ctx, enum nk_tree_type type,
+ struct nk_image img, const char *title, enum nk_collapse_states initial_state,
+ int *selected, const char *hash, int len,int seed)
+{
+ return nk_tree_element_base(ctx, type, &img, title, initial_state, selected, hash, len, seed);
+}
+NK_API void
+nk_tree_element_pop(struct nk_context *ctx)
+{
+ nk_tree_state_pop(ctx);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * GROUP
+ *
+ * ===============================================================*/
+NK_API int
+nk_group_scrolled_offset_begin(struct nk_context *ctx,
+ nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags)
+{
+ struct nk_rect bounds;
+ struct nk_window panel;
+ struct nk_window *win;
+
+ win = ctx->current;
+ nk_panel_alloc_space(&bounds, ctx);
+ {const struct nk_rect *c = &win->layout->clip;
+ if (!NK_INTERSECT(c->x, c->y, c->w, c->h, bounds.x, bounds.y, bounds.w, bounds.h) &&
+ !(flags & NK_WINDOW_MOVABLE)) {
+ return 0;
+ }}
+ if (win->flags & NK_WINDOW_ROM)
+ flags |= NK_WINDOW_ROM;
+
+ /* initialize a fake window to create the panel from */
+ nk_zero(&panel, sizeof(panel));
+ panel.bounds = bounds;
+ panel.flags = flags;
+ panel.scrollbar.x = *x_offset;
+ panel.scrollbar.y = *y_offset;
+ panel.buffer = win->buffer;
+ panel.layout = (struct nk_panel*)nk_create_panel(ctx);
+ ctx->current = &panel;
+ nk_panel_begin(ctx, (flags & NK_WINDOW_TITLE) ? title: 0, NK_PANEL_GROUP);
+
+ win->buffer = panel.buffer;
+ win->buffer.clip = panel.layout->clip;
+ panel.layout->offset_x = x_offset;
+ panel.layout->offset_y = y_offset;
+ panel.layout->parent = win->layout;
+ win->layout = panel.layout;
+
+ ctx->current = win;
+ if ((panel.layout->flags & NK_WINDOW_CLOSED) ||
+ (panel.layout->flags & NK_WINDOW_MINIMIZED))
+ {
+ nk_flags f = panel.layout->flags;
+ nk_group_scrolled_end(ctx);
+ if (f & NK_WINDOW_CLOSED)
+ return NK_WINDOW_CLOSED;
+ if (f & NK_WINDOW_MINIMIZED)
+ return NK_WINDOW_MINIMIZED;
+ }
+ return 1;
+}
+NK_API void
+nk_group_scrolled_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_panel *parent;
+ struct nk_panel *g;
+
+ struct nk_rect clip;
+ struct nk_window pan;
+ struct nk_vec2 panel_padding;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return;
+
+ /* make sure nk_group_begin was called correctly */
+ NK_ASSERT(ctx->current);
+ win = ctx->current;
+ NK_ASSERT(win->layout);
+ g = win->layout;
+ NK_ASSERT(g->parent);
+ parent = g->parent;
+
+ /* dummy window */
+ nk_zero_struct(pan);
+ panel_padding = nk_panel_get_padding(&ctx->style, NK_PANEL_GROUP);
+ pan.bounds.y = g->bounds.y - (g->header_height + g->menu.h);
+ pan.bounds.x = g->bounds.x - panel_padding.x;
+ pan.bounds.w = g->bounds.w + 2 * panel_padding.x;
+ pan.bounds.h = g->bounds.h + g->header_height + g->menu.h;
+ if (g->flags & NK_WINDOW_BORDER) {
+ pan.bounds.x -= g->border;
+ pan.bounds.y -= g->border;
+ pan.bounds.w += 2*g->border;
+ pan.bounds.h += 2*g->border;
+ }
+ if (!(g->flags & NK_WINDOW_NO_SCROLLBAR)) {
+ pan.bounds.w += ctx->style.window.scrollbar_size.x;
+ pan.bounds.h += ctx->style.window.scrollbar_size.y;
+ }
+ pan.scrollbar.x = *g->offset_x;
+ pan.scrollbar.y = *g->offset_y;
+ pan.flags = g->flags;
+ pan.buffer = win->buffer;
+ pan.layout = g;
+ pan.parent = win;
+ ctx->current = &pan;
+
+ /* make sure group has correct clipping rectangle */
+ nk_unify(&clip, &parent->clip, pan.bounds.x, pan.bounds.y,
+ pan.bounds.x + pan.bounds.w, pan.bounds.y + pan.bounds.h + panel_padding.x);
+ nk_push_scissor(&pan.buffer, clip);
+ nk_end(ctx);
+
+ win->buffer = pan.buffer;
+ nk_push_scissor(&win->buffer, parent->clip);
+ ctx->current = win;
+ win->layout = parent;
+ g->bounds = pan.bounds;
+ return;
+}
+NK_API int
+nk_group_scrolled_begin(struct nk_context *ctx,
+ struct nk_scroll *scroll, const char *title, nk_flags flags)
+{
+ return nk_group_scrolled_offset_begin(ctx, &scroll->x, &scroll->y, title, flags);
+}
+NK_API int
+nk_group_begin_titled(struct nk_context *ctx, const char *id,
+ const char *title, nk_flags flags)
+{
+ int id_len;
+ nk_hash id_hash;
+ struct nk_window *win;
+ nk_uint *x_offset;
+ nk_uint *y_offset;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(id);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !id)
+ return 0;
+
+ /* find persistent group scrollbar value */
+ win = ctx->current;
+ id_len = (int)nk_strlen(id);
+ id_hash = nk_murmur_hash(id, (int)id_len, NK_PANEL_GROUP);
+ x_offset = nk_find_value(win, id_hash);
+ if (!x_offset) {
+ x_offset = nk_add_value(ctx, win, id_hash, 0);
+ y_offset = nk_add_value(ctx, win, id_hash+1, 0);
+
+ NK_ASSERT(x_offset);
+ NK_ASSERT(y_offset);
+ if (!x_offset || !y_offset) return 0;
+ *x_offset = *y_offset = 0;
+ } else y_offset = nk_find_value(win, id_hash+1);
+ return nk_group_scrolled_offset_begin(ctx, x_offset, y_offset, title, flags);
+}
+NK_API int
+nk_group_begin(struct nk_context *ctx, const char *title, nk_flags flags)
+{
+ return nk_group_begin_titled(ctx, title, title, flags);
+}
+NK_API void
+nk_group_end(struct nk_context *ctx)
+{
+ nk_group_scrolled_end(ctx);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * LIST VIEW
+ *
+ * ===============================================================*/
+NK_API int
+nk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view,
+ const char *title, nk_flags flags, int row_height, int row_count)
+{
+ int title_len;
+ nk_hash title_hash;
+ nk_uint *x_offset;
+ nk_uint *y_offset;
+
+ int result;
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_style *style;
+ struct nk_vec2 item_spacing;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(view);
+ NK_ASSERT(title);
+ if (!ctx || !view || !title) return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ item_spacing = style->window.spacing;
+ row_height += NK_MAX(0, (int)item_spacing.y);
+
+ /* find persistent list view scrollbar offset */
+ title_len = (int)nk_strlen(title);
+ title_hash = nk_murmur_hash(title, (int)title_len, NK_PANEL_GROUP);
+ x_offset = nk_find_value(win, title_hash);
+ if (!x_offset) {
+ x_offset = nk_add_value(ctx, win, title_hash, 0);
+ y_offset = nk_add_value(ctx, win, title_hash+1, 0);
+
+ NK_ASSERT(x_offset);
+ NK_ASSERT(y_offset);
+ if (!x_offset || !y_offset) return 0;
+ *x_offset = *y_offset = 0;
+ } else y_offset = nk_find_value(win, title_hash+1);
+ view->scroll_value = *y_offset;
+ view->scroll_pointer = y_offset;
+
+ *y_offset = 0;
+ result = nk_group_scrolled_offset_begin(ctx, x_offset, y_offset, title, flags);
+ win = ctx->current;
+ layout = win->layout;
+
+ view->total_height = row_height * NK_MAX(row_count,1);
+ view->begin = (int)NK_MAX(((float)view->scroll_value / (float)row_height), 0.0f);
+ view->count = (int)NK_MAX(nk_iceilf((layout->clip.h)/(float)row_height),0);
+ view->count = NK_MIN(view->count, row_count - view->begin);
+ view->end = view->begin + view->count;
+ view->ctx = ctx;
+ return result;
+}
+NK_API void
+nk_list_view_end(struct nk_list_view *view)
+{
+ struct nk_context *ctx;
+ struct nk_window *win;
+ struct nk_panel *layout;
+
+ NK_ASSERT(view);
+ NK_ASSERT(view->ctx);
+ NK_ASSERT(view->scroll_pointer);
+ if (!view || !view->ctx) return;
+
+ ctx = view->ctx;
+ win = ctx->current;
+ layout = win->layout;
+ layout->at_y = layout->bounds.y + (float)view->total_height;
+ *view->scroll_pointer = *view->scroll_pointer + view->scroll_value;
+ nk_group_end(view->ctx);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * WIDGET
+ *
+ * ===============================================================*/
+NK_API struct nk_rect
+nk_widget_bounds(struct nk_context *ctx)
+{
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return nk_rect(0,0,0,0);
+ nk_layout_peek(&bounds, ctx);
+ return bounds;
+}
+NK_API struct nk_vec2
+nk_widget_position(struct nk_context *ctx)
+{
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return nk_vec2(0,0);
+
+ nk_layout_peek(&bounds, ctx);
+ return nk_vec2(bounds.x, bounds.y);
+}
+NK_API struct nk_vec2
+nk_widget_size(struct nk_context *ctx)
+{
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return nk_vec2(0,0);
+
+ nk_layout_peek(&bounds, ctx);
+ return nk_vec2(bounds.w, bounds.h);
+}
+NK_API float
+nk_widget_width(struct nk_context *ctx)
+{
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return 0;
+
+ nk_layout_peek(&bounds, ctx);
+ return bounds.w;
+}
+NK_API float
+nk_widget_height(struct nk_context *ctx)
+{
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return 0;
+
+ nk_layout_peek(&bounds, ctx);
+ return bounds.h;
+}
+NK_API int
+nk_widget_is_hovered(struct nk_context *ctx)
+{
+ struct nk_rect c, v;
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current || ctx->active != ctx->current)
+ return 0;
+
+ c = ctx->current->layout->clip;
+ c.x = (float)((int)c.x);
+ c.y = (float)((int)c.y);
+ c.w = (float)((int)c.w);
+ c.h = (float)((int)c.h);
+
+ nk_layout_peek(&bounds, ctx);
+ nk_unify(&v, &c, bounds.x, bounds.y, bounds.x + bounds.w, bounds.y + bounds.h);
+ if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds.x, bounds.y, bounds.w, bounds.h))
+ return 0;
+ return nk_input_is_mouse_hovering_rect(&ctx->input, bounds);
+}
+NK_API int
+nk_widget_is_mouse_clicked(struct nk_context *ctx, enum nk_buttons btn)
+{
+ struct nk_rect c, v;
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current || ctx->active != ctx->current)
+ return 0;
+
+ c = ctx->current->layout->clip;
+ c.x = (float)((int)c.x);
+ c.y = (float)((int)c.y);
+ c.w = (float)((int)c.w);
+ c.h = (float)((int)c.h);
+
+ nk_layout_peek(&bounds, ctx);
+ nk_unify(&v, &c, bounds.x, bounds.y, bounds.x + bounds.w, bounds.y + bounds.h);
+ if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds.x, bounds.y, bounds.w, bounds.h))
+ return 0;
+ return nk_input_mouse_clicked(&ctx->input, btn, bounds);
+}
+NK_API int
+nk_widget_has_mouse_click_down(struct nk_context *ctx, enum nk_buttons btn, int down)
+{
+ struct nk_rect c, v;
+ struct nk_rect bounds;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current || ctx->active != ctx->current)
+ return 0;
+
+ c = ctx->current->layout->clip;
+ c.x = (float)((int)c.x);
+ c.y = (float)((int)c.y);
+ c.w = (float)((int)c.w);
+ c.h = (float)((int)c.h);
+
+ nk_layout_peek(&bounds, ctx);
+ nk_unify(&v, &c, bounds.x, bounds.y, bounds.x + bounds.w, bounds.y + bounds.h);
+ if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds.x, bounds.y, bounds.w, bounds.h))
+ return 0;
+ return nk_input_has_mouse_click_down_in_rect(&ctx->input, btn, bounds, down);
+}
+NK_API enum nk_widget_layout_states
+nk_widget(struct nk_rect *bounds, const struct nk_context *ctx)
+{
+ struct nk_rect c, v;
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return NK_WIDGET_INVALID;
+
+ /* allocate space and check if the widget needs to be updated and drawn */
+ nk_panel_alloc_space(bounds, ctx);
+ win = ctx->current;
+ layout = win->layout;
+ in = &ctx->input;
+ c = layout->clip;
+
+ /* if one of these triggers you forgot to add an `if` condition around either
+ a window, group, popup, combobox or contextual menu `begin` and `end` block.
+ Example:
+ if (nk_begin(...) {...} nk_end(...); or
+ if (nk_group_begin(...) { nk_group_end(...);} */
+ NK_ASSERT(!(layout->flags & NK_WINDOW_MINIMIZED));
+ NK_ASSERT(!(layout->flags & NK_WINDOW_HIDDEN));
+ NK_ASSERT(!(layout->flags & NK_WINDOW_CLOSED));
+
+ /* need to convert to int here to remove floating point errors */
+ bounds->x = (float)((int)bounds->x);
+ bounds->y = (float)((int)bounds->y);
+ bounds->w = (float)((int)bounds->w);
+ bounds->h = (float)((int)bounds->h);
+
+ c.x = (float)((int)c.x);
+ c.y = (float)((int)c.y);
+ c.w = (float)((int)c.w);
+ c.h = (float)((int)c.h);
+
+ nk_unify(&v, &c, bounds->x, bounds->y, bounds->x + bounds->w, bounds->y + bounds->h);
+ if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds->x, bounds->y, bounds->w, bounds->h))
+ return NK_WIDGET_INVALID;
+ if (!NK_INBOX(in->mouse.pos.x, in->mouse.pos.y, v.x, v.y, v.w, v.h))
+ return NK_WIDGET_ROM;
+ return NK_WIDGET_VALID;
+}
+NK_API enum nk_widget_layout_states
+nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx,
+ struct nk_vec2 item_padding)
+{
+ /* update the bounds to stand without padding */
+ struct nk_window *win;
+ struct nk_style *style;
+ struct nk_panel *layout;
+ enum nk_widget_layout_states state;
+ struct nk_vec2 panel_padding;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return NK_WIDGET_INVALID;
+
+ win = ctx->current;
+ style = &ctx->style;
+ layout = win->layout;
+ state = nk_widget(bounds, ctx);
+
+ panel_padding = nk_panel_get_padding(style, layout->type);
+ if (layout->row.index == 1) {
+ bounds->w += panel_padding.x;
+ bounds->x -= panel_padding.x;
+ } else bounds->x -= item_padding.x;
+
+ if (layout->row.index == layout->row.columns)
+ bounds->w += panel_padding.x;
+ else bounds->w += item_padding.x;
+ return state;
+}
+NK_API void
+nk_spacing(struct nk_context *ctx, int cols)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ struct nk_rect none;
+ int i, index, rows;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ /* spacing over row boundaries */
+ win = ctx->current;
+ layout = win->layout;
+ index = (layout->row.index + cols) % layout->row.columns;
+ rows = (layout->row.index + cols) / layout->row.columns;
+ if (rows) {
+ for (i = 0; i < rows; ++i)
+ nk_panel_alloc_row(ctx, win);
+ cols = index;
+ }
+ /* non table layout need to allocate space */
+ if (layout->row.type != NK_LAYOUT_DYNAMIC_FIXED &&
+ layout->row.type != NK_LAYOUT_STATIC_FIXED) {
+ for (i = 0; i < cols; ++i)
+ nk_panel_alloc_space(&none, ctx);
+ } layout->row.index = index;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * TEXT
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_widget_text(struct nk_command_buffer *o, struct nk_rect b,
+ const char *string, int len, const struct nk_text *t,
+ nk_flags a, const struct nk_user_font *f)
+{
+ struct nk_rect label;
+ float text_width;
+
+ NK_ASSERT(o);
+ NK_ASSERT(t);
+ if (!o || !t) return;
+
+ b.h = NK_MAX(b.h, 2 * t->padding.y);
+ label.x = 0; label.w = 0;
+ label.y = b.y + t->padding.y;
+ label.h = NK_MIN(f->height, b.h - 2 * t->padding.y);
+
+ text_width = f->width(f->userdata, f->height, (const char*)string, len);
+ text_width += (2.0f * t->padding.x);
+
+ /* align in x-axis */
+ if (a & NK_TEXT_ALIGN_LEFT) {
+ label.x = b.x + t->padding.x;
+ label.w = NK_MAX(0, b.w - 2 * t->padding.x);
+ } else if (a & NK_TEXT_ALIGN_CENTERED) {
+ label.w = NK_MAX(1, 2 * t->padding.x + (float)text_width);
+ label.x = (b.x + t->padding.x + ((b.w - 2 * t->padding.x) - label.w) / 2);
+ label.x = NK_MAX(b.x + t->padding.x, label.x);
+ label.w = NK_MIN(b.x + b.w, label.x + label.w);
+ if (label.w >= label.x) label.w -= label.x;
+ } else if (a & NK_TEXT_ALIGN_RIGHT) {
+ label.x = NK_MAX(b.x + t->padding.x, (b.x + b.w) - (2 * t->padding.x + (float)text_width));
+ label.w = (float)text_width + 2 * t->padding.x;
+ } else return;
+
+ /* align in y-axis */
+ if (a & NK_TEXT_ALIGN_MIDDLE) {
+ label.y = b.y + b.h/2.0f - (float)f->height/2.0f;
+ label.h = NK_MAX(b.h/2.0f, b.h - (b.h/2.0f + f->height/2.0f));
+ } else if (a & NK_TEXT_ALIGN_BOTTOM) {
+ label.y = b.y + b.h - f->height;
+ label.h = f->height;
+ }
+ nk_draw_text(o, label, (const char*)string, len, f, t->background, t->text);
+}
+NK_LIB void
+nk_widget_text_wrap(struct nk_command_buffer *o, struct nk_rect b,
+ const char *string, int len, const struct nk_text *t,
+ const struct nk_user_font *f)
+{
+ float width;
+ int glyphs = 0;
+ int fitting = 0;
+ int done = 0;
+ struct nk_rect line;
+ struct nk_text text;
+ NK_INTERN nk_rune seperator[] = {' '};
+
+ NK_ASSERT(o);
+ NK_ASSERT(t);
+ if (!o || !t) return;
+
+ text.padding = nk_vec2(0,0);
+ text.background = t->background;
+ text.text = t->text;
+
+ b.w = NK_MAX(b.w, 2 * t->padding.x);
+ b.h = NK_MAX(b.h, 2 * t->padding.y);
+ b.h = b.h - 2 * t->padding.y;
+
+ line.x = b.x + t->padding.x;
+ line.y = b.y + t->padding.y;
+ line.w = b.w - 2 * t->padding.x;
+ line.h = 2 * t->padding.y + f->height;
+
+ fitting = nk_text_clamp(f, string, len, line.w, &glyphs, &width, seperator,NK_LEN(seperator));
+ while (done < len) {
+ if (!fitting || line.y + line.h >= (b.y + b.h)) break;
+ nk_widget_text(o, line, &string[done], fitting, &text, NK_TEXT_LEFT, f);
+ done += fitting;
+ line.y += f->height + 2 * t->padding.y;
+ fitting = nk_text_clamp(f, &string[done], len - done, line.w, &glyphs, &width, seperator,NK_LEN(seperator));
+ }
+}
+NK_API void
+nk_text_colored(struct nk_context *ctx, const char *str, int len,
+ nk_flags alignment, struct nk_color color)
+{
+ struct nk_window *win;
+ const struct nk_style *style;
+
+ struct nk_vec2 item_padding;
+ struct nk_rect bounds;
+ struct nk_text text;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
+
+ win = ctx->current;
+ style = &ctx->style;
+ nk_panel_alloc_space(&bounds, ctx);
+ item_padding = style->text.padding;
+
+ text.padding.x = item_padding.x;
+ text.padding.y = item_padding.y;
+ text.background = style->window.background;
+ text.text = color;
+ nk_widget_text(&win->buffer, bounds, str, len, &text, alignment, style->font);
+}
+NK_API void
+nk_text_wrap_colored(struct nk_context *ctx, const char *str,
+ int len, struct nk_color color)
+{
+ struct nk_window *win;
+ const struct nk_style *style;
+
+ struct nk_vec2 item_padding;
+ struct nk_rect bounds;
+ struct nk_text text;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
+
+ win = ctx->current;
+ style = &ctx->style;
+ nk_panel_alloc_space(&bounds, ctx);
+ item_padding = style->text.padding;
+
+ text.padding.x = item_padding.x;
+ text.padding.y = item_padding.y;
+ text.background = style->window.background;
+ text.text = color;
+ nk_widget_text_wrap(&win->buffer, bounds, str, len, &text, style->font);
+}
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+NK_API void
+nk_labelf_colored(struct nk_context *ctx, nk_flags flags,
+ struct nk_color color, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ nk_labelfv_colored(ctx, flags, color, fmt, args);
+ va_end(args);
+}
+NK_API void
+nk_labelf_colored_wrap(struct nk_context *ctx, struct nk_color color,
+ const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ nk_labelfv_colored_wrap(ctx, color, fmt, args);
+ va_end(args);
+}
+NK_API void
+nk_labelf(struct nk_context *ctx, nk_flags flags, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ nk_labelfv(ctx, flags, fmt, args);
+ va_end(args);
+}
+NK_API void
+nk_labelf_wrap(struct nk_context *ctx, const char *fmt,...)
+{
+ va_list args;
+ va_start(args, fmt);
+ nk_labelfv_wrap(ctx, fmt, args);
+ va_end(args);
+}
+NK_API void
+nk_labelfv_colored(struct nk_context *ctx, nk_flags flags,
+ struct nk_color color, const char *fmt, va_list args)
+{
+ char buf[256];
+ nk_strfmt(buf, NK_LEN(buf), fmt, args);
+ nk_label_colored(ctx, buf, flags, color);
+}
+
+NK_API void
+nk_labelfv_colored_wrap(struct nk_context *ctx, struct nk_color color,
+ const char *fmt, va_list args)
+{
+ char buf[256];
+ nk_strfmt(buf, NK_LEN(buf), fmt, args);
+ nk_label_colored_wrap(ctx, buf, color);
+}
+
+NK_API void
+nk_labelfv(struct nk_context *ctx, nk_flags flags, const char *fmt, va_list args)
+{
+ char buf[256];
+ nk_strfmt(buf, NK_LEN(buf), fmt, args);
+ nk_label(ctx, buf, flags);
+}
+
+NK_API void
+nk_labelfv_wrap(struct nk_context *ctx, const char *fmt, va_list args)
+{
+ char buf[256];
+ nk_strfmt(buf, NK_LEN(buf), fmt, args);
+ nk_label_wrap(ctx, buf);
+}
+
+NK_API void
+nk_value_bool(struct nk_context *ctx, const char *prefix, int value)
+{
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: %s", prefix, ((value) ? "true": "false"));
+}
+NK_API void
+nk_value_int(struct nk_context *ctx, const char *prefix, int value)
+{
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: %d", prefix, value);
+}
+NK_API void
+nk_value_uint(struct nk_context *ctx, const char *prefix, unsigned int value)
+{
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: %u", prefix, value);
+}
+NK_API void
+nk_value_float(struct nk_context *ctx, const char *prefix, float value)
+{
+ double double_value = (double)value;
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: %.3f", prefix, double_value);
+}
+NK_API void
+nk_value_color_byte(struct nk_context *ctx, const char *p, struct nk_color c)
+{
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: (%d, %d, %d, %d)", p, c.r, c.g, c.b, c.a);
+}
+NK_API void
+nk_value_color_float(struct nk_context *ctx, const char *p, struct nk_color color)
+{
+ double c[4]; nk_color_dv(c, color);
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: (%.2f, %.2f, %.2f, %.2f)",
+ p, c[0], c[1], c[2], c[3]);
+}
+NK_API void
+nk_value_color_hex(struct nk_context *ctx, const char *prefix, struct nk_color color)
+{
+ char hex[16];
+ nk_color_hex_rgba(hex, color);
+ nk_labelf(ctx, NK_TEXT_LEFT, "%s: %s", prefix, hex);
+}
+#endif
+NK_API void
+nk_text(struct nk_context *ctx, const char *str, int len, nk_flags alignment)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ nk_text_colored(ctx, str, len, alignment, ctx->style.text.color);
+}
+NK_API void
+nk_text_wrap(struct nk_context *ctx, const char *str, int len)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ nk_text_wrap_colored(ctx, str, len, ctx->style.text.color);
+}
+NK_API void
+nk_label(struct nk_context *ctx, const char *str, nk_flags alignment)
+{
+ nk_text(ctx, str, nk_strlen(str), alignment);
+}
+NK_API void
+nk_label_colored(struct nk_context *ctx, const char *str, nk_flags align,
+ struct nk_color color)
+{
+ nk_text_colored(ctx, str, nk_strlen(str), align, color);
+}
+NK_API void
+nk_label_wrap(struct nk_context *ctx, const char *str)
+{
+ nk_text_wrap(ctx, str, nk_strlen(str));
+}
+NK_API void
+nk_label_colored_wrap(struct nk_context *ctx, const char *str, struct nk_color color)
+{
+ nk_text_wrap_colored(ctx, str, nk_strlen(str), color);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * IMAGE
+ *
+ * ===============================================================*/
+NK_API nk_handle
+nk_handle_ptr(void *ptr)
+{
+ nk_handle handle = {0};
+ handle.ptr = ptr;
+ return handle;
+}
+NK_API nk_handle
+nk_handle_id(int id)
+{
+ nk_handle handle;
+ nk_zero_struct(handle);
+ handle.id = id;
+ return handle;
+}
+NK_API struct nk_image
+nk_subimage_ptr(void *ptr, unsigned short w, unsigned short h, struct nk_rect r)
+{
+ struct nk_image s;
+ nk_zero(&s, sizeof(s));
+ s.handle.ptr = ptr;
+ s.w = w; s.h = h;
+ s.region[0] = (unsigned short)r.x;
+ s.region[1] = (unsigned short)r.y;
+ s.region[2] = (unsigned short)r.w;
+ s.region[3] = (unsigned short)r.h;
+ return s;
+}
+NK_API struct nk_image
+nk_subimage_id(int id, unsigned short w, unsigned short h, struct nk_rect r)
+{
+ struct nk_image s;
+ nk_zero(&s, sizeof(s));
+ s.handle.id = id;
+ s.w = w; s.h = h;
+ s.region[0] = (unsigned short)r.x;
+ s.region[1] = (unsigned short)r.y;
+ s.region[2] = (unsigned short)r.w;
+ s.region[3] = (unsigned short)r.h;
+ return s;
+}
+NK_API struct nk_image
+nk_subimage_handle(nk_handle handle, unsigned short w, unsigned short h,
+ struct nk_rect r)
+{
+ struct nk_image s;
+ nk_zero(&s, sizeof(s));
+ s.handle = handle;
+ s.w = w; s.h = h;
+ s.region[0] = (unsigned short)r.x;
+ s.region[1] = (unsigned short)r.y;
+ s.region[2] = (unsigned short)r.w;
+ s.region[3] = (unsigned short)r.h;
+ return s;
+}
+NK_API struct nk_image
+nk_image_handle(nk_handle handle)
+{
+ struct nk_image s;
+ nk_zero(&s, sizeof(s));
+ s.handle = handle;
+ s.w = 0; s.h = 0;
+ s.region[0] = 0;
+ s.region[1] = 0;
+ s.region[2] = 0;
+ s.region[3] = 0;
+ return s;
+}
+NK_API struct nk_image
+nk_image_ptr(void *ptr)
+{
+ struct nk_image s;
+ nk_zero(&s, sizeof(s));
+ NK_ASSERT(ptr);
+ s.handle.ptr = ptr;
+ s.w = 0; s.h = 0;
+ s.region[0] = 0;
+ s.region[1] = 0;
+ s.region[2] = 0;
+ s.region[3] = 0;
+ return s;
+}
+NK_API struct nk_image
+nk_image_id(int id)
+{
+ struct nk_image s;
+ nk_zero(&s, sizeof(s));
+ s.handle.id = id;
+ s.w = 0; s.h = 0;
+ s.region[0] = 0;
+ s.region[1] = 0;
+ s.region[2] = 0;
+ s.region[3] = 0;
+ return s;
+}
+NK_API int
+nk_image_is_subimage(const struct nk_image* img)
+{
+ NK_ASSERT(img);
+ return !(img->w == 0 && img->h == 0);
+}
+NK_API void
+nk_image(struct nk_context *ctx, struct nk_image img)
+{
+ struct nk_window *win;
+ struct nk_rect bounds;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
+
+ win = ctx->current;
+ if (!nk_widget(&bounds, ctx)) return;
+ nk_draw_image(&win->buffer, bounds, &img, nk_white);
+}
+NK_API void
+nk_image_color(struct nk_context *ctx, struct nk_image img, struct nk_color col)
+{
+ struct nk_window *win;
+ struct nk_rect bounds;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
+
+ win = ctx->current;
+ if (!nk_widget(&bounds, ctx)) return;
+ nk_draw_image(&win->buffer, bounds, &img, col);
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * BUTTON
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type,
+ struct nk_rect content, struct nk_color background, struct nk_color foreground,
+ float border_width, const struct nk_user_font *font)
+{
+ switch (type) {
+ case NK_SYMBOL_X:
+ case NK_SYMBOL_UNDERSCORE:
+ case NK_SYMBOL_PLUS:
+ case NK_SYMBOL_MINUS: {
+ /* single character text symbol */
+ const char *X = (type == NK_SYMBOL_X) ? "x":
+ (type == NK_SYMBOL_UNDERSCORE) ? "_":
+ (type == NK_SYMBOL_PLUS) ? "+": "-";
+ struct nk_text text;
+ text.padding = nk_vec2(0,0);
+ text.background = background;
+ text.text = foreground;
+ nk_widget_text(out, content, X, 1, &text, NK_TEXT_CENTERED, font);
+ } break;
+ case NK_SYMBOL_CIRCLE_SOLID:
+ case NK_SYMBOL_CIRCLE_OUTLINE:
+ case NK_SYMBOL_RECT_SOLID:
+ case NK_SYMBOL_RECT_OUTLINE: {
+ /* simple empty/filled shapes */
+ if (type == NK_SYMBOL_RECT_SOLID || type == NK_SYMBOL_RECT_OUTLINE) {
+ nk_fill_rect(out, content, 0, foreground);
+ if (type == NK_SYMBOL_RECT_OUTLINE)
+ nk_fill_rect(out, nk_shrink_rect(content, border_width), 0, background);
+ } else {
+ nk_fill_circle(out, content, foreground);
+ if (type == NK_SYMBOL_CIRCLE_OUTLINE)
+ nk_fill_circle(out, nk_shrink_rect(content, 1), background);
+ }
+ } break;
+ case NK_SYMBOL_TRIANGLE_UP:
+ case NK_SYMBOL_TRIANGLE_DOWN:
+ case NK_SYMBOL_TRIANGLE_LEFT:
+ case NK_SYMBOL_TRIANGLE_RIGHT: {
+ enum nk_heading heading;
+ struct nk_vec2 points[3];
+ heading = (type == NK_SYMBOL_TRIANGLE_RIGHT) ? NK_RIGHT :
+ (type == NK_SYMBOL_TRIANGLE_LEFT) ? NK_LEFT:
+ (type == NK_SYMBOL_TRIANGLE_UP) ? NK_UP: NK_DOWN;
+ nk_triangle_from_direction(points, content, 0, 0, heading);
+ nk_fill_triangle(out, points[0].x, points[0].y, points[1].x, points[1].y,
+ points[2].x, points[2].y, foreground);
+ } break;
+ default:
+ case NK_SYMBOL_NONE:
+ case NK_SYMBOL_MAX: break;
+ }
+}
+NK_LIB int
+nk_button_behavior(nk_flags *state, struct nk_rect r,
+ const struct nk_input *i, enum nk_button_behavior behavior)
+{
+ int ret = 0;
+ nk_widget_state_reset(state);
+ if (!i) return 0;
+ if (nk_input_is_mouse_hovering_rect(i, r)) {
+ *state = NK_WIDGET_STATE_HOVERED;
+ if (nk_input_is_mouse_down(i, NK_BUTTON_LEFT))
+ *state = NK_WIDGET_STATE_ACTIVE;
+ if (nk_input_has_mouse_click_in_rect(i, NK_BUTTON_LEFT, r)) {
+ ret = (behavior != NK_BUTTON_DEFAULT) ?
+ nk_input_is_mouse_down(i, NK_BUTTON_LEFT):
+#ifdef NK_BUTTON_TRIGGER_ON_RELEASE
+ nk_input_is_mouse_released(i, NK_BUTTON_LEFT);
+#else
+ nk_input_is_mouse_pressed(i, NK_BUTTON_LEFT);
+#endif
+ }
+ }
+ if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(i, r))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(i, r))
+ *state |= NK_WIDGET_STATE_LEFT;
+ return ret;
+}
+NK_LIB const struct nk_style_item*
+nk_draw_button(struct nk_command_buffer *out,
+ const struct nk_rect *bounds, nk_flags state,
+ const struct nk_style_button *style)
+{
+ const struct nk_style_item *background;
+ if (state & NK_WIDGET_STATE_HOVER)
+ background = &style->hover;
+ else if (state & NK_WIDGET_STATE_ACTIVED)
+ background = &style->active;
+ else background = &style->normal;
+
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(out, *bounds, &background->data.image, nk_white);
+ } else {
+ nk_fill_rect(out, *bounds, style->rounding, background->data.color);
+ nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
+ }
+ return background;
+}
+NK_LIB int
+nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r,
+ const struct nk_style_button *style, const struct nk_input *in,
+ enum nk_button_behavior behavior, struct nk_rect *content)
+{
+ struct nk_rect bounds;
+ NK_ASSERT(style);
+ NK_ASSERT(state);
+ NK_ASSERT(out);
+ if (!out || !style)
+ return nk_false;
+
+ /* calculate button content space */
+ content->x = r.x + style->padding.x + style->border + style->rounding;
+ content->y = r.y + style->padding.y + style->border + style->rounding;
+ content->w = r.w - (2 * style->padding.x + style->border + style->rounding*2);
+ content->h = r.h - (2 * style->padding.y + style->border + style->rounding*2);
+
+ /* execute button behavior */
+ bounds.x = r.x - style->touch_padding.x;
+ bounds.y = r.y - style->touch_padding.y;
+ bounds.w = r.w + 2 * style->touch_padding.x;
+ bounds.h = r.h + 2 * style->touch_padding.y;
+ return nk_button_behavior(state, bounds, in, behavior);
+}
+NK_LIB void
+nk_draw_button_text(struct nk_command_buffer *out,
+ const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state,
+ const struct nk_style_button *style, const char *txt, int len,
+ nk_flags text_alignment, const struct nk_user_font *font)
+{
+ struct nk_text text;
+ const struct nk_style_item *background;
+ background = nk_draw_button(out, bounds, state, style);
+
+ /* select correct colors/images */
+ if (background->type == NK_STYLE_ITEM_COLOR)
+ text.background = background->data.color;
+ else text.background = style->text_background;
+ if (state & NK_WIDGET_STATE_HOVER)
+ text.text = style->text_hover;
+ else if (state & NK_WIDGET_STATE_ACTIVED)
+ text.text = style->text_active;
+ else text.text = style->text_normal;
+
+ text.padding = nk_vec2(0,0);
+ nk_widget_text(out, *content, txt, len, &text, text_alignment, font);
+}
+NK_LIB int
+nk_do_button_text(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ const char *string, int len, nk_flags align, enum nk_button_behavior behavior,
+ const struct nk_style_button *style, const struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ struct nk_rect content;
+ int ret = nk_false;
+
+ NK_ASSERT(state);
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ NK_ASSERT(string);
+ NK_ASSERT(font);
+ if (!out || !style || !font || !string)
+ return nk_false;
+
+ ret = nk_do_button(state, out, bounds, style, in, behavior, &content);
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_button_text(out, &bounds, &content, *state, style, string, len, align, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return ret;
+}
+NK_LIB void
+nk_draw_button_symbol(struct nk_command_buffer *out,
+ const struct nk_rect *bounds, const struct nk_rect *content,
+ nk_flags state, const struct nk_style_button *style,
+ enum nk_symbol_type type, const struct nk_user_font *font)
+{
+ struct nk_color sym, bg;
+ const struct nk_style_item *background;
+
+ /* select correct colors/images */
+ background = nk_draw_button(out, bounds, state, style);
+ if (background->type == NK_STYLE_ITEM_COLOR)
+ bg = background->data.color;
+ else bg = style->text_background;
+
+ if (state & NK_WIDGET_STATE_HOVER)
+ sym = style->text_hover;
+ else if (state & NK_WIDGET_STATE_ACTIVED)
+ sym = style->text_active;
+ else sym = style->text_normal;
+ nk_draw_symbol(out, type, *content, bg, sym, 1, font);
+}
+NK_LIB int
+nk_do_button_symbol(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ enum nk_symbol_type symbol, enum nk_button_behavior behavior,
+ const struct nk_style_button *style, const struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ int ret;
+ struct nk_rect content;
+
+ NK_ASSERT(state);
+ NK_ASSERT(style);
+ NK_ASSERT(font);
+ NK_ASSERT(out);
+ if (!out || !style || !font || !state)
+ return nk_false;
+
+ ret = nk_do_button(state, out, bounds, style, in, behavior, &content);
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_button_symbol(out, &bounds, &content, *state, style, symbol, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return ret;
+}
+NK_LIB void
+nk_draw_button_image(struct nk_command_buffer *out,
+ const struct nk_rect *bounds, const struct nk_rect *content,
+ nk_flags state, const struct nk_style_button *style, const struct nk_image *img)
+{
+ nk_draw_button(out, bounds, state, style);
+ nk_draw_image(out, *content, img, nk_white);
+}
+NK_LIB int
+nk_do_button_image(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ struct nk_image img, enum nk_button_behavior b,
+ const struct nk_style_button *style, const struct nk_input *in)
+{
+ int ret;
+ struct nk_rect content;
+
+ NK_ASSERT(state);
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ if (!out || !style || !state)
+ return nk_false;
+
+ ret = nk_do_button(state, out, bounds, style, in, b, &content);
+ content.x += style->image_padding.x;
+ content.y += style->image_padding.y;
+ content.w -= 2 * style->image_padding.x;
+ content.h -= 2 * style->image_padding.y;
+
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_button_image(out, &bounds, &content, *state, style, &img);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return ret;
+}
+NK_LIB void
+nk_draw_button_text_symbol(struct nk_command_buffer *out,
+ const struct nk_rect *bounds, const struct nk_rect *label,
+ const struct nk_rect *symbol, nk_flags state, const struct nk_style_button *style,
+ const char *str, int len, enum nk_symbol_type type,
+ const struct nk_user_font *font)
+{
+ struct nk_color sym;
+ struct nk_text text;
+ const struct nk_style_item *background;
+
+ /* select correct background colors/images */
+ background = nk_draw_button(out, bounds, state, style);
+ if (background->type == NK_STYLE_ITEM_COLOR)
+ text.background = background->data.color;
+ else text.background = style->text_background;
+
+ /* select correct text colors */
+ if (state & NK_WIDGET_STATE_HOVER) {
+ sym = style->text_hover;
+ text.text = style->text_hover;
+ } else if (state & NK_WIDGET_STATE_ACTIVED) {
+ sym = style->text_active;
+ text.text = style->text_active;
+ } else {
+ sym = style->text_normal;
+ text.text = style->text_normal;
+ }
+
+ text.padding = nk_vec2(0,0);
+ nk_draw_symbol(out, type, *symbol, style->text_background, sym, 0, font);
+ nk_widget_text(out, *label, str, len, &text, NK_TEXT_CENTERED, font);
+}
+NK_LIB int
+nk_do_button_text_symbol(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ enum nk_symbol_type symbol, const char *str, int len, nk_flags align,
+ enum nk_button_behavior behavior, const struct nk_style_button *style,
+ const struct nk_user_font *font, const struct nk_input *in)
+{
+ int ret;
+ struct nk_rect tri = {0,0,0,0};
+ struct nk_rect content;
+
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ NK_ASSERT(font);
+ if (!out || !style || !font)
+ return nk_false;
+
+ ret = nk_do_button(state, out, bounds, style, in, behavior, &content);
+ tri.y = content.y + (content.h/2) - font->height/2;
+ tri.w = font->height; tri.h = font->height;
+ if (align & NK_TEXT_ALIGN_LEFT) {
+ tri.x = (content.x + content.w) - (2 * style->padding.x + tri.w);
+ tri.x = NK_MAX(tri.x, 0);
+ } else tri.x = content.x + 2 * style->padding.x;
+
+ /* draw button */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_button_text_symbol(out, &bounds, &content, &tri,
+ *state, style, str, len, symbol, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return ret;
+}
+NK_LIB void
+nk_draw_button_text_image(struct nk_command_buffer *out,
+ const struct nk_rect *bounds, const struct nk_rect *label,
+ const struct nk_rect *image, nk_flags state, const struct nk_style_button *style,
+ const char *str, int len, const struct nk_user_font *font,
+ const struct nk_image *img)
+{
+ struct nk_text text;
+ const struct nk_style_item *background;
+ background = nk_draw_button(out, bounds, state, style);
+
+ /* select correct colors */
+ if (background->type == NK_STYLE_ITEM_COLOR)
+ text.background = background->data.color;
+ else text.background = style->text_background;
+ if (state & NK_WIDGET_STATE_HOVER)
+ text.text = style->text_hover;
+ else if (state & NK_WIDGET_STATE_ACTIVED)
+ text.text = style->text_active;
+ else text.text = style->text_normal;
+
+ text.padding = nk_vec2(0,0);
+ nk_widget_text(out, *label, str, len, &text, NK_TEXT_CENTERED, font);
+ nk_draw_image(out, *image, img, nk_white);
+}
+NK_LIB int
+nk_do_button_text_image(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ struct nk_image img, const char* str, int len, nk_flags align,
+ enum nk_button_behavior behavior, const struct nk_style_button *style,
+ const struct nk_user_font *font, const struct nk_input *in)
+{
+ int ret;
+ struct nk_rect icon;
+ struct nk_rect content;
+
+ NK_ASSERT(style);
+ NK_ASSERT(state);
+ NK_ASSERT(font);
+ NK_ASSERT(out);
+ if (!out || !font || !style || !str)
+ return nk_false;
+
+ ret = nk_do_button(state, out, bounds, style, in, behavior, &content);
+ icon.y = bounds.y + style->padding.y;
+ icon.w = icon.h = bounds.h - 2 * style->padding.y;
+ if (align & NK_TEXT_ALIGN_LEFT) {
+ icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);
+ icon.x = NK_MAX(icon.x, 0);
+ } else icon.x = bounds.x + 2 * style->padding.x;
+
+ icon.x += style->image_padding.x;
+ icon.y += style->image_padding.y;
+ icon.w -= 2 * style->image_padding.x;
+ icon.h -= 2 * style->image_padding.y;
+
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_button_text_image(out, &bounds, &content, &icon, *state, style, str, len, font, &img);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return ret;
+}
+NK_API void
+nk_button_set_behavior(struct nk_context *ctx, enum nk_button_behavior behavior)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return;
+ ctx->button_behavior = behavior;
+}
+NK_API int
+nk_button_push_behavior(struct nk_context *ctx, enum nk_button_behavior behavior)
+{
+ struct nk_config_stack_button_behavior *button_stack;
+ struct nk_config_stack_button_behavior_element *element;
+
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+
+ button_stack = &ctx->stacks.button_behaviors;
+ NK_ASSERT(button_stack->head < (int)NK_LEN(button_stack->elements));
+ if (button_stack->head >= (int)NK_LEN(button_stack->elements))
+ return 0;
+
+ element = &button_stack->elements[button_stack->head++];
+ element->address = &ctx->button_behavior;
+ element->old_value = ctx->button_behavior;
+ ctx->button_behavior = behavior;
+ return 1;
+}
+NK_API int
+nk_button_pop_behavior(struct nk_context *ctx)
+{
+ struct nk_config_stack_button_behavior *button_stack;
+ struct nk_config_stack_button_behavior_element *element;
+
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+
+ button_stack = &ctx->stacks.button_behaviors;
+ NK_ASSERT(button_stack->head > 0);
+ if (button_stack->head < 1)
+ return 0;
+
+ element = &button_stack->elements[--button_stack->head];
+ *element->address = element->old_value;
+ return 1;
+}
+NK_API int
+nk_button_text_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, const char *title, int len)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(style);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!style || !ctx || !ctx->current || !ctx->current->layout) return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+ state = nk_widget(&bounds, ctx);
+
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_button_text(&ctx->last_widget_state, &win->buffer, bounds,
+ title, len, style->text_alignment, ctx->button_behavior,
+ style, in, ctx->style.font);
+}
+NK_API int
+nk_button_text(struct nk_context *ctx, const char *title, int len)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ return nk_button_text_styled(ctx, &ctx->style.button, title, len);
+}
+NK_API int nk_button_label_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, const char *title)
+{
+ return nk_button_text_styled(ctx, style, title, nk_strlen(title));
+}
+NK_API int nk_button_label(struct nk_context *ctx, const char *title)
+{
+ return nk_button_text(ctx, title, nk_strlen(title));
+}
+NK_API int
+nk_button_color(struct nk_context *ctx, struct nk_color color)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ struct nk_style_button button;
+
+ int ret = 0;
+ struct nk_rect bounds;
+ struct nk_rect content;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+
+ button = ctx->style.button;
+ button.normal = nk_style_item_color(color);
+ button.hover = nk_style_item_color(color);
+ button.active = nk_style_item_color(color);
+ ret = nk_do_button(&ctx->last_widget_state, &win->buffer, bounds,
+ &button, in, ctx->button_behavior, &content);
+ nk_draw_button(&win->buffer, &bounds, ctx->last_widget_state, &button);
+ return ret;
+}
+NK_API int
+nk_button_symbol_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, enum nk_symbol_type symbol)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_button_symbol(&ctx->last_widget_state, &win->buffer, bounds,
+ symbol, ctx->button_behavior, style, in, ctx->style.font);
+}
+NK_API int
+nk_button_symbol(struct nk_context *ctx, enum nk_symbol_type symbol)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ return nk_button_symbol_styled(ctx, &ctx->style.button, symbol);
+}
+NK_API int
+nk_button_image_styled(struct nk_context *ctx, const struct nk_style_button *style,
+ struct nk_image img)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_button_image(&ctx->last_widget_state, &win->buffer, bounds,
+ img, ctx->button_behavior, style, in);
+}
+NK_API int
+nk_button_image(struct nk_context *ctx, struct nk_image img)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ return nk_button_image_styled(ctx, &ctx->style.button, img);
+}
+NK_API int
+nk_button_symbol_text_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, enum nk_symbol_type symbol,
+ const char *text, int len, nk_flags align)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer, bounds,
+ symbol, text, len, align, ctx->button_behavior,
+ style, ctx->style.font, in);
+}
+NK_API int
+nk_button_symbol_text(struct nk_context *ctx, enum nk_symbol_type symbol,
+ const char* text, int len, nk_flags align)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ return nk_button_symbol_text_styled(ctx, &ctx->style.button, symbol, text, len, align);
+}
+NK_API int nk_button_symbol_label(struct nk_context *ctx, enum nk_symbol_type symbol,
+ const char *label, nk_flags align)
+{
+ return nk_button_symbol_text(ctx, symbol, label, nk_strlen(label), align);
+}
+NK_API int nk_button_symbol_label_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, enum nk_symbol_type symbol,
+ const char *title, nk_flags align)
+{
+ return nk_button_symbol_text_styled(ctx, style, symbol, title, nk_strlen(title), align);
+}
+NK_API int
+nk_button_image_text_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, struct nk_image img, const char *text,
+ int len, nk_flags align)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_button_text_image(&ctx->last_widget_state, &win->buffer,
+ bounds, img, text, len, align, ctx->button_behavior,
+ style, ctx->style.font, in);
+}
+NK_API int
+nk_button_image_text(struct nk_context *ctx, struct nk_image img,
+ const char *text, int len, nk_flags align)
+{
+ return nk_button_image_text_styled(ctx, &ctx->style.button,img, text, len, align);
+}
+NK_API int nk_button_image_label(struct nk_context *ctx, struct nk_image img,
+ const char *label, nk_flags align)
+{
+ return nk_button_image_text(ctx, img, label, nk_strlen(label), align);
+}
+NK_API int nk_button_image_label_styled(struct nk_context *ctx,
+ const struct nk_style_button *style, struct nk_image img,
+ const char *label, nk_flags text_alignment)
+{
+ return nk_button_image_text_styled(ctx, style, img, label, nk_strlen(label), text_alignment);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * TOGGLE
+ *
+ * ===============================================================*/
+NK_LIB int
+nk_toggle_behavior(const struct nk_input *in, struct nk_rect select,
+ nk_flags *state, int active)
+{
+ nk_widget_state_reset(state);
+ if (nk_button_behavior(state, select, in, NK_BUTTON_DEFAULT)) {
+ *state = NK_WIDGET_STATE_ACTIVE;
+ active = !active;
+ }
+ if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, select))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(in, select))
+ *state |= NK_WIDGET_STATE_LEFT;
+ return active;
+}
+NK_LIB void
+nk_draw_checkbox(struct nk_command_buffer *out,
+ nk_flags state, const struct nk_style_toggle *style, int active,
+ const struct nk_rect *label, const struct nk_rect *selector,
+ const struct nk_rect *cursors, const char *string, int len,
+ const struct nk_user_font *font)
+{
+ const struct nk_style_item *background;
+ const struct nk_style_item *cursor;
+ struct nk_text text;
+
+ /* select correct colors/images */
+ if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ cursor = &style->cursor_hover;
+ text.text = style->text_hover;
+ } else if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->hover;
+ cursor = &style->cursor_hover;
+ text.text = style->text_active;
+ } else {
+ background = &style->normal;
+ cursor = &style->cursor_normal;
+ text.text = style->text_normal;
+ }
+
+ /* draw background and cursor */
+ if (background->type == NK_STYLE_ITEM_COLOR) {
+ nk_fill_rect(out, *selector, 0, style->border_color);
+ nk_fill_rect(out, nk_shrink_rect(*selector, style->border), 0, background->data.color);
+ } else nk_draw_image(out, *selector, &background->data.image, nk_white);
+ if (active) {
+ if (cursor->type == NK_STYLE_ITEM_IMAGE)
+ nk_draw_image(out, *cursors, &cursor->data.image, nk_white);
+ else nk_fill_rect(out, *cursors, 0, cursor->data.color);
+ }
+
+ text.padding.x = 0;
+ text.padding.y = 0;
+ text.background = style->text_background;
+ nk_widget_text(out, *label, string, len, &text, NK_TEXT_LEFT, font);
+}
+NK_LIB void
+nk_draw_option(struct nk_command_buffer *out,
+ nk_flags state, const struct nk_style_toggle *style, int active,
+ const struct nk_rect *label, const struct nk_rect *selector,
+ const struct nk_rect *cursors, const char *string, int len,
+ const struct nk_user_font *font)
+{
+ const struct nk_style_item *background;
+ const struct nk_style_item *cursor;
+ struct nk_text text;
+
+ /* select correct colors/images */
+ if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ cursor = &style->cursor_hover;
+ text.text = style->text_hover;
+ } else if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->hover;
+ cursor = &style->cursor_hover;
+ text.text = style->text_active;
+ } else {
+ background = &style->normal;
+ cursor = &style->cursor_normal;
+ text.text = style->text_normal;
+ }
+
+ /* draw background and cursor */
+ if (background->type == NK_STYLE_ITEM_COLOR) {
+ nk_fill_circle(out, *selector, style->border_color);
+ nk_fill_circle(out, nk_shrink_rect(*selector, style->border), background->data.color);
+ } else nk_draw_image(out, *selector, &background->data.image, nk_white);
+ if (active) {
+ if (cursor->type == NK_STYLE_ITEM_IMAGE)
+ nk_draw_image(out, *cursors, &cursor->data.image, nk_white);
+ else nk_fill_circle(out, *cursors, cursor->data.color);
+ }
+
+ text.padding.x = 0;
+ text.padding.y = 0;
+ text.background = style->text_background;
+ nk_widget_text(out, *label, string, len, &text, NK_TEXT_LEFT, font);
+}
+NK_LIB int
+nk_do_toggle(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect r,
+ int *active, const char *str, int len, enum nk_toggle_type type,
+ const struct nk_style_toggle *style, const struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ int was_active;
+ struct nk_rect bounds;
+ struct nk_rect select;
+ struct nk_rect cursor;
+ struct nk_rect label;
+
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ NK_ASSERT(font);
+ if (!out || !style || !font || !active)
+ return 0;
+
+ r.w = NK_MAX(r.w, font->height + 2 * style->padding.x);
+ r.h = NK_MAX(r.h, font->height + 2 * style->padding.y);
+
+ /* add additional touch padding for touch screen devices */
+ bounds.x = r.x - style->touch_padding.x;
+ bounds.y = r.y - style->touch_padding.y;
+ bounds.w = r.w + 2 * style->touch_padding.x;
+ bounds.h = r.h + 2 * style->touch_padding.y;
+
+ /* calculate the selector space */
+ select.w = font->height;
+ select.h = select.w;
+ select.y = r.y + r.h/2.0f - select.h/2.0f;
+ select.x = r.x;
+
+ /* calculate the bounds of the cursor inside the selector */
+ cursor.x = select.x + style->padding.x + style->border;
+ cursor.y = select.y + style->padding.y + style->border;
+ cursor.w = select.w - (2 * style->padding.x + 2 * style->border);
+ cursor.h = select.h - (2 * style->padding.y + 2 * style->border);
+
+ /* label behind the selector */
+ label.x = select.x + select.w + style->spacing;
+ label.y = select.y;
+ label.w = NK_MAX(r.x + r.w, label.x) - label.x;
+ label.h = select.w;
+
+ /* update selector */
+ was_active = *active;
+ *active = nk_toggle_behavior(in, bounds, state, *active);
+
+ /* draw selector */
+ if (style->draw_begin)
+ style->draw_begin(out, style->userdata);
+ if (type == NK_TOGGLE_CHECK) {
+ nk_draw_checkbox(out, *state, style, *active, &label, &select, &cursor, str, len, font);
+ } else {
+ nk_draw_option(out, *state, style, *active, &label, &select, &cursor, str, len, font);
+ }
+ if (style->draw_end)
+ style->draw_end(out, style->userdata);
+ return (was_active != *active);
+}
+/*----------------------------------------------------------------
+ *
+ * CHECKBOX
+ *
+ * --------------------------------------------------------------*/
+NK_API int
+nk_check_text(struct nk_context *ctx, const char *text, int len, int active)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return active;
+
+ win = ctx->current;
+ style = &ctx->style;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return active;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &active,
+ text, len, NK_TOGGLE_CHECK, &style->checkbox, in, style->font);
+ return active;
+}
+NK_API unsigned int
+nk_check_flags_text(struct nk_context *ctx, const char *text, int len,
+ unsigned int flags, unsigned int value)
+{
+ int old_active;
+ NK_ASSERT(ctx);
+ NK_ASSERT(text);
+ if (!ctx || !text) return flags;
+ old_active = (int)((flags & value) & value);
+ if (nk_check_text(ctx, text, len, old_active))
+ flags |= value;
+ else flags &= ~value;
+ return flags;
+}
+NK_API int
+nk_checkbox_text(struct nk_context *ctx, const char *text, int len, int *active)
+{
+ int old_val;
+ NK_ASSERT(ctx);
+ NK_ASSERT(text);
+ NK_ASSERT(active);
+ if (!ctx || !text || !active) return 0;
+ old_val = *active;
+ *active = nk_check_text(ctx, text, len, *active);
+ return old_val != *active;
+}
+NK_API int
+nk_checkbox_flags_text(struct nk_context *ctx, const char *text, int len,
+ unsigned int *flags, unsigned int value)
+{
+ int active;
+ NK_ASSERT(ctx);
+ NK_ASSERT(text);
+ NK_ASSERT(flags);
+ if (!ctx || !text || !flags) return 0;
+
+ active = (int)((*flags & value) & value);
+ if (nk_checkbox_text(ctx, text, len, &active)) {
+ if (active) *flags |= value;
+ else *flags &= ~value;
+ return 1;
+ }
+ return 0;
+}
+NK_API int nk_check_label(struct nk_context *ctx, const char *label, int active)
+{
+ return nk_check_text(ctx, label, nk_strlen(label), active);
+}
+NK_API unsigned int nk_check_flags_label(struct nk_context *ctx, const char *label,
+ unsigned int flags, unsigned int value)
+{
+ return nk_check_flags_text(ctx, label, nk_strlen(label), flags, value);
+}
+NK_API int nk_checkbox_label(struct nk_context *ctx, const char *label, int *active)
+{
+ return nk_checkbox_text(ctx, label, nk_strlen(label), active);
+}
+NK_API int nk_checkbox_flags_label(struct nk_context *ctx, const char *label,
+ unsigned int *flags, unsigned int value)
+{
+ return nk_checkbox_flags_text(ctx, label, nk_strlen(label), flags, value);
+}
+/*----------------------------------------------------------------
+ *
+ * OPTION
+ *
+ * --------------------------------------------------------------*/
+NK_API int
+nk_option_text(struct nk_context *ctx, const char *text, int len, int is_active)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return is_active;
+
+ win = ctx->current;
+ style = &ctx->style;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return (int)state;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &is_active,
+ text, len, NK_TOGGLE_OPTION, &style->option, in, style->font);
+ return is_active;
+}
+NK_API int
+nk_radio_text(struct nk_context *ctx, const char *text, int len, int *active)
+{
+ int old_value;
+ NK_ASSERT(ctx);
+ NK_ASSERT(text);
+ NK_ASSERT(active);
+ if (!ctx || !text || !active) return 0;
+ old_value = *active;
+ *active = nk_option_text(ctx, text, len, old_value);
+ return old_value != *active;
+}
+NK_API int
+nk_option_label(struct nk_context *ctx, const char *label, int active)
+{
+ return nk_option_text(ctx, label, nk_strlen(label), active);
+}
+NK_API int
+nk_radio_label(struct nk_context *ctx, const char *label, int *active)
+{
+ return nk_radio_text(ctx, label, nk_strlen(label), active);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * SELECTABLE
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_draw_selectable(struct nk_command_buffer *out,
+ nk_flags state, const struct nk_style_selectable *style, int active,
+ const struct nk_rect *bounds,
+ const struct nk_rect *icon, const struct nk_image *img, enum nk_symbol_type sym,
+ const char *string, int len, nk_flags align, const struct nk_user_font *font)
+{
+ const struct nk_style_item *background;
+ struct nk_text text;
+ text.padding = style->padding;
+
+ /* select correct colors/images */
+ if (!active) {
+ if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->pressed;
+ text.text = style->text_pressed;
+ } else if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ text.text = style->text_hover;
+ } else {
+ background = &style->normal;
+ text.text = style->text_normal;
+ }
+ } else {
+ if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->pressed_active;
+ text.text = style->text_pressed_active;
+ } else if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover_active;
+ text.text = style->text_hover_active;
+ } else {
+ background = &style->normal_active;
+ text.text = style->text_normal_active;
+ }
+ }
+ /* draw selectable background and text */
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(out, *bounds, &background->data.image, nk_white);
+ text.background = nk_rgba(0,0,0,0);
+ } else {
+ nk_fill_rect(out, *bounds, style->rounding, background->data.color);
+ text.background = background->data.color;
+ }
+ if (icon) {
+ if (img) nk_draw_image(out, *icon, img, nk_white);
+ else nk_draw_symbol(out, sym, *icon, text.background, text.text, 1, font);
+ }
+ nk_widget_text(out, *bounds, string, len, &text, align, font);
+}
+NK_LIB int
+nk_do_selectable(nk_flags *state, struct nk_command_buffer *out,
+ struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,
+ const struct nk_style_selectable *style, const struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ int old_value;
+ struct nk_rect touch;
+
+ NK_ASSERT(state);
+ NK_ASSERT(out);
+ NK_ASSERT(str);
+ NK_ASSERT(len);
+ NK_ASSERT(value);
+ NK_ASSERT(style);
+ NK_ASSERT(font);
+
+ if (!state || !out || !str || !len || !value || !style || !font) return 0;
+ old_value = *value;
+
+ /* remove padding */
+ touch.x = bounds.x - style->touch_padding.x;
+ touch.y = bounds.y - style->touch_padding.y;
+ touch.w = bounds.w + style->touch_padding.x * 2;
+ touch.h = bounds.h + style->touch_padding.y * 2;
+
+ /* update button */
+ if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))
+ *value = !(*value);
+
+ /* draw selectable */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_selectable(out, *state, style, *value, &bounds, 0,0,NK_SYMBOL_NONE, str, len, align, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return old_value != *value;
+}
+NK_LIB int
+nk_do_selectable_image(nk_flags *state, struct nk_command_buffer *out,
+ struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,
+ const struct nk_image *img, const struct nk_style_selectable *style,
+ const struct nk_input *in, const struct nk_user_font *font)
+{
+ int old_value;
+ struct nk_rect touch;
+ struct nk_rect icon;
+
+ NK_ASSERT(state);
+ NK_ASSERT(out);
+ NK_ASSERT(str);
+ NK_ASSERT(len);
+ NK_ASSERT(value);
+ NK_ASSERT(style);
+ NK_ASSERT(font);
+
+ if (!state || !out || !str || !len || !value || !style || !font) return 0;
+ old_value = *value;
+
+ /* toggle behavior */
+ touch.x = bounds.x - style->touch_padding.x;
+ touch.y = bounds.y - style->touch_padding.y;
+ touch.w = bounds.w + style->touch_padding.x * 2;
+ touch.h = bounds.h + style->touch_padding.y * 2;
+ if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))
+ *value = !(*value);
+
+ icon.y = bounds.y + style->padding.y;
+ icon.w = icon.h = bounds.h - 2 * style->padding.y;
+ if (align & NK_TEXT_ALIGN_LEFT) {
+ icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);
+ icon.x = NK_MAX(icon.x, 0);
+ } else icon.x = bounds.x + 2 * style->padding.x;
+
+ icon.x += style->image_padding.x;
+ icon.y += style->image_padding.y;
+ icon.w -= 2 * style->image_padding.x;
+ icon.h -= 2 * style->image_padding.y;
+
+ /* draw selectable */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_selectable(out, *state, style, *value, &bounds, &icon, img, NK_SYMBOL_NONE, str, len, align, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return old_value != *value;
+}
+NK_LIB int
+nk_do_selectable_symbol(nk_flags *state, struct nk_command_buffer *out,
+ struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,
+ enum nk_symbol_type sym, const struct nk_style_selectable *style,
+ const struct nk_input *in, const struct nk_user_font *font)
+{
+ int old_value;
+ struct nk_rect touch;
+ struct nk_rect icon;
+
+ NK_ASSERT(state);
+ NK_ASSERT(out);
+ NK_ASSERT(str);
+ NK_ASSERT(len);
+ NK_ASSERT(value);
+ NK_ASSERT(style);
+ NK_ASSERT(font);
+
+ if (!state || !out || !str || !len || !value || !style || !font) return 0;
+ old_value = *value;
+
+ /* toggle behavior */
+ touch.x = bounds.x - style->touch_padding.x;
+ touch.y = bounds.y - style->touch_padding.y;
+ touch.w = bounds.w + style->touch_padding.x * 2;
+ touch.h = bounds.h + style->touch_padding.y * 2;
+ if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))
+ *value = !(*value);
+
+ icon.y = bounds.y + style->padding.y;
+ icon.w = icon.h = bounds.h - 2 * style->padding.y;
+ if (align & NK_TEXT_ALIGN_LEFT) {
+ icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);
+ icon.x = NK_MAX(icon.x, 0);
+ } else icon.x = bounds.x + 2 * style->padding.x;
+
+ icon.x += style->image_padding.x;
+ icon.y += style->image_padding.y;
+ icon.w -= 2 * style->image_padding.x;
+ icon.h -= 2 * style->image_padding.y;
+
+ /* draw selectable */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_selectable(out, *state, style, *value, &bounds, &icon, 0, sym, str, len, align, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return old_value != *value;
+}
+
+NK_API int
+nk_selectable_text(struct nk_context *ctx, const char *str, int len,
+ nk_flags align, int *value)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ enum nk_widget_layout_states state;
+ struct nk_rect bounds;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(value);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !value)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+ style = &ctx->style;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_selectable(&ctx->last_widget_state, &win->buffer, bounds,
+ str, len, align, value, &style->selectable, in, style->font);
+}
+NK_API int
+nk_selectable_image_text(struct nk_context *ctx, struct nk_image img,
+ const char *str, int len, nk_flags align, int *value)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ enum nk_widget_layout_states state;
+ struct nk_rect bounds;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(value);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !value)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+ style = &ctx->style;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_selectable_image(&ctx->last_widget_state, &win->buffer, bounds,
+ str, len, align, value, &img, &style->selectable, in, style->font);
+}
+NK_API int
+nk_selectable_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *str, int len, nk_flags align, int *value)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ const struct nk_style *style;
+
+ enum nk_widget_layout_states state;
+ struct nk_rect bounds;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(value);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !value)
+ return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+ style = &ctx->style;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_selectable_symbol(&ctx->last_widget_state, &win->buffer, bounds,
+ str, len, align, value, sym, &style->selectable, in, style->font);
+}
+NK_API int
+nk_selectable_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *title, nk_flags align, int *value)
+{
+ return nk_selectable_symbol_text(ctx, sym, title, nk_strlen(title), align, value);
+}
+NK_API int nk_select_text(struct nk_context *ctx, const char *str, int len,
+ nk_flags align, int value)
+{
+ nk_selectable_text(ctx, str, len, align, &value);return value;
+}
+NK_API int nk_selectable_label(struct nk_context *ctx, const char *str, nk_flags align, int *value)
+{
+ return nk_selectable_text(ctx, str, nk_strlen(str), align, value);
+}
+NK_API int nk_selectable_image_label(struct nk_context *ctx,struct nk_image img,
+ const char *str, nk_flags align, int *value)
+{
+ return nk_selectable_image_text(ctx, img, str, nk_strlen(str), align, value);
+}
+NK_API int nk_select_label(struct nk_context *ctx, const char *str, nk_flags align, int value)
+{
+ nk_selectable_text(ctx, str, nk_strlen(str), align, &value);return value;
+}
+NK_API int nk_select_image_label(struct nk_context *ctx, struct nk_image img,
+ const char *str, nk_flags align, int value)
+{
+ nk_selectable_image_text(ctx, img, str, nk_strlen(str), align, &value);return value;
+}
+NK_API int nk_select_image_text(struct nk_context *ctx, struct nk_image img,
+ const char *str, int len, nk_flags align, int value)
+{
+ nk_selectable_image_text(ctx, img, str, len, align, &value);return value;
+}
+NK_API int
+nk_select_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *title, int title_len, nk_flags align, int value)
+{
+ nk_selectable_symbol_text(ctx, sym, title, title_len, align, &value);return value;
+}
+NK_API int
+nk_select_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *title, nk_flags align, int value)
+{
+ return nk_select_symbol_text(ctx, sym, title, nk_strlen(title), align, value);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * SLIDER
+ *
+ * ===============================================================*/
+NK_LIB float
+nk_slider_behavior(nk_flags *state, struct nk_rect *logical_cursor,
+ struct nk_rect *visual_cursor, struct nk_input *in,
+ struct nk_rect bounds, float slider_min, float slider_max, float slider_value,
+ float slider_step, float slider_steps)
+{
+ int left_mouse_down;
+ int left_mouse_click_in_cursor;
+
+ /* check if visual cursor is being dragged */
+ nk_widget_state_reset(state);
+ left_mouse_down = in && in->mouse.buttons[NK_BUTTON_LEFT].down;
+ left_mouse_click_in_cursor = in && nk_input_has_mouse_click_down_in_rect(in,
+ NK_BUTTON_LEFT, *visual_cursor, nk_true);
+
+ if (left_mouse_down && left_mouse_click_in_cursor) {
+ float ratio = 0;
+ const float d = in->mouse.pos.x - (visual_cursor->x+visual_cursor->w*0.5f);
+ const float pxstep = bounds.w / slider_steps;
+
+ /* only update value if the next slider step is reached */
+ *state = NK_WIDGET_STATE_ACTIVE;
+ if (NK_ABS(d) >= pxstep) {
+ const float steps = (float)((int)(NK_ABS(d) / pxstep));
+ slider_value += (d > 0) ? (slider_step*steps) : -(slider_step*steps);
+ slider_value = NK_CLAMP(slider_min, slider_value, slider_max);
+ ratio = (slider_value - slider_min)/slider_step;
+ logical_cursor->x = bounds.x + (logical_cursor->w * ratio);
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = logical_cursor->x;
+ }
+ }
+
+ /* slider widget state */
+ if (nk_input_is_mouse_hovering_rect(in, bounds))
+ *state = NK_WIDGET_STATE_HOVERED;
+ if (*state & NK_WIDGET_STATE_HOVER &&
+ !nk_input_is_mouse_prev_hovering_rect(in, bounds))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(in, bounds))
+ *state |= NK_WIDGET_STATE_LEFT;
+ return slider_value;
+}
+NK_LIB void
+nk_draw_slider(struct nk_command_buffer *out, nk_flags state,
+ const struct nk_style_slider *style, const struct nk_rect *bounds,
+ const struct nk_rect *visual_cursor, float min, float value, float max)
+{
+ struct nk_rect fill;
+ struct nk_rect bar;
+ const struct nk_style_item *background;
+
+ /* select correct slider images/colors */
+ struct nk_color bar_color;
+ const struct nk_style_item *cursor;
+
+ NK_UNUSED(min);
+ NK_UNUSED(max);
+ NK_UNUSED(value);
+
+ if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->active;
+ bar_color = style->bar_active;
+ cursor = &style->cursor_active;
+ } else if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ bar_color = style->bar_hover;
+ cursor = &style->cursor_hover;
+ } else {
+ background = &style->normal;
+ bar_color = style->bar_normal;
+ cursor = &style->cursor_normal;
+ }
+ /* calculate slider background bar */
+ bar.x = bounds->x;
+ bar.y = (visual_cursor->y + visual_cursor->h/2) - bounds->h/12;
+ bar.w = bounds->w;
+ bar.h = bounds->h/6;
+
+ /* filled background bar style */
+ fill.w = (visual_cursor->x + (visual_cursor->w/2.0f)) - bar.x;
+ fill.x = bar.x;
+ fill.y = bar.y;
+ fill.h = bar.h;
+
+ /* draw background */
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(out, *bounds, &background->data.image, nk_white);
+ } else {
+ nk_fill_rect(out, *bounds, style->rounding, background->data.color);
+ nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
+ }
+
+ /* draw slider bar */
+ nk_fill_rect(out, bar, style->rounding, bar_color);
+ nk_fill_rect(out, fill, style->rounding, style->bar_filled);
+
+ /* draw cursor */
+ if (cursor->type == NK_STYLE_ITEM_IMAGE)
+ nk_draw_image(out, *visual_cursor, &cursor->data.image, nk_white);
+ else nk_fill_circle(out, *visual_cursor, cursor->data.color);
+}
+NK_LIB float
+nk_do_slider(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ float min, float val, float max, float step,
+ const struct nk_style_slider *style, struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ float slider_range;
+ float slider_min;
+ float slider_max;
+ float slider_value;
+ float slider_steps;
+ float cursor_offset;
+
+ struct nk_rect visual_cursor;
+ struct nk_rect logical_cursor;
+
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ if (!out || !style)
+ return 0;
+
+ /* remove padding from slider bounds */
+ bounds.x = bounds.x + style->padding.x;
+ bounds.y = bounds.y + style->padding.y;
+ bounds.h = NK_MAX(bounds.h, 2*style->padding.y);
+ bounds.w = NK_MAX(bounds.w, 2*style->padding.x + style->cursor_size.x);
+ bounds.w -= 2 * style->padding.x;
+ bounds.h -= 2 * style->padding.y;
+
+ /* optional buttons */
+ if (style->show_buttons) {
+ nk_flags ws;
+ struct nk_rect button;
+ button.y = bounds.y;
+ button.w = bounds.h;
+ button.h = bounds.h;
+
+ /* decrement button */
+ button.x = bounds.x;
+ if (nk_do_button_symbol(&ws, out, button, style->dec_symbol, NK_BUTTON_DEFAULT,
+ &style->dec_button, in, font))
+ val -= step;
+
+ /* increment button */
+ button.x = (bounds.x + bounds.w) - button.w;
+ if (nk_do_button_symbol(&ws, out, button, style->inc_symbol, NK_BUTTON_DEFAULT,
+ &style->inc_button, in, font))
+ val += step;
+
+ bounds.x = bounds.x + button.w + style->spacing.x;
+ bounds.w = bounds.w - (2*button.w + 2*style->spacing.x);
+ }
+
+ /* remove one cursor size to support visual cursor */
+ bounds.x += style->cursor_size.x*0.5f;
+ bounds.w -= style->cursor_size.x;
+
+ /* make sure the provided values are correct */
+ slider_max = NK_MAX(min, max);
+ slider_min = NK_MIN(min, max);
+ slider_value = NK_CLAMP(slider_min, val, slider_max);
+ slider_range = slider_max - slider_min;
+ slider_steps = slider_range / step;
+ cursor_offset = (slider_value - slider_min) / step;
+
+ /* calculate cursor
+ Basically you have two cursors. One for visual representation and interaction
+ and one for updating the actual cursor value. */
+ logical_cursor.h = bounds.h;
+ logical_cursor.w = bounds.w / slider_steps;
+ logical_cursor.x = bounds.x + (logical_cursor.w * cursor_offset);
+ logical_cursor.y = bounds.y;
+
+ visual_cursor.h = style->cursor_size.y;
+ visual_cursor.w = style->cursor_size.x;
+ visual_cursor.y = (bounds.y + bounds.h*0.5f) - visual_cursor.h*0.5f;
+ visual_cursor.x = logical_cursor.x - visual_cursor.w*0.5f;
+
+ slider_value = nk_slider_behavior(state, &logical_cursor, &visual_cursor,
+ in, bounds, slider_min, slider_max, slider_value, step, slider_steps);
+ visual_cursor.x = logical_cursor.x - visual_cursor.w*0.5f;
+
+ /* draw slider */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_slider(out, *state, style, &bounds, &visual_cursor, slider_min, slider_value, slider_max);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return slider_value;
+}
+NK_API int
+nk_slider_float(struct nk_context *ctx, float min_value, float *value, float max_value,
+ float value_step)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ struct nk_input *in;
+ const struct nk_style *style;
+
+ int ret = 0;
+ float old_value;
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ NK_ASSERT(value);
+ if (!ctx || !ctx->current || !ctx->current->layout || !value)
+ return ret;
+
+ win = ctx->current;
+ style = &ctx->style;
+ layout = win->layout;
+
+ state = nk_widget(&bounds, ctx);
+ if (!state) return ret;
+ in = (/*state == NK_WIDGET_ROM || */ layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+
+ old_value = *value;
+ *value = nk_do_slider(&ctx->last_widget_state, &win->buffer, bounds, min_value,
+ old_value, max_value, value_step, &style->slider, in, style->font);
+ return (old_value > *value || old_value < *value);
+}
+NK_API float
+nk_slide_float(struct nk_context *ctx, float min, float val, float max, float step)
+{
+ nk_slider_float(ctx, min, &val, max, step); return val;
+}
+NK_API int
+nk_slide_int(struct nk_context *ctx, int min, int val, int max, int step)
+{
+ float value = (float)val;
+ nk_slider_float(ctx, (float)min, &value, (float)max, (float)step);
+ return (int)value;
+}
+NK_API int
+nk_slider_int(struct nk_context *ctx, int min, int *val, int max, int step)
+{
+ int ret;
+ float value = (float)*val;
+ ret = nk_slider_float(ctx, (float)min, &value, (float)max, (float)step);
+ *val = (int)value;
+ return ret;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * PROGRESS
+ *
+ * ===============================================================*/
+NK_LIB nk_size
+nk_progress_behavior(nk_flags *state, struct nk_input *in,
+ struct nk_rect r, struct nk_rect cursor, nk_size max, nk_size value, int modifiable)
+{
+ int left_mouse_down = 0;
+ int left_mouse_click_in_cursor = 0;
+
+ nk_widget_state_reset(state);
+ if (!in || !modifiable) return value;
+ left_mouse_down = in && in->mouse.buttons[NK_BUTTON_LEFT].down;
+ left_mouse_click_in_cursor = in && nk_input_has_mouse_click_down_in_rect(in,
+ NK_BUTTON_LEFT, cursor, nk_true);
+ if (nk_input_is_mouse_hovering_rect(in, r))
+ *state = NK_WIDGET_STATE_HOVERED;
+
+ if (in && left_mouse_down && left_mouse_click_in_cursor) {
+ if (left_mouse_down && left_mouse_click_in_cursor) {
+ float ratio = NK_MAX(0, (float)(in->mouse.pos.x - cursor.x)) / (float)cursor.w;
+ value = (nk_size)NK_CLAMP(0, (float)max * ratio, (float)max);
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = cursor.x + cursor.w/2.0f;
+ *state |= NK_WIDGET_STATE_ACTIVE;
+ }
+ }
+ /* set progressbar widget state */
+ if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, r))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(in, r))
+ *state |= NK_WIDGET_STATE_LEFT;
+ return value;
+}
+NK_LIB void
+nk_draw_progress(struct nk_command_buffer *out, nk_flags state,
+ const struct nk_style_progress *style, const struct nk_rect *bounds,
+ const struct nk_rect *scursor, nk_size value, nk_size max)
+{
+ const struct nk_style_item *background;
+ const struct nk_style_item *cursor;
+
+ NK_UNUSED(max);
+ NK_UNUSED(value);
+
+ /* select correct colors/images to draw */
+ if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->active;
+ cursor = &style->cursor_active;
+ } else if (state & NK_WIDGET_STATE_HOVER){
+ background = &style->hover;
+ cursor = &style->cursor_hover;
+ } else {
+ background = &style->normal;
+ cursor = &style->cursor_normal;
+ }
+
+ /* draw background */
+ if (background->type == NK_STYLE_ITEM_COLOR) {
+ nk_fill_rect(out, *bounds, style->rounding, background->data.color);
+ nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
+ } else nk_draw_image(out, *bounds, &background->data.image, nk_white);
+
+ /* draw cursor */
+ if (cursor->type == NK_STYLE_ITEM_COLOR) {
+ nk_fill_rect(out, *scursor, style->rounding, cursor->data.color);
+ nk_stroke_rect(out, *scursor, style->rounding, style->border, style->border_color);
+ } else nk_draw_image(out, *scursor, &cursor->data.image, nk_white);
+}
+NK_LIB nk_size
+nk_do_progress(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect bounds,
+ nk_size value, nk_size max, int modifiable,
+ const struct nk_style_progress *style, struct nk_input *in)
+{
+ float prog_scale;
+ nk_size prog_value;
+ struct nk_rect cursor;
+
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ if (!out || !style) return 0;
+
+ /* calculate progressbar cursor */
+ cursor.w = NK_MAX(bounds.w, 2 * style->padding.x + 2 * style->border);
+ cursor.h = NK_MAX(bounds.h, 2 * style->padding.y + 2 * style->border);
+ cursor = nk_pad_rect(bounds, nk_vec2(style->padding.x + style->border, style->padding.y + style->border));
+ prog_scale = (float)value / (float)max;
+
+ /* update progressbar */
+ prog_value = NK_MIN(value, max);
+ prog_value = nk_progress_behavior(state, in, bounds, cursor,max, prog_value, modifiable);
+ cursor.w = cursor.w * prog_scale;
+
+ /* draw progressbar */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_progress(out, *state, style, &bounds, &cursor, value, max);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return prog_value;
+}
+NK_API int
+nk_progress(struct nk_context *ctx, nk_size *cur, nk_size max, int is_modifyable)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_style *style;
+ struct nk_input *in;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+ nk_size old_value;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(cur);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !cur)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ layout = win->layout;
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ old_value = *cur;
+ *cur = nk_do_progress(&ctx->last_widget_state, &win->buffer, bounds,
+ *cur, max, is_modifyable, &style->progress, in);
+ return (*cur != old_value);
+}
+NK_API nk_size
+nk_prog(struct nk_context *ctx, nk_size cur, nk_size max, int modifyable)
+{
+ nk_progress(ctx, &cur, max, modifyable);
+ return cur;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * SCROLLBAR
+ *
+ * ===============================================================*/
+NK_LIB float
+nk_scrollbar_behavior(nk_flags *state, struct nk_input *in,
+ int has_scrolling, const struct nk_rect *scroll,
+ const struct nk_rect *cursor, const struct nk_rect *empty0,
+ const struct nk_rect *empty1, float scroll_offset,
+ float target, float scroll_step, enum nk_orientation o)
+{
+ nk_flags ws = 0;
+ int left_mouse_down;
+ int left_mouse_click_in_cursor;
+ float scroll_delta;
+
+ nk_widget_state_reset(state);
+ if (!in) return scroll_offset;
+
+ left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;
+ left_mouse_click_in_cursor = nk_input_has_mouse_click_down_in_rect(in,
+ NK_BUTTON_LEFT, *cursor, nk_true);
+ if (nk_input_is_mouse_hovering_rect(in, *scroll))
+ *state = NK_WIDGET_STATE_HOVERED;
+
+ scroll_delta = (o == NK_VERTICAL) ? in->mouse.scroll_delta.y: in->mouse.scroll_delta.x;
+ if (left_mouse_down && left_mouse_click_in_cursor) {
+ /* update cursor by mouse dragging */
+ float pixel, delta;
+ *state = NK_WIDGET_STATE_ACTIVE;
+ if (o == NK_VERTICAL) {
+ float cursor_y;
+ pixel = in->mouse.delta.y;
+ delta = (pixel / scroll->h) * target;
+ scroll_offset = NK_CLAMP(0, scroll_offset + delta, target - scroll->h);
+ cursor_y = scroll->y + ((scroll_offset/target) * scroll->h);
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y = cursor_y + cursor->h/2.0f;
+ } else {
+ float cursor_x;
+ pixel = in->mouse.delta.x;
+ delta = (pixel / scroll->w) * target;
+ scroll_offset = NK_CLAMP(0, scroll_offset + delta, target - scroll->w);
+ cursor_x = scroll->x + ((scroll_offset/target) * scroll->w);
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = cursor_x + cursor->w/2.0f;
+ }
+ } else if ((nk_input_is_key_pressed(in, NK_KEY_SCROLL_UP) && o == NK_VERTICAL && has_scrolling)||
+ nk_button_behavior(&ws, *empty0, in, NK_BUTTON_DEFAULT)) {
+ /* scroll page up by click on empty space or shortcut */
+ if (o == NK_VERTICAL)
+ scroll_offset = NK_MAX(0, scroll_offset - scroll->h);
+ else scroll_offset = NK_MAX(0, scroll_offset - scroll->w);
+ } else if ((nk_input_is_key_pressed(in, NK_KEY_SCROLL_DOWN) && o == NK_VERTICAL && has_scrolling) ||
+ nk_button_behavior(&ws, *empty1, in, NK_BUTTON_DEFAULT)) {
+ /* scroll page down by click on empty space or shortcut */
+ if (o == NK_VERTICAL)
+ scroll_offset = NK_MIN(scroll_offset + scroll->h, target - scroll->h);
+ else scroll_offset = NK_MIN(scroll_offset + scroll->w, target - scroll->w);
+ } else if (has_scrolling) {
+ if ((scroll_delta < 0 || (scroll_delta > 0))) {
+ /* update cursor by mouse scrolling */
+ scroll_offset = scroll_offset + scroll_step * (-scroll_delta);
+ if (o == NK_VERTICAL)
+ scroll_offset = NK_CLAMP(0, scroll_offset, target - scroll->h);
+ else scroll_offset = NK_CLAMP(0, scroll_offset, target - scroll->w);
+ } else if (nk_input_is_key_pressed(in, NK_KEY_SCROLL_START)) {
+ /* update cursor to the beginning */
+ if (o == NK_VERTICAL) scroll_offset = 0;
+ } else if (nk_input_is_key_pressed(in, NK_KEY_SCROLL_END)) {
+ /* update cursor to the end */
+ if (o == NK_VERTICAL) scroll_offset = target - scroll->h;
+ }
+ }
+ if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, *scroll))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(in, *scroll))
+ *state |= NK_WIDGET_STATE_LEFT;
+ return scroll_offset;
+}
+NK_LIB void
+nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state,
+ const struct nk_style_scrollbar *style, const struct nk_rect *bounds,
+ const struct nk_rect *scroll)
+{
+ const struct nk_style_item *background;
+ const struct nk_style_item *cursor;
+
+ /* select correct colors/images to draw */
+ if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->active;
+ cursor = &style->cursor_active;
+ } else if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ cursor = &style->cursor_hover;
+ } else {
+ background = &style->normal;
+ cursor = &style->cursor_normal;
+ }
+
+ /* draw background */
+ if (background->type == NK_STYLE_ITEM_COLOR) {
+ nk_fill_rect(out, *bounds, style->rounding, background->data.color);
+ nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);
+ } else {
+ nk_draw_image(out, *bounds, &background->data.image, nk_white);
+ }
+
+ /* draw cursor */
+ if (cursor->type == NK_STYLE_ITEM_COLOR) {
+ nk_fill_rect(out, *scroll, style->rounding_cursor, cursor->data.color);
+ nk_stroke_rect(out, *scroll, style->rounding_cursor, style->border_cursor, style->cursor_border_color);
+ } else nk_draw_image(out, *scroll, &cursor->data.image, nk_white);
+}
+NK_LIB float
+nk_do_scrollbarv(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling,
+ float offset, float target, float step, float button_pixel_inc,
+ const struct nk_style_scrollbar *style, struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ struct nk_rect empty_north;
+ struct nk_rect empty_south;
+ struct nk_rect cursor;
+
+ float scroll_step;
+ float scroll_offset;
+ float scroll_off;
+ float scroll_ratio;
+
+ NK_ASSERT(out);
+ NK_ASSERT(style);
+ NK_ASSERT(state);
+ if (!out || !style) return 0;
+
+ scroll.w = NK_MAX(scroll.w, 1);
+ scroll.h = NK_MAX(scroll.h, 0);
+ if (target <= scroll.h) return 0;
+
+ /* optional scrollbar buttons */
+ if (style->show_buttons) {
+ nk_flags ws;
+ float scroll_h;
+ struct nk_rect button;
+
+ button.x = scroll.x;
+ button.w = scroll.w;
+ button.h = scroll.w;
+
+ scroll_h = NK_MAX(scroll.h - 2 * button.h,0);
+ scroll_step = NK_MIN(step, button_pixel_inc);
+
+ /* decrement button */
+ button.y = scroll.y;
+ if (nk_do_button_symbol(&ws, out, button, style->dec_symbol,
+ NK_BUTTON_REPEATER, &style->dec_button, in, font))
+ offset = offset - scroll_step;
+
+ /* increment button */
+ button.y = scroll.y + scroll.h - button.h;
+ if (nk_do_button_symbol(&ws, out, button, style->inc_symbol,
+ NK_BUTTON_REPEATER, &style->inc_button, in, font))
+ offset = offset + scroll_step;
+
+ scroll.y = scroll.y + button.h;
+ scroll.h = scroll_h;
+ }
+
+ /* calculate scrollbar constants */
+ scroll_step = NK_MIN(step, scroll.h);
+ scroll_offset = NK_CLAMP(0, offset, target - scroll.h);
+ scroll_ratio = scroll.h / target;
+ scroll_off = scroll_offset / target;
+
+ /* calculate scrollbar cursor bounds */
+ cursor.h = NK_MAX((scroll_ratio * scroll.h) - (2*style->border + 2*style->padding.y), 0);
+ cursor.y = scroll.y + (scroll_off * scroll.h) + style->border + style->padding.y;
+ cursor.w = scroll.w - (2 * style->border + 2 * style->padding.x);
+ cursor.x = scroll.x + style->border + style->padding.x;
+
+ /* calculate empty space around cursor */
+ empty_north.x = scroll.x;
+ empty_north.y = scroll.y;
+ empty_north.w = scroll.w;
+ empty_north.h = NK_MAX(cursor.y - scroll.y, 0);
+
+ empty_south.x = scroll.x;
+ empty_south.y = cursor.y + cursor.h;
+ empty_south.w = scroll.w;
+ empty_south.h = NK_MAX((scroll.y + scroll.h) - (cursor.y + cursor.h), 0);
+
+ /* update scrollbar */
+ scroll_offset = nk_scrollbar_behavior(state, in, has_scrolling, &scroll, &cursor,
+ &empty_north, &empty_south, scroll_offset, target, scroll_step, NK_VERTICAL);
+ scroll_off = scroll_offset / target;
+ cursor.y = scroll.y + (scroll_off * scroll.h) + style->border_cursor + style->padding.y;
+
+ /* draw scrollbar */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_scrollbar(out, *state, style, &scroll, &cursor);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return scroll_offset;
+}
+NK_LIB float
+nk_do_scrollbarh(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling,
+ float offset, float target, float step, float button_pixel_inc,
+ const struct nk_style_scrollbar *style, struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ struct nk_rect cursor;
+ struct nk_rect empty_west;
+ struct nk_rect empty_east;
+
+ float scroll_step;
+ float scroll_offset;
+ float scroll_off;
+ float scroll_ratio;
+
+ NK_ASSERT(out);
+ NK_ASSERT(style);
+ if (!out || !style) return 0;
+
+ /* scrollbar background */
+ scroll.h = NK_MAX(scroll.h, 1);
+ scroll.w = NK_MAX(scroll.w, 2 * scroll.h);
+ if (target <= scroll.w) return 0;
+
+ /* optional scrollbar buttons */
+ if (style->show_buttons) {
+ nk_flags ws;
+ float scroll_w;
+ struct nk_rect button;
+ button.y = scroll.y;
+ button.w = scroll.h;
+ button.h = scroll.h;
+
+ scroll_w = scroll.w - 2 * button.w;
+ scroll_step = NK_MIN(step, button_pixel_inc);
+
+ /* decrement button */
+ button.x = scroll.x;
+ if (nk_do_button_symbol(&ws, out, button, style->dec_symbol,
+ NK_BUTTON_REPEATER, &style->dec_button, in, font))
+ offset = offset - scroll_step;
+
+ /* increment button */
+ button.x = scroll.x + scroll.w - button.w;
+ if (nk_do_button_symbol(&ws, out, button, style->inc_symbol,
+ NK_BUTTON_REPEATER, &style->inc_button, in, font))
+ offset = offset + scroll_step;
+
+ scroll.x = scroll.x + button.w;
+ scroll.w = scroll_w;
+ }
+
+ /* calculate scrollbar constants */
+ scroll_step = NK_MIN(step, scroll.w);
+ scroll_offset = NK_CLAMP(0, offset, target - scroll.w);
+ scroll_ratio = scroll.w / target;
+ scroll_off = scroll_offset / target;
+
+ /* calculate cursor bounds */
+ cursor.w = (scroll_ratio * scroll.w) - (2*style->border + 2*style->padding.x);
+ cursor.x = scroll.x + (scroll_off * scroll.w) + style->border + style->padding.x;
+ cursor.h = scroll.h - (2 * style->border + 2 * style->padding.y);
+ cursor.y = scroll.y + style->border + style->padding.y;
+
+ /* calculate empty space around cursor */
+ empty_west.x = scroll.x;
+ empty_west.y = scroll.y;
+ empty_west.w = cursor.x - scroll.x;
+ empty_west.h = scroll.h;
+
+ empty_east.x = cursor.x + cursor.w;
+ empty_east.y = scroll.y;
+ empty_east.w = (scroll.x + scroll.w) - (cursor.x + cursor.w);
+ empty_east.h = scroll.h;
+
+ /* update scrollbar */
+ scroll_offset = nk_scrollbar_behavior(state, in, has_scrolling, &scroll, &cursor,
+ &empty_west, &empty_east, scroll_offset, target, scroll_step, NK_HORIZONTAL);
+ scroll_off = scroll_offset / target;
+ cursor.x = scroll.x + (scroll_off * scroll.w);
+
+ /* draw scrollbar */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_scrollbar(out, *state, style, &scroll, &cursor);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+ return scroll_offset;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * TEXT EDITOR
+ *
+ * ===============================================================*/
+/* stb_textedit.h - v1.8 - public domain - Sean Barrett */
+struct nk_text_find {
+ float x,y; /* position of n'th character */
+ float height; /* height of line */
+ int first_char, length; /* first char of row, and length */
+ int prev_first; /*_ first char of previous row */
+};
+
+struct nk_text_edit_row {
+ float x0,x1;
+ /* starting x location, end x location (allows for align=right, etc) */
+ float baseline_y_delta;
+ /* position of baseline relative to previous row's baseline*/
+ float ymin,ymax;
+ /* height of row above and below baseline */
+ int num_chars;
+};
+
+/* forward declarations */
+NK_INTERN void nk_textedit_makeundo_delete(struct nk_text_edit*, int, int);
+NK_INTERN void nk_textedit_makeundo_insert(struct nk_text_edit*, int, int);
+NK_INTERN void nk_textedit_makeundo_replace(struct nk_text_edit*, int, int, int);
+#define NK_TEXT_HAS_SELECTION(s) ((s)->select_start != (s)->select_end)
+
+NK_INTERN float
+nk_textedit_get_width(const struct nk_text_edit *edit, int line_start, int char_id,
+ const struct nk_user_font *font)
+{
+ int len = 0;
+ nk_rune unicode = 0;
+ const char *str = nk_str_at_const(&edit->string, line_start + char_id, &unicode, &len);
+ return font->width(font->userdata, font->height, str, len);
+}
+NK_INTERN void
+nk_textedit_layout_row(struct nk_text_edit_row *r, struct nk_text_edit *edit,
+ int line_start_id, float row_height, const struct nk_user_font *font)
+{
+ int l;
+ int glyphs = 0;
+ nk_rune unicode;
+ const char *remaining;
+ int len = nk_str_len_char(&edit->string);
+ const char *end = nk_str_get_const(&edit->string) + len;
+ const char *text = nk_str_at_const(&edit->string, line_start_id, &unicode, &l);
+ const struct nk_vec2 size = nk_text_calculate_text_bounds(font,
+ text, (int)(end - text), row_height, &remaining, 0, &glyphs, NK_STOP_ON_NEW_LINE);
+
+ r->x0 = 0.0f;
+ r->x1 = size.x;
+ r->baseline_y_delta = size.y;
+ r->ymin = 0.0f;
+ r->ymax = size.y;
+ r->num_chars = glyphs;
+}
+NK_INTERN int
+nk_textedit_locate_coord(struct nk_text_edit *edit, float x, float y,
+ const struct nk_user_font *font, float row_height)
+{
+ struct nk_text_edit_row r;
+ int n = edit->string.len;
+ float base_y = 0, prev_x;
+ int i=0, k;
+
+ r.x0 = r.x1 = 0;
+ r.ymin = r.ymax = 0;
+ r.num_chars = 0;
+
+ /* search rows to find one that straddles 'y' */
+ while (i < n) {
+ nk_textedit_layout_row(&r, edit, i, row_height, font);
+ if (r.num_chars <= 0)
+ return n;
+
+ if (i==0 && y < base_y + r.ymin)
+ return 0;
+
+ if (y < base_y + r.ymax)
+ break;
+
+ i += r.num_chars;
+ base_y += r.baseline_y_delta;
+ }
+
+ /* below all text, return 'after' last character */
+ if (i >= n)
+ return n;
+
+ /* check if it's before the beginning of the line */
+ if (x < r.x0)
+ return i;
+
+ /* check if it's before the end of the line */
+ if (x < r.x1) {
+ /* search characters in row for one that straddles 'x' */
+ k = i;
+ prev_x = r.x0;
+ for (i=0; i < r.num_chars; ++i) {
+ float w = nk_textedit_get_width(edit, k, i, font);
+ if (x < prev_x+w) {
+ if (x < prev_x+w/2)
+ return k+i;
+ else return k+i+1;
+ }
+ prev_x += w;
+ }
+ /* shouldn't happen, but if it does, fall through to end-of-line case */
+ }
+
+ /* if the last character is a newline, return that.
+ * otherwise return 'after' the last character */
+ if (nk_str_rune_at(&edit->string, i+r.num_chars-1) == '\n')
+ return i+r.num_chars-1;
+ else return i+r.num_chars;
+}
+NK_LIB void
+nk_textedit_click(struct nk_text_edit *state, float x, float y,
+ const struct nk_user_font *font, float row_height)
+{
+ /* API click: on mouse down, move the cursor to the clicked location,
+ * and reset the selection */
+ state->cursor = nk_textedit_locate_coord(state, x, y, font, row_height);
+ state->select_start = state->cursor;
+ state->select_end = state->cursor;
+ state->has_preferred_x = 0;
+}
+NK_LIB void
+nk_textedit_drag(struct nk_text_edit *state, float x, float y,
+ const struct nk_user_font *font, float row_height)
+{
+ /* API drag: on mouse drag, move the cursor and selection endpoint
+ * to the clicked location */
+ int p = nk_textedit_locate_coord(state, x, y, font, row_height);
+ if (state->select_start == state->select_end)
+ state->select_start = state->cursor;
+ state->cursor = state->select_end = p;
+}
+NK_INTERN void
+nk_textedit_find_charpos(struct nk_text_find *find, struct nk_text_edit *state,
+ int n, int single_line, const struct nk_user_font *font, float row_height)
+{
+ /* find the x/y location of a character, and remember info about the previous
+ * row in case we get a move-up event (for page up, we'll have to rescan) */
+ struct nk_text_edit_row r;
+ int prev_start = 0;
+ int z = state->string.len;
+ int i=0, first;
+
+ nk_zero_struct(r);
+ if (n == z) {
+ /* if it's at the end, then find the last line -- simpler than trying to
+ explicitly handle this case in the regular code */
+ nk_textedit_layout_row(&r, state, 0, row_height, font);
+ if (single_line) {
+ find->first_char = 0;
+ find->length = z;
+ } else {
+ while (i < z) {
+ prev_start = i;
+ i += r.num_chars;
+ nk_textedit_layout_row(&r, state, i, row_height, font);
+ }
+
+ find->first_char = i;
+ find->length = r.num_chars;
+ }
+ find->x = r.x1;
+ find->y = r.ymin;
+ find->height = r.ymax - r.ymin;
+ find->prev_first = prev_start;
+ return;
+ }
+
+ /* search rows to find the one that straddles character n */
+ find->y = 0;
+
+ for(;;) {
+ nk_textedit_layout_row(&r, state, i, row_height, font);
+ if (n < i + r.num_chars) break;
+ prev_start = i;
+ i += r.num_chars;
+ find->y += r.baseline_y_delta;
+ }
+
+ find->first_char = first = i;
+ find->length = r.num_chars;
+ find->height = r.ymax - r.ymin;
+ find->prev_first = prev_start;
+
+ /* now scan to find xpos */
+ find->x = r.x0;
+ for (i=0; first+i < n; ++i)
+ find->x += nk_textedit_get_width(state, first, i, font);
+}
+NK_INTERN void
+nk_textedit_clamp(struct nk_text_edit *state)
+{
+ /* make the selection/cursor state valid if client altered the string */
+ int n = state->string.len;
+ if (NK_TEXT_HAS_SELECTION(state)) {
+ if (state->select_start > n) state->select_start = n;
+ if (state->select_end > n) state->select_end = n;
+ /* if clamping forced them to be equal, move the cursor to match */
+ if (state->select_start == state->select_end)
+ state->cursor = state->select_start;
+ }
+ if (state->cursor > n) state->cursor = n;
+}
+NK_API void
+nk_textedit_delete(struct nk_text_edit *state, int where, int len)
+{
+ /* delete characters while updating undo */
+ nk_textedit_makeundo_delete(state, where, len);
+ nk_str_delete_runes(&state->string, where, len);
+ state->has_preferred_x = 0;
+}
+NK_API void
+nk_textedit_delete_selection(struct nk_text_edit *state)
+{
+ /* delete the section */
+ nk_textedit_clamp(state);
+ if (NK_TEXT_HAS_SELECTION(state)) {
+ if (state->select_start < state->select_end) {
+ nk_textedit_delete(state, state->select_start,
+ state->select_end - state->select_start);
+ state->select_end = state->cursor = state->select_start;
+ } else {
+ nk_textedit_delete(state, state->select_end,
+ state->select_start - state->select_end);
+ state->select_start = state->cursor = state->select_end;
+ }
+ state->has_preferred_x = 0;
+ }
+}
+NK_INTERN void
+nk_textedit_sortselection(struct nk_text_edit *state)
+{
+ /* canonicalize the selection so start <= end */
+ if (state->select_end < state->select_start) {
+ int temp = state->select_end;
+ state->select_end = state->select_start;
+ state->select_start = temp;
+ }
+}
+NK_INTERN void
+nk_textedit_move_to_first(struct nk_text_edit *state)
+{
+ /* move cursor to first character of selection */
+ if (NK_TEXT_HAS_SELECTION(state)) {
+ nk_textedit_sortselection(state);
+ state->cursor = state->select_start;
+ state->select_end = state->select_start;
+ state->has_preferred_x = 0;
+ }
+}
+NK_INTERN void
+nk_textedit_move_to_last(struct nk_text_edit *state)
+{
+ /* move cursor to last character of selection */
+ if (NK_TEXT_HAS_SELECTION(state)) {
+ nk_textedit_sortselection(state);
+ nk_textedit_clamp(state);
+ state->cursor = state->select_end;
+ state->select_start = state->select_end;
+ state->has_preferred_x = 0;
+ }
+}
+NK_INTERN int
+nk_is_word_boundary( struct nk_text_edit *state, int idx)
+{
+ int len;
+ nk_rune c;
+ if (idx <= 0) return 1;
+ if (!nk_str_at_rune(&state->string, idx, &c, &len)) return 1;
+ return (c == ' ' || c == '\t' ||c == 0x3000 || c == ',' || c == ';' ||
+ c == '(' || c == ')' || c == '{' || c == '}' || c == '[' || c == ']' ||
+ c == '|');
+}
+NK_INTERN int
+nk_textedit_move_to_word_previous(struct nk_text_edit *state)
+{
+ int c = state->cursor - 1;
+ while( c >= 0 && !nk_is_word_boundary(state, c))
+ --c;
+
+ if( c < 0 )
+ c = 0;
+
+ return c;
+}
+NK_INTERN int
+nk_textedit_move_to_word_next(struct nk_text_edit *state)
+{
+ const int len = state->string.len;
+ int c = state->cursor+1;
+ while( c < len && !nk_is_word_boundary(state, c))
+ ++c;
+
+ if( c > len )
+ c = len;
+
+ return c;
+}
+NK_INTERN void
+nk_textedit_prep_selection_at_cursor(struct nk_text_edit *state)
+{
+ /* update selection and cursor to match each other */
+ if (!NK_TEXT_HAS_SELECTION(state))
+ state->select_start = state->select_end = state->cursor;
+ else state->cursor = state->select_end;
+}
+NK_API int
+nk_textedit_cut(struct nk_text_edit *state)
+{
+ /* API cut: delete selection */
+ if (state->mode == NK_TEXT_EDIT_MODE_VIEW)
+ return 0;
+ if (NK_TEXT_HAS_SELECTION(state)) {
+ nk_textedit_delete_selection(state); /* implicitly clamps */
+ state->has_preferred_x = 0;
+ return 1;
+ }
+ return 0;
+}
+NK_API int
+nk_textedit_paste(struct nk_text_edit *state, char const *ctext, int len)
+{
+ /* API paste: replace existing selection with passed-in text */
+ int glyphs;
+ const char *text = (const char *) ctext;
+ if (state->mode == NK_TEXT_EDIT_MODE_VIEW) return 0;
+
+ /* if there's a selection, the paste should delete it */
+ nk_textedit_clamp(state);
+ nk_textedit_delete_selection(state);
+
+ /* try to insert the characters */
+ glyphs = nk_utf_len(ctext, len);
+ if (nk_str_insert_text_char(&state->string, state->cursor, text, len)) {
+ nk_textedit_makeundo_insert(state, state->cursor, glyphs);
+ state->cursor += len;
+ state->has_preferred_x = 0;
+ return 1;
+ }
+ /* remove the undo since we didn't actually insert the characters */
+ if (state->undo.undo_point)
+ --state->undo.undo_point;
+ return 0;
+}
+NK_API void
+nk_textedit_text(struct nk_text_edit *state, const char *text, int total_len)
+{
+ nk_rune unicode;
+ int glyph_len;
+ int text_len = 0;
+
+ NK_ASSERT(state);
+ NK_ASSERT(text);
+ if (!text || !total_len || state->mode == NK_TEXT_EDIT_MODE_VIEW) return;
+
+ glyph_len = nk_utf_decode(text, &unicode, total_len);
+ while ((text_len < total_len) && glyph_len)
+ {
+ /* don't insert a backward delete, just process the event */
+ if (unicode == 127) goto next;
+ /* can't add newline in single-line mode */
+ if (unicode == '\n' && state->single_line) goto next;
+ /* filter incoming text */
+ if (state->filter && !state->filter(state, unicode)) goto next;
+
+ if (!NK_TEXT_HAS_SELECTION(state) &&
+ state->cursor < state->string.len)
+ {
+ if (state->mode == NK_TEXT_EDIT_MODE_REPLACE) {
+ nk_textedit_makeundo_replace(state, state->cursor, 1, 1);
+ nk_str_delete_runes(&state->string, state->cursor, 1);
+ }
+ if (nk_str_insert_text_utf8(&state->string, state->cursor,
+ text+text_len, 1))
+ {
+ ++state->cursor;
+ state->has_preferred_x = 0;
+ }
+ } else {
+ nk_textedit_delete_selection(state); /* implicitly clamps */
+ if (nk_str_insert_text_utf8(&state->string, state->cursor,
+ text+text_len, 1))
+ {
+ nk_textedit_makeundo_insert(state, state->cursor, 1);
+ ++state->cursor;
+ state->has_preferred_x = 0;
+ }
+ }
+ next:
+ text_len += glyph_len;
+ glyph_len = nk_utf_decode(text + text_len, &unicode, total_len-text_len);
+ }
+}
+NK_LIB void
+nk_textedit_key(struct nk_text_edit *state, enum nk_keys key, int shift_mod,
+ const struct nk_user_font *font, float row_height)
+{
+retry:
+ switch (key)
+ {
+ case NK_KEY_NONE:
+ case NK_KEY_CTRL:
+ case NK_KEY_ENTER:
+ case NK_KEY_SHIFT:
+ case NK_KEY_TAB:
+ case NK_KEY_COPY:
+ case NK_KEY_CUT:
+ case NK_KEY_PASTE:
+ case NK_KEY_MAX:
+ default: break;
+ case NK_KEY_TEXT_UNDO:
+ nk_textedit_undo(state);
+ state->has_preferred_x = 0;
+ break;
+
+ case NK_KEY_TEXT_REDO:
+ nk_textedit_redo(state);
+ state->has_preferred_x = 0;
+ break;
+
+ case NK_KEY_TEXT_SELECT_ALL:
+ nk_textedit_select_all(state);
+ state->has_preferred_x = 0;
+ break;
+
+ case NK_KEY_TEXT_INSERT_MODE:
+ if (state->mode == NK_TEXT_EDIT_MODE_VIEW)
+ state->mode = NK_TEXT_EDIT_MODE_INSERT;
+ break;
+ case NK_KEY_TEXT_REPLACE_MODE:
+ if (state->mode == NK_TEXT_EDIT_MODE_VIEW)
+ state->mode = NK_TEXT_EDIT_MODE_REPLACE;
+ break;
+ case NK_KEY_TEXT_RESET_MODE:
+ if (state->mode == NK_TEXT_EDIT_MODE_INSERT ||
+ state->mode == NK_TEXT_EDIT_MODE_REPLACE)
+ state->mode = NK_TEXT_EDIT_MODE_VIEW;
+ break;
+
+ case NK_KEY_LEFT:
+ if (shift_mod) {
+ nk_textedit_clamp(state);
+ nk_textedit_prep_selection_at_cursor(state);
+ /* move selection left */
+ if (state->select_end > 0)
+ --state->select_end;
+ state->cursor = state->select_end;
+ state->has_preferred_x = 0;
+ } else {
+ /* if currently there's a selection,
+ * move cursor to start of selection */
+ if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_move_to_first(state);
+ else if (state->cursor > 0)
+ --state->cursor;
+ state->has_preferred_x = 0;
+ } break;
+
+ case NK_KEY_RIGHT:
+ if (shift_mod) {
+ nk_textedit_prep_selection_at_cursor(state);
+ /* move selection right */
+ ++state->select_end;
+ nk_textedit_clamp(state);
+ state->cursor = state->select_end;
+ state->has_preferred_x = 0;
+ } else {
+ /* if currently there's a selection,
+ * move cursor to end of selection */
+ if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_move_to_last(state);
+ else ++state->cursor;
+ nk_textedit_clamp(state);
+ state->has_preferred_x = 0;
+ } break;
+
+ case NK_KEY_TEXT_WORD_LEFT:
+ if (shift_mod) {
+ if( !NK_TEXT_HAS_SELECTION( state ) )
+ nk_textedit_prep_selection_at_cursor(state);
+ state->cursor = nk_textedit_move_to_word_previous(state);
+ state->select_end = state->cursor;
+ nk_textedit_clamp(state );
+ } else {
+ if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_move_to_first(state);
+ else {
+ state->cursor = nk_textedit_move_to_word_previous(state);
+ nk_textedit_clamp(state );
+ }
+ } break;
+
+ case NK_KEY_TEXT_WORD_RIGHT:
+ if (shift_mod) {
+ if( !NK_TEXT_HAS_SELECTION( state ) )
+ nk_textedit_prep_selection_at_cursor(state);
+ state->cursor = nk_textedit_move_to_word_next(state);
+ state->select_end = state->cursor;
+ nk_textedit_clamp(state);
+ } else {
+ if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_move_to_last(state);
+ else {
+ state->cursor = nk_textedit_move_to_word_next(state);
+ nk_textedit_clamp(state );
+ }
+ } break;
+
+ case NK_KEY_DOWN: {
+ struct nk_text_find find;
+ struct nk_text_edit_row row;
+ int i, sel = shift_mod;
+
+ if (state->single_line) {
+ /* on windows, up&down in single-line behave like left&right */
+ key = NK_KEY_RIGHT;
+ goto retry;
+ }
+
+ if (sel)
+ nk_textedit_prep_selection_at_cursor(state);
+ else if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_move_to_last(state);
+
+ /* compute current position of cursor point */
+ nk_textedit_clamp(state);
+ nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,
+ font, row_height);
+
+ /* now find character position down a row */
+ if (find.length)
+ {
+ float x;
+ float goal_x = state->has_preferred_x ? state->preferred_x : find.x;
+ int start = find.first_char + find.length;
+
+ state->cursor = start;
+ nk_textedit_layout_row(&row, state, state->cursor, row_height, font);
+ x = row.x0;
+
+ for (i=0; i < row.num_chars && x < row.x1; ++i) {
+ float dx = nk_textedit_get_width(state, start, i, font);
+ x += dx;
+ if (x > goal_x)
+ break;
+ ++state->cursor;
+ }
+ nk_textedit_clamp(state);
+
+ state->has_preferred_x = 1;
+ state->preferred_x = goal_x;
+ if (sel)
+ state->select_end = state->cursor;
+ }
+ } break;
+
+ case NK_KEY_UP: {
+ struct nk_text_find find;
+ struct nk_text_edit_row row;
+ int i, sel = shift_mod;
+
+ if (state->single_line) {
+ /* on windows, up&down become left&right */
+ key = NK_KEY_LEFT;
+ goto retry;
+ }
+
+ if (sel)
+ nk_textedit_prep_selection_at_cursor(state);
+ else if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_move_to_first(state);
+
+ /* compute current position of cursor point */
+ nk_textedit_clamp(state);
+ nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,
+ font, row_height);
+
+ /* can only go up if there's a previous row */
+ if (find.prev_first != find.first_char) {
+ /* now find character position up a row */
+ float x;
+ float goal_x = state->has_preferred_x ? state->preferred_x : find.x;
+
+ state->cursor = find.prev_first;
+ nk_textedit_layout_row(&row, state, state->cursor, row_height, font);
+ x = row.x0;
+
+ for (i=0; i < row.num_chars && x < row.x1; ++i) {
+ float dx = nk_textedit_get_width(state, find.prev_first, i, font);
+ x += dx;
+ if (x > goal_x)
+ break;
+ ++state->cursor;
+ }
+ nk_textedit_clamp(state);
+
+ state->has_preferred_x = 1;
+ state->preferred_x = goal_x;
+ if (sel) state->select_end = state->cursor;
+ }
+ } break;
+
+ case NK_KEY_DEL:
+ if (state->mode == NK_TEXT_EDIT_MODE_VIEW)
+ break;
+ if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_delete_selection(state);
+ else {
+ int n = state->string.len;
+ if (state->cursor < n)
+ nk_textedit_delete(state, state->cursor, 1);
+ }
+ state->has_preferred_x = 0;
+ break;
+
+ case NK_KEY_BACKSPACE:
+ if (state->mode == NK_TEXT_EDIT_MODE_VIEW)
+ break;
+ if (NK_TEXT_HAS_SELECTION(state))
+ nk_textedit_delete_selection(state);
+ else {
+ nk_textedit_clamp(state);
+ if (state->cursor > 0) {
+ nk_textedit_delete(state, state->cursor-1, 1);
+ --state->cursor;
+ }
+ }
+ state->has_preferred_x = 0;
+ break;
+
+ case NK_KEY_TEXT_START:
+ if (shift_mod) {
+ nk_textedit_prep_selection_at_cursor(state);
+ state->cursor = state->select_end = 0;
+ state->has_preferred_x = 0;
+ } else {
+ state->cursor = state->select_start = state->select_end = 0;
+ state->has_preferred_x = 0;
+ }
+ break;
+
+ case NK_KEY_TEXT_END:
+ if (shift_mod) {
+ nk_textedit_prep_selection_at_cursor(state);
+ state->cursor = state->select_end = state->string.len;
+ state->has_preferred_x = 0;
+ } else {
+ state->cursor = state->string.len;
+ state->select_start = state->select_end = 0;
+ state->has_preferred_x = 0;
+ }
+ break;
+
+ case NK_KEY_TEXT_LINE_START: {
+ if (shift_mod) {
+ struct nk_text_find find;
+ nk_textedit_clamp(state);
+ nk_textedit_prep_selection_at_cursor(state);
+ if (state->string.len && state->cursor == state->string.len)
+ --state->cursor;
+ nk_textedit_find_charpos(&find, state,state->cursor, state->single_line,
+ font, row_height);
+ state->cursor = state->select_end = find.first_char;
+ state->has_preferred_x = 0;
+ } else {
+ struct nk_text_find find;
+ if (state->string.len && state->cursor == state->string.len)
+ --state->cursor;
+ nk_textedit_clamp(state);
+ nk_textedit_move_to_first(state);
+ nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,
+ font, row_height);
+ state->cursor = find.first_char;
+ state->has_preferred_x = 0;
+ }
+ } break;
+
+ case NK_KEY_TEXT_LINE_END: {
+ if (shift_mod) {
+ struct nk_text_find find;
+ nk_textedit_clamp(state);
+ nk_textedit_prep_selection_at_cursor(state);
+ nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,
+ font, row_height);
+ state->has_preferred_x = 0;
+ state->cursor = find.first_char + find.length;
+ if (find.length > 0 && nk_str_rune_at(&state->string, state->cursor-1) == '\n')
+ --state->cursor;
+ state->select_end = state->cursor;
+ } else {
+ struct nk_text_find find;
+ nk_textedit_clamp(state);
+ nk_textedit_move_to_first(state);
+ nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,
+ font, row_height);
+
+ state->has_preferred_x = 0;
+ state->cursor = find.first_char + find.length;
+ if (find.length > 0 && nk_str_rune_at(&state->string, state->cursor-1) == '\n')
+ --state->cursor;
+ }} break;
+ }
+}
+NK_INTERN void
+nk_textedit_flush_redo(struct nk_text_undo_state *state)
+{
+ state->redo_point = NK_TEXTEDIT_UNDOSTATECOUNT;
+ state->redo_char_point = NK_TEXTEDIT_UNDOCHARCOUNT;
+}
+NK_INTERN void
+nk_textedit_discard_undo(struct nk_text_undo_state *state)
+{
+ /* discard the oldest entry in the undo list */
+ if (state->undo_point > 0) {
+ /* if the 0th undo state has characters, clean those up */
+ if (state->undo_rec[0].char_storage >= 0) {
+ int n = state->undo_rec[0].insert_length, i;
+ /* delete n characters from all other records */
+ state->undo_char_point = (short)(state->undo_char_point - n);
+ NK_MEMCPY(state->undo_char, state->undo_char + n,
+ (nk_size)state->undo_char_point*sizeof(nk_rune));
+ for (i=0; i < state->undo_point; ++i) {
+ if (state->undo_rec[i].char_storage >= 0)
+ state->undo_rec[i].char_storage = (short)
+ (state->undo_rec[i].char_storage - n);
+ }
+ }
+ --state->undo_point;
+ NK_MEMCPY(state->undo_rec, state->undo_rec+1,
+ (nk_size)((nk_size)state->undo_point * sizeof(state->undo_rec[0])));
+ }
+}
+NK_INTERN void
+nk_textedit_discard_redo(struct nk_text_undo_state *state)
+{
+/* discard the oldest entry in the redo list--it's bad if this
+ ever happens, but because undo & redo have to store the actual
+ characters in different cases, the redo character buffer can
+ fill up even though the undo buffer didn't */
+ nk_size num;
+ int k = NK_TEXTEDIT_UNDOSTATECOUNT-1;
+ if (state->redo_point <= k) {
+ /* if the k'th undo state has characters, clean those up */
+ if (state->undo_rec[k].char_storage >= 0) {
+ int n = state->undo_rec[k].insert_length, i;
+ /* delete n characters from all other records */
+ state->redo_char_point = (short)(state->redo_char_point + n);
+ num = (nk_size)(NK_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point);
+ NK_MEMCPY(state->undo_char + state->redo_char_point,
+ state->undo_char + state->redo_char_point-n, num * sizeof(char));
+ for (i = state->redo_point; i < k; ++i) {
+ if (state->undo_rec[i].char_storage >= 0) {
+ state->undo_rec[i].char_storage = (short)
+ (state->undo_rec[i].char_storage + n);
+ }
+ }
+ }
+ ++state->redo_point;
+ num = (nk_size)(NK_TEXTEDIT_UNDOSTATECOUNT - state->redo_point);
+ if (num) NK_MEMCPY(state->undo_rec + state->redo_point-1,
+ state->undo_rec + state->redo_point, num * sizeof(state->undo_rec[0]));
+ }
+}
+NK_INTERN struct nk_text_undo_record*
+nk_textedit_create_undo_record(struct nk_text_undo_state *state, int numchars)
+{
+ /* any time we create a new undo record, we discard redo*/
+ nk_textedit_flush_redo(state);
+
+ /* if we have no free records, we have to make room,
+ * by sliding the existing records down */
+ if (state->undo_point == NK_TEXTEDIT_UNDOSTATECOUNT)
+ nk_textedit_discard_undo(state);
+
+ /* if the characters to store won't possibly fit in the buffer,
+ * we can't undo */
+ if (numchars > NK_TEXTEDIT_UNDOCHARCOUNT) {
+ state->undo_point = 0;
+ state->undo_char_point = 0;
+ return 0;
+ }
+
+ /* if we don't have enough free characters in the buffer,
+ * we have to make room */
+ while (state->undo_char_point + numchars > NK_TEXTEDIT_UNDOCHARCOUNT)
+ nk_textedit_discard_undo(state);
+ return &state->undo_rec[state->undo_point++];
+}
+NK_INTERN nk_rune*
+nk_textedit_createundo(struct nk_text_undo_state *state, int pos,
+ int insert_len, int delete_len)
+{
+ struct nk_text_undo_record *r = nk_textedit_create_undo_record(state, insert_len);
+ if (r == 0)
+ return 0;
+
+ r->where = pos;
+ r->insert_length = (short) insert_len;
+ r->delete_length = (short) delete_len;
+
+ if (insert_len == 0) {
+ r->char_storage = -1;
+ return 0;
+ } else {
+ r->char_storage = state->undo_char_point;
+ state->undo_char_point = (short)(state->undo_char_point + insert_len);
+ return &state->undo_char[r->char_storage];
+ }
+}
+NK_API void
+nk_textedit_undo(struct nk_text_edit *state)
+{
+ struct nk_text_undo_state *s = &state->undo;
+ struct nk_text_undo_record u, *r;
+ if (s->undo_point == 0)
+ return;
+
+ /* we need to do two things: apply the undo record, and create a redo record */
+ u = s->undo_rec[s->undo_point-1];
+ r = &s->undo_rec[s->redo_point-1];
+ r->char_storage = -1;
+
+ r->insert_length = u.delete_length;
+ r->delete_length = u.insert_length;
+ r->where = u.where;
+
+ if (u.delete_length)
+ {
+ /* if the undo record says to delete characters, then the redo record will
+ need to re-insert the characters that get deleted, so we need to store
+ them.
+ there are three cases:
+ - there's enough room to store the characters
+ - characters stored for *redoing* don't leave room for redo
+ - characters stored for *undoing* don't leave room for redo
+ if the last is true, we have to bail */
+ if (s->undo_char_point + u.delete_length >= NK_TEXTEDIT_UNDOCHARCOUNT) {
+ /* the undo records take up too much character space; there's no space
+ * to store the redo characters */
+ r->insert_length = 0;
+ } else {
+ int i;
+ /* there's definitely room to store the characters eventually */
+ while (s->undo_char_point + u.delete_length > s->redo_char_point) {
+ /* there's currently not enough room, so discard a redo record */
+ nk_textedit_discard_redo(s);
+ /* should never happen: */
+ if (s->redo_point == NK_TEXTEDIT_UNDOSTATECOUNT)
+ return;
+ }
+
+ r = &s->undo_rec[s->redo_point-1];
+ r->char_storage = (short)(s->redo_char_point - u.delete_length);
+ s->redo_char_point = (short)(s->redo_char_point - u.delete_length);
+
+ /* now save the characters */
+ for (i=0; i < u.delete_length; ++i)
+ s->undo_char[r->char_storage + i] =
+ nk_str_rune_at(&state->string, u.where + i);
+ }
+ /* now we can carry out the deletion */
+ nk_str_delete_runes(&state->string, u.where, u.delete_length);
+ }
+
+ /* check type of recorded action: */
+ if (u.insert_length) {
+ /* easy case: was a deletion, so we need to insert n characters */
+ nk_str_insert_text_runes(&state->string, u.where,
+ &s->undo_char[u.char_storage], u.insert_length);
+ s->undo_char_point = (short)(s->undo_char_point - u.insert_length);
+ }
+ state->cursor = (short)(u.where + u.insert_length);
+
+ s->undo_point--;
+ s->redo_point--;
+}
+NK_API void
+nk_textedit_redo(struct nk_text_edit *state)
+{
+ struct nk_text_undo_state *s = &state->undo;
+ struct nk_text_undo_record *u, r;
+ if (s->redo_point == NK_TEXTEDIT_UNDOSTATECOUNT)
+ return;
+
+ /* we need to do two things: apply the redo record, and create an undo record */
+ u = &s->undo_rec[s->undo_point];
+ r = s->undo_rec[s->redo_point];
+
+ /* we KNOW there must be room for the undo record, because the redo record
+ was derived from an undo record */
+ u->delete_length = r.insert_length;
+ u->insert_length = r.delete_length;
+ u->where = r.where;
+ u->char_storage = -1;
+
+ if (r.delete_length) {
+ /* the redo record requires us to delete characters, so the undo record
+ needs to store the characters */
+ if (s->undo_char_point + u->insert_length > s->redo_char_point) {
+ u->insert_length = 0;
+ u->delete_length = 0;
+ } else {
+ int i;
+ u->char_storage = s->undo_char_point;
+ s->undo_char_point = (short)(s->undo_char_point + u->insert_length);
+
+ /* now save the characters */
+ for (i=0; i < u->insert_length; ++i) {
+ s->undo_char[u->char_storage + i] =
+ nk_str_rune_at(&state->string, u->where + i);
+ }
+ }
+ nk_str_delete_runes(&state->string, r.where, r.delete_length);
+ }
+
+ if (r.insert_length) {
+ /* easy case: need to insert n characters */
+ nk_str_insert_text_runes(&state->string, r.where,
+ &s->undo_char[r.char_storage], r.insert_length);
+ }
+ state->cursor = r.where + r.insert_length;
+
+ s->undo_point++;
+ s->redo_point++;
+}
+NK_INTERN void
+nk_textedit_makeundo_insert(struct nk_text_edit *state, int where, int length)
+{
+ nk_textedit_createundo(&state->undo, where, 0, length);
+}
+NK_INTERN void
+nk_textedit_makeundo_delete(struct nk_text_edit *state, int where, int length)
+{
+ int i;
+ nk_rune *p = nk_textedit_createundo(&state->undo, where, length, 0);
+ if (p) {
+ for (i=0; i < length; ++i)
+ p[i] = nk_str_rune_at(&state->string, where+i);
+ }
+}
+NK_INTERN void
+nk_textedit_makeundo_replace(struct nk_text_edit *state, int where,
+ int old_length, int new_length)
+{
+ int i;
+ nk_rune *p = nk_textedit_createundo(&state->undo, where, old_length, new_length);
+ if (p) {
+ for (i=0; i < old_length; ++i)
+ p[i] = nk_str_rune_at(&state->string, where+i);
+ }
+}
+NK_LIB void
+nk_textedit_clear_state(struct nk_text_edit *state, enum nk_text_edit_type type,
+ nk_plugin_filter filter)
+{
+ /* reset the state to default */
+ state->undo.undo_point = 0;
+ state->undo.undo_char_point = 0;
+ state->undo.redo_point = NK_TEXTEDIT_UNDOSTATECOUNT;
+ state->undo.redo_char_point = NK_TEXTEDIT_UNDOCHARCOUNT;
+ state->select_end = state->select_start = 0;
+ state->cursor = 0;
+ state->has_preferred_x = 0;
+ state->preferred_x = 0;
+ state->cursor_at_end_of_line = 0;
+ state->initialized = 1;
+ state->single_line = (unsigned char)(type == NK_TEXT_EDIT_SINGLE_LINE);
+ state->mode = NK_TEXT_EDIT_MODE_VIEW;
+ state->filter = filter;
+ state->scrollbar = nk_vec2(0,0);
+}
+NK_API void
+nk_textedit_init_fixed(struct nk_text_edit *state, void *memory, nk_size size)
+{
+ NK_ASSERT(state);
+ NK_ASSERT(memory);
+ if (!state || !memory || !size) return;
+ NK_MEMSET(state, 0, sizeof(struct nk_text_edit));
+ nk_textedit_clear_state(state, NK_TEXT_EDIT_SINGLE_LINE, 0);
+ nk_str_init_fixed(&state->string, memory, size);
+}
+NK_API void
+nk_textedit_init(struct nk_text_edit *state, struct nk_allocator *alloc, nk_size size)
+{
+ NK_ASSERT(state);
+ NK_ASSERT(alloc);
+ if (!state || !alloc) return;
+ NK_MEMSET(state, 0, sizeof(struct nk_text_edit));
+ nk_textedit_clear_state(state, NK_TEXT_EDIT_SINGLE_LINE, 0);
+ nk_str_init(&state->string, alloc, size);
+}
+#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
+NK_API void
+nk_textedit_init_default(struct nk_text_edit *state)
+{
+ NK_ASSERT(state);
+ if (!state) return;
+ NK_MEMSET(state, 0, sizeof(struct nk_text_edit));
+ nk_textedit_clear_state(state, NK_TEXT_EDIT_SINGLE_LINE, 0);
+ nk_str_init_default(&state->string);
+}
+#endif
+NK_API void
+nk_textedit_select_all(struct nk_text_edit *state)
+{
+ NK_ASSERT(state);
+ state->select_start = 0;
+ state->select_end = state->string.len;
+}
+NK_API void
+nk_textedit_free(struct nk_text_edit *state)
+{
+ NK_ASSERT(state);
+ if (!state) return;
+ nk_str_free(&state->string);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * FILTER
+ *
+ * ===============================================================*/
+NK_API int
+nk_filter_default(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(unicode);
+ NK_UNUSED(box);
+ return nk_true;
+}
+NK_API int
+nk_filter_ascii(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(box);
+ if (unicode > 128) return nk_false;
+ else return nk_true;
+}
+NK_API int
+nk_filter_float(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(box);
+ if ((unicode < '0' || unicode > '9') && unicode != '.' && unicode != '-')
+ return nk_false;
+ else return nk_true;
+}
+NK_API int
+nk_filter_decimal(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(box);
+ if ((unicode < '0' || unicode > '9') && unicode != '-')
+ return nk_false;
+ else return nk_true;
+}
+NK_API int
+nk_filter_hex(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(box);
+ if ((unicode < '0' || unicode > '9') &&
+ (unicode < 'a' || unicode > 'f') &&
+ (unicode < 'A' || unicode > 'F'))
+ return nk_false;
+ else return nk_true;
+}
+NK_API int
+nk_filter_oct(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(box);
+ if (unicode < '0' || unicode > '7')
+ return nk_false;
+ else return nk_true;
+}
+NK_API int
+nk_filter_binary(const struct nk_text_edit *box, nk_rune unicode)
+{
+ NK_UNUSED(box);
+ if (unicode != '0' && unicode != '1')
+ return nk_false;
+ else return nk_true;
+}
+
+/* ===============================================================
+ *
+ * EDIT
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_edit_draw_text(struct nk_command_buffer *out,
+ const struct nk_style_edit *style, float pos_x, float pos_y,
+ float x_offset, const char *text, int byte_len, float row_height,
+ const struct nk_user_font *font, struct nk_color background,
+ struct nk_color foreground, int is_selected)
+{
+ NK_ASSERT(out);
+ NK_ASSERT(font);
+ NK_ASSERT(style);
+ if (!text || !byte_len || !out || !style) return;
+
+ {int glyph_len = 0;
+ nk_rune unicode = 0;
+ int text_len = 0;
+ float line_width = 0;
+ float glyph_width;
+ const char *line = text;
+ float line_offset = 0;
+ int line_count = 0;
+
+ struct nk_text txt;
+ txt.padding = nk_vec2(0,0);
+ txt.background = background;
+ txt.text = foreground;
+
+ glyph_len = nk_utf_decode(text+text_len, &unicode, byte_len-text_len);
+ if (!glyph_len) return;
+ while ((text_len < byte_len) && glyph_len)
+ {
+ if (unicode == '\n') {
+ /* new line separator so draw previous line */
+ struct nk_rect label;
+ label.y = pos_y + line_offset;
+ label.h = row_height;
+ label.w = line_width;
+ label.x = pos_x;
+ if (!line_count)
+ label.x += x_offset;
+
+ if (is_selected) /* selection needs to draw different background color */
+ nk_fill_rect(out, label, 0, background);
+ nk_widget_text(out, label, line, (int)((text + text_len) - line),
+ &txt, NK_TEXT_CENTERED, font);
+
+ text_len++;
+ line_count++;
+ line_width = 0;
+ line = text + text_len;
+ line_offset += row_height;
+ glyph_len = nk_utf_decode(text + text_len, &unicode, (int)(byte_len-text_len));
+ continue;
+ }
+ if (unicode == '\r') {
+ text_len++;
+ glyph_len = nk_utf_decode(text + text_len, &unicode, byte_len-text_len);
+ continue;
+ }
+ glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);
+ line_width += (float)glyph_width;
+ text_len += glyph_len;
+ glyph_len = nk_utf_decode(text + text_len, &unicode, byte_len-text_len);
+ continue;
+ }
+ if (line_width > 0) {
+ /* draw last line */
+ struct nk_rect label;
+ label.y = pos_y + line_offset;
+ label.h = row_height;
+ label.w = line_width;
+ label.x = pos_x;
+ if (!line_count)
+ label.x += x_offset;
+
+ if (is_selected)
+ nk_fill_rect(out, label, 0, background);
+ nk_widget_text(out, label, line, (int)((text + text_len) - line),
+ &txt, NK_TEXT_LEFT, font);
+ }}
+}
+NK_LIB nk_flags
+nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
+ struct nk_rect bounds, nk_flags flags, nk_plugin_filter filter,
+ struct nk_text_edit *edit, const struct nk_style_edit *style,
+ struct nk_input *in, const struct nk_user_font *font)
+{
+ struct nk_rect area;
+ nk_flags ret = 0;
+ float row_height;
+ char prev_state = 0;
+ char is_hovered = 0;
+ char select_all = 0;
+ char cursor_follow = 0;
+ struct nk_rect old_clip;
+ struct nk_rect clip;
+
+ NK_ASSERT(state);
+ NK_ASSERT(out);
+ NK_ASSERT(style);
+ if (!state || !out || !style)
+ return ret;
+
+ /* visible text area calculation */
+ area.x = bounds.x + style->padding.x + style->border;
+ area.y = bounds.y + style->padding.y + style->border;
+ area.w = bounds.w - (2.0f * style->padding.x + 2 * style->border);
+ area.h = bounds.h - (2.0f * style->padding.y + 2 * style->border);
+ if (flags & NK_EDIT_MULTILINE)
+ area.w = NK_MAX(0, area.w - style->scrollbar_size.x);
+ row_height = (flags & NK_EDIT_MULTILINE)? font->height + style->row_padding: area.h;
+
+ /* calculate clipping rectangle */
+ old_clip = out->clip;
+ nk_unify(&clip, &old_clip, area.x, area.y, area.x + area.w, area.y + area.h);
+
+ /* update edit state */
+ prev_state = (char)edit->active;
+ is_hovered = (char)nk_input_is_mouse_hovering_rect(in, bounds);
+ if (in && in->mouse.buttons[NK_BUTTON_LEFT].clicked && in->mouse.buttons[NK_BUTTON_LEFT].down) {
+ edit->active = NK_INBOX(in->mouse.pos.x, in->mouse.pos.y,
+ bounds.x, bounds.y, bounds.w, bounds.h);
+ }
+
+ /* (de)activate text editor */
+ if (!prev_state && edit->active) {
+ const enum nk_text_edit_type type = (flags & NK_EDIT_MULTILINE) ?
+ NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE;
+ nk_textedit_clear_state(edit, type, filter);
+ if (flags & NK_EDIT_AUTO_SELECT)
+ select_all = nk_true;
+ if (flags & NK_EDIT_GOTO_END_ON_ACTIVATE) {
+ edit->cursor = edit->string.len;
+ in = 0;
+ }
+ } else if (!edit->active) edit->mode = NK_TEXT_EDIT_MODE_VIEW;
+ if (flags & NK_EDIT_READ_ONLY)
+ edit->mode = NK_TEXT_EDIT_MODE_VIEW;
+ else if (flags & NK_EDIT_ALWAYS_INSERT_MODE)
+ edit->mode = NK_TEXT_EDIT_MODE_INSERT;
+
+ ret = (edit->active) ? NK_EDIT_ACTIVE: NK_EDIT_INACTIVE;
+ if (prev_state != edit->active)
+ ret |= (edit->active) ? NK_EDIT_ACTIVATED: NK_EDIT_DEACTIVATED;
+
+ /* handle user input */
+ if (edit->active && in)
+ {
+ int shift_mod = in->keyboard.keys[NK_KEY_SHIFT].down;
+ const float mouse_x = (in->mouse.pos.x - area.x) + edit->scrollbar.x;
+ const float mouse_y = (in->mouse.pos.y - area.y) + edit->scrollbar.y;
+
+ /* mouse click handler */
+ is_hovered = (char)nk_input_is_mouse_hovering_rect(in, area);
+ if (select_all) {
+ nk_textedit_select_all(edit);
+ } else if (is_hovered && in->mouse.buttons[NK_BUTTON_LEFT].down &&
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked) {
+ nk_textedit_click(edit, mouse_x, mouse_y, font, row_height);
+ } else if (is_hovered && in->mouse.buttons[NK_BUTTON_LEFT].down &&
+ (in->mouse.delta.x != 0.0f || in->mouse.delta.y != 0.0f)) {
+ nk_textedit_drag(edit, mouse_x, mouse_y, font, row_height);
+ cursor_follow = nk_true;
+ } else if (is_hovered && in->mouse.buttons[NK_BUTTON_RIGHT].clicked &&
+ in->mouse.buttons[NK_BUTTON_RIGHT].down) {
+ nk_textedit_key(edit, NK_KEY_TEXT_WORD_LEFT, nk_false, font, row_height);
+ nk_textedit_key(edit, NK_KEY_TEXT_WORD_RIGHT, nk_true, font, row_height);
+ cursor_follow = nk_true;
+ }
+
+ {int i; /* keyboard input */
+ int old_mode = edit->mode;
+ for (i = 0; i < NK_KEY_MAX; ++i) {
+ if (i == NK_KEY_ENTER || i == NK_KEY_TAB) continue; /* special case */
+ if (nk_input_is_key_pressed(in, (enum nk_keys)i)) {
+ nk_textedit_key(edit, (enum nk_keys)i, shift_mod, font, row_height);
+ cursor_follow = nk_true;
+ }
+ }
+ if (old_mode != edit->mode) {
+ in->keyboard.text_len = 0;
+ }}
+
+ /* text input */
+ edit->filter = filter;
+ if (in->keyboard.text_len) {
+ nk_textedit_text(edit, in->keyboard.text, in->keyboard.text_len);
+ cursor_follow = nk_true;
+ in->keyboard.text_len = 0;
+ }
+
+ /* enter key handler */
+ if (nk_input_is_key_pressed(in, NK_KEY_ENTER)) {
+ cursor_follow = nk_true;
+ if (flags & NK_EDIT_CTRL_ENTER_NEWLINE && shift_mod)
+ nk_textedit_text(edit, "\n", 1);
+ else if (flags & NK_EDIT_SIG_ENTER)
+ ret |= NK_EDIT_COMMITED;
+ else nk_textedit_text(edit, "\n", 1);
+ }
+
+ /* cut & copy handler */
+ {int copy= nk_input_is_key_pressed(in, NK_KEY_COPY);
+ int cut = nk_input_is_key_pressed(in, NK_KEY_CUT);
+ if ((copy || cut) && (flags & NK_EDIT_CLIPBOARD))
+ {
+ int glyph_len;
+ nk_rune unicode;
+ const char *text;
+ int b = edit->select_start;
+ int e = edit->select_end;
+
+ int begin = NK_MIN(b, e);
+ int end = NK_MAX(b, e);
+ text = nk_str_at_const(&edit->string, begin, &unicode, &glyph_len);
+ if (edit->clip.copy)
+ edit->clip.copy(edit->clip.userdata, text, end - begin);
+ if (cut && !(flags & NK_EDIT_READ_ONLY)){
+ nk_textedit_cut(edit);
+ cursor_follow = nk_true;
+ }
+ }}
+
+ /* paste handler */
+ {int paste = nk_input_is_key_pressed(in, NK_KEY_PASTE);
+ if (paste && (flags & NK_EDIT_CLIPBOARD) && edit->clip.paste) {
+ edit->clip.paste(edit->clip.userdata, edit);
+ cursor_follow = nk_true;
+ }}
+
+ /* tab handler */
+ {int tab = nk_input_is_key_pressed(in, NK_KEY_TAB);
+ if (tab && (flags & NK_EDIT_ALLOW_TAB)) {
+ nk_textedit_text(edit, " ", 4);
+ cursor_follow = nk_true;
+ }}
+ }
+
+ /* set widget state */
+ if (edit->active)
+ *state = NK_WIDGET_STATE_ACTIVE;
+ else nk_widget_state_reset(state);
+
+ if (is_hovered)
+ *state |= NK_WIDGET_STATE_HOVERED;
+
+ /* DRAW EDIT */
+ {const char *text = nk_str_get_const(&edit->string);
+ int len = nk_str_len_char(&edit->string);
+
+ {/* select background colors/images */
+ const struct nk_style_item *background;
+ if (*state & NK_WIDGET_STATE_ACTIVED)
+ background = &style->active;
+ else if (*state & NK_WIDGET_STATE_HOVER)
+ background = &style->hover;
+ else background = &style->normal;
+
+ /* draw background frame */
+ if (background->type == NK_STYLE_ITEM_COLOR) {
+ nk_stroke_rect(out, bounds, style->rounding, style->border, style->border_color);
+ nk_fill_rect(out, bounds, style->rounding, background->data.color);
+ } else nk_draw_image(out, bounds, &background->data.image, nk_white);}
+
+ area.w = NK_MAX(0, area.w - style->cursor_size);
+ if (edit->active)
+ {
+ int total_lines = 1;
+ struct nk_vec2 text_size = nk_vec2(0,0);
+
+ /* text pointer positions */
+ const char *cursor_ptr = 0;
+ const char *select_begin_ptr = 0;
+ const char *select_end_ptr = 0;
+
+ /* 2D pixel positions */
+ struct nk_vec2 cursor_pos = nk_vec2(0,0);
+ struct nk_vec2 selection_offset_start = nk_vec2(0,0);
+ struct nk_vec2 selection_offset_end = nk_vec2(0,0);
+
+ int selection_begin = NK_MIN(edit->select_start, edit->select_end);
+ int selection_end = NK_MAX(edit->select_start, edit->select_end);
+
+ /* calculate total line count + total space + cursor/selection position */
+ float line_width = 0.0f;
+ if (text && len)
+ {
+ /* utf8 encoding */
+ float glyph_width;
+ int glyph_len = 0;
+ nk_rune unicode = 0;
+ int text_len = 0;
+ int glyphs = 0;
+ int row_begin = 0;
+
+ glyph_len = nk_utf_decode(text, &unicode, len);
+ glyph_width = font->width(font->userdata, font->height, text, glyph_len);
+ line_width = 0;
+
+ /* iterate all lines */
+ while ((text_len < len) && glyph_len)
+ {
+ /* set cursor 2D position and line */
+ if (!cursor_ptr && glyphs == edit->cursor)
+ {
+ int glyph_offset;
+ struct nk_vec2 out_offset;
+ struct nk_vec2 row_size;
+ const char *remaining;
+
+ /* calculate 2d position */
+ cursor_pos.y = (float)(total_lines-1) * row_height;
+ row_size = nk_text_calculate_text_bounds(font, text+row_begin,
+ text_len-row_begin, row_height, &remaining,
+ &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);
+ cursor_pos.x = row_size.x;
+ cursor_ptr = text + text_len;
+ }
+
+ /* set start selection 2D position and line */
+ if (!select_begin_ptr && edit->select_start != edit->select_end &&
+ glyphs == selection_begin)
+ {
+ int glyph_offset;
+ struct nk_vec2 out_offset;
+ struct nk_vec2 row_size;
+ const char *remaining;
+
+ /* calculate 2d position */
+ selection_offset_start.y = (float)(NK_MAX(total_lines-1,0)) * row_height;
+ row_size = nk_text_calculate_text_bounds(font, text+row_begin,
+ text_len-row_begin, row_height, &remaining,
+ &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);
+ selection_offset_start.x = row_size.x;
+ select_begin_ptr = text + text_len;
+ }
+
+ /* set end selection 2D position and line */
+ if (!select_end_ptr && edit->select_start != edit->select_end &&
+ glyphs == selection_end)
+ {
+ int glyph_offset;
+ struct nk_vec2 out_offset;
+ struct nk_vec2 row_size;
+ const char *remaining;
+
+ /* calculate 2d position */
+ selection_offset_end.y = (float)(total_lines-1) * row_height;
+ row_size = nk_text_calculate_text_bounds(font, text+row_begin,
+ text_len-row_begin, row_height, &remaining,
+ &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);
+ selection_offset_end.x = row_size.x;
+ select_end_ptr = text + text_len;
+ }
+ if (unicode == '\n') {
+ text_size.x = NK_MAX(text_size.x, line_width);
+ total_lines++;
+ line_width = 0;
+ text_len++;
+ glyphs++;
+ row_begin = text_len;
+ glyph_len = nk_utf_decode(text + text_len, &unicode, len-text_len);
+ glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);
+ continue;
+ }
+
+ glyphs++;
+ text_len += glyph_len;
+ line_width += (float)glyph_width;
+
+ glyph_len = nk_utf_decode(text + text_len, &unicode, len-text_len);
+ glyph_width = font->width(font->userdata, font->height,
+ text+text_len, glyph_len);
+ continue;
+ }
+ text_size.y = (float)total_lines * row_height;
+
+ /* handle case when cursor is at end of text buffer */
+ if (!cursor_ptr && edit->cursor == edit->string.len) {
+ cursor_pos.x = line_width;
+ cursor_pos.y = text_size.y - row_height;
+ }
+ }
+ {
+ /* scrollbar */
+ if (cursor_follow)
+ {
+ /* update scrollbar to follow cursor */
+ if (!(flags & NK_EDIT_NO_HORIZONTAL_SCROLL)) {
+ /* horizontal scroll */
+ const float scroll_increment = area.w * 0.25f;
+ if (cursor_pos.x < edit->scrollbar.x)
+ edit->scrollbar.x = (float)(int)NK_MAX(0.0f, cursor_pos.x - scroll_increment);
+ if (cursor_pos.x >= edit->scrollbar.x + area.w)
+ edit->scrollbar.x = (float)(int)NK_MAX(0.0f, edit->scrollbar.x + scroll_increment);
+ } else edit->scrollbar.x = 0;
+
+ if (flags & NK_EDIT_MULTILINE) {
+ /* vertical scroll */
+ if (cursor_pos.y < edit->scrollbar.y)
+ edit->scrollbar.y = NK_MAX(0.0f, cursor_pos.y - row_height);
+ if (cursor_pos.y >= edit->scrollbar.y + area.h)
+ edit->scrollbar.y = edit->scrollbar.y + row_height;
+ } else edit->scrollbar.y = 0;
+ }
+
+ /* scrollbar widget */
+ if (flags & NK_EDIT_MULTILINE)
+ {
+ nk_flags ws;
+ struct nk_rect scroll;
+ float scroll_target;
+ float scroll_offset;
+ float scroll_step;
+ float scroll_inc;
+
+ scroll = area;
+ scroll.x = (bounds.x + bounds.w - style->border) - style->scrollbar_size.x;
+ scroll.w = style->scrollbar_size.x;
+
+ scroll_offset = edit->scrollbar.y;
+ scroll_step = scroll.h * 0.10f;
+ scroll_inc = scroll.h * 0.01f;
+ scroll_target = text_size.y;
+ edit->scrollbar.y = nk_do_scrollbarv(&ws, out, scroll, 0,
+ scroll_offset, scroll_target, scroll_step, scroll_inc,
+ &style->scrollbar, in, font);
+ }
+ }
+
+ /* draw text */
+ {struct nk_color background_color;
+ struct nk_color text_color;
+ struct nk_color sel_background_color;
+ struct nk_color sel_text_color;
+ struct nk_color cursor_color;
+ struct nk_color cursor_text_color;
+ const struct nk_style_item *background;
+ nk_push_scissor(out, clip);
+
+ /* select correct colors to draw */
+ if (*state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->active;
+ text_color = style->text_active;
+ sel_text_color = style->selected_text_hover;
+ sel_background_color = style->selected_hover;
+ cursor_color = style->cursor_hover;
+ cursor_text_color = style->cursor_text_hover;
+ } else if (*state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ text_color = style->text_hover;
+ sel_text_color = style->selected_text_hover;
+ sel_background_color = style->selected_hover;
+ cursor_text_color = style->cursor_text_hover;
+ cursor_color = style->cursor_hover;
+ } else {
+ background = &style->normal;
+ text_color = style->text_normal;
+ sel_text_color = style->selected_text_normal;
+ sel_background_color = style->selected_normal;
+ cursor_color = style->cursor_normal;
+ cursor_text_color = style->cursor_text_normal;
+ }
+ if (background->type == NK_STYLE_ITEM_IMAGE)
+ background_color = nk_rgba(0,0,0,0);
+ else background_color = background->data.color;
+
+
+ if (edit->select_start == edit->select_end) {
+ /* no selection so just draw the complete text */
+ const char *begin = nk_str_get_const(&edit->string);
+ int l = nk_str_len_char(&edit->string);
+ nk_edit_draw_text(out, style, area.x - edit->scrollbar.x,
+ area.y - edit->scrollbar.y, 0, begin, l, row_height, font,
+ background_color, text_color, nk_false);
+ } else {
+ /* edit has selection so draw 1-3 text chunks */
+ if (edit->select_start != edit->select_end && selection_begin > 0){
+ /* draw unselected text before selection */
+ const char *begin = nk_str_get_const(&edit->string);
+ NK_ASSERT(select_begin_ptr);
+ nk_edit_draw_text(out, style, area.x - edit->scrollbar.x,
+ area.y - edit->scrollbar.y, 0, begin, (int)(select_begin_ptr - begin),
+ row_height, font, background_color, text_color, nk_false);
+ }
+ if (edit->select_start != edit->select_end) {
+ /* draw selected text */
+ NK_ASSERT(select_begin_ptr);
+ if (!select_end_ptr) {
+ const char *begin = nk_str_get_const(&edit->string);
+ select_end_ptr = begin + nk_str_len_char(&edit->string);
+ }
+ nk_edit_draw_text(out, style,
+ area.x - edit->scrollbar.x,
+ area.y + selection_offset_start.y - edit->scrollbar.y,
+ selection_offset_start.x,
+ select_begin_ptr, (int)(select_end_ptr - select_begin_ptr),
+ row_height, font, sel_background_color, sel_text_color, nk_true);
+ }
+ if ((edit->select_start != edit->select_end &&
+ selection_end < edit->string.len))
+ {
+ /* draw unselected text after selected text */
+ const char *begin = select_end_ptr;
+ const char *end = nk_str_get_const(&edit->string) +
+ nk_str_len_char(&edit->string);
+ NK_ASSERT(select_end_ptr);
+ nk_edit_draw_text(out, style,
+ area.x - edit->scrollbar.x,
+ area.y + selection_offset_end.y - edit->scrollbar.y,
+ selection_offset_end.x,
+ begin, (int)(end - begin), row_height, font,
+ background_color, text_color, nk_true);
+ }
+ }
+
+ /* cursor */
+ if (edit->select_start == edit->select_end)
+ {
+ if (edit->cursor >= nk_str_len(&edit->string) ||
+ (cursor_ptr && *cursor_ptr == '\n')) {
+ /* draw cursor at end of line */
+ struct nk_rect cursor;
+ cursor.w = style->cursor_size;
+ cursor.h = font->height;
+ cursor.x = area.x + cursor_pos.x - edit->scrollbar.x;
+ cursor.y = area.y + cursor_pos.y + row_height/2.0f - cursor.h/2.0f;
+ cursor.y -= edit->scrollbar.y;
+ nk_fill_rect(out, cursor, 0, cursor_color);
+ } else {
+ /* draw cursor inside text */
+ int glyph_len;
+ struct nk_rect label;
+ struct nk_text txt;
+
+ nk_rune unicode;
+ NK_ASSERT(cursor_ptr);
+ glyph_len = nk_utf_decode(cursor_ptr, &unicode, 4);
+
+ label.x = area.x + cursor_pos.x - edit->scrollbar.x;
+ label.y = area.y + cursor_pos.y - edit->scrollbar.y;
+ label.w = font->width(font->userdata, font->height, cursor_ptr, glyph_len);
+ label.h = row_height;
+
+ txt.padding = nk_vec2(0,0);
+ txt.background = cursor_color;;
+ txt.text = cursor_text_color;
+ nk_fill_rect(out, label, 0, cursor_color);
+ nk_widget_text(out, label, cursor_ptr, glyph_len, &txt, NK_TEXT_LEFT, font);
+ }
+ }}
+ } else {
+ /* not active so just draw text */
+ int l = nk_str_len_char(&edit->string);
+ const char *begin = nk_str_get_const(&edit->string);
+
+ const struct nk_style_item *background;
+ struct nk_color background_color;
+ struct nk_color text_color;
+ nk_push_scissor(out, clip);
+ if (*state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->active;
+ text_color = style->text_active;
+ } else if (*state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ text_color = style->text_hover;
+ } else {
+ background = &style->normal;
+ text_color = style->text_normal;
+ }
+ if (background->type == NK_STYLE_ITEM_IMAGE)
+ background_color = nk_rgba(0,0,0,0);
+ else background_color = background->data.color;
+ nk_edit_draw_text(out, style, area.x - edit->scrollbar.x,
+ area.y - edit->scrollbar.y, 0, begin, l, row_height, font,
+ background_color, text_color, nk_false);
+ }
+ nk_push_scissor(out, old_clip);}
+ return ret;
+}
+NK_API void
+nk_edit_focus(struct nk_context *ctx, nk_flags flags)
+{
+ nk_hash hash;
+ struct nk_window *win;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return;
+
+ win = ctx->current;
+ hash = win->edit.seq;
+ win->edit.active = nk_true;
+ win->edit.name = hash;
+ if (flags & NK_EDIT_ALWAYS_INSERT_MODE)
+ win->edit.mode = NK_TEXT_EDIT_MODE_INSERT;
+}
+NK_API void
+nk_edit_unfocus(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return;
+
+ win = ctx->current;
+ win->edit.active = nk_false;
+ win->edit.name = 0;
+}
+NK_API nk_flags
+nk_edit_string(struct nk_context *ctx, nk_flags flags,
+ char *memory, int *len, int max, nk_plugin_filter filter)
+{
+ nk_hash hash;
+ nk_flags state;
+ struct nk_text_edit *edit;
+ struct nk_window *win;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(memory);
+ NK_ASSERT(len);
+ if (!ctx || !memory || !len)
+ return 0;
+
+ filter = (!filter) ? nk_filter_default: filter;
+ win = ctx->current;
+ hash = win->edit.seq;
+ edit = &ctx->text_edit;
+ nk_textedit_clear_state(&ctx->text_edit, (flags & NK_EDIT_MULTILINE)?
+ NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE, filter);
+
+ if (win->edit.active && hash == win->edit.name) {
+ if (flags & NK_EDIT_NO_CURSOR)
+ edit->cursor = nk_utf_len(memory, *len);
+ else edit->cursor = win->edit.cursor;
+ if (!(flags & NK_EDIT_SELECTABLE)) {
+ edit->select_start = win->edit.cursor;
+ edit->select_end = win->edit.cursor;
+ } else {
+ edit->select_start = win->edit.sel_start;
+ edit->select_end = win->edit.sel_end;
+ }
+ edit->mode = win->edit.mode;
+ edit->scrollbar.x = (float)win->edit.scrollbar.x;
+ edit->scrollbar.y = (float)win->edit.scrollbar.y;
+ edit->active = nk_true;
+ } else edit->active = nk_false;
+
+ max = NK_MAX(1, max);
+ *len = NK_MIN(*len, max-1);
+ nk_str_init_fixed(&edit->string, memory, (nk_size)max);
+ edit->string.buffer.allocated = (nk_size)*len;
+ edit->string.len = nk_utf_len(memory, *len);
+ state = nk_edit_buffer(ctx, flags, edit, filter);
+ *len = (int)edit->string.buffer.allocated;
+
+ if (edit->active) {
+ win->edit.cursor = edit->cursor;
+ win->edit.sel_start = edit->select_start;
+ win->edit.sel_end = edit->select_end;
+ win->edit.mode = edit->mode;
+ win->edit.scrollbar.x = (nk_uint)edit->scrollbar.x;
+ win->edit.scrollbar.y = (nk_uint)edit->scrollbar.y;
+ } return state;
+}
+NK_API nk_flags
+nk_edit_buffer(struct nk_context *ctx, nk_flags flags,
+ struct nk_text_edit *edit, nk_plugin_filter filter)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ struct nk_input *in;
+
+ enum nk_widget_layout_states state;
+ struct nk_rect bounds;
+
+ nk_flags ret_flags = 0;
+ unsigned char prev_state;
+ nk_hash hash;
+
+ /* make sure correct values */
+ NK_ASSERT(ctx);
+ NK_ASSERT(edit);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ state = nk_widget(&bounds, ctx);
+ if (!state) return state;
+ in = (win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+
+ /* check if edit is currently hot item */
+ hash = win->edit.seq++;
+ if (win->edit.active && hash == win->edit.name) {
+ if (flags & NK_EDIT_NO_CURSOR)
+ edit->cursor = edit->string.len;
+ if (!(flags & NK_EDIT_SELECTABLE)) {
+ edit->select_start = edit->cursor;
+ edit->select_end = edit->cursor;
+ }
+ if (flags & NK_EDIT_CLIPBOARD)
+ edit->clip = ctx->clip;
+ edit->active = (unsigned char)win->edit.active;
+ } else edit->active = nk_false;
+ edit->mode = win->edit.mode;
+
+ filter = (!filter) ? nk_filter_default: filter;
+ prev_state = (unsigned char)edit->active;
+ in = (flags & NK_EDIT_READ_ONLY) ? 0: in;
+ ret_flags = nk_do_edit(&ctx->last_widget_state, &win->buffer, bounds, flags,
+ filter, edit, &style->edit, in, style->font);
+
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_TEXT];
+ if (edit->active && prev_state != edit->active) {
+ /* current edit is now hot */
+ win->edit.active = nk_true;
+ win->edit.name = hash;
+ } else if (prev_state && !edit->active) {
+ /* current edit is now cold */
+ win->edit.active = nk_false;
+ } return ret_flags;
+}
+NK_API nk_flags
+nk_edit_string_zero_terminated(struct nk_context *ctx, nk_flags flags,
+ char *buffer, int max, nk_plugin_filter filter)
+{
+ nk_flags result;
+ int len = nk_strlen(buffer);
+ result = nk_edit_string(ctx, flags, buffer, &len, max, filter);
+ buffer[NK_MIN(NK_MAX(max-1,0), len)] = '\0';
+ return result;
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * PROPERTY
+ *
+ * ===============================================================*/
+NK_LIB void
+nk_drag_behavior(nk_flags *state, const struct nk_input *in,
+ struct nk_rect drag, struct nk_property_variant *variant,
+ float inc_per_pixel)
+{
+ int left_mouse_down = in && in->mouse.buttons[NK_BUTTON_LEFT].down;
+ int left_mouse_click_in_cursor = in &&
+ nk_input_has_mouse_click_down_in_rect(in, NK_BUTTON_LEFT, drag, nk_true);
+
+ nk_widget_state_reset(state);
+ if (nk_input_is_mouse_hovering_rect(in, drag))
+ *state = NK_WIDGET_STATE_HOVERED;
+
+ if (left_mouse_down && left_mouse_click_in_cursor) {
+ float delta, pixels;
+ pixels = in->mouse.delta.x;
+ delta = pixels * inc_per_pixel;
+ switch (variant->kind) {
+ default: break;
+ case NK_PROPERTY_INT:
+ variant->value.i = variant->value.i + (int)delta;
+ variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);
+ break;
+ case NK_PROPERTY_FLOAT:
+ variant->value.f = variant->value.f + (float)delta;
+ variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);
+ break;
+ case NK_PROPERTY_DOUBLE:
+ variant->value.d = variant->value.d + (double)delta;
+ variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
+ break;
+ }
+ *state = NK_WIDGET_STATE_ACTIVE;
+ }
+ if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, drag))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(in, drag))
+ *state |= NK_WIDGET_STATE_LEFT;
+}
+NK_LIB void
+nk_property_behavior(nk_flags *ws, const struct nk_input *in,
+ struct nk_rect property, struct nk_rect label, struct nk_rect edit,
+ struct nk_rect empty, int *state, struct nk_property_variant *variant,
+ float inc_per_pixel)
+{
+ if (in && *state == NK_PROPERTY_DEFAULT) {
+ if (nk_button_behavior(ws, edit, in, NK_BUTTON_DEFAULT))
+ *state = NK_PROPERTY_EDIT;
+ else if (nk_input_is_mouse_click_down_in_rect(in, NK_BUTTON_LEFT, label, nk_true))
+ *state = NK_PROPERTY_DRAG;
+ else if (nk_input_is_mouse_click_down_in_rect(in, NK_BUTTON_LEFT, empty, nk_true))
+ *state = NK_PROPERTY_DRAG;
+ }
+ if (*state == NK_PROPERTY_DRAG) {
+ nk_drag_behavior(ws, in, property, variant, inc_per_pixel);
+ if (!(*ws & NK_WIDGET_STATE_ACTIVED)) *state = NK_PROPERTY_DEFAULT;
+ }
+}
+NK_LIB void
+nk_draw_property(struct nk_command_buffer *out, const struct nk_style_property *style,
+ const struct nk_rect *bounds, const struct nk_rect *label, nk_flags state,
+ const char *name, int len, const struct nk_user_font *font)
+{
+ struct nk_text text;
+ const struct nk_style_item *background;
+
+ /* select correct background and text color */
+ if (state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->active;
+ text.text = style->label_active;
+ } else if (state & NK_WIDGET_STATE_HOVER) {
+ background = &style->hover;
+ text.text = style->label_hover;
+ } else {
+ background = &style->normal;
+ text.text = style->label_normal;
+ }
+
+ /* draw background */
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(out, *bounds, &background->data.image, nk_white);
+ text.background = nk_rgba(0,0,0,0);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(out, *bounds, style->rounding, background->data.color);
+ nk_stroke_rect(out, *bounds, style->rounding, style->border, background->data.color);
+ }
+
+ /* draw label */
+ text.padding = nk_vec2(0,0);
+ nk_widget_text(out, *label, name, len, &text, NK_TEXT_CENTERED, font);
+}
+NK_LIB void
+nk_do_property(nk_flags *ws,
+ struct nk_command_buffer *out, struct nk_rect property,
+ const char *name, struct nk_property_variant *variant,
+ float inc_per_pixel, char *buffer, int *len,
+ int *state, int *cursor, int *select_begin, int *select_end,
+ const struct nk_style_property *style,
+ enum nk_property_filter filter, struct nk_input *in,
+ const struct nk_user_font *font, struct nk_text_edit *text_edit,
+ enum nk_button_behavior behavior)
+{
+ const nk_plugin_filter filters[] = {
+ nk_filter_decimal,
+ nk_filter_float
+ };
+ int active, old;
+ int num_len, name_len;
+ char string[NK_MAX_NUMBER_BUFFER];
+ float size;
+
+ char *dst = 0;
+ int *length;
+
+ struct nk_rect left;
+ struct nk_rect right;
+ struct nk_rect label;
+ struct nk_rect edit;
+ struct nk_rect empty;
+
+ /* left decrement button */
+ left.h = font->height/2;
+ left.w = left.h;
+ left.x = property.x + style->border + style->padding.x;
+ left.y = property.y + style->border + property.h/2.0f - left.h/2;
+
+ /* text label */
+ name_len = nk_strlen(name);
+ size = font->width(font->userdata, font->height, name, name_len);
+ label.x = left.x + left.w + style->padding.x;
+ label.w = (float)size + 2 * style->padding.x;
+ label.y = property.y + style->border + style->padding.y;
+ label.h = property.h - (2 * style->border + 2 * style->padding.y);
+
+ /* right increment button */
+ right.y = left.y;
+ right.w = left.w;
+ right.h = left.h;
+ right.x = property.x + property.w - (right.w + style->padding.x);
+
+ /* edit */
+ if (*state == NK_PROPERTY_EDIT) {
+ size = font->width(font->userdata, font->height, buffer, *len);
+ size += style->edit.cursor_size;
+ length = len;
+ dst = buffer;
+ } else {
+ switch (variant->kind) {
+ default: break;
+ case NK_PROPERTY_INT:
+ nk_itoa(string, variant->value.i);
+ num_len = nk_strlen(string);
+ break;
+ case NK_PROPERTY_FLOAT:
+ NK_DTOA(string, (double)variant->value.f);
+ num_len = nk_string_float_limit(string, NK_MAX_FLOAT_PRECISION);
+ break;
+ case NK_PROPERTY_DOUBLE:
+ NK_DTOA(string, variant->value.d);
+ num_len = nk_string_float_limit(string, NK_MAX_FLOAT_PRECISION);
+ break;
+ }
+ size = font->width(font->userdata, font->height, string, num_len);
+ dst = string;
+ length = &num_len;
+ }
+
+ edit.w = (float)size + 2 * style->padding.x;
+ edit.w = NK_MIN(edit.w, right.x - (label.x + label.w));
+ edit.x = right.x - (edit.w + style->padding.x);
+ edit.y = property.y + style->border;
+ edit.h = property.h - (2 * style->border);
+
+ /* empty left space activator */
+ empty.w = edit.x - (label.x + label.w);
+ empty.x = label.x + label.w;
+ empty.y = property.y;
+ empty.h = property.h;
+
+ /* update property */
+ old = (*state == NK_PROPERTY_EDIT);
+ nk_property_behavior(ws, in, property, label, edit, empty, state, variant, inc_per_pixel);
+
+ /* draw property */
+ if (style->draw_begin) style->draw_begin(out, style->userdata);
+ nk_draw_property(out, style, &property, &label, *ws, name, name_len, font);
+ if (style->draw_end) style->draw_end(out, style->userdata);
+
+ /* execute right button */
+ if (nk_do_button_symbol(ws, out, left, style->sym_left, behavior, &style->dec_button, in, font)) {
+ switch (variant->kind) {
+ default: break;
+ case NK_PROPERTY_INT:
+ variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i - variant->step.i, variant->max_value.i); break;
+ case NK_PROPERTY_FLOAT:
+ variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f - variant->step.f, variant->max_value.f); break;
+ case NK_PROPERTY_DOUBLE:
+ variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d - variant->step.d, variant->max_value.d); break;
+ }
+ }
+ /* execute left button */
+ if (nk_do_button_symbol(ws, out, right, style->sym_right, behavior, &style->inc_button, in, font)) {
+ switch (variant->kind) {
+ default: break;
+ case NK_PROPERTY_INT:
+ variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i + variant->step.i, variant->max_value.i); break;
+ case NK_PROPERTY_FLOAT:
+ variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f + variant->step.f, variant->max_value.f); break;
+ case NK_PROPERTY_DOUBLE:
+ variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d + variant->step.d, variant->max_value.d); break;
+ }
+ }
+ if (old != NK_PROPERTY_EDIT && (*state == NK_PROPERTY_EDIT)) {
+ /* property has been activated so setup buffer */
+ NK_MEMCPY(buffer, dst, (nk_size)*length);
+ *cursor = nk_utf_len(buffer, *length);
+ *len = *length;
+ length = len;
+ dst = buffer;
+ active = 0;
+ } else active = (*state == NK_PROPERTY_EDIT);
+
+ /* execute and run text edit field */
+ nk_textedit_clear_state(text_edit, NK_TEXT_EDIT_SINGLE_LINE, filters[filter]);
+ text_edit->active = (unsigned char)active;
+ text_edit->string.len = *length;
+ text_edit->cursor = NK_CLAMP(0, *cursor, *length);
+ text_edit->select_start = NK_CLAMP(0,*select_begin, *length);
+ text_edit->select_end = NK_CLAMP(0,*select_end, *length);
+ text_edit->string.buffer.allocated = (nk_size)*length;
+ text_edit->string.buffer.memory.size = NK_MAX_NUMBER_BUFFER;
+ text_edit->string.buffer.memory.ptr = dst;
+ text_edit->string.buffer.size = NK_MAX_NUMBER_BUFFER;
+ text_edit->mode = NK_TEXT_EDIT_MODE_INSERT;
+ nk_do_edit(ws, out, edit, NK_EDIT_FIELD|NK_EDIT_AUTO_SELECT,
+ filters[filter], text_edit, &style->edit, (*state == NK_PROPERTY_EDIT) ? in: 0, font);
+
+ *length = text_edit->string.len;
+ *cursor = text_edit->cursor;
+ *select_begin = text_edit->select_start;
+ *select_end = text_edit->select_end;
+ if (text_edit->active && nk_input_is_key_pressed(in, NK_KEY_ENTER))
+ text_edit->active = nk_false;
+
+ if (active && !text_edit->active) {
+ /* property is now not active so convert edit text to value*/
+ *state = NK_PROPERTY_DEFAULT;
+ buffer[*len] = '\0';
+ switch (variant->kind) {
+ default: break;
+ case NK_PROPERTY_INT:
+ variant->value.i = nk_strtoi(buffer, 0);
+ variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);
+ break;
+ case NK_PROPERTY_FLOAT:
+ nk_string_float_limit(buffer, NK_MAX_FLOAT_PRECISION);
+ variant->value.f = nk_strtof(buffer, 0);
+ variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);
+ break;
+ case NK_PROPERTY_DOUBLE:
+ nk_string_float_limit(buffer, NK_MAX_FLOAT_PRECISION);
+ variant->value.d = nk_strtod(buffer, 0);
+ variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
+ break;
+ }
+ }
+}
+NK_LIB struct nk_property_variant
+nk_property_variant_int(int value, int min_value, int max_value, int step)
+{
+ struct nk_property_variant result;
+ result.kind = NK_PROPERTY_INT;
+ result.value.i = value;
+ result.min_value.i = min_value;
+ result.max_value.i = max_value;
+ result.step.i = step;
+ return result;
+}
+NK_LIB struct nk_property_variant
+nk_property_variant_float(float value, float min_value, float max_value, float step)
+{
+ struct nk_property_variant result;
+ result.kind = NK_PROPERTY_FLOAT;
+ result.value.f = value;
+ result.min_value.f = min_value;
+ result.max_value.f = max_value;
+ result.step.f = step;
+ return result;
+}
+NK_LIB struct nk_property_variant
+nk_property_variant_double(double value, double min_value, double max_value,
+ double step)
+{
+ struct nk_property_variant result;
+ result.kind = NK_PROPERTY_DOUBLE;
+ result.value.d = value;
+ result.min_value.d = min_value;
+ result.max_value.d = max_value;
+ result.step.d = step;
+ return result;
+}
+NK_LIB void
+nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant *variant,
+ float inc_per_pixel, const enum nk_property_filter filter)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ struct nk_input *in;
+ const struct nk_style *style;
+
+ struct nk_rect bounds;
+ enum nk_widget_layout_states s;
+
+ int *state = 0;
+ nk_hash hash = 0;
+ char *buffer = 0;
+ int *len = 0;
+ int *cursor = 0;
+ int *select_begin = 0;
+ int *select_end = 0;
+ int old_state;
+
+ char dummy_buffer[NK_MAX_NUMBER_BUFFER];
+ int dummy_state = NK_PROPERTY_DEFAULT;
+ int dummy_length = 0;
+ int dummy_cursor = 0;
+ int dummy_select_begin = 0;
+ int dummy_select_end = 0;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return;
+
+ win = ctx->current;
+ layout = win->layout;
+ style = &ctx->style;
+ s = nk_widget(&bounds, ctx);
+ if (!s) return;
+
+ /* calculate hash from name */
+ if (name[0] == '#') {
+ hash = nk_murmur_hash(name, (int)nk_strlen(name), win->property.seq++);
+ name++; /* special number hash */
+ } else hash = nk_murmur_hash(name, (int)nk_strlen(name), 42);
+
+ /* check if property is currently hot item */
+ if (win->property.active && hash == win->property.name) {
+ buffer = win->property.buffer;
+ len = &win->property.length;
+ cursor = &win->property.cursor;
+ state = &win->property.state;
+ select_begin = &win->property.select_start;
+ select_end = &win->property.select_end;
+ } else {
+ buffer = dummy_buffer;
+ len = &dummy_length;
+ cursor = &dummy_cursor;
+ state = &dummy_state;
+ select_begin = &dummy_select_begin;
+ select_end = &dummy_select_end;
+ }
+
+ /* execute property widget */
+ old_state = *state;
+ ctx->text_edit.clip = ctx->clip;
+ in = ((s == NK_WIDGET_ROM && !win->property.active) ||
+ layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ nk_do_property(&ctx->last_widget_state, &win->buffer, bounds, name,
+ variant, inc_per_pixel, buffer, len, state, cursor, select_begin,
+ select_end, &style->property, filter, in, style->font, &ctx->text_edit,
+ ctx->button_behavior);
+
+ if (in && *state != NK_PROPERTY_DEFAULT && !win->property.active) {
+ /* current property is now hot */
+ win->property.active = 1;
+ NK_MEMCPY(win->property.buffer, buffer, (nk_size)*len);
+ win->property.length = *len;
+ win->property.cursor = *cursor;
+ win->property.state = *state;
+ win->property.name = hash;
+ win->property.select_start = *select_begin;
+ win->property.select_end = *select_end;
+ if (*state == NK_PROPERTY_DRAG) {
+ ctx->input.mouse.grab = nk_true;
+ ctx->input.mouse.grabbed = nk_true;
+ }
+ }
+ /* check if previously active property is now inactive */
+ if (*state == NK_PROPERTY_DEFAULT && old_state != NK_PROPERTY_DEFAULT) {
+ if (old_state == NK_PROPERTY_DRAG) {
+ ctx->input.mouse.grab = nk_false;
+ ctx->input.mouse.grabbed = nk_false;
+ ctx->input.mouse.ungrab = nk_true;
+ }
+ win->property.select_start = 0;
+ win->property.select_end = 0;
+ win->property.active = 0;
+ }
+}
+NK_API void
+nk_property_int(struct nk_context *ctx, const char *name,
+ int min, int *val, int max, int step, float inc_per_pixel)
+{
+ struct nk_property_variant variant;
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+ NK_ASSERT(val);
+
+ if (!ctx || !ctx->current || !name || !val) return;
+ variant = nk_property_variant_int(*val, min, max, step);
+ nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_INT);
+ *val = variant.value.i;
+}
+NK_API void
+nk_property_float(struct nk_context *ctx, const char *name,
+ float min, float *val, float max, float step, float inc_per_pixel)
+{
+ struct nk_property_variant variant;
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+ NK_ASSERT(val);
+
+ if (!ctx || !ctx->current || !name || !val) return;
+ variant = nk_property_variant_float(*val, min, max, step);
+ nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
+ *val = variant.value.f;
+}
+NK_API void
+nk_property_double(struct nk_context *ctx, const char *name,
+ double min, double *val, double max, double step, float inc_per_pixel)
+{
+ struct nk_property_variant variant;
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+ NK_ASSERT(val);
+
+ if (!ctx || !ctx->current || !name || !val) return;
+ variant = nk_property_variant_double(*val, min, max, step);
+ nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
+ *val = variant.value.d;
+}
+NK_API int
+nk_propertyi(struct nk_context *ctx, const char *name, int min, int val,
+ int max, int step, float inc_per_pixel)
+{
+ struct nk_property_variant variant;
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+
+ if (!ctx || !ctx->current || !name) return val;
+ variant = nk_property_variant_int(val, min, max, step);
+ nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_INT);
+ val = variant.value.i;
+ return val;
+}
+NK_API float
+nk_propertyf(struct nk_context *ctx, const char *name, float min,
+ float val, float max, float step, float inc_per_pixel)
+{
+ struct nk_property_variant variant;
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+
+ if (!ctx || !ctx->current || !name) return val;
+ variant = nk_property_variant_float(val, min, max, step);
+ nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
+ val = variant.value.f;
+ return val;
+}
+NK_API double
+nk_propertyd(struct nk_context *ctx, const char *name, double min,
+ double val, double max, double step, float inc_per_pixel)
+{
+ struct nk_property_variant variant;
+ NK_ASSERT(ctx);
+ NK_ASSERT(name);
+
+ if (!ctx || !ctx->current || !name) return val;
+ variant = nk_property_variant_double(val, min, max, step);
+ nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
+ val = variant.value.d;
+ return val;
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * CHART
+ *
+ * ===============================================================*/
+NK_API int
+nk_chart_begin_colored(struct nk_context *ctx, enum nk_chart_type type,
+ struct nk_color color, struct nk_color highlight,
+ int count, float min_value, float max_value)
+{
+ struct nk_window *win;
+ struct nk_chart *chart;
+ const struct nk_style *config;
+ const struct nk_style_chart *style;
+
+ const struct nk_style_item *background;
+ struct nk_rect bounds = {0, 0, 0, 0};
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+
+ if (!ctx || !ctx->current || !ctx->current->layout) return 0;
+ if (!nk_widget(&bounds, ctx)) {
+ chart = &ctx->current->layout->chart;
+ nk_zero(chart, sizeof(*chart));
+ return 0;
+ }
+
+ win = ctx->current;
+ config = &ctx->style;
+ chart = &win->layout->chart;
+ style = &config->chart;
+
+ /* setup basic generic chart */
+ nk_zero(chart, sizeof(*chart));
+ chart->x = bounds.x + style->padding.x;
+ chart->y = bounds.y + style->padding.y;
+ chart->w = bounds.w - 2 * style->padding.x;
+ chart->h = bounds.h - 2 * style->padding.y;
+ chart->w = NK_MAX(chart->w, 2 * style->padding.x);
+ chart->h = NK_MAX(chart->h, 2 * style->padding.y);
+
+ /* add first slot into chart */
+ {struct nk_chart_slot *slot = &chart->slots[chart->slot++];
+ slot->type = type;
+ slot->count = count;
+ slot->color = color;
+ slot->highlight = highlight;
+ slot->min = NK_MIN(min_value, max_value);
+ slot->max = NK_MAX(min_value, max_value);
+ slot->range = slot->max - slot->min;}
+
+ /* draw chart background */
+ background = &style->background;
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(&win->buffer, bounds, &background->data.image, nk_white);
+ } else {
+ nk_fill_rect(&win->buffer, bounds, style->rounding, style->border_color);
+ nk_fill_rect(&win->buffer, nk_shrink_rect(bounds, style->border),
+ style->rounding, style->background.data.color);
+ }
+ return 1;
+}
+NK_API int
+nk_chart_begin(struct nk_context *ctx, const enum nk_chart_type type,
+ int count, float min_value, float max_value)
+{
+ return nk_chart_begin_colored(ctx, type, ctx->style.chart.color,
+ ctx->style.chart.selected_color, count, min_value, max_value);
+}
+NK_API void
+nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type type,
+ struct nk_color color, struct nk_color highlight,
+ int count, float min_value, float max_value)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ NK_ASSERT(ctx->current->layout->chart.slot < NK_CHART_MAX_SLOT);
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
+ if (ctx->current->layout->chart.slot >= NK_CHART_MAX_SLOT) return;
+
+ /* add another slot into the graph */
+ {struct nk_chart *chart = &ctx->current->layout->chart;
+ struct nk_chart_slot *slot = &chart->slots[chart->slot++];
+ slot->type = type;
+ slot->count = count;
+ slot->color = color;
+ slot->highlight = highlight;
+ slot->min = NK_MIN(min_value, max_value);
+ slot->max = NK_MAX(min_value, max_value);
+ slot->range = slot->max - slot->min;}
+}
+NK_API void
+nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type type,
+ int count, float min_value, float max_value)
+{
+ nk_chart_add_slot_colored(ctx, type, ctx->style.chart.color,
+ ctx->style.chart.selected_color, count, min_value, max_value);
+}
+NK_INTERN nk_flags
+nk_chart_push_line(struct nk_context *ctx, struct nk_window *win,
+ struct nk_chart *g, float value, int slot)
+{
+ struct nk_panel *layout = win->layout;
+ const struct nk_input *i = &ctx->input;
+ struct nk_command_buffer *out = &win->buffer;
+
+ nk_flags ret = 0;
+ struct nk_vec2 cur;
+ struct nk_rect bounds;
+ struct nk_color color;
+ float step;
+ float range;
+ float ratio;
+
+ NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);
+ step = g->w / (float)g->slots[slot].count;
+ range = g->slots[slot].max - g->slots[slot].min;
+ ratio = (value - g->slots[slot].min) / range;
+
+ if (g->slots[slot].index == 0) {
+ /* first data point does not have a connection */
+ g->slots[slot].last.x = g->x;
+ g->slots[slot].last.y = (g->y + g->h) - ratio * (float)g->h;
+
+ bounds.x = g->slots[slot].last.x - 2;
+ bounds.y = g->slots[slot].last.y - 2;
+ bounds.w = bounds.h = 4;
+
+ color = g->slots[slot].color;
+ if (!(layout->flags & NK_WINDOW_ROM) &&
+ NK_INBOX(i->mouse.pos.x,i->mouse.pos.y, g->slots[slot].last.x-3, g->slots[slot].last.y-3, 6, 6)){
+ ret = nk_input_is_mouse_hovering_rect(i, bounds) ? NK_CHART_HOVERING : 0;
+ ret |= (i->mouse.buttons[NK_BUTTON_LEFT].down &&
+ i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
+ color = g->slots[slot].highlight;
+ }
+ nk_fill_rect(out, bounds, 0, color);
+ g->slots[slot].index += 1;
+ return ret;
+ }
+
+ /* draw a line between the last data point and the new one */
+ color = g->slots[slot].color;
+ cur.x = g->x + (float)(step * (float)g->slots[slot].index);
+ cur.y = (g->y + g->h) - (ratio * (float)g->h);
+ nk_stroke_line(out, g->slots[slot].last.x, g->slots[slot].last.y, cur.x, cur.y, 1.0f, color);
+
+ bounds.x = cur.x - 3;
+ bounds.y = cur.y - 3;
+ bounds.w = bounds.h = 6;
+
+ /* user selection of current data point */
+ if (!(layout->flags & NK_WINDOW_ROM)) {
+ if (nk_input_is_mouse_hovering_rect(i, bounds)) {
+ ret = NK_CHART_HOVERING;
+ ret |= (!i->mouse.buttons[NK_BUTTON_LEFT].down &&
+ i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
+ color = g->slots[slot].highlight;
+ }
+ }
+ nk_fill_rect(out, nk_rect(cur.x - 2, cur.y - 2, 4, 4), 0, color);
+
+ /* save current data point position */
+ g->slots[slot].last.x = cur.x;
+ g->slots[slot].last.y = cur.y;
+ g->slots[slot].index += 1;
+ return ret;
+}
+NK_INTERN nk_flags
+nk_chart_push_column(const struct nk_context *ctx, struct nk_window *win,
+ struct nk_chart *chart, float value, int slot)
+{
+ struct nk_command_buffer *out = &win->buffer;
+ const struct nk_input *in = &ctx->input;
+ struct nk_panel *layout = win->layout;
+
+ float ratio;
+ nk_flags ret = 0;
+ struct nk_color color;
+ struct nk_rect item = {0,0,0,0};
+
+ NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);
+ if (chart->slots[slot].index >= chart->slots[slot].count)
+ return nk_false;
+ if (chart->slots[slot].count) {
+ float padding = (float)(chart->slots[slot].count-1);
+ item.w = (chart->w - padding) / (float)(chart->slots[slot].count);
+ }
+
+ /* calculate bounds of current bar chart entry */
+ color = chart->slots[slot].color;;
+ item.h = chart->h * NK_ABS((value/chart->slots[slot].range));
+ if (value >= 0) {
+ ratio = (value + NK_ABS(chart->slots[slot].min)) / NK_ABS(chart->slots[slot].range);
+ item.y = (chart->y + chart->h) - chart->h * ratio;
+ } else {
+ ratio = (value - chart->slots[slot].max) / chart->slots[slot].range;
+ item.y = chart->y + (chart->h * NK_ABS(ratio)) - item.h;
+ }
+ item.x = chart->x + ((float)chart->slots[slot].index * item.w);
+ item.x = item.x + ((float)chart->slots[slot].index);
+
+ /* user chart bar selection */
+ if (!(layout->flags & NK_WINDOW_ROM) &&
+ NK_INBOX(in->mouse.pos.x,in->mouse.pos.y,item.x,item.y,item.w,item.h)) {
+ ret = NK_CHART_HOVERING;
+ ret |= (!in->mouse.buttons[NK_BUTTON_LEFT].down &&
+ in->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
+ color = chart->slots[slot].highlight;
+ }
+ nk_fill_rect(out, item, 0, color);
+ chart->slots[slot].index += 1;
+ return ret;
+}
+NK_API nk_flags
+nk_chart_push_slot(struct nk_context *ctx, float value, int slot)
+{
+ nk_flags flags;
+ struct nk_window *win;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);
+ NK_ASSERT(slot < ctx->current->layout->chart.slot);
+ if (!ctx || !ctx->current || slot >= NK_CHART_MAX_SLOT) return nk_false;
+ if (slot >= ctx->current->layout->chart.slot) return nk_false;
+
+ win = ctx->current;
+ if (win->layout->chart.slot < slot) return nk_false;
+ switch (win->layout->chart.slots[slot].type) {
+ case NK_CHART_LINES:
+ flags = nk_chart_push_line(ctx, win, &win->layout->chart, value, slot); break;
+ case NK_CHART_COLUMN:
+ flags = nk_chart_push_column(ctx, win, &win->layout->chart, value, slot); break;
+ default:
+ case NK_CHART_MAX:
+ flags = 0;
+ }
+ return flags;
+}
+NK_API nk_flags
+nk_chart_push(struct nk_context *ctx, float value)
+{
+ return nk_chart_push_slot(ctx, value, 0);
+}
+NK_API void
+nk_chart_end(struct nk_context *ctx)
+{
+ struct nk_window *win;
+ struct nk_chart *chart;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current)
+ return;
+
+ win = ctx->current;
+ chart = &win->layout->chart;
+ NK_MEMSET(chart, 0, sizeof(*chart));
+ return;
+}
+NK_API void
+nk_plot(struct nk_context *ctx, enum nk_chart_type type, const float *values,
+ int count, int offset)
+{
+ int i = 0;
+ float min_value;
+ float max_value;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(values);
+ if (!ctx || !values || !count) return;
+
+ min_value = values[offset];
+ max_value = values[offset];
+ for (i = 0; i < count; ++i) {
+ min_value = NK_MIN(values[i + offset], min_value);
+ max_value = NK_MAX(values[i + offset], max_value);
+ }
+
+ if (nk_chart_begin(ctx, type, count, min_value, max_value)) {
+ for (i = 0; i < count; ++i)
+ nk_chart_push(ctx, values[i + offset]);
+ nk_chart_end(ctx);
+ }
+}
+NK_API void
+nk_plot_function(struct nk_context *ctx, enum nk_chart_type type, void *userdata,
+ float(*value_getter)(void* user, int index), int count, int offset)
+{
+ int i = 0;
+ float min_value;
+ float max_value;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(value_getter);
+ if (!ctx || !value_getter || !count) return;
+
+ max_value = min_value = value_getter(userdata, offset);
+ for (i = 0; i < count; ++i) {
+ float value = value_getter(userdata, i + offset);
+ min_value = NK_MIN(value, min_value);
+ max_value = NK_MAX(value, max_value);
+ }
+
+ if (nk_chart_begin(ctx, type, count, min_value, max_value)) {
+ for (i = 0; i < count; ++i)
+ nk_chart_push(ctx, value_getter(userdata, i + offset));
+ nk_chart_end(ctx);
+ }
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * COLOR PICKER
+ *
+ * ===============================================================*/
+NK_LIB int
+nk_color_picker_behavior(nk_flags *state,
+ const struct nk_rect *bounds, const struct nk_rect *matrix,
+ const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar,
+ struct nk_colorf *color, const struct nk_input *in)
+{
+ float hsva[4];
+ int value_changed = 0;
+ int hsv_changed = 0;
+
+ NK_ASSERT(state);
+ NK_ASSERT(matrix);
+ NK_ASSERT(hue_bar);
+ NK_ASSERT(color);
+
+ /* color matrix */
+ nk_colorf_hsva_fv(hsva, *color);
+ if (nk_button_behavior(state, *matrix, in, NK_BUTTON_REPEATER)) {
+ hsva[1] = NK_SATURATE((in->mouse.pos.x - matrix->x) / (matrix->w-1));
+ hsva[2] = 1.0f - NK_SATURATE((in->mouse.pos.y - matrix->y) / (matrix->h-1));
+ value_changed = hsv_changed = 1;
+ }
+ /* hue bar */
+ if (nk_button_behavior(state, *hue_bar, in, NK_BUTTON_REPEATER)) {
+ hsva[0] = NK_SATURATE((in->mouse.pos.y - hue_bar->y) / (hue_bar->h-1));
+ value_changed = hsv_changed = 1;
+ }
+ /* alpha bar */
+ if (alpha_bar) {
+ if (nk_button_behavior(state, *alpha_bar, in, NK_BUTTON_REPEATER)) {
+ hsva[3] = 1.0f - NK_SATURATE((in->mouse.pos.y - alpha_bar->y) / (alpha_bar->h-1));
+ value_changed = 1;
+ }
+ }
+ nk_widget_state_reset(state);
+ if (hsv_changed) {
+ *color = nk_hsva_colorfv(hsva);
+ *state = NK_WIDGET_STATE_ACTIVE;
+ }
+ if (value_changed) {
+ color->a = hsva[3];
+ *state = NK_WIDGET_STATE_ACTIVE;
+ }
+ /* set color picker widget state */
+ if (nk_input_is_mouse_hovering_rect(in, *bounds))
+ *state = NK_WIDGET_STATE_HOVERED;
+ if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, *bounds))
+ *state |= NK_WIDGET_STATE_ENTERED;
+ else if (nk_input_is_mouse_prev_hovering_rect(in, *bounds))
+ *state |= NK_WIDGET_STATE_LEFT;
+ return value_changed;
+}
+NK_LIB void
+nk_draw_color_picker(struct nk_command_buffer *o, const struct nk_rect *matrix,
+ const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar,
+ struct nk_colorf col)
+{
+ NK_STORAGE const struct nk_color black = {0,0,0,255};
+ NK_STORAGE const struct nk_color white = {255, 255, 255, 255};
+ NK_STORAGE const struct nk_color black_trans = {0,0,0,0};
+
+ const float crosshair_size = 7.0f;
+ struct nk_color temp;
+ float hsva[4];
+ float line_y;
+ int i;
+
+ NK_ASSERT(o);
+ NK_ASSERT(matrix);
+ NK_ASSERT(hue_bar);
+
+ /* draw hue bar */
+ nk_colorf_hsva_fv(hsva, col);
+ for (i = 0; i < 6; ++i) {
+ NK_GLOBAL const struct nk_color hue_colors[] = {
+ {255, 0, 0, 255}, {255,255,0,255}, {0,255,0,255}, {0, 255,255,255},
+ {0,0,255,255}, {255, 0, 255, 255}, {255, 0, 0, 255}
+ };
+ nk_fill_rect_multi_color(o,
+ nk_rect(hue_bar->x, hue_bar->y + (float)i * (hue_bar->h/6.0f) + 0.5f,
+ hue_bar->w, (hue_bar->h/6.0f) + 0.5f), hue_colors[i], hue_colors[i],
+ hue_colors[i+1], hue_colors[i+1]);
+ }
+ line_y = (float)(int)(hue_bar->y + hsva[0] * matrix->h + 0.5f);
+ nk_stroke_line(o, hue_bar->x-1, line_y, hue_bar->x + hue_bar->w + 2,
+ line_y, 1, nk_rgb(255,255,255));
+
+ /* draw alpha bar */
+ if (alpha_bar) {
+ float alpha = NK_SATURATE(col.a);
+ line_y = (float)(int)(alpha_bar->y + (1.0f - alpha) * matrix->h + 0.5f);
+
+ nk_fill_rect_multi_color(o, *alpha_bar, white, white, black, black);
+ nk_stroke_line(o, alpha_bar->x-1, line_y, alpha_bar->x + alpha_bar->w + 2,
+ line_y, 1, nk_rgb(255,255,255));
+ }
+
+ /* draw color matrix */
+ temp = nk_hsv_f(hsva[0], 1.0f, 1.0f);
+ nk_fill_rect_multi_color(o, *matrix, white, temp, temp, white);
+ nk_fill_rect_multi_color(o, *matrix, black_trans, black_trans, black, black);
+
+ /* draw cross-hair */
+ {struct nk_vec2 p; float S = hsva[1]; float V = hsva[2];
+ p.x = (float)(int)(matrix->x + S * matrix->w);
+ p.y = (float)(int)(matrix->y + (1.0f - V) * matrix->h);
+ nk_stroke_line(o, p.x - crosshair_size, p.y, p.x-2, p.y, 1.0f, white);
+ nk_stroke_line(o, p.x + crosshair_size + 1, p.y, p.x+3, p.y, 1.0f, white);
+ nk_stroke_line(o, p.x, p.y + crosshair_size + 1, p.x, p.y+3, 1.0f, white);
+ nk_stroke_line(o, p.x, p.y - crosshair_size, p.x, p.y-2, 1.0f, white);}
+}
+NK_LIB int
+nk_do_color_picker(nk_flags *state,
+ struct nk_command_buffer *out, struct nk_colorf *col,
+ enum nk_color_format fmt, struct nk_rect bounds,
+ struct nk_vec2 padding, const struct nk_input *in,
+ const struct nk_user_font *font)
+{
+ int ret = 0;
+ struct nk_rect matrix;
+ struct nk_rect hue_bar;
+ struct nk_rect alpha_bar;
+ float bar_w;
+
+ NK_ASSERT(out);
+ NK_ASSERT(col);
+ NK_ASSERT(state);
+ NK_ASSERT(font);
+ if (!out || !col || !state || !font)
+ return ret;
+
+ bar_w = font->height;
+ bounds.x += padding.x;
+ bounds.y += padding.x;
+ bounds.w -= 2 * padding.x;
+ bounds.h -= 2 * padding.y;
+
+ matrix.x = bounds.x;
+ matrix.y = bounds.y;
+ matrix.h = bounds.h;
+ matrix.w = bounds.w - (3 * padding.x + 2 * bar_w);
+
+ hue_bar.w = bar_w;
+ hue_bar.y = bounds.y;
+ hue_bar.h = matrix.h;
+ hue_bar.x = matrix.x + matrix.w + padding.x;
+
+ alpha_bar.x = hue_bar.x + hue_bar.w + padding.x;
+ alpha_bar.y = bounds.y;
+ alpha_bar.w = bar_w;
+ alpha_bar.h = matrix.h;
+
+ ret = nk_color_picker_behavior(state, &bounds, &matrix, &hue_bar,
+ (fmt == NK_RGBA) ? &alpha_bar:0, col, in);
+ nk_draw_color_picker(out, &matrix, &hue_bar, (fmt == NK_RGBA) ? &alpha_bar:0, *col);
+ return ret;
+}
+NK_API int
+nk_color_pick(struct nk_context * ctx, struct nk_colorf *color,
+ enum nk_color_format fmt)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_style *config;
+ const struct nk_input *in;
+
+ enum nk_widget_layout_states state;
+ struct nk_rect bounds;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(color);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !color)
+ return 0;
+
+ win = ctx->current;
+ config = &ctx->style;
+ layout = win->layout;
+ state = nk_widget(&bounds, ctx);
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_color_picker(&ctx->last_widget_state, &win->buffer, color, fmt, bounds,
+ nk_vec2(0,0), in, config->font);
+}
+NK_API struct nk_colorf
+nk_color_picker(struct nk_context *ctx, struct nk_colorf color,
+ enum nk_color_format fmt)
+{
+ nk_color_pick(ctx, &color, fmt);
+ return color;
+}
+
+
+
+
+
+/* ==============================================================
+ *
+ * COMBO
+ *
+ * ===============================================================*/
+NK_INTERN int
+nk_combo_begin(struct nk_context *ctx, struct nk_window *win,
+ struct nk_vec2 size, int is_clicked, struct nk_rect header)
+{
+ struct nk_window *popup;
+ int is_open = 0;
+ int is_active = 0;
+ struct nk_rect body;
+ nk_hash hash;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ popup = win->popup.win;
+ body.x = header.x;
+ body.w = size.x;
+ body.y = header.y + header.h-ctx->style.window.combo_border;
+ body.h = size.y;
+
+ hash = win->popup.combo_count++;
+ is_open = (popup) ? nk_true:nk_false;
+ is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_COMBO);
+ if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||
+ (!is_open && !is_active && !is_clicked)) return 0;
+ if (!nk_nonblock_begin(ctx, 0, body,
+ (is_clicked && is_open)?nk_rect(0,0,0,0):header, NK_PANEL_COMBO)) return 0;
+
+ win->popup.type = NK_PANEL_COMBO;
+ win->popup.name = hash;
+ return 1;
+}
+NK_API int
+nk_combo_begin_text(struct nk_context *ctx, const char *selected, int len,
+ struct nk_vec2 size)
+{
+ const struct nk_input *in;
+ struct nk_window *win;
+ struct nk_style *style;
+
+ enum nk_widget_layout_states s;
+ int is_clicked = nk_false;
+ struct nk_rect header;
+ const struct nk_style_item *background;
+ struct nk_text text;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(selected);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout || !selected)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ s = nk_widget(&header, ctx);
+ if (s == NK_WIDGET_INVALID)
+ return 0;
+
+ in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
+ if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
+ is_clicked = nk_true;
+
+ /* draw combo box header background and border */
+ if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->combo.active;
+ text.text = style->combo.label_active;
+ } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {
+ background = &style->combo.hover;
+ text.text = style->combo.label_hover;
+ } else {
+ background = &style->combo.normal;
+ text.text = style->combo.label_normal;
+ }
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ text.background = nk_rgba(0,0,0,0);
+ nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
+ nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
+ }
+ {
+ /* print currently selected text item */
+ struct nk_rect label;
+ struct nk_rect button;
+ struct nk_rect content;
+
+ enum nk_symbol_type sym;
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ sym = style->combo.sym_hover;
+ else if (is_clicked)
+ sym = style->combo.sym_active;
+ else sym = style->combo.sym_normal;
+
+ /* calculate button */
+ button.w = header.h - 2 * style->combo.button_padding.y;
+ button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
+ button.y = header.y + style->combo.button_padding.y;
+ button.h = button.w;
+
+ content.x = button.x + style->combo.button.padding.x;
+ content.y = button.y + style->combo.button.padding.y;
+ content.w = button.w - 2 * style->combo.button.padding.x;
+ content.h = button.h - 2 * style->combo.button.padding.y;
+
+ /* draw selected label */
+ text.padding = nk_vec2(0,0);
+ label.x = header.x + style->combo.content_padding.x;
+ label.y = header.y + style->combo.content_padding.y;
+ label.w = button.x - (style->combo.content_padding.x + style->combo.spacing.x) - label.x;;
+ label.h = header.h - 2 * style->combo.content_padding.y;
+ nk_widget_text(&win->buffer, label, selected, len, &text,
+ NK_TEXT_LEFT, ctx->style.font);
+
+ /* draw open/close button */
+ nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
+ &ctx->style.combo.button, sym, style->font);
+ }
+ return nk_combo_begin(ctx, win, size, is_clicked, header);
+}
+NK_API int
+nk_combo_begin_label(struct nk_context *ctx, const char *selected, struct nk_vec2 size)
+{
+ return nk_combo_begin_text(ctx, selected, nk_strlen(selected), size);
+}
+NK_API int
+nk_combo_begin_color(struct nk_context *ctx, struct nk_color color, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ const struct nk_input *in;
+
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ enum nk_widget_layout_states s;
+ const struct nk_style_item *background;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ s = nk_widget(&header, ctx);
+ if (s == NK_WIDGET_INVALID)
+ return 0;
+
+ in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
+ if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
+ is_clicked = nk_true;
+
+ /* draw combo box header background and border */
+ if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED)
+ background = &style->combo.active;
+ else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ background = &style->combo.hover;
+ else background = &style->combo.normal;
+
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(&win->buffer, header, &background->data.image,nk_white);
+ } else {
+ nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
+ nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
+ }
+ {
+ struct nk_rect content;
+ struct nk_rect button;
+ struct nk_rect bounds;
+
+ enum nk_symbol_type sym;
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ sym = style->combo.sym_hover;
+ else if (is_clicked)
+ sym = style->combo.sym_active;
+ else sym = style->combo.sym_normal;
+
+ /* calculate button */
+ button.w = header.h - 2 * style->combo.button_padding.y;
+ button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
+ button.y = header.y + style->combo.button_padding.y;
+ button.h = button.w;
+
+ content.x = button.x + style->combo.button.padding.x;
+ content.y = button.y + style->combo.button.padding.y;
+ content.w = button.w - 2 * style->combo.button.padding.x;
+ content.h = button.h - 2 * style->combo.button.padding.y;
+
+ /* draw color */
+ bounds.h = header.h - 4 * style->combo.content_padding.y;
+ bounds.y = header.y + 2 * style->combo.content_padding.y;
+ bounds.x = header.x + 2 * style->combo.content_padding.x;
+ bounds.w = (button.x - (style->combo.content_padding.x + style->combo.spacing.x)) - bounds.x;
+ nk_fill_rect(&win->buffer, bounds, 0, color);
+
+ /* draw open/close button */
+ nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
+ &ctx->style.combo.button, sym, style->font);
+ }
+ return nk_combo_begin(ctx, win, size, is_clicked, header);
+}
+NK_API int
+nk_combo_begin_symbol(struct nk_context *ctx, enum nk_symbol_type symbol, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ const struct nk_input *in;
+
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ enum nk_widget_layout_states s;
+ const struct nk_style_item *background;
+ struct nk_color sym_background;
+ struct nk_color symbol_color;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ s = nk_widget(&header, ctx);
+ if (s == NK_WIDGET_INVALID)
+ return 0;
+
+ in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
+ if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
+ is_clicked = nk_true;
+
+ /* draw combo box header background and border */
+ if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->combo.active;
+ symbol_color = style->combo.symbol_active;
+ } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {
+ background = &style->combo.hover;
+ symbol_color = style->combo.symbol_hover;
+ } else {
+ background = &style->combo.normal;
+ symbol_color = style->combo.symbol_hover;
+ }
+
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ sym_background = nk_rgba(0,0,0,0);
+ nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
+ } else {
+ sym_background = background->data.color;
+ nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
+ nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
+ }
+ {
+ struct nk_rect bounds = {0,0,0,0};
+ struct nk_rect content;
+ struct nk_rect button;
+
+ enum nk_symbol_type sym;
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ sym = style->combo.sym_hover;
+ else if (is_clicked)
+ sym = style->combo.sym_active;
+ else sym = style->combo.sym_normal;
+
+ /* calculate button */
+ button.w = header.h - 2 * style->combo.button_padding.y;
+ button.x = (header.x + header.w - header.h) - style->combo.button_padding.y;
+ button.y = header.y + style->combo.button_padding.y;
+ button.h = button.w;
+
+ content.x = button.x + style->combo.button.padding.x;
+ content.y = button.y + style->combo.button.padding.y;
+ content.w = button.w - 2 * style->combo.button.padding.x;
+ content.h = button.h - 2 * style->combo.button.padding.y;
+
+ /* draw symbol */
+ bounds.h = header.h - 2 * style->combo.content_padding.y;
+ bounds.y = header.y + style->combo.content_padding.y;
+ bounds.x = header.x + style->combo.content_padding.x;
+ bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;
+ nk_draw_symbol(&win->buffer, symbol, bounds, sym_background, symbol_color,
+ 1.0f, style->font);
+
+ /* draw open/close button */
+ nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,
+ &ctx->style.combo.button, sym, style->font);
+ }
+ return nk_combo_begin(ctx, win, size, is_clicked, header);
+}
+NK_API int
+nk_combo_begin_symbol_text(struct nk_context *ctx, const char *selected, int len,
+ enum nk_symbol_type symbol, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ struct nk_input *in;
+
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ enum nk_widget_layout_states s;
+ const struct nk_style_item *background;
+ struct nk_color symbol_color;
+ struct nk_text text;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ s = nk_widget(&header, ctx);
+ if (!s) return 0;
+
+ in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
+ if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
+ is_clicked = nk_true;
+
+ /* draw combo box header background and border */
+ if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->combo.active;
+ symbol_color = style->combo.symbol_active;
+ text.text = style->combo.label_active;
+ } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {
+ background = &style->combo.hover;
+ symbol_color = style->combo.symbol_hover;
+ text.text = style->combo.label_hover;
+ } else {
+ background = &style->combo.normal;
+ symbol_color = style->combo.symbol_normal;
+ text.text = style->combo.label_normal;
+ }
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ text.background = nk_rgba(0,0,0,0);
+ nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
+ nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
+ }
+ {
+ struct nk_rect content;
+ struct nk_rect button;
+ struct nk_rect label;
+ struct nk_rect image;
+
+ enum nk_symbol_type sym;
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ sym = style->combo.sym_hover;
+ else if (is_clicked)
+ sym = style->combo.sym_active;
+ else sym = style->combo.sym_normal;
+
+ /* calculate button */
+ button.w = header.h - 2 * style->combo.button_padding.y;
+ button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
+ button.y = header.y + style->combo.button_padding.y;
+ button.h = button.w;
+
+ content.x = button.x + style->combo.button.padding.x;
+ content.y = button.y + style->combo.button.padding.y;
+ content.w = button.w - 2 * style->combo.button.padding.x;
+ content.h = button.h - 2 * style->combo.button.padding.y;
+ nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
+ &ctx->style.combo.button, sym, style->font);
+
+ /* draw symbol */
+ image.x = header.x + style->combo.content_padding.x;
+ image.y = header.y + style->combo.content_padding.y;
+ image.h = header.h - 2 * style->combo.content_padding.y;
+ image.w = image.h;
+ nk_draw_symbol(&win->buffer, symbol, image, text.background, symbol_color,
+ 1.0f, style->font);
+
+ /* draw label */
+ text.padding = nk_vec2(0,0);
+ label.x = image.x + image.w + style->combo.spacing.x + style->combo.content_padding.x;
+ label.y = header.y + style->combo.content_padding.y;
+ label.w = (button.x - style->combo.content_padding.x) - label.x;
+ label.h = header.h - 2 * style->combo.content_padding.y;
+ nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);
+ }
+ return nk_combo_begin(ctx, win, size, is_clicked, header);
+}
+NK_API int
+nk_combo_begin_image(struct nk_context *ctx, struct nk_image img, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ const struct nk_input *in;
+
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ enum nk_widget_layout_states s;
+ const struct nk_style_item *background;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ s = nk_widget(&header, ctx);
+ if (s == NK_WIDGET_INVALID)
+ return 0;
+
+ in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
+ if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
+ is_clicked = nk_true;
+
+ /* draw combo box header background and border */
+ if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED)
+ background = &style->combo.active;
+ else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ background = &style->combo.hover;
+ else background = &style->combo.normal;
+
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
+ } else {
+ nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
+ nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
+ }
+ {
+ struct nk_rect bounds = {0,0,0,0};
+ struct nk_rect content;
+ struct nk_rect button;
+
+ enum nk_symbol_type sym;
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ sym = style->combo.sym_hover;
+ else if (is_clicked)
+ sym = style->combo.sym_active;
+ else sym = style->combo.sym_normal;
+
+ /* calculate button */
+ button.w = header.h - 2 * style->combo.button_padding.y;
+ button.x = (header.x + header.w - header.h) - style->combo.button_padding.y;
+ button.y = header.y + style->combo.button_padding.y;
+ button.h = button.w;
+
+ content.x = button.x + style->combo.button.padding.x;
+ content.y = button.y + style->combo.button.padding.y;
+ content.w = button.w - 2 * style->combo.button.padding.x;
+ content.h = button.h - 2 * style->combo.button.padding.y;
+
+ /* draw image */
+ bounds.h = header.h - 2 * style->combo.content_padding.y;
+ bounds.y = header.y + style->combo.content_padding.y;
+ bounds.x = header.x + style->combo.content_padding.x;
+ bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;
+ nk_draw_image(&win->buffer, bounds, &img, nk_white);
+
+ /* draw open/close button */
+ nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,
+ &ctx->style.combo.button, sym, style->font);
+ }
+ return nk_combo_begin(ctx, win, size, is_clicked, header);
+}
+NK_API int
+nk_combo_begin_image_text(struct nk_context *ctx, const char *selected, int len,
+ struct nk_image img, struct nk_vec2 size)
+{
+ struct nk_window *win;
+ struct nk_style *style;
+ struct nk_input *in;
+
+ struct nk_rect header;
+ int is_clicked = nk_false;
+ enum nk_widget_layout_states s;
+ const struct nk_style_item *background;
+ struct nk_text text;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ win = ctx->current;
+ style = &ctx->style;
+ s = nk_widget(&header, ctx);
+ if (!s) return 0;
+
+ in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
+ if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
+ is_clicked = nk_true;
+
+ /* draw combo box header background and border */
+ if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {
+ background = &style->combo.active;
+ text.text = style->combo.label_active;
+ } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {
+ background = &style->combo.hover;
+ text.text = style->combo.label_hover;
+ } else {
+ background = &style->combo.normal;
+ text.text = style->combo.label_normal;
+ }
+ if (background->type == NK_STYLE_ITEM_IMAGE) {
+ text.background = nk_rgba(0,0,0,0);
+ nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
+ } else {
+ text.background = background->data.color;
+ nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
+ nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
+ }
+ {
+ struct nk_rect content;
+ struct nk_rect button;
+ struct nk_rect label;
+ struct nk_rect image;
+
+ enum nk_symbol_type sym;
+ if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)
+ sym = style->combo.sym_hover;
+ else if (is_clicked)
+ sym = style->combo.sym_active;
+ else sym = style->combo.sym_normal;
+
+ /* calculate button */
+ button.w = header.h - 2 * style->combo.button_padding.y;
+ button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
+ button.y = header.y + style->combo.button_padding.y;
+ button.h = button.w;
+
+ content.x = button.x + style->combo.button.padding.x;
+ content.y = button.y + style->combo.button.padding.y;
+ content.w = button.w - 2 * style->combo.button.padding.x;
+ content.h = button.h - 2 * style->combo.button.padding.y;
+ nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
+ &ctx->style.combo.button, sym, style->font);
+
+ /* draw image */
+ image.x = header.x + style->combo.content_padding.x;
+ image.y = header.y + style->combo.content_padding.y;
+ image.h = header.h - 2 * style->combo.content_padding.y;
+ image.w = image.h;
+ nk_draw_image(&win->buffer, image, &img, nk_white);
+
+ /* draw label */
+ text.padding = nk_vec2(0,0);
+ label.x = image.x + image.w + style->combo.spacing.x + style->combo.content_padding.x;
+ label.y = header.y + style->combo.content_padding.y;
+ label.w = (button.x - style->combo.content_padding.x) - label.x;
+ label.h = header.h - 2 * style->combo.content_padding.y;
+ nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);
+ }
+ return nk_combo_begin(ctx, win, size, is_clicked, header);
+}
+NK_API int
+nk_combo_begin_symbol_label(struct nk_context *ctx,
+ const char *selected, enum nk_symbol_type type, struct nk_vec2 size)
+{
+ return nk_combo_begin_symbol_text(ctx, selected, nk_strlen(selected), type, size);
+}
+NK_API int
+nk_combo_begin_image_label(struct nk_context *ctx,
+ const char *selected, struct nk_image img, struct nk_vec2 size)
+{
+ return nk_combo_begin_image_text(ctx, selected, nk_strlen(selected), img, size);
+}
+NK_API int
+nk_combo_item_text(struct nk_context *ctx, const char *text, int len,nk_flags align)
+{
+ return nk_contextual_item_text(ctx, text, len, align);
+}
+NK_API int
+nk_combo_item_label(struct nk_context *ctx, const char *label, nk_flags align)
+{
+ return nk_contextual_item_label(ctx, label, align);
+}
+NK_API int
+nk_combo_item_image_text(struct nk_context *ctx, struct nk_image img, const char *text,
+ int len, nk_flags alignment)
+{
+ return nk_contextual_item_image_text(ctx, img, text, len, alignment);
+}
+NK_API int
+nk_combo_item_image_label(struct nk_context *ctx, struct nk_image img,
+ const char *text, nk_flags alignment)
+{
+ return nk_contextual_item_image_label(ctx, img, text, alignment);
+}
+NK_API int
+nk_combo_item_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *text, int len, nk_flags alignment)
+{
+ return nk_contextual_item_symbol_text(ctx, sym, text, len, alignment);
+}
+NK_API int
+nk_combo_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,
+ const char *label, nk_flags alignment)
+{
+ return nk_contextual_item_symbol_label(ctx, sym, label, alignment);
+}
+NK_API void nk_combo_end(struct nk_context *ctx)
+{
+ nk_contextual_end(ctx);
+}
+NK_API void nk_combo_close(struct nk_context *ctx)
+{
+ nk_contextual_close(ctx);
+}
+NK_API int
+nk_combo(struct nk_context *ctx, const char **items, int count,
+ int selected, int item_height, struct nk_vec2 size)
+{
+ int i = 0;
+ int max_height;
+ struct nk_vec2 item_spacing;
+ struct nk_vec2 window_padding;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(items);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !items ||!count)
+ return selected;
+
+ item_spacing = ctx->style.window.spacing;
+ window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
+ max_height = count * item_height + count * (int)item_spacing.y;
+ max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
+ size.y = NK_MIN(size.y, (float)max_height);
+ if (nk_combo_begin_label(ctx, items[selected], size)) {
+ nk_layout_row_dynamic(ctx, (float)item_height, 1);
+ for (i = 0; i < count; ++i) {
+ if (nk_combo_item_label(ctx, items[i], NK_TEXT_LEFT))
+ selected = i;
+ }
+ nk_combo_end(ctx);
+ }
+ return selected;
+}
+NK_API int
+nk_combo_separator(struct nk_context *ctx, const char *items_separated_by_separator,
+ int separator, int selected, int count, int item_height, struct nk_vec2 size)
+{
+ int i;
+ int max_height;
+ struct nk_vec2 item_spacing;
+ struct nk_vec2 window_padding;
+ const char *current_item;
+ const char *iter;
+ int length = 0;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(items_separated_by_separator);
+ if (!ctx || !items_separated_by_separator)
+ return selected;
+
+ /* calculate popup window */
+ item_spacing = ctx->style.window.spacing;
+ window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
+ max_height = count * item_height + count * (int)item_spacing.y;
+ max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
+ size.y = NK_MIN(size.y, (float)max_height);
+
+ /* find selected item */
+ current_item = items_separated_by_separator;
+ for (i = 0; i < count; ++i) {
+ iter = current_item;
+ while (*iter && *iter != separator) iter++;
+ length = (int)(iter - current_item);
+ if (i == selected) break;
+ current_item = iter + 1;
+ }
+
+ if (nk_combo_begin_text(ctx, current_item, length, size)) {
+ current_item = items_separated_by_separator;
+ nk_layout_row_dynamic(ctx, (float)item_height, 1);
+ for (i = 0; i < count; ++i) {
+ iter = current_item;
+ while (*iter && *iter != separator) iter++;
+ length = (int)(iter - current_item);
+ if (nk_combo_item_text(ctx, current_item, length, NK_TEXT_LEFT))
+ selected = i;
+ current_item = current_item + length + 1;
+ }
+ nk_combo_end(ctx);
+ }
+ return selected;
+}
+NK_API int
+nk_combo_string(struct nk_context *ctx, const char *items_separated_by_zeros,
+ int selected, int count, int item_height, struct nk_vec2 size)
+{
+ return nk_combo_separator(ctx, items_separated_by_zeros, '\0', selected, count, item_height, size);
+}
+NK_API int
+nk_combo_callback(struct nk_context *ctx, void(*item_getter)(void*, int, const char**),
+ void *userdata, int selected, int count, int item_height, struct nk_vec2 size)
+{
+ int i;
+ int max_height;
+ struct nk_vec2 item_spacing;
+ struct nk_vec2 window_padding;
+ const char *item;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(item_getter);
+ if (!ctx || !item_getter)
+ return selected;
+
+ /* calculate popup window */
+ item_spacing = ctx->style.window.spacing;
+ window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
+ max_height = count * item_height + count * (int)item_spacing.y;
+ max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
+ size.y = NK_MIN(size.y, (float)max_height);
+
+ item_getter(userdata, selected, &item);
+ if (nk_combo_begin_label(ctx, item, size)) {
+ nk_layout_row_dynamic(ctx, (float)item_height, 1);
+ for (i = 0; i < count; ++i) {
+ item_getter(userdata, i, &item);
+ if (nk_combo_item_label(ctx, item, NK_TEXT_LEFT))
+ selected = i;
+ }
+ nk_combo_end(ctx);
+ } return selected;
+}
+NK_API void
+nk_combobox(struct nk_context *ctx, const char **items, int count,
+ int *selected, int item_height, struct nk_vec2 size)
+{
+ *selected = nk_combo(ctx, items, count, *selected, item_height, size);
+}
+NK_API void
+nk_combobox_string(struct nk_context *ctx, const char *items_separated_by_zeros,
+ int *selected, int count, int item_height, struct nk_vec2 size)
+{
+ *selected = nk_combo_string(ctx, items_separated_by_zeros, *selected, count, item_height, size);
+}
+NK_API void
+nk_combobox_separator(struct nk_context *ctx, const char *items_separated_by_separator,
+ int separator,int *selected, int count, int item_height, struct nk_vec2 size)
+{
+ *selected = nk_combo_separator(ctx, items_separated_by_separator, separator,
+ *selected, count, item_height, size);
+}
+NK_API void
+nk_combobox_callback(struct nk_context *ctx,
+ void(*item_getter)(void* data, int id, const char **out_text),
+ void *userdata, int *selected, int count, int item_height, struct nk_vec2 size)
+{
+ *selected = nk_combo_callback(ctx, item_getter, userdata, *selected, count, item_height, size);
+}
+
+
+
+
+
+/* ===============================================================
+ *
+ * TOOLTIP
+ *
+ * ===============================================================*/
+NK_API int
+nk_tooltip_begin(struct nk_context *ctx, float width)
+{
+ int x,y,w,h;
+ struct nk_window *win;
+ const struct nk_input *in;
+ struct nk_rect bounds;
+ int ret;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!ctx || !ctx->current || !ctx->current->layout)
+ return 0;
+
+ /* make sure that no nonblocking popup is currently active */
+ win = ctx->current;
+ in = &ctx->input;
+ if (win->popup.win && (win->popup.type & NK_PANEL_SET_NONBLOCK))
+ return 0;
+
+ w = nk_iceilf(width);
+ h = nk_iceilf(nk_null_rect.h);
+ x = nk_ifloorf(in->mouse.pos.x + 1) - (int)win->layout->clip.x;
+ y = nk_ifloorf(in->mouse.pos.y + 1) - (int)win->layout->clip.y;
+
+ bounds.x = (float)x;
+ bounds.y = (float)y;
+ bounds.w = (float)w;
+ bounds.h = (float)h;
+
+ ret = nk_popup_begin(ctx, NK_POPUP_DYNAMIC,
+ "__##Tooltip##__", NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_BORDER, bounds);
+ if (ret) win->layout->flags &= ~(nk_flags)NK_WINDOW_ROM;
+ win->popup.type = NK_PANEL_TOOLTIP;
+ ctx->current->layout->type = NK_PANEL_TOOLTIP;
+ return ret;
+}
+
+NK_API void
+nk_tooltip_end(struct nk_context *ctx)
+{
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ if (!ctx || !ctx->current) return;
+ ctx->current->seq--;
+ nk_popup_close(ctx);
+ nk_popup_end(ctx);
+}
+NK_API void
+nk_tooltip(struct nk_context *ctx, const char *text)
+{
+ const struct nk_style *style;
+ struct nk_vec2 padding;
+
+ int text_len;
+ float text_width;
+ float text_height;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ NK_ASSERT(text);
+ if (!ctx || !ctx->current || !ctx->current->layout || !text)
+ return;
+
+ /* fetch configuration data */
+ style = &ctx->style;
+ padding = style->window.padding;
+
+ /* calculate size of the text and tooltip */
+ text_len = nk_strlen(text);
+ text_width = style->font->width(style->font->userdata,
+ style->font->height, text, text_len);
+ text_width += (4 * padding.x);
+ text_height = (style->font->height + 2 * padding.y);
+
+ /* execute tooltip and fill with text */
+ if (nk_tooltip_begin(ctx, (float)text_width)) {
+ nk_layout_row_dynamic(ctx, (float)text_height, 1);
+ nk_text(ctx, text, text_len, NK_TEXT_LEFT);
+ nk_tooltip_end(ctx);
+ }
+}
+#ifdef NK_INCLUDE_STANDARD_VARARGS
+NK_API void
+nk_tooltipf(struct nk_context *ctx, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ nk_tooltipfv(ctx, fmt, args);
+ va_end(args);
+}
+NK_API void
+nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
+{
+ char buf[256];
+ nk_strfmt(buf, NK_LEN(buf), fmt, args);
+ nk_tooltip(ctx, buf);
+}
+#endif
+
+
+
+#endif /* NK_IMPLEMENTATION */
+
+/*
+/// ## License
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none
+/// ------------------------------------------------------------------------------
+/// This software is available under 2 licenses -- choose whichever you prefer.
+/// ------------------------------------------------------------------------------
+/// ALTERNATIVE A - MIT License
+/// Copyright (c) 2016-2018 Micha Mettke
+/// Permission is hereby granted, free of charge, to any person obtaining a copy of
+/// this software and associated documentation files (the "Software"), to deal in
+/// the Software without restriction, including without limitation the rights to
+/// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+/// of the Software, and to permit persons to whom the Software is furnished to do
+/// so, subject to the following conditions:
+/// The above copyright notice and this permission notice shall be included in all
+/// copies or substantial portions of the Software.
+/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+/// SOFTWARE.
+/// ------------------------------------------------------------------------------
+/// ALTERNATIVE B - Public Domain (www.unlicense.org)
+/// This is free and unencumbered software released into the public domain.
+/// Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+/// software, either in source code form or as a compiled binary, for any purpose,
+/// commercial or non-commercial, and by any means.
+/// In jurisdictions that recognize copyright laws, the author or authors of this
+/// software dedicate any and all copyright interest in the software to the public
+/// domain. We make this dedication for the benefit of the public at large and to
+/// the detriment of our heirs and successors. We intend this dedication to be an
+/// overt act of relinquishment in perpetuity of all present and future rights to
+/// this software under copyright law.
+/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+/// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+/// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+/// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+/// ------------------------------------------------------------------------------
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+/// ## Changelog
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none
+/// [date][x.yy.zz]-[description]
+/// -[date]: date on which the change has been pushed
+/// -[x.yy.zz]: Numerical version string representation. Each version number on the right
+/// resets back to zero if version on the left is incremented.
+/// - [x]: Major version with API and library breaking changes
+/// - [yy]: Minor version with non-breaking API and library changes
+/// - [zz]: Bug fix version with no direct changes to API
+///
+/// - 2018/04/01 (4.00.1) - Fixed calling `nk_convert` multiple time per single frame
+/// - 2018/04/01 (4.00.0) - BREAKING CHANGE: nk_draw_list_clear no longer tries to
+/// clear provided buffers. So make sure to either free
+/// or clear each passed buffer after calling nk_convert.
+/// - 2018/02/23 (3.00.6) - Fixed slider dragging behavior
+/// - 2018/01/31 (3.00.5) - Fixed overcalculation of cursor data in font baking process
+/// - 2018/01/31 (3.00.4) - Removed name collision with stb_truetype
+/// - 2018/01/28 (3.00.3) - Fixed panel window border drawing bug
+/// - 2018/01/12 (3.00.2) - Added `nk_group_begin_titled` for separed group identifier and title
+/// - 2018/01/07 (3.00.1) - Started to change documentation style
+/// - 2018/01/05 (3.00.0) - BREAKING CHANGE: The previous color picker API was broken
+/// because of conversions between float and byte color representation.
+/// Color pickers now use floating point values to represent
+/// HSV values. To get back the old behavior I added some additional
+/// color conversion functions to cast between nk_color and
+/// nk_colorf.
+/// - 2017/12/23 (2.00.7) - Fixed small warning
+/// - 2017/12/23 (2.00.7) - Fixed nk_edit_buffer behavior if activated to allow input
+/// - 2017/12/23 (2.00.7) - Fixed modifyable progressbar dragging visuals and input behavior
+/// - 2017/12/04 (2.00.6) - Added formated string tooltip widget
+/// - 2017/11/18 (2.00.5) - Fixed window becoming hidden with flag NK_WINDOW_NO_INPUT
+/// - 2017/11/15 (2.00.4) - Fixed font merging
+/// - 2017/11/07 (2.00.3) - Fixed window size and position modifier functions
+/// - 2017/09/14 (2.00.2) - Fixed nk_edit_buffer and nk_edit_focus behavior
+/// - 2017/09/14 (2.00.1) - Fixed window closing behavior
+/// - 2017/09/14 (2.00.0) - BREAKING CHANGE: Modifing window position and size funtions now
+/// require the name of the window and must happen outside the window
+/// building process (between function call nk_begin and nk_end).
+/// - 2017/09/11 (1.40.9) - Fixed window background flag if background window is declared last
+/// - 2017/08/27 (1.40.8) - Fixed `nk_item_is_any_active` for hidden windows
+/// - 2017/08/27 (1.40.7) - Fixed window background flag
+/// - 2017/07/07 (1.40.6) - Fixed missing clipping rect check for hovering/clicked
+/// query for widgets
+/// - 2017/07/07 (1.40.5) - Fixed drawing bug for vertex output for lines and stroked
+/// and filled rectangles
+/// - 2017/07/07 (1.40.4) - Fixed bug in nk_convert trying to add windows that are in
+/// process of being destroyed.
+/// - 2017/07/07 (1.40.3) - Fixed table internal bug caused by storing table size in
+/// window instead of directly in table.
+/// - 2017/06/30 (1.40.2) - Removed unneeded semicolon in C++ NK_ALIGNOF macro
+/// - 2017/06/30 (1.40.1) - Fixed drawing lines smaller or equal zero
+/// - 2017/06/08 (1.40.0) - Removed the breaking part of last commit. Auto layout now only
+/// comes in effect if you pass in zero was row height argument
+/// - 2017/06/08 (1.40.0) - BREAKING CHANGE: while not directly API breaking it will change
+/// how layouting works. From now there will be an internal minimum
+/// row height derived from font height. If you need a row smaller than
+/// that you can directly set it by `nk_layout_set_min_row_height` and
+/// reset the value back by calling `nk_layout_reset_min_row_height.
+/// - 2017/06/08 (1.39.1) - Fixed property text edit handling bug caused by past `nk_widget` fix
+/// - 2017/06/08 (1.39.0) - Added function to retrieve window space without calling a nk_layout_xxx function
+/// - 2017/06/06 (1.38.5) - Fixed `nk_convert` return flag for command buffer
+/// - 2017/05/23 (1.38.4) - Fixed activation behavior for widgets partially clipped
+/// - 2017/05/10 (1.38.3) - Fixed wrong min window size mouse scaling over boundries
+/// - 2017/05/09 (1.38.2) - Fixed vertical scrollbar drawing with not enough space
+/// - 2017/05/09 (1.38.1) - Fixed scaler dragging behavior if window size hits minimum size
+/// - 2017/05/06 (1.38.0) - Added platform double-click support
+/// - 2017/04/20 (1.37.1) - Fixed key repeat found inside glfw demo backends
+/// - 2017/04/20 (1.37.0) - Extended properties with selection and clipbard support
+/// - 2017/04/20 (1.36.2) - Fixed #405 overlapping rows with zero padding and spacing
+/// - 2017/04/09 (1.36.1) - Fixed #403 with another widget float error
+/// - 2017/04/09 (1.36.0) - Added window `NK_WINDOW_NO_INPUT` and `NK_WINDOW_NOT_INTERACTIVE` flags
+/// - 2017/04/09 (1.35.3) - Fixed buffer heap corruption
+/// - 2017/03/25 (1.35.2) - Fixed popup overlapping for `NK_WINDOW_BACKGROUND` windows
+/// - 2017/03/25 (1.35.1) - Fixed windows closing behavior
+/// - 2017/03/18 (1.35.0) - Added horizontal scroll requested in #377
+/// - 2017/03/18 (1.34.3) - Fixed long window header titles
+/// - 2017/03/04 (1.34.2) - Fixed text edit filtering
+/// - 2017/03/04 (1.34.1) - Fixed group closable flag
+/// - 2017/02/25 (1.34.0) - Added custom draw command for better language binding support
+/// - 2017/01/24 (1.33.0) - Added programatic way of remove edit focus
+/// - 2017/01/24 (1.32.3) - Fixed wrong define for basic type definitions for windows
+/// - 2017/01/21 (1.32.2) - Fixed input capture from hidden or closed windows
+/// - 2017/01/21 (1.32.1) - Fixed slider behavior and drawing
+/// - 2017/01/13 (1.32.0) - Added flag to put scaler into the bottom left corner
+/// - 2017/01/13 (1.31.0) - Added additional row layouting method to combine both
+/// dynamic and static widgets.
+/// - 2016/12/31 (1.30.0) - Extended scrollbar offset from 16-bit to 32-bit
+/// - 2016/12/31 (1.29.2)- Fixed closing window bug of minimized windows
+/// - 2016/12/03 (1.29.1)- Fixed wrapped text with no seperator and C89 error
+/// - 2016/12/03 (1.29.0) - Changed text wrapping to process words not characters
+/// - 2016/11/22 (1.28.6)- Fixed window minimized closing bug
+/// - 2016/11/19 (1.28.5)- Fixed abstract combo box closing behavior
+/// - 2016/11/19 (1.28.4)- Fixed tooltip flickering
+/// - 2016/11/19 (1.28.3)- Fixed memory leak caused by popup repeated closing
+/// - 2016/11/18 (1.28.2)- Fixed memory leak caused by popup panel allocation
+/// - 2016/11/10 (1.28.1)- Fixed some warnings and C++ error
+/// - 2016/11/10 (1.28.0)- Added additional `nk_button` versions which allows to directly
+/// pass in a style struct to change buttons visual.
+/// - 2016/11/10 (1.27.0)- Added additional 'nk_tree' versions to support external state
+/// storage. Just like last the `nk_group` commit the main
+/// advantage is that you optionally can minimize nuklears runtime
+/// memory consumption or handle hash collisions.
+/// - 2016/11/09 (1.26.0)- Added additional `nk_group` version to support external scrollbar
+/// offset storage. Main advantage is that you can externalize
+/// the memory management for the offset. It could also be helpful
+/// if you have a hash collision in `nk_group_begin` but really
+/// want the name. In addition I added `nk_list_view` which allows
+/// to draw big lists inside a group without actually having to
+/// commit the whole list to nuklear (issue #269).
+/// - 2016/10/30 (1.25.1)- Fixed clipping rectangle bug inside `nk_draw_list`
+/// - 2016/10/29 (1.25.0)- Pulled `nk_panel` memory management into nuklear and out of
+/// the hands of the user. From now on users don't have to care
+/// about panels unless they care about some information. If you
+/// still need the panel just call `nk_window_get_panel`.
+/// - 2016/10/21 (1.24.0)- Changed widget border drawing to stroked rectangle from filled
+/// rectangle for less overdraw and widget background transparency.
+/// - 2016/10/18 (1.23.0)- Added `nk_edit_focus` for manually edit widget focus control
+/// - 2016/09/29 (1.22.7)- Fixed deduction of basic type in non `<stdint.h>` compilation
+/// - 2016/09/29 (1.22.6)- Fixed edit widget UTF-8 text cursor drawing bug
+/// - 2016/09/28 (1.22.5)- Fixed edit widget UTF-8 text appending/inserting/removing
+/// - 2016/09/28 (1.22.4)- Fixed drawing bug inside edit widgets which offset all text
+/// text in every edit widget if one of them is scrolled.
+/// - 2016/09/28 (1.22.3)- Fixed small bug in edit widgets if not active. The wrong
+/// text length is passed. It should have been in bytes but
+/// was passed as glyphes.
+/// - 2016/09/20 (1.22.2)- Fixed color button size calculation
+/// - 2016/09/20 (1.22.1)- Fixed some `nk_vsnprintf` behavior bugs and removed
+/// `<stdio.h>` again from `NK_INCLUDE_STANDARD_VARARGS`.
+/// - 2016/09/18 (1.22.0)- C89 does not support vsnprintf only C99 and newer as well
+/// as C++11 and newer. In addition to use vsnprintf you have
+/// to include <stdio.h>. So just defining `NK_INCLUDE_STD_VAR_ARGS`
+/// is not enough. That behavior is now fixed. By default if
+/// both varargs as well as stdio is selected I try to use
+/// vsnprintf if not possible I will revert to vsprintf. If
+/// varargs but not stdio was defined I will use my own function.
+/// - 2016/09/15 (1.21.2)- Fixed panel `close` behavior for deeper panel levels
+/// - 2016/09/15 (1.21.1)- Fixed C++ errors and wrong argument to `nk_panel_get_xxxx`
+/// - 2016/09/13 (1.21.0) - !BREAKING! Fixed nonblocking popup behavior in menu, combo,
+/// and contextual which prevented closing in y-direction if
+/// popup did not reach max height.
+/// In addition the height parameter was changed into vec2
+/// for width and height to have more control over the popup size.
+/// - 2016/09/13 (1.20.3) - Cleaned up and extended type selection
+/// - 2016/09/13 (1.20.2)- Fixed slider behavior hopefully for the last time. This time
+/// all calculation are correct so no more hackery.
+/// - 2016/09/13 (1.20.1)- Internal change to divide window/panel flags into panel flags and types.
+/// Suprisinly spend years in C and still happened to confuse types
+/// with flags. Probably something to take note.
+/// - 2016/09/08 (1.20.0)- Added additional helper function to make it easier to just
+/// take the produced buffers from `nk_convert` and unplug the
+/// iteration process from `nk_context`. So now you can
+/// just use the vertex,element and command buffer + two pointer
+/// inside the command buffer retrieved by calls `nk__draw_begin`
+/// and `nk__draw_end` and macro `nk_draw_foreach_bounded`.
+/// - 2016/09/08 (1.19.0)- Added additional asserts to make sure every `nk_xxx_begin` call
+/// for windows, popups, combobox, menu and contextual is guarded by
+/// `if` condition and does not produce false drawing output.
+/// - 2016/09/08 (1.18.0)- Changed confusing name for `NK_SYMBOL_RECT_FILLED`, `NK_SYMBOL_RECT`
+/// to hopefully easier to understand `NK_SYMBOL_RECT_FILLED` and
+/// `NK_SYMBOL_RECT_OUTLINE`.
+/// - 2016/09/08 (1.17.0)- Changed confusing name for `NK_SYMBOL_CIRLCE_FILLED`, `NK_SYMBOL_CIRCLE`
+/// to hopefully easier to understand `NK_SYMBOL_CIRCLE_FILLED` and
+/// `NK_SYMBOL_CIRCLE_OUTLINE`.
+/// - 2016/09/08 (1.16.0)- Added additional checks to select correct types if `NK_INCLUDE_FIXED_TYPES`
+/// is not defined by supporting the biggest compiler GCC, clang and MSVC.
+/// - 2016/09/07 (1.15.3)- Fixed `NK_INCLUDE_COMMAND_USERDATA` define to not cause an error
+/// - 2016/09/04 (1.15.2)- Fixed wrong combobox height calculation
+/// - 2016/09/03 (1.15.1)- Fixed gaps inside combo boxes in OpenGL
+/// - 2016/09/02 (1.15.0) - Changed nuklear to not have any default vertex layout and
+/// instead made it user provided. The range of types to convert
+/// to is quite limited at the moment, but I would be more than
+/// happy to accept PRs to add additional.
+/// - 2016/08/30 (1.14.2) - Removed unused variables
+/// - 2016/08/30 (1.14.1) - Fixed C++ build errors
+/// - 2016/08/30 (1.14.0) - Removed mouse dragging from SDL demo since it does not work correctly
+/// - 2016/08/30 (1.13.4) - Tweaked some default styling variables
+/// - 2016/08/30 (1.13.3) - Hopefully fixed drawing bug in slider, in general I would
+/// refrain from using slider with a big number of steps.
+/// - 2016/08/30 (1.13.2) - Fixed close and minimize button which would fire even if the
+/// window was in Read Only Mode.
+/// - 2016/08/30 (1.13.1) - Fixed popup panel padding handling which was previously just
+/// a hack for combo box and menu.
+/// - 2016/08/30 (1.13.0) - Removed `NK_WINDOW_DYNAMIC` flag from public API since
+/// it is bugged and causes issues in window selection.
+/// - 2016/08/30 (1.12.0) - Removed scaler size. The size of the scaler is now
+/// determined by the scrollbar size
+/// - 2016/08/30 (1.11.2) - Fixed some drawing bugs caused by changes from 1.11
+/// - 2016/08/30 (1.11.1) - Fixed overlapping minimized window selection
+/// - 2016/08/30 (1.11.0) - Removed some internal complexity and overly complex code
+/// handling panel padding and panel border.
+/// - 2016/08/29 (1.10.0) - Added additional height parameter to `nk_combobox_xxx`
+/// - 2016/08/29 (1.10.0) - Fixed drawing bug in dynamic popups
+/// - 2016/08/29 (1.10.0) - Added experimental mouse scrolling to popups, menus and comboboxes
+/// - 2016/08/26 (1.10.0) - Added window name string prepresentation to account for
+/// hash collisions. Currently limited to NK_WINDOW_MAX_NAME
+/// which in term can be redefined if not big enough.
+/// - 2016/08/26 (1.10.0) - Added stacks for temporary style/UI changes in code
+/// - 2016/08/25 (1.10.0) - Changed `nk_input_is_key_pressed` and 'nk_input_is_key_released'
+/// to account for key press and release happening in one frame.
+/// - 2016/08/25 (1.10.0) - Added additional nk_edit flag to directly jump to the end on activate
+/// - 2016/08/17 (1.09.6)- Removed invalid check for value zero in nk_propertyx
+/// - 2016/08/16 (1.09.5)- Fixed ROM mode for deeper levels of popup windows parents.
+/// - 2016/08/15 (1.09.4)- Editbox are now still active if enter was pressed with flag
+/// `NK_EDIT_SIG_ENTER`. Main reasoning is to be able to keep
+/// typing after commiting.
+/// - 2016/08/15 (1.09.4)- Removed redundant code
+/// - 2016/08/15 (1.09.4)- Fixed negative numbers in `nk_strtoi` and remove unused variable
+/// - 2016/08/15 (1.09.3)- Fixed `NK_WINDOW_BACKGROUND` flag behavior to select a background
+/// window only as selected by hovering and not by clicking.
+/// - 2016/08/14 (1.09.2)- Fixed a bug in font atlas which caused wrong loading
+/// of glyphes for font with multiple ranges.
+/// - 2016/08/12 (1.09.1)- Added additional function to check if window is currently
+/// hidden and therefore not visible.
+/// - 2016/08/12 (1.09.1)- nk_window_is_closed now queries the correct flag `NK_WINDOW_CLOSED`
+/// instead of the old flag `NK_WINDOW_HIDDEN`
+/// - 2016/08/09 (1.09.0) - Added additional double version to nk_property and changed
+/// the underlying implementation to not cast to float and instead
+/// work directly on the given values.
+/// - 2016/08/09 (1.08.0) - Added additional define to overwrite library internal
+/// floating pointer number to string conversion for additional
+/// precision.
+/// - 2016/08/09 (1.08.0) - Added additional define to overwrite library internal
+/// string to floating point number conversion for additional
+/// precision.
+/// - 2016/08/08 (1.07.2)- Fixed compiling error without define NK_INCLUDE_FIXED_TYPE
+/// - 2016/08/08 (1.07.1)- Fixed possible floating point error inside `nk_widget` leading
+/// to wrong wiget width calculation which results in widgets falsly
+/// becomming tagged as not inside window and cannot be accessed.
+/// - 2016/08/08 (1.07.0) - Nuklear now differentiates between hiding a window (NK_WINDOW_HIDDEN) and
+/// closing a window (NK_WINDOW_CLOSED). A window can be hidden/shown
+/// by using `nk_window_show` and closed by either clicking the close
+/// icon in a window or by calling `nk_window_close`. Only closed
+/// windows get removed at the end of the frame while hidden windows
+/// remain.
+/// - 2016/08/08 (1.06.0) - Added `nk_edit_string_zero_terminated` as a second option to
+/// `nk_edit_string` which takes, edits and outputs a '\0' terminated string.
+/// - 2016/08/08 (1.05.4)- Fixed scrollbar auto hiding behavior
+/// - 2016/08/08 (1.05.3)- Fixed wrong panel padding selection in `nk_layout_widget_space`
+/// - 2016/08/07 (1.05.2)- Fixed old bug in dynamic immediate mode layout API, calculating
+/// wrong item spacing and panel width.
+///- 2016/08/07 (1.05.1)- Hopefully finally fixed combobox popup drawing bug
+///- 2016/08/07 (1.05.0) - Split varargs away from NK_INCLUDE_STANDARD_IO into own
+/// define NK_INCLUDE_STANDARD_VARARGS to allow more fine
+/// grained controlled over library includes.
+/// - 2016/08/06 (1.04.5)- Changed memset calls to NK_MEMSET
+/// - 2016/08/04 (1.04.4)- Fixed fast window scaling behavior
+/// - 2016/08/04 (1.04.3)- Fixed window scaling, movement bug which appears if you
+/// move/scale a window and another window is behind it.
+/// If you are fast enough then the window behind gets activated
+/// and the operation is blocked. I now require activating
+/// by hovering only if mouse is not pressed.
+/// - 2016/08/04 (1.04.2)- Fixed changing fonts
+/// - 2016/08/03 (1.04.1)- Fixed `NK_WINDOW_BACKGROUND` behavior
+/// - 2016/08/03 (1.04.0) - Added color parameter to `nk_draw_image`
+/// - 2016/08/03 (1.04.0) - Added additional window padding style attributes for
+/// sub windows (combo, menu, ...)
+/// - 2016/08/03 (1.04.0) - Added functions to show/hide software cursor
+/// - 2016/08/03 (1.04.0) - Added `NK_WINDOW_BACKGROUND` flag to force a window
+/// to be always in the background of the screen
+/// - 2016/08/03 (1.03.2)- Removed invalid assert macro for NK_RGB color picker
+/// - 2016/08/01 (1.03.1)- Added helper macros into header include guard
+/// - 2016/07/29 (1.03.0) - Moved the window/table pool into the header part to
+/// simplify memory management by removing the need to
+/// allocate the pool.
+/// - 2016/07/29 (1.02.0) - Added auto scrollbar hiding window flag which if enabled
+/// will hide the window scrollbar after NK_SCROLLBAR_HIDING_TIMEOUT
+/// seconds without window interaction. To make it work
+/// you have to also set a delta time inside the `nk_context`.
+/// - 2016/07/25 (1.01.1) - Fixed small panel and panel border drawing bugs
+/// - 2016/07/15 (1.01.0) - Added software cursor to `nk_style` and `nk_context`
+/// - 2016/07/15 (1.01.0) - Added const correctness to `nk_buffer_push' data argument
+/// - 2016/07/15 (1.01.0) - Removed internal font baking API and simplified
+/// font atlas memory management by converting pointer
+/// arrays for fonts and font configurations to lists.
+/// - 2016/07/15 (1.00.0) - Changed button API to use context dependend button
+/// behavior instead of passing it for every function call.
+/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+/// ## Gallery
+/// ![Figure [blue]: Feature overview with blue color styling](https://cloud.githubusercontent.com/assets/8057201/13538240/acd96876-e249-11e5-9547-5ac0b19667a0.png)
+/// ![Figure [red]: Feature overview with red color styling](https://cloud.githubusercontent.com/assets/8057201/13538243/b04acd4c-e249-11e5-8fd2-ad7744a5b446.png)
+/// ![Figure [widgets]: Widget overview](https://cloud.githubusercontent.com/assets/8057201/11282359/3325e3c6-8eff-11e5-86cb-cf02b0596087.png)
+/// ![Figure [blackwhite]: Black and white](https://cloud.githubusercontent.com/assets/8057201/11033668/59ab5d04-86e5-11e5-8091-c56f16411565.png)
+/// ![Figure [filexp]: File explorer](https://cloud.githubusercontent.com/assets/8057201/10718115/02a9ba08-7b6b-11e5-950f-adacdd637739.png)
+/// ![Figure [opengl]: OpenGL Editor](https://cloud.githubusercontent.com/assets/8057201/12779619/2a20d72c-ca69-11e5-95fe-4edecf820d5c.png)
+/// ![Figure [nodedit]: Node Editor](https://cloud.githubusercontent.com/assets/8057201/9976995/e81ac04a-5ef7-11e5-872b-acd54fbeee03.gif)
+/// ![Figure [skinning]: Using skinning in Nuklear](https://cloud.githubusercontent.com/assets/8057201/15991632/76494854-30b8-11e6-9555-a69840d0d50b.png)
+/// ![Figure [bf]: Heavy modified version](https://cloud.githubusercontent.com/assets/8057201/14902576/339926a8-0d9c-11e6-9fee-a8b73af04473.png)
+///
+/// ## Credits
+/// Developed by Micha Mettke and every direct or indirect github contributor. <br /><br />
+///
+/// Embeds [stb_texedit](https://github.com/nothings/stb/blob/master/stb_textedit.h), [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) and [stb_rectpack](https://github.com/nothings/stb/blob/master/stb_rect_pack.h) by Sean Barret (public domain) <br />
+/// Uses [stddoc.c](https://github.com/r-lyeh/stddoc.c) from r-lyeh@github.com for documentation generation <br /><br />
+/// Embeds ProggyClean.ttf font by Tristan Grimmer (MIT license). <br />
+///
+/// Big thank you to Omar Cornut (ocornut@github) for his [imgui library](https://github.com/ocornut/imgui) and
+/// giving me the inspiration for this library, Casey Muratori for handmade hero
+/// and his original immediate mode graphical user interface idea and Sean
+/// Barret for his amazing single header libraries which restored my faith
+/// in libraries and brought me to create some of my own. Finally Apoorva Joshi
+/// for his single header file packer.
+*/
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear_glfw_gl2.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear_glfw_gl2.h
new file mode 100644
index 0000000..61acc29
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/nuklear_glfw_gl2.h
@@ -0,0 +1,381 @@
+/*
+ * Nuklear - v1.32.0 - public domain
+ * no warrenty implied; use at your own risk.
+ * authored from 2015-2017 by Micha Mettke
+ */
+/*
+ * ==============================================================
+ *
+ * API
+ *
+ * ===============================================================
+ */
+#ifndef NK_GLFW_GL2_H_
+#define NK_GLFW_GL2_H_
+
+#include <GLFW/glfw3.h>
+
+enum nk_glfw_init_state{
+ NK_GLFW3_DEFAULT = 0,
+ NK_GLFW3_INSTALL_CALLBACKS
+};
+NK_API struct nk_context* nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state);
+NK_API void nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas);
+NK_API void nk_glfw3_font_stash_end(void);
+
+NK_API void nk_glfw3_new_frame(void);
+NK_API void nk_glfw3_render(enum nk_anti_aliasing);
+NK_API void nk_glfw3_shutdown(void);
+
+NK_API void nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint);
+NK_API void nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff);
+
+#endif
+
+/*
+ * ==============================================================
+ *
+ * IMPLEMENTATION
+ *
+ * ===============================================================
+ */
+#ifdef NK_GLFW_GL2_IMPLEMENTATION
+
+#ifndef NK_GLFW_TEXT_MAX
+#define NK_GLFW_TEXT_MAX 256
+#endif
+#ifndef NK_GLFW_DOUBLE_CLICK_LO
+#define NK_GLFW_DOUBLE_CLICK_LO 0.02
+#endif
+#ifndef NK_GLFW_DOUBLE_CLICK_HI
+#define NK_GLFW_DOUBLE_CLICK_HI 0.2
+#endif
+
+struct nk_glfw_device {
+ struct nk_buffer cmds;
+ struct nk_draw_null_texture null;
+ GLuint font_tex;
+};
+
+struct nk_glfw_vertex {
+ float position[2];
+ float uv[2];
+ nk_byte col[4];
+};
+
+static struct nk_glfw {
+ GLFWwindow *win;
+ int width, height;
+ int display_width, display_height;
+ struct nk_glfw_device ogl;
+ struct nk_context ctx;
+ struct nk_font_atlas atlas;
+ struct nk_vec2 fb_scale;
+ unsigned int text[NK_GLFW_TEXT_MAX];
+ int text_len;
+ struct nk_vec2 scroll;
+ double last_button_click;
+ int is_double_click_down;
+ struct nk_vec2 double_click_pos;
+} glfw;
+
+NK_INTERN void
+nk_glfw3_device_upload_atlas(const void *image, int width, int height)
+{
+ struct nk_glfw_device *dev = &glfw.ogl;
+ glGenTextures(1, &dev->font_tex);
+ glBindTexture(GL_TEXTURE_2D, dev->font_tex);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, image);
+}
+
+NK_API void
+nk_glfw3_render(enum nk_anti_aliasing AA)
+{
+ /* setup global state */
+ struct nk_glfw_device *dev = &glfw.ogl;
+ glPushAttrib(GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_TRANSFORM_BIT);
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glEnable(GL_SCISSOR_TEST);
+ glEnable(GL_BLEND);
+ glEnable(GL_TEXTURE_2D);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+ /* setup viewport/project */
+ glViewport(0,0,(GLsizei)glfw.display_width,(GLsizei)glfw.display_height);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+ glOrtho(0.0f, glfw.width, glfw.height, 0.0f, -1.0f, 1.0f);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
+ {
+ GLsizei vs = sizeof(struct nk_glfw_vertex);
+ size_t vp = offsetof(struct nk_glfw_vertex, position);
+ size_t vt = offsetof(struct nk_glfw_vertex, uv);
+ size_t vc = offsetof(struct nk_glfw_vertex, col);
+
+ /* convert from command queue into draw list and draw to screen */
+ const struct nk_draw_command *cmd;
+ const nk_draw_index *offset = NULL;
+ struct nk_buffer vbuf, ebuf;
+
+ /* fill convert configuration */
+ struct nk_convert_config config;
+ static const struct nk_draw_vertex_layout_element vertex_layout[] = {
+ {NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, position)},
+ {NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, uv)},
+ {NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct nk_glfw_vertex, col)},
+ {NK_VERTEX_LAYOUT_END}
+ };
+ NK_MEMSET(&config, 0, sizeof(config));
+ config.vertex_layout = vertex_layout;
+ config.vertex_size = sizeof(struct nk_glfw_vertex);
+ config.vertex_alignment = NK_ALIGNOF(struct nk_glfw_vertex);
+ config.null = dev->null;
+ config.circle_segment_count = 22;
+ config.curve_segment_count = 22;
+ config.arc_segment_count = 22;
+ config.global_alpha = 1.0f;
+ config.shape_AA = AA;
+ config.line_AA = AA;
+
+ /* convert shapes into vertexes */
+ nk_buffer_init_default(&vbuf);
+ nk_buffer_init_default(&ebuf);
+ nk_convert(&glfw.ctx, &dev->cmds, &vbuf, &ebuf, &config);
+
+ /* setup vertex buffer pointer */
+ {const void *vertices = nk_buffer_memory_const(&vbuf);
+ glVertexPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vp));
+ glTexCoordPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vt));
+ glColorPointer(4, GL_UNSIGNED_BYTE, vs, (const void*)((const nk_byte*)vertices + vc));}
+
+ /* iterate over and execute each draw command */
+ offset = (const nk_draw_index*)nk_buffer_memory_const(&ebuf);
+ nk_draw_foreach(cmd, &glfw.ctx, &dev->cmds)
+ {
+ if (!cmd->elem_count) continue;
+ glBindTexture(GL_TEXTURE_2D, (GLuint)cmd->texture.id);
+ glScissor(
+ (GLint)(cmd->clip_rect.x * glfw.fb_scale.x),
+ (GLint)((glfw.height - (GLint)(cmd->clip_rect.y + cmd->clip_rect.h)) * glfw.fb_scale.y),
+ (GLint)(cmd->clip_rect.w * glfw.fb_scale.x),
+ (GLint)(cmd->clip_rect.h * glfw.fb_scale.y));
+ glDrawElements(GL_TRIANGLES, (GLsizei)cmd->elem_count, GL_UNSIGNED_SHORT, offset);
+ offset += cmd->elem_count;
+ }
+ nk_clear(&glfw.ctx);
+ nk_buffer_free(&vbuf);
+ nk_buffer_free(&ebuf);
+ }
+
+ /* default OpenGL state */
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisableClientState(GL_COLOR_ARRAY);
+
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_SCISSOR_TEST);
+ glDisable(GL_BLEND);
+ glDisable(GL_TEXTURE_2D);
+
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glPopAttrib();
+}
+
+NK_API void
+nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
+{
+ (void)win;
+ if (glfw.text_len < NK_GLFW_TEXT_MAX)
+ glfw.text[glfw.text_len++] = codepoint;
+}
+
+NK_API void
+nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
+{
+ (void)win; (void)xoff;
+ glfw.scroll.x += (float)xoff;
+ glfw.scroll.y += (float)yoff;
+}
+
+NK_API void
+nk_glfw3_mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
+{
+ double x, y;
+ if (button != GLFW_MOUSE_BUTTON_LEFT) return;
+ glfwGetCursorPos(window, &x, &y);
+ if (action == GLFW_PRESS) {
+ double dt = glfwGetTime() - glfw.last_button_click;
+ if (dt > NK_GLFW_DOUBLE_CLICK_LO && dt < NK_GLFW_DOUBLE_CLICK_HI) {
+ glfw.is_double_click_down = nk_true;
+ glfw.double_click_pos = nk_vec2((float)x, (float)y);
+ }
+ glfw.last_button_click = glfwGetTime();
+ } else glfw.is_double_click_down = nk_false;
+}
+
+NK_INTERN void
+nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
+{
+ const char *text = glfwGetClipboardString(glfw.win);
+ if (text) nk_textedit_paste(edit, text, nk_strlen(text));
+ (void)usr;
+}
+
+NK_INTERN void
+nk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len)
+{
+ char *str = 0;
+ (void)usr;
+ if (!len) return;
+ str = (char*)malloc((size_t)len+1);
+ if (!str) return;
+ NK_MEMCPY(str, text, (size_t)len);
+ str[len] = '\0';
+ glfwSetClipboardString(glfw.win, str);
+ free(str);
+}
+
+NK_API struct nk_context*
+nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state init_state)
+{
+ glfw.win = win;
+ if (init_state == NK_GLFW3_INSTALL_CALLBACKS) {
+ glfwSetScrollCallback(win, nk_gflw3_scroll_callback);
+ glfwSetCharCallback(win, nk_glfw3_char_callback);
+ glfwSetMouseButtonCallback(win, nk_glfw3_mouse_button_callback);
+ }
+ nk_init_default(&glfw.ctx, 0);
+ glfw.ctx.clip.copy = nk_glfw3_clipbard_copy;
+ glfw.ctx.clip.paste = nk_glfw3_clipbard_paste;
+ glfw.ctx.clip.userdata = nk_handle_ptr(0);
+ nk_buffer_init_default(&glfw.ogl.cmds);
+
+ glfw.is_double_click_down = nk_false;
+ glfw.double_click_pos = nk_vec2(0, 0);
+
+ return &glfw.ctx;
+}
+
+NK_API void
+nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas)
+{
+ nk_font_atlas_init_default(&glfw.atlas);
+ nk_font_atlas_begin(&glfw.atlas);
+ *atlas = &glfw.atlas;
+}
+
+NK_API void
+nk_glfw3_font_stash_end(void)
+{
+ const void *image; int w, h;
+ image = nk_font_atlas_bake(&glfw.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);
+ nk_glfw3_device_upload_atlas(image, w, h);
+ nk_font_atlas_end(&glfw.atlas, nk_handle_id((int)glfw.ogl.font_tex), &glfw.ogl.null);
+ if (glfw.atlas.default_font)
+ nk_style_set_font(&glfw.ctx, &glfw.atlas.default_font->handle);
+}
+
+NK_API void
+nk_glfw3_new_frame(void)
+{
+ int i;
+ double x, y;
+ struct nk_context *ctx = &glfw.ctx;
+ struct GLFWwindow *win = glfw.win;
+
+ glfwGetWindowSize(win, &glfw.width, &glfw.height);
+ glfwGetFramebufferSize(win, &glfw.display_width, &glfw.display_height);
+ glfw.fb_scale.x = (float)glfw.display_width/(float)glfw.width;
+ glfw.fb_scale.y = (float)glfw.display_height/(float)glfw.height;
+
+ nk_input_begin(ctx);
+ for (i = 0; i < glfw.text_len; ++i)
+ nk_input_unicode(ctx, glfw.text[i]);
+
+ /* optional grabbing behavior */
+ if (ctx->input.mouse.grab)
+ glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
+ else if (ctx->input.mouse.ungrab)
+ glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
+
+ nk_input_key(ctx, NK_KEY_DEL, glfwGetKey(win, GLFW_KEY_DELETE) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_ENTER, glfwGetKey(win, GLFW_KEY_ENTER) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TAB, glfwGetKey(win, GLFW_KEY_TAB) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_BACKSPACE, glfwGetKey(win, GLFW_KEY_BACKSPACE) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_UP, glfwGetKey(win, GLFW_KEY_UP) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_DOWN, glfwGetKey(win, GLFW_KEY_DOWN) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_SCROLL_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_SCROLL_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_SCROLL_DOWN, glfwGetKey(win, GLFW_KEY_PAGE_DOWN) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_SCROLL_UP, glfwGetKey(win, GLFW_KEY_PAGE_UP) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_SHIFT, glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS||
+ glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);
+
+ if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||
+ glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) {
+ nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_V) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_UNDO, glfwGetKey(win, GLFW_KEY_Z) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_REDO, glfwGetKey(win, GLFW_KEY_R) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_WORD_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_LINE_START, glfwGetKey(win, GLFW_KEY_B) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_TEXT_LINE_END, glfwGetKey(win, GLFW_KEY_E) == GLFW_PRESS);
+ } else {
+ nk_input_key(ctx, NK_KEY_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
+ nk_input_key(ctx, NK_KEY_COPY, 0);
+ nk_input_key(ctx, NK_KEY_PASTE, 0);
+ nk_input_key(ctx, NK_KEY_CUT, 0);
+ nk_input_key(ctx, NK_KEY_SHIFT, 0);
+ }
+
+ glfwGetCursorPos(win, &x, &y);
+ nk_input_motion(ctx, (int)x, (int)y);
+ if (ctx->input.mouse.grabbed) {
+ glfwSetCursorPos(glfw.win, (double)ctx->input.mouse.prev.x, (double)ctx->input.mouse.prev.y);
+ ctx->input.mouse.pos.x = ctx->input.mouse.prev.x;
+ ctx->input.mouse.pos.y = ctx->input.mouse.prev.y;
+ }
+
+ nk_input_button(ctx, NK_BUTTON_LEFT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS);
+ nk_input_button(ctx, NK_BUTTON_MIDDLE, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS);
+ nk_input_button(ctx, NK_BUTTON_RIGHT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS);
+ nk_input_button(ctx, NK_BUTTON_DOUBLE, (int)glfw.double_click_pos.x, (int)glfw.double_click_pos.y, glfw.is_double_click_down);
+ nk_input_scroll(ctx, glfw.scroll);
+ nk_input_end(&glfw.ctx);
+ glfw.text_len = 0;
+ glfw.scroll = nk_vec2(0,0);
+}
+
+NK_API
+void nk_glfw3_shutdown(void)
+{
+ struct nk_glfw_device *dev = &glfw.ogl;
+ nk_font_atlas_clear(&glfw.atlas);
+ nk_free(&glfw.ctx);
+ glDeleteTextures(1, &dev->font_tex);
+ nk_buffer_free(&dev->cmds);
+ NK_MEMSET(&glfw, 0, sizeof(glfw));
+}
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/stb_image_write.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/stb_image_write.h
new file mode 100644
index 0000000..4319c0d
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/stb_image_write.h
@@ -0,0 +1,1048 @@
+/* stb_image_write - v1.02 - public domain - http://nothings.org/stb/stb_image_write.h
+ writes out PNG/BMP/TGA images to C stdio - Sean Barrett 2010-2015
+ no warranty implied; use at your own risk
+
+ Before #including,
+
+ #define STB_IMAGE_WRITE_IMPLEMENTATION
+
+ in the file that you want to have the implementation.
+
+ Will probably not work correctly with strict-aliasing optimizations.
+
+ABOUT:
+
+ This header file is a library for writing images to C stdio. It could be
+ adapted to write to memory or a general streaming interface; let me know.
+
+ The PNG output is not optimal; it is 20-50% larger than the file
+ written by a decent optimizing implementation. This library is designed
+ for source code compactness and simplicity, not optimal image file size
+ or run-time performance.
+
+BUILDING:
+
+ You can #define STBIW_ASSERT(x) before the #include to avoid using assert.h.
+ You can #define STBIW_MALLOC(), STBIW_REALLOC(), and STBIW_FREE() to replace
+ malloc,realloc,free.
+ You can define STBIW_MEMMOVE() to replace memmove()
+
+USAGE:
+
+ There are four functions, one for each image file format:
+
+ int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
+ int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
+ int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
+ int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
+
+ There are also four equivalent functions that use an arbitrary write function. You are
+ expected to open/close your file-equivalent before and after calling these:
+
+ int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes);
+ int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
+ int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
+ int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
+
+ where the callback is:
+ void stbi_write_func(void *context, void *data, int size);
+
+ You can define STBI_WRITE_NO_STDIO to disable the file variant of these
+ functions, so the library will not use stdio.h at all. However, this will
+ also disable HDR writing, because it requires stdio for formatted output.
+
+ Each function returns 0 on failure and non-0 on success.
+
+ The functions create an image file defined by the parameters. The image
+ is a rectangle of pixels stored from left-to-right, top-to-bottom.
+ Each pixel contains 'comp' channels of data stored interleaved with 8-bits
+ per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is
+ monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall.
+ The *data pointer points to the first byte of the top-left-most pixel.
+ For PNG, "stride_in_bytes" is the distance in bytes from the first byte of
+ a row of pixels to the first byte of the next row of pixels.
+
+ PNG creates output files with the same number of components as the input.
+ The BMP format expands Y to RGB in the file format and does not
+ output alpha.
+
+ PNG supports writing rectangles of data even when the bytes storing rows of
+ data are not consecutive in memory (e.g. sub-rectangles of a larger image),
+ by supplying the stride between the beginning of adjacent rows. The other
+ formats do not. (Thus you cannot write a native-format BMP through the BMP
+ writer, both because it is in BGR order and because it may have padding
+ at the end of the line.)
+
+ HDR expects linear float data. Since the format is always 32-bit rgb(e)
+ data, alpha (if provided) is discarded, and for monochrome data it is
+ replicated across all three channels.
+
+ TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed
+ data, set the global variable 'stbi_write_tga_with_rle' to 0.
+
+CREDITS:
+
+ PNG/BMP/TGA
+ Sean Barrett
+ HDR
+ Baldur Karlsson
+ TGA monochrome:
+ Jean-Sebastien Guay
+ misc enhancements:
+ Tim Kelsey
+ TGA RLE
+ Alan Hickman
+ initial file IO callback implementation
+ Emmanuel Julien
+ bugfixes:
+ github:Chribba
+ Guillaume Chereau
+ github:jry2
+ github:romigrou
+ Sergio Gonzalez
+ Jonas Karlsson
+ Filip Wasil
+ Thatcher Ulrich
+
+LICENSE
+
+This software is dual-licensed to the public domain and under the following
+license: you are granted a perpetual, irrevocable license to copy, modify,
+publish, and distribute this file as you see fit.
+
+*/
+
+#ifndef INCLUDE_STB_IMAGE_WRITE_H
+#define INCLUDE_STB_IMAGE_WRITE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef STB_IMAGE_WRITE_STATIC
+#define STBIWDEF static
+#else
+#define STBIWDEF extern
+extern int stbi_write_tga_with_rle;
+#endif
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
+STBIWDEF int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
+STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
+STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
+#endif
+
+typedef void stbi_write_func(void *context, void *data, int size);
+
+STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes);
+STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
+STBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
+STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif//INCLUDE_STB_IMAGE_WRITE_H
+
+#ifdef STB_IMAGE_WRITE_IMPLEMENTATION
+
+#ifdef _WIN32
+ #ifndef _CRT_SECURE_NO_WARNINGS
+ #define _CRT_SECURE_NO_WARNINGS
+ #endif
+ #ifndef _CRT_NONSTDC_NO_DEPRECATE
+ #define _CRT_NONSTDC_NO_DEPRECATE
+ #endif
+#endif
+
+#ifndef STBI_WRITE_NO_STDIO
+#include <stdio.h>
+#endif // STBI_WRITE_NO_STDIO
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#if defined(STBIW_MALLOC) && defined(STBIW_FREE) && (defined(STBIW_REALLOC) || defined(STBIW_REALLOC_SIZED))
+// ok
+#elif !defined(STBIW_MALLOC) && !defined(STBIW_FREE) && !defined(STBIW_REALLOC) && !defined(STBIW_REALLOC_SIZED)
+// ok
+#else
+#error "Must define all or none of STBIW_MALLOC, STBIW_FREE, and STBIW_REALLOC (or STBIW_REALLOC_SIZED)."
+#endif
+
+#ifndef STBIW_MALLOC
+#define STBIW_MALLOC(sz) malloc(sz)
+#define STBIW_REALLOC(p,newsz) realloc(p,newsz)
+#define STBIW_FREE(p) free(p)
+#endif
+
+#ifndef STBIW_REALLOC_SIZED
+#define STBIW_REALLOC_SIZED(p,oldsz,newsz) STBIW_REALLOC(p,newsz)
+#endif
+
+
+#ifndef STBIW_MEMMOVE
+#define STBIW_MEMMOVE(a,b,sz) memmove(a,b,sz)
+#endif
+
+
+#ifndef STBIW_ASSERT
+#include <assert.h>
+#define STBIW_ASSERT(x) assert(x)
+#endif
+
+#define STBIW_UCHAR(x) (unsigned char) ((x) & 0xff)
+
+typedef struct
+{
+ stbi_write_func *func;
+ void *context;
+} stbi__write_context;
+
+// initialize a callback-based context
+static void stbi__start_write_callbacks(stbi__write_context *s, stbi_write_func *c, void *context)
+{
+ s->func = c;
+ s->context = context;
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+
+static void stbi__stdio_write(void *context, void *data, int size)
+{
+ fwrite(data,1,size,(FILE*) context);
+}
+
+static int stbi__start_write_file(stbi__write_context *s, const char *filename)
+{
+ FILE *f = fopen(filename, "wb");
+ stbi__start_write_callbacks(s, stbi__stdio_write, (void *) f);
+ return f != NULL;
+}
+
+static void stbi__end_write_file(stbi__write_context *s)
+{
+ fclose((FILE *)s->context);
+}
+
+#endif // !STBI_WRITE_NO_STDIO
+
+typedef unsigned int stbiw_uint32;
+typedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1];
+
+#ifdef STB_IMAGE_WRITE_STATIC
+static int stbi_write_tga_with_rle = 1;
+#else
+int stbi_write_tga_with_rle = 1;
+#endif
+
+static void stbiw__writefv(stbi__write_context *s, const char *fmt, va_list v)
+{
+ while (*fmt) {
+ switch (*fmt++) {
+ case ' ': break;
+ case '1': { unsigned char x = STBIW_UCHAR(va_arg(v, int));
+ s->func(s->context,&x,1);
+ break; }
+ case '2': { int x = va_arg(v,int);
+ unsigned char b[2];
+ b[0] = STBIW_UCHAR(x);
+ b[1] = STBIW_UCHAR(x>>8);
+ s->func(s->context,b,2);
+ break; }
+ case '4': { stbiw_uint32 x = va_arg(v,int);
+ unsigned char b[4];
+ b[0]=STBIW_UCHAR(x);
+ b[1]=STBIW_UCHAR(x>>8);
+ b[2]=STBIW_UCHAR(x>>16);
+ b[3]=STBIW_UCHAR(x>>24);
+ s->func(s->context,b,4);
+ break; }
+ default:
+ STBIW_ASSERT(0);
+ return;
+ }
+ }
+}
+
+static void stbiw__writef(stbi__write_context *s, const char *fmt, ...)
+{
+ va_list v;
+ va_start(v, fmt);
+ stbiw__writefv(s, fmt, v);
+ va_end(v);
+}
+
+static void stbiw__write3(stbi__write_context *s, unsigned char a, unsigned char b, unsigned char c)
+{
+ unsigned char arr[3];
+ arr[0] = a, arr[1] = b, arr[2] = c;
+ s->func(s->context, arr, 3);
+}
+
+static void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char *d)
+{
+ unsigned char bg[3] = { 255, 0, 255}, px[3];
+ int k;
+
+ if (write_alpha < 0)
+ s->func(s->context, &d[comp - 1], 1);
+
+ switch (comp) {
+ case 1:
+ s->func(s->context,d,1);
+ break;
+ case 2:
+ if (expand_mono)
+ stbiw__write3(s, d[0], d[0], d[0]); // monochrome bmp
+ else
+ s->func(s->context, d, 1); // monochrome TGA
+ break;
+ case 4:
+ if (!write_alpha) {
+ // composite against pink background
+ for (k = 0; k < 3; ++k)
+ px[k] = bg[k] + ((d[k] - bg[k]) * d[3]) / 255;
+ stbiw__write3(s, px[1 - rgb_dir], px[1], px[1 + rgb_dir]);
+ break;
+ }
+ /* FALLTHROUGH */
+ case 3:
+ stbiw__write3(s, d[1 - rgb_dir], d[1], d[1 + rgb_dir]);
+ break;
+ }
+ if (write_alpha > 0)
+ s->func(s->context, &d[comp - 1], 1);
+}
+
+static void stbiw__write_pixels(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad, int expand_mono)
+{
+ stbiw_uint32 zero = 0;
+ int i,j, j_end;
+
+ if (y <= 0)
+ return;
+
+ if (vdir < 0)
+ j_end = -1, j = y-1;
+ else
+ j_end = y, j = 0;
+
+ for (; j != j_end; j += vdir) {
+ for (i=0; i < x; ++i) {
+ unsigned char *d = (unsigned char *) data + (j*x+i)*comp;
+ stbiw__write_pixel(s, rgb_dir, comp, write_alpha, expand_mono, d);
+ }
+ s->func(s->context, &zero, scanline_pad);
+ }
+}
+
+static int stbiw__outfile(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...)
+{
+ if (y < 0 || x < 0) {
+ return 0;
+ } else {
+ va_list v;
+ va_start(v, fmt);
+ stbiw__writefv(s, fmt, v);
+ va_end(v);
+ stbiw__write_pixels(s,rgb_dir,vdir,x,y,comp,data,alpha,pad, expand_mono);
+ return 1;
+ }
+}
+
+static int stbi_write_bmp_core(stbi__write_context *s, int x, int y, int comp, const void *data)
+{
+ int pad = (-x*3) & 3;
+ return stbiw__outfile(s,-1,-1,x,y,comp,1,(void *) data,0,pad,
+ "11 4 22 4" "4 44 22 444444",
+ 'B', 'M', 14+40+(x*3+pad)*y, 0,0, 14+40, // file header
+ 40, x,y, 1,24, 0,0,0,0,0,0); // bitmap header
+}
+
+STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data)
+{
+ stbi__write_context s;
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_bmp_core(&s, x, y, comp, data);
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_bmp(char const *filename, int x, int y, int comp, const void *data)
+{
+ stbi__write_context s;
+ if (stbi__start_write_file(&s,filename)) {
+ int r = stbi_write_bmp_core(&s, x, y, comp, data);
+ stbi__end_write_file(&s);
+ return r;
+ } else
+ return 0;
+}
+#endif //!STBI_WRITE_NO_STDIO
+
+static int stbi_write_tga_core(stbi__write_context *s, int x, int y, int comp, void *data)
+{
+ int has_alpha = (comp == 2 || comp == 4);
+ int colorbytes = has_alpha ? comp-1 : comp;
+ int format = colorbytes < 2 ? 3 : 2; // 3 color channels (RGB/RGBA) = 2, 1 color channel (Y/YA) = 3
+
+ if (y < 0 || x < 0)
+ return 0;
+
+ if (!stbi_write_tga_with_rle) {
+ return stbiw__outfile(s, -1, -1, x, y, comp, 0, (void *) data, has_alpha, 0,
+ "111 221 2222 11", 0, 0, format, 0, 0, 0, 0, 0, x, y, (colorbytes + has_alpha) * 8, has_alpha * 8);
+ } else {
+ int i,j,k;
+
+ stbiw__writef(s, "111 221 2222 11", 0,0,format+8, 0,0,0, 0,0,x,y, (colorbytes + has_alpha) * 8, has_alpha * 8);
+
+ for (j = y - 1; j >= 0; --j) {
+ unsigned char *row = (unsigned char *) data + j * x * comp;
+ int len;
+
+ for (i = 0; i < x; i += len) {
+ unsigned char *begin = row + i * comp;
+ int diff = 1;
+ len = 1;
+
+ if (i < x - 1) {
+ ++len;
+ diff = memcmp(begin, row + (i + 1) * comp, comp);
+ if (diff) {
+ const unsigned char *prev = begin;
+ for (k = i + 2; k < x && len < 128; ++k) {
+ if (memcmp(prev, row + k * comp, comp)) {
+ prev += comp;
+ ++len;
+ } else {
+ --len;
+ break;
+ }
+ }
+ } else {
+ for (k = i + 2; k < x && len < 128; ++k) {
+ if (!memcmp(begin, row + k * comp, comp)) {
+ ++len;
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ if (diff) {
+ unsigned char header = STBIW_UCHAR(len - 1);
+ s->func(s->context, &header, 1);
+ for (k = 0; k < len; ++k) {
+ stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin + k * comp);
+ }
+ } else {
+ unsigned char header = STBIW_UCHAR(len - 129);
+ s->func(s->context, &header, 1);
+ stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin);
+ }
+ }
+ }
+ }
+ return 1;
+}
+
+int stbi_write_tga_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data)
+{
+ stbi__write_context s;
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_tga_core(&s, x, y, comp, (void *) data);
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+int stbi_write_tga(char const *filename, int x, int y, int comp, const void *data)
+{
+ stbi__write_context s;
+ if (stbi__start_write_file(&s,filename)) {
+ int r = stbi_write_tga_core(&s, x, y, comp, (void *) data);
+ stbi__end_write_file(&s);
+ return r;
+ } else
+ return 0;
+}
+#endif
+
+// *************************************************************************************************
+// Radiance RGBE HDR writer
+// by Baldur Karlsson
+#ifndef STBI_WRITE_NO_STDIO
+
+#define stbiw__max(a, b) ((a) > (b) ? (a) : (b))
+
+void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)
+{
+ int exponent;
+ float maxcomp = stbiw__max(linear[0], stbiw__max(linear[1], linear[2]));
+
+ if (maxcomp < 1e-32f) {
+ rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0;
+ } else {
+ float normalize = (float) frexp(maxcomp, &exponent) * 256.0f/maxcomp;
+
+ rgbe[0] = (unsigned char)(linear[0] * normalize);
+ rgbe[1] = (unsigned char)(linear[1] * normalize);
+ rgbe[2] = (unsigned char)(linear[2] * normalize);
+ rgbe[3] = (unsigned char)(exponent + 128);
+ }
+}
+
+void stbiw__write_run_data(stbi__write_context *s, int length, unsigned char databyte)
+{
+ unsigned char lengthbyte = STBIW_UCHAR(length+128);
+ STBIW_ASSERT(length+128 <= 255);
+ s->func(s->context, &lengthbyte, 1);
+ s->func(s->context, &databyte, 1);
+}
+
+void stbiw__write_dump_data(stbi__write_context *s, int length, unsigned char *data)
+{
+ unsigned char lengthbyte = STBIW_UCHAR(length);
+ STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code
+ s->func(s->context, &lengthbyte, 1);
+ s->func(s->context, data, length);
+}
+
+void stbiw__write_hdr_scanline(stbi__write_context *s, int width, int ncomp, unsigned char *scratch, float *scanline)
+{
+ unsigned char scanlineheader[4] = { 2, 2, 0, 0 };
+ unsigned char rgbe[4];
+ float linear[3];
+ int x;
+
+ scanlineheader[2] = (width&0xff00)>>8;
+ scanlineheader[3] = (width&0x00ff);
+
+ /* skip RLE for images too small or large */
+ if (width < 8 || width >= 32768) {
+ for (x=0; x < width; x++) {
+ switch (ncomp) {
+ case 4: /* fallthrough */
+ case 3: linear[2] = scanline[x*ncomp + 2];
+ linear[1] = scanline[x*ncomp + 1];
+ linear[0] = scanline[x*ncomp + 0];
+ break;
+ default:
+ linear[0] = linear[1] = linear[2] = scanline[x*ncomp + 0];
+ break;
+ }
+ stbiw__linear_to_rgbe(rgbe, linear);
+ s->func(s->context, rgbe, 4);
+ }
+ } else {
+ int c,r;
+ /* encode into scratch buffer */
+ for (x=0; x < width; x++) {
+ switch(ncomp) {
+ case 4: /* fallthrough */
+ case 3: linear[2] = scanline[x*ncomp + 2];
+ linear[1] = scanline[x*ncomp + 1];
+ linear[0] = scanline[x*ncomp + 0];
+ break;
+ default:
+ linear[0] = linear[1] = linear[2] = scanline[x*ncomp + 0];
+ break;
+ }
+ stbiw__linear_to_rgbe(rgbe, linear);
+ scratch[x + width*0] = rgbe[0];
+ scratch[x + width*1] = rgbe[1];
+ scratch[x + width*2] = rgbe[2];
+ scratch[x + width*3] = rgbe[3];
+ }
+
+ s->func(s->context, scanlineheader, 4);
+
+ /* RLE each component separately */
+ for (c=0; c < 4; c++) {
+ unsigned char *comp = &scratch[width*c];
+
+ x = 0;
+ while (x < width) {
+ // find first run
+ r = x;
+ while (r+2 < width) {
+ if (comp[r] == comp[r+1] && comp[r] == comp[r+2])
+ break;
+ ++r;
+ }
+ if (r+2 >= width)
+ r = width;
+ // dump up to first run
+ while (x < r) {
+ int len = r-x;
+ if (len > 128) len = 128;
+ stbiw__write_dump_data(s, len, &comp[x]);
+ x += len;
+ }
+ // if there's a run, output it
+ if (r+2 < width) { // same test as what we break out of in search loop, so only true if we break'd
+ // find next byte after run
+ while (r < width && comp[r] == comp[x])
+ ++r;
+ // output run up to r
+ while (x < r) {
+ int len = r-x;
+ if (len > 127) len = 127;
+ stbiw__write_run_data(s, len, comp[x]);
+ x += len;
+ }
+ }
+ }
+ }
+ }
+}
+
+static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data)
+{
+ if (y <= 0 || x <= 0 || data == NULL)
+ return 0;
+ else {
+ // Each component is stored separately. Allocate scratch space for full output scanline.
+ unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);
+ int i, len;
+ char buffer[128];
+ char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
+ s->func(s->context, header, sizeof(header)-1);
+
+ len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
+ s->func(s->context, buffer, len);
+
+ for(i=0; i < y; i++)
+ stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*i*x);
+ STBIW_FREE(scratch);
+ return 1;
+ }
+}
+
+int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const float *data)
+{
+ stbi__write_context s;
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_hdr_core(&s, x, y, comp, (float *) data);
+}
+
+int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
+{
+ stbi__write_context s;
+ if (stbi__start_write_file(&s,filename)) {
+ int r = stbi_write_hdr_core(&s, x, y, comp, (float *) data);
+ stbi__end_write_file(&s);
+ return r;
+ } else
+ return 0;
+}
+#endif // STBI_WRITE_NO_STDIO
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// PNG writer
+//
+
+// stretchy buffer; stbiw__sbpush() == vector<>::push_back() -- stbiw__sbcount() == vector<>::size()
+#define stbiw__sbraw(a) ((int *) (a) - 2)
+#define stbiw__sbm(a) stbiw__sbraw(a)[0]
+#define stbiw__sbn(a) stbiw__sbraw(a)[1]
+
+#define stbiw__sbneedgrow(a,n) ((a)==0 || stbiw__sbn(a)+n >= stbiw__sbm(a))
+#define stbiw__sbmaybegrow(a,n) (stbiw__sbneedgrow(a,(n)) ? stbiw__sbgrow(a,n) : 0)
+#define stbiw__sbgrow(a,n) stbiw__sbgrowf((void **) &(a), (n), sizeof(*(a)))
+
+#define stbiw__sbpush(a, v) (stbiw__sbmaybegrow(a,1), (a)[stbiw__sbn(a)++] = (v))
+#define stbiw__sbcount(a) ((a) ? stbiw__sbn(a) : 0)
+#define stbiw__sbfree(a) ((a) ? STBIW_FREE(stbiw__sbraw(a)),0 : 0)
+
+static void *stbiw__sbgrowf(void **arr, int increment, int itemsize)
+{
+ int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;
+ void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2);
+ STBIW_ASSERT(p);
+ if (p) {
+ if (!*arr) ((int *) p)[1] = 0;
+ *arr = (void *) ((int *) p + 2);
+ stbiw__sbm(*arr) = m;
+ }
+ return *arr;
+}
+
+static unsigned char *stbiw__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount)
+{
+ while (*bitcount >= 8) {
+ stbiw__sbpush(data, STBIW_UCHAR(*bitbuffer));
+ *bitbuffer >>= 8;
+ *bitcount -= 8;
+ }
+ return data;
+}
+
+static int stbiw__zlib_bitrev(int code, int codebits)
+{
+ int res=0;
+ while (codebits--) {
+ res = (res << 1) | (code & 1);
+ code >>= 1;
+ }
+ return res;
+}
+
+static unsigned int stbiw__zlib_countm(unsigned char *a, unsigned char *b, int limit)
+{
+ int i;
+ for (i=0; i < limit && i < 258; ++i)
+ if (a[i] != b[i]) break;
+ return i;
+}
+
+static unsigned int stbiw__zhash(unsigned char *data)
+{
+ stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16);
+ hash ^= hash << 3;
+ hash += hash >> 5;
+ hash ^= hash << 4;
+ hash += hash >> 17;
+ hash ^= hash << 25;
+ hash += hash >> 6;
+ return hash;
+}
+
+#define stbiw__zlib_flush() (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))
+#define stbiw__zlib_add(code,codebits) \
+ (bitbuf |= (code) << bitcount, bitcount += (codebits), stbiw__zlib_flush())
+#define stbiw__zlib_huffa(b,c) stbiw__zlib_add(stbiw__zlib_bitrev(b,c),c)
+// default huffman tables
+#define stbiw__zlib_huff1(n) stbiw__zlib_huffa(0x30 + (n), 8)
+#define stbiw__zlib_huff2(n) stbiw__zlib_huffa(0x190 + (n)-144, 9)
+#define stbiw__zlib_huff3(n) stbiw__zlib_huffa(0 + (n)-256,7)
+#define stbiw__zlib_huff4(n) stbiw__zlib_huffa(0xc0 + (n)-280,8)
+#define stbiw__zlib_huff(n) ((n) <= 143 ? stbiw__zlib_huff1(n) : (n) <= 255 ? stbiw__zlib_huff2(n) : (n) <= 279 ? stbiw__zlib_huff3(n) : stbiw__zlib_huff4(n))
+#define stbiw__zlib_huffb(n) ((n) <= 143 ? stbiw__zlib_huff1(n) : stbiw__zlib_huff2(n))
+
+#define stbiw__ZHASH 16384
+
+unsigned char * stbi_zlib_compress(unsigned char *data, int data_len, int *out_len, int quality)
+{
+ static unsigned short lengthc[] = { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258, 259 };
+ static unsigned char lengtheb[]= { 0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 };
+ static unsigned short distc[] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 32768 };
+ static unsigned char disteb[] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 };
+ unsigned int bitbuf=0;
+ int i,j, bitcount=0;
+ unsigned char *out = NULL;
+ unsigned char ***hash_table = (unsigned char***) STBIW_MALLOC(stbiw__ZHASH * sizeof(char**));
+ if (quality < 5) quality = 5;
+
+ stbiw__sbpush(out, 0x78); // DEFLATE 32K window
+ stbiw__sbpush(out, 0x5e); // FLEVEL = 1
+ stbiw__zlib_add(1,1); // BFINAL = 1
+ stbiw__zlib_add(1,2); // BTYPE = 1 -- fixed huffman
+
+ for (i=0; i < stbiw__ZHASH; ++i)
+ hash_table[i] = NULL;
+
+ i=0;
+ while (i < data_len-3) {
+ // hash next 3 bytes of data to be compressed
+ int h = stbiw__zhash(data+i)&(stbiw__ZHASH-1), best=3;
+ unsigned char *bestloc = 0;
+ unsigned char **hlist = hash_table[h];
+ int n = stbiw__sbcount(hlist);
+ for (j=0; j < n; ++j) {
+ if (hlist[j]-data > i-32768) { // if entry lies within window
+ int d = stbiw__zlib_countm(hlist[j], data+i, data_len-i);
+ if (d >= best) best=d,bestloc=hlist[j];
+ }
+ }
+ // when hash table entry is too long, delete half the entries
+ if (hash_table[h] && stbiw__sbn(hash_table[h]) == 2*quality) {
+ STBIW_MEMMOVE(hash_table[h], hash_table[h]+quality, sizeof(hash_table[h][0])*quality);
+ stbiw__sbn(hash_table[h]) = quality;
+ }
+ stbiw__sbpush(hash_table[h],data+i);
+
+ if (bestloc) {
+ // "lazy matching" - check match at *next* byte, and if it's better, do cur byte as literal
+ h = stbiw__zhash(data+i+1)&(stbiw__ZHASH-1);
+ hlist = hash_table[h];
+ n = stbiw__sbcount(hlist);
+ for (j=0; j < n; ++j) {
+ if (hlist[j]-data > i-32767) {
+ int e = stbiw__zlib_countm(hlist[j], data+i+1, data_len-i-1);
+ if (e > best) { // if next match is better, bail on current match
+ bestloc = NULL;
+ break;
+ }
+ }
+ }
+ }
+
+ if (bestloc) {
+ int d = (int) (data+i - bestloc); // distance back
+ STBIW_ASSERT(d <= 32767 && best <= 258);
+ for (j=0; best > lengthc[j+1]-1; ++j);
+ stbiw__zlib_huff(j+257);
+ if (lengtheb[j]) stbiw__zlib_add(best - lengthc[j], lengtheb[j]);
+ for (j=0; d > distc[j+1]-1; ++j);
+ stbiw__zlib_add(stbiw__zlib_bitrev(j,5),5);
+ if (disteb[j]) stbiw__zlib_add(d - distc[j], disteb[j]);
+ i += best;
+ } else {
+ stbiw__zlib_huffb(data[i]);
+ ++i;
+ }
+ }
+ // write out final bytes
+ for (;i < data_len; ++i)
+ stbiw__zlib_huffb(data[i]);
+ stbiw__zlib_huff(256); // end of block
+ // pad with 0 bits to byte boundary
+ while (bitcount)
+ stbiw__zlib_add(0,1);
+
+ for (i=0; i < stbiw__ZHASH; ++i)
+ (void) stbiw__sbfree(hash_table[i]);
+ STBIW_FREE(hash_table);
+
+ {
+ // compute adler32 on input
+ unsigned int s1=1, s2=0;
+ int blocklen = (int) (data_len % 5552);
+ j=0;
+ while (j < data_len) {
+ for (i=0; i < blocklen; ++i) s1 += data[j+i], s2 += s1;
+ s1 %= 65521, s2 %= 65521;
+ j += blocklen;
+ blocklen = 5552;
+ }
+ stbiw__sbpush(out, STBIW_UCHAR(s2 >> 8));
+ stbiw__sbpush(out, STBIW_UCHAR(s2));
+ stbiw__sbpush(out, STBIW_UCHAR(s1 >> 8));
+ stbiw__sbpush(out, STBIW_UCHAR(s1));
+ }
+ *out_len = stbiw__sbn(out);
+ // make returned pointer freeable
+ STBIW_MEMMOVE(stbiw__sbraw(out), out, *out_len);
+ return (unsigned char *) stbiw__sbraw(out);
+}
+
+static unsigned int stbiw__crc32(unsigned char *buffer, int len)
+{
+ static unsigned int crc_table[256] =
+ {
+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+ 0x0eDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+ };
+
+ unsigned int crc = ~0u;
+ int i;
+ for (i=0; i < len; ++i)
+ crc = (crc >> 8) ^ crc_table[buffer[i] ^ (crc & 0xff)];
+ return ~crc;
+}
+
+#define stbiw__wpng4(o,a,b,c,d) ((o)[0]=STBIW_UCHAR(a),(o)[1]=STBIW_UCHAR(b),(o)[2]=STBIW_UCHAR(c),(o)[3]=STBIW_UCHAR(d),(o)+=4)
+#define stbiw__wp32(data,v) stbiw__wpng4(data, (v)>>24,(v)>>16,(v)>>8,(v));
+#define stbiw__wptag(data,s) stbiw__wpng4(data, s[0],s[1],s[2],s[3])
+
+static void stbiw__wpcrc(unsigned char **data, int len)
+{
+ unsigned int crc = stbiw__crc32(*data - len - 4, len+4);
+ stbiw__wp32(*data, crc);
+}
+
+static unsigned char stbiw__paeth(int a, int b, int c)
+{
+ int p = a + b - c, pa = abs(p-a), pb = abs(p-b), pc = abs(p-c);
+ if (pa <= pb && pa <= pc) return STBIW_UCHAR(a);
+ if (pb <= pc) return STBIW_UCHAR(b);
+ return STBIW_UCHAR(c);
+}
+
+unsigned char *stbi_write_png_to_mem(unsigned char *pixels, int stride_bytes, int x, int y, int n, int *out_len)
+{
+ int ctype[5] = { -1, 0, 4, 2, 6 };
+ unsigned char sig[8] = { 137,80,78,71,13,10,26,10 };
+ unsigned char *out,*o, *filt, *zlib;
+ signed char *line_buffer;
+ int i,j,k,p,zlen;
+
+ if (stride_bytes == 0)
+ stride_bytes = x * n;
+
+ filt = (unsigned char *) STBIW_MALLOC((x*n+1) * y); if (!filt) return 0;
+ line_buffer = (signed char *) STBIW_MALLOC(x * n); if (!line_buffer) { STBIW_FREE(filt); return 0; }
+ for (j=0; j < y; ++j) {
+ static int mapping[] = { 0,1,2,3,4 };
+ static int firstmap[] = { 0,1,0,5,6 };
+ int *mymap = j ? mapping : firstmap;
+ int best = 0, bestval = 0x7fffffff;
+ for (p=0; p < 2; ++p) {
+ for (k= p?best:0; k < 5; ++k) {
+ int type = mymap[k],est=0;
+ unsigned char *z = pixels + stride_bytes*j;
+ for (i=0; i < n; ++i)
+ switch (type) {
+ case 0: line_buffer[i] = z[i]; break;
+ case 1: line_buffer[i] = z[i]; break;
+ case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;
+ case 3: line_buffer[i] = z[i] - (z[i-stride_bytes]>>1); break;
+ case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-stride_bytes],0)); break;
+ case 5: line_buffer[i] = z[i]; break;
+ case 6: line_buffer[i] = z[i]; break;
+ }
+ for (i=n; i < x*n; ++i) {
+ switch (type) {
+ case 0: line_buffer[i] = z[i]; break;
+ case 1: line_buffer[i] = z[i] - z[i-n]; break;
+ case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;
+ case 3: line_buffer[i] = z[i] - ((z[i-n] + z[i-stride_bytes])>>1); break;
+ case 4: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-stride_bytes], z[i-stride_bytes-n]); break;
+ case 5: line_buffer[i] = z[i] - (z[i-n]>>1); break;
+ case 6: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break;
+ }
+ }
+ if (p) break;
+ for (i=0; i < x*n; ++i)
+ est += abs((signed char) line_buffer[i]);
+ if (est < bestval) { bestval = est; best = k; }
+ }
+ }
+ // when we get here, best contains the filter type, and line_buffer contains the data
+ filt[j*(x*n+1)] = (unsigned char) best;
+ STBIW_MEMMOVE(filt+j*(x*n+1)+1, line_buffer, x*n);
+ }
+ STBIW_FREE(line_buffer);
+ zlib = stbi_zlib_compress(filt, y*( x*n+1), &zlen, 8); // increase 8 to get smaller but use more memory
+ STBIW_FREE(filt);
+ if (!zlib) return 0;
+
+ // each tag requires 12 bytes of overhead
+ out = (unsigned char *) STBIW_MALLOC(8 + 12+13 + 12+zlen + 12);
+ if (!out) return 0;
+ *out_len = 8 + 12+13 + 12+zlen + 12;
+
+ o=out;
+ STBIW_MEMMOVE(o,sig,8); o+= 8;
+ stbiw__wp32(o, 13); // header length
+ stbiw__wptag(o, "IHDR");
+ stbiw__wp32(o, x);
+ stbiw__wp32(o, y);
+ *o++ = 8;
+ *o++ = STBIW_UCHAR(ctype[n]);
+ *o++ = 0;
+ *o++ = 0;
+ *o++ = 0;
+ stbiw__wpcrc(&o,13);
+
+ stbiw__wp32(o, zlen);
+ stbiw__wptag(o, "IDAT");
+ STBIW_MEMMOVE(o, zlib, zlen);
+ o += zlen;
+ STBIW_FREE(zlib);
+ stbiw__wpcrc(&o, zlen);
+
+ stbiw__wp32(o,0);
+ stbiw__wptag(o, "IEND");
+ stbiw__wpcrc(&o,0);
+
+ STBIW_ASSERT(o == out + *out_len);
+
+ return out;
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
+{
+ FILE *f;
+ int len;
+ unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
+ if (png == NULL) return 0;
+ f = fopen(filename, "wb");
+ if (!f) { STBIW_FREE(png); return 0; }
+ fwrite(png, 1, len, f);
+ fclose(f);
+ STBIW_FREE(png);
+ return 1;
+}
+#endif
+
+STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int stride_bytes)
+{
+ int len;
+ unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
+ if (png == NULL) return 0;
+ func(context, png, len);
+ STBIW_FREE(png);
+ return 1;
+}
+
+#endif // STB_IMAGE_WRITE_IMPLEMENTATION
+
+/* Revision history
+ 1.02 (2016-04-02)
+ avoid allocating large structures on the stack
+ 1.01 (2016-01-16)
+ STBIW_REALLOC_SIZED: support allocators with no realloc support
+ avoid race-condition in crc initialization
+ minor compile issues
+ 1.00 (2015-09-14)
+ installable file IO function
+ 0.99 (2015-09-13)
+ warning fixes; TGA rle support
+ 0.98 (2015-04-08)
+ added STBIW_MALLOC, STBIW_ASSERT etc
+ 0.97 (2015-01-18)
+ fixed HDR asserts, rewrote HDR rle logic
+ 0.96 (2015-01-17)
+ add HDR output
+ fix monochrome BMP
+ 0.95 (2014-08-17)
+ add monochrome TGA output
+ 0.94 (2014-05-31)
+ rename private functions to avoid conflicts with stb_image.h
+ 0.93 (2014-05-27)
+ warning fixes
+ 0.92 (2010-08-01)
+ casts to unsigned char to fix warnings
+ 0.91 (2010-07-17)
+ first public release
+ 0.90 first internal release
+*/
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.c
new file mode 100644
index 0000000..f9cea2e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.c
@@ -0,0 +1,594 @@
+/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; -*-
+Copyright (c) 2012 Marcus Geelnard
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+*/
+
+/* 2013-01-06 Camilla Löwy <elmindreda@glfw.org>
+ *
+ * Added casts from time_t to DWORD to avoid warnings on VC++.
+ * Fixed time retrieval on POSIX systems.
+ */
+
+#include "tinycthread.h"
+#include <stdlib.h>
+
+/* Platform specific includes */
+#if defined(_TTHREAD_POSIX_)
+ #include <signal.h>
+ #include <sched.h>
+ #include <unistd.h>
+ #include <sys/time.h>
+ #include <errno.h>
+#elif defined(_TTHREAD_WIN32_)
+ #include <process.h>
+ #include <sys/timeb.h>
+#endif
+
+/* Standard, good-to-have defines */
+#ifndef NULL
+ #define NULL (void*)0
+#endif
+#ifndef TRUE
+ #define TRUE 1
+#endif
+#ifndef FALSE
+ #define FALSE 0
+#endif
+
+int mtx_init(mtx_t *mtx, int type)
+{
+#if defined(_TTHREAD_WIN32_)
+ mtx->mAlreadyLocked = FALSE;
+ mtx->mRecursive = type & mtx_recursive;
+ InitializeCriticalSection(&mtx->mHandle);
+ return thrd_success;
+#else
+ int ret;
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ if (type & mtx_recursive)
+ {
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ }
+ ret = pthread_mutex_init(mtx, &attr);
+ pthread_mutexattr_destroy(&attr);
+ return ret == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+void mtx_destroy(mtx_t *mtx)
+{
+#if defined(_TTHREAD_WIN32_)
+ DeleteCriticalSection(&mtx->mHandle);
+#else
+ pthread_mutex_destroy(mtx);
+#endif
+}
+
+int mtx_lock(mtx_t *mtx)
+{
+#if defined(_TTHREAD_WIN32_)
+ EnterCriticalSection(&mtx->mHandle);
+ if (!mtx->mRecursive)
+ {
+ while(mtx->mAlreadyLocked) Sleep(1000); /* Simulate deadlock... */
+ mtx->mAlreadyLocked = TRUE;
+ }
+ return thrd_success;
+#else
+ return pthread_mutex_lock(mtx) == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+int mtx_timedlock(mtx_t *mtx, const struct timespec *ts)
+{
+ /* FIXME! */
+ (void)mtx;
+ (void)ts;
+ return thrd_error;
+}
+
+int mtx_trylock(mtx_t *mtx)
+{
+#if defined(_TTHREAD_WIN32_)
+ int ret = TryEnterCriticalSection(&mtx->mHandle) ? thrd_success : thrd_busy;
+ if ((!mtx->mRecursive) && (ret == thrd_success) && mtx->mAlreadyLocked)
+ {
+ LeaveCriticalSection(&mtx->mHandle);
+ ret = thrd_busy;
+ }
+ return ret;
+#else
+ return (pthread_mutex_trylock(mtx) == 0) ? thrd_success : thrd_busy;
+#endif
+}
+
+int mtx_unlock(mtx_t *mtx)
+{
+#if defined(_TTHREAD_WIN32_)
+ mtx->mAlreadyLocked = FALSE;
+ LeaveCriticalSection(&mtx->mHandle);
+ return thrd_success;
+#else
+ return pthread_mutex_unlock(mtx) == 0 ? thrd_success : thrd_error;;
+#endif
+}
+
+#if defined(_TTHREAD_WIN32_)
+#define _CONDITION_EVENT_ONE 0
+#define _CONDITION_EVENT_ALL 1
+#endif
+
+int cnd_init(cnd_t *cond)
+{
+#if defined(_TTHREAD_WIN32_)
+ cond->mWaitersCount = 0;
+
+ /* Init critical section */
+ InitializeCriticalSection(&cond->mWaitersCountLock);
+
+ /* Init events */
+ cond->mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (cond->mEvents[_CONDITION_EVENT_ONE] == NULL)
+ {
+ cond->mEvents[_CONDITION_EVENT_ALL] = NULL;
+ return thrd_error;
+ }
+ cond->mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if (cond->mEvents[_CONDITION_EVENT_ALL] == NULL)
+ {
+ CloseHandle(cond->mEvents[_CONDITION_EVENT_ONE]);
+ cond->mEvents[_CONDITION_EVENT_ONE] = NULL;
+ return thrd_error;
+ }
+
+ return thrd_success;
+#else
+ return pthread_cond_init(cond, NULL) == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+void cnd_destroy(cnd_t *cond)
+{
+#if defined(_TTHREAD_WIN32_)
+ if (cond->mEvents[_CONDITION_EVENT_ONE] != NULL)
+ {
+ CloseHandle(cond->mEvents[_CONDITION_EVENT_ONE]);
+ }
+ if (cond->mEvents[_CONDITION_EVENT_ALL] != NULL)
+ {
+ CloseHandle(cond->mEvents[_CONDITION_EVENT_ALL]);
+ }
+ DeleteCriticalSection(&cond->mWaitersCountLock);
+#else
+ pthread_cond_destroy(cond);
+#endif
+}
+
+int cnd_signal(cnd_t *cond)
+{
+#if defined(_TTHREAD_WIN32_)
+ int haveWaiters;
+
+ /* Are there any waiters? */
+ EnterCriticalSection(&cond->mWaitersCountLock);
+ haveWaiters = (cond->mWaitersCount > 0);
+ LeaveCriticalSection(&cond->mWaitersCountLock);
+
+ /* If we have any waiting threads, send them a signal */
+ if(haveWaiters)
+ {
+ if (SetEvent(cond->mEvents[_CONDITION_EVENT_ONE]) == 0)
+ {
+ return thrd_error;
+ }
+ }
+
+ return thrd_success;
+#else
+ return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+int cnd_broadcast(cnd_t *cond)
+{
+#if defined(_TTHREAD_WIN32_)
+ int haveWaiters;
+
+ /* Are there any waiters? */
+ EnterCriticalSection(&cond->mWaitersCountLock);
+ haveWaiters = (cond->mWaitersCount > 0);
+ LeaveCriticalSection(&cond->mWaitersCountLock);
+
+ /* If we have any waiting threads, send them a signal */
+ if(haveWaiters)
+ {
+ if (SetEvent(cond->mEvents[_CONDITION_EVENT_ALL]) == 0)
+ {
+ return thrd_error;
+ }
+ }
+
+ return thrd_success;
+#else
+ return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+#if defined(_TTHREAD_WIN32_)
+static int _cnd_timedwait_win32(cnd_t *cond, mtx_t *mtx, DWORD timeout)
+{
+ int result, lastWaiter;
+
+ /* Increment number of waiters */
+ EnterCriticalSection(&cond->mWaitersCountLock);
+ ++ cond->mWaitersCount;
+ LeaveCriticalSection(&cond->mWaitersCountLock);
+
+ /* Release the mutex while waiting for the condition (will decrease
+ the number of waiters when done)... */
+ mtx_unlock(mtx);
+
+ /* Wait for either event to become signaled due to cnd_signal() or
+ cnd_broadcast() being called */
+ result = WaitForMultipleObjects(2, cond->mEvents, FALSE, timeout);
+ if (result == WAIT_TIMEOUT)
+ {
+ return thrd_timeout;
+ }
+ else if (result == (int)WAIT_FAILED)
+ {
+ return thrd_error;
+ }
+
+ /* Check if we are the last waiter */
+ EnterCriticalSection(&cond->mWaitersCountLock);
+ -- cond->mWaitersCount;
+ lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) &&
+ (cond->mWaitersCount == 0);
+ LeaveCriticalSection(&cond->mWaitersCountLock);
+
+ /* If we are the last waiter to be notified to stop waiting, reset the event */
+ if (lastWaiter)
+ {
+ if (ResetEvent(cond->mEvents[_CONDITION_EVENT_ALL]) == 0)
+ {
+ return thrd_error;
+ }
+ }
+
+ /* Re-acquire the mutex */
+ mtx_lock(mtx);
+
+ return thrd_success;
+}
+#endif
+
+int cnd_wait(cnd_t *cond, mtx_t *mtx)
+{
+#if defined(_TTHREAD_WIN32_)
+ return _cnd_timedwait_win32(cond, mtx, INFINITE);
+#else
+ return pthread_cond_wait(cond, mtx) == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts)
+{
+#if defined(_TTHREAD_WIN32_)
+ struct timespec now;
+ if (clock_gettime(CLOCK_REALTIME, &now) == 0)
+ {
+ DWORD delta = (DWORD) ((ts->tv_sec - now.tv_sec) * 1000 +
+ (ts->tv_nsec - now.tv_nsec + 500000) / 1000000);
+ return _cnd_timedwait_win32(cond, mtx, delta);
+ }
+ else
+ return thrd_error;
+#else
+ int ret;
+ ret = pthread_cond_timedwait(cond, mtx, ts);
+ if (ret == ETIMEDOUT)
+ {
+ return thrd_timeout;
+ }
+ return ret == 0 ? thrd_success : thrd_error;
+#endif
+}
+
+
+/** Information to pass to the new thread (what to run). */
+typedef struct {
+ thrd_start_t mFunction; /**< Pointer to the function to be executed. */
+ void * mArg; /**< Function argument for the thread function. */
+} _thread_start_info;
+
+/* Thread wrapper function. */
+#if defined(_TTHREAD_WIN32_)
+static unsigned WINAPI _thrd_wrapper_function(void * aArg)
+#elif defined(_TTHREAD_POSIX_)
+static void * _thrd_wrapper_function(void * aArg)
+#endif
+{
+ thrd_start_t fun;
+ void *arg;
+ int res;
+#if defined(_TTHREAD_POSIX_)
+ void *pres;
+#endif
+
+ /* Get thread startup information */
+ _thread_start_info *ti = (_thread_start_info *) aArg;
+ fun = ti->mFunction;
+ arg = ti->mArg;
+
+ /* The thread is responsible for freeing the startup information */
+ free((void *)ti);
+
+ /* Call the actual client thread function */
+ res = fun(arg);
+
+#if defined(_TTHREAD_WIN32_)
+ return res;
+#else
+ pres = malloc(sizeof(int));
+ if (pres != NULL)
+ {
+ *(int*)pres = res;
+ }
+ return pres;
+#endif
+}
+
+int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
+{
+ /* Fill out the thread startup information (passed to the thread wrapper,
+ which will eventually free it) */
+ _thread_start_info* ti = (_thread_start_info*)malloc(sizeof(_thread_start_info));
+ if (ti == NULL)
+ {
+ return thrd_nomem;
+ }
+ ti->mFunction = func;
+ ti->mArg = arg;
+
+ /* Create the thread */
+#if defined(_TTHREAD_WIN32_)
+ *thr = (HANDLE)_beginthreadex(NULL, 0, _thrd_wrapper_function, (void *)ti, 0, NULL);
+#elif defined(_TTHREAD_POSIX_)
+ if(pthread_create(thr, NULL, _thrd_wrapper_function, (void *)ti) != 0)
+ {
+ *thr = 0;
+ }
+#endif
+
+ /* Did we fail to create the thread? */
+ if(!*thr)
+ {
+ free(ti);
+ return thrd_error;
+ }
+
+ return thrd_success;
+}
+
+thrd_t thrd_current(void)
+{
+#if defined(_TTHREAD_WIN32_)
+ return GetCurrentThread();
+#else
+ return pthread_self();
+#endif
+}
+
+int thrd_detach(thrd_t thr)
+{
+ /* FIXME! */
+ (void)thr;
+ return thrd_error;
+}
+
+int thrd_equal(thrd_t thr0, thrd_t thr1)
+{
+#if defined(_TTHREAD_WIN32_)
+ return thr0 == thr1;
+#else
+ return pthread_equal(thr0, thr1);
+#endif
+}
+
+void thrd_exit(int res)
+{
+#if defined(_TTHREAD_WIN32_)
+ ExitThread(res);
+#else
+ void *pres = malloc(sizeof(int));
+ if (pres != NULL)
+ {
+ *(int*)pres = res;
+ }
+ pthread_exit(pres);
+#endif
+}
+
+int thrd_join(thrd_t thr, int *res)
+{
+#if defined(_TTHREAD_WIN32_)
+ if (WaitForSingleObject(thr, INFINITE) == WAIT_FAILED)
+ {
+ return thrd_error;
+ }
+ if (res != NULL)
+ {
+ DWORD dwRes;
+ GetExitCodeThread(thr, &dwRes);
+ *res = dwRes;
+ }
+#elif defined(_TTHREAD_POSIX_)
+ void *pres;
+ int ires = 0;
+ if (pthread_join(thr, &pres) != 0)
+ {
+ return thrd_error;
+ }
+ if (pres != NULL)
+ {
+ ires = *(int*)pres;
+ free(pres);
+ }
+ if (res != NULL)
+ {
+ *res = ires;
+ }
+#endif
+ return thrd_success;
+}
+
+int thrd_sleep(const struct timespec *time_point, struct timespec *remaining)
+{
+ struct timespec now;
+#if defined(_TTHREAD_WIN32_)
+ DWORD delta;
+#else
+ long delta;
+#endif
+
+ /* Get the current time */
+ if (clock_gettime(CLOCK_REALTIME, &now) != 0)
+ return -2; // FIXME: Some specific error code?
+
+#if defined(_TTHREAD_WIN32_)
+ /* Delta in milliseconds */
+ delta = (DWORD) ((time_point->tv_sec - now.tv_sec) * 1000 +
+ (time_point->tv_nsec - now.tv_nsec + 500000) / 1000000);
+ if (delta > 0)
+ {
+ Sleep(delta);
+ }
+#else
+ /* Delta in microseconds */
+ delta = (time_point->tv_sec - now.tv_sec) * 1000000L +
+ (time_point->tv_nsec - now.tv_nsec + 500L) / 1000L;
+
+ /* On some systems, the usleep argument must be < 1000000 */
+ while (delta > 999999L)
+ {
+ usleep(999999);
+ delta -= 999999L;
+ }
+ if (delta > 0L)
+ {
+ usleep((useconds_t)delta);
+ }
+#endif
+
+ /* We don't support waking up prematurely (yet) */
+ if (remaining)
+ {
+ remaining->tv_sec = 0;
+ remaining->tv_nsec = 0;
+ }
+ return 0;
+}
+
+void thrd_yield(void)
+{
+#if defined(_TTHREAD_WIN32_)
+ Sleep(0);
+#else
+ sched_yield();
+#endif
+}
+
+int tss_create(tss_t *key, tss_dtor_t dtor)
+{
+#if defined(_TTHREAD_WIN32_)
+ /* FIXME: The destructor function is not supported yet... */
+ if (dtor != NULL)
+ {
+ return thrd_error;
+ }
+ *key = TlsAlloc();
+ if (*key == TLS_OUT_OF_INDEXES)
+ {
+ return thrd_error;
+ }
+#else
+ if (pthread_key_create(key, dtor) != 0)
+ {
+ return thrd_error;
+ }
+#endif
+ return thrd_success;
+}
+
+void tss_delete(tss_t key)
+{
+#if defined(_TTHREAD_WIN32_)
+ TlsFree(key);
+#else
+ pthread_key_delete(key);
+#endif
+}
+
+void *tss_get(tss_t key)
+{
+#if defined(_TTHREAD_WIN32_)
+ return TlsGetValue(key);
+#else
+ return pthread_getspecific(key);
+#endif
+}
+
+int tss_set(tss_t key, void *val)
+{
+#if defined(_TTHREAD_WIN32_)
+ if (TlsSetValue(key, val) == 0)
+ {
+ return thrd_error;
+ }
+#else
+ if (pthread_setspecific(key, val) != 0)
+ {
+ return thrd_error;
+ }
+#endif
+ return thrd_success;
+}
+
+#if defined(_TTHREAD_EMULATE_CLOCK_GETTIME_)
+int _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts)
+{
+#if defined(_TTHREAD_WIN32_)
+ struct _timeb tb;
+ _ftime(&tb);
+ ts->tv_sec = (time_t)tb.time;
+ ts->tv_nsec = 1000000L * (long)tb.millitm;
+#else
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ ts->tv_sec = (time_t)tv.tv_sec;
+ ts->tv_nsec = 1000L * (long)tv.tv_usec;
+#endif
+ return 0;
+}
+#endif // _TTHREAD_EMULATE_CLOCK_GETTIME_
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.h
new file mode 100644
index 0000000..42958c3
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/tinycthread.h
@@ -0,0 +1,443 @@
+/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; -*-
+Copyright (c) 2012 Marcus Geelnard
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+*/
+
+#ifndef _TINYCTHREAD_H_
+#define _TINYCTHREAD_H_
+
+/**
+* @file
+* @mainpage TinyCThread API Reference
+*
+* @section intro_sec Introduction
+* TinyCThread is a minimal, portable implementation of basic threading
+* classes for C.
+*
+* They closely mimic the functionality and naming of the C11 standard, and
+* should be easily replaceable with the corresponding standard variants.
+*
+* @section port_sec Portability
+* The Win32 variant uses the native Win32 API for implementing the thread
+* classes, while for other systems, the POSIX threads API (pthread) is used.
+*
+* @section misc_sec Miscellaneous
+* The following special keywords are available: #_Thread_local.
+*
+* For more detailed information, browse the different sections of this
+* documentation. A good place to start is:
+* tinycthread.h.
+*/
+
+/* Which platform are we on? */
+#if !defined(_TTHREAD_PLATFORM_DEFINED_)
+ #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
+ #define _TTHREAD_WIN32_
+ #else
+ #define _TTHREAD_POSIX_
+ #endif
+ #define _TTHREAD_PLATFORM_DEFINED_
+#endif
+
+/* Activate some POSIX functionality (e.g. clock_gettime and recursive mutexes) */
+#if defined(_TTHREAD_POSIX_)
+ #undef _FEATURES_H
+ #if !defined(_GNU_SOURCE)
+ #define _GNU_SOURCE
+ #endif
+ #if !defined(_POSIX_C_SOURCE) || ((_POSIX_C_SOURCE - 0) < 199309L)
+ #undef _POSIX_C_SOURCE
+ #define _POSIX_C_SOURCE 199309L
+ #endif
+ #if !defined(_XOPEN_SOURCE) || ((_XOPEN_SOURCE - 0) < 500)
+ #undef _XOPEN_SOURCE
+ #define _XOPEN_SOURCE 500
+ #endif
+#endif
+
+/* Generic includes */
+#include <time.h>
+
+/* Platform specific includes */
+#if defined(_TTHREAD_POSIX_)
+ #include <sys/time.h>
+ #include <pthread.h>
+#elif defined(_TTHREAD_WIN32_)
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #define __UNDEF_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #ifdef __UNDEF_LEAN_AND_MEAN
+ #undef WIN32_LEAN_AND_MEAN
+ #undef __UNDEF_LEAN_AND_MEAN
+ #endif
+#endif
+
+/* Workaround for missing TIME_UTC: If time.h doesn't provide TIME_UTC,
+ it's quite likely that libc does not support it either. Hence, fall back to
+ the only other supported time specifier: CLOCK_REALTIME (and if that fails,
+ we're probably emulating clock_gettime anyway, so anything goes). */
+#ifndef TIME_UTC
+ #ifdef CLOCK_REALTIME
+ #define TIME_UTC CLOCK_REALTIME
+ #else
+ #define TIME_UTC 0
+ #endif
+#endif
+
+/* Workaround for missing clock_gettime (most Windows compilers, afaik) */
+#if defined(_TTHREAD_WIN32_) || defined(__APPLE_CC__)
+#define _TTHREAD_EMULATE_CLOCK_GETTIME_
+/* Emulate struct timespec */
+#if defined(_TTHREAD_WIN32_)
+struct _ttherad_timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#define timespec _ttherad_timespec
+#endif
+
+/* Emulate clockid_t */
+typedef int _tthread_clockid_t;
+#define clockid_t _tthread_clockid_t
+
+/* Emulate clock_gettime */
+int _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts);
+#define clock_gettime _tthread_clock_gettime
+#ifndef CLOCK_REALTIME
+ #define CLOCK_REALTIME 0
+#endif
+#endif
+
+
+/** TinyCThread version (major number). */
+#define TINYCTHREAD_VERSION_MAJOR 1
+/** TinyCThread version (minor number). */
+#define TINYCTHREAD_VERSION_MINOR 1
+/** TinyCThread version (full version). */
+#define TINYCTHREAD_VERSION (TINYCTHREAD_VERSION_MAJOR * 100 + TINYCTHREAD_VERSION_MINOR)
+
+/**
+* @def _Thread_local
+* Thread local storage keyword.
+* A variable that is declared with the @c _Thread_local keyword makes the
+* value of the variable local to each thread (known as thread-local storage,
+* or TLS). Example usage:
+* @code
+* // This variable is local to each thread.
+* _Thread_local int variable;
+* @endcode
+* @note The @c _Thread_local keyword is a macro that maps to the corresponding
+* compiler directive (e.g. @c __declspec(thread)).
+* @note This directive is currently not supported on Mac OS X (it will give
+* a compiler error), since compile-time TLS is not supported in the Mac OS X
+* executable format. Also, some older versions of MinGW (before GCC 4.x) do
+* not support this directive.
+* @hideinitializer
+*/
+
+/* FIXME: Check for a PROPER value of __STDC_VERSION__ to know if we have C11 */
+#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201102L)) && !defined(_Thread_local)
+ #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
+ #define _Thread_local __thread
+ #else
+ #define _Thread_local __declspec(thread)
+ #endif
+#endif
+
+/* Macros */
+#define TSS_DTOR_ITERATIONS 0
+
+/* Function return values */
+#define thrd_error 0 /**< The requested operation failed */
+#define thrd_success 1 /**< The requested operation succeeded */
+#define thrd_timeout 2 /**< The time specified in the call was reached without acquiring the requested resource */
+#define thrd_busy 3 /**< The requested operation failed because a tesource requested by a test and return function is already in use */
+#define thrd_nomem 4 /**< The requested operation failed because it was unable to allocate memory */
+
+/* Mutex types */
+#define mtx_plain 1
+#define mtx_timed 2
+#define mtx_try 4
+#define mtx_recursive 8
+
+/* Mutex */
+#if defined(_TTHREAD_WIN32_)
+typedef struct {
+ CRITICAL_SECTION mHandle; /* Critical section handle */
+ int mAlreadyLocked; /* TRUE if the mutex is already locked */
+ int mRecursive; /* TRUE if the mutex is recursive */
+} mtx_t;
+#else
+typedef pthread_mutex_t mtx_t;
+#endif
+
+/** Create a mutex object.
+* @param mtx A mutex object.
+* @param type Bit-mask that must have one of the following six values:
+* @li @c mtx_plain for a simple non-recursive mutex
+* @li @c mtx_timed for a non-recursive mutex that supports timeout
+* @li @c mtx_try for a non-recursive mutex that supports test and return
+* @li @c mtx_plain | @c mtx_recursive (same as @c mtx_plain, but recursive)
+* @li @c mtx_timed | @c mtx_recursive (same as @c mtx_timed, but recursive)
+* @li @c mtx_try | @c mtx_recursive (same as @c mtx_try, but recursive)
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int mtx_init(mtx_t *mtx, int type);
+
+/** Release any resources used by the given mutex.
+* @param mtx A mutex object.
+*/
+void mtx_destroy(mtx_t *mtx);
+
+/** Lock the given mutex.
+* Blocks until the given mutex can be locked. If the mutex is non-recursive, and
+* the calling thread already has a lock on the mutex, this call will block
+* forever.
+* @param mtx A mutex object.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int mtx_lock(mtx_t *mtx);
+
+/** NOT YET IMPLEMENTED.
+*/
+int mtx_timedlock(mtx_t *mtx, const struct timespec *ts);
+
+/** Try to lock the given mutex.
+* The specified mutex shall support either test and return or timeout. If the
+* mutex is already locked, the function returns without blocking.
+* @param mtx A mutex object.
+* @return @ref thrd_success on success, or @ref thrd_busy if the resource
+* requested is already in use, or @ref thrd_error if the request could not be
+* honored.
+*/
+int mtx_trylock(mtx_t *mtx);
+
+/** Unlock the given mutex.
+* @param mtx A mutex object.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int mtx_unlock(mtx_t *mtx);
+
+/* Condition variable */
+#if defined(_TTHREAD_WIN32_)
+typedef struct {
+ HANDLE mEvents[2]; /* Signal and broadcast event HANDLEs. */
+ unsigned int mWaitersCount; /* Count of the number of waiters. */
+ CRITICAL_SECTION mWaitersCountLock; /* Serialize access to mWaitersCount. */
+} cnd_t;
+#else
+typedef pthread_cond_t cnd_t;
+#endif
+
+/** Create a condition variable object.
+* @param cond A condition variable object.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int cnd_init(cnd_t *cond);
+
+/** Release any resources used by the given condition variable.
+* @param cond A condition variable object.
+*/
+void cnd_destroy(cnd_t *cond);
+
+/** Signal a condition variable.
+* Unblocks one of the threads that are blocked on the given condition variable
+* at the time of the call. If no threads are blocked on the condition variable
+* at the time of the call, the function does nothing and return success.
+* @param cond A condition variable object.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int cnd_signal(cnd_t *cond);
+
+/** Broadcast a condition variable.
+* Unblocks all of the threads that are blocked on the given condition variable
+* at the time of the call. If no threads are blocked on the condition variable
+* at the time of the call, the function does nothing and return success.
+* @param cond A condition variable object.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int cnd_broadcast(cnd_t *cond);
+
+/** Wait for a condition variable to become signaled.
+* The function atomically unlocks the given mutex and endeavors to block until
+* the given condition variable is signaled by a call to cnd_signal or to
+* cnd_broadcast. When the calling thread becomes unblocked it locks the mutex
+* before it returns.
+* @param cond A condition variable object.
+* @param mtx A mutex object.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int cnd_wait(cnd_t *cond, mtx_t *mtx);
+
+/** Wait for a condition variable to become signaled.
+* The function atomically unlocks the given mutex and endeavors to block until
+* the given condition variable is signaled by a call to cnd_signal or to
+* cnd_broadcast, or until after the specified time. When the calling thread
+* becomes unblocked it locks the mutex before it returns.
+* @param cond A condition variable object.
+* @param mtx A mutex object.
+* @param xt A point in time at which the request will time out (absolute time).
+* @return @ref thrd_success upon success, or @ref thrd_timeout if the time
+* specified in the call was reached without acquiring the requested resource, or
+* @ref thrd_error if the request could not be honored.
+*/
+int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts);
+
+/* Thread */
+#if defined(_TTHREAD_WIN32_)
+typedef HANDLE thrd_t;
+#else
+typedef pthread_t thrd_t;
+#endif
+
+/** Thread start function.
+* Any thread that is started with the @ref thrd_create() function must be
+* started through a function of this type.
+* @param arg The thread argument (the @c arg argument of the corresponding
+* @ref thrd_create() call).
+* @return The thread return value, which can be obtained by another thread
+* by using the @ref thrd_join() function.
+*/
+typedef int (*thrd_start_t)(void *arg);
+
+/** Create a new thread.
+* @param thr Identifier of the newly created thread.
+* @param func A function pointer to the function that will be executed in
+* the new thread.
+* @param arg An argument to the thread function.
+* @return @ref thrd_success on success, or @ref thrd_nomem if no memory could
+* be allocated for the thread requested, or @ref thrd_error if the request
+* could not be honored.
+* @note A thread’s identifier may be reused for a different thread once the
+* original thread has exited and either been detached or joined to another
+* thread.
+*/
+int thrd_create(thrd_t *thr, thrd_start_t func, void *arg);
+
+/** Identify the calling thread.
+* @return The identifier of the calling thread.
+*/
+thrd_t thrd_current(void);
+
+/** NOT YET IMPLEMENTED.
+*/
+int thrd_detach(thrd_t thr);
+
+/** Compare two thread identifiers.
+* The function determines if two thread identifiers refer to the same thread.
+* @return Zero if the two thread identifiers refer to different threads.
+* Otherwise a nonzero value is returned.
+*/
+int thrd_equal(thrd_t thr0, thrd_t thr1);
+
+/** Terminate execution of the calling thread.
+* @param res Result code of the calling thread.
+*/
+void thrd_exit(int res);
+
+/** Wait for a thread to terminate.
+* The function joins the given thread with the current thread by blocking
+* until the other thread has terminated.
+* @param thr The thread to join with.
+* @param res If this pointer is not NULL, the function will store the result
+* code of the given thread in the integer pointed to by @c res.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int thrd_join(thrd_t thr, int *res);
+
+/** Put the calling thread to sleep.
+* Suspend execution of the calling thread.
+* @param time_point A point in time at which the thread will resume (absolute time).
+* @param remaining If non-NULL, this parameter will hold the remaining time until
+* time_point upon return. This will typically be zero, but if
+* the thread was woken up by a signal that is not ignored before
+* time_point was reached @c remaining will hold a positive
+* time.
+* @return 0 (zero) on successful sleep, or -1 if an interrupt occurred.
+*/
+int thrd_sleep(const struct timespec *time_point, struct timespec *remaining);
+
+/** Yield execution to another thread.
+* Permit other threads to run, even if the current thread would ordinarily
+* continue to run.
+*/
+void thrd_yield(void);
+
+/* Thread local storage */
+#if defined(_TTHREAD_WIN32_)
+typedef DWORD tss_t;
+#else
+typedef pthread_key_t tss_t;
+#endif
+
+/** Destructor function for a thread-specific storage.
+* @param val The value of the destructed thread-specific storage.
+*/
+typedef void (*tss_dtor_t)(void *val);
+
+/** Create a thread-specific storage.
+* @param key The unique key identifier that will be set if the function is
+* successful.
+* @param dtor Destructor function. This can be NULL.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+* @note The destructor function is not supported under Windows. If @c dtor is
+* not NULL when calling this function under Windows, the function will fail
+* and return @ref thrd_error.
+*/
+int tss_create(tss_t *key, tss_dtor_t dtor);
+
+/** Delete a thread-specific storage.
+* The function releases any resources used by the given thread-specific
+* storage.
+* @param key The key that shall be deleted.
+*/
+void tss_delete(tss_t key);
+
+/** Get the value for a thread-specific storage.
+* @param key The thread-specific storage identifier.
+* @return The value for the current thread held in the given thread-specific
+* storage.
+*/
+void *tss_get(tss_t key);
+
+/** Set the value for a thread-specific storage.
+* @param key The thread-specific storage identifier.
+* @param val The value of the thread-specific storage to set for the current
+* thread.
+* @return @ref thrd_success on success, or @ref thrd_error if the request could
+* not be honored.
+*/
+int tss_set(tss_t key, void *val);
+
+
+#endif /* _TINYTHREAD_H_ */
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/dummy.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/dummy.go
new file mode 100644
index 0000000..41053ac
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/dummy.go
@@ -0,0 +1,4 @@
+// +build required
+
+// Package dummy prevents go tooling from stripping the c dependencies.
+package dummy
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/stdint.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/stdint.h
new file mode 100644
index 0000000..d02608a
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008/stdint.h
@@ -0,0 +1,247 @@
+// ISO C9x compliant stdint.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
+//
+// Copyright (c) 2006-2008 Alexander Chemeris
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. The name of the author may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_STDINT_H_ // [
+#define _MSC_STDINT_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <limits.h>
+
+// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
+// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
+// or compiler give many errors like this:
+// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
+#ifdef __cplusplus
+extern "C" {
+#endif
+# include <wchar.h>
+#ifdef __cplusplus
+}
+#endif
+
+// Define _W64 macros to mark types changing their size, like intptr_t.
+#ifndef _W64
+# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
+# define _W64 __w64
+# else
+# define _W64
+# endif
+#endif
+
+
+// 7.18.1 Integer types
+
+// 7.18.1.1 Exact-width integer types
+
+// Visual Studio 6 and Embedded Visual C++ 4 doesn't
+// realize that, e.g. char has the same size as __int8
+// so we give up on __intX for them.
+#if (_MSC_VER < 1300)
+ typedef signed char int8_t;
+ typedef signed short int16_t;
+ typedef signed int int32_t;
+ typedef unsigned char uint8_t;
+ typedef unsigned short uint16_t;
+ typedef unsigned int uint32_t;
+#else
+ typedef signed __int8 int8_t;
+ typedef signed __int16 int16_t;
+ typedef signed __int32 int32_t;
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int16 uint16_t;
+ typedef unsigned __int32 uint32_t;
+#endif
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+
+
+// 7.18.1.2 Minimum-width integer types
+typedef int8_t int_least8_t;
+typedef int16_t int_least16_t;
+typedef int32_t int_least32_t;
+typedef int64_t int_least64_t;
+typedef uint8_t uint_least8_t;
+typedef uint16_t uint_least16_t;
+typedef uint32_t uint_least32_t;
+typedef uint64_t uint_least64_t;
+
+// 7.18.1.3 Fastest minimum-width integer types
+typedef int8_t int_fast8_t;
+typedef int16_t int_fast16_t;
+typedef int32_t int_fast32_t;
+typedef int64_t int_fast64_t;
+typedef uint8_t uint_fast8_t;
+typedef uint16_t uint_fast16_t;
+typedef uint32_t uint_fast32_t;
+typedef uint64_t uint_fast64_t;
+
+// 7.18.1.4 Integer types capable of holding object pointers
+#ifdef _WIN64 // [
+ typedef signed __int64 intptr_t;
+ typedef unsigned __int64 uintptr_t;
+#else // _WIN64 ][
+ typedef _W64 signed int intptr_t;
+ typedef _W64 unsigned int uintptr_t;
+#endif // _WIN64 ]
+
+// 7.18.1.5 Greatest-width integer types
+typedef int64_t intmax_t;
+typedef uint64_t uintmax_t;
+
+
+// 7.18.2 Limits of specified-width integer types
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
+
+// 7.18.2.1 Limits of exact-width integer types
+#define INT8_MIN ((int8_t)_I8_MIN)
+#define INT8_MAX _I8_MAX
+#define INT16_MIN ((int16_t)_I16_MIN)
+#define INT16_MAX _I16_MAX
+#define INT32_MIN ((int32_t)_I32_MIN)
+#define INT32_MAX _I32_MAX
+#define INT64_MIN ((int64_t)_I64_MIN)
+#define INT64_MAX _I64_MAX
+#define UINT8_MAX _UI8_MAX
+#define UINT16_MAX _UI16_MAX
+#define UINT32_MAX _UI32_MAX
+#define UINT64_MAX _UI64_MAX
+
+// 7.18.2.2 Limits of minimum-width integer types
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST8_MAX INT8_MAX
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST16_MAX INT16_MAX
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST32_MAX INT32_MAX
+#define INT_LEAST64_MIN INT64_MIN
+#define INT_LEAST64_MAX INT64_MAX
+#define UINT_LEAST8_MAX UINT8_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+#define UINT_LEAST64_MAX UINT64_MAX
+
+// 7.18.2.3 Limits of fastest minimum-width integer types
+#define INT_FAST8_MIN INT8_MIN
+#define INT_FAST8_MAX INT8_MAX
+#define INT_FAST16_MIN INT16_MIN
+#define INT_FAST16_MAX INT16_MAX
+#define INT_FAST32_MIN INT32_MIN
+#define INT_FAST32_MAX INT32_MAX
+#define INT_FAST64_MIN INT64_MIN
+#define INT_FAST64_MAX INT64_MAX
+#define UINT_FAST8_MAX UINT8_MAX
+#define UINT_FAST16_MAX UINT16_MAX
+#define UINT_FAST32_MAX UINT32_MAX
+#define UINT_FAST64_MAX UINT64_MAX
+
+// 7.18.2.4 Limits of integer types capable of holding object pointers
+#ifdef _WIN64 // [
+# define INTPTR_MIN INT64_MIN
+# define INTPTR_MAX INT64_MAX
+# define UINTPTR_MAX UINT64_MAX
+#else // _WIN64 ][
+# define INTPTR_MIN INT32_MIN
+# define INTPTR_MAX INT32_MAX
+# define UINTPTR_MAX UINT32_MAX
+#endif // _WIN64 ]
+
+// 7.18.2.5 Limits of greatest-width integer types
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+
+// 7.18.3 Limits of other integer types
+
+#ifdef _WIN64 // [
+# define PTRDIFF_MIN _I64_MIN
+# define PTRDIFF_MAX _I64_MAX
+#else // _WIN64 ][
+# define PTRDIFF_MIN _I32_MIN
+# define PTRDIFF_MAX _I32_MAX
+#endif // _WIN64 ]
+
+#define SIG_ATOMIC_MIN INT_MIN
+#define SIG_ATOMIC_MAX INT_MAX
+
+#ifndef SIZE_MAX // [
+# ifdef _WIN64 // [
+# define SIZE_MAX _UI64_MAX
+# else // _WIN64 ][
+# define SIZE_MAX _UI32_MAX
+# endif // _WIN64 ]
+#endif // SIZE_MAX ]
+
+// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
+#ifndef WCHAR_MIN // [
+# define WCHAR_MIN 0
+#endif // WCHAR_MIN ]
+#ifndef WCHAR_MAX // [
+# define WCHAR_MAX _UI16_MAX
+#endif // WCHAR_MAX ]
+
+#define WINT_MIN 0
+#define WINT_MAX _UI16_MAX
+
+#endif // __STDC_LIMIT_MACROS ]
+
+
+// 7.18.4 Limits of other integer types
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
+
+// 7.18.4.1 Macros for minimum-width integer constants
+
+#define INT8_C(val) val##i8
+#define INT16_C(val) val##i16
+#define INT32_C(val) val##i32
+#define INT64_C(val) val##i64
+
+#define UINT8_C(val) val##ui8
+#define UINT16_C(val) val##ui16
+#define UINT32_C(val) val##ui32
+#define UINT64_C(val) val##ui64
+
+// 7.18.4.2 Macros for greatest-width integer constants
+#define INTMAX_C INT64_C
+#define UINTMAX_C UINT64_C
+
+#endif // __STDC_CONSTANT_MACROS ]
+
+
+#endif // _MSC_STDINT_H_ ]
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/dummy.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/dummy.go
new file mode 100644
index 0000000..41053ac
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/dummy.go
@@ -0,0 +1,4 @@
+// +build required
+
+// Package dummy prevents go tooling from stripping the c dependencies.
+package dummy
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3.h
new file mode 100644
index 0000000..6f8f94f
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3.h
@@ -0,0 +1,5909 @@
+/*************************************************************************
+ * GLFW 3.3 - www.glfw.org
+ * A library for OpenGL, window and input
+ *------------------------------------------------------------------------
+ * Copyright (c) 2002-2006 Marcus Geelnard
+ * Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would
+ * be appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not
+ * be misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ *************************************************************************/
+
+#ifndef _glfw3_h_
+#define _glfw3_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*************************************************************************
+ * Doxygen documentation
+ *************************************************************************/
+
+/*! @file glfw3.h
+ * @brief The header of the GLFW 3 API.
+ *
+ * This is the header file of the GLFW 3 API. It defines all its types and
+ * declares all its functions.
+ *
+ * For more information about how to use this file, see @ref build_include.
+ */
+/*! @defgroup context Context reference
+ * @brief Functions and types related to OpenGL and OpenGL ES contexts.
+ *
+ * This is the reference documentation for OpenGL and OpenGL ES context related
+ * functions. For more task-oriented information, see the @ref context_guide.
+ */
+/*! @defgroup vulkan Vulkan support reference
+ * @brief Functions and types related to Vulkan.
+ *
+ * This is the reference documentation for Vulkan related functions and types.
+ * For more task-oriented information, see the @ref vulkan_guide.
+ */
+/*! @defgroup init Initialization, version and error reference
+ * @brief Functions and types related to initialization and error handling.
+ *
+ * This is the reference documentation for initialization and termination of
+ * the library, version management and error handling. For more task-oriented
+ * information, see the @ref intro_guide.
+ */
+/*! @defgroup input Input reference
+ * @brief Functions and types related to input handling.
+ *
+ * This is the reference documentation for input related functions and types.
+ * For more task-oriented information, see the @ref input_guide.
+ */
+/*! @defgroup monitor Monitor reference
+ * @brief Functions and types related to monitors.
+ *
+ * This is the reference documentation for monitor related functions and types.
+ * For more task-oriented information, see the @ref monitor_guide.
+ */
+/*! @defgroup window Window reference
+ * @brief Functions and types related to windows.
+ *
+ * This is the reference documentation for window related functions and types,
+ * including creation, deletion and event polling. For more task-oriented
+ * information, see the @ref window_guide.
+ */
+
+
+/*************************************************************************
+ * Compiler- and platform-specific preprocessor work
+ *************************************************************************/
+
+/* If we are we on Windows, we want a single define for it.
+ */
+#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))
+ #define _WIN32
+#endif /* _WIN32 */
+
+/* Include because most Windows GLU headers need wchar_t and
+ * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.
+ * Include it unconditionally to avoid surprising side-effects.
+ */
+#include <stddef.h>
+
+/* Include because it is needed by Vulkan and related functions.
+ * Include it unconditionally to avoid surprising side-effects.
+ */
+#include <stdint.h>
+
+#if defined(GLFW_INCLUDE_VULKAN)
+ #include <vulkan/vulkan.h>
+#endif /* Vulkan header */
+
+/* The Vulkan header may have indirectly included windows.h (because of
+ * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it.
+ */
+
+/* It is customary to use APIENTRY for OpenGL function pointer declarations on
+ * all platforms. Additionally, the Windows OpenGL header needs APIENTRY.
+ */
+#if !defined(APIENTRY)
+ #if defined(_WIN32)
+ #define APIENTRY __stdcall
+ #else
+ #define APIENTRY
+ #endif
+ #define GLFW_APIENTRY_DEFINED
+#endif /* APIENTRY */
+
+/* Some Windows OpenGL headers need this.
+ */
+#if !defined(WINGDIAPI) && defined(_WIN32)
+ #define WINGDIAPI __declspec(dllimport)
+ #define GLFW_WINGDIAPI_DEFINED
+#endif /* WINGDIAPI */
+
+/* Some Windows GLU headers need this.
+ */
+#if !defined(CALLBACK) && defined(_WIN32)
+ #define CALLBACK __stdcall
+ #define GLFW_CALLBACK_DEFINED
+#endif /* CALLBACK */
+
+/* Include the chosen OpenGL or OpenGL ES headers.
+ */
+#if defined(GLFW_INCLUDE_ES1)
+
+ #include <GLES/gl.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GLES/glext.h>
+ #endif
+
+#elif defined(GLFW_INCLUDE_ES2)
+
+ #include <GLES2/gl2.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GLES2/gl2ext.h>
+ #endif
+
+#elif defined(GLFW_INCLUDE_ES3)
+
+ #include <GLES3/gl3.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GLES2/gl2ext.h>
+ #endif
+
+#elif defined(GLFW_INCLUDE_ES31)
+
+ #include <GLES3/gl31.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GLES2/gl2ext.h>
+ #endif
+
+#elif defined(GLFW_INCLUDE_ES32)
+
+ #include <GLES3/gl32.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GLES2/gl2ext.h>
+ #endif
+
+#elif defined(GLFW_INCLUDE_GLCOREARB)
+
+ #if defined(__APPLE__)
+
+ #include <OpenGL/gl3.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <OpenGL/gl3ext.h>
+ #endif /*GLFW_INCLUDE_GLEXT*/
+
+ #else /*__APPLE__*/
+
+ #include <GL/glcorearb.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GL/glext.h>
+ #endif
+
+ #endif /*__APPLE__*/
+
+#elif defined(GLFW_INCLUDE_GLU)
+
+ #if defined(__APPLE__)
+
+ #if defined(GLFW_INCLUDE_GLU)
+ #include <OpenGL/glu.h>
+ #endif
+
+ #else /*__APPLE__*/
+
+ #if defined(GLFW_INCLUDE_GLU)
+ #include <GL/glu.h>
+ #endif
+
+ #endif /*__APPLE__*/
+
+#elif !defined(GLFW_INCLUDE_NONE) && \
+ !defined(__gl_h_) && \
+ !defined(__gles1_gl_h_) && \
+ !defined(__gles2_gl2_h_) && \
+ !defined(__gles2_gl3_h_) && \
+ !defined(__gles2_gl31_h_) && \
+ !defined(__gles2_gl32_h_) && \
+ !defined(__gl_glcorearb_h_) && \
+ !defined(__gl2_h_) /*legacy*/ && \
+ !defined(__gl3_h_) /*legacy*/ && \
+ !defined(__gl31_h_) /*legacy*/ && \
+ !defined(__gl32_h_) /*legacy*/ && \
+ !defined(__glcorearb_h_) /*legacy*/ && \
+ !defined(__GL_H__) /*non-standard*/ && \
+ !defined(__gltypes_h_) /*non-standard*/ && \
+ !defined(__glee_h_) /*non-standard*/
+
+ #if defined(__APPLE__)
+
+ #if !defined(GLFW_INCLUDE_GLEXT)
+ #define GL_GLEXT_LEGACY
+ #endif
+ #include <OpenGL/gl.h>
+
+ #else /*__APPLE__*/
+
+ #include <GL/gl.h>
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include <GL/glext.h>
+ #endif
+
+ #endif /*__APPLE__*/
+
+#endif /* OpenGL and OpenGL ES headers */
+
+#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
+ /* GLFW_DLL must be defined by applications that are linking against the DLL
+ * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW
+ * configuration header when compiling the DLL version of the library.
+ */
+ #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined"
+#endif
+
+/* GLFWAPI is used to declare public API functions for export
+ * from the DLL / shared library / dynamic library.
+ */
+#if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
+ /* We are building GLFW as a Win32 DLL */
+ #define GLFWAPI __declspec(dllexport)
+#elif defined(_WIN32) && defined(GLFW_DLL)
+ /* We are calling GLFW as a Win32 DLL */
+ #define GLFWAPI __declspec(dllimport)
+#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
+ /* We are building GLFW as a shared / dynamic library */
+ #define GLFWAPI __attribute__((visibility("default")))
+#else
+ /* We are building or calling GLFW as a static library */
+ #define GLFWAPI
+#endif
+
+
+/*************************************************************************
+ * GLFW API tokens
+ *************************************************************************/
+
+/*! @name GLFW version macros
+ * @{ */
+/*! @brief The major version number of the GLFW header.
+ *
+ * The major version number of the GLFW header. This is incremented when the
+ * API is changed in non-compatible ways.
+ * @ingroup init
+ */
+#define GLFW_VERSION_MAJOR 3
+/*! @brief The minor version number of the GLFW header.
+ *
+ * The minor version number of the GLFW header. This is incremented when
+ * features are added to the API but it remains backward-compatible.
+ * @ingroup init
+ */
+#define GLFW_VERSION_MINOR 3
+/*! @brief The revision number of the GLFW header.
+ *
+ * The revision number of the GLFW header. This is incremented when a bug fix
+ * release is made that does not contain any API changes.
+ * @ingroup init
+ */
+#define GLFW_VERSION_REVISION 6
+/*! @} */
+
+/*! @brief One.
+ *
+ * This is only semantic sugar for the number 1. You can instead use `1` or
+ * `true` or `_True` or `GL_TRUE` or `VK_TRUE` or anything else that is equal
+ * to one.
+ *
+ * @ingroup init
+ */
+#define GLFW_TRUE 1
+/*! @brief Zero.
+ *
+ * This is only semantic sugar for the number 0. You can instead use `0` or
+ * `false` or `_False` or `GL_FALSE` or `VK_FALSE` or anything else that is
+ * equal to zero.
+ *
+ * @ingroup init
+ */
+#define GLFW_FALSE 0
+
+/*! @name Key and button actions
+ * @{ */
+/*! @brief The key or mouse button was released.
+ *
+ * The key or mouse button was released.
+ *
+ * @ingroup input
+ */
+#define GLFW_RELEASE 0
+/*! @brief The key or mouse button was pressed.
+ *
+ * The key or mouse button was pressed.
+ *
+ * @ingroup input
+ */
+#define GLFW_PRESS 1
+/*! @brief The key was held down until it repeated.
+ *
+ * The key was held down until it repeated.
+ *
+ * @ingroup input
+ */
+#define GLFW_REPEAT 2
+/*! @} */
+
+/*! @defgroup hat_state Joystick hat states
+ * @brief Joystick hat states.
+ *
+ * See [joystick hat input](@ref joystick_hat) for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+#define GLFW_HAT_CENTERED 0
+#define GLFW_HAT_UP 1
+#define GLFW_HAT_RIGHT 2
+#define GLFW_HAT_DOWN 4
+#define GLFW_HAT_LEFT 8
+#define GLFW_HAT_RIGHT_UP (GLFW_HAT_RIGHT | GLFW_HAT_UP)
+#define GLFW_HAT_RIGHT_DOWN (GLFW_HAT_RIGHT | GLFW_HAT_DOWN)
+#define GLFW_HAT_LEFT_UP (GLFW_HAT_LEFT | GLFW_HAT_UP)
+#define GLFW_HAT_LEFT_DOWN (GLFW_HAT_LEFT | GLFW_HAT_DOWN)
+/*! @} */
+
+/*! @defgroup keys Keyboard keys
+ * @brief Keyboard key IDs.
+ *
+ * See [key input](@ref input_key) for how these are used.
+ *
+ * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60),
+ * but re-arranged to map to 7-bit ASCII for printable keys (function keys are
+ * put in the 256+ range).
+ *
+ * The naming of the key codes follow these rules:
+ * - The US keyboard layout is used
+ * - Names of printable alpha-numeric characters are used (e.g. "A", "R",
+ * "3", etc.)
+ * - For non-alphanumeric characters, Unicode:ish names are used (e.g.
+ * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not
+ * correspond to the Unicode standard (usually for brevity)
+ * - Keys that lack a clear US mapping are named "WORLD_x"
+ * - For non-printable keys, custom names are used (e.g. "F4",
+ * "BACKSPACE", etc.)
+ *
+ * @ingroup input
+ * @{
+ */
+
+/* The unknown key */
+#define GLFW_KEY_UNKNOWN -1
+
+/* Printable keys */
+#define GLFW_KEY_SPACE 32
+#define GLFW_KEY_APOSTROPHE 39 /* ' */
+#define GLFW_KEY_COMMA 44 /* , */
+#define GLFW_KEY_MINUS 45 /* - */
+#define GLFW_KEY_PERIOD 46 /* . */
+#define GLFW_KEY_SLASH 47 /* / */
+#define GLFW_KEY_0 48
+#define GLFW_KEY_1 49
+#define GLFW_KEY_2 50
+#define GLFW_KEY_3 51
+#define GLFW_KEY_4 52
+#define GLFW_KEY_5 53
+#define GLFW_KEY_6 54
+#define GLFW_KEY_7 55
+#define GLFW_KEY_8 56
+#define GLFW_KEY_9 57
+#define GLFW_KEY_SEMICOLON 59 /* ; */
+#define GLFW_KEY_EQUAL 61 /* = */
+#define GLFW_KEY_A 65
+#define GLFW_KEY_B 66
+#define GLFW_KEY_C 67
+#define GLFW_KEY_D 68
+#define GLFW_KEY_E 69
+#define GLFW_KEY_F 70
+#define GLFW_KEY_G 71
+#define GLFW_KEY_H 72
+#define GLFW_KEY_I 73
+#define GLFW_KEY_J 74
+#define GLFW_KEY_K 75
+#define GLFW_KEY_L 76
+#define GLFW_KEY_M 77
+#define GLFW_KEY_N 78
+#define GLFW_KEY_O 79
+#define GLFW_KEY_P 80
+#define GLFW_KEY_Q 81
+#define GLFW_KEY_R 82
+#define GLFW_KEY_S 83
+#define GLFW_KEY_T 84
+#define GLFW_KEY_U 85
+#define GLFW_KEY_V 86
+#define GLFW_KEY_W 87
+#define GLFW_KEY_X 88
+#define GLFW_KEY_Y 89
+#define GLFW_KEY_Z 90
+#define GLFW_KEY_LEFT_BRACKET 91 /* [ */
+#define GLFW_KEY_BACKSLASH 92 /* \ */
+#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */
+#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */
+#define GLFW_KEY_WORLD_1 161 /* non-US #1 */
+#define GLFW_KEY_WORLD_2 162 /* non-US #2 */
+
+/* Function keys */
+#define GLFW_KEY_ESCAPE 256
+#define GLFW_KEY_ENTER 257
+#define GLFW_KEY_TAB 258
+#define GLFW_KEY_BACKSPACE 259
+#define GLFW_KEY_INSERT 260
+#define GLFW_KEY_DELETE 261
+#define GLFW_KEY_RIGHT 262
+#define GLFW_KEY_LEFT 263
+#define GLFW_KEY_DOWN 264
+#define GLFW_KEY_UP 265
+#define GLFW_KEY_PAGE_UP 266
+#define GLFW_KEY_PAGE_DOWN 267
+#define GLFW_KEY_HOME 268
+#define GLFW_KEY_END 269
+#define GLFW_KEY_CAPS_LOCK 280
+#define GLFW_KEY_SCROLL_LOCK 281
+#define GLFW_KEY_NUM_LOCK 282
+#define GLFW_KEY_PRINT_SCREEN 283
+#define GLFW_KEY_PAUSE 284
+#define GLFW_KEY_F1 290
+#define GLFW_KEY_F2 291
+#define GLFW_KEY_F3 292
+#define GLFW_KEY_F4 293
+#define GLFW_KEY_F5 294
+#define GLFW_KEY_F6 295
+#define GLFW_KEY_F7 296
+#define GLFW_KEY_F8 297
+#define GLFW_KEY_F9 298
+#define GLFW_KEY_F10 299
+#define GLFW_KEY_F11 300
+#define GLFW_KEY_F12 301
+#define GLFW_KEY_F13 302
+#define GLFW_KEY_F14 303
+#define GLFW_KEY_F15 304
+#define GLFW_KEY_F16 305
+#define GLFW_KEY_F17 306
+#define GLFW_KEY_F18 307
+#define GLFW_KEY_F19 308
+#define GLFW_KEY_F20 309
+#define GLFW_KEY_F21 310
+#define GLFW_KEY_F22 311
+#define GLFW_KEY_F23 312
+#define GLFW_KEY_F24 313
+#define GLFW_KEY_F25 314
+#define GLFW_KEY_KP_0 320
+#define GLFW_KEY_KP_1 321
+#define GLFW_KEY_KP_2 322
+#define GLFW_KEY_KP_3 323
+#define GLFW_KEY_KP_4 324
+#define GLFW_KEY_KP_5 325
+#define GLFW_KEY_KP_6 326
+#define GLFW_KEY_KP_7 327
+#define GLFW_KEY_KP_8 328
+#define GLFW_KEY_KP_9 329
+#define GLFW_KEY_KP_DECIMAL 330
+#define GLFW_KEY_KP_DIVIDE 331
+#define GLFW_KEY_KP_MULTIPLY 332
+#define GLFW_KEY_KP_SUBTRACT 333
+#define GLFW_KEY_KP_ADD 334
+#define GLFW_KEY_KP_ENTER 335
+#define GLFW_KEY_KP_EQUAL 336
+#define GLFW_KEY_LEFT_SHIFT 340
+#define GLFW_KEY_LEFT_CONTROL 341
+#define GLFW_KEY_LEFT_ALT 342
+#define GLFW_KEY_LEFT_SUPER 343
+#define GLFW_KEY_RIGHT_SHIFT 344
+#define GLFW_KEY_RIGHT_CONTROL 345
+#define GLFW_KEY_RIGHT_ALT 346
+#define GLFW_KEY_RIGHT_SUPER 347
+#define GLFW_KEY_MENU 348
+
+#define GLFW_KEY_LAST GLFW_KEY_MENU
+
+/*! @} */
+
+/*! @defgroup mods Modifier key flags
+ * @brief Modifier key flags.
+ *
+ * See [key input](@ref input_key) for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+
+/*! @brief If this bit is set one or more Shift keys were held down.
+ *
+ * If this bit is set one or more Shift keys were held down.
+ */
+#define GLFW_MOD_SHIFT 0x0001
+/*! @brief If this bit is set one or more Control keys were held down.
+ *
+ * If this bit is set one or more Control keys were held down.
+ */
+#define GLFW_MOD_CONTROL 0x0002
+/*! @brief If this bit is set one or more Alt keys were held down.
+ *
+ * If this bit is set one or more Alt keys were held down.
+ */
+#define GLFW_MOD_ALT 0x0004
+/*! @brief If this bit is set one or more Super keys were held down.
+ *
+ * If this bit is set one or more Super keys were held down.
+ */
+#define GLFW_MOD_SUPER 0x0008
+/*! @brief If this bit is set the Caps Lock key is enabled.
+ *
+ * If this bit is set the Caps Lock key is enabled and the @ref
+ * GLFW_LOCK_KEY_MODS input mode is set.
+ */
+#define GLFW_MOD_CAPS_LOCK 0x0010
+/*! @brief If this bit is set the Num Lock key is enabled.
+ *
+ * If this bit is set the Num Lock key is enabled and the @ref
+ * GLFW_LOCK_KEY_MODS input mode is set.
+ */
+#define GLFW_MOD_NUM_LOCK 0x0020
+
+/*! @} */
+
+/*! @defgroup buttons Mouse buttons
+ * @brief Mouse button IDs.
+ *
+ * See [mouse button input](@ref input_mouse_button) for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+#define GLFW_MOUSE_BUTTON_1 0
+#define GLFW_MOUSE_BUTTON_2 1
+#define GLFW_MOUSE_BUTTON_3 2
+#define GLFW_MOUSE_BUTTON_4 3
+#define GLFW_MOUSE_BUTTON_5 4
+#define GLFW_MOUSE_BUTTON_6 5
+#define GLFW_MOUSE_BUTTON_7 6
+#define GLFW_MOUSE_BUTTON_8 7
+#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8
+#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1
+#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2
+#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3
+/*! @} */
+
+/*! @defgroup joysticks Joysticks
+ * @brief Joystick IDs.
+ *
+ * See [joystick input](@ref joystick) for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+#define GLFW_JOYSTICK_1 0
+#define GLFW_JOYSTICK_2 1
+#define GLFW_JOYSTICK_3 2
+#define GLFW_JOYSTICK_4 3
+#define GLFW_JOYSTICK_5 4
+#define GLFW_JOYSTICK_6 5
+#define GLFW_JOYSTICK_7 6
+#define GLFW_JOYSTICK_8 7
+#define GLFW_JOYSTICK_9 8
+#define GLFW_JOYSTICK_10 9
+#define GLFW_JOYSTICK_11 10
+#define GLFW_JOYSTICK_12 11
+#define GLFW_JOYSTICK_13 12
+#define GLFW_JOYSTICK_14 13
+#define GLFW_JOYSTICK_15 14
+#define GLFW_JOYSTICK_16 15
+#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
+/*! @} */
+
+/*! @defgroup gamepad_buttons Gamepad buttons
+ * @brief Gamepad buttons.
+ *
+ * See @ref gamepad for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+#define GLFW_GAMEPAD_BUTTON_A 0
+#define GLFW_GAMEPAD_BUTTON_B 1
+#define GLFW_GAMEPAD_BUTTON_X 2
+#define GLFW_GAMEPAD_BUTTON_Y 3
+#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER 4
+#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER 5
+#define GLFW_GAMEPAD_BUTTON_BACK 6
+#define GLFW_GAMEPAD_BUTTON_START 7
+#define GLFW_GAMEPAD_BUTTON_GUIDE 8
+#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9
+#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10
+#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11
+#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12
+#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13
+#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14
+#define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT
+
+#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A
+#define GLFW_GAMEPAD_BUTTON_CIRCLE GLFW_GAMEPAD_BUTTON_B
+#define GLFW_GAMEPAD_BUTTON_SQUARE GLFW_GAMEPAD_BUTTON_X
+#define GLFW_GAMEPAD_BUTTON_TRIANGLE GLFW_GAMEPAD_BUTTON_Y
+/*! @} */
+
+/*! @defgroup gamepad_axes Gamepad axes
+ * @brief Gamepad axes.
+ *
+ * See @ref gamepad for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+#define GLFW_GAMEPAD_AXIS_LEFT_X 0
+#define GLFW_GAMEPAD_AXIS_LEFT_Y 1
+#define GLFW_GAMEPAD_AXIS_RIGHT_X 2
+#define GLFW_GAMEPAD_AXIS_RIGHT_Y 3
+#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER 4
+#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5
+#define GLFW_GAMEPAD_AXIS_LAST GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
+/*! @} */
+
+/*! @defgroup errors Error codes
+ * @brief Error codes.
+ *
+ * See [error handling](@ref error_handling) for how these are used.
+ *
+ * @ingroup init
+ * @{ */
+/*! @brief No error has occurred.
+ *
+ * No error has occurred.
+ *
+ * @analysis Yay.
+ */
+#define GLFW_NO_ERROR 0
+/*! @brief GLFW has not been initialized.
+ *
+ * This occurs if a GLFW function was called that must not be called unless the
+ * library is [initialized](@ref intro_init).
+ *
+ * @analysis Application programmer error. Initialize GLFW before calling any
+ * function that requires initialization.
+ */
+#define GLFW_NOT_INITIALIZED 0x00010001
+/*! @brief No context is current for this thread.
+ *
+ * This occurs if a GLFW function was called that needs and operates on the
+ * current OpenGL or OpenGL ES context but no context is current on the calling
+ * thread. One such function is @ref glfwSwapInterval.
+ *
+ * @analysis Application programmer error. Ensure a context is current before
+ * calling functions that require a current context.
+ */
+#define GLFW_NO_CURRENT_CONTEXT 0x00010002
+/*! @brief One of the arguments to the function was an invalid enum value.
+ *
+ * One of the arguments to the function was an invalid enum value, for example
+ * requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib.
+ *
+ * @analysis Application programmer error. Fix the offending call.
+ */
+#define GLFW_INVALID_ENUM 0x00010003
+/*! @brief One of the arguments to the function was an invalid value.
+ *
+ * One of the arguments to the function was an invalid value, for example
+ * requesting a non-existent OpenGL or OpenGL ES version like 2.7.
+ *
+ * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead
+ * result in a @ref GLFW_VERSION_UNAVAILABLE error.
+ *
+ * @analysis Application programmer error. Fix the offending call.
+ */
+#define GLFW_INVALID_VALUE 0x00010004
+/*! @brief A memory allocation failed.
+ *
+ * A memory allocation failed.
+ *
+ * @analysis A bug in GLFW or the underlying operating system. Report the bug
+ * to our [issue tracker](https://github.com/glfw/glfw/issues).
+ */
+#define GLFW_OUT_OF_MEMORY 0x00010005
+/*! @brief GLFW could not find support for the requested API on the system.
+ *
+ * GLFW could not find support for the requested API on the system.
+ *
+ * @analysis The installed graphics driver does not support the requested
+ * API, or does not support it via the chosen context creation backend.
+ * Below are a few examples.
+ *
+ * @par
+ * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
+ * supports OpenGL ES via EGL, while Nvidia and Intel only support it via
+ * a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa
+ * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
+ * driver. Older graphics drivers do not support Vulkan.
+ */
+#define GLFW_API_UNAVAILABLE 0x00010006
+/*! @brief The requested OpenGL or OpenGL ES version is not available.
+ *
+ * The requested OpenGL or OpenGL ES version (including any requested context
+ * or framebuffer hints) is not available on this machine.
+ *
+ * @analysis The machine does not support your requirements. If your
+ * application is sufficiently flexible, downgrade your requirements and try
+ * again. Otherwise, inform the user that their machine does not match your
+ * requirements.
+ *
+ * @par
+ * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0
+ * comes out before the 4.x series gets that far, also fail with this error and
+ * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions
+ * will exist.
+ */
+#define GLFW_VERSION_UNAVAILABLE 0x00010007
+/*! @brief A platform-specific error occurred that does not match any of the
+ * more specific categories.
+ *
+ * A platform-specific error occurred that does not match any of the more
+ * specific categories.
+ *
+ * @analysis A bug or configuration error in GLFW, the underlying operating
+ * system or its drivers, or a lack of required resources. Report the issue to
+ * our [issue tracker](https://github.com/glfw/glfw/issues).
+ */
+#define GLFW_PLATFORM_ERROR 0x00010008
+/*! @brief The requested format is not supported or available.
+ *
+ * If emitted during window creation, the requested pixel format is not
+ * supported.
+ *
+ * If emitted when querying the clipboard, the contents of the clipboard could
+ * not be converted to the requested format.
+ *
+ * @analysis If emitted during window creation, one or more
+ * [hard constraints](@ref window_hints_hard) did not match any of the
+ * available pixel formats. If your application is sufficiently flexible,
+ * downgrade your requirements and try again. Otherwise, inform the user that
+ * their machine does not match your requirements.
+ *
+ * @par
+ * If emitted when querying the clipboard, ignore the error or report it to
+ * the user, as appropriate.
+ */
+#define GLFW_FORMAT_UNAVAILABLE 0x00010009
+/*! @brief The specified window does not have an OpenGL or OpenGL ES context.
+ *
+ * A window that does not have an OpenGL or OpenGL ES context was passed to
+ * a function that requires it to have one.
+ *
+ * @analysis Application programmer error. Fix the offending call.
+ */
+#define GLFW_NO_WINDOW_CONTEXT 0x0001000A
+/*! @} */
+
+/*! @addtogroup window
+ * @{ */
+/*! @brief Input focus window hint and attribute
+ *
+ * Input focus [window hint](@ref GLFW_FOCUSED_hint) or
+ * [window attribute](@ref GLFW_FOCUSED_attrib).
+ */
+#define GLFW_FOCUSED 0x00020001
+/*! @brief Window iconification window attribute
+ *
+ * Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib).
+ */
+#define GLFW_ICONIFIED 0x00020002
+/*! @brief Window resize-ability window hint and attribute
+ *
+ * Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and
+ * [window attribute](@ref GLFW_RESIZABLE_attrib).
+ */
+#define GLFW_RESIZABLE 0x00020003
+/*! @brief Window visibility window hint and attribute
+ *
+ * Window visibility [window hint](@ref GLFW_VISIBLE_hint) and
+ * [window attribute](@ref GLFW_VISIBLE_attrib).
+ */
+#define GLFW_VISIBLE 0x00020004
+/*! @brief Window decoration window hint and attribute
+ *
+ * Window decoration [window hint](@ref GLFW_DECORATED_hint) and
+ * [window attribute](@ref GLFW_DECORATED_attrib).
+ */
+#define GLFW_DECORATED 0x00020005
+/*! @brief Window auto-iconification window hint and attribute
+ *
+ * Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and
+ * [window attribute](@ref GLFW_AUTO_ICONIFY_attrib).
+ */
+#define GLFW_AUTO_ICONIFY 0x00020006
+/*! @brief Window decoration window hint and attribute
+ *
+ * Window decoration [window hint](@ref GLFW_FLOATING_hint) and
+ * [window attribute](@ref GLFW_FLOATING_attrib).
+ */
+#define GLFW_FLOATING 0x00020007
+/*! @brief Window maximization window hint and attribute
+ *
+ * Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and
+ * [window attribute](@ref GLFW_MAXIMIZED_attrib).
+ */
+#define GLFW_MAXIMIZED 0x00020008
+/*! @brief Cursor centering window hint
+ *
+ * Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint).
+ */
+#define GLFW_CENTER_CURSOR 0x00020009
+/*! @brief Window framebuffer transparency hint and attribute
+ *
+ * Window framebuffer transparency
+ * [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and
+ * [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib).
+ */
+#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A
+/*! @brief Mouse cursor hover window attribute.
+ *
+ * Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib).
+ */
+#define GLFW_HOVERED 0x0002000B
+/*! @brief Input focus on calling show window hint and attribute
+ *
+ * Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or
+ * [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib).
+ */
+#define GLFW_FOCUS_ON_SHOW 0x0002000C
+
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_RED_BITS).
+ */
+#define GLFW_RED_BITS 0x00021001
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS).
+ */
+#define GLFW_GREEN_BITS 0x00021002
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS).
+ */
+#define GLFW_BLUE_BITS 0x00021003
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS).
+ */
+#define GLFW_ALPHA_BITS 0x00021004
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS).
+ */
+#define GLFW_DEPTH_BITS 0x00021005
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS).
+ */
+#define GLFW_STENCIL_BITS 0x00021006
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS).
+ */
+#define GLFW_ACCUM_RED_BITS 0x00021007
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS).
+ */
+#define GLFW_ACCUM_GREEN_BITS 0x00021008
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS).
+ */
+#define GLFW_ACCUM_BLUE_BITS 0x00021009
+/*! @brief Framebuffer bit depth hint.
+ *
+ * Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS).
+ */
+#define GLFW_ACCUM_ALPHA_BITS 0x0002100A
+/*! @brief Framebuffer auxiliary buffer hint.
+ *
+ * Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS).
+ */
+#define GLFW_AUX_BUFFERS 0x0002100B
+/*! @brief OpenGL stereoscopic rendering hint.
+ *
+ * OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO).
+ */
+#define GLFW_STEREO 0x0002100C
+/*! @brief Framebuffer MSAA samples hint.
+ *
+ * Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES).
+ */
+#define GLFW_SAMPLES 0x0002100D
+/*! @brief Framebuffer sRGB hint.
+ *
+ * Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE).
+ */
+#define GLFW_SRGB_CAPABLE 0x0002100E
+/*! @brief Monitor refresh rate hint.
+ *
+ * Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE).
+ */
+#define GLFW_REFRESH_RATE 0x0002100F
+/*! @brief Framebuffer double buffering hint.
+ *
+ * Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER).
+ */
+#define GLFW_DOUBLEBUFFER 0x00021010
+
+/*! @brief Context client API hint and attribute.
+ *
+ * Context client API [hint](@ref GLFW_CLIENT_API_hint) and
+ * [attribute](@ref GLFW_CLIENT_API_attrib).
+ */
+#define GLFW_CLIENT_API 0x00022001
+/*! @brief Context client API major version hint and attribute.
+ *
+ * Context client API major version [hint](@ref GLFW_CONTEXT_VERSION_MAJOR_hint)
+ * and [attribute](@ref GLFW_CONTEXT_VERSION_MAJOR_attrib).
+ */
+#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002
+/*! @brief Context client API minor version hint and attribute.
+ *
+ * Context client API minor version [hint](@ref GLFW_CONTEXT_VERSION_MINOR_hint)
+ * and [attribute](@ref GLFW_CONTEXT_VERSION_MINOR_attrib).
+ */
+#define GLFW_CONTEXT_VERSION_MINOR 0x00022003
+/*! @brief Context client API revision number attribute.
+ *
+ * Context client API revision number
+ * [attribute](@ref GLFW_CONTEXT_REVISION_attrib).
+ */
+#define GLFW_CONTEXT_REVISION 0x00022004
+/*! @brief Context robustness hint and attribute.
+ *
+ * Context client API revision number [hint](@ref GLFW_CONTEXT_ROBUSTNESS_hint)
+ * and [attribute](@ref GLFW_CONTEXT_ROBUSTNESS_attrib).
+ */
+#define GLFW_CONTEXT_ROBUSTNESS 0x00022005
+/*! @brief OpenGL forward-compatibility hint and attribute.
+ *
+ * OpenGL forward-compatibility [hint](@ref GLFW_OPENGL_FORWARD_COMPAT_hint)
+ * and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib).
+ */
+#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006
+/*! @brief Debug mode context hint and attribute.
+ *
+ * Debug mode context [hint](@ref GLFW_OPENGL_DEBUG_CONTEXT_hint) and
+ * [attribute](@ref GLFW_OPENGL_DEBUG_CONTEXT_attrib).
+ */
+#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007
+/*! @brief OpenGL profile hint and attribute.
+ *
+ * OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and
+ * [attribute](@ref GLFW_OPENGL_PROFILE_attrib).
+ */
+#define GLFW_OPENGL_PROFILE 0x00022008
+/*! @brief Context flush-on-release hint and attribute.
+ *
+ * Context flush-on-release [hint](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) and
+ * [attribute](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib).
+ */
+#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009
+/*! @brief Context error suppression hint and attribute.
+ *
+ * Context error suppression [hint](@ref GLFW_CONTEXT_NO_ERROR_hint) and
+ * [attribute](@ref GLFW_CONTEXT_NO_ERROR_attrib).
+ */
+#define GLFW_CONTEXT_NO_ERROR 0x0002200A
+/*! @brief Context creation API hint and attribute.
+ *
+ * Context creation API [hint](@ref GLFW_CONTEXT_CREATION_API_hint) and
+ * [attribute](@ref GLFW_CONTEXT_CREATION_API_attrib).
+ */
+#define GLFW_CONTEXT_CREATION_API 0x0002200B
+/*! @brief Window content area scaling window
+ * [window hint](@ref GLFW_SCALE_TO_MONITOR).
+ */
+#define GLFW_SCALE_TO_MONITOR 0x0002200C
+/*! @brief macOS specific
+ * [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint).
+ */
+#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001
+/*! @brief macOS specific
+ * [window hint](@ref GLFW_COCOA_FRAME_NAME_hint).
+ */
+#define GLFW_COCOA_FRAME_NAME 0x00023002
+/*! @brief macOS specific
+ * [window hint](@ref GLFW_COCOA_GRAPHICS_SWITCHING_hint).
+ */
+#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003
+/*! @brief X11 specific
+ * [window hint](@ref GLFW_X11_CLASS_NAME_hint).
+ */
+#define GLFW_X11_CLASS_NAME 0x00024001
+/*! @brief X11 specific
+ * [window hint](@ref GLFW_X11_CLASS_NAME_hint).
+ */
+#define GLFW_X11_INSTANCE_NAME 0x00024002
+/*! @} */
+
+#define GLFW_NO_API 0
+#define GLFW_OPENGL_API 0x00030001
+#define GLFW_OPENGL_ES_API 0x00030002
+
+#define GLFW_NO_ROBUSTNESS 0
+#define GLFW_NO_RESET_NOTIFICATION 0x00031001
+#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002
+
+#define GLFW_OPENGL_ANY_PROFILE 0
+#define GLFW_OPENGL_CORE_PROFILE 0x00032001
+#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002
+
+#define GLFW_CURSOR 0x00033001
+#define GLFW_STICKY_KEYS 0x00033002
+#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003
+#define GLFW_LOCK_KEY_MODS 0x00033004
+#define GLFW_RAW_MOUSE_MOTION 0x00033005
+
+#define GLFW_CURSOR_NORMAL 0x00034001
+#define GLFW_CURSOR_HIDDEN 0x00034002
+#define GLFW_CURSOR_DISABLED 0x00034003
+
+#define GLFW_ANY_RELEASE_BEHAVIOR 0
+#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001
+#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002
+
+#define GLFW_NATIVE_CONTEXT_API 0x00036001
+#define GLFW_EGL_CONTEXT_API 0x00036002
+#define GLFW_OSMESA_CONTEXT_API 0x00036003
+
+/*! @defgroup shapes Standard cursor shapes
+ * @brief Standard system cursor shapes.
+ *
+ * See [standard cursor creation](@ref cursor_standard) for how these are used.
+ *
+ * @ingroup input
+ * @{ */
+
+/*! @brief The regular arrow cursor shape.
+ *
+ * The regular arrow cursor.
+ */
+#define GLFW_ARROW_CURSOR 0x00036001
+/*! @brief The text input I-beam cursor shape.
+ *
+ * The text input I-beam cursor shape.
+ */
+#define GLFW_IBEAM_CURSOR 0x00036002
+/*! @brief The crosshair shape.
+ *
+ * The crosshair shape.
+ */
+#define GLFW_CROSSHAIR_CURSOR 0x00036003
+/*! @brief The hand shape.
+ *
+ * The hand shape.
+ */
+#define GLFW_HAND_CURSOR 0x00036004
+/*! @brief The horizontal resize arrow shape.
+ *
+ * The horizontal resize arrow shape.
+ */
+#define GLFW_HRESIZE_CURSOR 0x00036005
+/*! @brief The vertical resize arrow shape.
+ *
+ * The vertical resize arrow shape.
+ */
+#define GLFW_VRESIZE_CURSOR 0x00036006
+/*! @} */
+
+#define GLFW_CONNECTED 0x00040001
+#define GLFW_DISCONNECTED 0x00040002
+
+/*! @addtogroup init
+ * @{ */
+/*! @brief Joystick hat buttons init hint.
+ *
+ * Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS).
+ */
+#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001
+/*! @brief macOS specific init hint.
+ *
+ * macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint).
+ */
+#define GLFW_COCOA_CHDIR_RESOURCES 0x00051001
+/*! @brief macOS specific init hint.
+ *
+ * macOS specific [init hint](@ref GLFW_COCOA_MENUBAR_hint).
+ */
+#define GLFW_COCOA_MENUBAR 0x00051002
+/*! @} */
+
+#define GLFW_DONT_CARE -1
+
+
+/*************************************************************************
+ * GLFW API types
+ *************************************************************************/
+
+/*! @brief Client API function pointer type.
+ *
+ * Generic function pointer used for returning client API function pointers
+ * without forcing a cast from a regular pointer.
+ *
+ * @sa @ref context_glext
+ * @sa @ref glfwGetProcAddress
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup context
+ */
+typedef void (*GLFWglproc)(void);
+
+/*! @brief Vulkan API function pointer type.
+ *
+ * Generic function pointer used for returning Vulkan API function pointers
+ * without forcing a cast from a regular pointer.
+ *
+ * @sa @ref vulkan_proc
+ * @sa @ref glfwGetInstanceProcAddress
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup vulkan
+ */
+typedef void (*GLFWvkproc)(void);
+
+/*! @brief Opaque monitor object.
+ *
+ * Opaque monitor object.
+ *
+ * @see @ref monitor_object
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+typedef struct GLFWmonitor GLFWmonitor;
+
+/*! @brief Opaque window object.
+ *
+ * Opaque window object.
+ *
+ * @see @ref window_object
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+typedef struct GLFWwindow GLFWwindow;
+
+/*! @brief Opaque cursor object.
+ *
+ * Opaque cursor object.
+ *
+ * @see @ref cursor_object
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+typedef struct GLFWcursor GLFWcursor;
+
+/*! @brief The function pointer type for error callbacks.
+ *
+ * This is the function pointer type for error callbacks. An error callback
+ * function has the following signature:
+ * @code
+ * void callback_name(int error_code, const char* description)
+ * @endcode
+ *
+ * @param[in] error_code An [error code](@ref errors). Future releases may add
+ * more error codes.
+ * @param[in] description A UTF-8 encoded string describing the error.
+ *
+ * @pointer_lifetime The error description string is valid until the callback
+ * function returns.
+ *
+ * @sa @ref error_handling
+ * @sa @ref glfwSetErrorCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup init
+ */
+typedef void (* GLFWerrorfun)(int error_code, const char* description);
+
+/*! @brief The function pointer type for window position callbacks.
+ *
+ * This is the function pointer type for window position callbacks. A window
+ * position callback function has the following signature:
+ * @code
+ * void callback_name(GLFWwindow* window, int xpos, int ypos)
+ * @endcode
+ *
+ * @param[in] window The window that was moved.
+ * @param[in] xpos The new x-coordinate, in screen coordinates, of the
+ * upper-left corner of the content area of the window.
+ * @param[in] ypos The new y-coordinate, in screen coordinates, of the
+ * upper-left corner of the content area of the window.
+ *
+ * @sa @ref window_pos
+ * @sa @ref glfwSetWindowPosCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowposfun)(GLFWwindow* window, int xpos, int ypos);
+
+/*! @brief The function pointer type for window size callbacks.
+ *
+ * This is the function pointer type for window size callbacks. A window size
+ * callback function has the following signature:
+ * @code
+ * void callback_name(GLFWwindow* window, int width, int height)
+ * @endcode
+ *
+ * @param[in] window The window that was resized.
+ * @param[in] width The new width, in screen coordinates, of the window.
+ * @param[in] height The new height, in screen coordinates, of the window.
+ *
+ * @sa @ref window_size
+ * @sa @ref glfwSetWindowSizeCallback
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowsizefun)(GLFWwindow* window, int width, int height);
+
+/*! @brief The function pointer type for window close callbacks.
+ *
+ * This is the function pointer type for window close callbacks. A window
+ * close callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window)
+ * @endcode
+ *
+ * @param[in] window The window that the user attempted to close.
+ *
+ * @sa @ref window_close
+ * @sa @ref glfwSetWindowCloseCallback
+ *
+ * @since Added in version 2.5.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowclosefun)(GLFWwindow* window);
+
+/*! @brief The function pointer type for window content refresh callbacks.
+ *
+ * This is the function pointer type for window content refresh callbacks.
+ * A window content refresh callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window);
+ * @endcode
+ *
+ * @param[in] window The window whose content needs to be refreshed.
+ *
+ * @sa @ref window_refresh
+ * @sa @ref glfwSetWindowRefreshCallback
+ *
+ * @since Added in version 2.5.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowrefreshfun)(GLFWwindow* window);
+
+/*! @brief The function pointer type for window focus callbacks.
+ *
+ * This is the function pointer type for window focus callbacks. A window
+ * focus callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int focused)
+ * @endcode
+ *
+ * @param[in] window The window that gained or lost input focus.
+ * @param[in] focused `GLFW_TRUE` if the window was given input focus, or
+ * `GLFW_FALSE` if it lost it.
+ *
+ * @sa @ref window_focus
+ * @sa @ref glfwSetWindowFocusCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowfocusfun)(GLFWwindow* window, int focused);
+
+/*! @brief The function pointer type for window iconify callbacks.
+ *
+ * This is the function pointer type for window iconify callbacks. A window
+ * iconify callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int iconified)
+ * @endcode
+ *
+ * @param[in] window The window that was iconified or restored.
+ * @param[in] iconified `GLFW_TRUE` if the window was iconified, or
+ * `GLFW_FALSE` if it was restored.
+ *
+ * @sa @ref window_iconify
+ * @sa @ref glfwSetWindowIconifyCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowiconifyfun)(GLFWwindow* window, int iconified);
+
+/*! @brief The function pointer type for window maximize callbacks.
+ *
+ * This is the function pointer type for window maximize callbacks. A window
+ * maximize callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int maximized)
+ * @endcode
+ *
+ * @param[in] window The window that was maximized or restored.
+ * @param[in] maximized `GLFW_TRUE` if the window was maximized, or
+ * `GLFW_FALSE` if it was restored.
+ *
+ * @sa @ref window_maximize
+ * @sa glfwSetWindowMaximizeCallback
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowmaximizefun)(GLFWwindow* window, int maximized);
+
+/*! @brief The function pointer type for framebuffer size callbacks.
+ *
+ * This is the function pointer type for framebuffer size callbacks.
+ * A framebuffer size callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int width, int height)
+ * @endcode
+ *
+ * @param[in] window The window whose framebuffer was resized.
+ * @param[in] width The new width, in pixels, of the framebuffer.
+ * @param[in] height The new height, in pixels, of the framebuffer.
+ *
+ * @sa @ref window_fbsize
+ * @sa @ref glfwSetFramebufferSizeCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWframebuffersizefun)(GLFWwindow* window, int width, int height);
+
+/*! @brief The function pointer type for window content scale callbacks.
+ *
+ * This is the function pointer type for window content scale callbacks.
+ * A window content scale callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, float xscale, float yscale)
+ * @endcode
+ *
+ * @param[in] window The window whose content scale changed.
+ * @param[in] xscale The new x-axis content scale of the window.
+ * @param[in] yscale The new y-axis content scale of the window.
+ *
+ * @sa @ref window_scale
+ * @sa @ref glfwSetWindowContentScaleCallback
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+typedef void (* GLFWwindowcontentscalefun)(GLFWwindow* window, float xscale, float yscale);
+
+/*! @brief The function pointer type for mouse button callbacks.
+ *
+ * This is the function pointer type for mouse button callback functions.
+ * A mouse button callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int button, int action, int mods)
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] button The [mouse button](@ref buttons) that was pressed or
+ * released.
+ * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. Future releases
+ * may add more actions.
+ * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
+ * held down.
+ *
+ * @sa @ref input_mouse_button
+ * @sa @ref glfwSetMouseButtonCallback
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle and modifier mask parameters.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWmousebuttonfun)(GLFWwindow* window, int button, int action, int mods);
+
+/*! @brief The function pointer type for cursor position callbacks.
+ *
+ * This is the function pointer type for cursor position callbacks. A cursor
+ * position callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, double xpos, double ypos);
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] xpos The new cursor x-coordinate, relative to the left edge of
+ * the content area.
+ * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the
+ * content area.
+ *
+ * @sa @ref cursor_pos
+ * @sa @ref glfwSetCursorPosCallback
+ *
+ * @since Added in version 3.0. Replaces `GLFWmouseposfun`.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWcursorposfun)(GLFWwindow* window, double xpos, double ypos);
+
+/*! @brief The function pointer type for cursor enter/leave callbacks.
+ *
+ * This is the function pointer type for cursor enter/leave callbacks.
+ * A cursor enter/leave callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int entered)
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] entered `GLFW_TRUE` if the cursor entered the window's content
+ * area, or `GLFW_FALSE` if it left it.
+ *
+ * @sa @ref cursor_enter
+ * @sa @ref glfwSetCursorEnterCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWcursorenterfun)(GLFWwindow* window, int entered);
+
+/*! @brief The function pointer type for scroll callbacks.
+ *
+ * This is the function pointer type for scroll callbacks. A scroll callback
+ * function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, double xoffset, double yoffset)
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] xoffset The scroll offset along the x-axis.
+ * @param[in] yoffset The scroll offset along the y-axis.
+ *
+ * @sa @ref scrolling
+ * @sa @ref glfwSetScrollCallback
+ *
+ * @since Added in version 3.0. Replaces `GLFWmousewheelfun`.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWscrollfun)(GLFWwindow* window, double xoffset, double yoffset);
+
+/*! @brief The function pointer type for keyboard key callbacks.
+ *
+ * This is the function pointer type for keyboard key callbacks. A keyboard
+ * key callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] key The [keyboard key](@ref keys) that was pressed or released.
+ * @param[in] scancode The system-specific scancode of the key.
+ * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. Future
+ * releases may add more actions.
+ * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
+ * held down.
+ *
+ * @sa @ref input_key
+ * @sa @ref glfwSetKeyCallback
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle, scancode and modifier mask parameters.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWkeyfun)(GLFWwindow* window, int key, int scancode, int action, int mods);
+
+/*! @brief The function pointer type for Unicode character callbacks.
+ *
+ * This is the function pointer type for Unicode character callbacks.
+ * A Unicode character callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, unsigned int codepoint)
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] codepoint The Unicode code point of the character.
+ *
+ * @sa @ref input_char
+ * @sa @ref glfwSetCharCallback
+ *
+ * @since Added in version 2.4.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWcharfun)(GLFWwindow* window, unsigned int codepoint);
+
+/*! @brief The function pointer type for Unicode character with modifiers
+ * callbacks.
+ *
+ * This is the function pointer type for Unicode character with modifiers
+ * callbacks. It is called for each input character, regardless of what
+ * modifier keys are held down. A Unicode character with modifiers callback
+ * function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] codepoint The Unicode code point of the character.
+ * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
+ * held down.
+ *
+ * @sa @ref input_char
+ * @sa @ref glfwSetCharModsCallback
+ *
+ * @deprecated Scheduled for removal in version 4.0.
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWcharmodsfun)(GLFWwindow* window, unsigned int codepoint, int mods);
+
+/*! @brief The function pointer type for path drop callbacks.
+ *
+ * This is the function pointer type for path drop callbacks. A path drop
+ * callback function has the following signature:
+ * @code
+ * void function_name(GLFWwindow* window, int path_count, const char* paths[])
+ * @endcode
+ *
+ * @param[in] window The window that received the event.
+ * @param[in] path_count The number of dropped paths.
+ * @param[in] paths The UTF-8 encoded file and/or directory path names.
+ *
+ * @pointer_lifetime The path array and its strings are valid until the
+ * callback function returns.
+ *
+ * @sa @ref path_drop
+ * @sa @ref glfwSetDropCallback
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWdropfun)(GLFWwindow* window, int path_count, const char* paths[]);
+
+/*! @brief The function pointer type for monitor configuration callbacks.
+ *
+ * This is the function pointer type for monitor configuration callbacks.
+ * A monitor callback function has the following signature:
+ * @code
+ * void function_name(GLFWmonitor* monitor, int event)
+ * @endcode
+ *
+ * @param[in] monitor The monitor that was connected or disconnected.
+ * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future
+ * releases may add more events.
+ *
+ * @sa @ref monitor_event
+ * @sa @ref glfwSetMonitorCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+typedef void (* GLFWmonitorfun)(GLFWmonitor* monitor, int event);
+
+/*! @brief The function pointer type for joystick configuration callbacks.
+ *
+ * This is the function pointer type for joystick configuration callbacks.
+ * A joystick configuration callback function has the following signature:
+ * @code
+ * void function_name(int jid, int event)
+ * @endcode
+ *
+ * @param[in] jid The joystick that was connected or disconnected.
+ * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future
+ * releases may add more events.
+ *
+ * @sa @ref joystick_event
+ * @sa @ref glfwSetJoystickCallback
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup input
+ */
+typedef void (* GLFWjoystickfun)(int jid, int event);
+
+/*! @brief Video mode type.
+ *
+ * This describes a single video mode.
+ *
+ * @sa @ref monitor_modes
+ * @sa @ref glfwGetVideoMode
+ * @sa @ref glfwGetVideoModes
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added refresh rate member.
+ *
+ * @ingroup monitor
+ */
+typedef struct GLFWvidmode
+{
+ /*! The width, in screen coordinates, of the video mode.
+ */
+ int width;
+ /*! The height, in screen coordinates, of the video mode.
+ */
+ int height;
+ /*! The bit depth of the red channel of the video mode.
+ */
+ int redBits;
+ /*! The bit depth of the green channel of the video mode.
+ */
+ int greenBits;
+ /*! The bit depth of the blue channel of the video mode.
+ */
+ int blueBits;
+ /*! The refresh rate, in Hz, of the video mode.
+ */
+ int refreshRate;
+} GLFWvidmode;
+
+/*! @brief Gamma ramp.
+ *
+ * This describes the gamma ramp for a monitor.
+ *
+ * @sa @ref monitor_gamma
+ * @sa @ref glfwGetGammaRamp
+ * @sa @ref glfwSetGammaRamp
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+typedef struct GLFWgammaramp
+{
+ /*! An array of value describing the response of the red channel.
+ */
+ unsigned short* red;
+ /*! An array of value describing the response of the green channel.
+ */
+ unsigned short* green;
+ /*! An array of value describing the response of the blue channel.
+ */
+ unsigned short* blue;
+ /*! The number of elements in each array.
+ */
+ unsigned int size;
+} GLFWgammaramp;
+
+/*! @brief Image data.
+ *
+ * This describes a single 2D image. See the documentation for each related
+ * function what the expected pixel format is.
+ *
+ * @sa @ref cursor_custom
+ * @sa @ref window_icon
+ *
+ * @since Added in version 2.1.
+ * @glfw3 Removed format and bytes-per-pixel members.
+ *
+ * @ingroup window
+ */
+typedef struct GLFWimage
+{
+ /*! The width, in pixels, of this image.
+ */
+ int width;
+ /*! The height, in pixels, of this image.
+ */
+ int height;
+ /*! The pixel data of this image, arranged left-to-right, top-to-bottom.
+ */
+ unsigned char* pixels;
+} GLFWimage;
+
+/*! @brief Gamepad input state
+ *
+ * This describes the input state of a gamepad.
+ *
+ * @sa @ref gamepad
+ * @sa @ref glfwGetGamepadState
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+typedef struct GLFWgamepadstate
+{
+ /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
+ * or `GLFW_RELEASE`.
+ */
+ unsigned char buttons[15];
+ /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0
+ * to 1.0 inclusive.
+ */
+ float axes[6];
+} GLFWgamepadstate;
+
+
+/*************************************************************************
+ * GLFW API functions
+ *************************************************************************/
+
+/*! @brief Initializes the GLFW library.
+ *
+ * This function initializes the GLFW library. Before most GLFW functions can
+ * be used, GLFW must be initialized, and before an application terminates GLFW
+ * should be terminated in order to free any resources allocated during or
+ * after initialization.
+ *
+ * If this function fails, it calls @ref glfwTerminate before returning. If it
+ * succeeds, you should call @ref glfwTerminate before the application exits.
+ *
+ * Additional calls to this function after successful initialization but before
+ * termination will return `GLFW_TRUE` immediately.
+ *
+ * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark @macos This function will change the current directory of the
+ * application to the `Contents/Resources` subdirectory of the application's
+ * bundle, if present. This can be disabled with the @ref
+ * GLFW_COCOA_CHDIR_RESOURCES init hint.
+ *
+ * @remark @x11 This function will set the `LC_CTYPE` category of the
+ * application locale according to the current environment if that category is
+ * still "C". This is because the "C" locale breaks Unicode text input.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref intro_init
+ * @sa @ref glfwTerminate
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup init
+ */
+GLFWAPI int glfwInit(void);
+
+/*! @brief Terminates the GLFW library.
+ *
+ * This function destroys all remaining windows and cursors, restores any
+ * modified gamma ramps and frees any other allocated resources. Once this
+ * function is called, you must again call @ref glfwInit successfully before
+ * you will be able to use most GLFW functions.
+ *
+ * If GLFW has been successfully initialized, this function should be called
+ * before the application exits. If initialization fails, there is no need to
+ * call this function, as it is called by @ref glfwInit before it returns
+ * failure.
+ *
+ * This function has no effect if GLFW is not initialized.
+ *
+ * @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark This function may be called before @ref glfwInit.
+ *
+ * @warning The contexts of any remaining windows must not be current on any
+ * other thread when this function is called.
+ *
+ * @reentrancy This function must not be called from a callback.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref intro_init
+ * @sa @ref glfwInit
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup init
+ */
+GLFWAPI void glfwTerminate(void);
+
+/*! @brief Sets the specified init hint to the desired value.
+ *
+ * This function sets hints for the next initialization of GLFW.
+ *
+ * The values you set hints to are never reset by GLFW, but they only take
+ * effect during initialization. Once GLFW has been initialized, any values
+ * you set will be ignored until the library is terminated and initialized
+ * again.
+ *
+ * Some hints are platform specific. These may be set on any platform but they
+ * will only affect their specific platform. Other platforms will ignore them.
+ * Setting these hints requires no platform specific headers or functions.
+ *
+ * @param[in] hint The [init hint](@ref init_hints) to set.
+ * @param[in] value The new value of the init hint.
+ *
+ * @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref
+ * GLFW_INVALID_VALUE.
+ *
+ * @remarks This function may be called before @ref glfwInit.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa init_hints
+ * @sa glfwInit
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup init
+ */
+GLFWAPI void glfwInitHint(int hint, int value);
+
+/*! @brief Retrieves the version of the GLFW library.
+ *
+ * This function retrieves the major, minor and revision numbers of the GLFW
+ * library. It is intended for when you are using GLFW as a shared library and
+ * want to ensure that you are using the minimum required version.
+ *
+ * Any or all of the version arguments may be `NULL`.
+ *
+ * @param[out] major Where to store the major version number, or `NULL`.
+ * @param[out] minor Where to store the minor version number, or `NULL`.
+ * @param[out] rev Where to store the revision number, or `NULL`.
+ *
+ * @errors None.
+ *
+ * @remark This function may be called before @ref glfwInit.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref intro_version
+ * @sa @ref glfwGetVersionString
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup init
+ */
+GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
+
+/*! @brief Returns a string describing the compile-time configuration.
+ *
+ * This function returns the compile-time generated
+ * [version string](@ref intro_version_string) of the GLFW library binary. It
+ * describes the version, platform, compiler and any platform-specific
+ * compile-time options. It should not be confused with the OpenGL or OpenGL
+ * ES version string, queried with `glGetString`.
+ *
+ * __Do not use the version string__ to parse the GLFW library version. The
+ * @ref glfwGetVersion function provides the version of the running library
+ * binary in numerical format.
+ *
+ * @return The ASCII encoded GLFW version string.
+ *
+ * @errors None.
+ *
+ * @remark This function may be called before @ref glfwInit.
+ *
+ * @pointer_lifetime The returned string is static and compile-time generated.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref intro_version
+ * @sa @ref glfwGetVersion
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup init
+ */
+GLFWAPI const char* glfwGetVersionString(void);
+
+/*! @brief Returns and clears the last error for the calling thread.
+ *
+ * This function returns and clears the [error code](@ref errors) of the last
+ * error that occurred on the calling thread, and optionally a UTF-8 encoded
+ * human-readable description of it. If no error has occurred since the last
+ * call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is
+ * set to `NULL`.
+ *
+ * @param[in] description Where to store the error description pointer, or `NULL`.
+ * @return The last error code for the calling thread, or @ref GLFW_NO_ERROR
+ * (zero).
+ *
+ * @errors None.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is guaranteed to be valid only until the
+ * next error occurs or the library is terminated.
+ *
+ * @remark This function may be called before @ref glfwInit.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref error_handling
+ * @sa @ref glfwSetErrorCallback
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup init
+ */
+GLFWAPI int glfwGetError(const char** description);
+
+/*! @brief Sets the error callback.
+ *
+ * This function sets the error callback, which is called with an error code
+ * and a human-readable description each time a GLFW error occurs.
+ *
+ * The error code is set before the callback is called. Calling @ref
+ * glfwGetError from the error callback will return the same value as the error
+ * code argument.
+ *
+ * The error callback is called on the thread where the error occurred. If you
+ * are using GLFW from multiple threads, your error callback needs to be
+ * written accordingly.
+ *
+ * Because the description string may have been generated specifically for that
+ * error, it is not guaranteed to be valid after the callback has returned. If
+ * you wish to use it after the callback returns, you need to make a copy.
+ *
+ * Once set, the error callback remains set even after the library has been
+ * terminated.
+ *
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set.
+ *
+ * @callback_signature
+ * @code
+ * void callback_name(int error_code, const char* description)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [callback pointer type](@ref GLFWerrorfun).
+ *
+ * @errors None.
+ *
+ * @remark This function may be called before @ref glfwInit.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref error_handling
+ * @sa @ref glfwGetError
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup init
+ */
+GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
+
+/*! @brief Returns the currently connected monitors.
+ *
+ * This function returns an array of handles for all currently connected
+ * monitors. The primary monitor is always first in the returned array. If no
+ * monitors were found, this function returns `NULL`.
+ *
+ * @param[out] count Where to store the number of monitors in the returned
+ * array. This is set to zero if an error occurred.
+ * @return An array of monitor handles, or `NULL` if no monitors were found or
+ * if an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is guaranteed to be valid only until the
+ * monitor configuration changes or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_monitors
+ * @sa @ref monitor_event
+ * @sa @ref glfwGetPrimaryMonitor
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI GLFWmonitor** glfwGetMonitors(int* count);
+
+/*! @brief Returns the primary monitor.
+ *
+ * This function returns the primary monitor. This is usually the monitor
+ * where elements like the task bar or global menu bar are located.
+ *
+ * @return The primary monitor, or `NULL` if no monitors were found or if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @remark The primary monitor is always first in the array returned by @ref
+ * glfwGetMonitors.
+ *
+ * @sa @ref monitor_monitors
+ * @sa @ref glfwGetMonitors
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
+
+/*! @brief Returns the position of the monitor's viewport on the virtual screen.
+ *
+ * This function returns the position, in screen coordinates, of the upper-left
+ * corner of the specified monitor.
+ *
+ * Any or all of the position arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` position arguments will be set to zero.
+ *
+ * @param[in] monitor The monitor to query.
+ * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
+ * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_properties
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
+
+/*! @brief Retrieves the work area of the monitor.
+ *
+ * This function returns the position, in screen coordinates, of the upper-left
+ * corner of the work area of the specified monitor along with the work area
+ * size in screen coordinates. The work area is defined as the area of the
+ * monitor not occluded by the operating system task bar where present. If no
+ * task bar exists then the work area is the monitor resolution in screen
+ * coordinates.
+ *
+ * Any or all of the position and size arguments may be `NULL`. If an error
+ * occurs, all non-`NULL` position and size arguments will be set to zero.
+ *
+ * @param[in] monitor The monitor to query.
+ * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
+ * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
+ * @param[out] width Where to store the monitor width, or `NULL`.
+ * @param[out] height Where to store the monitor height, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_workarea
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
+
+/*! @brief Returns the physical size of the monitor.
+ *
+ * This function returns the size, in millimetres, of the display area of the
+ * specified monitor.
+ *
+ * Some systems do not provide accurate monitor size information, either
+ * because the monitor
+ * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data)
+ * data is incorrect or because the driver does not report it accurately.
+ *
+ * Any or all of the size arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` size arguments will be set to zero.
+ *
+ * @param[in] monitor The monitor to query.
+ * @param[out] widthMM Where to store the width, in millimetres, of the
+ * monitor's display area, or `NULL`.
+ * @param[out] heightMM Where to store the height, in millimetres, of the
+ * monitor's display area, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @remark @win32 On Windows 8 and earlier the physical size is calculated from
+ * the current resolution and system DPI instead of querying the monitor EDID data.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_properties
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM);
+
+/*! @brief Retrieves the content scale for the specified monitor.
+ *
+ * This function retrieves the content scale for the specified monitor. The
+ * content scale is the ratio between the current DPI and the platform's
+ * default DPI. This is especially important for text and any UI elements. If
+ * the pixel dimensions of your UI scaled by this look appropriate on your
+ * machine then it should appear at a reasonable size on other machines
+ * regardless of their DPI and scaling settings. This relies on the system DPI
+ * and scaling settings being somewhat correct.
+ *
+ * The content scale may depend on both the monitor resolution and pixel
+ * density and on user settings. It may be very different from the raw DPI
+ * calculated from the physical size and current resolution.
+ *
+ * @param[in] monitor The monitor to query.
+ * @param[out] xscale Where to store the x-axis content scale, or `NULL`.
+ * @param[out] yscale Where to store the y-axis content scale, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_scale
+ * @sa @ref glfwGetWindowContentScale
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale);
+
+/*! @brief Returns the name of the specified monitor.
+ *
+ * This function returns a human-readable name, encoded as UTF-8, of the
+ * specified monitor. The name typically reflects the make and model of the
+ * monitor and is not guaranteed to be unique among the connected monitors.
+ *
+ * @param[in] monitor The monitor to query.
+ * @return The UTF-8 encoded name of the monitor, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified monitor is
+ * disconnected or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_properties
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);
+
+/*! @brief Sets the user pointer of the specified monitor.
+ *
+ * This function sets the user-defined pointer of the specified monitor. The
+ * current value is retained until the monitor is disconnected. The initial
+ * value is `NULL`.
+ *
+ * This function may be called from the monitor callback, even for a monitor
+ * that is being disconnected.
+ *
+ * @param[in] monitor The monitor whose pointer to set.
+ * @param[in] pointer The new value.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref monitor_userptr
+ * @sa @ref glfwGetMonitorUserPointer
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);
+
+/*! @brief Returns the user pointer of the specified monitor.
+ *
+ * This function returns the current value of the user-defined pointer of the
+ * specified monitor. The initial value is `NULL`.
+ *
+ * This function may be called from the monitor callback, even for a monitor
+ * that is being disconnected.
+ *
+ * @param[in] monitor The monitor whose pointer to return.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref monitor_userptr
+ * @sa @ref glfwSetMonitorUserPointer
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);
+
+/*! @brief Sets the monitor configuration callback.
+ *
+ * This function sets the monitor configuration callback, or removes the
+ * currently set callback. This is called when a monitor is connected to or
+ * disconnected from the system.
+ *
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWmonitor* monitor, int event)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWmonitorfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_event
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
+
+/*! @brief Returns the available video modes for the specified monitor.
+ *
+ * This function returns an array of all video modes supported by the specified
+ * monitor. The returned array is sorted in ascending order, first by color
+ * bit depth (the sum of all channel depths), then by resolution area (the
+ * product of width and height), then resolution width and finally by refresh
+ * rate.
+ *
+ * @param[in] monitor The monitor to query.
+ * @param[out] count Where to store the number of video modes in the returned
+ * array. This is set to zero if an error occurred.
+ * @return An array of video modes, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified monitor is
+ * disconnected, this function is called again for that monitor or the library
+ * is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_modes
+ * @sa @ref glfwGetVideoMode
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Changed to return an array of modes for a specific monitor.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
+
+/*! @brief Returns the current mode of the specified monitor.
+ *
+ * This function returns the current video mode of the specified monitor. If
+ * you have created a full screen window for that monitor, the return value
+ * will depend on whether that window is iconified.
+ *
+ * @param[in] monitor The monitor to query.
+ * @return The current mode of the monitor, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified monitor is
+ * disconnected or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_modes
+ * @sa @ref glfwGetVideoModes
+ *
+ * @since Added in version 3.0. Replaces `glfwGetDesktopMode`.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
+
+/*! @brief Generates a gamma ramp and sets it for the specified monitor.
+ *
+ * This function generates an appropriately sized gamma ramp from the specified
+ * exponent and then calls @ref glfwSetGammaRamp with it. The value must be
+ * a finite number greater than zero.
+ *
+ * The software controlled gamma ramp is applied _in addition_ to the hardware
+ * gamma correction, which today is usually an approximation of sRGB gamma.
+ * This means that setting a perfectly linear ramp, or gamma 1.0, will produce
+ * the default (usually sRGB-like) behavior.
+ *
+ * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref
+ * GLFW_SRGB_CAPABLE hint.
+ *
+ * @param[in] monitor The monitor whose gamma ramp to set.
+ * @param[in] gamma The desired exponent.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland Gamma handling is a privileged protocol, this function
+ * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_gamma
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
+
+/*! @brief Returns the current gamma ramp for the specified monitor.
+ *
+ * This function returns the current gamma ramp of the specified monitor.
+ *
+ * @param[in] monitor The monitor to query.
+ * @return The current gamma ramp, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland Gamma handling is a privileged protocol, this function
+ * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while
+ * returning `NULL`.
+ *
+ * @pointer_lifetime The returned structure and its arrays are allocated and
+ * freed by GLFW. You should not free them yourself. They are valid until the
+ * specified monitor is disconnected, this function is called again for that
+ * monitor or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_gamma
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
+
+/*! @brief Sets the current gamma ramp for the specified monitor.
+ *
+ * This function sets the current gamma ramp for the specified monitor. The
+ * original gamma ramp for that monitor is saved by GLFW the first time this
+ * function is called and is restored by @ref glfwTerminate.
+ *
+ * The software controlled gamma ramp is applied _in addition_ to the hardware
+ * gamma correction, which today is usually an approximation of sRGB gamma.
+ * This means that setting a perfectly linear ramp, or gamma 1.0, will produce
+ * the default (usually sRGB-like) behavior.
+ *
+ * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref
+ * GLFW_SRGB_CAPABLE hint.
+ *
+ * @param[in] monitor The monitor whose gamma ramp to set.
+ * @param[in] ramp The gamma ramp to use.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark The size of the specified gamma ramp should match the size of the
+ * current ramp for that monitor.
+ *
+ * @remark @win32 The gamma ramp size must be 256.
+ *
+ * @remark @wayland Gamma handling is a privileged protocol, this function
+ * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The specified gamma ramp is copied before this function
+ * returns.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref monitor_gamma
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup monitor
+ */
+GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
+
+/*! @brief Resets all window hints to their default values.
+ *
+ * This function resets all window hints to their
+ * [default values](@ref window_hints_values).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_hints
+ * @sa @ref glfwWindowHint
+ * @sa @ref glfwWindowHintString
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwDefaultWindowHints(void);
+
+/*! @brief Sets the specified window hint to the desired value.
+ *
+ * This function sets hints for the next call to @ref glfwCreateWindow. The
+ * hints, once set, retain their values until changed by a call to this
+ * function or @ref glfwDefaultWindowHints, or until the library is terminated.
+ *
+ * Only integer value hints can be set with this function. String value hints
+ * are set with @ref glfwWindowHintString.
+ *
+ * This function does not check whether the specified hint values are valid.
+ * If you set hints to invalid values this will instead be reported by the next
+ * call to @ref glfwCreateWindow.
+ *
+ * Some hints are platform specific. These may be set on any platform but they
+ * will only affect their specific platform. Other platforms will ignore them.
+ * Setting these hints requires no platform specific headers or functions.
+ *
+ * @param[in] hint The [window hint](@ref window_hints) to set.
+ * @param[in] value The new value of the window hint.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_hints
+ * @sa @ref glfwWindowHintString
+ * @sa @ref glfwDefaultWindowHints
+ *
+ * @since Added in version 3.0. Replaces `glfwOpenWindowHint`.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwWindowHint(int hint, int value);
+
+/*! @brief Sets the specified window hint to the desired value.
+ *
+ * This function sets hints for the next call to @ref glfwCreateWindow. The
+ * hints, once set, retain their values until changed by a call to this
+ * function or @ref glfwDefaultWindowHints, or until the library is terminated.
+ *
+ * Only string type hints can be set with this function. Integer value hints
+ * are set with @ref glfwWindowHint.
+ *
+ * This function does not check whether the specified hint values are valid.
+ * If you set hints to invalid values this will instead be reported by the next
+ * call to @ref glfwCreateWindow.
+ *
+ * Some hints are platform specific. These may be set on any platform but they
+ * will only affect their specific platform. Other platforms will ignore them.
+ * Setting these hints requires no platform specific headers or functions.
+ *
+ * @param[in] hint The [window hint](@ref window_hints) to set.
+ * @param[in] value The new value of the window hint.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @pointer_lifetime The specified string is copied before this function
+ * returns.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_hints
+ * @sa @ref glfwWindowHint
+ * @sa @ref glfwDefaultWindowHints
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwWindowHintString(int hint, const char* value);
+
+/*! @brief Creates a window and its associated context.
+ *
+ * This function creates a window and its associated OpenGL or OpenGL ES
+ * context. Most of the options controlling how the window and its context
+ * should be created are specified with [window hints](@ref window_hints).
+ *
+ * Successful creation does not change which context is current. Before you
+ * can use the newly created context, you need to
+ * [make it current](@ref context_current). For information about the `share`
+ * parameter, see @ref context_sharing.
+ *
+ * The created window, framebuffer and context may differ from what you
+ * requested, as not all parameters and hints are
+ * [hard constraints](@ref window_hints_hard). This includes the size of the
+ * window, especially for full screen windows. To query the actual attributes
+ * of the created window, framebuffer and context, see @ref
+ * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize.
+ *
+ * To create a full screen window, you need to specify the monitor the window
+ * will cover. If no monitor is specified, the window will be windowed mode.
+ * Unless you have a way for the user to choose a specific monitor, it is
+ * recommended that you pick the primary monitor. For more information on how
+ * to query connected monitors, see @ref monitor_monitors.
+ *
+ * For full screen windows, the specified size becomes the resolution of the
+ * window's _desired video mode_. As long as a full screen window is not
+ * iconified, the supported video mode most closely matching the desired video
+ * mode is set for the specified monitor. For more information about full
+ * screen windows, including the creation of so called _windowed full screen_
+ * or _borderless full screen_ windows, see @ref window_windowed_full_screen.
+ *
+ * Once you have created the window, you can switch it between windowed and
+ * full screen mode with @ref glfwSetWindowMonitor. This will not affect its
+ * OpenGL or OpenGL ES context.
+ *
+ * By default, newly created windows use the placement recommended by the
+ * window system. To create the window at a specific position, make it
+ * initially invisible using the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window
+ * hint, set its [position](@ref window_pos) and then [show](@ref window_hide)
+ * it.
+ *
+ * As long as at least one full screen window is not iconified, the screensaver
+ * is prohibited from starting.
+ *
+ * Window systems put limits on window sizes. Very large or very small window
+ * dimensions may be overridden by the window system on creation. Check the
+ * actual [size](@ref window_size) after creation.
+ *
+ * The [swap interval](@ref buffer_swap) is not set during window creation and
+ * the initial value may vary depending on driver settings and defaults.
+ *
+ * @param[in] width The desired width, in screen coordinates, of the window.
+ * This must be greater than zero.
+ * @param[in] height The desired height, in screen coordinates, of the window.
+ * This must be greater than zero.
+ * @param[in] title The initial, UTF-8 encoded window title.
+ * @param[in] monitor The monitor to use for full screen mode, or `NULL` for
+ * windowed mode.
+ * @param[in] share The window whose context to share resources with, or `NULL`
+ * to not share resources.
+ * @return The handle of the created window, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref
+ * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @win32 Window creation will fail if the Microsoft GDI software
+ * OpenGL implementation is the only one available.
+ *
+ * @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it
+ * will be set as the initial icon for the window. If no such icon is present,
+ * the `IDI_APPLICATION` icon will be used instead. To set a different icon,
+ * see @ref glfwSetWindowIcon.
+ *
+ * @remark @win32 The context to share resources with must not be current on
+ * any other thread.
+ *
+ * @remark @macos The OS only supports forward-compatible core profile contexts
+ * for OpenGL versions 3.2 and later. Before creating an OpenGL context of
+ * version 3.2 or later you must set the
+ * [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and
+ * [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly.
+ * OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.
+ *
+ * @remark @macos The GLFW window has no icon, as it is not a document
+ * window, but the dock icon will be the same as the application bundle's icon.
+ * For more information on bundles, see the
+ * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
+ * in the Mac Developer Library.
+ *
+ * @remark @macos The first time a window is created the menu bar is created.
+ * If GLFW finds a `MainMenu.nib` it is loaded and assumed to contain a menu
+ * bar. Otherwise a minimal menu bar is created manually with common commands
+ * like Hide, Quit and About. The About entry opens a minimal about dialog
+ * with information from the application's bundle. Menu bar creation can be
+ * disabled entirely with the @ref GLFW_COCOA_MENUBAR init hint.
+ *
+ * @remark @macos On OS X 10.10 and later the window frame will not be rendered
+ * at full resolution on Retina displays unless the
+ * [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint)
+ * hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the
+ * application bundle's `Info.plist`. For more information, see
+ * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html)
+ * in the Mac Developer Library. The GLFW test and example programs use
+ * a custom `Info.plist` template for this, which can be found as
+ * `CMake/MacOSXBundleInfo.plist.in` in the source tree.
+ *
+ * @remark @macos When activating frame autosaving with
+ * [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified
+ * window size and position may be overridden by previously saved values.
+ *
+ * @remark @x11 Some window managers will not respect the placement of
+ * initially hidden windows.
+ *
+ * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for
+ * a window to reach its requested state. This means you may not be able to
+ * query the final size, position or other attributes directly after window
+ * creation.
+ *
+ * @remark @x11 The class part of the `WM_CLASS` window property will by
+ * default be set to the window title passed to this function. The instance
+ * part will use the contents of the `RESOURCE_NAME` environment variable, if
+ * present and not empty, or fall back to the window title. Set the
+ * [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and
+ * [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to
+ * override this.
+ *
+ * @remark @wayland Compositors should implement the xdg-decoration protocol
+ * for GLFW to decorate the window properly. If this protocol isn't
+ * supported, or if the compositor prefers client-side decorations, a very
+ * simple fallback frame will be drawn using the wp_viewporter protocol. A
+ * compositor can still emit close, maximize or fullscreen events, using for
+ * instance a keybind mechanism. If neither of these protocols is supported,
+ * the window won't be decorated.
+ *
+ * @remark @wayland A full screen window will not attempt to change the mode,
+ * no matter what the requested size or refresh rate.
+ *
+ * @remark @wayland Screensaver inhibition requires the idle-inhibit protocol
+ * to be implemented in the user's compositor.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_creation
+ * @sa @ref glfwDestroyWindow
+ *
+ * @since Added in version 3.0. Replaces `glfwOpenWindow`.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
+
+/*! @brief Destroys the specified window and its context.
+ *
+ * This function destroys the specified window and its context. On calling
+ * this function, no further callbacks will be called for that window.
+ *
+ * If the context of the specified window is current on the main thread, it is
+ * detached before being destroyed.
+ *
+ * @param[in] window The window to destroy.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @note The context of the specified window must not be current on any other
+ * thread when this function is called.
+ *
+ * @reentrancy This function must not be called from a callback.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_creation
+ * @sa @ref glfwCreateWindow
+ *
+ * @since Added in version 3.0. Replaces `glfwCloseWindow`.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwDestroyWindow(GLFWwindow* window);
+
+/*! @brief Checks the close flag of the specified window.
+ *
+ * This function returns the value of the close flag of the specified window.
+ *
+ * @param[in] window The window to query.
+ * @return The value of the close flag.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref window_close
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI int glfwWindowShouldClose(GLFWwindow* window);
+
+/*! @brief Sets the close flag of the specified window.
+ *
+ * This function sets the value of the close flag of the specified window.
+ * This can be used to override the user's attempt to close the window, or
+ * to signal that it should be closed.
+ *
+ * @param[in] window The window whose flag to change.
+ * @param[in] value The new value.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref window_close
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
+
+/*! @brief Sets the title of the specified window.
+ *
+ * This function sets the window title, encoded as UTF-8, of the specified
+ * window.
+ *
+ * @param[in] window The window whose title to change.
+ * @param[in] title The UTF-8 encoded window title.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @macos The window title will not be updated until the next time you
+ * process events.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_title
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
+
+/*! @brief Sets the icon for the specified window.
+ *
+ * This function sets the icon of the specified window. If passed an array of
+ * candidate images, those of or closest to the sizes desired by the system are
+ * selected. If no images are specified, the window reverts to its default
+ * icon.
+ *
+ * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
+ * bits per channel with the red channel first. They are arranged canonically
+ * as packed sequential rows, starting from the top-left corner.
+ *
+ * The desired image sizes varies depending on platform and system settings.
+ * The selected images will be rescaled as needed. Good sizes include 16x16,
+ * 32x32 and 48x48.
+ *
+ * @param[in] window The window whose icon to set.
+ * @param[in] count The number of images in the specified array, or zero to
+ * revert to the default window icon.
+ * @param[in] images The images to create the icon from. This is ignored if
+ * count is zero.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The specified image data is copied before this function
+ * returns.
+ *
+ * @remark @macos The GLFW window has no icon, as it is not a document
+ * window, so this function does nothing. The dock icon will be the same as
+ * the application bundle's icon. For more information on bundles, see the
+ * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
+ * in the Mac Developer Library.
+ *
+ * @remark @wayland There is no existing protocol to change an icon, the
+ * window will thus inherit the one defined in the application's desktop file.
+ * This function always emits @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_icon
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images);
+
+/*! @brief Retrieves the position of the content area of the specified window.
+ *
+ * This function retrieves the position, in screen coordinates, of the
+ * upper-left corner of the content area of the specified window.
+ *
+ * Any or all of the position arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` position arguments will be set to zero.
+ *
+ * @param[in] window The window to query.
+ * @param[out] xpos Where to store the x-coordinate of the upper-left corner of
+ * the content area, or `NULL`.
+ * @param[out] ypos Where to store the y-coordinate of the upper-left corner of
+ * the content area, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland There is no way for an application to retrieve the global
+ * position of its windows, this function will always emit @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_pos
+ * @sa @ref glfwSetWindowPos
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
+
+/*! @brief Sets the position of the content area of the specified window.
+ *
+ * This function sets the position, in screen coordinates, of the upper-left
+ * corner of the content area of the specified windowed mode window. If the
+ * window is a full screen window, this function does nothing.
+ *
+ * __Do not use this function__ to move an already visible window unless you
+ * have very good reasons for doing so, as it will confuse and annoy the user.
+ *
+ * The window manager may put limits on what positions are allowed. GLFW
+ * cannot and should not override these limits.
+ *
+ * @param[in] window The window to query.
+ * @param[in] xpos The x-coordinate of the upper-left corner of the content area.
+ * @param[in] ypos The y-coordinate of the upper-left corner of the content area.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland There is no way for an application to set the global
+ * position of its windows, this function will always emit @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_pos
+ * @sa @ref glfwGetWindowPos
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
+
+/*! @brief Retrieves the size of the content area of the specified window.
+ *
+ * This function retrieves the size, in screen coordinates, of the content area
+ * of the specified window. If you wish to retrieve the size of the
+ * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.
+ *
+ * Any or all of the size arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` size arguments will be set to zero.
+ *
+ * @param[in] window The window whose size to retrieve.
+ * @param[out] width Where to store the width, in screen coordinates, of the
+ * content area, or `NULL`.
+ * @param[out] height Where to store the height, in screen coordinates, of the
+ * content area, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_size
+ * @sa @ref glfwSetWindowSize
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
+
+/*! @brief Sets the size limits of the specified window.
+ *
+ * This function sets the size limits of the content area of the specified
+ * window. If the window is full screen, the size limits only take effect
+ * once it is made windowed. If the window is not resizable, this function
+ * does nothing.
+ *
+ * The size limits are applied immediately to a windowed mode window and may
+ * cause it to be resized.
+ *
+ * The maximum dimensions must be greater than or equal to the minimum
+ * dimensions and all must be greater than or equal to zero.
+ *
+ * @param[in] window The window to set limits for.
+ * @param[in] minwidth The minimum width, in screen coordinates, of the content
+ * area, or `GLFW_DONT_CARE`.
+ * @param[in] minheight The minimum height, in screen coordinates, of the
+ * content area, or `GLFW_DONT_CARE`.
+ * @param[in] maxwidth The maximum width, in screen coordinates, of the content
+ * area, or `GLFW_DONT_CARE`.
+ * @param[in] maxheight The maximum height, in screen coordinates, of the
+ * content area, or `GLFW_DONT_CARE`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark If you set size limits and an aspect ratio that conflict, the
+ * results are undefined.
+ *
+ * @remark @wayland The size limits will not be applied until the window is
+ * actually resized, either by the user or by the compositor.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_sizelimits
+ * @sa @ref glfwSetWindowAspectRatio
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
+
+/*! @brief Sets the aspect ratio of the specified window.
+ *
+ * This function sets the required aspect ratio of the content area of the
+ * specified window. If the window is full screen, the aspect ratio only takes
+ * effect once it is made windowed. If the window is not resizable, this
+ * function does nothing.
+ *
+ * The aspect ratio is specified as a numerator and a denominator and both
+ * values must be greater than zero. For example, the common 16:9 aspect ratio
+ * is specified as 16 and 9, respectively.
+ *
+ * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect
+ * ratio limit is disabled.
+ *
+ * The aspect ratio is applied immediately to a windowed mode window and may
+ * cause it to be resized.
+ *
+ * @param[in] window The window to set limits for.
+ * @param[in] numer The numerator of the desired aspect ratio, or
+ * `GLFW_DONT_CARE`.
+ * @param[in] denom The denominator of the desired aspect ratio, or
+ * `GLFW_DONT_CARE`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark If you set size limits and an aspect ratio that conflict, the
+ * results are undefined.
+ *
+ * @remark @wayland The aspect ratio will not be applied until the window is
+ * actually resized, either by the user or by the compositor.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_sizelimits
+ * @sa @ref glfwSetWindowSizeLimits
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
+
+/*! @brief Sets the size of the content area of the specified window.
+ *
+ * This function sets the size, in screen coordinates, of the content area of
+ * the specified window.
+ *
+ * For full screen windows, this function updates the resolution of its desired
+ * video mode and switches to the video mode closest to it, without affecting
+ * the window's context. As the context is unaffected, the bit depths of the
+ * framebuffer remain unchanged.
+ *
+ * If you wish to update the refresh rate of the desired video mode in addition
+ * to its resolution, see @ref glfwSetWindowMonitor.
+ *
+ * The window manager may put limits on what sizes are allowed. GLFW cannot
+ * and should not override these limits.
+ *
+ * @param[in] window The window to resize.
+ * @param[in] width The desired width, in screen coordinates, of the window
+ * content area.
+ * @param[in] height The desired height, in screen coordinates, of the window
+ * content area.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland A full screen window will not attempt to change the mode,
+ * no matter what the requested size.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_size
+ * @sa @ref glfwGetWindowSize
+ * @sa @ref glfwSetWindowMonitor
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);
+
+/*! @brief Retrieves the size of the framebuffer of the specified window.
+ *
+ * This function retrieves the size, in pixels, of the framebuffer of the
+ * specified window. If you wish to retrieve the size of the window in screen
+ * coordinates, see @ref glfwGetWindowSize.
+ *
+ * Any or all of the size arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` size arguments will be set to zero.
+ *
+ * @param[in] window The window whose framebuffer to query.
+ * @param[out] width Where to store the width, in pixels, of the framebuffer,
+ * or `NULL`.
+ * @param[out] height Where to store the height, in pixels, of the framebuffer,
+ * or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_fbsize
+ * @sa @ref glfwSetFramebufferSizeCallback
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
+
+/*! @brief Retrieves the size of the frame of the window.
+ *
+ * This function retrieves the size, in screen coordinates, of each edge of the
+ * frame of the specified window. This size includes the title bar, if the
+ * window has one. The size of the frame may vary depending on the
+ * [window-related hints](@ref window_hints_wnd) used to create it.
+ *
+ * Because this function retrieves the size of each window frame edge and not
+ * the offset along a particular coordinate axis, the retrieved values will
+ * always be zero or positive.
+ *
+ * Any or all of the size arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` size arguments will be set to zero.
+ *
+ * @param[in] window The window whose frame size to query.
+ * @param[out] left Where to store the size, in screen coordinates, of the left
+ * edge of the window frame, or `NULL`.
+ * @param[out] top Where to store the size, in screen coordinates, of the top
+ * edge of the window frame, or `NULL`.
+ * @param[out] right Where to store the size, in screen coordinates, of the
+ * right edge of the window frame, or `NULL`.
+ * @param[out] bottom Where to store the size, in screen coordinates, of the
+ * bottom edge of the window frame, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_size
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
+
+/*! @brief Retrieves the content scale for the specified window.
+ *
+ * This function retrieves the content scale for the specified window. The
+ * content scale is the ratio between the current DPI and the platform's
+ * default DPI. This is especially important for text and any UI elements. If
+ * the pixel dimensions of your UI scaled by this look appropriate on your
+ * machine then it should appear at a reasonable size on other machines
+ * regardless of their DPI and scaling settings. This relies on the system DPI
+ * and scaling settings being somewhat correct.
+ *
+ * On systems where each monitors can have its own content scale, the window
+ * content scale will depend on which monitor the system considers the window
+ * to be on.
+ *
+ * @param[in] window The window to query.
+ * @param[out] xscale Where to store the x-axis content scale, or `NULL`.
+ * @param[out] yscale Where to store the y-axis content scale, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_scale
+ * @sa @ref glfwSetWindowContentScaleCallback
+ * @sa @ref glfwGetMonitorContentScale
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale);
+
+/*! @brief Returns the opacity of the whole window.
+ *
+ * This function returns the opacity of the window, including any decorations.
+ *
+ * The opacity (or alpha) value is a positive finite number between zero and
+ * one, where zero is fully transparent and one is fully opaque. If the system
+ * does not support whole window transparency, this function always returns one.
+ *
+ * The initial opacity value for newly created windows is one.
+ *
+ * @param[in] window The window to query.
+ * @return The opacity value of the specified window.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_transparency
+ * @sa @ref glfwSetWindowOpacity
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window);
+
+/*! @brief Sets the opacity of the whole window.
+ *
+ * This function sets the opacity of the window, including any decorations.
+ *
+ * The opacity (or alpha) value is a positive finite number between zero and
+ * one, where zero is fully transparent and one is fully opaque.
+ *
+ * The initial opacity value for newly created windows is one.
+ *
+ * A window created with framebuffer transparency may not use whole window
+ * transparency. The results of doing this are undefined.
+ *
+ * @param[in] window The window to set the opacity for.
+ * @param[in] opacity The desired opacity of the specified window.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_transparency
+ * @sa @ref glfwGetWindowOpacity
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity);
+
+/*! @brief Iconifies the specified window.
+ *
+ * This function iconifies (minimizes) the specified window if it was
+ * previously restored. If the window is already iconified, this function does
+ * nothing.
+ *
+ * If the specified window is a full screen window, the original monitor
+ * resolution is restored until the window is restored.
+ *
+ * @param[in] window The window to iconify.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland There is no concept of iconification in wl_shell, this
+ * function will emit @ref GLFW_PLATFORM_ERROR when using this deprecated
+ * protocol.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_iconify
+ * @sa @ref glfwRestoreWindow
+ * @sa @ref glfwMaximizeWindow
+ *
+ * @since Added in version 2.1.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwIconifyWindow(GLFWwindow* window);
+
+/*! @brief Restores the specified window.
+ *
+ * This function restores the specified window if it was previously iconified
+ * (minimized) or maximized. If the window is already restored, this function
+ * does nothing.
+ *
+ * If the specified window is a full screen window, the resolution chosen for
+ * the window is restored on the selected monitor.
+ *
+ * @param[in] window The window to restore.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_iconify
+ * @sa @ref glfwIconifyWindow
+ * @sa @ref glfwMaximizeWindow
+ *
+ * @since Added in version 2.1.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwRestoreWindow(GLFWwindow* window);
+
+/*! @brief Maximizes the specified window.
+ *
+ * This function maximizes the specified window if it was previously not
+ * maximized. If the window is already maximized, this function does nothing.
+ *
+ * If the specified window is a full screen window, this function does nothing.
+ *
+ * @param[in] window The window to maximize.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @par Thread Safety
+ * This function may only be called from the main thread.
+ *
+ * @sa @ref window_iconify
+ * @sa @ref glfwIconifyWindow
+ * @sa @ref glfwRestoreWindow
+ *
+ * @since Added in GLFW 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwMaximizeWindow(GLFWwindow* window);
+
+/*! @brief Makes the specified window visible.
+ *
+ * This function makes the specified window visible if it was previously
+ * hidden. If the window is already visible or is in full screen mode, this
+ * function does nothing.
+ *
+ * By default, windowed mode windows are focused when shown
+ * Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint
+ * to change this behavior for all newly created windows, or change the
+ * behavior for an existing window with @ref glfwSetWindowAttrib.
+ *
+ * @param[in] window The window to make visible.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_hide
+ * @sa @ref glfwHideWindow
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwShowWindow(GLFWwindow* window);
+
+/*! @brief Hides the specified window.
+ *
+ * This function hides the specified window if it was previously visible. If
+ * the window is already hidden or is in full screen mode, this function does
+ * nothing.
+ *
+ * @param[in] window The window to hide.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_hide
+ * @sa @ref glfwShowWindow
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwHideWindow(GLFWwindow* window);
+
+/*! @brief Brings the specified window to front and sets input focus.
+ *
+ * This function brings the specified window to front and sets input focus.
+ * The window should already be visible and not iconified.
+ *
+ * By default, both windowed and full screen mode windows are focused when
+ * initially created. Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to
+ * disable this behavior.
+ *
+ * Also by default, windowed mode windows are focused when shown
+ * with @ref glfwShowWindow. Set the
+ * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior.
+ *
+ * __Do not use this function__ to steal focus from other applications unless
+ * you are certain that is what the user wants. Focus stealing can be
+ * extremely disruptive.
+ *
+ * For a less disruptive way of getting the user's attention, see
+ * [attention requests](@ref window_attention).
+ *
+ * @param[in] window The window to give input focus.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland It is not possible for an application to bring its windows
+ * to front, this function will always emit @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_focus
+ * @sa @ref window_attention
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwFocusWindow(GLFWwindow* window);
+
+/*! @brief Requests user attention to the specified window.
+ *
+ * This function requests user attention to the specified window. On
+ * platforms where this is not supported, attention is requested to the
+ * application as a whole.
+ *
+ * Once the user has given attention, usually by focusing the window or
+ * application, the system will end the request automatically.
+ *
+ * @param[in] window The window to request attention to.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @macos Attention is requested to the application as a whole, not the
+ * specific window.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_attention
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwRequestWindowAttention(GLFWwindow* window);
+
+/*! @brief Returns the monitor that the window uses for full screen mode.
+ *
+ * This function returns the handle of the monitor that the specified window is
+ * in full screen on.
+ *
+ * @param[in] window The window to query.
+ * @return The monitor, or `NULL` if the window is in windowed mode or an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_monitor
+ * @sa @ref glfwSetWindowMonitor
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
+
+/*! @brief Sets the mode, monitor, video mode and placement of a window.
+ *
+ * This function sets the monitor that the window uses for full screen mode or,
+ * if the monitor is `NULL`, makes it windowed mode.
+ *
+ * When setting a monitor, this function updates the width, height and refresh
+ * rate of the desired video mode and switches to the video mode closest to it.
+ * The window position is ignored when setting a monitor.
+ *
+ * When the monitor is `NULL`, the position, width and height are used to
+ * place the window content area. The refresh rate is ignored when no monitor
+ * is specified.
+ *
+ * If you only wish to update the resolution of a full screen window or the
+ * size of a windowed mode window, see @ref glfwSetWindowSize.
+ *
+ * When a window transitions from full screen to windowed mode, this function
+ * restores any previous window settings such as whether it is decorated,
+ * floating, resizable, has size or aspect ratio limits, etc.
+ *
+ * @param[in] window The window whose monitor, size or video mode to set.
+ * @param[in] monitor The desired monitor, or `NULL` to set windowed mode.
+ * @param[in] xpos The desired x-coordinate of the upper-left corner of the
+ * content area.
+ * @param[in] ypos The desired y-coordinate of the upper-left corner of the
+ * content area.
+ * @param[in] width The desired with, in screen coordinates, of the content
+ * area or video mode.
+ * @param[in] height The desired height, in screen coordinates, of the content
+ * area or video mode.
+ * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode,
+ * or `GLFW_DONT_CARE`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise
+ * affected by any resizing or mode switching, although you may need to update
+ * your viewport if the framebuffer size has changed.
+ *
+ * @remark @wayland The desired window position is ignored, as there is no way
+ * for an application to set this property.
+ *
+ * @remark @wayland Setting the window to full screen will not attempt to
+ * change the mode, no matter what the requested size or refresh rate.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_monitor
+ * @sa @ref window_full_screen
+ * @sa @ref glfwGetWindowMonitor
+ * @sa @ref glfwSetWindowSize
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
+
+/*! @brief Returns an attribute of the specified window.
+ *
+ * This function returns the value of an attribute of the specified window or
+ * its OpenGL or OpenGL ES context.
+ *
+ * @param[in] window The window to query.
+ * @param[in] attrib The [window attribute](@ref window_attribs) whose value to
+ * return.
+ * @return The value of the attribute, or zero if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark Framebuffer related hints are not window attributes. See @ref
+ * window_attribs_fb for more information.
+ *
+ * @remark Zero is a valid value for many window and context related
+ * attributes so you cannot use a return value of zero as an indication of
+ * errors. However, this function should not fail as long as it is passed
+ * valid arguments and the library has been [initialized](@ref intro_init).
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_attribs
+ * @sa @ref glfwSetWindowAttrib
+ *
+ * @since Added in version 3.0. Replaces `glfwGetWindowParam` and
+ * `glfwGetGLVersion`.
+ *
+ * @ingroup window
+ */
+GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
+
+/*! @brief Sets an attribute of the specified window.
+ *
+ * This function sets the value of an attribute of the specified window.
+ *
+ * The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),
+ * [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),
+ * [GLFW_FLOATING](@ref GLFW_FLOATING_attrib),
+ * [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and
+ * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib).
+ *
+ * Some of these attributes are ignored for full screen windows. The new
+ * value will take effect if the window is later made windowed.
+ *
+ * Some of these attributes are ignored for windowed mode windows. The new
+ * value will take effect if the window is later made full screen.
+ *
+ * @param[in] window The window to set the attribute for.
+ * @param[in] attrib A supported window attribute.
+ * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark Calling @ref glfwGetWindowAttrib will always return the latest
+ * value, even if that value is ignored by the current mode of the window.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_attribs
+ * @sa @ref glfwGetWindowAttrib
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value);
+
+/*! @brief Sets the user pointer of the specified window.
+ *
+ * This function sets the user-defined pointer of the specified window. The
+ * current value is retained until the window is destroyed. The initial value
+ * is `NULL`.
+ *
+ * @param[in] window The window whose pointer to set.
+ * @param[in] pointer The new value.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref window_userptr
+ * @sa @ref glfwGetWindowUserPointer
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
+
+/*! @brief Returns the user pointer of the specified window.
+ *
+ * This function returns the current value of the user-defined pointer of the
+ * specified window. The initial value is `NULL`.
+ *
+ * @param[in] window The window whose pointer to return.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref window_userptr
+ * @sa @ref glfwSetWindowUserPointer
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
+
+/*! @brief Sets the position callback for the specified window.
+ *
+ * This function sets the position callback of the specified window, which is
+ * called when the window is moved. The callback is provided with the
+ * position, in screen coordinates, of the upper-left corner of the content
+ * area of the window.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int xpos, int ypos)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowposfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @remark @wayland This callback will never be called, as there is no way for
+ * an application to know its global position.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_pos
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback);
+
+/*! @brief Sets the size callback for the specified window.
+ *
+ * This function sets the size callback of the specified window, which is
+ * called when the window is resized. The callback is provided with the size,
+ * in screen coordinates, of the content area of the window.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int width, int height)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowsizefun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_size
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter and return value.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback);
+
+/*! @brief Sets the close callback for the specified window.
+ *
+ * This function sets the close callback of the specified window, which is
+ * called when the user attempts to close the window, for example by clicking
+ * the close widget in the title bar.
+ *
+ * The close flag is set before this callback is called, but you can modify it
+ * at any time with @ref glfwSetWindowShouldClose.
+ *
+ * The close callback is not triggered by @ref glfwDestroyWindow.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowclosefun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @remark @macos Selecting Quit from the application menu will trigger the
+ * close callback for all windows.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_close
+ *
+ * @since Added in version 2.5.
+ * @glfw3 Added window handle parameter and return value.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback);
+
+/*! @brief Sets the refresh callback for the specified window.
+ *
+ * This function sets the refresh callback of the specified window, which is
+ * called when the content area of the window needs to be redrawn, for example
+ * if the window has been exposed after having been covered by another window.
+ *
+ * On compositing window systems such as Aero, Compiz, Aqua or Wayland, where
+ * the window contents are saved off-screen, this callback may be called only
+ * very infrequently or never at all.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window);
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowrefreshfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_refresh
+ *
+ * @since Added in version 2.5.
+ * @glfw3 Added window handle parameter and return value.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback);
+
+/*! @brief Sets the focus callback for the specified window.
+ *
+ * This function sets the focus callback of the specified window, which is
+ * called when the window gains or loses input focus.
+ *
+ * After the focus callback is called for a window that lost input focus,
+ * synthetic key and mouse button release events will be generated for all such
+ * that had been pressed. For more information, see @ref glfwSetKeyCallback
+ * and @ref glfwSetMouseButtonCallback.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int focused)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowfocusfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_focus
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback);
+
+/*! @brief Sets the iconify callback for the specified window.
+ *
+ * This function sets the iconification callback of the specified window, which
+ * is called when the window is iconified or restored.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int iconified)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowiconifyfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @remark @wayland The wl_shell protocol has no concept of iconification,
+ * this callback will never be called when using this deprecated protocol.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_iconify
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback);
+
+/*! @brief Sets the maximize callback for the specified window.
+ *
+ * This function sets the maximization callback of the specified window, which
+ * is called when the window is maximized or restored.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int maximized)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowmaximizefun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_maximize
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback);
+
+/*! @brief Sets the framebuffer resize callback for the specified window.
+ *
+ * This function sets the framebuffer resize callback of the specified window,
+ * which is called when the framebuffer of the specified window is resized.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int width, int height)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWframebuffersizefun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_fbsize
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback);
+
+/*! @brief Sets the window content scale callback for the specified window.
+ *
+ * This function sets the window content scale callback of the specified window,
+ * which is called when the content scale of the specified window changes.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, float xscale, float yscale)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWwindowcontentscalefun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref window_scale
+ * @sa @ref glfwGetWindowContentScale
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup window
+ */
+GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback);
+
+/*! @brief Processes all pending events.
+ *
+ * This function processes only those events that are already in the event
+ * queue and then returns immediately. Processing events will cause the window
+ * and input callbacks associated with those events to be called.
+ *
+ * On some platforms, a window move, resize or menu operation will cause event
+ * processing to block. This is due to how event processing is designed on
+ * those platforms. You can use the
+ * [window refresh callback](@ref window_refresh) to redraw the contents of
+ * your window when necessary during such operations.
+ *
+ * Do not assume that callbacks you set will _only_ be called in response to
+ * event processing functions like this one. While it is necessary to poll for
+ * events, window systems that require GLFW to register callbacks of its own
+ * can pass events to GLFW in response to many window system function calls.
+ * GLFW will pass those events on to the application callbacks before
+ * returning.
+ *
+ * Event processing is not required for joystick input to work.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @reentrancy This function must not be called from a callback.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref events
+ * @sa @ref glfwWaitEvents
+ * @sa @ref glfwWaitEventsTimeout
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwPollEvents(void);
+
+/*! @brief Waits until events are queued and processes them.
+ *
+ * This function puts the calling thread to sleep until at least one event is
+ * available in the event queue. Once one or more events are available,
+ * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue
+ * are processed and the function then returns immediately. Processing events
+ * will cause the window and input callbacks associated with those events to be
+ * called.
+ *
+ * Since not all events are associated with callbacks, this function may return
+ * without a callback having been called even if you are monitoring all
+ * callbacks.
+ *
+ * On some platforms, a window move, resize or menu operation will cause event
+ * processing to block. This is due to how event processing is designed on
+ * those platforms. You can use the
+ * [window refresh callback](@ref window_refresh) to redraw the contents of
+ * your window when necessary during such operations.
+ *
+ * Do not assume that callbacks you set will _only_ be called in response to
+ * event processing functions like this one. While it is necessary to poll for
+ * events, window systems that require GLFW to register callbacks of its own
+ * can pass events to GLFW in response to many window system function calls.
+ * GLFW will pass those events on to the application callbacks before
+ * returning.
+ *
+ * Event processing is not required for joystick input to work.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @reentrancy This function must not be called from a callback.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref events
+ * @sa @ref glfwPollEvents
+ * @sa @ref glfwWaitEventsTimeout
+ *
+ * @since Added in version 2.5.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwWaitEvents(void);
+
+/*! @brief Waits with timeout until events are queued and processes them.
+ *
+ * This function puts the calling thread to sleep until at least one event is
+ * available in the event queue, or until the specified timeout is reached. If
+ * one or more events are available, it behaves exactly like @ref
+ * glfwPollEvents, i.e. the events in the queue are processed and the function
+ * then returns immediately. Processing events will cause the window and input
+ * callbacks associated with those events to be called.
+ *
+ * The timeout value must be a positive finite number.
+ *
+ * Since not all events are associated with callbacks, this function may return
+ * without a callback having been called even if you are monitoring all
+ * callbacks.
+ *
+ * On some platforms, a window move, resize or menu operation will cause event
+ * processing to block. This is due to how event processing is designed on
+ * those platforms. You can use the
+ * [window refresh callback](@ref window_refresh) to redraw the contents of
+ * your window when necessary during such operations.
+ *
+ * Do not assume that callbacks you set will _only_ be called in response to
+ * event processing functions like this one. While it is necessary to poll for
+ * events, window systems that require GLFW to register callbacks of its own
+ * can pass events to GLFW in response to many window system function calls.
+ * GLFW will pass those events on to the application callbacks before
+ * returning.
+ *
+ * Event processing is not required for joystick input to work.
+ *
+ * @param[in] timeout The maximum amount of time, in seconds, to wait.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @reentrancy This function must not be called from a callback.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref events
+ * @sa @ref glfwPollEvents
+ * @sa @ref glfwWaitEvents
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwWaitEventsTimeout(double timeout);
+
+/*! @brief Posts an empty event to the event queue.
+ *
+ * This function posts an empty event from the current thread to the event
+ * queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref events
+ * @sa @ref glfwWaitEvents
+ * @sa @ref glfwWaitEventsTimeout
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwPostEmptyEvent(void);
+
+/*! @brief Returns the value of an input option for the specified window.
+ *
+ * This function returns the value of an input option for the specified window.
+ * The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,
+ * @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
+ * @ref GLFW_RAW_MOUSE_MOTION.
+ *
+ * @param[in] window The window to query.
+ * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
+ * `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or
+ * `GLFW_RAW_MOUSE_MOTION`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref glfwSetInputMode
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
+
+/*! @brief Sets an input option for the specified window.
+ *
+ * This function sets an input mode option for the specified window. The mode
+ * must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,
+ * @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or
+ * @ref GLFW_RAW_MOUSE_MOTION.
+ *
+ * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
+ * modes:
+ * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.
+ * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the
+ * content area of the window but does not restrict the cursor from leaving.
+ * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual
+ * and unlimited cursor movement. This is useful for implementing for
+ * example 3D camera controls.
+ *
+ * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to
+ * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are
+ * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS`
+ * the next time it is called even if the key had been released before the
+ * call. This is useful when you are only interested in whether keys have been
+ * pressed but not when or in which order.
+ *
+ * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either
+ * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it.
+ * If sticky mouse buttons are enabled, a mouse button press will ensure that
+ * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even
+ * if the mouse button had been released before the call. This is useful when
+ * you are only interested in whether mouse buttons have been pressed but not
+ * when or in which order.
+ *
+ * If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to
+ * enable lock key modifier bits, or `GLFW_FALSE` to disable them. If enabled,
+ * callbacks that receive modifier bits will also have the @ref
+ * GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on,
+ * and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on.
+ *
+ * If the mode is `GLFW_RAW_MOUSE_MOTION`, the value must be either `GLFW_TRUE`
+ * to enable raw (unscaled and unaccelerated) mouse motion when the cursor is
+ * disabled, or `GLFW_FALSE` to disable it. If raw motion is not supported,
+ * attempting to set this will emit @ref GLFW_PLATFORM_ERROR. Call @ref
+ * glfwRawMouseMotionSupported to check for support.
+ *
+ * @param[in] window The window whose input mode to set.
+ * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,
+ * `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or
+ * `GLFW_RAW_MOUSE_MOTION`.
+ * @param[in] value The new value of the specified input mode.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref glfwGetInputMode
+ *
+ * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
+
+/*! @brief Returns whether raw mouse motion is supported.
+ *
+ * This function returns whether raw mouse motion is supported on the current
+ * system. This status does not change after GLFW has been initialized so you
+ * only need to check this once. If you attempt to enable raw motion on
+ * a system that does not support it, @ref GLFW_PLATFORM_ERROR will be emitted.
+ *
+ * Raw mouse motion is closer to the actual motion of the mouse across
+ * a surface. It is not affected by the scaling and acceleration applied to
+ * the motion of the desktop cursor. That processing is suitable for a cursor
+ * while raw motion is better for controlling for example a 3D camera. Because
+ * of this, raw mouse motion is only provided when the cursor is disabled.
+ *
+ * @return `GLFW_TRUE` if raw mouse motion is supported on the current machine,
+ * or `GLFW_FALSE` otherwise.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref raw_mouse_motion
+ * @sa @ref glfwSetInputMode
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwRawMouseMotionSupported(void);
+
+/*! @brief Returns the layout-specific name of the specified printable key.
+ *
+ * This function returns the name of the specified printable key, encoded as
+ * UTF-8. This is typically the character that key would produce without any
+ * modifier keys, intended for displaying key bindings to the user. For dead
+ * keys, it is typically the diacritic it would add to a character.
+ *
+ * __Do not use this function__ for [text input](@ref input_char). You will
+ * break text input for many languages even if it happens to work for yours.
+ *
+ * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key,
+ * otherwise the scancode is ignored. If you specify a non-printable key, or
+ * `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this
+ * function returns `NULL` but does not emit an error.
+ *
+ * This behavior allows you to always pass in the arguments in the
+ * [key callback](@ref input_key) without modification.
+ *
+ * The printable keys are:
+ * - `GLFW_KEY_APOSTROPHE`
+ * - `GLFW_KEY_COMMA`
+ * - `GLFW_KEY_MINUS`
+ * - `GLFW_KEY_PERIOD`
+ * - `GLFW_KEY_SLASH`
+ * - `GLFW_KEY_SEMICOLON`
+ * - `GLFW_KEY_EQUAL`
+ * - `GLFW_KEY_LEFT_BRACKET`
+ * - `GLFW_KEY_RIGHT_BRACKET`
+ * - `GLFW_KEY_BACKSLASH`
+ * - `GLFW_KEY_WORLD_1`
+ * - `GLFW_KEY_WORLD_2`
+ * - `GLFW_KEY_0` to `GLFW_KEY_9`
+ * - `GLFW_KEY_A` to `GLFW_KEY_Z`
+ * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9`
+ * - `GLFW_KEY_KP_DECIMAL`
+ * - `GLFW_KEY_KP_DIVIDE`
+ * - `GLFW_KEY_KP_MULTIPLY`
+ * - `GLFW_KEY_KP_SUBTRACT`
+ * - `GLFW_KEY_KP_ADD`
+ * - `GLFW_KEY_KP_EQUAL`
+ *
+ * Names for printable keys depend on keyboard layout, while names for
+ * non-printable keys are the same across layouts but depend on the application
+ * language and should be localized along with other user interface text.
+ *
+ * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`.
+ * @param[in] scancode The scancode of the key to query.
+ * @return The UTF-8 encoded, layout-specific name of the key, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark The contents of the returned string may change when a keyboard
+ * layout change event is received.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_key_name
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup input
+ */
+GLFWAPI const char* glfwGetKeyName(int key, int scancode);
+
+/*! @brief Returns the platform-specific scancode of the specified key.
+ *
+ * This function returns the platform-specific scancode of the specified key.
+ *
+ * If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this
+ * method will return `-1`.
+ *
+ * @param[in] key Any [named key](@ref keys).
+ * @return The platform-specific scancode for the key, or `-1` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref input_key
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwGetKeyScancode(int key);
+
+/*! @brief Returns the last reported state of a keyboard key for the specified
+ * window.
+ *
+ * This function returns the last state reported for the specified key to the
+ * specified window. The returned state is one of `GLFW_PRESS` or
+ * `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to
+ * the key callback.
+ *
+ * If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns
+ * `GLFW_PRESS` the first time you call it for a key that was pressed, even if
+ * that key has already been released.
+ *
+ * The key functions deal with physical keys, with [key tokens](@ref keys)
+ * named after their use on the standard US keyboard layout. If you want to
+ * input text, use the Unicode character callback instead.
+ *
+ * The [modifier key bit masks](@ref mods) are not key tokens and cannot be
+ * used with this function.
+ *
+ * __Do not use this function__ to implement [text input](@ref input_char).
+ *
+ * @param[in] window The desired window.
+ * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is
+ * not a valid key for this function.
+ * @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_key
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
+
+/*! @brief Returns the last reported state of a mouse button for the specified
+ * window.
+ *
+ * This function returns the last state reported for the specified mouse button
+ * to the specified window. The returned state is one of `GLFW_PRESS` or
+ * `GLFW_RELEASE`.
+ *
+ * If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function
+ * returns `GLFW_PRESS` the first time you call it for a mouse button that was
+ * pressed, even if that mouse button has already been released.
+ *
+ * @param[in] window The desired window.
+ * @param[in] button The desired [mouse button](@ref buttons).
+ * @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_mouse_button
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
+
+/*! @brief Retrieves the position of the cursor relative to the content area of
+ * the window.
+ *
+ * This function returns the position of the cursor, in screen coordinates,
+ * relative to the upper-left corner of the content area of the specified
+ * window.
+ *
+ * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor
+ * position is unbounded and limited only by the minimum and maximum values of
+ * a `double`.
+ *
+ * The coordinate can be converted to their integer equivalents with the
+ * `floor` function. Casting directly to an integer type works for positive
+ * coordinates, but fails for negative ones.
+ *
+ * Any or all of the position arguments may be `NULL`. If an error occurs, all
+ * non-`NULL` position arguments will be set to zero.
+ *
+ * @param[in] window The desired window.
+ * @param[out] xpos Where to store the cursor x-coordinate, relative to the
+ * left edge of the content area, or `NULL`.
+ * @param[out] ypos Where to store the cursor y-coordinate, relative to the to
+ * top edge of the content area, or `NULL`.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_pos
+ * @sa @ref glfwSetCursorPos
+ *
+ * @since Added in version 3.0. Replaces `glfwGetMousePos`.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
+
+/*! @brief Sets the position of the cursor, relative to the content area of the
+ * window.
+ *
+ * This function sets the position, in screen coordinates, of the cursor
+ * relative to the upper-left corner of the content area of the specified
+ * window. The window must have input focus. If the window does not have
+ * input focus when this function is called, it fails silently.
+ *
+ * __Do not use this function__ to implement things like camera controls. GLFW
+ * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the
+ * cursor, transparently re-centers it and provides unconstrained cursor
+ * motion. See @ref glfwSetInputMode for more information.
+ *
+ * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is
+ * unconstrained and limited only by the minimum and maximum values of
+ * a `double`.
+ *
+ * @param[in] window The desired window.
+ * @param[in] xpos The desired x-coordinate, relative to the left edge of the
+ * content area.
+ * @param[in] ypos The desired y-coordinate, relative to the top edge of the
+ * content area.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @remark @wayland This function will only work when the cursor mode is
+ * `GLFW_CURSOR_DISABLED`, otherwise it will do nothing.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_pos
+ * @sa @ref glfwGetCursorPos
+ *
+ * @since Added in version 3.0. Replaces `glfwSetMousePos`.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
+
+/*! @brief Creates a custom cursor.
+ *
+ * Creates a new custom cursor image that can be set for a window with @ref
+ * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor.
+ * Any remaining cursors are destroyed by @ref glfwTerminate.
+ *
+ * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
+ * bits per channel with the red channel first. They are arranged canonically
+ * as packed sequential rows, starting from the top-left corner.
+ *
+ * The cursor hotspot is specified in pixels, relative to the upper-left corner
+ * of the cursor image. Like all other coordinate systems in GLFW, the X-axis
+ * points to the right and the Y-axis points down.
+ *
+ * @param[in] image The desired cursor image.
+ * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot.
+ * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot.
+ * @return The handle of the created cursor, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The specified image data is copied before this function
+ * returns.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_object
+ * @sa @ref glfwDestroyCursor
+ * @sa @ref glfwCreateStandardCursor
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot);
+
+/*! @brief Creates a cursor with a standard shape.
+ *
+ * Returns a cursor with a [standard shape](@ref shapes), that can be set for
+ * a window with @ref glfwSetCursor.
+ *
+ * @param[in] shape One of the [standard shapes](@ref shapes).
+ * @return A new cursor ready to use or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_object
+ * @sa @ref glfwCreateCursor
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape);
+
+/*! @brief Destroys a cursor.
+ *
+ * This function destroys a cursor previously created with @ref
+ * glfwCreateCursor. Any remaining cursors will be destroyed by @ref
+ * glfwTerminate.
+ *
+ * If the specified cursor is current for any window, that window will be
+ * reverted to the default cursor. This does not affect the cursor mode.
+ *
+ * @param[in] cursor The cursor object to destroy.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @reentrancy This function must not be called from a callback.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_object
+ * @sa @ref glfwCreateCursor
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor);
+
+/*! @brief Sets the cursor for the window.
+ *
+ * This function sets the cursor image to be used when the cursor is over the
+ * content area of the specified window. The set cursor will only be visible
+ * when the [cursor mode](@ref cursor_mode) of the window is
+ * `GLFW_CURSOR_NORMAL`.
+ *
+ * On some platforms, the set cursor may not be visible unless the window also
+ * has input focus.
+ *
+ * @param[in] window The window to set the cursor for.
+ * @param[in] cursor The cursor to set, or `NULL` to switch back to the default
+ * arrow cursor.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_object
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
+
+/*! @brief Sets the key callback.
+ *
+ * This function sets the key callback of the specified window, which is called
+ * when a key is pressed, repeated or released.
+ *
+ * The key functions deal with physical keys, with layout independent
+ * [key tokens](@ref keys) named after their values in the standard US keyboard
+ * layout. If you want to input text, use the
+ * [character callback](@ref glfwSetCharCallback) instead.
+ *
+ * When a window loses input focus, it will generate synthetic key release
+ * events for all pressed keys. You can tell these events from user-generated
+ * events by the fact that the synthetic ones are generated after the focus
+ * loss event has been processed, i.e. after the
+ * [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
+ *
+ * The scancode of a key is specific to that platform or sometimes even to that
+ * machine. Scancodes are intended to allow users to bind keys that don't have
+ * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their
+ * state is not saved and so it cannot be queried with @ref glfwGetKey.
+ *
+ * Sometimes GLFW needs to generate synthetic key events, in which case the
+ * scancode may be zero.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new key callback, or `NULL` to remove the currently
+ * set callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWkeyfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_key
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter and return value.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback);
+
+/*! @brief Sets the Unicode character callback.
+ *
+ * This function sets the character callback of the specified window, which is
+ * called when a Unicode character is input.
+ *
+ * The character callback is intended for Unicode text input. As it deals with
+ * characters, it is keyboard layout dependent, whereas the
+ * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1
+ * to physical keys, as a key may produce zero, one or more characters. If you
+ * want to know whether a specific physical key was pressed or released, see
+ * the key callback instead.
+ *
+ * The character callback behaves as system text input normally does and will
+ * not be called if modifier keys are held down that would prevent normal text
+ * input on that platform, for example a Super (Command) key on macOS or Alt key
+ * on Windows.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, unsigned int codepoint)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWcharfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_char
+ *
+ * @since Added in version 2.4.
+ * @glfw3 Added window handle parameter and return value.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback);
+
+/*! @brief Sets the Unicode character with modifiers callback.
+ *
+ * This function sets the character with modifiers callback of the specified
+ * window, which is called when a Unicode character is input regardless of what
+ * modifier keys are used.
+ *
+ * The character with modifiers callback is intended for implementing custom
+ * Unicode character input. For regular Unicode text input, see the
+ * [character callback](@ref glfwSetCharCallback). Like the character
+ * callback, the character with modifiers callback deals with characters and is
+ * keyboard layout dependent. Characters do not map 1:1 to physical keys, as
+ * a key may produce zero, one or more characters. If you want to know whether
+ * a specific physical key was pressed or released, see the
+ * [key callback](@ref glfwSetKeyCallback) instead.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or an
+ * [error](@ref error_handling) occurred.
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWcharmodsfun).
+ *
+ * @deprecated Scheduled for removal in version 4.0.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_char
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback);
+
+/*! @brief Sets the mouse button callback.
+ *
+ * This function sets the mouse button callback of the specified window, which
+ * is called when a mouse button is pressed or released.
+ *
+ * When a window loses input focus, it will generate synthetic mouse button
+ * release events for all pressed mouse buttons. You can tell these events
+ * from user-generated events by the fact that the synthetic ones are generated
+ * after the focus loss event has been processed, i.e. after the
+ * [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int button, int action, int mods)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWmousebuttonfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref input_mouse_button
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter and return value.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
+
+/*! @brief Sets the cursor position callback.
+ *
+ * This function sets the cursor position callback of the specified window,
+ * which is called when the cursor is moved. The callback is provided with the
+ * position, in screen coordinates, relative to the upper-left corner of the
+ * content area of the window.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, double xpos, double ypos);
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWcursorposfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_pos
+ *
+ * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
+
+/*! @brief Sets the cursor enter/leave callback.
+ *
+ * This function sets the cursor boundary crossing callback of the specified
+ * window, which is called when the cursor enters or leaves the content area of
+ * the window.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int entered)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWcursorenterfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref cursor_enter
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback);
+
+/*! @brief Sets the scroll callback.
+ *
+ * This function sets the scroll callback of the specified window, which is
+ * called when a scrolling device is used, such as a mouse wheel or scrolling
+ * area of a touchpad.
+ *
+ * The scroll callback receives all scrolling input, like that from a mouse
+ * wheel or a touchpad scrolling area.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new scroll callback, or `NULL` to remove the
+ * currently set callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, double xoffset, double yoffset)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWscrollfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref scrolling
+ *
+ * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
+
+/*! @brief Sets the path drop callback.
+ *
+ * This function sets the path drop callback of the specified window, which is
+ * called when one or more dragged paths are dropped on the window.
+ *
+ * Because the path array and its strings may have been generated specifically
+ * for that event, they are not guaranteed to be valid after the callback has
+ * returned. If you wish to use them after the callback returns, you need to
+ * make a deep copy.
+ *
+ * @param[in] window The window whose callback to set.
+ * @param[in] callback The new file drop callback, or `NULL` to remove the
+ * currently set callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(GLFWwindow* window, int path_count, const char* paths[])
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWdropfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @remark @wayland File drop is currently unimplemented.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref path_drop
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback);
+
+/*! @brief Returns whether the specified joystick is present.
+ *
+ * This function returns whether the specified joystick is present.
+ *
+ * There is no need to call this function before other functions that accept
+ * a joystick ID, as they all check for presence before performing any other
+ * work.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref joystick
+ *
+ * @since Added in version 3.0. Replaces `glfwGetJoystickParam`.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwJoystickPresent(int jid);
+
+/*! @brief Returns the values of all axes of the specified joystick.
+ *
+ * This function returns the values of all axes of the specified joystick.
+ * Each element in the array is a value between -1.0 and 1.0.
+ *
+ * If the specified joystick is not present this function will return `NULL`
+ * but will not generate an error. This can be used instead of first calling
+ * @ref glfwJoystickPresent.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @param[out] count Where to store the number of axis values in the returned
+ * array. This is set to zero if the joystick is not present or an error
+ * occurred.
+ * @return An array of axis values, or `NULL` if the joystick is not present or
+ * an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified joystick is
+ * disconnected or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref joystick_axis
+ *
+ * @since Added in version 3.0. Replaces `glfwGetJoystickPos`.
+ *
+ * @ingroup input
+ */
+GLFWAPI const float* glfwGetJoystickAxes(int jid, int* count);
+
+/*! @brief Returns the state of all buttons of the specified joystick.
+ *
+ * This function returns the state of all buttons of the specified joystick.
+ * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`.
+ *
+ * For backward compatibility with earlier versions that did not have @ref
+ * glfwGetJoystickHats, the button array also includes all hats, each
+ * represented as four buttons. The hats are in the same order as returned by
+ * __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and
+ * _left_. To disable these extra buttons, set the @ref
+ * GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization.
+ *
+ * If the specified joystick is not present this function will return `NULL`
+ * but will not generate an error. This can be used instead of first calling
+ * @ref glfwJoystickPresent.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @param[out] count Where to store the number of button states in the returned
+ * array. This is set to zero if the joystick is not present or an error
+ * occurred.
+ * @return An array of button states, or `NULL` if the joystick is not present
+ * or an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified joystick is
+ * disconnected or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref joystick_button
+ *
+ * @since Added in version 2.2.
+ * @glfw3 Changed to return a dynamic array.
+ *
+ * @ingroup input
+ */
+GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count);
+
+/*! @brief Returns the state of all hats of the specified joystick.
+ *
+ * This function returns the state of all hats of the specified joystick.
+ * Each element in the array is one of the following values:
+ *
+ * Name | Value
+ * ---- | -----
+ * `GLFW_HAT_CENTERED` | 0
+ * `GLFW_HAT_UP` | 1
+ * `GLFW_HAT_RIGHT` | 2
+ * `GLFW_HAT_DOWN` | 4
+ * `GLFW_HAT_LEFT` | 8
+ * `GLFW_HAT_RIGHT_UP` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_UP`
+ * `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_DOWN`
+ * `GLFW_HAT_LEFT_UP` | `GLFW_HAT_LEFT` \| `GLFW_HAT_UP`
+ * `GLFW_HAT_LEFT_DOWN` | `GLFW_HAT_LEFT` \| `GLFW_HAT_DOWN`
+ *
+ * The diagonal directions are bitwise combinations of the primary (up, right,
+ * down and left) directions and you can test for these individually by ANDing
+ * it with the corresponding direction.
+ *
+ * @code
+ * if (hats[2] & GLFW_HAT_RIGHT)
+ * {
+ * // State of hat 2 could be right-up, right or right-down
+ * }
+ * @endcode
+ *
+ * If the specified joystick is not present this function will return `NULL`
+ * but will not generate an error. This can be used instead of first calling
+ * @ref glfwJoystickPresent.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @param[out] count Where to store the number of hat states in the returned
+ * array. This is set to zero if the joystick is not present or an error
+ * occurred.
+ * @return An array of hat states, or `NULL` if the joystick is not present
+ * or an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified joystick is
+ * disconnected, this function is called again for that joystick or the library
+ * is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref joystick_hat
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count);
+
+/*! @brief Returns the name of the specified joystick.
+ *
+ * This function returns the name, encoded as UTF-8, of the specified joystick.
+ * The returned string is allocated and freed by GLFW. You should not free it
+ * yourself.
+ *
+ * If the specified joystick is not present this function will return `NULL`
+ * but will not generate an error. This can be used instead of first calling
+ * @ref glfwJoystickPresent.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick
+ * is not present or an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified joystick is
+ * disconnected or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref joystick_name
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup input
+ */
+GLFWAPI const char* glfwGetJoystickName(int jid);
+
+/*! @brief Returns the SDL compatible GUID of the specified joystick.
+ *
+ * This function returns the SDL compatible GUID, as a UTF-8 encoded
+ * hexadecimal string, of the specified joystick. The returned string is
+ * allocated and freed by GLFW. You should not free it yourself.
+ *
+ * The GUID is what connects a joystick to a gamepad mapping. A connected
+ * joystick will always have a GUID even if there is no gamepad mapping
+ * assigned to it.
+ *
+ * If the specified joystick is not present this function will return `NULL`
+ * but will not generate an error. This can be used instead of first calling
+ * @ref glfwJoystickPresent.
+ *
+ * The GUID uses the format introduced in SDL 2.0.5. This GUID tries to
+ * uniquely identify the make and model of a joystick but does not identify
+ * a specific unit, e.g. all wired Xbox 360 controllers will have the same
+ * GUID on that platform. The GUID for a unit may vary between platforms
+ * depending on what hardware information the platform specific APIs provide.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick
+ * is not present or an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified joystick is
+ * disconnected or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref gamepad
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI const char* glfwGetJoystickGUID(int jid);
+
+/*! @brief Sets the user pointer of the specified joystick.
+ *
+ * This function sets the user-defined pointer of the specified joystick. The
+ * current value is retained until the joystick is disconnected. The initial
+ * value is `NULL`.
+ *
+ * This function may be called from the joystick callback, even for a joystick
+ * that is being disconnected.
+ *
+ * @param[in] jid The joystick whose pointer to set.
+ * @param[in] pointer The new value.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref joystick_userptr
+ * @sa @ref glfwGetJoystickUserPointer
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer);
+
+/*! @brief Returns the user pointer of the specified joystick.
+ *
+ * This function returns the current value of the user-defined pointer of the
+ * specified joystick. The initial value is `NULL`.
+ *
+ * This function may be called from the joystick callback, even for a joystick
+ * that is being disconnected.
+ *
+ * @param[in] jid The joystick whose pointer to return.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @sa @ref joystick_userptr
+ * @sa @ref glfwSetJoystickUserPointer
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI void* glfwGetJoystickUserPointer(int jid);
+
+/*! @brief Returns whether the specified joystick has a gamepad mapping.
+ *
+ * This function returns whether the specified joystick is both present and has
+ * a gamepad mapping.
+ *
+ * If the specified joystick is present but does not have a gamepad mapping
+ * this function will return `GLFW_FALSE` but will not generate an error. Call
+ * @ref glfwJoystickPresent to check if a joystick is present regardless of
+ * whether it has a mapping.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping,
+ * or `GLFW_FALSE` otherwise.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref gamepad
+ * @sa @ref glfwGetGamepadState
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwJoystickIsGamepad(int jid);
+
+/*! @brief Sets the joystick configuration callback.
+ *
+ * This function sets the joystick configuration callback, or removes the
+ * currently set callback. This is called when a joystick is connected to or
+ * disconnected from the system.
+ *
+ * For joystick connection and disconnection events to be delivered on all
+ * platforms, you need to call one of the [event processing](@ref events)
+ * functions. Joystick disconnection may also be detected and the callback
+ * called by joystick functions. The function will then return whatever it
+ * returns if the joystick is not present.
+ *
+ * @param[in] callback The new callback, or `NULL` to remove the currently set
+ * callback.
+ * @return The previously set callback, or `NULL` if no callback was set or the
+ * library had not been [initialized](@ref intro_init).
+ *
+ * @callback_signature
+ * @code
+ * void function_name(int jid, int event)
+ * @endcode
+ * For more information about the callback parameters, see the
+ * [function pointer type](@ref GLFWjoystickfun).
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref joystick_event
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup input
+ */
+GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
+
+/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings.
+ *
+ * This function parses the specified ASCII encoded string and updates the
+ * internal list with any gamepad mappings it finds. This string may
+ * contain either a single gamepad mapping or many mappings separated by
+ * newlines. The parser supports the full format of the `gamecontrollerdb.txt`
+ * source file including empty lines and comments.
+ *
+ * See @ref gamepad_mapping for a description of the format.
+ *
+ * If there is already a gamepad mapping for a given GUID in the internal list,
+ * it will be replaced by the one passed to this function. If the library is
+ * terminated and re-initialized the internal list will revert to the built-in
+ * default.
+ *
+ * @param[in] string The string containing the gamepad mappings.
+ * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_VALUE.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref gamepad
+ * @sa @ref glfwJoystickIsGamepad
+ * @sa @ref glfwGetGamepadName
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwUpdateGamepadMappings(const char* string);
+
+/*! @brief Returns the human-readable gamepad name for the specified joystick.
+ *
+ * This function returns the human-readable name of the gamepad from the
+ * gamepad mapping assigned to the specified joystick.
+ *
+ * If the specified joystick is not present or does not have a gamepad mapping
+ * this function will return `NULL` but will not generate an error. Call
+ * @ref glfwJoystickPresent to check whether it is present regardless of
+ * whether it has a mapping.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @return The UTF-8 encoded name of the gamepad, or `NULL` if the
+ * joystick is not present, does not have a mapping or an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_ENUM.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the specified joystick is
+ * disconnected, the gamepad mappings are updated or the library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref gamepad
+ * @sa @ref glfwJoystickIsGamepad
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI const char* glfwGetGamepadName(int jid);
+
+/*! @brief Retrieves the state of the specified joystick remapped as a gamepad.
+ *
+ * This function retrieves the state of the specified joystick remapped to
+ * an Xbox-like gamepad.
+ *
+ * If the specified joystick is not present or does not have a gamepad mapping
+ * this function will return `GLFW_FALSE` but will not generate an error. Call
+ * @ref glfwJoystickPresent to check whether it is present regardless of
+ * whether it has a mapping.
+ *
+ * The Guide button may not be available for input as it is often hooked by the
+ * system or the Steam client.
+ *
+ * Not all devices have all the buttons or axes provided by @ref
+ * GLFWgamepadstate. Unavailable buttons and axes will always report
+ * `GLFW_RELEASE` and 0.0 respectively.
+ *
+ * @param[in] jid The [joystick](@ref joysticks) to query.
+ * @param[out] state The gamepad input state of the joystick.
+ * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is
+ * connected, it has no gamepad mapping or an [error](@ref error_handling)
+ * occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_ENUM.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref gamepad
+ * @sa @ref glfwUpdateGamepadMappings
+ * @sa @ref glfwJoystickIsGamepad
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup input
+ */
+GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
+
+/*! @brief Sets the clipboard to the specified string.
+ *
+ * This function sets the system clipboard to the specified, UTF-8 encoded
+ * string.
+ *
+ * @param[in] window Deprecated. Any valid window or `NULL`.
+ * @param[in] string A UTF-8 encoded string.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The specified string is copied before this function
+ * returns.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref clipboard
+ * @sa @ref glfwGetClipboardString
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);
+
+/*! @brief Returns the contents of the clipboard as a string.
+ *
+ * This function returns the contents of the system clipboard, if it contains
+ * or is convertible to a UTF-8 encoded string. If the clipboard is empty or
+ * if its contents cannot be converted, `NULL` is returned and a @ref
+ * GLFW_FORMAT_UNAVAILABLE error is generated.
+ *
+ * @param[in] window Deprecated. Any valid window or `NULL`.
+ * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL`
+ * if an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_FORMAT_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the next call to @ref
+ * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library
+ * is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref clipboard
+ * @sa @ref glfwSetClipboardString
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup input
+ */
+GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
+
+/*! @brief Returns the GLFW time.
+ *
+ * This function returns the current GLFW time, in seconds. Unless the time
+ * has been set using @ref glfwSetTime it measures time elapsed since GLFW was
+ * initialized.
+ *
+ * This function and @ref glfwSetTime are helper functions on top of @ref
+ * glfwGetTimerFrequency and @ref glfwGetTimerValue.
+ *
+ * The resolution of the timer is system dependent, but is usually on the order
+ * of a few micro- or nanoseconds. It uses the highest-resolution monotonic
+ * time source on each supported platform.
+ *
+ * @return The current time, in seconds, or zero if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Reading and
+ * writing of the internal base time is not atomic, so it needs to be
+ * externally synchronized with calls to @ref glfwSetTime.
+ *
+ * @sa @ref time
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup input
+ */
+GLFWAPI double glfwGetTime(void);
+
+/*! @brief Sets the GLFW time.
+ *
+ * This function sets the current GLFW time, in seconds. The value must be
+ * a positive finite number less than or equal to 18446744073.0, which is
+ * approximately 584.5 years.
+ *
+ * This function and @ref glfwGetTime are helper functions on top of @ref
+ * glfwGetTimerFrequency and @ref glfwGetTimerValue.
+ *
+ * @param[in] time The new value, in seconds.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_INVALID_VALUE.
+ *
+ * @remark The upper limit of GLFW time is calculated as
+ * floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations
+ * storing nanoseconds in 64 bits. The limit may be increased in the future.
+ *
+ * @thread_safety This function may be called from any thread. Reading and
+ * writing of the internal base time is not atomic, so it needs to be
+ * externally synchronized with calls to @ref glfwGetTime.
+ *
+ * @sa @ref time
+ *
+ * @since Added in version 2.2.
+ *
+ * @ingroup input
+ */
+GLFWAPI void glfwSetTime(double time);
+
+/*! @brief Returns the current value of the raw timer.
+ *
+ * This function returns the current value of the raw timer, measured in
+ * 1&nbsp;/&nbsp;frequency seconds. To get the frequency, call @ref
+ * glfwGetTimerFrequency.
+ *
+ * @return The value of the timer, or zero if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref time
+ * @sa @ref glfwGetTimerFrequency
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup input
+ */
+GLFWAPI uint64_t glfwGetTimerValue(void);
+
+/*! @brief Returns the frequency, in Hz, of the raw timer.
+ *
+ * This function returns the frequency, in Hz, of the raw timer.
+ *
+ * @return The frequency of the timer, in Hz, or zero if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref time
+ * @sa @ref glfwGetTimerValue
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup input
+ */
+GLFWAPI uint64_t glfwGetTimerFrequency(void);
+
+/*! @brief Makes the context of the specified window current for the calling
+ * thread.
+ *
+ * This function makes the OpenGL or OpenGL ES context of the specified window
+ * current on the calling thread. A context must only be made current on
+ * a single thread at a time and each thread can have only a single current
+ * context at a time.
+ *
+ * When moving a context between threads, you must make it non-current on the
+ * old thread before making it current on the new one.
+ *
+ * By default, making a context non-current implicitly forces a pipeline flush.
+ * On machines that support `GL_KHR_context_flush_control`, you can control
+ * whether a context performs this flush by setting the
+ * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint)
+ * hint.
+ *
+ * The specified window must have an OpenGL or OpenGL ES context. Specifying
+ * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
+ * error.
+ *
+ * @param[in] window The window whose context to make current, or `NULL` to
+ * detach the current context.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref context_current
+ * @sa @ref glfwGetCurrentContext
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup context
+ */
+GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);
+
+/*! @brief Returns the window whose context is current on the calling thread.
+ *
+ * This function returns the window whose OpenGL or OpenGL ES context is
+ * current on the calling thread.
+ *
+ * @return The window whose context is current, or `NULL` if no window's
+ * context is current.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref context_current
+ * @sa @ref glfwMakeContextCurrent
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup context
+ */
+GLFWAPI GLFWwindow* glfwGetCurrentContext(void);
+
+/*! @brief Swaps the front and back buffers of the specified window.
+ *
+ * This function swaps the front and back buffers of the specified window when
+ * rendering with OpenGL or OpenGL ES. If the swap interval is greater than
+ * zero, the GPU driver waits the specified number of screen updates before
+ * swapping the buffers.
+ *
+ * The specified window must have an OpenGL or OpenGL ES context. Specifying
+ * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
+ * error.
+ *
+ * This function does not apply to Vulkan. If you are rendering with Vulkan,
+ * see `vkQueuePresentKHR` instead.
+ *
+ * @param[in] window The window whose buffers to swap.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark __EGL:__ The context of the specified window must be current on the
+ * calling thread.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref buffer_swap
+ * @sa @ref glfwSwapInterval
+ *
+ * @since Added in version 1.0.
+ * @glfw3 Added window handle parameter.
+ *
+ * @ingroup window
+ */
+GLFWAPI void glfwSwapBuffers(GLFWwindow* window);
+
+/*! @brief Sets the swap interval for the current context.
+ *
+ * This function sets the swap interval for the current OpenGL or OpenGL ES
+ * context, i.e. the number of screen updates to wait from the time @ref
+ * glfwSwapBuffers was called before swapping the buffers and returning. This
+ * is sometimes called _vertical synchronization_, _vertical retrace
+ * synchronization_ or just _vsync_.
+ *
+ * A context that supports either of the `WGL_EXT_swap_control_tear` and
+ * `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap
+ * intervals, which allows the driver to swap immediately even if a frame
+ * arrives a little bit late. You can check for these extensions with @ref
+ * glfwExtensionSupported.
+ *
+ * A context must be current on the calling thread. Calling this function
+ * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
+ *
+ * This function does not apply to Vulkan. If you are rendering with Vulkan,
+ * see the present mode of your swapchain instead.
+ *
+ * @param[in] interval The minimum number of screen updates to wait for
+ * until the buffers are swapped by @ref glfwSwapBuffers.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark This function is not called during context creation, leaving the
+ * swap interval set to whatever is the default on that platform. This is done
+ * because some swap interval extensions used by GLFW do not allow the swap
+ * interval to be reset to zero once it has been set to a non-zero value.
+ *
+ * @remark Some GPU drivers do not honor the requested swap interval, either
+ * because of a user setting that overrides the application's request or due to
+ * bugs in the driver.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref buffer_swap
+ * @sa @ref glfwSwapBuffers
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup context
+ */
+GLFWAPI void glfwSwapInterval(int interval);
+
+/*! @brief Returns whether the specified extension is available.
+ *
+ * This function returns whether the specified
+ * [API extension](@ref context_glext) is supported by the current OpenGL or
+ * OpenGL ES context. It searches both for client API extension and context
+ * creation API extensions.
+ *
+ * A context must be current on the calling thread. Calling this function
+ * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
+ *
+ * As this functions retrieves and searches one or more extension strings each
+ * call, it is recommended that you cache its results if it is going to be used
+ * frequently. The extension strings will not change during the lifetime of
+ * a context, so there is no danger in doing this.
+ *
+ * This function does not apply to Vulkan. If you are using Vulkan, see @ref
+ * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties`
+ * and `vkEnumerateDeviceExtensionProperties` instead.
+ *
+ * @param[in] extension The ASCII encoded name of the extension.
+ * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE`
+ * otherwise.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref context_glext
+ * @sa @ref glfwGetProcAddress
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup context
+ */
+GLFWAPI int glfwExtensionSupported(const char* extension);
+
+/*! @brief Returns the address of the specified function for the current
+ * context.
+ *
+ * This function returns the address of the specified OpenGL or OpenGL ES
+ * [core or extension function](@ref context_glext), if it is supported
+ * by the current context.
+ *
+ * A context must be current on the calling thread. Calling this function
+ * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
+ *
+ * This function does not apply to Vulkan. If you are rendering with Vulkan,
+ * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and
+ * `vkGetDeviceProcAddr` instead.
+ *
+ * @param[in] procname The ASCII encoded name of the function.
+ * @return The address of the function, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark The address of a given function is not guaranteed to be the same
+ * between contexts.
+ *
+ * @remark This function may return a non-`NULL` address despite the
+ * associated version or extension not being available. Always check the
+ * context version or extension string first.
+ *
+ * @pointer_lifetime The returned function pointer is valid until the context
+ * is destroyed or the library is terminated.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref context_glext
+ * @sa @ref glfwExtensionSupported
+ *
+ * @since Added in version 1.0.
+ *
+ * @ingroup context
+ */
+GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
+
+/*! @brief Returns whether the Vulkan loader and an ICD have been found.
+ *
+ * This function returns whether the Vulkan loader and any minimally functional
+ * ICD have been found.
+ *
+ * The availability of a Vulkan loader and even an ICD does not by itself guarantee that
+ * surface creation or even instance creation is possible. Call @ref
+ * glfwGetRequiredInstanceExtensions to check whether the extensions necessary for Vulkan
+ * surface creation are available and @ref glfwGetPhysicalDevicePresentationSupport to
+ * check whether a queue family of a physical device supports image presentation.
+ *
+ * @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE`
+ * otherwise.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref vulkan_support
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup vulkan
+ */
+GLFWAPI int glfwVulkanSupported(void);
+
+/*! @brief Returns the Vulkan instance extensions required by GLFW.
+ *
+ * This function returns an array of names of Vulkan instance extensions required
+ * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the
+ * list will always contain `VK_KHR_surface`, so if you don't require any
+ * additional extensions you can pass this list directly to the
+ * `VkInstanceCreateInfo` struct.
+ *
+ * If Vulkan is not available on the machine, this function returns `NULL` and
+ * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
+ * to check whether Vulkan is at least minimally available.
+ *
+ * If Vulkan is available but no set of extensions allowing window surface
+ * creation was found, this function returns `NULL`. You may still use Vulkan
+ * for off-screen rendering and compute work.
+ *
+ * @param[out] count Where to store the number of extensions in the returned
+ * array. This is set to zero if an error occurred.
+ * @return An array of ASCII encoded extension names, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_API_UNAVAILABLE.
+ *
+ * @remark Additional extensions may be required by future versions of GLFW.
+ * You should check if any extensions you wish to enable are already in the
+ * returned array, as it is an error to specify an extension more than once in
+ * the `VkInstanceCreateInfo` struct.
+ *
+ * @remark @macos GLFW currently supports both the `VK_MVK_macos_surface` and
+ * the newer `VK_EXT_metal_surface` extensions.
+ *
+ * @pointer_lifetime The returned array is allocated and freed by GLFW. You
+ * should not free it yourself. It is guaranteed to be valid only until the
+ * library is terminated.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref vulkan_ext
+ * @sa @ref glfwCreateWindowSurface
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup vulkan
+ */
+GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count);
+
+#if defined(VK_VERSION_1_0)
+
+/*! @brief Returns the address of the specified Vulkan instance function.
+ *
+ * This function returns the address of the specified Vulkan core or extension
+ * function for the specified instance. If instance is set to `NULL` it can
+ * return any function exported from the Vulkan loader, including at least the
+ * following functions:
+ *
+ * - `vkEnumerateInstanceExtensionProperties`
+ * - `vkEnumerateInstanceLayerProperties`
+ * - `vkCreateInstance`
+ * - `vkGetInstanceProcAddr`
+ *
+ * If Vulkan is not available on the machine, this function returns `NULL` and
+ * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
+ * to check whether Vulkan is at least minimally available.
+ *
+ * This function is equivalent to calling `vkGetInstanceProcAddr` with
+ * a platform-specific query of the Vulkan loader as a fallback.
+ *
+ * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve
+ * functions related to instance creation.
+ * @param[in] procname The ASCII encoded name of the function.
+ * @return The address of the function, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_API_UNAVAILABLE.
+ *
+ * @pointer_lifetime The returned function pointer is valid until the library
+ * is terminated.
+ *
+ * @thread_safety This function may be called from any thread.
+ *
+ * @sa @ref vulkan_proc
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup vulkan
+ */
+GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname);
+
+/*! @brief Returns whether the specified queue family can present images.
+ *
+ * This function returns whether the specified queue family of the specified
+ * physical device supports presentation to the platform GLFW was built for.
+ *
+ * If Vulkan or the required window surface creation instance extensions are
+ * not available on the machine, or if the specified instance was not created
+ * with the required extensions, this function returns `GLFW_FALSE` and
+ * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
+ * to check whether Vulkan is at least minimally available and @ref
+ * glfwGetRequiredInstanceExtensions to check what instance extensions are
+ * required.
+ *
+ * @param[in] instance The instance that the physical device belongs to.
+ * @param[in] device The physical device that the queue family belongs to.
+ * @param[in] queuefamily The index of the queue family to query.
+ * @return `GLFW_TRUE` if the queue family supports presentation, or
+ * `GLFW_FALSE` otherwise.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
+ *
+ * @remark @macos This function currently always returns `GLFW_TRUE`, as the
+ * `VK_MVK_macos_surface` and `VK_EXT_metal_surface` extensions do not provide
+ * a `vkGetPhysicalDevice*PresentationSupport` type function.
+ *
+ * @thread_safety This function may be called from any thread. For
+ * synchronization details of Vulkan objects, see the Vulkan specification.
+ *
+ * @sa @ref vulkan_present
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup vulkan
+ */
+GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
+
+/*! @brief Creates a Vulkan surface for the specified window.
+ *
+ * This function creates a Vulkan surface for the specified window.
+ *
+ * If the Vulkan loader or at least one minimally functional ICD were not found,
+ * this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref
+ * GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether
+ * Vulkan is at least minimally available.
+ *
+ * If the required window surface creation instance extensions are not
+ * available or if the specified instance was not created with these extensions
+ * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and
+ * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref
+ * glfwGetRequiredInstanceExtensions to check what instance extensions are
+ * required.
+ *
+ * The window surface cannot be shared with another API so the window must
+ * have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib)
+ * set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error
+ * and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`.
+ *
+ * The window surface must be destroyed before the specified Vulkan instance.
+ * It is the responsibility of the caller to destroy the window surface. GLFW
+ * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the
+ * surface.
+ *
+ * @param[in] instance The Vulkan instance to create the surface in.
+ * @param[in] window The window to create the surface for.
+ * @param[in] allocator The allocator to use, or `NULL` to use the default
+ * allocator.
+ * @param[out] surface Where to store the handle of the surface. This is set
+ * to `VK_NULL_HANDLE` if an error occurred.
+ * @return `VK_SUCCESS` if successful, or a Vulkan error code if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
+ * GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE
+ *
+ * @remark If an error occurs before the creation call is made, GLFW returns
+ * the Vulkan error code most appropriate for the error. Appropriate use of
+ * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should
+ * eliminate almost all occurrences of these errors.
+ *
+ * @remark @macos This function currently only supports the
+ * `VK_MVK_macos_surface` extension from MoltenVK.
+ *
+ * @remark @macos This function creates and sets a `CAMetalLayer` instance for
+ * the window content view, which is required for MoltenVK to function.
+ *
+ * @thread_safety This function may be called from any thread. For
+ * synchronization details of Vulkan objects, see the Vulkan specification.
+ *
+ * @sa @ref vulkan_surface
+ * @sa @ref glfwGetRequiredInstanceExtensions
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup vulkan
+ */
+GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
+
+#endif /*VK_VERSION_1_0*/
+
+
+/*************************************************************************
+ * Global definition cleanup
+ *************************************************************************/
+
+/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
+
+#ifdef GLFW_WINGDIAPI_DEFINED
+ #undef WINGDIAPI
+ #undef GLFW_WINGDIAPI_DEFINED
+#endif
+
+#ifdef GLFW_CALLBACK_DEFINED
+ #undef CALLBACK
+ #undef GLFW_CALLBACK_DEFINED
+#endif
+
+/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally
+ * defined by some gl.h variants (OpenBSD) so define it after if needed.
+ */
+#ifndef GLAPIENTRY
+ #define GLAPIENTRY APIENTRY
+#endif
+
+/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _glfw3_h_ */
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3native.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3native.h
new file mode 100644
index 0000000..fe74c73
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3native.h
@@ -0,0 +1,594 @@
+/*************************************************************************
+ * GLFW 3.3 - www.glfw.org
+ * A library for OpenGL, window and input
+ *------------------------------------------------------------------------
+ * Copyright (c) 2002-2006 Marcus Geelnard
+ * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would
+ * be appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not
+ * be misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ *************************************************************************/
+
+#ifndef _glfw3_native_h_
+#define _glfw3_native_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*************************************************************************
+ * Doxygen documentation
+ *************************************************************************/
+
+/*! @file glfw3native.h
+ * @brief The header of the native access functions.
+ *
+ * This is the header file of the native access functions. See @ref native for
+ * more information.
+ */
+/*! @defgroup native Native access
+ * @brief Functions related to accessing native handles.
+ *
+ * **By using the native access functions you assert that you know what you're
+ * doing and how to fix problems caused by using them. If you don't, you
+ * shouldn't be using them.**
+ *
+ * Before the inclusion of @ref glfw3native.h, you may define zero or more
+ * window system API macro and zero or more context creation API macros.
+ *
+ * The chosen backends must match those the library was compiled for. Failure
+ * to do this will cause a link-time error.
+ *
+ * The available window API macros are:
+ * * `GLFW_EXPOSE_NATIVE_WIN32`
+ * * `GLFW_EXPOSE_NATIVE_COCOA`
+ * * `GLFW_EXPOSE_NATIVE_X11`
+ * * `GLFW_EXPOSE_NATIVE_WAYLAND`
+ *
+ * The available context API macros are:
+ * * `GLFW_EXPOSE_NATIVE_WGL`
+ * * `GLFW_EXPOSE_NATIVE_NSGL`
+ * * `GLFW_EXPOSE_NATIVE_GLX`
+ * * `GLFW_EXPOSE_NATIVE_EGL`
+ * * `GLFW_EXPOSE_NATIVE_OSMESA`
+ *
+ * These macros select which of the native access functions that are declared
+ * and which platform-specific headers to include. It is then up your (by
+ * definition platform-specific) code to handle which of these should be
+ * defined.
+ */
+
+
+/*************************************************************************
+ * System headers and types
+ *************************************************************************/
+
+#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
+ // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
+ // example to allow applications to correctly declare a GL_KHR_debug callback)
+ // but windows.h assumes no one will define APIENTRY before it does
+ #if defined(GLFW_APIENTRY_DEFINED)
+ #undef APIENTRY
+ #undef GLFW_APIENTRY_DEFINED
+ #endif
+ #include <windows.h>
+#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
+ #if defined(__OBJC__)
+ #import <Cocoa/Cocoa.h>
+ #else
+ #include <ApplicationServices/ApplicationServices.h>
+ typedef void* id;
+ #endif
+#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
+ #include <X11/Xlib.h>
+ #include <X11/extensions/Xrandr.h>
+#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
+ #include <wayland-client.h>
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_WGL)
+ /* WGL is declared by windows.h */
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_NSGL)
+ /* NSGL is declared by Cocoa.h */
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_GLX)
+ #include <GL/glx.h>
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_EGL)
+ #include <EGL/egl.h>
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
+ #include <GL/osmesa.h>
+#endif
+
+
+/*************************************************************************
+ * Functions
+ *************************************************************************/
+
+#if defined(GLFW_EXPOSE_NATIVE_WIN32)
+/*! @brief Returns the adapter device name of the specified monitor.
+ *
+ * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
+ * of the specified monitor, or `NULL` if an [error](@ref error_handling)
+ * occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup native
+ */
+GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
+
+/*! @brief Returns the display device name of the specified monitor.
+ *
+ * @return The UTF-8 encoded display device name (for example
+ * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup native
+ */
+GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the `HWND` of the specified window.
+ *
+ * @return The `HWND` of the specified window, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @remark The `HDC` associated with the window can be queried with the
+ * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
+ * function.
+ * @code
+ * HDC dc = GetDC(glfwGetWin32Window(window));
+ * @endcode
+ * This DC is private and does not need to be released.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_WGL)
+/*! @brief Returns the `HGLRC` of the specified window.
+ *
+ * @return The `HGLRC` of the specified window, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @remark The `HDC` associated with the window can be queried with the
+ * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
+ * function.
+ * @code
+ * HDC dc = GetDC(glfwGetWin32Window(window));
+ * @endcode
+ * This DC is private and does not need to be released.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_COCOA)
+/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
+ *
+ * @return The `CGDirectDisplayID` of the specified monitor, or
+ * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup native
+ */
+GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the `NSWindow` of the specified window.
+ *
+ * @return The `NSWindow` of the specified window, or `nil` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_NSGL)
+/*! @brief Returns the `NSOpenGLContext` of the specified window.
+ *
+ * @return The `NSOpenGLContext` of the specified window, or `nil` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_X11)
+/*! @brief Returns the `Display` used by GLFW.
+ *
+ * @return The `Display` used by GLFW, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI Display* glfwGetX11Display(void);
+
+/*! @brief Returns the `RRCrtc` of the specified monitor.
+ *
+ * @return The `RRCrtc` of the specified monitor, or `None` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup native
+ */
+GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
+
+/*! @brief Returns the `RROutput` of the specified monitor.
+ *
+ * @return The `RROutput` of the specified monitor, or `None` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.1.
+ *
+ * @ingroup native
+ */
+GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the `Window` of the specified window.
+ *
+ * @return The `Window` of the specified window, or `None` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
+
+/*! @brief Sets the current primary selection to the specified string.
+ *
+ * @param[in] string A UTF-8 encoded string.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The specified string is copied before this function
+ * returns.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref clipboard
+ * @sa glfwGetX11SelectionString
+ * @sa glfwSetClipboardString
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup native
+ */
+GLFWAPI void glfwSetX11SelectionString(const char* string);
+
+/*! @brief Returns the contents of the current primary selection as a string.
+ *
+ * If the selection is empty or if its contents cannot be converted, `NULL`
+ * is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
+ *
+ * @return The contents of the selection as a UTF-8 encoded string, or `NULL`
+ * if an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ * GLFW_PLATFORM_ERROR.
+ *
+ * @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ * should not free it yourself. It is valid until the next call to @ref
+ * glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
+ * library is terminated.
+ *
+ * @thread_safety This function must only be called from the main thread.
+ *
+ * @sa @ref clipboard
+ * @sa glfwSetX11SelectionString
+ * @sa glfwGetClipboardString
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup native
+ */
+GLFWAPI const char* glfwGetX11SelectionString(void);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_GLX)
+/*! @brief Returns the `GLXContext` of the specified window.
+ *
+ * @return The `GLXContext` of the specified window, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
+
+/*! @brief Returns the `GLXWindow` of the specified window.
+ *
+ * @return The `GLXWindow` of the specified window, or `None` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup native
+ */
+GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
+/*! @brief Returns the `struct wl_display*` used by GLFW.
+ *
+ * @return The `struct wl_display*` used by GLFW, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup native
+ */
+GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
+
+/*! @brief Returns the `struct wl_output*` of the specified monitor.
+ *
+ * @return The `struct wl_output*` of the specified monitor, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup native
+ */
+GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the main `struct wl_surface*` of the specified window.
+ *
+ * @return The main `struct wl_surface*` of the specified window, or `NULL` if
+ * an [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.2.
+ *
+ * @ingroup native
+ */
+GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_EGL)
+/*! @brief Returns the `EGLDisplay` used by GLFW.
+ *
+ * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
+
+/*! @brief Returns the `EGLContext` of the specified window.
+ *
+ * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
+
+/*! @brief Returns the `EGLSurface` of the specified window.
+ *
+ * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.0.
+ *
+ * @ingroup native
+ */
+GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
+/*! @brief Retrieves the color buffer associated with the specified window.
+ *
+ * @param[in] window The window whose color buffer to retrieve.
+ * @param[out] width Where to store the width of the color buffer, or `NULL`.
+ * @param[out] height Where to store the height of the color buffer, or `NULL`.
+ * @param[out] format Where to store the OSMesa pixel format of the color
+ * buffer, or `NULL`.
+ * @param[out] buffer Where to store the address of the color buffer, or
+ * `NULL`.
+ * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup native
+ */
+GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
+
+/*! @brief Retrieves the depth buffer associated with the specified window.
+ *
+ * @param[in] window The window whose depth buffer to retrieve.
+ * @param[out] width Where to store the width of the depth buffer, or `NULL`.
+ * @param[out] height Where to store the height of the depth buffer, or `NULL`.
+ * @param[out] bytesPerValue Where to store the number of bytes per depth
+ * buffer element, or `NULL`.
+ * @param[out] buffer Where to store the address of the depth buffer, or
+ * `NULL`.
+ * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup native
+ */
+GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
+
+/*! @brief Returns the `OSMesaContext` of the specified window.
+ *
+ * @return The `OSMesaContext` of the specified window, or `NULL` if an
+ * [error](@ref error_handling) occurred.
+ *
+ * @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
+ * GLFW_NOT_INITIALIZED.
+ *
+ * @thread_safety This function may be called from any thread. Access is not
+ * synchronized.
+ *
+ * @since Added in version 3.3.
+ *
+ * @ingroup native
+ */
+GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _glfw3_native_h_ */
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_init.m b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_init.m
new file mode 100644
index 0000000..209639e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_init.m
@@ -0,0 +1,623 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+#include <sys/param.h> // For MAXPATHLEN
+
+// Needed for _NSGetProgname
+#include <crt_externs.h>
+
+// Change to our application bundle's resources directory, if present
+//
+static void changeToResourcesDirectory(void)
+{
+ char resourcesPath[MAXPATHLEN];
+
+ CFBundleRef bundle = CFBundleGetMainBundle();
+ if (!bundle)
+ return;
+
+ CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(bundle);
+
+ CFStringRef last = CFURLCopyLastPathComponent(resourcesURL);
+ if (CFStringCompare(CFSTR("Resources"), last, 0) != kCFCompareEqualTo)
+ {
+ CFRelease(last);
+ CFRelease(resourcesURL);
+ return;
+ }
+
+ CFRelease(last);
+
+ if (!CFURLGetFileSystemRepresentation(resourcesURL,
+ true,
+ (UInt8*) resourcesPath,
+ MAXPATHLEN))
+ {
+ CFRelease(resourcesURL);
+ return;
+ }
+
+ CFRelease(resourcesURL);
+
+ chdir(resourcesPath);
+}
+
+// Set up the menu bar (manually)
+// This is nasty, nasty stuff -- calls to undocumented semi-private APIs that
+// could go away at any moment, lots of stuff that really should be
+// localize(d|able), etc. Add a nib to save us this horror.
+//
+static void createMenuBar(void)
+{
+ size_t i;
+ NSString* appName = nil;
+ NSDictionary* bundleInfo = [[NSBundle mainBundle] infoDictionary];
+ NSString* nameKeys[] =
+ {
+ @"CFBundleDisplayName",
+ @"CFBundleName",
+ @"CFBundleExecutable",
+ };
+
+ // Try to figure out what the calling application is called
+
+ for (i = 0; i < sizeof(nameKeys) / sizeof(nameKeys[0]); i++)
+ {
+ id name = bundleInfo[nameKeys[i]];
+ if (name &&
+ [name isKindOfClass:[NSString class]] &&
+ ![name isEqualToString:@""])
+ {
+ appName = name;
+ break;
+ }
+ }
+
+ if (!appName)
+ {
+ char** progname = _NSGetProgname();
+ if (progname && *progname)
+ appName = @(*progname);
+ else
+ appName = @"GLFW Application";
+ }
+
+ NSMenu* bar = [[NSMenu alloc] init];
+ [NSApp setMainMenu:bar];
+
+ NSMenuItem* appMenuItem =
+ [bar addItemWithTitle:@"" action:NULL keyEquivalent:@""];
+ NSMenu* appMenu = [[NSMenu alloc] init];
+ [appMenuItem setSubmenu:appMenu];
+
+ [appMenu addItemWithTitle:[NSString stringWithFormat:@"About %@", appName]
+ action:@selector(orderFrontStandardAboutPanel:)
+ keyEquivalent:@""];
+ [appMenu addItem:[NSMenuItem separatorItem]];
+ NSMenu* servicesMenu = [[NSMenu alloc] init];
+ [NSApp setServicesMenu:servicesMenu];
+ [[appMenu addItemWithTitle:@"Services"
+ action:NULL
+ keyEquivalent:@""] setSubmenu:servicesMenu];
+ [servicesMenu release];
+ [appMenu addItem:[NSMenuItem separatorItem]];
+ [appMenu addItemWithTitle:[NSString stringWithFormat:@"Hide %@", appName]
+ action:@selector(hide:)
+ keyEquivalent:@"h"];
+ [[appMenu addItemWithTitle:@"Hide Others"
+ action:@selector(hideOtherApplications:)
+ keyEquivalent:@"h"]
+ setKeyEquivalentModifierMask:NSEventModifierFlagOption | NSEventModifierFlagCommand];
+ [appMenu addItemWithTitle:@"Show All"
+ action:@selector(unhideAllApplications:)
+ keyEquivalent:@""];
+ [appMenu addItem:[NSMenuItem separatorItem]];
+ [appMenu addItemWithTitle:[NSString stringWithFormat:@"Quit %@", appName]
+ action:@selector(terminate:)
+ keyEquivalent:@"q"];
+
+ NSMenuItem* windowMenuItem =
+ [bar addItemWithTitle:@"" action:NULL keyEquivalent:@""];
+ [bar release];
+ NSMenu* windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
+ [NSApp setWindowsMenu:windowMenu];
+ [windowMenuItem setSubmenu:windowMenu];
+
+ [windowMenu addItemWithTitle:@"Minimize"
+ action:@selector(performMiniaturize:)
+ keyEquivalent:@"m"];
+ [windowMenu addItemWithTitle:@"Zoom"
+ action:@selector(performZoom:)
+ keyEquivalent:@""];
+ [windowMenu addItem:[NSMenuItem separatorItem]];
+ [windowMenu addItemWithTitle:@"Bring All to Front"
+ action:@selector(arrangeInFront:)
+ keyEquivalent:@""];
+
+ // TODO: Make this appear at the bottom of the menu (for consistency)
+ [windowMenu addItem:[NSMenuItem separatorItem]];
+ [[windowMenu addItemWithTitle:@"Enter Full Screen"
+ action:@selector(toggleFullScreen:)
+ keyEquivalent:@"f"]
+ setKeyEquivalentModifierMask:NSEventModifierFlagControl | NSEventModifierFlagCommand];
+
+ // Prior to Snow Leopard, we need to use this oddly-named semi-private API
+ // to get the application menu working properly.
+ SEL setAppleMenuSelector = NSSelectorFromString(@"setAppleMenu:");
+ [NSApp performSelector:setAppleMenuSelector withObject:appMenu];
+}
+
+// Create key code translation tables
+//
+static void createKeyTables(void)
+{
+ int scancode;
+
+ memset(_glfw.ns.keycodes, -1, sizeof(_glfw.ns.keycodes));
+ memset(_glfw.ns.scancodes, -1, sizeof(_glfw.ns.scancodes));
+
+ _glfw.ns.keycodes[0x1D] = GLFW_KEY_0;
+ _glfw.ns.keycodes[0x12] = GLFW_KEY_1;
+ _glfw.ns.keycodes[0x13] = GLFW_KEY_2;
+ _glfw.ns.keycodes[0x14] = GLFW_KEY_3;
+ _glfw.ns.keycodes[0x15] = GLFW_KEY_4;
+ _glfw.ns.keycodes[0x17] = GLFW_KEY_5;
+ _glfw.ns.keycodes[0x16] = GLFW_KEY_6;
+ _glfw.ns.keycodes[0x1A] = GLFW_KEY_7;
+ _glfw.ns.keycodes[0x1C] = GLFW_KEY_8;
+ _glfw.ns.keycodes[0x19] = GLFW_KEY_9;
+ _glfw.ns.keycodes[0x00] = GLFW_KEY_A;
+ _glfw.ns.keycodes[0x0B] = GLFW_KEY_B;
+ _glfw.ns.keycodes[0x08] = GLFW_KEY_C;
+ _glfw.ns.keycodes[0x02] = GLFW_KEY_D;
+ _glfw.ns.keycodes[0x0E] = GLFW_KEY_E;
+ _glfw.ns.keycodes[0x03] = GLFW_KEY_F;
+ _glfw.ns.keycodes[0x05] = GLFW_KEY_G;
+ _glfw.ns.keycodes[0x04] = GLFW_KEY_H;
+ _glfw.ns.keycodes[0x22] = GLFW_KEY_I;
+ _glfw.ns.keycodes[0x26] = GLFW_KEY_J;
+ _glfw.ns.keycodes[0x28] = GLFW_KEY_K;
+ _glfw.ns.keycodes[0x25] = GLFW_KEY_L;
+ _glfw.ns.keycodes[0x2E] = GLFW_KEY_M;
+ _glfw.ns.keycodes[0x2D] = GLFW_KEY_N;
+ _glfw.ns.keycodes[0x1F] = GLFW_KEY_O;
+ _glfw.ns.keycodes[0x23] = GLFW_KEY_P;
+ _glfw.ns.keycodes[0x0C] = GLFW_KEY_Q;
+ _glfw.ns.keycodes[0x0F] = GLFW_KEY_R;
+ _glfw.ns.keycodes[0x01] = GLFW_KEY_S;
+ _glfw.ns.keycodes[0x11] = GLFW_KEY_T;
+ _glfw.ns.keycodes[0x20] = GLFW_KEY_U;
+ _glfw.ns.keycodes[0x09] = GLFW_KEY_V;
+ _glfw.ns.keycodes[0x0D] = GLFW_KEY_W;
+ _glfw.ns.keycodes[0x07] = GLFW_KEY_X;
+ _glfw.ns.keycodes[0x10] = GLFW_KEY_Y;
+ _glfw.ns.keycodes[0x06] = GLFW_KEY_Z;
+
+ _glfw.ns.keycodes[0x27] = GLFW_KEY_APOSTROPHE;
+ _glfw.ns.keycodes[0x2A] = GLFW_KEY_BACKSLASH;
+ _glfw.ns.keycodes[0x2B] = GLFW_KEY_COMMA;
+ _glfw.ns.keycodes[0x18] = GLFW_KEY_EQUAL;
+ _glfw.ns.keycodes[0x32] = GLFW_KEY_GRAVE_ACCENT;
+ _glfw.ns.keycodes[0x21] = GLFW_KEY_LEFT_BRACKET;
+ _glfw.ns.keycodes[0x1B] = GLFW_KEY_MINUS;
+ _glfw.ns.keycodes[0x2F] = GLFW_KEY_PERIOD;
+ _glfw.ns.keycodes[0x1E] = GLFW_KEY_RIGHT_BRACKET;
+ _glfw.ns.keycodes[0x29] = GLFW_KEY_SEMICOLON;
+ _glfw.ns.keycodes[0x2C] = GLFW_KEY_SLASH;
+ _glfw.ns.keycodes[0x0A] = GLFW_KEY_WORLD_1;
+
+ _glfw.ns.keycodes[0x33] = GLFW_KEY_BACKSPACE;
+ _glfw.ns.keycodes[0x39] = GLFW_KEY_CAPS_LOCK;
+ _glfw.ns.keycodes[0x75] = GLFW_KEY_DELETE;
+ _glfw.ns.keycodes[0x7D] = GLFW_KEY_DOWN;
+ _glfw.ns.keycodes[0x77] = GLFW_KEY_END;
+ _glfw.ns.keycodes[0x24] = GLFW_KEY_ENTER;
+ _glfw.ns.keycodes[0x35] = GLFW_KEY_ESCAPE;
+ _glfw.ns.keycodes[0x7A] = GLFW_KEY_F1;
+ _glfw.ns.keycodes[0x78] = GLFW_KEY_F2;
+ _glfw.ns.keycodes[0x63] = GLFW_KEY_F3;
+ _glfw.ns.keycodes[0x76] = GLFW_KEY_F4;
+ _glfw.ns.keycodes[0x60] = GLFW_KEY_F5;
+ _glfw.ns.keycodes[0x61] = GLFW_KEY_F6;
+ _glfw.ns.keycodes[0x62] = GLFW_KEY_F7;
+ _glfw.ns.keycodes[0x64] = GLFW_KEY_F8;
+ _glfw.ns.keycodes[0x65] = GLFW_KEY_F9;
+ _glfw.ns.keycodes[0x6D] = GLFW_KEY_F10;
+ _glfw.ns.keycodes[0x67] = GLFW_KEY_F11;
+ _glfw.ns.keycodes[0x6F] = GLFW_KEY_F12;
+ _glfw.ns.keycodes[0x69] = GLFW_KEY_F13;
+ _glfw.ns.keycodes[0x6B] = GLFW_KEY_F14;
+ _glfw.ns.keycodes[0x71] = GLFW_KEY_F15;
+ _glfw.ns.keycodes[0x6A] = GLFW_KEY_F16;
+ _glfw.ns.keycodes[0x40] = GLFW_KEY_F17;
+ _glfw.ns.keycodes[0x4F] = GLFW_KEY_F18;
+ _glfw.ns.keycodes[0x50] = GLFW_KEY_F19;
+ _glfw.ns.keycodes[0x5A] = GLFW_KEY_F20;
+ _glfw.ns.keycodes[0x73] = GLFW_KEY_HOME;
+ _glfw.ns.keycodes[0x72] = GLFW_KEY_INSERT;
+ _glfw.ns.keycodes[0x7B] = GLFW_KEY_LEFT;
+ _glfw.ns.keycodes[0x3A] = GLFW_KEY_LEFT_ALT;
+ _glfw.ns.keycodes[0x3B] = GLFW_KEY_LEFT_CONTROL;
+ _glfw.ns.keycodes[0x38] = GLFW_KEY_LEFT_SHIFT;
+ _glfw.ns.keycodes[0x37] = GLFW_KEY_LEFT_SUPER;
+ _glfw.ns.keycodes[0x6E] = GLFW_KEY_MENU;
+ _glfw.ns.keycodes[0x47] = GLFW_KEY_NUM_LOCK;
+ _glfw.ns.keycodes[0x79] = GLFW_KEY_PAGE_DOWN;
+ _glfw.ns.keycodes[0x74] = GLFW_KEY_PAGE_UP;
+ _glfw.ns.keycodes[0x7C] = GLFW_KEY_RIGHT;
+ _glfw.ns.keycodes[0x3D] = GLFW_KEY_RIGHT_ALT;
+ _glfw.ns.keycodes[0x3E] = GLFW_KEY_RIGHT_CONTROL;
+ _glfw.ns.keycodes[0x3C] = GLFW_KEY_RIGHT_SHIFT;
+ _glfw.ns.keycodes[0x36] = GLFW_KEY_RIGHT_SUPER;
+ _glfw.ns.keycodes[0x31] = GLFW_KEY_SPACE;
+ _glfw.ns.keycodes[0x30] = GLFW_KEY_TAB;
+ _glfw.ns.keycodes[0x7E] = GLFW_KEY_UP;
+
+ _glfw.ns.keycodes[0x52] = GLFW_KEY_KP_0;
+ _glfw.ns.keycodes[0x53] = GLFW_KEY_KP_1;
+ _glfw.ns.keycodes[0x54] = GLFW_KEY_KP_2;
+ _glfw.ns.keycodes[0x55] = GLFW_KEY_KP_3;
+ _glfw.ns.keycodes[0x56] = GLFW_KEY_KP_4;
+ _glfw.ns.keycodes[0x57] = GLFW_KEY_KP_5;
+ _glfw.ns.keycodes[0x58] = GLFW_KEY_KP_6;
+ _glfw.ns.keycodes[0x59] = GLFW_KEY_KP_7;
+ _glfw.ns.keycodes[0x5B] = GLFW_KEY_KP_8;
+ _glfw.ns.keycodes[0x5C] = GLFW_KEY_KP_9;
+ _glfw.ns.keycodes[0x45] = GLFW_KEY_KP_ADD;
+ _glfw.ns.keycodes[0x41] = GLFW_KEY_KP_DECIMAL;
+ _glfw.ns.keycodes[0x4B] = GLFW_KEY_KP_DIVIDE;
+ _glfw.ns.keycodes[0x4C] = GLFW_KEY_KP_ENTER;
+ _glfw.ns.keycodes[0x51] = GLFW_KEY_KP_EQUAL;
+ _glfw.ns.keycodes[0x43] = GLFW_KEY_KP_MULTIPLY;
+ _glfw.ns.keycodes[0x4E] = GLFW_KEY_KP_SUBTRACT;
+
+ for (scancode = 0; scancode < 256; scancode++)
+ {
+ // Store the reverse translation for faster key name lookup
+ if (_glfw.ns.keycodes[scancode] >= 0)
+ _glfw.ns.scancodes[_glfw.ns.keycodes[scancode]] = scancode;
+ }
+}
+
+// Retrieve Unicode data for the current keyboard layout
+//
+static GLFWbool updateUnicodeDataNS(void)
+{
+ if (_glfw.ns.inputSource)
+ {
+ CFRelease(_glfw.ns.inputSource);
+ _glfw.ns.inputSource = NULL;
+ _glfw.ns.unicodeData = nil;
+ }
+
+ _glfw.ns.inputSource = TISCopyCurrentKeyboardLayoutInputSource();
+ if (!_glfw.ns.inputSource)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to retrieve keyboard layout input source");
+ return GLFW_FALSE;
+ }
+
+ _glfw.ns.unicodeData =
+ TISGetInputSourceProperty(_glfw.ns.inputSource,
+ kTISPropertyUnicodeKeyLayoutData);
+ if (!_glfw.ns.unicodeData)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to retrieve keyboard layout Unicode data");
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+// Load HIToolbox.framework and the TIS symbols we need from it
+//
+static GLFWbool initializeTIS(void)
+{
+ // This works only because Cocoa has already loaded it properly
+ _glfw.ns.tis.bundle =
+ CFBundleGetBundleWithIdentifier(CFSTR("com.apple.HIToolbox"));
+ if (!_glfw.ns.tis.bundle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to load HIToolbox.framework");
+ return GLFW_FALSE;
+ }
+
+ CFStringRef* kPropertyUnicodeKeyLayoutData =
+ CFBundleGetDataPointerForName(_glfw.ns.tis.bundle,
+ CFSTR("kTISPropertyUnicodeKeyLayoutData"));
+ _glfw.ns.tis.CopyCurrentKeyboardLayoutInputSource =
+ CFBundleGetFunctionPointerForName(_glfw.ns.tis.bundle,
+ CFSTR("TISCopyCurrentKeyboardLayoutInputSource"));
+ _glfw.ns.tis.GetInputSourceProperty =
+ CFBundleGetFunctionPointerForName(_glfw.ns.tis.bundle,
+ CFSTR("TISGetInputSourceProperty"));
+ _glfw.ns.tis.GetKbdType =
+ CFBundleGetFunctionPointerForName(_glfw.ns.tis.bundle,
+ CFSTR("LMGetKbdType"));
+
+ if (!kPropertyUnicodeKeyLayoutData ||
+ !TISCopyCurrentKeyboardLayoutInputSource ||
+ !TISGetInputSourceProperty ||
+ !LMGetKbdType)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to load TIS API symbols");
+ return GLFW_FALSE;
+ }
+
+ _glfw.ns.tis.kPropertyUnicodeKeyLayoutData =
+ *kPropertyUnicodeKeyLayoutData;
+
+ return updateUnicodeDataNS();
+}
+
+@interface GLFWHelper : NSObject
+@end
+
+@implementation GLFWHelper
+
+- (void)selectedKeyboardInputSourceChanged:(NSObject* )object
+{
+ updateUnicodeDataNS();
+}
+
+- (void)doNothing:(id)object
+{
+}
+
+@end // GLFWHelper
+
+@interface GLFWApplicationDelegate : NSObject <NSApplicationDelegate>
+@end
+
+@implementation GLFWApplicationDelegate
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
+{
+ _GLFWwindow* window;
+
+ for (window = _glfw.windowListHead; window; window = window->next)
+ _glfwInputWindowCloseRequest(window);
+
+ return NSTerminateCancel;
+}
+
+- (void)applicationDidChangeScreenParameters:(NSNotification *) notification
+{
+ _GLFWwindow* window;
+
+ for (window = _glfw.windowListHead; window; window = window->next)
+ {
+ if (window->context.client != GLFW_NO_API)
+ [window->context.nsgl.object update];
+ }
+
+ _glfwPollMonitorsNS();
+}
+
+- (void)applicationWillFinishLaunching:(NSNotification *)notification
+{
+ if (_glfw.hints.init.ns.menubar)
+ {
+ // Menu bar setup must go between sharedApplication and finishLaunching
+ // in order to properly emulate the behavior of NSApplicationMain
+
+ if ([[NSBundle mainBundle] pathForResource:@"MainMenu" ofType:@"nib"])
+ {
+ [[NSBundle mainBundle] loadNibNamed:@"MainMenu"
+ owner:NSApp
+ topLevelObjects:&_glfw.ns.nibObjects];
+ }
+ else
+ createMenuBar();
+ }
+}
+
+- (void)applicationDidFinishLaunching:(NSNotification *)notification
+{
+ _glfw.ns.finishedLaunching = GLFW_TRUE;
+ _glfwPlatformPostEmptyEvent();
+
+ // In case we are unbundled, make us a proper UI application
+ if (_glfw.hints.init.ns.menubar)
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
+
+ [NSApp stop:nil];
+}
+
+- (void)applicationDidHide:(NSNotification *)notification
+{
+ int i;
+
+ for (i = 0; i < _glfw.monitorCount; i++)
+ _glfwRestoreVideoModeNS(_glfw.monitors[i]);
+}
+
+@end // GLFWApplicationDelegate
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+void* _glfwLoadLocalVulkanLoaderNS(void)
+{
+ CFBundleRef bundle = CFBundleGetMainBundle();
+ if (!bundle)
+ return NULL;
+
+ CFURLRef url =
+ CFBundleCopyAuxiliaryExecutableURL(bundle, CFSTR("libvulkan.1.dylib"));
+ if (!url)
+ return NULL;
+
+ char path[PATH_MAX];
+ void* handle = NULL;
+
+ if (CFURLGetFileSystemRepresentation(url, true, (UInt8*) path, sizeof(path) - 1))
+ handle = _glfw_dlopen(path);
+
+ CFRelease(url);
+ return handle;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformInit(void)
+{
+ @autoreleasepool {
+
+ _glfw.ns.helper = [[GLFWHelper alloc] init];
+
+ [NSThread detachNewThreadSelector:@selector(doNothing:)
+ toTarget:_glfw.ns.helper
+ withObject:nil];
+
+ if (NSApp)
+ _glfw.ns.finishedLaunching = GLFW_TRUE;
+
+ [NSApplication sharedApplication];
+
+ _glfw.ns.delegate = [[GLFWApplicationDelegate alloc] init];
+ if (_glfw.ns.delegate == nil)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to create application delegate");
+ return GLFW_FALSE;
+ }
+
+ [NSApp setDelegate:_glfw.ns.delegate];
+
+ NSEvent* (^block)(NSEvent*) = ^ NSEvent* (NSEvent* event)
+ {
+ if ([event modifierFlags] & NSEventModifierFlagCommand)
+ [[NSApp keyWindow] sendEvent:event];
+
+ return event;
+ };
+
+ _glfw.ns.keyUpMonitor =
+ [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskKeyUp
+ handler:block];
+
+ if (_glfw.hints.init.ns.chdir)
+ changeToResourcesDirectory();
+
+ // Press and Hold prevents some keys from emitting repeated characters
+ NSDictionary* defaults = @{@"ApplePressAndHoldEnabled":@NO};
+ [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver:_glfw.ns.helper
+ selector:@selector(selectedKeyboardInputSourceChanged:)
+ name:NSTextInputContextKeyboardSelectionDidChangeNotification
+ object:nil];
+
+ createKeyTables();
+
+ _glfw.ns.eventSource = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);
+ if (!_glfw.ns.eventSource)
+ return GLFW_FALSE;
+
+ CGEventSourceSetLocalEventsSuppressionInterval(_glfw.ns.eventSource, 0.0);
+
+ if (!initializeTIS())
+ return GLFW_FALSE;
+
+ _glfwInitTimerNS();
+ _glfwInitJoysticksNS();
+
+ _glfwPollMonitorsNS();
+ return GLFW_TRUE;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformTerminate(void)
+{
+ @autoreleasepool {
+
+ if (_glfw.ns.inputSource)
+ {
+ CFRelease(_glfw.ns.inputSource);
+ _glfw.ns.inputSource = NULL;
+ _glfw.ns.unicodeData = nil;
+ }
+
+ if (_glfw.ns.eventSource)
+ {
+ CFRelease(_glfw.ns.eventSource);
+ _glfw.ns.eventSource = NULL;
+ }
+
+ if (_glfw.ns.delegate)
+ {
+ [NSApp setDelegate:nil];
+ [_glfw.ns.delegate release];
+ _glfw.ns.delegate = nil;
+ }
+
+ if (_glfw.ns.helper)
+ {
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:_glfw.ns.helper
+ name:NSTextInputContextKeyboardSelectionDidChangeNotification
+ object:nil];
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:_glfw.ns.helper];
+ [_glfw.ns.helper release];
+ _glfw.ns.helper = nil;
+ }
+
+ if (_glfw.ns.keyUpMonitor)
+ [NSEvent removeMonitor:_glfw.ns.keyUpMonitor];
+
+ free(_glfw.ns.clipboardString);
+
+ _glfwTerminateNSGL();
+ _glfwTerminateJoysticksNS();
+
+ } // autoreleasepool
+}
+
+const char* _glfwPlatformGetVersionString(void)
+{
+ return _GLFW_VERSION_NUMBER " Cocoa NSGL EGL OSMesa"
+#if defined(_GLFW_BUILD_DLL)
+ " dynamic"
+#endif
+ ;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.h
new file mode 100644
index 0000000..0de8678
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.h
@@ -0,0 +1,51 @@
+//========================================================================
+// GLFW 3.3 Cocoa - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <IOKit/IOKitLib.h>
+#include <IOKit/IOCFPlugIn.h>
+#include <IOKit/hid/IOHIDLib.h>
+#include <IOKit/hid/IOHIDKeys.h>
+
+#define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickNS ns
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyJoystick; }
+
+#define _GLFW_PLATFORM_MAPPING_NAME "Mac OS X"
+#define GLFW_BUILD_COCOA_MAPPINGS
+
+// Cocoa-specific per-joystick data
+//
+typedef struct _GLFWjoystickNS
+{
+ IOHIDDeviceRef device;
+ CFMutableArrayRef axes;
+ CFMutableArrayRef buttons;
+ CFMutableArrayRef hats;
+} _GLFWjoystickNS;
+
+
+void _glfwInitJoysticksNS(void);
+void _glfwTerminateJoysticksNS(void);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.m b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.m
new file mode 100644
index 0000000..2c8d82d
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_joystick.m
@@ -0,0 +1,487 @@
+//========================================================================
+// GLFW 3.3 Cocoa - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
+// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <unistd.h>
+#include <ctype.h>
+#include <string.h>
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
+
+
+// Joystick element information
+//
+typedef struct _GLFWjoyelementNS
+{
+ IOHIDElementRef native;
+ uint32_t usage;
+ int index;
+ long minimum;
+ long maximum;
+
+} _GLFWjoyelementNS;
+
+
+// Returns the value of the specified element of the specified joystick
+//
+static long getElementValue(_GLFWjoystick* js, _GLFWjoyelementNS* element)
+{
+ IOHIDValueRef valueRef;
+ long value = 0;
+
+ if (js->ns.device)
+ {
+ if (IOHIDDeviceGetValue(js->ns.device,
+ element->native,
+ &valueRef) == kIOReturnSuccess)
+ {
+ value = IOHIDValueGetIntegerValue(valueRef);
+ }
+ }
+
+ return value;
+}
+
+// Comparison function for matching the SDL element order
+//
+static CFComparisonResult compareElements(const void* fp,
+ const void* sp,
+ void* user)
+{
+ const _GLFWjoyelementNS* fe = fp;
+ const _GLFWjoyelementNS* se = sp;
+ if (fe->usage < se->usage)
+ return kCFCompareLessThan;
+ if (fe->usage > se->usage)
+ return kCFCompareGreaterThan;
+ if (fe->index < se->index)
+ return kCFCompareLessThan;
+ if (fe->index > se->index)
+ return kCFCompareGreaterThan;
+ return kCFCompareEqualTo;
+}
+
+// Removes the specified joystick
+//
+static void closeJoystick(_GLFWjoystick* js)
+{
+ int i;
+
+ if (!js->present)
+ return;
+
+ for (i = 0; i < CFArrayGetCount(js->ns.axes); i++)
+ free((void*) CFArrayGetValueAtIndex(js->ns.axes, i));
+ CFRelease(js->ns.axes);
+
+ for (i = 0; i < CFArrayGetCount(js->ns.buttons); i++)
+ free((void*) CFArrayGetValueAtIndex(js->ns.buttons, i));
+ CFRelease(js->ns.buttons);
+
+ for (i = 0; i < CFArrayGetCount(js->ns.hats); i++)
+ free((void*) CFArrayGetValueAtIndex(js->ns.hats, i));
+ CFRelease(js->ns.hats);
+
+ _glfwFreeJoystick(js);
+ _glfwInputJoystick(js, GLFW_DISCONNECTED);
+}
+
+// Callback for user-initiated joystick addition
+//
+static void matchCallback(void* context,
+ IOReturn result,
+ void* sender,
+ IOHIDDeviceRef device)
+{
+ int jid;
+ char name[256];
+ char guid[33];
+ CFIndex i;
+ CFTypeRef property;
+ uint32_t vendor = 0, product = 0, version = 0;
+ _GLFWjoystick* js;
+ CFMutableArrayRef axes, buttons, hats;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ if (_glfw.joysticks[jid].ns.device == device)
+ return;
+ }
+
+ axes = CFArrayCreateMutable(NULL, 0, NULL);
+ buttons = CFArrayCreateMutable(NULL, 0, NULL);
+ hats = CFArrayCreateMutable(NULL, 0, NULL);
+
+ property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDProductKey));
+ if (property)
+ {
+ CFStringGetCString(property,
+ name,
+ sizeof(name),
+ kCFStringEncodingUTF8);
+ }
+ else
+ strncpy(name, "Unknown", sizeof(name));
+
+ property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDVendorIDKey));
+ if (property)
+ CFNumberGetValue(property, kCFNumberSInt32Type, &vendor);
+
+ property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDProductIDKey));
+ if (property)
+ CFNumberGetValue(property, kCFNumberSInt32Type, &product);
+
+ property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDVersionNumberKey));
+ if (property)
+ CFNumberGetValue(property, kCFNumberSInt32Type, &version);
+
+ // Generate a joystick GUID that matches the SDL 2.0.5+ one
+ if (vendor && product)
+ {
+ sprintf(guid, "03000000%02x%02x0000%02x%02x0000%02x%02x0000",
+ (uint8_t) vendor, (uint8_t) (vendor >> 8),
+ (uint8_t) product, (uint8_t) (product >> 8),
+ (uint8_t) version, (uint8_t) (version >> 8));
+ }
+ else
+ {
+ sprintf(guid, "05000000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00",
+ name[0], name[1], name[2], name[3],
+ name[4], name[5], name[6], name[7],
+ name[8], name[9], name[10]);
+ }
+
+ CFArrayRef elements =
+ IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone);
+
+ for (i = 0; i < CFArrayGetCount(elements); i++)
+ {
+ IOHIDElementRef native = (IOHIDElementRef)
+ CFArrayGetValueAtIndex(elements, i);
+ if (CFGetTypeID(native) != IOHIDElementGetTypeID())
+ continue;
+
+ const IOHIDElementType type = IOHIDElementGetType(native);
+ if ((type != kIOHIDElementTypeInput_Axis) &&
+ (type != kIOHIDElementTypeInput_Button) &&
+ (type != kIOHIDElementTypeInput_Misc))
+ {
+ continue;
+ }
+
+ CFMutableArrayRef target = NULL;
+
+ const uint32_t usage = IOHIDElementGetUsage(native);
+ const uint32_t page = IOHIDElementGetUsagePage(native);
+ if (page == kHIDPage_GenericDesktop)
+ {
+ switch (usage)
+ {
+ case kHIDUsage_GD_X:
+ case kHIDUsage_GD_Y:
+ case kHIDUsage_GD_Z:
+ case kHIDUsage_GD_Rx:
+ case kHIDUsage_GD_Ry:
+ case kHIDUsage_GD_Rz:
+ case kHIDUsage_GD_Slider:
+ case kHIDUsage_GD_Dial:
+ case kHIDUsage_GD_Wheel:
+ target = axes;
+ break;
+ case kHIDUsage_GD_Hatswitch:
+ target = hats;
+ break;
+ case kHIDUsage_GD_DPadUp:
+ case kHIDUsage_GD_DPadRight:
+ case kHIDUsage_GD_DPadDown:
+ case kHIDUsage_GD_DPadLeft:
+ case kHIDUsage_GD_SystemMainMenu:
+ case kHIDUsage_GD_Select:
+ case kHIDUsage_GD_Start:
+ target = buttons;
+ break;
+ }
+ }
+ else if (page == kHIDPage_Simulation)
+ {
+ switch (usage)
+ {
+ case kHIDUsage_Sim_Accelerator:
+ case kHIDUsage_Sim_Brake:
+ case kHIDUsage_Sim_Throttle:
+ case kHIDUsage_Sim_Rudder:
+ case kHIDUsage_Sim_Steering:
+ target = axes;
+ break;
+ }
+ }
+ else if (page == kHIDPage_Button || page == kHIDPage_Consumer)
+ target = buttons;
+
+ if (target)
+ {
+ _GLFWjoyelementNS* element = calloc(1, sizeof(_GLFWjoyelementNS));
+ element->native = native;
+ element->usage = usage;
+ element->index = (int) CFArrayGetCount(target);
+ element->minimum = IOHIDElementGetLogicalMin(native);
+ element->maximum = IOHIDElementGetLogicalMax(native);
+ CFArrayAppendValue(target, element);
+ }
+ }
+
+ CFRelease(elements);
+
+ CFArraySortValues(axes, CFRangeMake(0, CFArrayGetCount(axes)),
+ compareElements, NULL);
+ CFArraySortValues(buttons, CFRangeMake(0, CFArrayGetCount(buttons)),
+ compareElements, NULL);
+ CFArraySortValues(hats, CFRangeMake(0, CFArrayGetCount(hats)),
+ compareElements, NULL);
+
+ js = _glfwAllocJoystick(name, guid,
+ (int) CFArrayGetCount(axes),
+ (int) CFArrayGetCount(buttons),
+ (int) CFArrayGetCount(hats));
+
+ js->ns.device = device;
+ js->ns.axes = axes;
+ js->ns.buttons = buttons;
+ js->ns.hats = hats;
+
+ _glfwInputJoystick(js, GLFW_CONNECTED);
+}
+
+// Callback for user-initiated joystick removal
+//
+static void removeCallback(void* context,
+ IOReturn result,
+ void* sender,
+ IOHIDDeviceRef device)
+{
+ int jid;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ if (_glfw.joysticks[jid].ns.device == device)
+ {
+ closeJoystick(_glfw.joysticks + jid);
+ break;
+ }
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize joystick interface
+//
+void _glfwInitJoysticksNS(void)
+{
+ CFMutableArrayRef matching;
+ const long usages[] =
+ {
+ kHIDUsage_GD_Joystick,
+ kHIDUsage_GD_GamePad,
+ kHIDUsage_GD_MultiAxisController
+ };
+
+ _glfw.ns.hidManager = IOHIDManagerCreate(kCFAllocatorDefault,
+ kIOHIDOptionsTypeNone);
+
+ matching = CFArrayCreateMutable(kCFAllocatorDefault,
+ 0,
+ &kCFTypeArrayCallBacks);
+ if (!matching)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create array");
+ return;
+ }
+
+ for (size_t i = 0; i < sizeof(usages) / sizeof(long); i++)
+ {
+ const long page = kHIDPage_GenericDesktop;
+
+ CFMutableDictionaryRef dict =
+ CFDictionaryCreateMutable(kCFAllocatorDefault,
+ 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ if (!dict)
+ continue;
+
+ CFNumberRef pageRef = CFNumberCreate(kCFAllocatorDefault,
+ kCFNumberLongType,
+ &page);
+ CFNumberRef usageRef = CFNumberCreate(kCFAllocatorDefault,
+ kCFNumberLongType,
+ &usages[i]);
+ if (pageRef && usageRef)
+ {
+ CFDictionarySetValue(dict,
+ CFSTR(kIOHIDDeviceUsagePageKey),
+ pageRef);
+ CFDictionarySetValue(dict,
+ CFSTR(kIOHIDDeviceUsageKey),
+ usageRef);
+ CFArrayAppendValue(matching, dict);
+ }
+
+ if (pageRef)
+ CFRelease(pageRef);
+ if (usageRef)
+ CFRelease(usageRef);
+
+ CFRelease(dict);
+ }
+
+ IOHIDManagerSetDeviceMatchingMultiple(_glfw.ns.hidManager, matching);
+ CFRelease(matching);
+
+ IOHIDManagerRegisterDeviceMatchingCallback(_glfw.ns.hidManager,
+ &matchCallback, NULL);
+ IOHIDManagerRegisterDeviceRemovalCallback(_glfw.ns.hidManager,
+ &removeCallback, NULL);
+ IOHIDManagerScheduleWithRunLoop(_glfw.ns.hidManager,
+ CFRunLoopGetMain(),
+ kCFRunLoopDefaultMode);
+ IOHIDManagerOpen(_glfw.ns.hidManager, kIOHIDOptionsTypeNone);
+
+ // Execute the run loop once in order to register any initially-attached
+ // joysticks
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
+}
+
+// Close all opened joystick handles
+//
+void _glfwTerminateJoysticksNS(void)
+{
+ int jid;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ closeJoystick(_glfw.joysticks + jid);
+
+ CFRelease(_glfw.ns.hidManager);
+ _glfw.ns.hidManager = NULL;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
+{
+ if (mode & _GLFW_POLL_AXES)
+ {
+ CFIndex i;
+
+ for (i = 0; i < CFArrayGetCount(js->ns.axes); i++)
+ {
+ _GLFWjoyelementNS* axis = (_GLFWjoyelementNS*)
+ CFArrayGetValueAtIndex(js->ns.axes, i);
+
+ const long raw = getElementValue(js, axis);
+ // Perform auto calibration
+ if (raw < axis->minimum)
+ axis->minimum = raw;
+ if (raw > axis->maximum)
+ axis->maximum = raw;
+
+ const long size = axis->maximum - axis->minimum;
+ if (size == 0)
+ _glfwInputJoystickAxis(js, (int) i, 0.f);
+ else
+ {
+ const float value = (2.f * (raw - axis->minimum) / size) - 1.f;
+ _glfwInputJoystickAxis(js, (int) i, value);
+ }
+ }
+ }
+
+ if (mode & _GLFW_POLL_BUTTONS)
+ {
+ CFIndex i;
+
+ for (i = 0; i < CFArrayGetCount(js->ns.buttons); i++)
+ {
+ _GLFWjoyelementNS* button = (_GLFWjoyelementNS*)
+ CFArrayGetValueAtIndex(js->ns.buttons, i);
+ const char value = getElementValue(js, button) - button->minimum;
+ const int state = (value > 0) ? GLFW_PRESS : GLFW_RELEASE;
+ _glfwInputJoystickButton(js, (int) i, state);
+ }
+
+ for (i = 0; i < CFArrayGetCount(js->ns.hats); i++)
+ {
+ const int states[9] =
+ {
+ GLFW_HAT_UP,
+ GLFW_HAT_RIGHT_UP,
+ GLFW_HAT_RIGHT,
+ GLFW_HAT_RIGHT_DOWN,
+ GLFW_HAT_DOWN,
+ GLFW_HAT_LEFT_DOWN,
+ GLFW_HAT_LEFT,
+ GLFW_HAT_LEFT_UP,
+ GLFW_HAT_CENTERED
+ };
+
+ _GLFWjoyelementNS* hat = (_GLFWjoyelementNS*)
+ CFArrayGetValueAtIndex(js->ns.hats, i);
+ long state = getElementValue(js, hat) - hat->minimum;
+ if (state < 0 || state > 8)
+ state = 8;
+
+ _glfwInputJoystickHat(js, (int) i, states[state]);
+ }
+ }
+
+ return js->present;
+}
+
+void _glfwPlatformUpdateGamepadGUID(char* guid)
+{
+ if ((strncmp(guid + 4, "000000000000", 12) == 0) &&
+ (strncmp(guid + 20, "000000000000", 12) == 0))
+ {
+ char original[33];
+ strncpy(original, guid, sizeof(original) - 1);
+ sprintf(guid, "03000000%.4s0000%.4s000000000000",
+ original, original + 16);
+ }
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_monitor.m b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_monitor.m
new file mode 100644
index 0000000..dadae30
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_monitor.m
@@ -0,0 +1,631 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <stdlib.h>
+#include <limits.h>
+#include <math.h>
+
+#include <IOKit/graphics/IOGraphicsLib.h>
+#include <ApplicationServices/ApplicationServices.h>
+
+
+// Get the name of the specified display, or NULL
+//
+static char* getMonitorName(CGDirectDisplayID displayID, NSScreen* screen)
+{
+ // IOKit doesn't work on Apple Silicon anymore
+ // Luckily, 10.15 introduced -[NSScreen localizedName].
+ // Use it if available, and fall back to IOKit otherwise.
+ if (screen)
+ {
+ if ([screen respondsToSelector:@selector(localizedName)])
+ {
+ NSString* name = [screen valueForKey:@"localizedName"];
+ if (name)
+ return _glfw_strdup([name UTF8String]);
+ }
+ }
+
+ io_iterator_t it;
+ io_service_t service;
+ CFDictionaryRef info;
+
+ if (IOServiceGetMatchingServices(MACH_PORT_NULL,
+ IOServiceMatching("IODisplayConnect"),
+ &it) != 0)
+ {
+ // This may happen if a desktop Mac is running headless
+ return _glfw_strdup("Display");
+ }
+
+ while ((service = IOIteratorNext(it)) != 0)
+ {
+ info = IODisplayCreateInfoDictionary(service,
+ kIODisplayOnlyPreferredName);
+
+ CFNumberRef vendorIDRef =
+ CFDictionaryGetValue(info, CFSTR(kDisplayVendorID));
+ CFNumberRef productIDRef =
+ CFDictionaryGetValue(info, CFSTR(kDisplayProductID));
+ if (!vendorIDRef || !productIDRef)
+ {
+ CFRelease(info);
+ continue;
+ }
+
+ unsigned int vendorID, productID;
+ CFNumberGetValue(vendorIDRef, kCFNumberIntType, &vendorID);
+ CFNumberGetValue(productIDRef, kCFNumberIntType, &productID);
+
+ if (CGDisplayVendorNumber(displayID) == vendorID &&
+ CGDisplayModelNumber(displayID) == productID)
+ {
+ // Info dictionary is used and freed below
+ break;
+ }
+
+ CFRelease(info);
+ }
+
+ IOObjectRelease(it);
+
+ if (!service)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to find service port for display");
+ return _glfw_strdup("Display");
+ }
+
+ CFDictionaryRef names =
+ CFDictionaryGetValue(info, CFSTR(kDisplayProductName));
+
+ CFStringRef nameRef;
+
+ if (!names || !CFDictionaryGetValueIfPresent(names, CFSTR("en_US"),
+ (const void**) &nameRef))
+ {
+ // This may happen if a desktop Mac is running headless
+ CFRelease(info);
+ return _glfw_strdup("Display");
+ }
+
+ const CFIndex size =
+ CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef),
+ kCFStringEncodingUTF8);
+ char* name = calloc(size + 1, 1);
+ CFStringGetCString(nameRef, name, size, kCFStringEncodingUTF8);
+
+ CFRelease(info);
+ return name;
+}
+
+// Check whether the display mode should be included in enumeration
+//
+static GLFWbool modeIsGood(CGDisplayModeRef mode)
+{
+ uint32_t flags = CGDisplayModeGetIOFlags(mode);
+
+ if (!(flags & kDisplayModeValidFlag) || !(flags & kDisplayModeSafeFlag))
+ return GLFW_FALSE;
+ if (flags & kDisplayModeInterlacedFlag)
+ return GLFW_FALSE;
+ if (flags & kDisplayModeStretchedFlag)
+ return GLFW_FALSE;
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
+ CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
+ if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) &&
+ CFStringCompare(format, CFSTR(IO32BitDirectPixels), 0))
+ {
+ CFRelease(format);
+ return GLFW_FALSE;
+ }
+
+ CFRelease(format);
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
+ return GLFW_TRUE;
+}
+
+// Convert Core Graphics display mode to GLFW video mode
+//
+static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode,
+ double fallbackRefreshRate)
+{
+ GLFWvidmode result;
+ result.width = (int) CGDisplayModeGetWidth(mode);
+ result.height = (int) CGDisplayModeGetHeight(mode);
+ result.refreshRate = (int) round(CGDisplayModeGetRefreshRate(mode));
+
+ if (result.refreshRate == 0)
+ result.refreshRate = (int) round(fallbackRefreshRate);
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
+ CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
+ if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) == 0)
+ {
+ result.redBits = 5;
+ result.greenBits = 5;
+ result.blueBits = 5;
+ }
+ else
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
+ {
+ result.redBits = 8;
+ result.greenBits = 8;
+ result.blueBits = 8;
+ }
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
+ CFRelease(format);
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
+ return result;
+}
+
+// Starts reservation for display fading
+//
+static CGDisplayFadeReservationToken beginFadeReservation(void)
+{
+ CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken;
+
+ if (CGAcquireDisplayFadeReservation(5, &token) == kCGErrorSuccess)
+ {
+ CGDisplayFade(token, 0.3,
+ kCGDisplayBlendNormal,
+ kCGDisplayBlendSolidColor,
+ 0.0, 0.0, 0.0,
+ TRUE);
+ }
+
+ return token;
+}
+
+// Ends reservation for display fading
+//
+static void endFadeReservation(CGDisplayFadeReservationToken token)
+{
+ if (token != kCGDisplayFadeReservationInvalidToken)
+ {
+ CGDisplayFade(token, 0.5,
+ kCGDisplayBlendSolidColor,
+ kCGDisplayBlendNormal,
+ 0.0, 0.0, 0.0,
+ FALSE);
+ CGReleaseDisplayFadeReservation(token);
+ }
+}
+
+// Returns the display refresh rate queried from the I/O registry
+//
+static double getFallbackRefreshRate(CGDirectDisplayID displayID)
+{
+ double refreshRate = 60.0;
+
+ io_iterator_t it;
+ io_service_t service;
+
+ if (IOServiceGetMatchingServices(MACH_PORT_NULL,
+ IOServiceMatching("IOFramebuffer"),
+ &it) != 0)
+ {
+ return refreshRate;
+ }
+
+ while ((service = IOIteratorNext(it)) != 0)
+ {
+ const CFNumberRef indexRef =
+ IORegistryEntryCreateCFProperty(service,
+ CFSTR("IOFramebufferOpenGLIndex"),
+ kCFAllocatorDefault,
+ kNilOptions);
+ if (!indexRef)
+ continue;
+
+ uint32_t index = 0;
+ CFNumberGetValue(indexRef, kCFNumberIntType, &index);
+ CFRelease(indexRef);
+
+ if (CGOpenGLDisplayMaskToDisplayID(1 << index) != displayID)
+ continue;
+
+ const CFNumberRef clockRef =
+ IORegistryEntryCreateCFProperty(service,
+ CFSTR("IOFBCurrentPixelClock"),
+ kCFAllocatorDefault,
+ kNilOptions);
+ const CFNumberRef countRef =
+ IORegistryEntryCreateCFProperty(service,
+ CFSTR("IOFBCurrentPixelCount"),
+ kCFAllocatorDefault,
+ kNilOptions);
+
+ uint32_t clock = 0, count = 0;
+
+ if (clockRef)
+ {
+ CFNumberGetValue(clockRef, kCFNumberIntType, &clock);
+ CFRelease(clockRef);
+ }
+
+ if (countRef)
+ {
+ CFNumberGetValue(countRef, kCFNumberIntType, &count);
+ CFRelease(countRef);
+ }
+
+ if (clock > 0 && count > 0)
+ refreshRate = clock / (double) count;
+
+ break;
+ }
+
+ IOObjectRelease(it);
+ return refreshRate;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Poll for changes in the set of connected monitors
+//
+void _glfwPollMonitorsNS(void)
+{
+ uint32_t displayCount;
+ CGGetOnlineDisplayList(0, NULL, &displayCount);
+ CGDirectDisplayID* displays = calloc(displayCount, sizeof(CGDirectDisplayID));
+ CGGetOnlineDisplayList(displayCount, displays, &displayCount);
+
+ for (int i = 0; i < _glfw.monitorCount; i++)
+ _glfw.monitors[i]->ns.screen = nil;
+
+ _GLFWmonitor** disconnected = NULL;
+ uint32_t disconnectedCount = _glfw.monitorCount;
+ if (disconnectedCount)
+ {
+ disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));
+ memcpy(disconnected,
+ _glfw.monitors,
+ _glfw.monitorCount * sizeof(_GLFWmonitor*));
+ }
+
+ for (uint32_t i = 0; i < displayCount; i++)
+ {
+ if (CGDisplayIsAsleep(displays[i]))
+ continue;
+
+ const uint32_t unitNumber = CGDisplayUnitNumber(displays[i]);
+ NSScreen* screen = nil;
+
+ for (screen in [NSScreen screens])
+ {
+ NSNumber* screenNumber = [screen deviceDescription][@"NSScreenNumber"];
+
+ // HACK: Compare unit numbers instead of display IDs to work around
+ // display replacement on machines with automatic graphics
+ // switching
+ if (CGDisplayUnitNumber([screenNumber unsignedIntValue]) == unitNumber)
+ break;
+ }
+
+ // HACK: Compare unit numbers instead of display IDs to work around
+ // display replacement on machines with automatic graphics
+ // switching
+ uint32_t j;
+ for (j = 0; j < disconnectedCount; j++)
+ {
+ if (disconnected[j] && disconnected[j]->ns.unitNumber == unitNumber)
+ {
+ disconnected[j]->ns.screen = screen;
+ disconnected[j] = NULL;
+ break;
+ }
+ }
+
+ if (j < disconnectedCount)
+ continue;
+
+ const CGSize size = CGDisplayScreenSize(displays[i]);
+ char* name = getMonitorName(displays[i], screen);
+ if (!name)
+ continue;
+
+ _GLFWmonitor* monitor = _glfwAllocMonitor(name, size.width, size.height);
+ monitor->ns.displayID = displays[i];
+ monitor->ns.unitNumber = unitNumber;
+ monitor->ns.screen = screen;
+
+ free(name);
+
+ CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displays[i]);
+ if (CGDisplayModeGetRefreshRate(mode) == 0.0)
+ monitor->ns.fallbackRefreshRate = getFallbackRefreshRate(displays[i]);
+ CGDisplayModeRelease(mode);
+
+ _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
+ }
+
+ for (uint32_t i = 0; i < disconnectedCount; i++)
+ {
+ if (disconnected[i])
+ _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);
+ }
+
+ free(disconnected);
+ free(displays);
+}
+
+// Change the current video mode
+//
+void _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired)
+{
+ GLFWvidmode current;
+ _glfwPlatformGetVideoMode(monitor, &current);
+
+ const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired);
+ if (_glfwCompareVideoModes(&current, best) == 0)
+ return;
+
+ CFArrayRef modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
+ const CFIndex count = CFArrayGetCount(modes);
+ CGDisplayModeRef native = NULL;
+
+ for (CFIndex i = 0; i < count; i++)
+ {
+ CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
+ if (!modeIsGood(dm))
+ continue;
+
+ const GLFWvidmode mode =
+ vidmodeFromCGDisplayMode(dm, monitor->ns.fallbackRefreshRate);
+ if (_glfwCompareVideoModes(best, &mode) == 0)
+ {
+ native = dm;
+ break;
+ }
+ }
+
+ if (native)
+ {
+ if (monitor->ns.previousMode == NULL)
+ monitor->ns.previousMode = CGDisplayCopyDisplayMode(monitor->ns.displayID);
+
+ CGDisplayFadeReservationToken token = beginFadeReservation();
+ CGDisplaySetDisplayMode(monitor->ns.displayID, native, NULL);
+ endFadeReservation(token);
+ }
+
+ CFRelease(modes);
+}
+
+// Restore the previously saved (original) video mode
+//
+void _glfwRestoreVideoModeNS(_GLFWmonitor* monitor)
+{
+ if (monitor->ns.previousMode)
+ {
+ CGDisplayFadeReservationToken token = beginFadeReservation();
+ CGDisplaySetDisplayMode(monitor->ns.displayID,
+ monitor->ns.previousMode, NULL);
+ endFadeReservation(token);
+
+ CGDisplayModeRelease(monitor->ns.previousMode);
+ monitor->ns.previousMode = NULL;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)
+{
+}
+
+void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
+{
+ @autoreleasepool {
+
+ const CGRect bounds = CGDisplayBounds(monitor->ns.displayID);
+
+ if (xpos)
+ *xpos = (int) bounds.origin.x;
+ if (ypos)
+ *ypos = (int) bounds.origin.y;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
+ float* xscale, float* yscale)
+{
+ @autoreleasepool {
+
+ if (!monitor->ns.screen)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Cannot query content scale without screen");
+ }
+
+ const NSRect points = [monitor->ns.screen frame];
+ const NSRect pixels = [monitor->ns.screen convertRectToBacking:points];
+
+ if (xscale)
+ *xscale = (float) (pixels.size.width / points.size.width);
+ if (yscale)
+ *yscale = (float) (pixels.size.height / points.size.height);
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
+ int* xpos, int* ypos,
+ int* width, int* height)
+{
+ @autoreleasepool {
+
+ if (!monitor->ns.screen)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Cannot query workarea without screen");
+ }
+
+ const NSRect frameRect = [monitor->ns.screen visibleFrame];
+
+ if (xpos)
+ *xpos = frameRect.origin.x;
+ if (ypos)
+ *ypos = _glfwTransformYNS(frameRect.origin.y + frameRect.size.height - 1);
+ if (width)
+ *width = frameRect.size.width;
+ if (height)
+ *height = frameRect.size.height;
+
+ } // autoreleasepool
+}
+
+GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
+{
+ @autoreleasepool {
+
+ *count = 0;
+
+ CFArrayRef modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
+ const CFIndex found = CFArrayGetCount(modes);
+ GLFWvidmode* result = calloc(found, sizeof(GLFWvidmode));
+
+ for (CFIndex i = 0; i < found; i++)
+ {
+ CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
+ if (!modeIsGood(dm))
+ continue;
+
+ const GLFWvidmode mode =
+ vidmodeFromCGDisplayMode(dm, monitor->ns.fallbackRefreshRate);
+ CFIndex j;
+
+ for (j = 0; j < *count; j++)
+ {
+ if (_glfwCompareVideoModes(result + j, &mode) == 0)
+ break;
+ }
+
+ // Skip duplicate modes
+ if (j < *count)
+ continue;
+
+ (*count)++;
+ result[*count - 1] = mode;
+ }
+
+ CFRelease(modes);
+ return result;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode *mode)
+{
+ @autoreleasepool {
+
+ CGDisplayModeRef native = CGDisplayCopyDisplayMode(monitor->ns.displayID);
+ *mode = vidmodeFromCGDisplayMode(native, monitor->ns.fallbackRefreshRate);
+ CGDisplayModeRelease(native);
+
+ } // autoreleasepool
+}
+
+GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
+{
+ @autoreleasepool {
+
+ uint32_t size = CGDisplayGammaTableCapacity(monitor->ns.displayID);
+ CGGammaValue* values = calloc(size * 3, sizeof(CGGammaValue));
+
+ CGGetDisplayTransferByTable(monitor->ns.displayID,
+ size,
+ values,
+ values + size,
+ values + size * 2,
+ &size);
+
+ _glfwAllocGammaArrays(ramp, size);
+
+ for (uint32_t i = 0; i < size; i++)
+ {
+ ramp->red[i] = (unsigned short) (values[i] * 65535);
+ ramp->green[i] = (unsigned short) (values[i + size] * 65535);
+ ramp->blue[i] = (unsigned short) (values[i + size * 2] * 65535);
+ }
+
+ free(values);
+ return GLFW_TRUE;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
+{
+ @autoreleasepool {
+
+ CGGammaValue* values = calloc(ramp->size * 3, sizeof(CGGammaValue));
+
+ for (unsigned int i = 0; i < ramp->size; i++)
+ {
+ values[i] = ramp->red[i] / 65535.f;
+ values[i + ramp->size] = ramp->green[i] / 65535.f;
+ values[i + ramp->size * 2] = ramp->blue[i] / 65535.f;
+ }
+
+ CGSetDisplayTransferByTable(monitor->ns.displayID,
+ ramp->size,
+ values,
+ values + ramp->size,
+ values + ramp->size * 2);
+
+ free(values);
+
+ } // autoreleasepool
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(kCGNullDirectDisplay);
+ return monitor->ns.displayID;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_platform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_platform.h
new file mode 100644
index 0000000..1d7c03c
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_platform.h
@@ -0,0 +1,209 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <stdint.h>
+#include <dlfcn.h>
+
+#include <Carbon/Carbon.h>
+
+// NOTE: All of NSGL was deprecated in the 10.14 SDK
+// This disables the pointless warnings for every symbol we use
+#ifndef GL_SILENCE_DEPRECATION
+#define GL_SILENCE_DEPRECATION
+#endif
+
+#if defined(__OBJC__)
+#import <Cocoa/Cocoa.h>
+#else
+typedef void* id;
+#endif
+
+// NOTE: Many Cocoa enum values have been renamed and we need to build across
+// SDK versions where one is unavailable or the other deprecated
+// We use the newer names in code and these macros to handle compatibility
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 101200
+ #define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat
+ #define NSEventMaskAny NSAnyEventMask
+ #define NSEventMaskKeyUp NSKeyUpMask
+ #define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
+ #define NSEventModifierFlagCommand NSCommandKeyMask
+ #define NSEventModifierFlagControl NSControlKeyMask
+ #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask
+ #define NSEventModifierFlagOption NSAlternateKeyMask
+ #define NSEventModifierFlagShift NSShiftKeyMask
+ #define NSEventTypeApplicationDefined NSApplicationDefined
+ #define NSWindowStyleMaskBorderless NSBorderlessWindowMask
+ #define NSWindowStyleMaskClosable NSClosableWindowMask
+ #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
+ #define NSWindowStyleMaskResizable NSResizableWindowMask
+ #define NSWindowStyleMaskTitled NSTitledWindowMask
+#endif
+
+typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
+typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
+
+typedef struct VkMacOSSurfaceCreateInfoMVK
+{
+ VkStructureType sType;
+ const void* pNext;
+ VkMacOSSurfaceCreateFlagsMVK flags;
+ const void* pView;
+} VkMacOSSurfaceCreateInfoMVK;
+
+typedef struct VkMetalSurfaceCreateInfoEXT
+{
+ VkStructureType sType;
+ const void* pNext;
+ VkMetalSurfaceCreateFlagsEXT flags;
+ const void* pLayer;
+} VkMetalSurfaceCreateInfoEXT;
+
+typedef VkResult (APIENTRY *PFN_vkCreateMacOSSurfaceMVK)(VkInstance,const VkMacOSSurfaceCreateInfoMVK*,const VkAllocationCallbacks*,VkSurfaceKHR*);
+typedef VkResult (APIENTRY *PFN_vkCreateMetalSurfaceEXT)(VkInstance,const VkMetalSurfaceCreateInfoEXT*,const VkAllocationCallbacks*,VkSurfaceKHR*);
+
+#include "posix_thread.h"
+#include "cocoa_joystick.h"
+#include "nsgl_context.h"
+#include "egl_context.h"
+#include "osmesa_context.h"
+
+#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
+#define _glfw_dlclose(handle) dlclose(handle)
+#define _glfw_dlsym(handle, name) dlsym(handle, name)
+
+#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->ns.layer)
+#define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY
+
+#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS ns
+#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns
+#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerNS ns
+#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS ns
+#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorNS ns
+
+// HIToolbox.framework pointer typedefs
+#define kTISPropertyUnicodeKeyLayoutData _glfw.ns.tis.kPropertyUnicodeKeyLayoutData
+typedef TISInputSourceRef (*PFN_TISCopyCurrentKeyboardLayoutInputSource)(void);
+#define TISCopyCurrentKeyboardLayoutInputSource _glfw.ns.tis.CopyCurrentKeyboardLayoutInputSource
+typedef void* (*PFN_TISGetInputSourceProperty)(TISInputSourceRef,CFStringRef);
+#define TISGetInputSourceProperty _glfw.ns.tis.GetInputSourceProperty
+typedef UInt8 (*PFN_LMGetKbdType)(void);
+#define LMGetKbdType _glfw.ns.tis.GetKbdType
+
+
+// Cocoa-specific per-window data
+//
+typedef struct _GLFWwindowNS
+{
+ id object;
+ id delegate;
+ id view;
+ id layer;
+
+ GLFWbool maximized;
+ GLFWbool occluded;
+ GLFWbool retina;
+
+ // Cached window properties to filter out duplicate events
+ int width, height;
+ int fbWidth, fbHeight;
+ float xscale, yscale;
+
+ // The total sum of the distances the cursor has been warped
+ // since the last cursor motion event was processed
+ // This is kept to counteract Cocoa doing the same internally
+ double cursorWarpDeltaX, cursorWarpDeltaY;
+} _GLFWwindowNS;
+
+// Cocoa-specific global data
+//
+typedef struct _GLFWlibraryNS
+{
+ CGEventSourceRef eventSource;
+ id delegate;
+ GLFWbool finishedLaunching;
+ GLFWbool cursorHidden;
+ TISInputSourceRef inputSource;
+ IOHIDManagerRef hidManager;
+ id unicodeData;
+ id helper;
+ id keyUpMonitor;
+ id nibObjects;
+
+ char keynames[GLFW_KEY_LAST + 1][17];
+ short int keycodes[256];
+ short int scancodes[GLFW_KEY_LAST + 1];
+ char* clipboardString;
+ CGPoint cascadePoint;
+ // Where to place the cursor when re-enabled
+ double restoreCursorPosX, restoreCursorPosY;
+ // The window whose disabled cursor mode is active
+ _GLFWwindow* disabledCursorWindow;
+
+ struct {
+ CFBundleRef bundle;
+ PFN_TISCopyCurrentKeyboardLayoutInputSource CopyCurrentKeyboardLayoutInputSource;
+ PFN_TISGetInputSourceProperty GetInputSourceProperty;
+ PFN_LMGetKbdType GetKbdType;
+ CFStringRef kPropertyUnicodeKeyLayoutData;
+ } tis;
+} _GLFWlibraryNS;
+
+// Cocoa-specific per-monitor data
+//
+typedef struct _GLFWmonitorNS
+{
+ CGDirectDisplayID displayID;
+ CGDisplayModeRef previousMode;
+ uint32_t unitNumber;
+ id screen;
+ double fallbackRefreshRate;
+} _GLFWmonitorNS;
+
+// Cocoa-specific per-cursor data
+//
+typedef struct _GLFWcursorNS
+{
+ id object;
+} _GLFWcursorNS;
+
+// Cocoa-specific global timer data
+//
+typedef struct _GLFWtimerNS
+{
+ uint64_t frequency;
+} _GLFWtimerNS;
+
+
+void _glfwInitTimerNS(void);
+
+void _glfwPollMonitorsNS(void);
+void _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired);
+void _glfwRestoreVideoModeNS(_GLFWmonitor* monitor);
+
+float _glfwTransformYNS(float y);
+
+void* _glfwLoadLocalVulkanLoaderNS(void);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_time.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_time.c
new file mode 100644
index 0000000..d390cdc
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_time.c
@@ -0,0 +1,62 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2016 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <mach/mach_time.h>
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialise timer
+//
+void _glfwInitTimerNS(void)
+{
+ mach_timebase_info_data_t info;
+ mach_timebase_info(&info);
+
+ _glfw.timer.ns.frequency = (info.denom * 1e9) / info.numer;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+uint64_t _glfwPlatformGetTimerValue(void)
+{
+ return mach_absolute_time();
+}
+
+uint64_t _glfwPlatformGetTimerFrequency(void)
+{
+ return _glfw.timer.ns.frequency;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_window.m b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_window.m
new file mode 100644
index 0000000..a8add17
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/cocoa_window.m
@@ -0,0 +1,1848 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <float.h>
+#include <string.h>
+
+// Returns the style mask corresponding to the window settings
+//
+static NSUInteger getStyleMask(_GLFWwindow* window)
+{
+ NSUInteger styleMask = NSWindowStyleMaskMiniaturizable;
+
+ if (window->monitor || !window->decorated)
+ styleMask |= NSWindowStyleMaskBorderless;
+ else
+ {
+ styleMask |= NSWindowStyleMaskTitled |
+ NSWindowStyleMaskClosable;
+
+ if (window->resizable)
+ styleMask |= NSWindowStyleMaskResizable;
+ }
+
+ return styleMask;
+}
+
+// Returns whether the cursor is in the content area of the specified window
+//
+static GLFWbool cursorInContentArea(_GLFWwindow* window)
+{
+ const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];
+ return [window->ns.view mouse:pos inRect:[window->ns.view frame]];
+}
+
+// Hides the cursor if not already hidden
+//
+static void hideCursor(_GLFWwindow* window)
+{
+ if (!_glfw.ns.cursorHidden)
+ {
+ [NSCursor hide];
+ _glfw.ns.cursorHidden = GLFW_TRUE;
+ }
+}
+
+// Shows the cursor if not already shown
+//
+static void showCursor(_GLFWwindow* window)
+{
+ if (_glfw.ns.cursorHidden)
+ {
+ [NSCursor unhide];
+ _glfw.ns.cursorHidden = GLFW_FALSE;
+ }
+}
+
+// Updates the cursor image according to its cursor mode
+//
+static void updateCursorImage(_GLFWwindow* window)
+{
+ if (window->cursorMode == GLFW_CURSOR_NORMAL)
+ {
+ showCursor(window);
+
+ if (window->cursor)
+ [(NSCursor*) window->cursor->ns.object set];
+ else
+ [[NSCursor arrowCursor] set];
+ }
+ else
+ hideCursor(window);
+}
+
+// Apply chosen cursor mode to a focused window
+//
+static void updateCursorMode(_GLFWwindow* window)
+{
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ _glfw.ns.disabledCursorWindow = window;
+ _glfwPlatformGetCursorPos(window,
+ &_glfw.ns.restoreCursorPosX,
+ &_glfw.ns.restoreCursorPosY);
+ _glfwCenterCursorInContentArea(window);
+ CGAssociateMouseAndMouseCursorPosition(false);
+ }
+ else if (_glfw.ns.disabledCursorWindow == window)
+ {
+ _glfw.ns.disabledCursorWindow = NULL;
+ _glfwPlatformSetCursorPos(window,
+ _glfw.ns.restoreCursorPosX,
+ _glfw.ns.restoreCursorPosY);
+ // NOTE: The matching CGAssociateMouseAndMouseCursorPosition call is
+ // made in _glfwPlatformSetCursorPos as part of a workaround
+ }
+
+ if (cursorInContentArea(window))
+ updateCursorImage(window);
+}
+
+// Make the specified window and its video mode active on its monitor
+//
+static void acquireMonitor(_GLFWwindow* window)
+{
+ _glfwSetVideoModeNS(window->monitor, &window->videoMode);
+ const CGRect bounds = CGDisplayBounds(window->monitor->ns.displayID);
+ const NSRect frame = NSMakeRect(bounds.origin.x,
+ _glfwTransformYNS(bounds.origin.y + bounds.size.height - 1),
+ bounds.size.width,
+ bounds.size.height);
+
+ [window->ns.object setFrame:frame display:YES];
+
+ _glfwInputMonitorWindow(window->monitor, window);
+}
+
+// Remove the window and restore the original video mode
+//
+static void releaseMonitor(_GLFWwindow* window)
+{
+ if (window->monitor->window != window)
+ return;
+
+ _glfwInputMonitorWindow(window->monitor, NULL);
+ _glfwRestoreVideoModeNS(window->monitor);
+}
+
+// Translates macOS key modifiers into GLFW ones
+//
+static int translateFlags(NSUInteger flags)
+{
+ int mods = 0;
+
+ if (flags & NSEventModifierFlagShift)
+ mods |= GLFW_MOD_SHIFT;
+ if (flags & NSEventModifierFlagControl)
+ mods |= GLFW_MOD_CONTROL;
+ if (flags & NSEventModifierFlagOption)
+ mods |= GLFW_MOD_ALT;
+ if (flags & NSEventModifierFlagCommand)
+ mods |= GLFW_MOD_SUPER;
+ if (flags & NSEventModifierFlagCapsLock)
+ mods |= GLFW_MOD_CAPS_LOCK;
+
+ return mods;
+}
+
+// Translates a macOS keycode to a GLFW keycode
+//
+static int translateKey(unsigned int key)
+{
+ if (key >= sizeof(_glfw.ns.keycodes) / sizeof(_glfw.ns.keycodes[0]))
+ return GLFW_KEY_UNKNOWN;
+
+ return _glfw.ns.keycodes[key];
+}
+
+// Translate a GLFW keycode to a Cocoa modifier flag
+//
+static NSUInteger translateKeyToModifierFlag(int key)
+{
+ switch (key)
+ {
+ case GLFW_KEY_LEFT_SHIFT:
+ case GLFW_KEY_RIGHT_SHIFT:
+ return NSEventModifierFlagShift;
+ case GLFW_KEY_LEFT_CONTROL:
+ case GLFW_KEY_RIGHT_CONTROL:
+ return NSEventModifierFlagControl;
+ case GLFW_KEY_LEFT_ALT:
+ case GLFW_KEY_RIGHT_ALT:
+ return NSEventModifierFlagOption;
+ case GLFW_KEY_LEFT_SUPER:
+ case GLFW_KEY_RIGHT_SUPER:
+ return NSEventModifierFlagCommand;
+ case GLFW_KEY_CAPS_LOCK:
+ return NSEventModifierFlagCapsLock;
+ }
+
+ return 0;
+}
+
+// Defines a constant for empty ranges in NSTextInputClient
+//
+static const NSRange kEmptyRange = { NSNotFound, 0 };
+
+
+//------------------------------------------------------------------------
+// Delegate for window related notifications
+//------------------------------------------------------------------------
+
+@interface GLFWWindowDelegate : NSObject
+{
+ _GLFWwindow* window;
+}
+
+- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow;
+
+@end
+
+@implementation GLFWWindowDelegate
+
+- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow
+{
+ self = [super init];
+ if (self != nil)
+ window = initWindow;
+
+ return self;
+}
+
+- (BOOL)windowShouldClose:(id)sender
+{
+ _glfwInputWindowCloseRequest(window);
+ return NO;
+}
+
+- (void)windowDidResize:(NSNotification *)notification
+{
+ if (window->context.source == GLFW_NATIVE_CONTEXT_API)
+ [window->context.nsgl.object update];
+
+ if (_glfw.ns.disabledCursorWindow == window)
+ _glfwCenterCursorInContentArea(window);
+
+ const int maximized = [window->ns.object isZoomed];
+ if (window->ns.maximized != maximized)
+ {
+ window->ns.maximized = maximized;
+ _glfwInputWindowMaximize(window, maximized);
+ }
+
+ const NSRect contentRect = [window->ns.view frame];
+ const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];
+
+ if (fbRect.size.width != window->ns.fbWidth ||
+ fbRect.size.height != window->ns.fbHeight)
+ {
+ window->ns.fbWidth = fbRect.size.width;
+ window->ns.fbHeight = fbRect.size.height;
+ _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
+ }
+
+ if (contentRect.size.width != window->ns.width ||
+ contentRect.size.height != window->ns.height)
+ {
+ window->ns.width = contentRect.size.width;
+ window->ns.height = contentRect.size.height;
+ _glfwInputWindowSize(window, contentRect.size.width, contentRect.size.height);
+ }
+}
+
+- (void)windowDidMove:(NSNotification *)notification
+{
+ if (window->context.source == GLFW_NATIVE_CONTEXT_API)
+ [window->context.nsgl.object update];
+
+ if (_glfw.ns.disabledCursorWindow == window)
+ _glfwCenterCursorInContentArea(window);
+
+ int x, y;
+ _glfwPlatformGetWindowPos(window, &x, &y);
+ _glfwInputWindowPos(window, x, y);
+}
+
+- (void)windowDidMiniaturize:(NSNotification *)notification
+{
+ if (window->monitor)
+ releaseMonitor(window);
+
+ _glfwInputWindowIconify(window, GLFW_TRUE);
+}
+
+- (void)windowDidDeminiaturize:(NSNotification *)notification
+{
+ if (window->monitor)
+ acquireMonitor(window);
+
+ _glfwInputWindowIconify(window, GLFW_FALSE);
+}
+
+- (void)windowDidBecomeKey:(NSNotification *)notification
+{
+ if (_glfw.ns.disabledCursorWindow == window)
+ _glfwCenterCursorInContentArea(window);
+
+ _glfwInputWindowFocus(window, GLFW_TRUE);
+ updateCursorMode(window);
+}
+
+- (void)windowDidResignKey:(NSNotification *)notification
+{
+ if (window->monitor && window->autoIconify)
+ _glfwPlatformIconifyWindow(window);
+
+ _glfwInputWindowFocus(window, GLFW_FALSE);
+}
+
+- (void)windowDidChangeOcclusionState:(NSNotification* )notification
+{
+ if ([window->ns.object occlusionState] & NSWindowOcclusionStateVisible)
+ window->ns.occluded = GLFW_FALSE;
+ else
+ window->ns.occluded = GLFW_TRUE;
+}
+
+@end
+
+
+//------------------------------------------------------------------------
+// Content view class for the GLFW window
+//------------------------------------------------------------------------
+
+@interface GLFWContentView : NSView <NSTextInputClient>
+{
+ _GLFWwindow* window;
+ NSTrackingArea* trackingArea;
+ NSMutableAttributedString* markedText;
+}
+
+- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow;
+
+@end
+
+@implementation GLFWContentView
+
+- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow
+{
+ self = [super init];
+ if (self != nil)
+ {
+ window = initWindow;
+ trackingArea = nil;
+ markedText = [[NSMutableAttributedString alloc] init];
+
+ [self updateTrackingAreas];
+ // NOTE: kUTTypeURL corresponds to NSPasteboardTypeURL but is available
+ // on 10.7 without having been deprecated yet
+ [self registerForDraggedTypes:@[(__bridge NSString*) kUTTypeURL]];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [trackingArea release];
+ [markedText release];
+ [super dealloc];
+}
+
+- (BOOL)isOpaque
+{
+ return [window->ns.object isOpaque];
+}
+
+- (BOOL)canBecomeKeyView
+{
+ return YES;
+}
+
+- (BOOL)acceptsFirstResponder
+{
+ return YES;
+}
+
+- (BOOL)wantsUpdateLayer
+{
+ return YES;
+}
+
+- (void)updateLayer
+{
+ if (window->context.source == GLFW_NATIVE_CONTEXT_API)
+ [window->context.nsgl.object update];
+
+ _glfwInputWindowDamage(window);
+}
+
+- (void)cursorUpdate:(NSEvent *)event
+{
+ updateCursorImage(window);
+}
+
+- (BOOL)acceptsFirstMouse:(NSEvent *)event
+{
+ return YES;
+}
+
+- (void)mouseDown:(NSEvent *)event
+{
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_LEFT,
+ GLFW_PRESS,
+ translateFlags([event modifierFlags]));
+}
+
+- (void)mouseDragged:(NSEvent *)event
+{
+ [self mouseMoved:event];
+}
+
+- (void)mouseUp:(NSEvent *)event
+{
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_LEFT,
+ GLFW_RELEASE,
+ translateFlags([event modifierFlags]));
+}
+
+- (void)mouseMoved:(NSEvent *)event
+{
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ const double dx = [event deltaX] - window->ns.cursorWarpDeltaX;
+ const double dy = [event deltaY] - window->ns.cursorWarpDeltaY;
+
+ _glfwInputCursorPos(window,
+ window->virtualCursorPosX + dx,
+ window->virtualCursorPosY + dy);
+ }
+ else
+ {
+ const NSRect contentRect = [window->ns.view frame];
+ // NOTE: The returned location uses base 0,1 not 0,0
+ const NSPoint pos = [event locationInWindow];
+
+ _glfwInputCursorPos(window, pos.x, contentRect.size.height - pos.y);
+ }
+
+ window->ns.cursorWarpDeltaX = 0;
+ window->ns.cursorWarpDeltaY = 0;
+}
+
+- (void)rightMouseDown:(NSEvent *)event
+{
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_RIGHT,
+ GLFW_PRESS,
+ translateFlags([event modifierFlags]));
+}
+
+- (void)rightMouseDragged:(NSEvent *)event
+{
+ [self mouseMoved:event];
+}
+
+- (void)rightMouseUp:(NSEvent *)event
+{
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_RIGHT,
+ GLFW_RELEASE,
+ translateFlags([event modifierFlags]));
+}
+
+- (void)otherMouseDown:(NSEvent *)event
+{
+ _glfwInputMouseClick(window,
+ (int) [event buttonNumber],
+ GLFW_PRESS,
+ translateFlags([event modifierFlags]));
+}
+
+- (void)otherMouseDragged:(NSEvent *)event
+{
+ [self mouseMoved:event];
+}
+
+- (void)otherMouseUp:(NSEvent *)event
+{
+ _glfwInputMouseClick(window,
+ (int) [event buttonNumber],
+ GLFW_RELEASE,
+ translateFlags([event modifierFlags]));
+}
+
+- (void)mouseExited:(NSEvent *)event
+{
+ if (window->cursorMode == GLFW_CURSOR_HIDDEN)
+ showCursor(window);
+
+ _glfwInputCursorEnter(window, GLFW_FALSE);
+}
+
+- (void)mouseEntered:(NSEvent *)event
+{
+ if (window->cursorMode == GLFW_CURSOR_HIDDEN)
+ hideCursor(window);
+
+ _glfwInputCursorEnter(window, GLFW_TRUE);
+}
+
+- (void)viewDidChangeBackingProperties
+{
+ const NSRect contentRect = [window->ns.view frame];
+ const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];
+ const float xscale = fbRect.size.width / contentRect.size.width;
+ const float yscale = fbRect.size.height / contentRect.size.height;
+
+ if (xscale != window->ns.xscale || yscale != window->ns.yscale)
+ {
+ if (window->ns.retina && window->ns.layer)
+ [window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
+
+ window->ns.xscale = xscale;
+ window->ns.yscale = yscale;
+ _glfwInputWindowContentScale(window, xscale, yscale);
+ }
+
+ if (fbRect.size.width != window->ns.fbWidth ||
+ fbRect.size.height != window->ns.fbHeight)
+ {
+ window->ns.fbWidth = fbRect.size.width;
+ window->ns.fbHeight = fbRect.size.height;
+ _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
+ }
+}
+
+- (void)drawRect:(NSRect)rect
+{
+ _glfwInputWindowDamage(window);
+}
+
+- (void)updateTrackingAreas
+{
+ if (trackingArea != nil)
+ {
+ [self removeTrackingArea:trackingArea];
+ [trackingArea release];
+ }
+
+ const NSTrackingAreaOptions options = NSTrackingMouseEnteredAndExited |
+ NSTrackingActiveInKeyWindow |
+ NSTrackingEnabledDuringMouseDrag |
+ NSTrackingCursorUpdate |
+ NSTrackingInVisibleRect |
+ NSTrackingAssumeInside;
+
+ trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]
+ options:options
+ owner:self
+ userInfo:nil];
+
+ [self addTrackingArea:trackingArea];
+ [super updateTrackingAreas];
+}
+
+- (void)keyDown:(NSEvent *)event
+{
+ const int key = translateKey([event keyCode]);
+ const int mods = translateFlags([event modifierFlags]);
+
+ _glfwInputKey(window, key, [event keyCode], GLFW_PRESS, mods);
+
+ [self interpretKeyEvents:@[event]];
+}
+
+- (void)flagsChanged:(NSEvent *)event
+{
+ int action;
+ const unsigned int modifierFlags =
+ [event modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask;
+ const int key = translateKey([event keyCode]);
+ const int mods = translateFlags(modifierFlags);
+ const NSUInteger keyFlag = translateKeyToModifierFlag(key);
+
+ if (keyFlag & modifierFlags)
+ {
+ if (window->keys[key] == GLFW_PRESS)
+ action = GLFW_RELEASE;
+ else
+ action = GLFW_PRESS;
+ }
+ else
+ action = GLFW_RELEASE;
+
+ _glfwInputKey(window, key, [event keyCode], action, mods);
+}
+
+- (void)keyUp:(NSEvent *)event
+{
+ const int key = translateKey([event keyCode]);
+ const int mods = translateFlags([event modifierFlags]);
+ _glfwInputKey(window, key, [event keyCode], GLFW_RELEASE, mods);
+}
+
+- (void)scrollWheel:(NSEvent *)event
+{
+ double deltaX = [event scrollingDeltaX];
+ double deltaY = [event scrollingDeltaY];
+
+ if ([event hasPreciseScrollingDeltas])
+ {
+ deltaX *= 0.1;
+ deltaY *= 0.1;
+ }
+
+ if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0)
+ _glfwInputScroll(window, deltaX, deltaY);
+}
+
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
+{
+ // HACK: We don't know what to say here because we don't know what the
+ // application wants to do with the paths
+ return NSDragOperationGeneric;
+}
+
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
+{
+ const NSRect contentRect = [window->ns.view frame];
+ // NOTE: The returned location uses base 0,1 not 0,0
+ const NSPoint pos = [sender draggingLocation];
+ _glfwInputCursorPos(window, pos.x, contentRect.size.height - pos.y);
+
+ NSPasteboard* pasteboard = [sender draggingPasteboard];
+ NSDictionary* options = @{NSPasteboardURLReadingFileURLsOnlyKey:@YES};
+ NSArray* urls = [pasteboard readObjectsForClasses:@[[NSURL class]]
+ options:options];
+ const NSUInteger count = [urls count];
+ if (count)
+ {
+ char** paths = calloc(count, sizeof(char*));
+
+ for (NSUInteger i = 0; i < count; i++)
+ paths[i] = _glfw_strdup([urls[i] fileSystemRepresentation]);
+
+ _glfwInputDrop(window, (int) count, (const char**) paths);
+
+ for (NSUInteger i = 0; i < count; i++)
+ free(paths[i]);
+ free(paths);
+ }
+
+ return YES;
+}
+
+- (BOOL)hasMarkedText
+{
+ return [markedText length] > 0;
+}
+
+- (NSRange)markedRange
+{
+ if ([markedText length] > 0)
+ return NSMakeRange(0, [markedText length] - 1);
+ else
+ return kEmptyRange;
+}
+
+- (NSRange)selectedRange
+{
+ return kEmptyRange;
+}
+
+- (void)setMarkedText:(id)string
+ selectedRange:(NSRange)selectedRange
+ replacementRange:(NSRange)replacementRange
+{
+ [markedText release];
+ if ([string isKindOfClass:[NSAttributedString class]])
+ markedText = [[NSMutableAttributedString alloc] initWithAttributedString:string];
+ else
+ markedText = [[NSMutableAttributedString alloc] initWithString:string];
+}
+
+- (void)unmarkText
+{
+ [[markedText mutableString] setString:@""];
+}
+
+- (NSArray*)validAttributesForMarkedText
+{
+ return [NSArray array];
+}
+
+- (NSAttributedString*)attributedSubstringForProposedRange:(NSRange)range
+ actualRange:(NSRangePointer)actualRange
+{
+ return nil;
+}
+
+- (NSUInteger)characterIndexForPoint:(NSPoint)point
+{
+ return 0;
+}
+
+- (NSRect)firstRectForCharacterRange:(NSRange)range
+ actualRange:(NSRangePointer)actualRange
+{
+ const NSRect frame = [window->ns.view frame];
+ return NSMakeRect(frame.origin.x, frame.origin.y, 0.0, 0.0);
+}
+
+- (void)insertText:(id)string replacementRange:(NSRange)replacementRange
+{
+ NSString* characters;
+ NSEvent* event = [NSApp currentEvent];
+ const int mods = translateFlags([event modifierFlags]);
+ const int plain = !(mods & GLFW_MOD_SUPER);
+
+ if ([string isKindOfClass:[NSAttributedString class]])
+ characters = [string string];
+ else
+ characters = (NSString*) string;
+
+ NSRange range = NSMakeRange(0, [characters length]);
+ while (range.length)
+ {
+ uint32_t codepoint = 0;
+
+ if ([characters getBytes:&codepoint
+ maxLength:sizeof(codepoint)
+ usedLength:NULL
+ encoding:NSUTF32StringEncoding
+ options:0
+ range:range
+ remainingRange:&range])
+ {
+ if (codepoint >= 0xf700 && codepoint <= 0xf7ff)
+ continue;
+
+ _glfwInputChar(window, codepoint, mods, plain);
+ }
+ }
+}
+
+- (void)doCommandBySelector:(SEL)selector
+{
+}
+
+@end
+
+
+//------------------------------------------------------------------------
+// GLFW window class
+//------------------------------------------------------------------------
+
+@interface GLFWWindow : NSWindow {}
+@end
+
+@implementation GLFWWindow
+
+- (BOOL)canBecomeKeyWindow
+{
+ // Required for NSWindowStyleMaskBorderless windows
+ return YES;
+}
+
+- (BOOL)canBecomeMainWindow
+{
+ return YES;
+}
+
+@end
+
+
+// Create the Cocoa window
+//
+static GLFWbool createNativeWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ window->ns.delegate = [[GLFWWindowDelegate alloc] initWithGlfwWindow:window];
+ if (window->ns.delegate == nil)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to create window delegate");
+ return GLFW_FALSE;
+ }
+
+ NSRect contentRect;
+
+ if (window->monitor)
+ {
+ GLFWvidmode mode;
+ int xpos, ypos;
+
+ _glfwPlatformGetVideoMode(window->monitor, &mode);
+ _glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
+
+ contentRect = NSMakeRect(xpos, ypos, mode.width, mode.height);
+ }
+ else
+ contentRect = NSMakeRect(0, 0, wndconfig->width, wndconfig->height);
+
+ window->ns.object = [[GLFWWindow alloc]
+ initWithContentRect:contentRect
+ styleMask:getStyleMask(window)
+ backing:NSBackingStoreBuffered
+ defer:NO];
+
+ if (window->ns.object == nil)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window");
+ return GLFW_FALSE;
+ }
+
+ if (window->monitor)
+ [window->ns.object setLevel:NSMainMenuWindowLevel + 1];
+ else
+ {
+ [(NSWindow*) window->ns.object center];
+ _glfw.ns.cascadePoint =
+ NSPointToCGPoint([window->ns.object cascadeTopLeftFromPoint:
+ NSPointFromCGPoint(_glfw.ns.cascadePoint)]);
+
+ if (wndconfig->resizable)
+ {
+ const NSWindowCollectionBehavior behavior =
+ NSWindowCollectionBehaviorFullScreenPrimary |
+ NSWindowCollectionBehaviorManaged;
+ [window->ns.object setCollectionBehavior:behavior];
+ }
+
+ if (wndconfig->floating)
+ [window->ns.object setLevel:NSFloatingWindowLevel];
+
+ if (wndconfig->maximized)
+ [window->ns.object zoom:nil];
+ }
+
+ if (strlen(wndconfig->ns.frameName))
+ [window->ns.object setFrameAutosaveName:@(wndconfig->ns.frameName)];
+
+ window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window];
+ window->ns.retina = wndconfig->ns.retina;
+
+ if (fbconfig->transparent)
+ {
+ [window->ns.object setOpaque:NO];
+ [window->ns.object setHasShadow:NO];
+ [window->ns.object setBackgroundColor:[NSColor clearColor]];
+ }
+
+ [window->ns.object setContentView:window->ns.view];
+ [window->ns.object makeFirstResponder:window->ns.view];
+ [window->ns.object setTitle:@(wndconfig->title)];
+ [window->ns.object setDelegate:window->ns.delegate];
+ [window->ns.object setAcceptsMouseMovedEvents:YES];
+ [window->ns.object setRestorable:NO];
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
+ if ([window->ns.object respondsToSelector:@selector(setTabbingMode:)])
+ [window->ns.object setTabbingMode:NSWindowTabbingModeDisallowed];
+#endif
+
+ _glfwPlatformGetWindowSize(window, &window->ns.width, &window->ns.height);
+ _glfwPlatformGetFramebufferSize(window, &window->ns.fbWidth, &window->ns.fbHeight);
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Transforms a y-coordinate between the CG display and NS screen spaces
+//
+float _glfwTransformYNS(float y)
+{
+ return CGDisplayBounds(CGMainDisplayID()).size.height - y - 1;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformCreateWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ @autoreleasepool {
+
+ if (!_glfw.ns.finishedLaunching)
+ [NSApp run];
+
+ if (!createNativeWindow(window, wndconfig, fbconfig))
+ return GLFW_FALSE;
+
+ if (ctxconfig->client != GLFW_NO_API)
+ {
+ if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
+ {
+ if (!_glfwInitNSGL())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextNSGL(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)
+ {
+ // EGL implementation on macOS use CALayer* EGLNativeWindowType so we
+ // need to get the layer for EGL window surface creation.
+ [window->ns.view setWantsLayer:YES];
+ window->ns.layer = [window->ns.view layer];
+
+ if (!_glfwInitEGL())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
+ {
+ if (!_glfwInitOSMesa())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ }
+
+ if (window->monitor)
+ {
+ _glfwPlatformShowWindow(window);
+ _glfwPlatformFocusWindow(window);
+ acquireMonitor(window);
+ }
+
+ return GLFW_TRUE;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformDestroyWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+
+ if (_glfw.ns.disabledCursorWindow == window)
+ _glfw.ns.disabledCursorWindow = NULL;
+
+ [window->ns.object orderOut:nil];
+
+ if (window->monitor)
+ releaseMonitor(window);
+
+ if (window->context.destroy)
+ window->context.destroy(window);
+
+ [window->ns.object setDelegate:nil];
+ [window->ns.delegate release];
+ window->ns.delegate = nil;
+
+ [window->ns.view release];
+ window->ns.view = nil;
+
+ [window->ns.object close];
+ window->ns.object = nil;
+
+ // HACK: Allow Cocoa to catch up before returning
+ _glfwPlatformPollEvents();
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
+{
+ @autoreleasepool {
+ NSString* string = @(title);
+ [window->ns.object setTitle:string];
+ // HACK: Set the miniwindow title explicitly as setTitle: doesn't update it
+ // if the window lacks NSWindowStyleMaskTitled
+ [window->ns.object setMiniwindowTitle:string];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
+ int count, const GLFWimage* images)
+{
+ // Regular windows do not have icons
+}
+
+void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
+{
+ @autoreleasepool {
+
+ const NSRect contentRect =
+ [window->ns.object contentRectForFrameRect:[window->ns.object frame]];
+
+ if (xpos)
+ *xpos = contentRect.origin.x;
+ if (ypos)
+ *ypos = _glfwTransformYNS(contentRect.origin.y + contentRect.size.height - 1);
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y)
+{
+ @autoreleasepool {
+
+ const NSRect contentRect = [window->ns.view frame];
+ const NSRect dummyRect = NSMakeRect(x, _glfwTransformYNS(y + contentRect.size.height - 1), 0, 0);
+ const NSRect frameRect = [window->ns.object frameRectForContentRect:dummyRect];
+ [window->ns.object setFrameOrigin:frameRect.origin];
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
+{
+ @autoreleasepool {
+
+ const NSRect contentRect = [window->ns.view frame];
+
+ if (width)
+ *width = contentRect.size.width;
+ if (height)
+ *height = contentRect.size.height;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
+{
+ @autoreleasepool {
+
+ if (window->monitor)
+ {
+ if (window->monitor->window == window)
+ acquireMonitor(window);
+ }
+ else
+ {
+ NSRect contentRect =
+ [window->ns.object contentRectForFrameRect:[window->ns.object frame]];
+ contentRect.origin.y += contentRect.size.height - height;
+ contentRect.size = NSMakeSize(width, height);
+ [window->ns.object setFrame:[window->ns.object frameRectForContentRect:contentRect]
+ display:YES];
+ }
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight)
+{
+ @autoreleasepool {
+
+ if (minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE)
+ [window->ns.object setContentMinSize:NSMakeSize(0, 0)];
+ else
+ [window->ns.object setContentMinSize:NSMakeSize(minwidth, minheight)];
+
+ if (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE)
+ [window->ns.object setContentMaxSize:NSMakeSize(DBL_MAX, DBL_MAX)];
+ else
+ [window->ns.object setContentMaxSize:NSMakeSize(maxwidth, maxheight)];
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
+{
+ @autoreleasepool {
+ if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE)
+ [window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)];
+ else
+ [window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)];
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
+{
+ @autoreleasepool {
+
+ const NSRect contentRect = [window->ns.view frame];
+ const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];
+
+ if (width)
+ *width = (int) fbRect.size.width;
+ if (height)
+ *height = (int) fbRect.size.height;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
+ int* left, int* top,
+ int* right, int* bottom)
+{
+ @autoreleasepool {
+
+ const NSRect contentRect = [window->ns.view frame];
+ const NSRect frameRect = [window->ns.object frameRectForContentRect:contentRect];
+
+ if (left)
+ *left = contentRect.origin.x - frameRect.origin.x;
+ if (top)
+ *top = frameRect.origin.y + frameRect.size.height -
+ contentRect.origin.y - contentRect.size.height;
+ if (right)
+ *right = frameRect.origin.x + frameRect.size.width -
+ contentRect.origin.x - contentRect.size.width;
+ if (bottom)
+ *bottom = contentRect.origin.y - frameRect.origin.y;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
+ float* xscale, float* yscale)
+{
+ @autoreleasepool {
+
+ const NSRect points = [window->ns.view frame];
+ const NSRect pixels = [window->ns.view convertRectToBacking:points];
+
+ if (xscale)
+ *xscale = (float) (pixels.size.width / points.size.width);
+ if (yscale)
+ *yscale = (float) (pixels.size.height / points.size.height);
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformIconifyWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ [window->ns.object miniaturize:nil];
+ } // autoreleasepool
+}
+
+void _glfwPlatformRestoreWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ if ([window->ns.object isMiniaturized])
+ [window->ns.object deminiaturize:nil];
+ else if ([window->ns.object isZoomed])
+ [window->ns.object zoom:nil];
+ } // autoreleasepool
+}
+
+void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ if (![window->ns.object isZoomed])
+ [window->ns.object zoom:nil];
+ } // autoreleasepool
+}
+
+void _glfwPlatformShowWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ [window->ns.object orderFront:nil];
+ } // autoreleasepool
+}
+
+void _glfwPlatformHideWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ [window->ns.object orderOut:nil];
+ } // autoreleasepool
+}
+
+void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ [NSApp requestUserAttention:NSInformationalRequest];
+ } // autoreleasepool
+}
+
+void _glfwPlatformFocusWindow(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ // Make us the active application
+ // HACK: This is here to prevent applications using only hidden windows from
+ // being activated, but should probably not be done every time any
+ // window is shown
+ [NSApp activateIgnoringOtherApps:YES];
+ [window->ns.object makeKeyAndOrderFront:nil];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
+ _GLFWmonitor* monitor,
+ int xpos, int ypos,
+ int width, int height,
+ int refreshRate)
+{
+ @autoreleasepool {
+
+ if (window->monitor == monitor)
+ {
+ if (monitor)
+ {
+ if (monitor->window == window)
+ acquireMonitor(window);
+ }
+ else
+ {
+ const NSRect contentRect =
+ NSMakeRect(xpos, _glfwTransformYNS(ypos + height - 1), width, height);
+ const NSRect frameRect =
+ [window->ns.object frameRectForContentRect:contentRect
+ styleMask:getStyleMask(window)];
+
+ [window->ns.object setFrame:frameRect display:YES];
+ }
+
+ return;
+ }
+
+ if (window->monitor)
+ releaseMonitor(window);
+
+ _glfwInputWindowMonitor(window, monitor);
+
+ // HACK: Allow the state cached in Cocoa to catch up to reality
+ // TODO: Solve this in a less terrible way
+ _glfwPlatformPollEvents();
+
+ const NSUInteger styleMask = getStyleMask(window);
+ [window->ns.object setStyleMask:styleMask];
+ // HACK: Changing the style mask can cause the first responder to be cleared
+ [window->ns.object makeFirstResponder:window->ns.view];
+
+ if (window->monitor)
+ {
+ [window->ns.object setLevel:NSMainMenuWindowLevel + 1];
+ [window->ns.object setHasShadow:NO];
+
+ acquireMonitor(window);
+ }
+ else
+ {
+ NSRect contentRect = NSMakeRect(xpos, _glfwTransformYNS(ypos + height - 1),
+ width, height);
+ NSRect frameRect = [window->ns.object frameRectForContentRect:contentRect
+ styleMask:styleMask];
+ [window->ns.object setFrame:frameRect display:YES];
+
+ if (window->numer != GLFW_DONT_CARE &&
+ window->denom != GLFW_DONT_CARE)
+ {
+ [window->ns.object setContentAspectRatio:NSMakeSize(window->numer,
+ window->denom)];
+ }
+
+ if (window->minwidth != GLFW_DONT_CARE &&
+ window->minheight != GLFW_DONT_CARE)
+ {
+ [window->ns.object setContentMinSize:NSMakeSize(window->minwidth,
+ window->minheight)];
+ }
+
+ if (window->maxwidth != GLFW_DONT_CARE &&
+ window->maxheight != GLFW_DONT_CARE)
+ {
+ [window->ns.object setContentMaxSize:NSMakeSize(window->maxwidth,
+ window->maxheight)];
+ }
+
+ if (window->floating)
+ [window->ns.object setLevel:NSFloatingWindowLevel];
+ else
+ [window->ns.object setLevel:NSNormalWindowLevel];
+
+ [window->ns.object setHasShadow:YES];
+ // HACK: Clearing NSWindowStyleMaskTitled resets and disables the window
+ // title property but the miniwindow title property is unaffected
+ [window->ns.object setTitle:[window->ns.object miniwindowTitle]];
+ }
+
+ } // autoreleasepool
+}
+
+int _glfwPlatformWindowFocused(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ return [window->ns.object isKeyWindow];
+ } // autoreleasepool
+}
+
+int _glfwPlatformWindowIconified(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ return [window->ns.object isMiniaturized];
+ } // autoreleasepool
+}
+
+int _glfwPlatformWindowVisible(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ return [window->ns.object isVisible];
+ } // autoreleasepool
+}
+
+int _glfwPlatformWindowMaximized(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ return [window->ns.object isZoomed];
+ } // autoreleasepool
+}
+
+int _glfwPlatformWindowHovered(_GLFWwindow* window)
+{
+ @autoreleasepool {
+
+ const NSPoint point = [NSEvent mouseLocation];
+
+ if ([NSWindow windowNumberAtPoint:point belowWindowWithWindowNumber:0] !=
+ [window->ns.object windowNumber])
+ {
+ return GLFW_FALSE;
+ }
+
+ return NSMouseInRect(point,
+ [window->ns.object convertRectToScreen:[window->ns.view frame]], NO);
+
+ } // autoreleasepool
+}
+
+int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ return ![window->ns.object isOpaque] && ![window->ns.view isOpaque];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
+{
+ @autoreleasepool {
+ [window->ns.object setStyleMask:getStyleMask(window)];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
+{
+ @autoreleasepool {
+ [window->ns.object setStyleMask:getStyleMask(window)];
+ [window->ns.object makeFirstResponder:window->ns.view];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
+{
+ @autoreleasepool {
+ if (enabled)
+ [window->ns.object setLevel:NSFloatingWindowLevel];
+ else
+ [window->ns.object setLevel:NSNormalWindowLevel];
+ } // autoreleasepool
+}
+
+float _glfwPlatformGetWindowOpacity(_GLFWwindow* window)
+{
+ @autoreleasepool {
+ return (float) [window->ns.object alphaValue];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
+{
+ @autoreleasepool {
+ [window->ns.object setAlphaValue:opacity];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
+{
+}
+
+GLFWbool _glfwPlatformRawMouseMotionSupported(void)
+{
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformPollEvents(void)
+{
+ @autoreleasepool {
+
+ if (!_glfw.ns.finishedLaunching)
+ [NSApp run];
+
+ for (;;)
+ {
+ NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
+ untilDate:[NSDate distantPast]
+ inMode:NSDefaultRunLoopMode
+ dequeue:YES];
+ if (event == nil)
+ break;
+
+ [NSApp sendEvent:event];
+ }
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformWaitEvents(void)
+{
+ @autoreleasepool {
+
+ if (!_glfw.ns.finishedLaunching)
+ [NSApp run];
+
+ // I wanted to pass NO to dequeue:, and rely on PollEvents to
+ // dequeue and send. For reasons not at all clear to me, passing
+ // NO to dequeue: causes this method never to return.
+ NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny
+ untilDate:[NSDate distantFuture]
+ inMode:NSDefaultRunLoopMode
+ dequeue:YES];
+ [NSApp sendEvent:event];
+
+ _glfwPlatformPollEvents();
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformWaitEventsTimeout(double timeout)
+{
+ @autoreleasepool {
+
+ if (!_glfw.ns.finishedLaunching)
+ [NSApp run];
+
+ NSDate* date = [NSDate dateWithTimeIntervalSinceNow:timeout];
+ NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
+ untilDate:date
+ inMode:NSDefaultRunLoopMode
+ dequeue:YES];
+ if (event)
+ [NSApp sendEvent:event];
+
+ _glfwPlatformPollEvents();
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformPostEmptyEvent(void)
+{
+ @autoreleasepool {
+
+ if (!_glfw.ns.finishedLaunching)
+ [NSApp run];
+
+ NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined
+ location:NSMakePoint(0, 0)
+ modifierFlags:0
+ timestamp:0
+ windowNumber:0
+ context:nil
+ subtype:0
+ data1:0
+ data2:0];
+ [NSApp postEvent:event atStart:YES];
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)
+{
+ @autoreleasepool {
+
+ const NSRect contentRect = [window->ns.view frame];
+ // NOTE: The returned location uses base 0,1 not 0,0
+ const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];
+
+ if (xpos)
+ *xpos = pos.x;
+ if (ypos)
+ *ypos = contentRect.size.height - pos.y;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
+{
+ @autoreleasepool {
+
+ updateCursorImage(window);
+
+ const NSRect contentRect = [window->ns.view frame];
+ // NOTE: The returned location uses base 0,1 not 0,0
+ const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];
+
+ window->ns.cursorWarpDeltaX += x - pos.x;
+ window->ns.cursorWarpDeltaY += y - contentRect.size.height + pos.y;
+
+ if (window->monitor)
+ {
+ CGDisplayMoveCursorToPoint(window->monitor->ns.displayID,
+ CGPointMake(x, y));
+ }
+ else
+ {
+ const NSRect localRect = NSMakeRect(x, contentRect.size.height - y - 1, 0, 0);
+ const NSRect globalRect = [window->ns.object convertRectToScreen:localRect];
+ const NSPoint globalPoint = globalRect.origin;
+
+ CGWarpMouseCursorPosition(CGPointMake(globalPoint.x,
+ _glfwTransformYNS(globalPoint.y)));
+ }
+
+ // HACK: Calling this right after setting the cursor position prevents macOS
+ // from freezing the cursor for a fraction of a second afterwards
+ if (window->cursorMode != GLFW_CURSOR_DISABLED)
+ CGAssociateMouseAndMouseCursorPosition(true);
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
+{
+ @autoreleasepool {
+ if (_glfwPlatformWindowFocused(window))
+ updateCursorMode(window);
+ } // autoreleasepool
+}
+
+const char* _glfwPlatformGetScancodeName(int scancode)
+{
+ @autoreleasepool {
+
+ if (scancode < 0 || scancode > 0xff ||
+ _glfw.ns.keycodes[scancode] == GLFW_KEY_UNKNOWN)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode);
+ return NULL;
+ }
+
+ const int key = _glfw.ns.keycodes[scancode];
+
+ UInt32 deadKeyState = 0;
+ UniChar characters[4];
+ UniCharCount characterCount = 0;
+
+ if (UCKeyTranslate([(NSData*) _glfw.ns.unicodeData bytes],
+ scancode,
+ kUCKeyActionDisplay,
+ 0,
+ LMGetKbdType(),
+ kUCKeyTranslateNoDeadKeysBit,
+ &deadKeyState,
+ sizeof(characters) / sizeof(characters[0]),
+ &characterCount,
+ characters) != noErr)
+ {
+ return NULL;
+ }
+
+ if (!characterCount)
+ return NULL;
+
+ CFStringRef string = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault,
+ characters,
+ characterCount,
+ kCFAllocatorNull);
+ CFStringGetCString(string,
+ _glfw.ns.keynames[key],
+ sizeof(_glfw.ns.keynames[key]),
+ kCFStringEncodingUTF8);
+ CFRelease(string);
+
+ return _glfw.ns.keynames[key];
+
+ } // autoreleasepool
+}
+
+int _glfwPlatformGetKeyScancode(int key)
+{
+ return _glfw.ns.scancodes[key];
+}
+
+int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
+ const GLFWimage* image,
+ int xhot, int yhot)
+{
+ @autoreleasepool {
+
+ NSImage* native;
+ NSBitmapImageRep* rep;
+
+ rep = [[NSBitmapImageRep alloc]
+ initWithBitmapDataPlanes:NULL
+ pixelsWide:image->width
+ pixelsHigh:image->height
+ bitsPerSample:8
+ samplesPerPixel:4
+ hasAlpha:YES
+ isPlanar:NO
+ colorSpaceName:NSCalibratedRGBColorSpace
+ bitmapFormat:NSBitmapFormatAlphaNonpremultiplied
+ bytesPerRow:image->width * 4
+ bitsPerPixel:32];
+
+ if (rep == nil)
+ return GLFW_FALSE;
+
+ memcpy([rep bitmapData], image->pixels, image->width * image->height * 4);
+
+ native = [[NSImage alloc] initWithSize:NSMakeSize(image->width, image->height)];
+ [native addRepresentation:rep];
+
+ cursor->ns.object = [[NSCursor alloc] initWithImage:native
+ hotSpot:NSMakePoint(xhot, yhot)];
+
+ [native release];
+ [rep release];
+
+ if (cursor->ns.object == nil)
+ return GLFW_FALSE;
+
+ return GLFW_TRUE;
+
+ } // autoreleasepool
+}
+
+int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
+{
+ @autoreleasepool {
+
+ if (shape == GLFW_ARROW_CURSOR)
+ cursor->ns.object = [NSCursor arrowCursor];
+ else if (shape == GLFW_IBEAM_CURSOR)
+ cursor->ns.object = [NSCursor IBeamCursor];
+ else if (shape == GLFW_CROSSHAIR_CURSOR)
+ cursor->ns.object = [NSCursor crosshairCursor];
+ else if (shape == GLFW_HAND_CURSOR)
+ cursor->ns.object = [NSCursor pointingHandCursor];
+ else if (shape == GLFW_HRESIZE_CURSOR)
+ cursor->ns.object = [NSCursor resizeLeftRightCursor];
+ else if (shape == GLFW_VRESIZE_CURSOR)
+ cursor->ns.object = [NSCursor resizeUpDownCursor];
+
+ if (!cursor->ns.object)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to retrieve standard cursor");
+ return GLFW_FALSE;
+ }
+
+ [cursor->ns.object retain];
+ return GLFW_TRUE;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
+{
+ @autoreleasepool {
+ if (cursor->ns.object)
+ [(NSCursor*) cursor->ns.object release];
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
+{
+ @autoreleasepool {
+ if (cursorInContentArea(window))
+ updateCursorImage(window);
+ } // autoreleasepool
+}
+
+void _glfwPlatformSetClipboardString(const char* string)
+{
+ @autoreleasepool {
+ NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
+ [pasteboard declareTypes:@[NSPasteboardTypeString] owner:nil];
+ [pasteboard setString:@(string) forType:NSPasteboardTypeString];
+ } // autoreleasepool
+}
+
+const char* _glfwPlatformGetClipboardString(void)
+{
+ @autoreleasepool {
+
+ NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
+
+ if (![[pasteboard types] containsObject:NSPasteboardTypeString])
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "Cocoa: Failed to retrieve string from pasteboard");
+ return NULL;
+ }
+
+ NSString* object = [pasteboard stringForType:NSPasteboardTypeString];
+ if (!object)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to retrieve object from pasteboard");
+ return NULL;
+ }
+
+ free(_glfw.ns.clipboardString);
+ _glfw.ns.clipboardString = _glfw_strdup([object UTF8String]);
+
+ return _glfw.ns.clipboardString;
+
+ } // autoreleasepool
+}
+
+void _glfwPlatformGetRequiredInstanceExtensions(char** extensions)
+{
+ if (_glfw.vk.KHR_surface && _glfw.vk.EXT_metal_surface)
+ {
+ extensions[0] = "VK_KHR_surface";
+ extensions[1] = "VK_EXT_metal_surface";
+ }
+ else if (_glfw.vk.KHR_surface && _glfw.vk.MVK_macos_surface)
+ {
+ extensions[0] = "VK_KHR_surface";
+ extensions[1] = "VK_MVK_macos_surface";
+ }
+}
+
+int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily)
+{
+ return GLFW_TRUE;
+}
+
+VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
+ _GLFWwindow* window,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface)
+{
+ @autoreleasepool {
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
+ // HACK: Dynamically load Core Animation to avoid adding an extra
+ // dependency for the majority who don't use MoltenVK
+ NSBundle* bundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/QuartzCore.framework"];
+ if (!bundle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to find QuartzCore.framework");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ // NOTE: Create the layer here as makeBackingLayer should not return nil
+ window->ns.layer = [[bundle classNamed:@"CAMetalLayer"] layer];
+ if (!window->ns.layer)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to create layer for view");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ if (window->ns.retina)
+ [window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];
+
+ [window->ns.view setLayer:window->ns.layer];
+ [window->ns.view setWantsLayer:YES];
+
+ VkResult err;
+
+ if (_glfw.vk.EXT_metal_surface)
+ {
+ VkMetalSurfaceCreateInfoEXT sci;
+
+ PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT;
+ vkCreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT)
+ vkGetInstanceProcAddr(instance, "vkCreateMetalSurfaceEXT");
+ if (!vkCreateMetalSurfaceEXT)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Cocoa: Vulkan instance missing VK_EXT_metal_surface extension");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ memset(&sci, 0, sizeof(sci));
+ sci.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT;
+ sci.pLayer = window->ns.layer;
+
+ err = vkCreateMetalSurfaceEXT(instance, &sci, allocator, surface);
+ }
+ else
+ {
+ VkMacOSSurfaceCreateInfoMVK sci;
+
+ PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK;
+ vkCreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)
+ vkGetInstanceProcAddr(instance, "vkCreateMacOSSurfaceMVK");
+ if (!vkCreateMacOSSurfaceMVK)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Cocoa: Vulkan instance missing VK_MVK_macos_surface extension");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ memset(&sci, 0, sizeof(sci));
+ sci.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;
+ sci.pView = window->ns.view;
+
+ err = vkCreateMacOSSurfaceMVK(instance, &sci, allocator, surface);
+ }
+
+ if (err)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Cocoa: Failed to create Vulkan surface: %s",
+ _glfwGetVulkanResultString(err));
+ }
+
+ return err;
+#else
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+#endif
+
+ } // autoreleasepool
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI id glfwGetCocoaWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(nil);
+ return window->ns.object;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/context.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/context.c
new file mode 100644
index 0000000..b3c78e8
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/context.c
@@ -0,0 +1,756 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2016 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <stdio.h>
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Checks whether the desired context attributes are valid
+//
+// This function checks things like whether the specified client API version
+// exists and whether all relevant options have supported and non-conflicting
+// values
+//
+GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig)
+{
+ if (ctxconfig->share)
+ {
+ if (ctxconfig->client == GLFW_NO_API ||
+ ctxconfig->share->context.client == GLFW_NO_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->source != GLFW_NATIVE_CONTEXT_API &&
+ ctxconfig->source != GLFW_EGL_CONTEXT_API &&
+ ctxconfig->source != GLFW_OSMESA_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid context creation API 0x%08X",
+ ctxconfig->source);
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->client != GLFW_NO_API &&
+ ctxconfig->client != GLFW_OPENGL_API &&
+ ctxconfig->client != GLFW_OPENGL_ES_API)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid client API 0x%08X",
+ ctxconfig->client);
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if ((ctxconfig->major < 1 || ctxconfig->minor < 0) ||
+ (ctxconfig->major == 1 && ctxconfig->minor > 5) ||
+ (ctxconfig->major == 2 && ctxconfig->minor > 1) ||
+ (ctxconfig->major == 3 && ctxconfig->minor > 3))
+ {
+ // OpenGL 1.0 is the smallest valid version
+ // OpenGL 1.x series ended with version 1.5
+ // OpenGL 2.x series ended with version 2.1
+ // OpenGL 3.x series ended with version 3.3
+ // For now, let everything else through
+
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid OpenGL version %i.%i",
+ ctxconfig->major, ctxconfig->minor);
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->profile)
+ {
+ if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE &&
+ ctxconfig->profile != GLFW_OPENGL_COMPAT_PROFILE)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid OpenGL profile 0x%08X",
+ ctxconfig->profile);
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->major <= 2 ||
+ (ctxconfig->major == 3 && ctxconfig->minor < 2))
+ {
+ // Desktop OpenGL context profiles are only defined for version 3.2
+ // and above
+
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Context profiles are only defined for OpenGL version 3.2 and above");
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->forward && ctxconfig->major <= 2)
+ {
+ // Forward-compatible contexts are only defined for OpenGL version 3.0 and above
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Forward-compatibility is only defined for OpenGL version 3.0 and above");
+ return GLFW_FALSE;
+ }
+ }
+ else if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ if (ctxconfig->major < 1 || ctxconfig->minor < 0 ||
+ (ctxconfig->major == 1 && ctxconfig->minor > 1) ||
+ (ctxconfig->major == 2 && ctxconfig->minor > 0))
+ {
+ // OpenGL ES 1.0 is the smallest valid version
+ // OpenGL ES 1.x series ended with version 1.1
+ // OpenGL ES 2.x series ended with version 2.0
+ // For now, let everything else through
+
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid OpenGL ES version %i.%i",
+ ctxconfig->major, ctxconfig->minor);
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->robustness)
+ {
+ if (ctxconfig->robustness != GLFW_NO_RESET_NOTIFICATION &&
+ ctxconfig->robustness != GLFW_LOSE_CONTEXT_ON_RESET)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid context robustness mode 0x%08X",
+ ctxconfig->robustness);
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->release)
+ {
+ if (ctxconfig->release != GLFW_RELEASE_BEHAVIOR_NONE &&
+ ctxconfig->release != GLFW_RELEASE_BEHAVIOR_FLUSH)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid context release behavior 0x%08X",
+ ctxconfig->release);
+ return GLFW_FALSE;
+ }
+ }
+
+ return GLFW_TRUE;
+}
+
+// Chooses the framebuffer config that best matches the desired one
+//
+const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
+ const _GLFWfbconfig* alternatives,
+ unsigned int count)
+{
+ unsigned int i;
+ unsigned int missing, leastMissing = UINT_MAX;
+ unsigned int colorDiff, leastColorDiff = UINT_MAX;
+ unsigned int extraDiff, leastExtraDiff = UINT_MAX;
+ const _GLFWfbconfig* current;
+ const _GLFWfbconfig* closest = NULL;
+
+ for (i = 0; i < count; i++)
+ {
+ current = alternatives + i;
+
+ if (desired->stereo > 0 && current->stereo == 0)
+ {
+ // Stereo is a hard constraint
+ continue;
+ }
+
+ // Count number of missing buffers
+ {
+ missing = 0;
+
+ if (desired->alphaBits > 0 && current->alphaBits == 0)
+ missing++;
+
+ if (desired->depthBits > 0 && current->depthBits == 0)
+ missing++;
+
+ if (desired->stencilBits > 0 && current->stencilBits == 0)
+ missing++;
+
+ if (desired->auxBuffers > 0 &&
+ current->auxBuffers < desired->auxBuffers)
+ {
+ missing += desired->auxBuffers - current->auxBuffers;
+ }
+
+ if (desired->samples > 0 && current->samples == 0)
+ {
+ // Technically, several multisampling buffers could be
+ // involved, but that's a lower level implementation detail and
+ // not important to us here, so we count them as one
+ missing++;
+ }
+
+ if (desired->transparent != current->transparent)
+ missing++;
+ }
+
+ // These polynomials make many small channel size differences matter
+ // less than one large channel size difference
+
+ // Calculate color channel size difference value
+ {
+ colorDiff = 0;
+
+ if (desired->redBits != GLFW_DONT_CARE)
+ {
+ colorDiff += (desired->redBits - current->redBits) *
+ (desired->redBits - current->redBits);
+ }
+
+ if (desired->greenBits != GLFW_DONT_CARE)
+ {
+ colorDiff += (desired->greenBits - current->greenBits) *
+ (desired->greenBits - current->greenBits);
+ }
+
+ if (desired->blueBits != GLFW_DONT_CARE)
+ {
+ colorDiff += (desired->blueBits - current->blueBits) *
+ (desired->blueBits - current->blueBits);
+ }
+ }
+
+ // Calculate non-color channel size difference value
+ {
+ extraDiff = 0;
+
+ if (desired->alphaBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->alphaBits - current->alphaBits) *
+ (desired->alphaBits - current->alphaBits);
+ }
+
+ if (desired->depthBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->depthBits - current->depthBits) *
+ (desired->depthBits - current->depthBits);
+ }
+
+ if (desired->stencilBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->stencilBits - current->stencilBits) *
+ (desired->stencilBits - current->stencilBits);
+ }
+
+ if (desired->accumRedBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->accumRedBits - current->accumRedBits) *
+ (desired->accumRedBits - current->accumRedBits);
+ }
+
+ if (desired->accumGreenBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->accumGreenBits - current->accumGreenBits) *
+ (desired->accumGreenBits - current->accumGreenBits);
+ }
+
+ if (desired->accumBlueBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->accumBlueBits - current->accumBlueBits) *
+ (desired->accumBlueBits - current->accumBlueBits);
+ }
+
+ if (desired->accumAlphaBits != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->accumAlphaBits - current->accumAlphaBits) *
+ (desired->accumAlphaBits - current->accumAlphaBits);
+ }
+
+ if (desired->samples != GLFW_DONT_CARE)
+ {
+ extraDiff += (desired->samples - current->samples) *
+ (desired->samples - current->samples);
+ }
+
+ if (desired->sRGB && !current->sRGB)
+ extraDiff++;
+ }
+
+ // Figure out if the current one is better than the best one found so far
+ // Least number of missing buffers is the most important heuristic,
+ // then color buffer size match and lastly size match for other buffers
+
+ if (missing < leastMissing)
+ closest = current;
+ else if (missing == leastMissing)
+ {
+ if ((colorDiff < leastColorDiff) ||
+ (colorDiff == leastColorDiff && extraDiff < leastExtraDiff))
+ {
+ closest = current;
+ }
+ }
+
+ if (current == closest)
+ {
+ leastMissing = missing;
+ leastColorDiff = colorDiff;
+ leastExtraDiff = extraDiff;
+ }
+ }
+
+ return closest;
+}
+
+// Retrieves the attributes of the current context
+//
+GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig)
+{
+ int i;
+ _GLFWwindow* previous;
+ const char* version;
+ const char* prefixes[] =
+ {
+ "OpenGL ES-CM ",
+ "OpenGL ES-CL ",
+ "OpenGL ES ",
+ NULL
+ };
+
+ window->context.source = ctxconfig->source;
+ window->context.client = GLFW_OPENGL_API;
+
+ previous = _glfwPlatformGetTls(&_glfw.contextSlot);
+ glfwMakeContextCurrent((GLFWwindow*) window);
+
+ window->context.GetIntegerv = (PFNGLGETINTEGERVPROC)
+ window->context.getProcAddress("glGetIntegerv");
+ window->context.GetString = (PFNGLGETSTRINGPROC)
+ window->context.getProcAddress("glGetString");
+ if (!window->context.GetIntegerv || !window->context.GetString)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "Entry point retrieval is broken");
+ glfwMakeContextCurrent((GLFWwindow*) previous);
+ return GLFW_FALSE;
+ }
+
+ version = (const char*) window->context.GetString(GL_VERSION);
+ if (!version)
+ {
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "OpenGL version string retrieval is broken");
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "OpenGL ES version string retrieval is broken");
+ }
+
+ glfwMakeContextCurrent((GLFWwindow*) previous);
+ return GLFW_FALSE;
+ }
+
+ for (i = 0; prefixes[i]; i++)
+ {
+ const size_t length = strlen(prefixes[i]);
+
+ if (strncmp(version, prefixes[i], length) == 0)
+ {
+ version += length;
+ window->context.client = GLFW_OPENGL_ES_API;
+ break;
+ }
+ }
+
+ if (!sscanf(version, "%d.%d.%d",
+ &window->context.major,
+ &window->context.minor,
+ &window->context.revision))
+ {
+ if (window->context.client == GLFW_OPENGL_API)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "No version found in OpenGL version string");
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "No version found in OpenGL ES version string");
+ }
+
+ glfwMakeContextCurrent((GLFWwindow*) previous);
+ return GLFW_FALSE;
+ }
+
+ if (window->context.major < ctxconfig->major ||
+ (window->context.major == ctxconfig->major &&
+ window->context.minor < ctxconfig->minor))
+ {
+ // The desired OpenGL version is greater than the actual version
+ // This only happens if the machine lacks {GLX|WGL}_ARB_create_context
+ // /and/ the user has requested an OpenGL version greater than 1.0
+
+ // For API consistency, we emulate the behavior of the
+ // {GLX|WGL}_ARB_create_context extension and fail here
+
+ if (window->context.client == GLFW_OPENGL_API)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "Requested OpenGL version %i.%i, got version %i.%i",
+ ctxconfig->major, ctxconfig->minor,
+ window->context.major, window->context.minor);
+ }
+ else
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "Requested OpenGL ES version %i.%i, got version %i.%i",
+ ctxconfig->major, ctxconfig->minor,
+ window->context.major, window->context.minor);
+ }
+
+ glfwMakeContextCurrent((GLFWwindow*) previous);
+ return GLFW_FALSE;
+ }
+
+ if (window->context.major >= 3)
+ {
+ // OpenGL 3.0+ uses a different function for extension string retrieval
+ // We cache it here instead of in glfwExtensionSupported mostly to alert
+ // users as early as possible that their build may be broken
+
+ window->context.GetStringi = (PFNGLGETSTRINGIPROC)
+ window->context.getProcAddress("glGetStringi");
+ if (!window->context.GetStringi)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Entry point retrieval is broken");
+ glfwMakeContextCurrent((GLFWwindow*) previous);
+ return GLFW_FALSE;
+ }
+ }
+
+ if (window->context.client == GLFW_OPENGL_API)
+ {
+ // Read back context flags (OpenGL 3.0 and above)
+ if (window->context.major >= 3)
+ {
+ GLint flags;
+ window->context.GetIntegerv(GL_CONTEXT_FLAGS, &flags);
+
+ if (flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
+ window->context.forward = GLFW_TRUE;
+
+ if (flags & GL_CONTEXT_FLAG_DEBUG_BIT)
+ window->context.debug = GLFW_TRUE;
+ else if (glfwExtensionSupported("GL_ARB_debug_output") &&
+ ctxconfig->debug)
+ {
+ // HACK: This is a workaround for older drivers (pre KHR_debug)
+ // not setting the debug bit in the context flags for
+ // debug contexts
+ window->context.debug = GLFW_TRUE;
+ }
+
+ if (flags & GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR)
+ window->context.noerror = GLFW_TRUE;
+ }
+
+ // Read back OpenGL context profile (OpenGL 3.2 and above)
+ if (window->context.major >= 4 ||
+ (window->context.major == 3 && window->context.minor >= 2))
+ {
+ GLint mask;
+ window->context.GetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);
+
+ if (mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
+ window->context.profile = GLFW_OPENGL_COMPAT_PROFILE;
+ else if (mask & GL_CONTEXT_CORE_PROFILE_BIT)
+ window->context.profile = GLFW_OPENGL_CORE_PROFILE;
+ else if (glfwExtensionSupported("GL_ARB_compatibility"))
+ {
+ // HACK: This is a workaround for the compatibility profile bit
+ // not being set in the context flags if an OpenGL 3.2+
+ // context was created without having requested a specific
+ // version
+ window->context.profile = GLFW_OPENGL_COMPAT_PROFILE;
+ }
+ }
+
+ // Read back robustness strategy
+ if (glfwExtensionSupported("GL_ARB_robustness"))
+ {
+ // NOTE: We avoid using the context flags for detection, as they are
+ // only present from 3.0 while the extension applies from 1.1
+
+ GLint strategy;
+ window->context.GetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB,
+ &strategy);
+
+ if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)
+ window->context.robustness = GLFW_LOSE_CONTEXT_ON_RESET;
+ else if (strategy == GL_NO_RESET_NOTIFICATION_ARB)
+ window->context.robustness = GLFW_NO_RESET_NOTIFICATION;
+ }
+ }
+ else
+ {
+ // Read back robustness strategy
+ if (glfwExtensionSupported("GL_EXT_robustness"))
+ {
+ // NOTE: The values of these constants match those of the OpenGL ARB
+ // one, so we can reuse them here
+
+ GLint strategy;
+ window->context.GetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB,
+ &strategy);
+
+ if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)
+ window->context.robustness = GLFW_LOSE_CONTEXT_ON_RESET;
+ else if (strategy == GL_NO_RESET_NOTIFICATION_ARB)
+ window->context.robustness = GLFW_NO_RESET_NOTIFICATION;
+ }
+ }
+
+ if (glfwExtensionSupported("GL_KHR_context_flush_control"))
+ {
+ GLint behavior;
+ window->context.GetIntegerv(GL_CONTEXT_RELEASE_BEHAVIOR, &behavior);
+
+ if (behavior == GL_NONE)
+ window->context.release = GLFW_RELEASE_BEHAVIOR_NONE;
+ else if (behavior == GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH)
+ window->context.release = GLFW_RELEASE_BEHAVIOR_FLUSH;
+ }
+
+ // Clearing the front buffer to black to avoid garbage pixels left over from
+ // previous uses of our bit of VRAM
+ {
+ PFNGLCLEARPROC glClear = (PFNGLCLEARPROC)
+ window->context.getProcAddress("glClear");
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ if (window->doublebuffer)
+ window->context.swapBuffers(window);
+ }
+
+ glfwMakeContextCurrent((GLFWwindow*) previous);
+ return GLFW_TRUE;
+}
+
+// Searches an extension string for the specified extension
+//
+GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions)
+{
+ const char* start = extensions;
+
+ for (;;)
+ {
+ const char* where;
+ const char* terminator;
+
+ where = strstr(start, string);
+ if (!where)
+ return GLFW_FALSE;
+
+ terminator = where + strlen(string);
+ if (where == start || *(where - 1) == ' ')
+ {
+ if (*terminator == ' ' || *terminator == '\0')
+ break;
+ }
+
+ start = terminator;
+ }
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW public API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFWwindow* previous = _glfwPlatformGetTls(&_glfw.contextSlot);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window && window->context.client == GLFW_NO_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT,
+ "Cannot make current with a window that has no OpenGL or OpenGL ES context");
+ return;
+ }
+
+ if (previous)
+ {
+ if (!window || window->context.source != previous->context.source)
+ previous->context.makeCurrent(NULL);
+ }
+
+ if (window)
+ window->context.makeCurrent(window);
+}
+
+GLFWAPI GLFWwindow* glfwGetCurrentContext(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return _glfwPlatformGetTls(&_glfw.contextSlot);
+}
+
+GLFWAPI void glfwSwapBuffers(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window->context.client == GLFW_NO_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT,
+ "Cannot swap buffers of a window that has no OpenGL or OpenGL ES context");
+ return;
+ }
+
+ window->context.swapBuffers(window);
+}
+
+GLFWAPI void glfwSwapInterval(int interval)
+{
+ _GLFWwindow* window;
+
+ _GLFW_REQUIRE_INIT();
+
+ window = _glfwPlatformGetTls(&_glfw.contextSlot);
+ if (!window)
+ {
+ _glfwInputError(GLFW_NO_CURRENT_CONTEXT,
+ "Cannot set swap interval without a current OpenGL or OpenGL ES context");
+ return;
+ }
+
+ window->context.swapInterval(interval);
+}
+
+GLFWAPI int glfwExtensionSupported(const char* extension)
+{
+ _GLFWwindow* window;
+ assert(extension != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ window = _glfwPlatformGetTls(&_glfw.contextSlot);
+ if (!window)
+ {
+ _glfwInputError(GLFW_NO_CURRENT_CONTEXT,
+ "Cannot query extension without a current OpenGL or OpenGL ES context");
+ return GLFW_FALSE;
+ }
+
+ if (*extension == '\0')
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Extension name cannot be an empty string");
+ return GLFW_FALSE;
+ }
+
+ if (window->context.major >= 3)
+ {
+ int i;
+ GLint count;
+
+ // Check if extension is in the modern OpenGL extensions string list
+
+ window->context.GetIntegerv(GL_NUM_EXTENSIONS, &count);
+
+ for (i = 0; i < count; i++)
+ {
+ const char* en = (const char*)
+ window->context.GetStringi(GL_EXTENSIONS, i);
+ if (!en)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Extension string retrieval is broken");
+ return GLFW_FALSE;
+ }
+
+ if (strcmp(en, extension) == 0)
+ return GLFW_TRUE;
+ }
+ }
+ else
+ {
+ // Check if extension is in the old style OpenGL extensions string
+
+ const char* extensions = (const char*)
+ window->context.GetString(GL_EXTENSIONS);
+ if (!extensions)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Extension string retrieval is broken");
+ return GLFW_FALSE;
+ }
+
+ if (_glfwStringInExtensionString(extension, extensions))
+ return GLFW_TRUE;
+ }
+
+ // Check if extension is in the platform-specific string
+ return window->context.extensionSupported(extension);
+}
+
+GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
+{
+ _GLFWwindow* window;
+ assert(procname != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ window = _glfwPlatformGetTls(&_glfw.contextSlot);
+ if (!window)
+ {
+ _glfwInputError(GLFW_NO_CURRENT_CONTEXT,
+ "Cannot query entry point without a current OpenGL or OpenGL ES context");
+ return NULL;
+ }
+
+ return window->context.getProcAddress(procname);
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/dummy.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/dummy.go
new file mode 100644
index 0000000..41053ac
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/dummy.go
@@ -0,0 +1,4 @@
+// +build required
+
+// Package dummy prevents go tooling from stripping the c dependencies.
+package dummy
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.c
new file mode 100644
index 0000000..6b34f72
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.c
@@ -0,0 +1,790 @@
+//========================================================================
+// GLFW 3.3 EGL - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+
+// Return a description of the specified EGL error
+//
+static const char* getEGLErrorString(EGLint error)
+{
+ switch (error)
+ {
+ case EGL_SUCCESS:
+ return "Success";
+ case EGL_NOT_INITIALIZED:
+ return "EGL is not or could not be initialized";
+ case EGL_BAD_ACCESS:
+ return "EGL cannot access a requested resource";
+ case EGL_BAD_ALLOC:
+ return "EGL failed to allocate resources for the requested operation";
+ case EGL_BAD_ATTRIBUTE:
+ return "An unrecognized attribute or attribute value was passed in the attribute list";
+ case EGL_BAD_CONTEXT:
+ return "An EGLContext argument does not name a valid EGL rendering context";
+ case EGL_BAD_CONFIG:
+ return "An EGLConfig argument does not name a valid EGL frame buffer configuration";
+ case EGL_BAD_CURRENT_SURFACE:
+ return "The current surface of the calling thread is a window, pixel buffer or pixmap that is no longer valid";
+ case EGL_BAD_DISPLAY:
+ return "An EGLDisplay argument does not name a valid EGL display connection";
+ case EGL_BAD_SURFACE:
+ return "An EGLSurface argument does not name a valid surface configured for GL rendering";
+ case EGL_BAD_MATCH:
+ return "Arguments are inconsistent";
+ case EGL_BAD_PARAMETER:
+ return "One or more argument values are invalid";
+ case EGL_BAD_NATIVE_PIXMAP:
+ return "A NativePixmapType argument does not refer to a valid native pixmap";
+ case EGL_BAD_NATIVE_WINDOW:
+ return "A NativeWindowType argument does not refer to a valid native window";
+ case EGL_CONTEXT_LOST:
+ return "The application must destroy all contexts and reinitialise";
+ default:
+ return "ERROR: UNKNOWN EGL ERROR";
+ }
+}
+
+// Returns the specified attribute of the specified EGLConfig
+//
+static int getEGLConfigAttrib(EGLConfig config, int attrib)
+{
+ int value;
+ eglGetConfigAttrib(_glfw.egl.display, config, attrib, &value);
+ return value;
+}
+
+// Return the EGLConfig most closely matching the specified hints
+//
+static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* desired,
+ EGLConfig* result)
+{
+ EGLConfig* nativeConfigs;
+ _GLFWfbconfig* usableConfigs;
+ const _GLFWfbconfig* closest;
+ int i, nativeCount, usableCount;
+
+ eglGetConfigs(_glfw.egl.display, NULL, 0, &nativeCount);
+ if (!nativeCount)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "EGL: No EGLConfigs returned");
+ return GLFW_FALSE;
+ }
+
+ nativeConfigs = calloc(nativeCount, sizeof(EGLConfig));
+ eglGetConfigs(_glfw.egl.display, nativeConfigs, nativeCount, &nativeCount);
+
+ usableConfigs = calloc(nativeCount, sizeof(_GLFWfbconfig));
+ usableCount = 0;
+
+ for (i = 0; i < nativeCount; i++)
+ {
+ const EGLConfig n = nativeConfigs[i];
+ _GLFWfbconfig* u = usableConfigs + usableCount;
+
+ // Only consider RGB(A) EGLConfigs
+ if (getEGLConfigAttrib(n, EGL_COLOR_BUFFER_TYPE) != EGL_RGB_BUFFER)
+ continue;
+
+ // Only consider window EGLConfigs
+ if (!(getEGLConfigAttrib(n, EGL_SURFACE_TYPE) & EGL_WINDOW_BIT))
+ continue;
+
+#if defined(_GLFW_X11)
+ {
+ XVisualInfo vi = {0};
+
+ // Only consider EGLConfigs with associated Visuals
+ vi.visualid = getEGLConfigAttrib(n, EGL_NATIVE_VISUAL_ID);
+ if (!vi.visualid)
+ continue;
+
+ if (desired->transparent)
+ {
+ int count;
+ XVisualInfo* vis =
+ XGetVisualInfo(_glfw.x11.display, VisualIDMask, &vi, &count);
+ if (vis)
+ {
+ u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
+ XFree(vis);
+ }
+ }
+ }
+#endif // _GLFW_X11
+
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ if (ctxconfig->major == 1)
+ {
+ if (!(getEGLConfigAttrib(n, EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES_BIT))
+ continue;
+ }
+ else
+ {
+ if (!(getEGLConfigAttrib(n, EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT))
+ continue;
+ }
+ }
+ else if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (!(getEGLConfigAttrib(n, EGL_RENDERABLE_TYPE) & EGL_OPENGL_BIT))
+ continue;
+ }
+
+ u->redBits = getEGLConfigAttrib(n, EGL_RED_SIZE);
+ u->greenBits = getEGLConfigAttrib(n, EGL_GREEN_SIZE);
+ u->blueBits = getEGLConfigAttrib(n, EGL_BLUE_SIZE);
+
+ u->alphaBits = getEGLConfigAttrib(n, EGL_ALPHA_SIZE);
+ u->depthBits = getEGLConfigAttrib(n, EGL_DEPTH_SIZE);
+ u->stencilBits = getEGLConfigAttrib(n, EGL_STENCIL_SIZE);
+
+ u->samples = getEGLConfigAttrib(n, EGL_SAMPLES);
+ u->doublebuffer = desired->doublebuffer;
+
+ u->handle = (uintptr_t) n;
+ usableCount++;
+ }
+
+ closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
+ if (closest)
+ *result = (EGLConfig) closest->handle;
+
+ free(nativeConfigs);
+ free(usableConfigs);
+
+ return closest != NULL;
+}
+
+static void makeContextCurrentEGL(_GLFWwindow* window)
+{
+ if (window)
+ {
+ if (!eglMakeCurrent(_glfw.egl.display,
+ window->context.egl.surface,
+ window->context.egl.surface,
+ window->context.egl.handle))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "EGL: Failed to make context current: %s",
+ getEGLErrorString(eglGetError()));
+ return;
+ }
+ }
+ else
+ {
+ if (!eglMakeCurrent(_glfw.egl.display,
+ EGL_NO_SURFACE,
+ EGL_NO_SURFACE,
+ EGL_NO_CONTEXT))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "EGL: Failed to clear current context: %s",
+ getEGLErrorString(eglGetError()));
+ return;
+ }
+ }
+
+ _glfwPlatformSetTls(&_glfw.contextSlot, window);
+}
+
+static void swapBuffersEGL(_GLFWwindow* window)
+{
+ if (window != _glfwPlatformGetTls(&_glfw.contextSlot))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "EGL: The context must be current on the calling thread when swapping buffers");
+ return;
+ }
+
+ eglSwapBuffers(_glfw.egl.display, window->context.egl.surface);
+}
+
+static void swapIntervalEGL(int interval)
+{
+ eglSwapInterval(_glfw.egl.display, interval);
+}
+
+static int extensionSupportedEGL(const char* extension)
+{
+ const char* extensions = eglQueryString(_glfw.egl.display, EGL_EXTENSIONS);
+ if (extensions)
+ {
+ if (_glfwStringInExtensionString(extension, extensions))
+ return GLFW_TRUE;
+ }
+
+ return GLFW_FALSE;
+}
+
+static GLFWglproc getProcAddressEGL(const char* procname)
+{
+ _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
+
+ if (window->context.egl.client)
+ {
+ GLFWglproc proc = (GLFWglproc) _glfw_dlsym(window->context.egl.client,
+ procname);
+ if (proc)
+ return proc;
+ }
+
+ return eglGetProcAddress(procname);
+}
+
+static void destroyContextEGL(_GLFWwindow* window)
+{
+#if defined(_GLFW_X11)
+ // NOTE: Do not unload libGL.so.1 while the X11 display is still open,
+ // as it will make XCloseDisplay segfault
+ if (window->context.client != GLFW_OPENGL_API)
+#endif // _GLFW_X11
+ {
+ if (window->context.egl.client)
+ {
+ _glfw_dlclose(window->context.egl.client);
+ window->context.egl.client = NULL;
+ }
+ }
+
+ if (window->context.egl.surface)
+ {
+ eglDestroySurface(_glfw.egl.display, window->context.egl.surface);
+ window->context.egl.surface = EGL_NO_SURFACE;
+ }
+
+ if (window->context.egl.handle)
+ {
+ eglDestroyContext(_glfw.egl.display, window->context.egl.handle);
+ window->context.egl.handle = EGL_NO_CONTEXT;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize EGL
+//
+GLFWbool _glfwInitEGL(void)
+{
+ int i;
+ const char* sonames[] =
+ {
+#if defined(_GLFW_EGL_LIBRARY)
+ _GLFW_EGL_LIBRARY,
+#elif defined(_GLFW_WIN32)
+ "libEGL.dll",
+ "EGL.dll",
+#elif defined(_GLFW_COCOA)
+ "libEGL.dylib",
+#elif defined(__CYGWIN__)
+ "libEGL-1.so",
+#else
+ "libEGL.so.1",
+#endif
+ NULL
+ };
+
+ if (_glfw.egl.handle)
+ return GLFW_TRUE;
+
+ for (i = 0; sonames[i]; i++)
+ {
+ _glfw.egl.handle = _glfw_dlopen(sonames[i]);
+ if (_glfw.egl.handle)
+ break;
+ }
+
+ if (!_glfw.egl.handle)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "EGL: Library not found");
+ return GLFW_FALSE;
+ }
+
+ _glfw.egl.prefix = (strncmp(sonames[i], "lib", 3) == 0);
+
+ _glfw.egl.GetConfigAttrib = (PFN_eglGetConfigAttrib)
+ _glfw_dlsym(_glfw.egl.handle, "eglGetConfigAttrib");
+ _glfw.egl.GetConfigs = (PFN_eglGetConfigs)
+ _glfw_dlsym(_glfw.egl.handle, "eglGetConfigs");
+ _glfw.egl.GetDisplay = (PFN_eglGetDisplay)
+ _glfw_dlsym(_glfw.egl.handle, "eglGetDisplay");
+ _glfw.egl.GetError = (PFN_eglGetError)
+ _glfw_dlsym(_glfw.egl.handle, "eglGetError");
+ _glfw.egl.Initialize = (PFN_eglInitialize)
+ _glfw_dlsym(_glfw.egl.handle, "eglInitialize");
+ _glfw.egl.Terminate = (PFN_eglTerminate)
+ _glfw_dlsym(_glfw.egl.handle, "eglTerminate");
+ _glfw.egl.BindAPI = (PFN_eglBindAPI)
+ _glfw_dlsym(_glfw.egl.handle, "eglBindAPI");
+ _glfw.egl.CreateContext = (PFN_eglCreateContext)
+ _glfw_dlsym(_glfw.egl.handle, "eglCreateContext");
+ _glfw.egl.DestroySurface = (PFN_eglDestroySurface)
+ _glfw_dlsym(_glfw.egl.handle, "eglDestroySurface");
+ _glfw.egl.DestroyContext = (PFN_eglDestroyContext)
+ _glfw_dlsym(_glfw.egl.handle, "eglDestroyContext");
+ _glfw.egl.CreateWindowSurface = (PFN_eglCreateWindowSurface)
+ _glfw_dlsym(_glfw.egl.handle, "eglCreateWindowSurface");
+ _glfw.egl.MakeCurrent = (PFN_eglMakeCurrent)
+ _glfw_dlsym(_glfw.egl.handle, "eglMakeCurrent");
+ _glfw.egl.SwapBuffers = (PFN_eglSwapBuffers)
+ _glfw_dlsym(_glfw.egl.handle, "eglSwapBuffers");
+ _glfw.egl.SwapInterval = (PFN_eglSwapInterval)
+ _glfw_dlsym(_glfw.egl.handle, "eglSwapInterval");
+ _glfw.egl.QueryString = (PFN_eglQueryString)
+ _glfw_dlsym(_glfw.egl.handle, "eglQueryString");
+ _glfw.egl.GetProcAddress = (PFN_eglGetProcAddress)
+ _glfw_dlsym(_glfw.egl.handle, "eglGetProcAddress");
+
+ if (!_glfw.egl.GetConfigAttrib ||
+ !_glfw.egl.GetConfigs ||
+ !_glfw.egl.GetDisplay ||
+ !_glfw.egl.GetError ||
+ !_glfw.egl.Initialize ||
+ !_glfw.egl.Terminate ||
+ !_glfw.egl.BindAPI ||
+ !_glfw.egl.CreateContext ||
+ !_glfw.egl.DestroySurface ||
+ !_glfw.egl.DestroyContext ||
+ !_glfw.egl.CreateWindowSurface ||
+ !_glfw.egl.MakeCurrent ||
+ !_glfw.egl.SwapBuffers ||
+ !_glfw.egl.SwapInterval ||
+ !_glfw.egl.QueryString ||
+ !_glfw.egl.GetProcAddress)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "EGL: Failed to load required entry points");
+
+ _glfwTerminateEGL();
+ return GLFW_FALSE;
+ }
+
+ _glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
+ if (_glfw.egl.display == EGL_NO_DISPLAY)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "EGL: Failed to get EGL display: %s",
+ getEGLErrorString(eglGetError()));
+
+ _glfwTerminateEGL();
+ return GLFW_FALSE;
+ }
+
+ if (!eglInitialize(_glfw.egl.display, &_glfw.egl.major, &_glfw.egl.minor))
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "EGL: Failed to initialize EGL: %s",
+ getEGLErrorString(eglGetError()));
+
+ _glfwTerminateEGL();
+ return GLFW_FALSE;
+ }
+
+ _glfw.egl.KHR_create_context =
+ extensionSupportedEGL("EGL_KHR_create_context");
+ _glfw.egl.KHR_create_context_no_error =
+ extensionSupportedEGL("EGL_KHR_create_context_no_error");
+ _glfw.egl.KHR_gl_colorspace =
+ extensionSupportedEGL("EGL_KHR_gl_colorspace");
+ _glfw.egl.KHR_get_all_proc_addresses =
+ extensionSupportedEGL("EGL_KHR_get_all_proc_addresses");
+ _glfw.egl.KHR_context_flush_control =
+ extensionSupportedEGL("EGL_KHR_context_flush_control");
+
+ return GLFW_TRUE;
+}
+
+// Terminate EGL
+//
+void _glfwTerminateEGL(void)
+{
+ if (_glfw.egl.display)
+ {
+ eglTerminate(_glfw.egl.display);
+ _glfw.egl.display = EGL_NO_DISPLAY;
+ }
+
+ if (_glfw.egl.handle)
+ {
+ _glfw_dlclose(_glfw.egl.handle);
+ _glfw.egl.handle = NULL;
+ }
+}
+
+#define setAttrib(a, v) \
+{ \
+ assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \
+ attribs[index++] = a; \
+ attribs[index++] = v; \
+}
+
+// Create the OpenGL or OpenGL ES context
+//
+GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ EGLint attribs[40];
+ EGLConfig config;
+ EGLContext share = NULL;
+ int index = 0;
+
+ if (!_glfw.egl.display)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "EGL: API not available");
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->share)
+ share = ctxconfig->share->context.egl.handle;
+
+ if (!chooseEGLConfig(ctxconfig, fbconfig, &config))
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "EGL: Failed to find a suitable EGLConfig");
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ if (!eglBindAPI(EGL_OPENGL_ES_API))
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "EGL: Failed to bind OpenGL ES: %s",
+ getEGLErrorString(eglGetError()));
+ return GLFW_FALSE;
+ }
+ }
+ else
+ {
+ if (!eglBindAPI(EGL_OPENGL_API))
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "EGL: Failed to bind OpenGL: %s",
+ getEGLErrorString(eglGetError()));
+ return GLFW_FALSE;
+ }
+ }
+
+ if (_glfw.egl.KHR_create_context)
+ {
+ int mask = 0, flags = 0;
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (ctxconfig->forward)
+ flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;
+
+ if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)
+ mask |= EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
+ else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)
+ mask |= EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR;
+ }
+
+ if (ctxconfig->debug)
+ flags |= EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR;
+
+ if (ctxconfig->robustness)
+ {
+ if (ctxconfig->robustness == GLFW_NO_RESET_NOTIFICATION)
+ {
+ setAttrib(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR,
+ EGL_NO_RESET_NOTIFICATION_KHR);
+ }
+ else if (ctxconfig->robustness == GLFW_LOSE_CONTEXT_ON_RESET)
+ {
+ setAttrib(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR,
+ EGL_LOSE_CONTEXT_ON_RESET_KHR);
+ }
+
+ flags |= EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
+ }
+
+ if (ctxconfig->noerror)
+ {
+ if (_glfw.egl.KHR_create_context_no_error)
+ setAttrib(EGL_CONTEXT_OPENGL_NO_ERROR_KHR, GLFW_TRUE);
+ }
+
+ if (ctxconfig->major != 1 || ctxconfig->minor != 0)
+ {
+ setAttrib(EGL_CONTEXT_MAJOR_VERSION_KHR, ctxconfig->major);
+ setAttrib(EGL_CONTEXT_MINOR_VERSION_KHR, ctxconfig->minor);
+ }
+
+ if (mask)
+ setAttrib(EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR, mask);
+
+ if (flags)
+ setAttrib(EGL_CONTEXT_FLAGS_KHR, flags);
+ }
+ else
+ {
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ setAttrib(EGL_CONTEXT_CLIENT_VERSION, ctxconfig->major);
+ }
+
+ if (_glfw.egl.KHR_context_flush_control)
+ {
+ if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_NONE)
+ {
+ setAttrib(EGL_CONTEXT_RELEASE_BEHAVIOR_KHR,
+ EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR);
+ }
+ else if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_FLUSH)
+ {
+ setAttrib(EGL_CONTEXT_RELEASE_BEHAVIOR_KHR,
+ EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR);
+ }
+ }
+
+ setAttrib(EGL_NONE, EGL_NONE);
+
+ window->context.egl.handle = eglCreateContext(_glfw.egl.display,
+ config, share, attribs);
+
+ if (window->context.egl.handle == EGL_NO_CONTEXT)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "EGL: Failed to create context: %s",
+ getEGLErrorString(eglGetError()));
+ return GLFW_FALSE;
+ }
+
+ // Set up attributes for surface creation
+ index = 0;
+
+ if (fbconfig->sRGB)
+ {
+ if (_glfw.egl.KHR_gl_colorspace)
+ setAttrib(EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR);
+ }
+
+ if (!fbconfig->doublebuffer)
+ setAttrib(EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER);
+
+ setAttrib(EGL_NONE, EGL_NONE);
+
+ window->context.egl.surface =
+ eglCreateWindowSurface(_glfw.egl.display,
+ config,
+ _GLFW_EGL_NATIVE_WINDOW,
+ attribs);
+ if (window->context.egl.surface == EGL_NO_SURFACE)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "EGL: Failed to create window surface: %s",
+ getEGLErrorString(eglGetError()));
+ return GLFW_FALSE;
+ }
+
+ window->context.egl.config = config;
+
+ // Load the appropriate client library
+ if (!_glfw.egl.KHR_get_all_proc_addresses)
+ {
+ int i;
+ const char** sonames;
+ const char* es1sonames[] =
+ {
+#if defined(_GLFW_GLESV1_LIBRARY)
+ _GLFW_GLESV1_LIBRARY,
+#elif defined(_GLFW_WIN32)
+ "GLESv1_CM.dll",
+ "libGLES_CM.dll",
+#elif defined(_GLFW_COCOA)
+ "libGLESv1_CM.dylib",
+#else
+ "libGLESv1_CM.so.1",
+ "libGLES_CM.so.1",
+#endif
+ NULL
+ };
+ const char* es2sonames[] =
+ {
+#if defined(_GLFW_GLESV2_LIBRARY)
+ _GLFW_GLESV2_LIBRARY,
+#elif defined(_GLFW_WIN32)
+ "GLESv2.dll",
+ "libGLESv2.dll",
+#elif defined(_GLFW_COCOA)
+ "libGLESv2.dylib",
+#elif defined(__CYGWIN__)
+ "libGLESv2-2.so",
+#else
+ "libGLESv2.so.2",
+#endif
+ NULL
+ };
+ const char* glsonames[] =
+ {
+#if defined(_GLFW_OPENGL_LIBRARY)
+ _GLFW_OPENGL_LIBRARY,
+#elif defined(_GLFW_WIN32)
+#elif defined(_GLFW_COCOA)
+#else
+ "libGL.so.1",
+#endif
+ NULL
+ };
+
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ if (ctxconfig->major == 1)
+ sonames = es1sonames;
+ else
+ sonames = es2sonames;
+ }
+ else
+ sonames = glsonames;
+
+ for (i = 0; sonames[i]; i++)
+ {
+ // HACK: Match presence of lib prefix to increase chance of finding
+ // a matching pair in the jungle that is Win32 EGL/GLES
+ if (_glfw.egl.prefix != (strncmp(sonames[i], "lib", 3) == 0))
+ continue;
+
+ window->context.egl.client = _glfw_dlopen(sonames[i]);
+ if (window->context.egl.client)
+ break;
+ }
+
+ if (!window->context.egl.client)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "EGL: Failed to load client library");
+ return GLFW_FALSE;
+ }
+ }
+
+ window->context.makeCurrent = makeContextCurrentEGL;
+ window->context.swapBuffers = swapBuffersEGL;
+ window->context.swapInterval = swapIntervalEGL;
+ window->context.extensionSupported = extensionSupportedEGL;
+ window->context.getProcAddress = getProcAddressEGL;
+ window->context.destroy = destroyContextEGL;
+
+ return GLFW_TRUE;
+}
+
+#undef setAttrib
+
+// Returns the Visual and depth of the chosen EGLConfig
+//
+#if defined(_GLFW_X11)
+GLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig,
+ Visual** visual, int* depth)
+{
+ XVisualInfo* result;
+ XVisualInfo desired;
+ EGLConfig native;
+ EGLint visualID = 0, count = 0;
+ const long vimask = VisualScreenMask | VisualIDMask;
+
+ if (!chooseEGLConfig(ctxconfig, fbconfig, &native))
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "EGL: Failed to find a suitable EGLConfig");
+ return GLFW_FALSE;
+ }
+
+ eglGetConfigAttrib(_glfw.egl.display, native,
+ EGL_NATIVE_VISUAL_ID, &visualID);
+
+ desired.screen = _glfw.x11.screen;
+ desired.visualid = visualID;
+
+ result = XGetVisualInfo(_glfw.x11.display, vimask, &desired, &count);
+ if (!result)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "EGL: Failed to retrieve Visual for EGLConfig");
+ return GLFW_FALSE;
+ }
+
+ *visual = result->visual;
+ *depth = result->depth;
+
+ XFree(result);
+ return GLFW_TRUE;
+}
+#endif // _GLFW_X11
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI EGLDisplay glfwGetEGLDisplay(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_DISPLAY);
+ return _glfw.egl.display;
+}
+
+GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_CONTEXT);
+
+ if (window->context.source != GLFW_EGL_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return EGL_NO_CONTEXT;
+ }
+
+ return window->context.egl.handle;
+}
+
+GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_SURFACE);
+
+ if (window->context.source != GLFW_EGL_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return EGL_NO_SURFACE;
+ }
+
+ return window->context.egl.surface;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.h
new file mode 100644
index 0000000..c8446da
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/egl_context.h
@@ -0,0 +1,215 @@
+//========================================================================
+// GLFW 3.3 EGL - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#if defined(_GLFW_USE_EGLPLATFORM_H)
+ #include <EGL/eglplatform.h>
+#elif defined(_GLFW_WIN32)
+ #define EGLAPIENTRY __stdcall
+typedef HDC EGLNativeDisplayType;
+typedef HWND EGLNativeWindowType;
+#elif defined(_GLFW_COCOA)
+ #define EGLAPIENTRY
+typedef void* EGLNativeDisplayType;
+typedef id EGLNativeWindowType;
+#elif defined(_GLFW_X11)
+ #define EGLAPIENTRY
+typedef Display* EGLNativeDisplayType;
+typedef Window EGLNativeWindowType;
+#elif defined(_GLFW_WAYLAND)
+ #define EGLAPIENTRY
+typedef struct wl_display* EGLNativeDisplayType;
+typedef struct wl_egl_window* EGLNativeWindowType;
+#else
+ #error "No supported EGL platform selected"
+#endif
+
+#define EGL_SUCCESS 0x3000
+#define EGL_NOT_INITIALIZED 0x3001
+#define EGL_BAD_ACCESS 0x3002
+#define EGL_BAD_ALLOC 0x3003
+#define EGL_BAD_ATTRIBUTE 0x3004
+#define EGL_BAD_CONFIG 0x3005
+#define EGL_BAD_CONTEXT 0x3006
+#define EGL_BAD_CURRENT_SURFACE 0x3007
+#define EGL_BAD_DISPLAY 0x3008
+#define EGL_BAD_MATCH 0x3009
+#define EGL_BAD_NATIVE_PIXMAP 0x300a
+#define EGL_BAD_NATIVE_WINDOW 0x300b
+#define EGL_BAD_PARAMETER 0x300c
+#define EGL_BAD_SURFACE 0x300d
+#define EGL_CONTEXT_LOST 0x300e
+#define EGL_COLOR_BUFFER_TYPE 0x303f
+#define EGL_RGB_BUFFER 0x308e
+#define EGL_SURFACE_TYPE 0x3033
+#define EGL_WINDOW_BIT 0x0004
+#define EGL_RENDERABLE_TYPE 0x3040
+#define EGL_OPENGL_ES_BIT 0x0001
+#define EGL_OPENGL_ES2_BIT 0x0004
+#define EGL_OPENGL_BIT 0x0008
+#define EGL_ALPHA_SIZE 0x3021
+#define EGL_BLUE_SIZE 0x3022
+#define EGL_GREEN_SIZE 0x3023
+#define EGL_RED_SIZE 0x3024
+#define EGL_DEPTH_SIZE 0x3025
+#define EGL_STENCIL_SIZE 0x3026
+#define EGL_SAMPLES 0x3031
+#define EGL_OPENGL_ES_API 0x30a0
+#define EGL_OPENGL_API 0x30a2
+#define EGL_NONE 0x3038
+#define EGL_RENDER_BUFFER 0x3086
+#define EGL_SINGLE_BUFFER 0x3085
+#define EGL_EXTENSIONS 0x3055
+#define EGL_CONTEXT_CLIENT_VERSION 0x3098
+#define EGL_NATIVE_VISUAL_ID 0x302e
+#define EGL_NO_SURFACE ((EGLSurface) 0)
+#define EGL_NO_DISPLAY ((EGLDisplay) 0)
+#define EGL_NO_CONTEXT ((EGLContext) 0)
+#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType) 0)
+
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31bd
+#define EGL_NO_RESET_NOTIFICATION_KHR 0x31be
+#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31bf
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
+#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
+#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30fb
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30fd
+#define EGL_CONTEXT_FLAGS_KHR 0x30fc
+#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31b3
+#define EGL_GL_COLORSPACE_KHR 0x309d
+#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089
+#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097
+#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0
+#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098
+
+typedef int EGLint;
+typedef unsigned int EGLBoolean;
+typedef unsigned int EGLenum;
+typedef void* EGLConfig;
+typedef void* EGLContext;
+typedef void* EGLDisplay;
+typedef void* EGLSurface;
+
+// EGL function pointer typedefs
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigAttrib)(EGLDisplay,EGLConfig,EGLint,EGLint*);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigs)(EGLDisplay,EGLConfig*,EGLint,EGLint*);
+typedef EGLDisplay (EGLAPIENTRY * PFN_eglGetDisplay)(EGLNativeDisplayType);
+typedef EGLint (EGLAPIENTRY * PFN_eglGetError)(void);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglInitialize)(EGLDisplay,EGLint*,EGLint*);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglTerminate)(EGLDisplay);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglBindAPI)(EGLenum);
+typedef EGLContext (EGLAPIENTRY * PFN_eglCreateContext)(EGLDisplay,EGLConfig,EGLContext,const EGLint*);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroySurface)(EGLDisplay,EGLSurface);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroyContext)(EGLDisplay,EGLContext);
+typedef EGLSurface (EGLAPIENTRY * PFN_eglCreateWindowSurface)(EGLDisplay,EGLConfig,EGLNativeWindowType,const EGLint*);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglMakeCurrent)(EGLDisplay,EGLSurface,EGLSurface,EGLContext);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapBuffers)(EGLDisplay,EGLSurface);
+typedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapInterval)(EGLDisplay,EGLint);
+typedef const char* (EGLAPIENTRY * PFN_eglQueryString)(EGLDisplay,EGLint);
+typedef GLFWglproc (EGLAPIENTRY * PFN_eglGetProcAddress)(const char*);
+#define eglGetConfigAttrib _glfw.egl.GetConfigAttrib
+#define eglGetConfigs _glfw.egl.GetConfigs
+#define eglGetDisplay _glfw.egl.GetDisplay
+#define eglGetError _glfw.egl.GetError
+#define eglInitialize _glfw.egl.Initialize
+#define eglTerminate _glfw.egl.Terminate
+#define eglBindAPI _glfw.egl.BindAPI
+#define eglCreateContext _glfw.egl.CreateContext
+#define eglDestroySurface _glfw.egl.DestroySurface
+#define eglDestroyContext _glfw.egl.DestroyContext
+#define eglCreateWindowSurface _glfw.egl.CreateWindowSurface
+#define eglMakeCurrent _glfw.egl.MakeCurrent
+#define eglSwapBuffers _glfw.egl.SwapBuffers
+#define eglSwapInterval _glfw.egl.SwapInterval
+#define eglQueryString _glfw.egl.QueryString
+#define eglGetProcAddress _glfw.egl.GetProcAddress
+
+#define _GLFW_EGL_CONTEXT_STATE _GLFWcontextEGL egl
+#define _GLFW_EGL_LIBRARY_CONTEXT_STATE _GLFWlibraryEGL egl
+
+
+// EGL-specific per-context data
+//
+typedef struct _GLFWcontextEGL
+{
+ EGLConfig config;
+ EGLContext handle;
+ EGLSurface surface;
+
+ void* client;
+} _GLFWcontextEGL;
+
+// EGL-specific global data
+//
+typedef struct _GLFWlibraryEGL
+{
+ EGLDisplay display;
+ EGLint major, minor;
+ GLFWbool prefix;
+
+ GLFWbool KHR_create_context;
+ GLFWbool KHR_create_context_no_error;
+ GLFWbool KHR_gl_colorspace;
+ GLFWbool KHR_get_all_proc_addresses;
+ GLFWbool KHR_context_flush_control;
+
+ void* handle;
+
+ PFN_eglGetConfigAttrib GetConfigAttrib;
+ PFN_eglGetConfigs GetConfigs;
+ PFN_eglGetDisplay GetDisplay;
+ PFN_eglGetError GetError;
+ PFN_eglInitialize Initialize;
+ PFN_eglTerminate Terminate;
+ PFN_eglBindAPI BindAPI;
+ PFN_eglCreateContext CreateContext;
+ PFN_eglDestroySurface DestroySurface;
+ PFN_eglDestroyContext DestroyContext;
+ PFN_eglCreateWindowSurface CreateWindowSurface;
+ PFN_eglMakeCurrent MakeCurrent;
+ PFN_eglSwapBuffers SwapBuffers;
+ PFN_eglSwapInterval SwapInterval;
+ PFN_eglQueryString QueryString;
+ PFN_eglGetProcAddress GetProcAddress;
+} _GLFWlibraryEGL;
+
+
+GLFWbool _glfwInitEGL(void);
+void _glfwTerminateEGL(void);
+GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig);
+#if defined(_GLFW_X11)
+GLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig,
+ Visual** visual, int* depth);
+#endif /*_GLFW_X11*/
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.c
new file mode 100644
index 0000000..98a35e2
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.c
@@ -0,0 +1,699 @@
+//========================================================================
+// GLFW 3.3 GLX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#ifndef GLXBadProfileARB
+ #define GLXBadProfileARB 13
+#endif
+
+
+// Returns the specified attribute of the specified GLXFBConfig
+//
+static int getGLXFBConfigAttrib(GLXFBConfig fbconfig, int attrib)
+{
+ int value;
+ glXGetFBConfigAttrib(_glfw.x11.display, fbconfig, attrib, &value);
+ return value;
+}
+
+// Return the GLXFBConfig most closely matching the specified hints
+//
+static GLFWbool chooseGLXFBConfig(const _GLFWfbconfig* desired,
+ GLXFBConfig* result)
+{
+ GLXFBConfig* nativeConfigs;
+ _GLFWfbconfig* usableConfigs;
+ const _GLFWfbconfig* closest;
+ int i, nativeCount, usableCount;
+ const char* vendor;
+ GLFWbool trustWindowBit = GLFW_TRUE;
+
+ // HACK: This is a (hopefully temporary) workaround for Chromium
+ // (VirtualBox GL) not setting the window bit on any GLXFBConfigs
+ vendor = glXGetClientString(_glfw.x11.display, GLX_VENDOR);
+ if (vendor && strcmp(vendor, "Chromium") == 0)
+ trustWindowBit = GLFW_FALSE;
+
+ nativeConfigs =
+ glXGetFBConfigs(_glfw.x11.display, _glfw.x11.screen, &nativeCount);
+ if (!nativeConfigs || !nativeCount)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: No GLXFBConfigs returned");
+ return GLFW_FALSE;
+ }
+
+ usableConfigs = calloc(nativeCount, sizeof(_GLFWfbconfig));
+ usableCount = 0;
+
+ for (i = 0; i < nativeCount; i++)
+ {
+ const GLXFBConfig n = nativeConfigs[i];
+ _GLFWfbconfig* u = usableConfigs + usableCount;
+
+ // Only consider RGBA GLXFBConfigs
+ if (!(getGLXFBConfigAttrib(n, GLX_RENDER_TYPE) & GLX_RGBA_BIT))
+ continue;
+
+ // Only consider window GLXFBConfigs
+ if (!(getGLXFBConfigAttrib(n, GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT))
+ {
+ if (trustWindowBit)
+ continue;
+ }
+
+ if (getGLXFBConfigAttrib(n, GLX_DOUBLEBUFFER) != desired->doublebuffer)
+ continue;
+
+ if (desired->transparent)
+ {
+ XVisualInfo* vi = glXGetVisualFromFBConfig(_glfw.x11.display, n);
+ if (vi)
+ {
+ u->transparent = _glfwIsVisualTransparentX11(vi->visual);
+ XFree(vi);
+ }
+ }
+
+ u->redBits = getGLXFBConfigAttrib(n, GLX_RED_SIZE);
+ u->greenBits = getGLXFBConfigAttrib(n, GLX_GREEN_SIZE);
+ u->blueBits = getGLXFBConfigAttrib(n, GLX_BLUE_SIZE);
+
+ u->alphaBits = getGLXFBConfigAttrib(n, GLX_ALPHA_SIZE);
+ u->depthBits = getGLXFBConfigAttrib(n, GLX_DEPTH_SIZE);
+ u->stencilBits = getGLXFBConfigAttrib(n, GLX_STENCIL_SIZE);
+
+ u->accumRedBits = getGLXFBConfigAttrib(n, GLX_ACCUM_RED_SIZE);
+ u->accumGreenBits = getGLXFBConfigAttrib(n, GLX_ACCUM_GREEN_SIZE);
+ u->accumBlueBits = getGLXFBConfigAttrib(n, GLX_ACCUM_BLUE_SIZE);
+ u->accumAlphaBits = getGLXFBConfigAttrib(n, GLX_ACCUM_ALPHA_SIZE);
+
+ u->auxBuffers = getGLXFBConfigAttrib(n, GLX_AUX_BUFFERS);
+
+ if (getGLXFBConfigAttrib(n, GLX_STEREO))
+ u->stereo = GLFW_TRUE;
+
+ if (_glfw.glx.ARB_multisample)
+ u->samples = getGLXFBConfigAttrib(n, GLX_SAMPLES);
+
+ if (_glfw.glx.ARB_framebuffer_sRGB || _glfw.glx.EXT_framebuffer_sRGB)
+ u->sRGB = getGLXFBConfigAttrib(n, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB);
+
+ u->handle = (uintptr_t) n;
+ usableCount++;
+ }
+
+ closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
+ if (closest)
+ *result = (GLXFBConfig) closest->handle;
+
+ XFree(nativeConfigs);
+ free(usableConfigs);
+
+ return closest != NULL;
+}
+
+// Create the OpenGL context using legacy API
+//
+static GLXContext createLegacyContextGLX(_GLFWwindow* window,
+ GLXFBConfig fbconfig,
+ GLXContext share)
+{
+ return glXCreateNewContext(_glfw.x11.display,
+ fbconfig,
+ GLX_RGBA_TYPE,
+ share,
+ True);
+}
+
+static void makeContextCurrentGLX(_GLFWwindow* window)
+{
+ if (window)
+ {
+ if (!glXMakeCurrent(_glfw.x11.display,
+ window->context.glx.window,
+ window->context.glx.handle))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "GLX: Failed to make context current");
+ return;
+ }
+ }
+ else
+ {
+ if (!glXMakeCurrent(_glfw.x11.display, None, NULL))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "GLX: Failed to clear current context");
+ return;
+ }
+ }
+
+ _glfwPlatformSetTls(&_glfw.contextSlot, window);
+}
+
+static void swapBuffersGLX(_GLFWwindow* window)
+{
+ glXSwapBuffers(_glfw.x11.display, window->context.glx.window);
+}
+
+static void swapIntervalGLX(int interval)
+{
+ _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
+
+ if (_glfw.glx.EXT_swap_control)
+ {
+ _glfw.glx.SwapIntervalEXT(_glfw.x11.display,
+ window->context.glx.window,
+ interval);
+ }
+ else if (_glfw.glx.MESA_swap_control)
+ _glfw.glx.SwapIntervalMESA(interval);
+ else if (_glfw.glx.SGI_swap_control)
+ {
+ if (interval > 0)
+ _glfw.glx.SwapIntervalSGI(interval);
+ }
+}
+
+static int extensionSupportedGLX(const char* extension)
+{
+ const char* extensions =
+ glXQueryExtensionsString(_glfw.x11.display, _glfw.x11.screen);
+ if (extensions)
+ {
+ if (_glfwStringInExtensionString(extension, extensions))
+ return GLFW_TRUE;
+ }
+
+ return GLFW_FALSE;
+}
+
+static GLFWglproc getProcAddressGLX(const char* procname)
+{
+ if (_glfw.glx.GetProcAddress)
+ return _glfw.glx.GetProcAddress((const GLubyte*) procname);
+ else if (_glfw.glx.GetProcAddressARB)
+ return _glfw.glx.GetProcAddressARB((const GLubyte*) procname);
+ else
+ return _glfw_dlsym(_glfw.glx.handle, procname);
+}
+
+static void destroyContextGLX(_GLFWwindow* window)
+{
+ if (window->context.glx.window)
+ {
+ glXDestroyWindow(_glfw.x11.display, window->context.glx.window);
+ window->context.glx.window = None;
+ }
+
+ if (window->context.glx.handle)
+ {
+ glXDestroyContext(_glfw.x11.display, window->context.glx.handle);
+ window->context.glx.handle = NULL;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize GLX
+//
+GLFWbool _glfwInitGLX(void)
+{
+ int i;
+ const char* sonames[] =
+ {
+#if defined(_GLFW_GLX_LIBRARY)
+ _GLFW_GLX_LIBRARY,
+#elif defined(__CYGWIN__)
+ "libGL-1.so",
+#else
+ "libGL.so.1",
+ "libGL.so",
+#endif
+ NULL
+ };
+
+ if (_glfw.glx.handle)
+ return GLFW_TRUE;
+
+ for (i = 0; sonames[i]; i++)
+ {
+ _glfw.glx.handle = _glfw_dlopen(sonames[i]);
+ if (_glfw.glx.handle)
+ break;
+ }
+
+ if (!_glfw.glx.handle)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: Failed to load GLX");
+ return GLFW_FALSE;
+ }
+
+ _glfw.glx.GetFBConfigs =
+ _glfw_dlsym(_glfw.glx.handle, "glXGetFBConfigs");
+ _glfw.glx.GetFBConfigAttrib =
+ _glfw_dlsym(_glfw.glx.handle, "glXGetFBConfigAttrib");
+ _glfw.glx.GetClientString =
+ _glfw_dlsym(_glfw.glx.handle, "glXGetClientString");
+ _glfw.glx.QueryExtension =
+ _glfw_dlsym(_glfw.glx.handle, "glXQueryExtension");
+ _glfw.glx.QueryVersion =
+ _glfw_dlsym(_glfw.glx.handle, "glXQueryVersion");
+ _glfw.glx.DestroyContext =
+ _glfw_dlsym(_glfw.glx.handle, "glXDestroyContext");
+ _glfw.glx.MakeCurrent =
+ _glfw_dlsym(_glfw.glx.handle, "glXMakeCurrent");
+ _glfw.glx.SwapBuffers =
+ _glfw_dlsym(_glfw.glx.handle, "glXSwapBuffers");
+ _glfw.glx.QueryExtensionsString =
+ _glfw_dlsym(_glfw.glx.handle, "glXQueryExtensionsString");
+ _glfw.glx.CreateNewContext =
+ _glfw_dlsym(_glfw.glx.handle, "glXCreateNewContext");
+ _glfw.glx.CreateWindow =
+ _glfw_dlsym(_glfw.glx.handle, "glXCreateWindow");
+ _glfw.glx.DestroyWindow =
+ _glfw_dlsym(_glfw.glx.handle, "glXDestroyWindow");
+ _glfw.glx.GetProcAddress =
+ _glfw_dlsym(_glfw.glx.handle, "glXGetProcAddress");
+ _glfw.glx.GetProcAddressARB =
+ _glfw_dlsym(_glfw.glx.handle, "glXGetProcAddressARB");
+ _glfw.glx.GetVisualFromFBConfig =
+ _glfw_dlsym(_glfw.glx.handle, "glXGetVisualFromFBConfig");
+
+ if (!_glfw.glx.GetFBConfigs ||
+ !_glfw.glx.GetFBConfigAttrib ||
+ !_glfw.glx.GetClientString ||
+ !_glfw.glx.QueryExtension ||
+ !_glfw.glx.QueryVersion ||
+ !_glfw.glx.DestroyContext ||
+ !_glfw.glx.MakeCurrent ||
+ !_glfw.glx.SwapBuffers ||
+ !_glfw.glx.QueryExtensionsString ||
+ !_glfw.glx.CreateNewContext ||
+ !_glfw.glx.CreateWindow ||
+ !_glfw.glx.DestroyWindow ||
+ !_glfw.glx.GetProcAddress ||
+ !_glfw.glx.GetProcAddressARB ||
+ !_glfw.glx.GetVisualFromFBConfig)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "GLX: Failed to load required entry points");
+ return GLFW_FALSE;
+ }
+
+ if (!glXQueryExtension(_glfw.x11.display,
+ &_glfw.glx.errorBase,
+ &_glfw.glx.eventBase))
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: GLX extension not found");
+ return GLFW_FALSE;
+ }
+
+ if (!glXQueryVersion(_glfw.x11.display, &_glfw.glx.major, &_glfw.glx.minor))
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "GLX: Failed to query GLX version");
+ return GLFW_FALSE;
+ }
+
+ if (_glfw.glx.major == 1 && _glfw.glx.minor < 3)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "GLX: GLX version 1.3 is required");
+ return GLFW_FALSE;
+ }
+
+ if (extensionSupportedGLX("GLX_EXT_swap_control"))
+ {
+ _glfw.glx.SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)
+ getProcAddressGLX("glXSwapIntervalEXT");
+
+ if (_glfw.glx.SwapIntervalEXT)
+ _glfw.glx.EXT_swap_control = GLFW_TRUE;
+ }
+
+ if (extensionSupportedGLX("GLX_SGI_swap_control"))
+ {
+ _glfw.glx.SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)
+ getProcAddressGLX("glXSwapIntervalSGI");
+
+ if (_glfw.glx.SwapIntervalSGI)
+ _glfw.glx.SGI_swap_control = GLFW_TRUE;
+ }
+
+ if (extensionSupportedGLX("GLX_MESA_swap_control"))
+ {
+ _glfw.glx.SwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)
+ getProcAddressGLX("glXSwapIntervalMESA");
+
+ if (_glfw.glx.SwapIntervalMESA)
+ _glfw.glx.MESA_swap_control = GLFW_TRUE;
+ }
+
+ if (extensionSupportedGLX("GLX_ARB_multisample"))
+ _glfw.glx.ARB_multisample = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_ARB_framebuffer_sRGB"))
+ _glfw.glx.ARB_framebuffer_sRGB = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_EXT_framebuffer_sRGB"))
+ _glfw.glx.EXT_framebuffer_sRGB = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_ARB_create_context"))
+ {
+ _glfw.glx.CreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)
+ getProcAddressGLX("glXCreateContextAttribsARB");
+
+ if (_glfw.glx.CreateContextAttribsARB)
+ _glfw.glx.ARB_create_context = GLFW_TRUE;
+ }
+
+ if (extensionSupportedGLX("GLX_ARB_create_context_robustness"))
+ _glfw.glx.ARB_create_context_robustness = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_ARB_create_context_profile"))
+ _glfw.glx.ARB_create_context_profile = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_EXT_create_context_es2_profile"))
+ _glfw.glx.EXT_create_context_es2_profile = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_ARB_create_context_no_error"))
+ _glfw.glx.ARB_create_context_no_error = GLFW_TRUE;
+
+ if (extensionSupportedGLX("GLX_ARB_context_flush_control"))
+ _glfw.glx.ARB_context_flush_control = GLFW_TRUE;
+
+ return GLFW_TRUE;
+}
+
+// Terminate GLX
+//
+void _glfwTerminateGLX(void)
+{
+ // NOTE: This function must not call any X11 functions, as it is called
+ // after XCloseDisplay (see _glfwPlatformTerminate for details)
+
+ if (_glfw.glx.handle)
+ {
+ _glfw_dlclose(_glfw.glx.handle);
+ _glfw.glx.handle = NULL;
+ }
+}
+
+#define setAttrib(a, v) \
+{ \
+ assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \
+ attribs[index++] = a; \
+ attribs[index++] = v; \
+}
+
+// Create the OpenGL or OpenGL ES context
+//
+GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ int attribs[40];
+ GLXFBConfig native = NULL;
+ GLXContext share = NULL;
+
+ if (ctxconfig->share)
+ share = ctxconfig->share->context.glx.handle;
+
+ if (!chooseGLXFBConfig(fbconfig, &native))
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "GLX: Failed to find a suitable GLXFBConfig");
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ if (!_glfw.glx.ARB_create_context ||
+ !_glfw.glx.ARB_create_context_profile ||
+ !_glfw.glx.EXT_create_context_es2_profile)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "GLX: OpenGL ES requested but GLX_EXT_create_context_es2_profile is unavailable");
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->forward)
+ {
+ if (!_glfw.glx.ARB_create_context)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailable");
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->profile)
+ {
+ if (!_glfw.glx.ARB_create_context ||
+ !_glfw.glx.ARB_create_context_profile)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "GLX: An OpenGL profile requested but GLX_ARB_create_context_profile is unavailable");
+ return GLFW_FALSE;
+ }
+ }
+
+ _glfwGrabErrorHandlerX11();
+
+ if (_glfw.glx.ARB_create_context)
+ {
+ int index = 0, mask = 0, flags = 0;
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (ctxconfig->forward)
+ flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+
+ if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)
+ mask |= GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+ else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)
+ mask |= GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+ }
+ else
+ mask |= GLX_CONTEXT_ES2_PROFILE_BIT_EXT;
+
+ if (ctxconfig->debug)
+ flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
+
+ if (ctxconfig->robustness)
+ {
+ if (_glfw.glx.ARB_create_context_robustness)
+ {
+ if (ctxconfig->robustness == GLFW_NO_RESET_NOTIFICATION)
+ {
+ setAttrib(GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,
+ GLX_NO_RESET_NOTIFICATION_ARB);
+ }
+ else if (ctxconfig->robustness == GLFW_LOSE_CONTEXT_ON_RESET)
+ {
+ setAttrib(GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,
+ GLX_LOSE_CONTEXT_ON_RESET_ARB);
+ }
+
+ flags |= GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB;
+ }
+ }
+
+ if (ctxconfig->release)
+ {
+ if (_glfw.glx.ARB_context_flush_control)
+ {
+ if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_NONE)
+ {
+ setAttrib(GLX_CONTEXT_RELEASE_BEHAVIOR_ARB,
+ GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB);
+ }
+ else if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_FLUSH)
+ {
+ setAttrib(GLX_CONTEXT_RELEASE_BEHAVIOR_ARB,
+ GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB);
+ }
+ }
+ }
+
+ if (ctxconfig->noerror)
+ {
+ if (_glfw.glx.ARB_create_context_no_error)
+ setAttrib(GLX_CONTEXT_OPENGL_NO_ERROR_ARB, GLFW_TRUE);
+ }
+
+ // NOTE: Only request an explicitly versioned context when necessary, as
+ // explicitly requesting version 1.0 does not always return the
+ // highest version supported by the driver
+ if (ctxconfig->major != 1 || ctxconfig->minor != 0)
+ {
+ setAttrib(GLX_CONTEXT_MAJOR_VERSION_ARB, ctxconfig->major);
+ setAttrib(GLX_CONTEXT_MINOR_VERSION_ARB, ctxconfig->minor);
+ }
+
+ if (mask)
+ setAttrib(GLX_CONTEXT_PROFILE_MASK_ARB, mask);
+
+ if (flags)
+ setAttrib(GLX_CONTEXT_FLAGS_ARB, flags);
+
+ setAttrib(None, None);
+
+ window->context.glx.handle =
+ _glfw.glx.CreateContextAttribsARB(_glfw.x11.display,
+ native,
+ share,
+ True,
+ attribs);
+
+ // HACK: This is a fallback for broken versions of the Mesa
+ // implementation of GLX_ARB_create_context_profile that fail
+ // default 1.0 context creation with a GLXBadProfileARB error in
+ // violation of the extension spec
+ if (!window->context.glx.handle)
+ {
+ if (_glfw.x11.errorCode == _glfw.glx.errorBase + GLXBadProfileARB &&
+ ctxconfig->client == GLFW_OPENGL_API &&
+ ctxconfig->profile == GLFW_OPENGL_ANY_PROFILE &&
+ ctxconfig->forward == GLFW_FALSE)
+ {
+ window->context.glx.handle =
+ createLegacyContextGLX(window, native, share);
+ }
+ }
+ }
+ else
+ {
+ window->context.glx.handle =
+ createLegacyContextGLX(window, native, share);
+ }
+
+ _glfwReleaseErrorHandlerX11();
+
+ if (!window->context.glx.handle)
+ {
+ _glfwInputErrorX11(GLFW_VERSION_UNAVAILABLE, "GLX: Failed to create context");
+ return GLFW_FALSE;
+ }
+
+ window->context.glx.window =
+ glXCreateWindow(_glfw.x11.display, native, window->x11.handle, NULL);
+ if (!window->context.glx.window)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to create window");
+ return GLFW_FALSE;
+ }
+
+ window->context.makeCurrent = makeContextCurrentGLX;
+ window->context.swapBuffers = swapBuffersGLX;
+ window->context.swapInterval = swapIntervalGLX;
+ window->context.extensionSupported = extensionSupportedGLX;
+ window->context.getProcAddress = getProcAddressGLX;
+ window->context.destroy = destroyContextGLX;
+
+ return GLFW_TRUE;
+}
+
+#undef setAttrib
+
+// Returns the Visual and depth of the chosen GLXFBConfig
+//
+GLFWbool _glfwChooseVisualGLX(const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig,
+ Visual** visual, int* depth)
+{
+ GLXFBConfig native;
+ XVisualInfo* result;
+
+ if (!chooseGLXFBConfig(fbconfig, &native))
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "GLX: Failed to find a suitable GLXFBConfig");
+ return GLFW_FALSE;
+ }
+
+ result = glXGetVisualFromFBConfig(_glfw.x11.display, native);
+ if (!result)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "GLX: Failed to retrieve Visual for GLXFBConfig");
+ return GLFW_FALSE;
+ }
+
+ *visual = result->visual;
+ *depth = result->depth;
+
+ XFree(result);
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (window->context.source != GLFW_NATIVE_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return NULL;
+ }
+
+ return window->context.glx.handle;
+}
+
+GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(None);
+
+ if (window->context.source != GLFW_NATIVE_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return None;
+ }
+
+ return window->context.glx.window;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.h
new file mode 100644
index 0000000..df0233e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/glx_context.h
@@ -0,0 +1,179 @@
+//========================================================================
+// GLFW 3.3 GLX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#define GLX_VENDOR 1
+#define GLX_RGBA_BIT 0x00000001
+#define GLX_WINDOW_BIT 0x00000001
+#define GLX_DRAWABLE_TYPE 0x8010
+#define GLX_RENDER_TYPE 0x8011
+#define GLX_RGBA_TYPE 0x8014
+#define GLX_DOUBLEBUFFER 5
+#define GLX_STEREO 6
+#define GLX_AUX_BUFFERS 7
+#define GLX_RED_SIZE 8
+#define GLX_GREEN_SIZE 9
+#define GLX_BLUE_SIZE 10
+#define GLX_ALPHA_SIZE 11
+#define GLX_DEPTH_SIZE 12
+#define GLX_STENCIL_SIZE 13
+#define GLX_ACCUM_RED_SIZE 14
+#define GLX_ACCUM_GREEN_SIZE 15
+#define GLX_ACCUM_BLUE_SIZE 16
+#define GLX_ACCUM_ALPHA_SIZE 17
+#define GLX_SAMPLES 0x186a1
+#define GLX_VISUAL_ID 0x800b
+
+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20b2
+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define GLX_CONTEXT_FLAGS_ARB 0x2094
+#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
+#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
+#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
+
+typedef XID GLXWindow;
+typedef XID GLXDrawable;
+typedef struct __GLXFBConfig* GLXFBConfig;
+typedef struct __GLXcontext* GLXContext;
+typedef void (*__GLXextproc)(void);
+
+typedef int (*PFNGLXGETFBCONFIGATTRIBPROC)(Display*,GLXFBConfig,int,int*);
+typedef const char* (*PFNGLXGETCLIENTSTRINGPROC)(Display*,int);
+typedef Bool (*PFNGLXQUERYEXTENSIONPROC)(Display*,int*,int*);
+typedef Bool (*PFNGLXQUERYVERSIONPROC)(Display*,int*,int*);
+typedef void (*PFNGLXDESTROYCONTEXTPROC)(Display*,GLXContext);
+typedef Bool (*PFNGLXMAKECURRENTPROC)(Display*,GLXDrawable,GLXContext);
+typedef void (*PFNGLXSWAPBUFFERSPROC)(Display*,GLXDrawable);
+typedef const char* (*PFNGLXQUERYEXTENSIONSSTRINGPROC)(Display*,int);
+typedef GLXFBConfig* (*PFNGLXGETFBCONFIGSPROC)(Display*,int,int*);
+typedef GLXContext (*PFNGLXCREATENEWCONTEXTPROC)(Display*,GLXFBConfig,int,GLXContext,Bool);
+typedef __GLXextproc (* PFNGLXGETPROCADDRESSPROC)(const GLubyte *procName);
+typedef void (*PFNGLXSWAPINTERVALEXTPROC)(Display*,GLXDrawable,int);
+typedef XVisualInfo* (*PFNGLXGETVISUALFROMFBCONFIGPROC)(Display*,GLXFBConfig);
+typedef GLXWindow (*PFNGLXCREATEWINDOWPROC)(Display*,GLXFBConfig,Window,const int*);
+typedef void (*PFNGLXDESTROYWINDOWPROC)(Display*,GLXWindow);
+
+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(int);
+typedef int (*PFNGLXSWAPINTERVALSGIPROC)(int);
+typedef GLXContext (*PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display*,GLXFBConfig,GLXContext,Bool,const int*);
+
+// libGL.so function pointer typedefs
+#define glXGetFBConfigs _glfw.glx.GetFBConfigs
+#define glXGetFBConfigAttrib _glfw.glx.GetFBConfigAttrib
+#define glXGetClientString _glfw.glx.GetClientString
+#define glXQueryExtension _glfw.glx.QueryExtension
+#define glXQueryVersion _glfw.glx.QueryVersion
+#define glXDestroyContext _glfw.glx.DestroyContext
+#define glXMakeCurrent _glfw.glx.MakeCurrent
+#define glXSwapBuffers _glfw.glx.SwapBuffers
+#define glXQueryExtensionsString _glfw.glx.QueryExtensionsString
+#define glXCreateNewContext _glfw.glx.CreateNewContext
+#define glXGetVisualFromFBConfig _glfw.glx.GetVisualFromFBConfig
+#define glXCreateWindow _glfw.glx.CreateWindow
+#define glXDestroyWindow _glfw.glx.DestroyWindow
+
+#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextGLX glx
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryGLX glx
+
+
+// GLX-specific per-context data
+//
+typedef struct _GLFWcontextGLX
+{
+ GLXContext handle;
+ GLXWindow window;
+} _GLFWcontextGLX;
+
+// GLX-specific global data
+//
+typedef struct _GLFWlibraryGLX
+{
+ int major, minor;
+ int eventBase;
+ int errorBase;
+
+ // dlopen handle for libGL.so.1
+ void* handle;
+
+ // GLX 1.3 functions
+ PFNGLXGETFBCONFIGSPROC GetFBConfigs;
+ PFNGLXGETFBCONFIGATTRIBPROC GetFBConfigAttrib;
+ PFNGLXGETCLIENTSTRINGPROC GetClientString;
+ PFNGLXQUERYEXTENSIONPROC QueryExtension;
+ PFNGLXQUERYVERSIONPROC QueryVersion;
+ PFNGLXDESTROYCONTEXTPROC DestroyContext;
+ PFNGLXMAKECURRENTPROC MakeCurrent;
+ PFNGLXSWAPBUFFERSPROC SwapBuffers;
+ PFNGLXQUERYEXTENSIONSSTRINGPROC QueryExtensionsString;
+ PFNGLXCREATENEWCONTEXTPROC CreateNewContext;
+ PFNGLXGETVISUALFROMFBCONFIGPROC GetVisualFromFBConfig;
+ PFNGLXCREATEWINDOWPROC CreateWindow;
+ PFNGLXDESTROYWINDOWPROC DestroyWindow;
+
+ // GLX 1.4 and extension functions
+ PFNGLXGETPROCADDRESSPROC GetProcAddress;
+ PFNGLXGETPROCADDRESSPROC GetProcAddressARB;
+ PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI;
+ PFNGLXSWAPINTERVALEXTPROC SwapIntervalEXT;
+ PFNGLXSWAPINTERVALMESAPROC SwapIntervalMESA;
+ PFNGLXCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
+ GLFWbool SGI_swap_control;
+ GLFWbool EXT_swap_control;
+ GLFWbool MESA_swap_control;
+ GLFWbool ARB_multisample;
+ GLFWbool ARB_framebuffer_sRGB;
+ GLFWbool EXT_framebuffer_sRGB;
+ GLFWbool ARB_create_context;
+ GLFWbool ARB_create_context_profile;
+ GLFWbool ARB_create_context_robustness;
+ GLFWbool EXT_create_context_es2_profile;
+ GLFWbool ARB_create_context_no_error;
+ GLFWbool ARB_context_flush_control;
+} _GLFWlibraryGLX;
+
+GLFWbool _glfwInitGLX(void);
+void _glfwTerminateGLX(void);
+GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig);
+void _glfwDestroyContextGLX(_GLFWwindow* window);
+GLFWbool _glfwChooseVisualGLX(const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig,
+ Visual** visual, int* depth);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/init.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/init.c
new file mode 100644
index 0000000..52ade58
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/init.c
@@ -0,0 +1,326 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <assert.h>
+
+
+// NOTE: The global variables below comprise all mutable global data in GLFW
+// Any other mutable global variable is a bug
+
+// This contains all mutable state shared between compilation units of GLFW
+//
+_GLFWlibrary _glfw = { GLFW_FALSE };
+
+// These are outside of _glfw so they can be used before initialization and
+// after termination without special handling when _glfw is cleared to zero
+//
+static _GLFWerror _glfwMainThreadError;
+static GLFWerrorfun _glfwErrorCallback;
+static _GLFWinitconfig _glfwInitHints =
+{
+ GLFW_TRUE, // hat buttons
+ {
+ GLFW_TRUE, // macOS menu bar
+ GLFW_TRUE // macOS bundle chdir
+ }
+};
+
+// Terminate the library
+//
+static void terminate(void)
+{
+ int i;
+
+ memset(&_glfw.callbacks, 0, sizeof(_glfw.callbacks));
+
+ while (_glfw.windowListHead)
+ glfwDestroyWindow((GLFWwindow*) _glfw.windowListHead);
+
+ while (_glfw.cursorListHead)
+ glfwDestroyCursor((GLFWcursor*) _glfw.cursorListHead);
+
+ for (i = 0; i < _glfw.monitorCount; i++)
+ {
+ _GLFWmonitor* monitor = _glfw.monitors[i];
+ if (monitor->originalRamp.size)
+ _glfwPlatformSetGammaRamp(monitor, &monitor->originalRamp);
+ _glfwFreeMonitor(monitor);
+ }
+
+ free(_glfw.monitors);
+ _glfw.monitors = NULL;
+ _glfw.monitorCount = 0;
+
+ free(_glfw.mappings);
+ _glfw.mappings = NULL;
+ _glfw.mappingCount = 0;
+
+ _glfwTerminateVulkan();
+ _glfwPlatformTerminate();
+
+ _glfw.initialized = GLFW_FALSE;
+
+ while (_glfw.errorListHead)
+ {
+ _GLFWerror* error = _glfw.errorListHead;
+ _glfw.errorListHead = error->next;
+ free(error);
+ }
+
+ _glfwPlatformDestroyTls(&_glfw.contextSlot);
+ _glfwPlatformDestroyTls(&_glfw.errorSlot);
+ _glfwPlatformDestroyMutex(&_glfw.errorLock);
+
+ memset(&_glfw, 0, sizeof(_glfw));
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+char* _glfw_strdup(const char* source)
+{
+ const size_t length = strlen(source);
+ char* result = calloc(length + 1, 1);
+ strcpy(result, source);
+ return result;
+}
+
+float _glfw_fminf(float a, float b)
+{
+ if (a != a)
+ return b;
+ else if (b != b)
+ return a;
+ else if (a < b)
+ return a;
+ else
+ return b;
+}
+
+float _glfw_fmaxf(float a, float b)
+{
+ if (a != a)
+ return b;
+ else if (b != b)
+ return a;
+ else if (a > b)
+ return a;
+ else
+ return b;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW event API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Notifies shared code of an error
+//
+void _glfwInputError(int code, const char* format, ...)
+{
+ _GLFWerror* error;
+ char description[_GLFW_MESSAGE_SIZE];
+
+ if (format)
+ {
+ va_list vl;
+
+ va_start(vl, format);
+ vsnprintf(description, sizeof(description), format, vl);
+ va_end(vl);
+
+ description[sizeof(description) - 1] = '\0';
+ }
+ else
+ {
+ if (code == GLFW_NOT_INITIALIZED)
+ strcpy(description, "The GLFW library is not initialized");
+ else if (code == GLFW_NO_CURRENT_CONTEXT)
+ strcpy(description, "There is no current context");
+ else if (code == GLFW_INVALID_ENUM)
+ strcpy(description, "Invalid argument for enum parameter");
+ else if (code == GLFW_INVALID_VALUE)
+ strcpy(description, "Invalid value for parameter");
+ else if (code == GLFW_OUT_OF_MEMORY)
+ strcpy(description, "Out of memory");
+ else if (code == GLFW_API_UNAVAILABLE)
+ strcpy(description, "The requested API is unavailable");
+ else if (code == GLFW_VERSION_UNAVAILABLE)
+ strcpy(description, "The requested API version is unavailable");
+ else if (code == GLFW_PLATFORM_ERROR)
+ strcpy(description, "A platform-specific error occurred");
+ else if (code == GLFW_FORMAT_UNAVAILABLE)
+ strcpy(description, "The requested format is unavailable");
+ else if (code == GLFW_NO_WINDOW_CONTEXT)
+ strcpy(description, "The specified window has no context");
+ else
+ strcpy(description, "ERROR: UNKNOWN GLFW ERROR");
+ }
+
+ if (_glfw.initialized)
+ {
+ error = _glfwPlatformGetTls(&_glfw.errorSlot);
+ if (!error)
+ {
+ error = calloc(1, sizeof(_GLFWerror));
+ _glfwPlatformSetTls(&_glfw.errorSlot, error);
+ _glfwPlatformLockMutex(&_glfw.errorLock);
+ error->next = _glfw.errorListHead;
+ _glfw.errorListHead = error;
+ _glfwPlatformUnlockMutex(&_glfw.errorLock);
+ }
+ }
+ else
+ error = &_glfwMainThreadError;
+
+ error->code = code;
+ strcpy(error->description, description);
+
+ if (_glfwErrorCallback)
+ _glfwErrorCallback(code, description);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW public API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI int glfwInit(void)
+{
+ if (_glfw.initialized)
+ return GLFW_TRUE;
+
+ memset(&_glfw, 0, sizeof(_glfw));
+ _glfw.hints.init = _glfwInitHints;
+
+ if (!_glfwPlatformInit())
+ {
+ terminate();
+ return GLFW_FALSE;
+ }
+
+ if (!_glfwPlatformCreateMutex(&_glfw.errorLock) ||
+ !_glfwPlatformCreateTls(&_glfw.errorSlot) ||
+ !_glfwPlatformCreateTls(&_glfw.contextSlot))
+ {
+ terminate();
+ return GLFW_FALSE;
+ }
+
+ _glfwPlatformSetTls(&_glfw.errorSlot, &_glfwMainThreadError);
+
+ _glfwInitGamepadMappings();
+
+ _glfw.initialized = GLFW_TRUE;
+ _glfw.timer.offset = _glfwPlatformGetTimerValue();
+
+ glfwDefaultWindowHints();
+ return GLFW_TRUE;
+}
+
+GLFWAPI void glfwTerminate(void)
+{
+ if (!_glfw.initialized)
+ return;
+
+ terminate();
+}
+
+GLFWAPI void glfwInitHint(int hint, int value)
+{
+ switch (hint)
+ {
+ case GLFW_JOYSTICK_HAT_BUTTONS:
+ _glfwInitHints.hatButtons = value;
+ return;
+ case GLFW_COCOA_CHDIR_RESOURCES:
+ _glfwInitHints.ns.chdir = value;
+ return;
+ case GLFW_COCOA_MENUBAR:
+ _glfwInitHints.ns.menubar = value;
+ return;
+ }
+
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid init hint 0x%08X", hint);
+}
+
+GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev)
+{
+ if (major != NULL)
+ *major = GLFW_VERSION_MAJOR;
+ if (minor != NULL)
+ *minor = GLFW_VERSION_MINOR;
+ if (rev != NULL)
+ *rev = GLFW_VERSION_REVISION;
+}
+
+GLFWAPI const char* glfwGetVersionString(void)
+{
+ return _glfwPlatformGetVersionString();
+}
+
+GLFWAPI int glfwGetError(const char** description)
+{
+ _GLFWerror* error;
+ int code = GLFW_NO_ERROR;
+
+ if (description)
+ *description = NULL;
+
+ if (_glfw.initialized)
+ error = _glfwPlatformGetTls(&_glfw.errorSlot);
+ else
+ error = &_glfwMainThreadError;
+
+ if (error)
+ {
+ code = error->code;
+ error->code = GLFW_NO_ERROR;
+ if (description && code)
+ *description = error->description;
+ }
+
+ return code;
+}
+
+GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
+{
+ _GLFW_SWAP_POINTERS(_glfwErrorCallback, cbfun);
+ return cbfun;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/input.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/input.c
new file mode 100644
index 0000000..9693024
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/input.c
@@ -0,0 +1,1367 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+#include "mappings.h"
+
+#include <assert.h>
+#include <float.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+
+// Internal key state used for sticky keys
+#define _GLFW_STICK 3
+
+// Internal constants for gamepad mapping source types
+#define _GLFW_JOYSTICK_AXIS 1
+#define _GLFW_JOYSTICK_BUTTON 2
+#define _GLFW_JOYSTICK_HATBIT 3
+
+// Finds a mapping based on joystick GUID
+//
+static _GLFWmapping* findMapping(const char* guid)
+{
+ int i;
+
+ for (i = 0; i < _glfw.mappingCount; i++)
+ {
+ if (strcmp(_glfw.mappings[i].guid, guid) == 0)
+ return _glfw.mappings + i;
+ }
+
+ return NULL;
+}
+
+// Checks whether a gamepad mapping element is present in the hardware
+//
+static GLFWbool isValidElementForJoystick(const _GLFWmapelement* e,
+ const _GLFWjoystick* js)
+{
+ if (e->type == _GLFW_JOYSTICK_HATBIT && (e->index >> 4) >= js->hatCount)
+ return GLFW_FALSE;
+ else if (e->type == _GLFW_JOYSTICK_BUTTON && e->index >= js->buttonCount)
+ return GLFW_FALSE;
+ else if (e->type == _GLFW_JOYSTICK_AXIS && e->index >= js->axisCount)
+ return GLFW_FALSE;
+
+ return GLFW_TRUE;
+}
+
+// Finds a mapping based on joystick GUID and verifies element indices
+//
+static _GLFWmapping* findValidMapping(const _GLFWjoystick* js)
+{
+ _GLFWmapping* mapping = findMapping(js->guid);
+ if (mapping)
+ {
+ int i;
+
+ for (i = 0; i <= GLFW_GAMEPAD_BUTTON_LAST; i++)
+ {
+ if (!isValidElementForJoystick(mapping->buttons + i, js))
+ return NULL;
+ }
+
+ for (i = 0; i <= GLFW_GAMEPAD_AXIS_LAST; i++)
+ {
+ if (!isValidElementForJoystick(mapping->axes + i, js))
+ return NULL;
+ }
+ }
+
+ return mapping;
+}
+
+// Parses an SDL_GameControllerDB line and adds it to the mapping list
+//
+static GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)
+{
+ const char* c = string;
+ size_t i, length;
+ struct
+ {
+ const char* name;
+ _GLFWmapelement* element;
+ } fields[] =
+ {
+ { "platform", NULL },
+ { "a", mapping->buttons + GLFW_GAMEPAD_BUTTON_A },
+ { "b", mapping->buttons + GLFW_GAMEPAD_BUTTON_B },
+ { "x", mapping->buttons + GLFW_GAMEPAD_BUTTON_X },
+ { "y", mapping->buttons + GLFW_GAMEPAD_BUTTON_Y },
+ { "back", mapping->buttons + GLFW_GAMEPAD_BUTTON_BACK },
+ { "start", mapping->buttons + GLFW_GAMEPAD_BUTTON_START },
+ { "guide", mapping->buttons + GLFW_GAMEPAD_BUTTON_GUIDE },
+ { "leftshoulder", mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_BUMPER },
+ { "rightshoulder", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER },
+ { "leftstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_THUMB },
+ { "rightstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_THUMB },
+ { "dpup", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_UP },
+ { "dpright", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_RIGHT },
+ { "dpdown", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_DOWN },
+ { "dpleft", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_LEFT },
+ { "lefttrigger", mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_TRIGGER },
+ { "righttrigger", mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER },
+ { "leftx", mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_X },
+ { "lefty", mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_Y },
+ { "rightx", mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_X },
+ { "righty", mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_Y }
+ };
+
+ length = strcspn(c, ",");
+ if (length != 32 || c[length] != ',')
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, NULL);
+ return GLFW_FALSE;
+ }
+
+ memcpy(mapping->guid, c, length);
+ c += length + 1;
+
+ length = strcspn(c, ",");
+ if (length >= sizeof(mapping->name) || c[length] != ',')
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, NULL);
+ return GLFW_FALSE;
+ }
+
+ memcpy(mapping->name, c, length);
+ c += length + 1;
+
+ while (*c)
+ {
+ // TODO: Implement output modifiers
+ if (*c == '+' || *c == '-')
+ return GLFW_FALSE;
+
+ for (i = 0; i < sizeof(fields) / sizeof(fields[0]); i++)
+ {
+ length = strlen(fields[i].name);
+ if (strncmp(c, fields[i].name, length) != 0 || c[length] != ':')
+ continue;
+
+ c += length + 1;
+
+ if (fields[i].element)
+ {
+ _GLFWmapelement* e = fields[i].element;
+ int8_t minimum = -1;
+ int8_t maximum = 1;
+
+ if (*c == '+')
+ {
+ minimum = 0;
+ c += 1;
+ }
+ else if (*c == '-')
+ {
+ maximum = 0;
+ c += 1;
+ }
+
+ if (*c == 'a')
+ e->type = _GLFW_JOYSTICK_AXIS;
+ else if (*c == 'b')
+ e->type = _GLFW_JOYSTICK_BUTTON;
+ else if (*c == 'h')
+ e->type = _GLFW_JOYSTICK_HATBIT;
+ else
+ break;
+
+ if (e->type == _GLFW_JOYSTICK_HATBIT)
+ {
+ const unsigned long hat = strtoul(c + 1, (char**) &c, 10);
+ const unsigned long bit = strtoul(c + 1, (char**) &c, 10);
+ e->index = (uint8_t) ((hat << 4) | bit);
+ }
+ else
+ e->index = (uint8_t) strtoul(c + 1, (char**) &c, 10);
+
+ if (e->type == _GLFW_JOYSTICK_AXIS)
+ {
+ e->axisScale = 2 / (maximum - minimum);
+ e->axisOffset = -(maximum + minimum);
+
+ if (*c == '~')
+ {
+ e->axisScale = -e->axisScale;
+ e->axisOffset = -e->axisOffset;
+ }
+ }
+ }
+ else
+ {
+ length = strlen(_GLFW_PLATFORM_MAPPING_NAME);
+ if (strncmp(c, _GLFW_PLATFORM_MAPPING_NAME, length) != 0)
+ return GLFW_FALSE;
+ }
+
+ break;
+ }
+
+ c += strcspn(c, ",");
+ c += strspn(c, ",");
+ }
+
+ for (i = 0; i < 32; i++)
+ {
+ if (mapping->guid[i] >= 'A' && mapping->guid[i] <= 'F')
+ mapping->guid[i] += 'a' - 'A';
+ }
+
+ _glfwPlatformUpdateGamepadGUID(mapping->guid);
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW event API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Notifies shared code of a physical key event
+//
+void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int mods)
+{
+ if (key >= 0 && key <= GLFW_KEY_LAST)
+ {
+ GLFWbool repeated = GLFW_FALSE;
+
+ if (action == GLFW_RELEASE && window->keys[key] == GLFW_RELEASE)
+ return;
+
+ if (action == GLFW_PRESS && window->keys[key] == GLFW_PRESS)
+ repeated = GLFW_TRUE;
+
+ if (action == GLFW_RELEASE && window->stickyKeys)
+ window->keys[key] = _GLFW_STICK;
+ else
+ window->keys[key] = (char) action;
+
+ if (repeated)
+ action = GLFW_REPEAT;
+ }
+
+ if (!window->lockKeyMods)
+ mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);
+
+ if (window->callbacks.key)
+ window->callbacks.key((GLFWwindow*) window, key, scancode, action, mods);
+}
+
+// Notifies shared code of a Unicode codepoint input event
+// The 'plain' parameter determines whether to emit a regular character event
+//
+void _glfwInputChar(_GLFWwindow* window, unsigned int codepoint, int mods, GLFWbool plain)
+{
+ if (codepoint < 32 || (codepoint > 126 && codepoint < 160))
+ return;
+
+ if (!window->lockKeyMods)
+ mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);
+
+ if (window->callbacks.charmods)
+ window->callbacks.charmods((GLFWwindow*) window, codepoint, mods);
+
+ if (plain)
+ {
+ if (window->callbacks.character)
+ window->callbacks.character((GLFWwindow*) window, codepoint);
+ }
+}
+
+// Notifies shared code of a scroll event
+//
+void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset)
+{
+ if (window->callbacks.scroll)
+ window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset);
+}
+
+// Notifies shared code of a mouse button click event
+//
+void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods)
+{
+ if (button < 0 || button > GLFW_MOUSE_BUTTON_LAST)
+ return;
+
+ if (!window->lockKeyMods)
+ mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);
+
+ if (action == GLFW_RELEASE && window->stickyMouseButtons)
+ window->mouseButtons[button] = _GLFW_STICK;
+ else
+ window->mouseButtons[button] = (char) action;
+
+ if (window->callbacks.mouseButton)
+ window->callbacks.mouseButton((GLFWwindow*) window, button, action, mods);
+}
+
+// Notifies shared code of a cursor motion event
+// The position is specified in content area relative screen coordinates
+//
+void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos)
+{
+ if (window->virtualCursorPosX == xpos && window->virtualCursorPosY == ypos)
+ return;
+
+ window->virtualCursorPosX = xpos;
+ window->virtualCursorPosY = ypos;
+
+ if (window->callbacks.cursorPos)
+ window->callbacks.cursorPos((GLFWwindow*) window, xpos, ypos);
+}
+
+// Notifies shared code of a cursor enter/leave event
+//
+void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered)
+{
+ if (window->callbacks.cursorEnter)
+ window->callbacks.cursorEnter((GLFWwindow*) window, entered);
+}
+
+// Notifies shared code of files or directories dropped on a window
+//
+void _glfwInputDrop(_GLFWwindow* window, int count, const char** paths)
+{
+ if (window->callbacks.drop)
+ window->callbacks.drop((GLFWwindow*) window, count, paths);
+}
+
+// Notifies shared code of a joystick connection or disconnection
+//
+void _glfwInputJoystick(_GLFWjoystick* js, int event)
+{
+ const int jid = (int) (js - _glfw.joysticks);
+
+ if (_glfw.callbacks.joystick)
+ _glfw.callbacks.joystick(jid, event);
+}
+
+// Notifies shared code of the new value of a joystick axis
+//
+void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value)
+{
+ js->axes[axis] = value;
+}
+
+// Notifies shared code of the new value of a joystick button
+//
+void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value)
+{
+ js->buttons[button] = value;
+}
+
+// Notifies shared code of the new value of a joystick hat
+//
+void _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value)
+{
+ const int base = js->buttonCount + hat * 4;
+
+ js->buttons[base + 0] = (value & 0x01) ? GLFW_PRESS : GLFW_RELEASE;
+ js->buttons[base + 1] = (value & 0x02) ? GLFW_PRESS : GLFW_RELEASE;
+ js->buttons[base + 2] = (value & 0x04) ? GLFW_PRESS : GLFW_RELEASE;
+ js->buttons[base + 3] = (value & 0x08) ? GLFW_PRESS : GLFW_RELEASE;
+
+ js->hats[hat] = value;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Adds the built-in set of gamepad mappings
+//
+void _glfwInitGamepadMappings(void)
+{
+ int jid;
+ size_t i;
+ const size_t count = sizeof(_glfwDefaultMappings) / sizeof(char*);
+ _glfw.mappings = calloc(count, sizeof(_GLFWmapping));
+
+ for (i = 0; i < count; i++)
+ {
+ if (parseMapping(&_glfw.mappings[_glfw.mappingCount], _glfwDefaultMappings[i]))
+ _glfw.mappingCount++;
+ }
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ _GLFWjoystick* js = _glfw.joysticks + jid;
+ if (js->present)
+ js->mapping = findValidMapping(js);
+ }
+}
+
+// Returns an available joystick object with arrays and name allocated
+//
+_GLFWjoystick* _glfwAllocJoystick(const char* name,
+ const char* guid,
+ int axisCount,
+ int buttonCount,
+ int hatCount)
+{
+ int jid;
+ _GLFWjoystick* js;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ if (!_glfw.joysticks[jid].present)
+ break;
+ }
+
+ if (jid > GLFW_JOYSTICK_LAST)
+ return NULL;
+
+ js = _glfw.joysticks + jid;
+ js->present = GLFW_TRUE;
+ js->axes = calloc(axisCount, sizeof(float));
+ js->buttons = calloc(buttonCount + (size_t) hatCount * 4, 1);
+ js->hats = calloc(hatCount, 1);
+ js->axisCount = axisCount;
+ js->buttonCount = buttonCount;
+ js->hatCount = hatCount;
+
+ strncpy(js->name, name, sizeof(js->name) - 1);
+ strncpy(js->guid, guid, sizeof(js->guid) - 1);
+ js->mapping = findValidMapping(js);
+
+ return js;
+}
+
+// Frees arrays and name and flags the joystick object as unused
+//
+void _glfwFreeJoystick(_GLFWjoystick* js)
+{
+ free(js->axes);
+ free(js->buttons);
+ free(js->hats);
+ memset(js, 0, sizeof(_GLFWjoystick));
+}
+
+// Center the cursor in the content area of the specified window
+//
+void _glfwCenterCursorInContentArea(_GLFWwindow* window)
+{
+ int width, height;
+
+ _glfwPlatformGetWindowSize(window, &width, &height);
+ _glfwPlatformSetCursorPos(window, width / 2.0, height / 2.0);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW public API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI int glfwGetInputMode(GLFWwindow* handle, int mode)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(0);
+
+ switch (mode)
+ {
+ case GLFW_CURSOR:
+ return window->cursorMode;
+ case GLFW_STICKY_KEYS:
+ return window->stickyKeys;
+ case GLFW_STICKY_MOUSE_BUTTONS:
+ return window->stickyMouseButtons;
+ case GLFW_LOCK_KEY_MODS:
+ return window->lockKeyMods;
+ case GLFW_RAW_MOUSE_MOTION:
+ return window->rawMouseMotion;
+ }
+
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid input mode 0x%08X", mode);
+ return 0;
+}
+
+GLFWAPI void glfwSetInputMode(GLFWwindow* handle, int mode, int value)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (mode == GLFW_CURSOR)
+ {
+ if (value != GLFW_CURSOR_NORMAL &&
+ value != GLFW_CURSOR_HIDDEN &&
+ value != GLFW_CURSOR_DISABLED)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM,
+ "Invalid cursor mode 0x%08X",
+ value);
+ return;
+ }
+
+ if (window->cursorMode == value)
+ return;
+
+ window->cursorMode = value;
+
+ _glfwPlatformGetCursorPos(window,
+ &window->virtualCursorPosX,
+ &window->virtualCursorPosY);
+ _glfwPlatformSetCursorMode(window, value);
+ }
+ else if (mode == GLFW_STICKY_KEYS)
+ {
+ value = value ? GLFW_TRUE : GLFW_FALSE;
+ if (window->stickyKeys == value)
+ return;
+
+ if (!value)
+ {
+ int i;
+
+ // Release all sticky keys
+ for (i = 0; i <= GLFW_KEY_LAST; i++)
+ {
+ if (window->keys[i] == _GLFW_STICK)
+ window->keys[i] = GLFW_RELEASE;
+ }
+ }
+
+ window->stickyKeys = value;
+ }
+ else if (mode == GLFW_STICKY_MOUSE_BUTTONS)
+ {
+ value = value ? GLFW_TRUE : GLFW_FALSE;
+ if (window->stickyMouseButtons == value)
+ return;
+
+ if (!value)
+ {
+ int i;
+
+ // Release all sticky mouse buttons
+ for (i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++)
+ {
+ if (window->mouseButtons[i] == _GLFW_STICK)
+ window->mouseButtons[i] = GLFW_RELEASE;
+ }
+ }
+
+ window->stickyMouseButtons = value;
+ }
+ else if (mode == GLFW_LOCK_KEY_MODS)
+ {
+ window->lockKeyMods = value ? GLFW_TRUE : GLFW_FALSE;
+ }
+ else if (mode == GLFW_RAW_MOUSE_MOTION)
+ {
+ if (!_glfwPlatformRawMouseMotionSupported())
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Raw mouse motion is not supported on this system");
+ return;
+ }
+
+ value = value ? GLFW_TRUE : GLFW_FALSE;
+ if (window->rawMouseMotion == value)
+ return;
+
+ window->rawMouseMotion = value;
+ _glfwPlatformSetRawMouseMotion(window, value);
+ }
+ else
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid input mode 0x%08X", mode);
+}
+
+GLFWAPI int glfwRawMouseMotionSupported(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+ return _glfwPlatformRawMouseMotionSupported();
+}
+
+GLFWAPI const char* glfwGetKeyName(int key, int scancode)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (key != GLFW_KEY_UNKNOWN)
+ {
+ if (key != GLFW_KEY_KP_EQUAL &&
+ (key < GLFW_KEY_KP_0 || key > GLFW_KEY_KP_ADD) &&
+ (key < GLFW_KEY_APOSTROPHE || key > GLFW_KEY_WORLD_2))
+ {
+ return NULL;
+ }
+
+ scancode = _glfwPlatformGetKeyScancode(key);
+ }
+
+ return _glfwPlatformGetScancodeName(scancode);
+}
+
+GLFWAPI int glfwGetKeyScancode(int key)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(-1);
+
+ if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
+ return GLFW_RELEASE;
+ }
+
+ return _glfwPlatformGetKeyScancode(key);
+}
+
+GLFWAPI int glfwGetKey(GLFWwindow* handle, int key)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);
+
+ if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
+ return GLFW_RELEASE;
+ }
+
+ if (window->keys[key] == _GLFW_STICK)
+ {
+ // Sticky mode: release key now
+ window->keys[key] = GLFW_RELEASE;
+ return GLFW_PRESS;
+ }
+
+ return (int) window->keys[key];
+}
+
+GLFWAPI int glfwGetMouseButton(GLFWwindow* handle, int button)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);
+
+ if (button < GLFW_MOUSE_BUTTON_1 || button > GLFW_MOUSE_BUTTON_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid mouse button %i", button);
+ return GLFW_RELEASE;
+ }
+
+ if (window->mouseButtons[button] == _GLFW_STICK)
+ {
+ // Sticky mode: release mouse button now
+ window->mouseButtons[button] = GLFW_RELEASE;
+ return GLFW_PRESS;
+ }
+
+ return (int) window->mouseButtons[button];
+}
+
+GLFWAPI void glfwGetCursorPos(GLFWwindow* handle, double* xpos, double* ypos)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ if (xpos)
+ *xpos = 0;
+ if (ypos)
+ *ypos = 0;
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ if (xpos)
+ *xpos = window->virtualCursorPosX;
+ if (ypos)
+ *ypos = window->virtualCursorPosY;
+ }
+ else
+ _glfwPlatformGetCursorPos(window, xpos, ypos);
+}
+
+GLFWAPI void glfwSetCursorPos(GLFWwindow* handle, double xpos, double ypos)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (xpos != xpos || xpos < -DBL_MAX || xpos > DBL_MAX ||
+ ypos != ypos || ypos < -DBL_MAX || ypos > DBL_MAX)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid cursor position %f %f",
+ xpos, ypos);
+ return;
+ }
+
+ if (!_glfwPlatformWindowFocused(window))
+ return;
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ // Only update the accumulated position if the cursor is disabled
+ window->virtualCursorPosX = xpos;
+ window->virtualCursorPosY = ypos;
+ }
+ else
+ {
+ // Update system cursor position
+ _glfwPlatformSetCursorPos(window, xpos, ypos);
+ }
+}
+
+GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)
+{
+ _GLFWcursor* cursor;
+
+ assert(image != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ cursor = calloc(1, sizeof(_GLFWcursor));
+ cursor->next = _glfw.cursorListHead;
+ _glfw.cursorListHead = cursor;
+
+ if (!_glfwPlatformCreateCursor(cursor, image, xhot, yhot))
+ {
+ glfwDestroyCursor((GLFWcursor*) cursor);
+ return NULL;
+ }
+
+ return (GLFWcursor*) cursor;
+}
+
+GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape)
+{
+ _GLFWcursor* cursor;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (shape != GLFW_ARROW_CURSOR &&
+ shape != GLFW_IBEAM_CURSOR &&
+ shape != GLFW_CROSSHAIR_CURSOR &&
+ shape != GLFW_HAND_CURSOR &&
+ shape != GLFW_HRESIZE_CURSOR &&
+ shape != GLFW_VRESIZE_CURSOR)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid standard cursor 0x%08X", shape);
+ return NULL;
+ }
+
+ cursor = calloc(1, sizeof(_GLFWcursor));
+ cursor->next = _glfw.cursorListHead;
+ _glfw.cursorListHead = cursor;
+
+ if (!_glfwPlatformCreateStandardCursor(cursor, shape))
+ {
+ glfwDestroyCursor((GLFWcursor*) cursor);
+ return NULL;
+ }
+
+ return (GLFWcursor*) cursor;
+}
+
+GLFWAPI void glfwDestroyCursor(GLFWcursor* handle)
+{
+ _GLFWcursor* cursor = (_GLFWcursor*) handle;
+
+ _GLFW_REQUIRE_INIT();
+
+ if (cursor == NULL)
+ return;
+
+ // Make sure the cursor is not being used by any window
+ {
+ _GLFWwindow* window;
+
+ for (window = _glfw.windowListHead; window; window = window->next)
+ {
+ if (window->cursor == cursor)
+ glfwSetCursor((GLFWwindow*) window, NULL);
+ }
+ }
+
+ _glfwPlatformDestroyCursor(cursor);
+
+ // Unlink cursor from global linked list
+ {
+ _GLFWcursor** prev = &_glfw.cursorListHead;
+
+ while (*prev != cursor)
+ prev = &((*prev)->next);
+
+ *prev = cursor->next;
+ }
+
+ free(cursor);
+}
+
+GLFWAPI void glfwSetCursor(GLFWwindow* windowHandle, GLFWcursor* cursorHandle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) windowHandle;
+ _GLFWcursor* cursor = (_GLFWcursor*) cursorHandle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ window->cursor = cursor;
+
+ _glfwPlatformSetCursor(window, cursor);
+}
+
+GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* handle, GLFWkeyfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.key, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* handle, GLFWcharfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.character, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* handle, GLFWcharmodsfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.charmods, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* handle,
+ GLFWmousebuttonfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.mouseButton, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* handle,
+ GLFWcursorposfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.cursorPos, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* handle,
+ GLFWcursorenterfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.cursorEnter, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* handle,
+ GLFWscrollfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.scroll, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* handle, GLFWdropfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.drop, cbfun);
+ return cbfun;
+}
+
+GLFWAPI int glfwJoystickPresent(int jid)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return GLFW_FALSE;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return GLFW_FALSE;
+
+ return _glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE);
+}
+
+GLFWAPI const float* glfwGetJoystickAxes(int jid, int* count)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+ assert(count != NULL);
+
+ *count = 0;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return NULL;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_AXES))
+ return NULL;
+
+ *count = js->axisCount;
+ return js->axes;
+}
+
+GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+ assert(count != NULL);
+
+ *count = 0;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return NULL;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_BUTTONS))
+ return NULL;
+
+ if (_glfw.hints.init.hatButtons)
+ *count = js->buttonCount + js->hatCount * 4;
+ else
+ *count = js->buttonCount;
+
+ return js->buttons;
+}
+
+GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+ assert(count != NULL);
+
+ *count = 0;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return NULL;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_BUTTONS))
+ return NULL;
+
+ *count = js->hatCount;
+ return js->hats;
+}
+
+GLFWAPI const char* glfwGetJoystickName(int jid)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return NULL;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))
+ return NULL;
+
+ return js->name;
+}
+
+GLFWAPI const char* glfwGetJoystickGUID(int jid)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return NULL;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))
+ return NULL;
+
+ return js->guid;
+}
+
+GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT();
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return;
+
+ js->userPointer = pointer;
+}
+
+GLFWAPI void* glfwGetJoystickUserPointer(int jid)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ return js->userPointer;
+}
+
+GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(_glfw.callbacks.joystick, cbfun);
+ return cbfun;
+}
+
+GLFWAPI int glfwUpdateGamepadMappings(const char* string)
+{
+ int jid;
+ const char* c = string;
+
+ assert(string != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ while (*c)
+ {
+ if ((*c >= '0' && *c <= '9') ||
+ (*c >= 'a' && *c <= 'f') ||
+ (*c >= 'A' && *c <= 'F'))
+ {
+ char line[1024];
+
+ const size_t length = strcspn(c, "\r\n");
+ if (length < sizeof(line))
+ {
+ _GLFWmapping mapping = {{0}};
+
+ memcpy(line, c, length);
+ line[length] = '\0';
+
+ if (parseMapping(&mapping, line))
+ {
+ _GLFWmapping* previous = findMapping(mapping.guid);
+ if (previous)
+ *previous = mapping;
+ else
+ {
+ _glfw.mappingCount++;
+ _glfw.mappings =
+ realloc(_glfw.mappings,
+ sizeof(_GLFWmapping) * _glfw.mappingCount);
+ _glfw.mappings[_glfw.mappingCount - 1] = mapping;
+ }
+ }
+ }
+
+ c += length;
+ }
+ else
+ {
+ c += strcspn(c, "\r\n");
+ c += strspn(c, "\r\n");
+ }
+ }
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ _GLFWjoystick* js = _glfw.joysticks + jid;
+ if (js->present)
+ js->mapping = findValidMapping(js);
+ }
+
+ return GLFW_TRUE;
+}
+
+GLFWAPI int glfwJoystickIsGamepad(int jid)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return GLFW_FALSE;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return GLFW_FALSE;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))
+ return GLFW_FALSE;
+
+ return js->mapping != NULL;
+}
+
+GLFWAPI const char* glfwGetGamepadName(int jid)
+{
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return NULL;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return NULL;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))
+ return NULL;
+
+ if (!js->mapping)
+ return NULL;
+
+ return js->mapping->name;
+}
+
+GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state)
+{
+ int i;
+ _GLFWjoystick* js;
+
+ assert(jid >= GLFW_JOYSTICK_1);
+ assert(jid <= GLFW_JOYSTICK_LAST);
+ assert(state != NULL);
+
+ memset(state, 0, sizeof(GLFWgamepadstate));
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
+ {
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
+ return GLFW_FALSE;
+ }
+
+ js = _glfw.joysticks + jid;
+ if (!js->present)
+ return GLFW_FALSE;
+
+ if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_ALL))
+ return GLFW_FALSE;
+
+ if (!js->mapping)
+ return GLFW_FALSE;
+
+ for (i = 0; i <= GLFW_GAMEPAD_BUTTON_LAST; i++)
+ {
+ const _GLFWmapelement* e = js->mapping->buttons + i;
+ if (e->type == _GLFW_JOYSTICK_AXIS)
+ {
+ const float value = js->axes[e->index] * e->axisScale + e->axisOffset;
+ // HACK: This should be baked into the value transform
+ // TODO: Bake into transform when implementing output modifiers
+ if (e->axisOffset < 0 || (e->axisOffset == 0 && e->axisScale > 0))
+ {
+ if (value >= 0.f)
+ state->buttons[i] = GLFW_PRESS;
+ }
+ else
+ {
+ if (value <= 0.f)
+ state->buttons[i] = GLFW_PRESS;
+ }
+ }
+ else if (e->type == _GLFW_JOYSTICK_HATBIT)
+ {
+ const unsigned int hat = e->index >> 4;
+ const unsigned int bit = e->index & 0xf;
+ if (js->hats[hat] & bit)
+ state->buttons[i] = GLFW_PRESS;
+ }
+ else if (e->type == _GLFW_JOYSTICK_BUTTON)
+ state->buttons[i] = js->buttons[e->index];
+ }
+
+ for (i = 0; i <= GLFW_GAMEPAD_AXIS_LAST; i++)
+ {
+ const _GLFWmapelement* e = js->mapping->axes + i;
+ if (e->type == _GLFW_JOYSTICK_AXIS)
+ {
+ const float value = js->axes[e->index] * e->axisScale + e->axisOffset;
+ state->axes[i] = _glfw_fminf(_glfw_fmaxf(value, -1.f), 1.f);
+ }
+ else if (e->type == _GLFW_JOYSTICK_HATBIT)
+ {
+ const unsigned int hat = e->index >> 4;
+ const unsigned int bit = e->index & 0xf;
+ if (js->hats[hat] & bit)
+ state->axes[i] = 1.f;
+ else
+ state->axes[i] = -1.f;
+ }
+ else if (e->type == _GLFW_JOYSTICK_BUTTON)
+ state->axes[i] = js->buttons[e->index] * 2.f - 1.f;
+ }
+
+ return GLFW_TRUE;
+}
+
+GLFWAPI void glfwSetClipboardString(GLFWwindow* handle, const char* string)
+{
+ assert(string != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformSetClipboardString(string);
+}
+
+GLFWAPI const char* glfwGetClipboardString(GLFWwindow* handle)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return _glfwPlatformGetClipboardString();
+}
+
+GLFWAPI double glfwGetTime(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(0.0);
+ return (double) (_glfwPlatformGetTimerValue() - _glfw.timer.offset) /
+ _glfwPlatformGetTimerFrequency();
+}
+
+GLFWAPI void glfwSetTime(double time)
+{
+ _GLFW_REQUIRE_INIT();
+
+ if (time != time || time < 0.0 || time > 18446744073.0)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid time %f", time);
+ return;
+ }
+
+ _glfw.timer.offset = _glfwPlatformGetTimerValue() -
+ (uint64_t) (time * _glfwPlatformGetTimerFrequency());
+}
+
+GLFWAPI uint64_t glfwGetTimerValue(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(0);
+ return _glfwPlatformGetTimerValue();
+}
+
+GLFWAPI uint64_t glfwGetTimerFrequency(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(0);
+ return _glfwPlatformGetTimerFrequency();
+}
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/internal.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/internal.h
new file mode 100644
index 0000000..ad619b4
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/internal.h
@@ -0,0 +1,780 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#pragma once
+
+#if defined(_GLFW_USE_CONFIG_H)
+ #include "glfw_config.h"
+#endif
+
+#if defined(GLFW_INCLUDE_GLCOREARB) || \
+ defined(GLFW_INCLUDE_ES1) || \
+ defined(GLFW_INCLUDE_ES2) || \
+ defined(GLFW_INCLUDE_ES3) || \
+ defined(GLFW_INCLUDE_ES31) || \
+ defined(GLFW_INCLUDE_ES32) || \
+ defined(GLFW_INCLUDE_NONE) || \
+ defined(GLFW_INCLUDE_GLEXT) || \
+ defined(GLFW_INCLUDE_GLU) || \
+ defined(GLFW_INCLUDE_VULKAN) || \
+ defined(GLFW_DLL)
+ #error "You must not define any header option macros when compiling GLFW"
+#endif
+
+#define GLFW_INCLUDE_NONE
+#include "../include/GLFW/glfw3.h"
+
+#define _GLFW_INSERT_FIRST 0
+#define _GLFW_INSERT_LAST 1
+
+#define _GLFW_POLL_PRESENCE 0
+#define _GLFW_POLL_AXES 1
+#define _GLFW_POLL_BUTTONS 2
+#define _GLFW_POLL_ALL (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS)
+
+#define _GLFW_MESSAGE_SIZE 1024
+
+typedef int GLFWbool;
+
+typedef struct _GLFWerror _GLFWerror;
+typedef struct _GLFWinitconfig _GLFWinitconfig;
+typedef struct _GLFWwndconfig _GLFWwndconfig;
+typedef struct _GLFWctxconfig _GLFWctxconfig;
+typedef struct _GLFWfbconfig _GLFWfbconfig;
+typedef struct _GLFWcontext _GLFWcontext;
+typedef struct _GLFWwindow _GLFWwindow;
+typedef struct _GLFWlibrary _GLFWlibrary;
+typedef struct _GLFWmonitor _GLFWmonitor;
+typedef struct _GLFWcursor _GLFWcursor;
+typedef struct _GLFWmapelement _GLFWmapelement;
+typedef struct _GLFWmapping _GLFWmapping;
+typedef struct _GLFWjoystick _GLFWjoystick;
+typedef struct _GLFWtls _GLFWtls;
+typedef struct _GLFWmutex _GLFWmutex;
+
+typedef void (* _GLFWmakecontextcurrentfun)(_GLFWwindow*);
+typedef void (* _GLFWswapbuffersfun)(_GLFWwindow*);
+typedef void (* _GLFWswapintervalfun)(int);
+typedef int (* _GLFWextensionsupportedfun)(const char*);
+typedef GLFWglproc (* _GLFWgetprocaddressfun)(const char*);
+typedef void (* _GLFWdestroycontextfun)(_GLFWwindow*);
+
+#define GL_VERSION 0x1f02
+#define GL_NONE 0
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_EXTENSIONS 0x1f03
+#define GL_NUM_EXTENSIONS 0x821d
+#define GL_CONTEXT_FLAGS 0x821e
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
+#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82fb
+#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc
+#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
+
+typedef int GLint;
+typedef unsigned int GLuint;
+typedef unsigned int GLenum;
+typedef unsigned int GLbitfield;
+typedef unsigned char GLubyte;
+
+typedef void (APIENTRY * PFNGLCLEARPROC)(GLbitfield);
+typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGPROC)(GLenum);
+typedef void (APIENTRY * PFNGLGETINTEGERVPROC)(GLenum,GLint*);
+typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGIPROC)(GLenum,GLuint);
+
+#define VK_NULL_HANDLE 0
+
+typedef void* VkInstance;
+typedef void* VkPhysicalDevice;
+typedef uint64_t VkSurfaceKHR;
+typedef uint32_t VkFlags;
+typedef uint32_t VkBool32;
+
+typedef enum VkStructureType
+{
+ VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
+ VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
+ VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
+ VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
+ VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
+ VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000,
+ VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkStructureType;
+
+typedef enum VkResult
+{
+ VK_SUCCESS = 0,
+ VK_NOT_READY = 1,
+ VK_TIMEOUT = 2,
+ VK_EVENT_SET = 3,
+ VK_EVENT_RESET = 4,
+ VK_INCOMPLETE = 5,
+ VK_ERROR_OUT_OF_HOST_MEMORY = -1,
+ VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
+ VK_ERROR_INITIALIZATION_FAILED = -3,
+ VK_ERROR_DEVICE_LOST = -4,
+ VK_ERROR_MEMORY_MAP_FAILED = -5,
+ VK_ERROR_LAYER_NOT_PRESENT = -6,
+ VK_ERROR_EXTENSION_NOT_PRESENT = -7,
+ VK_ERROR_FEATURE_NOT_PRESENT = -8,
+ VK_ERROR_INCOMPATIBLE_DRIVER = -9,
+ VK_ERROR_TOO_MANY_OBJECTS = -10,
+ VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
+ VK_ERROR_SURFACE_LOST_KHR = -1000000000,
+ VK_SUBOPTIMAL_KHR = 1000001003,
+ VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
+ VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
+ VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
+ VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
+ VK_RESULT_MAX_ENUM = 0x7FFFFFFF
+} VkResult;
+
+typedef struct VkAllocationCallbacks VkAllocationCallbacks;
+
+typedef struct VkExtensionProperties
+{
+ char extensionName[256];
+ uint32_t specVersion;
+} VkExtensionProperties;
+
+typedef void (APIENTRY * PFN_vkVoidFunction)(void);
+
+#if defined(_GLFW_VULKAN_STATIC)
+ PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance,const char*);
+ VkResult vkEnumerateInstanceExtensionProperties(const char*,uint32_t*,VkExtensionProperties*);
+#else
+ typedef PFN_vkVoidFunction (APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance,const char*);
+ typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char*,uint32_t*,VkExtensionProperties*);
+ #define vkEnumerateInstanceExtensionProperties _glfw.vk.EnumerateInstanceExtensionProperties
+ #define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr
+#endif
+
+#if defined(_GLFW_COCOA)
+ #include "cocoa_platform.h"
+#elif defined(_GLFW_WIN32)
+ #include "win32_platform.h"
+#elif defined(_GLFW_X11)
+ #include "x11_platform.h"
+#elif defined(_GLFW_WAYLAND)
+ #include "wl_platform.h"
+#elif defined(_GLFW_OSMESA)
+ #include "null_platform.h"
+#else
+ #error "No supported window creation API selected"
+#endif
+
+// Constructs a version number string from the public header macros
+#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r
+#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)
+#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \
+ GLFW_VERSION_MINOR, \
+ GLFW_VERSION_REVISION)
+
+// Checks for whether the library has been initialized
+#define _GLFW_REQUIRE_INIT() \
+ if (!_glfw.initialized) \
+ { \
+ _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
+ return; \
+ }
+#define _GLFW_REQUIRE_INIT_OR_RETURN(x) \
+ if (!_glfw.initialized) \
+ { \
+ _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
+ return x; \
+ }
+
+// Swaps the provided pointers
+#define _GLFW_SWAP_POINTERS(x, y) \
+ { \
+ void* t; \
+ t = x; \
+ x = y; \
+ y = t; \
+ }
+
+// Per-thread error structure
+//
+struct _GLFWerror
+{
+ _GLFWerror* next;
+ int code;
+ char description[_GLFW_MESSAGE_SIZE];
+};
+
+// Initialization configuration
+//
+// Parameters relating to the initialization of the library
+//
+struct _GLFWinitconfig
+{
+ GLFWbool hatButtons;
+ struct {
+ GLFWbool menubar;
+ GLFWbool chdir;
+ } ns;
+};
+
+// Window configuration
+//
+// Parameters relating to the creation of the window but not directly related
+// to the framebuffer. This is used to pass window creation parameters from
+// shared code to the platform API.
+//
+struct _GLFWwndconfig
+{
+ int width;
+ int height;
+ const char* title;
+ GLFWbool resizable;
+ GLFWbool visible;
+ GLFWbool decorated;
+ GLFWbool focused;
+ GLFWbool autoIconify;
+ GLFWbool floating;
+ GLFWbool maximized;
+ GLFWbool centerCursor;
+ GLFWbool focusOnShow;
+ GLFWbool scaleToMonitor;
+ struct {
+ GLFWbool retina;
+ char frameName[256];
+ } ns;
+ struct {
+ char className[256];
+ char instanceName[256];
+ } x11;
+};
+
+// Context configuration
+//
+// Parameters relating to the creation of the context but not directly related
+// to the framebuffer. This is used to pass context creation parameters from
+// shared code to the platform API.
+//
+struct _GLFWctxconfig
+{
+ int client;
+ int source;
+ int major;
+ int minor;
+ GLFWbool forward;
+ GLFWbool debug;
+ GLFWbool noerror;
+ int profile;
+ int robustness;
+ int release;
+ _GLFWwindow* share;
+ struct {
+ GLFWbool offline;
+ } nsgl;
+};
+
+// Framebuffer configuration
+//
+// This describes buffers and their sizes. It also contains
+// a platform-specific ID used to map back to the backend API object.
+//
+// It is used to pass framebuffer parameters from shared code to the platform
+// API and also to enumerate and select available framebuffer configs.
+//
+struct _GLFWfbconfig
+{
+ int redBits;
+ int greenBits;
+ int blueBits;
+ int alphaBits;
+ int depthBits;
+ int stencilBits;
+ int accumRedBits;
+ int accumGreenBits;
+ int accumBlueBits;
+ int accumAlphaBits;
+ int auxBuffers;
+ GLFWbool stereo;
+ int samples;
+ GLFWbool sRGB;
+ GLFWbool doublebuffer;
+ GLFWbool transparent;
+ uintptr_t handle;
+};
+
+// Context structure
+//
+struct _GLFWcontext
+{
+ int client;
+ int source;
+ int major, minor, revision;
+ GLFWbool forward, debug, noerror;
+ int profile;
+ int robustness;
+ int release;
+
+ PFNGLGETSTRINGIPROC GetStringi;
+ PFNGLGETINTEGERVPROC GetIntegerv;
+ PFNGLGETSTRINGPROC GetString;
+
+ _GLFWmakecontextcurrentfun makeCurrent;
+ _GLFWswapbuffersfun swapBuffers;
+ _GLFWswapintervalfun swapInterval;
+ _GLFWextensionsupportedfun extensionSupported;
+ _GLFWgetprocaddressfun getProcAddress;
+ _GLFWdestroycontextfun destroy;
+
+ // This is defined in the context API's context.h
+ _GLFW_PLATFORM_CONTEXT_STATE;
+ // This is defined in egl_context.h
+ _GLFW_EGL_CONTEXT_STATE;
+ // This is defined in osmesa_context.h
+ _GLFW_OSMESA_CONTEXT_STATE;
+};
+
+// Window and context structure
+//
+struct _GLFWwindow
+{
+ struct _GLFWwindow* next;
+
+ // Window settings and state
+ GLFWbool resizable;
+ GLFWbool decorated;
+ GLFWbool autoIconify;
+ GLFWbool floating;
+ GLFWbool focusOnShow;
+ GLFWbool shouldClose;
+ void* userPointer;
+ GLFWbool doublebuffer;
+ GLFWvidmode videoMode;
+ _GLFWmonitor* monitor;
+ _GLFWcursor* cursor;
+
+ int minwidth, minheight;
+ int maxwidth, maxheight;
+ int numer, denom;
+
+ GLFWbool stickyKeys;
+ GLFWbool stickyMouseButtons;
+ GLFWbool lockKeyMods;
+ int cursorMode;
+ char mouseButtons[GLFW_MOUSE_BUTTON_LAST + 1];
+ char keys[GLFW_KEY_LAST + 1];
+ // Virtual cursor position when cursor is disabled
+ double virtualCursorPosX, virtualCursorPosY;
+ GLFWbool rawMouseMotion;
+
+ _GLFWcontext context;
+
+ struct {
+ GLFWwindowposfun pos;
+ GLFWwindowsizefun size;
+ GLFWwindowclosefun close;
+ GLFWwindowrefreshfun refresh;
+ GLFWwindowfocusfun focus;
+ GLFWwindowiconifyfun iconify;
+ GLFWwindowmaximizefun maximize;
+ GLFWframebuffersizefun fbsize;
+ GLFWwindowcontentscalefun scale;
+ GLFWmousebuttonfun mouseButton;
+ GLFWcursorposfun cursorPos;
+ GLFWcursorenterfun cursorEnter;
+ GLFWscrollfun scroll;
+ GLFWkeyfun key;
+ GLFWcharfun character;
+ GLFWcharmodsfun charmods;
+ GLFWdropfun drop;
+ } callbacks;
+
+ // This is defined in the window API's platform.h
+ _GLFW_PLATFORM_WINDOW_STATE;
+};
+
+// Monitor structure
+//
+struct _GLFWmonitor
+{
+ char name[128];
+ void* userPointer;
+
+ // Physical dimensions in millimeters.
+ int widthMM, heightMM;
+
+ // The window whose video mode is current on this monitor
+ _GLFWwindow* window;
+
+ GLFWvidmode* modes;
+ int modeCount;
+ GLFWvidmode currentMode;
+
+ GLFWgammaramp originalRamp;
+ GLFWgammaramp currentRamp;
+
+ // This is defined in the window API's platform.h
+ _GLFW_PLATFORM_MONITOR_STATE;
+};
+
+// Cursor structure
+//
+struct _GLFWcursor
+{
+ _GLFWcursor* next;
+
+ // This is defined in the window API's platform.h
+ _GLFW_PLATFORM_CURSOR_STATE;
+};
+
+// Gamepad mapping element structure
+//
+struct _GLFWmapelement
+{
+ uint8_t type;
+ uint8_t index;
+ int8_t axisScale;
+ int8_t axisOffset;
+};
+
+// Gamepad mapping structure
+//
+struct _GLFWmapping
+{
+ char name[128];
+ char guid[33];
+ _GLFWmapelement buttons[15];
+ _GLFWmapelement axes[6];
+};
+
+// Joystick structure
+//
+struct _GLFWjoystick
+{
+ GLFWbool present;
+ float* axes;
+ int axisCount;
+ unsigned char* buttons;
+ int buttonCount;
+ unsigned char* hats;
+ int hatCount;
+ char name[128];
+ void* userPointer;
+ char guid[33];
+ _GLFWmapping* mapping;
+
+ // This is defined in the joystick API's joystick.h
+ _GLFW_PLATFORM_JOYSTICK_STATE;
+};
+
+// Thread local storage structure
+//
+struct _GLFWtls
+{
+ // This is defined in the platform's thread.h
+ _GLFW_PLATFORM_TLS_STATE;
+};
+
+// Mutex structure
+//
+struct _GLFWmutex
+{
+ // This is defined in the platform's thread.h
+ _GLFW_PLATFORM_MUTEX_STATE;
+};
+
+// Library global data
+//
+struct _GLFWlibrary
+{
+ GLFWbool initialized;
+
+ struct {
+ _GLFWinitconfig init;
+ _GLFWfbconfig framebuffer;
+ _GLFWwndconfig window;
+ _GLFWctxconfig context;
+ int refreshRate;
+ } hints;
+
+ _GLFWerror* errorListHead;
+ _GLFWcursor* cursorListHead;
+ _GLFWwindow* windowListHead;
+
+ _GLFWmonitor** monitors;
+ int monitorCount;
+
+ _GLFWjoystick joysticks[GLFW_JOYSTICK_LAST + 1];
+ _GLFWmapping* mappings;
+ int mappingCount;
+
+ _GLFWtls errorSlot;
+ _GLFWtls contextSlot;
+ _GLFWmutex errorLock;
+
+ struct {
+ uint64_t offset;
+ // This is defined in the platform's time.h
+ _GLFW_PLATFORM_LIBRARY_TIMER_STATE;
+ } timer;
+
+ struct {
+ GLFWbool available;
+ void* handle;
+ char* extensions[2];
+#if !defined(_GLFW_VULKAN_STATIC)
+ PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties;
+ PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
+#endif
+ GLFWbool KHR_surface;
+#if defined(_GLFW_WIN32)
+ GLFWbool KHR_win32_surface;
+#elif defined(_GLFW_COCOA)
+ GLFWbool MVK_macos_surface;
+ GLFWbool EXT_metal_surface;
+#elif defined(_GLFW_X11)
+ GLFWbool KHR_xlib_surface;
+ GLFWbool KHR_xcb_surface;
+#elif defined(_GLFW_WAYLAND)
+ GLFWbool KHR_wayland_surface;
+#endif
+ } vk;
+
+ struct {
+ GLFWmonitorfun monitor;
+ GLFWjoystickfun joystick;
+ } callbacks;
+
+ // This is defined in the window API's platform.h
+ _GLFW_PLATFORM_LIBRARY_WINDOW_STATE;
+ // This is defined in the context API's context.h
+ _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE;
+ // This is defined in the platform's joystick.h
+ _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE;
+ // This is defined in egl_context.h
+ _GLFW_EGL_LIBRARY_CONTEXT_STATE;
+ // This is defined in osmesa_context.h
+ _GLFW_OSMESA_LIBRARY_CONTEXT_STATE;
+};
+
+// Global state shared between compilation units of GLFW
+//
+extern _GLFWlibrary _glfw;
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformInit(void);
+void _glfwPlatformTerminate(void);
+const char* _glfwPlatformGetVersionString(void);
+
+void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos);
+void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos);
+void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode);
+void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled);
+GLFWbool _glfwPlatformRawMouseMotionSupported(void);
+int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
+ const GLFWimage* image, int xhot, int yhot);
+int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape);
+void _glfwPlatformDestroyCursor(_GLFWcursor* cursor);
+void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor);
+
+const char* _glfwPlatformGetScancodeName(int scancode);
+int _glfwPlatformGetKeyScancode(int key);
+
+void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor);
+void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos);
+void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
+ float* xscale, float* yscale);
+void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height);
+GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count);
+void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode);
+GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
+void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
+
+void _glfwPlatformSetClipboardString(const char* string);
+const char* _glfwPlatformGetClipboardString(void);
+
+int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode);
+void _glfwPlatformUpdateGamepadGUID(char* guid);
+
+uint64_t _glfwPlatformGetTimerValue(void);
+uint64_t _glfwPlatformGetTimerFrequency(void);
+
+int _glfwPlatformCreateWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig);
+void _glfwPlatformDestroyWindow(_GLFWwindow* window);
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title);
+void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
+ int count, const GLFWimage* images);
+void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos);
+void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos);
+void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height);
+void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height);
+void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight);
+void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom);
+void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height);
+void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
+ int* left, int* top,
+ int* right, int* bottom);
+void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
+ float* xscale, float* yscale);
+void _glfwPlatformIconifyWindow(_GLFWwindow* window);
+void _glfwPlatformRestoreWindow(_GLFWwindow* window);
+void _glfwPlatformMaximizeWindow(_GLFWwindow* window);
+void _glfwPlatformShowWindow(_GLFWwindow* window);
+void _glfwPlatformHideWindow(_GLFWwindow* window);
+void _glfwPlatformRequestWindowAttention(_GLFWwindow* window);
+void _glfwPlatformFocusWindow(_GLFWwindow* window);
+void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor,
+ int xpos, int ypos, int width, int height,
+ int refreshRate);
+int _glfwPlatformWindowFocused(_GLFWwindow* window);
+int _glfwPlatformWindowIconified(_GLFWwindow* window);
+int _glfwPlatformWindowVisible(_GLFWwindow* window);
+int _glfwPlatformWindowMaximized(_GLFWwindow* window);
+int _glfwPlatformWindowHovered(_GLFWwindow* window);
+int _glfwPlatformFramebufferTransparent(_GLFWwindow* window);
+float _glfwPlatformGetWindowOpacity(_GLFWwindow* window);
+void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled);
+void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled);
+void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled);
+void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity);
+
+void _glfwPlatformPollEvents(void);
+void _glfwPlatformWaitEvents(void);
+void _glfwPlatformWaitEventsTimeout(double timeout);
+void _glfwPlatformPostEmptyEvent(void);
+
+void _glfwPlatformGetRequiredInstanceExtensions(char** extensions);
+int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily);
+VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
+ _GLFWwindow* window,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface);
+
+GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls);
+void _glfwPlatformDestroyTls(_GLFWtls* tls);
+void* _glfwPlatformGetTls(_GLFWtls* tls);
+void _glfwPlatformSetTls(_GLFWtls* tls, void* value);
+
+GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex);
+void _glfwPlatformDestroyMutex(_GLFWmutex* mutex);
+void _glfwPlatformLockMutex(_GLFWmutex* mutex);
+void _glfwPlatformUnlockMutex(_GLFWmutex* mutex);
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW event API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused);
+void _glfwInputWindowPos(_GLFWwindow* window, int xpos, int ypos);
+void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
+void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height);
+void _glfwInputWindowContentScale(_GLFWwindow* window,
+ float xscale, float yscale);
+void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified);
+void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized);
+void _glfwInputWindowDamage(_GLFWwindow* window);
+void _glfwInputWindowCloseRequest(_GLFWwindow* window);
+void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor);
+
+void _glfwInputKey(_GLFWwindow* window,
+ int key, int scancode, int action, int mods);
+void _glfwInputChar(_GLFWwindow* window,
+ unsigned int codepoint, int mods, GLFWbool plain);
+void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset);
+void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods);
+void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos);
+void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered);
+void _glfwInputDrop(_GLFWwindow* window, int count, const char** names);
+void _glfwInputJoystick(_GLFWjoystick* js, int event);
+void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value);
+void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value);
+void _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value);
+
+void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement);
+void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window);
+
+#if defined(__GNUC__)
+void _glfwInputError(int code, const char* format, ...)
+ __attribute__((format(printf, 2, 3)));
+#else
+void _glfwInputError(int code, const char* format, ...);
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions);
+const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
+ const _GLFWfbconfig* alternatives,
+ unsigned int count);
+GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig);
+GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig);
+
+const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,
+ const GLFWvidmode* desired);
+int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second);
+_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM);
+void _glfwFreeMonitor(_GLFWmonitor* monitor);
+void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size);
+void _glfwFreeGammaArrays(GLFWgammaramp* ramp);
+void _glfwSplitBPP(int bpp, int* red, int* green, int* blue);
+
+void _glfwInitGamepadMappings(void);
+_GLFWjoystick* _glfwAllocJoystick(const char* name,
+ const char* guid,
+ int axisCount,
+ int buttonCount,
+ int hatCount);
+void _glfwFreeJoystick(_GLFWjoystick* js);
+void _glfwCenterCursorInContentArea(_GLFWwindow* window);
+
+GLFWbool _glfwInitVulkan(int mode);
+void _glfwTerminateVulkan(void);
+const char* _glfwGetVulkanResultString(VkResult result);
+
+char* _glfw_strdup(const char* source);
+float _glfw_fminf(float a, float b);
+float _glfw_fmaxf(float a, float b);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.c
new file mode 100644
index 0000000..5a3b806
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.c
@@ -0,0 +1,433 @@
+//========================================================================
+// GLFW 3.3 Linux - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/inotify.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <dirent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef SYN_DROPPED // < v2.6.39 kernel headers
+// Workaround for CentOS-6, which is supported till 2020-11-30, but still on v2.6.32
+#define SYN_DROPPED 3
+#endif
+
+// Apply an EV_KEY event to the specified joystick
+//
+static void handleKeyEvent(_GLFWjoystick* js, int code, int value)
+{
+ _glfwInputJoystickButton(js,
+ js->linjs.keyMap[code - BTN_MISC],
+ value ? GLFW_PRESS : GLFW_RELEASE);
+}
+
+// Apply an EV_ABS event to the specified joystick
+//
+static void handleAbsEvent(_GLFWjoystick* js, int code, int value)
+{
+ const int index = js->linjs.absMap[code];
+
+ if (code >= ABS_HAT0X && code <= ABS_HAT3Y)
+ {
+ static const char stateMap[3][3] =
+ {
+ { GLFW_HAT_CENTERED, GLFW_HAT_UP, GLFW_HAT_DOWN },
+ { GLFW_HAT_LEFT, GLFW_HAT_LEFT_UP, GLFW_HAT_LEFT_DOWN },
+ { GLFW_HAT_RIGHT, GLFW_HAT_RIGHT_UP, GLFW_HAT_RIGHT_DOWN },
+ };
+
+ const int hat = (code - ABS_HAT0X) / 2;
+ const int axis = (code - ABS_HAT0X) % 2;
+ int* state = js->linjs.hats[hat];
+
+ // NOTE: Looking at several input drivers, it seems all hat events use
+ // -1 for left / up, 0 for centered and 1 for right / down
+ if (value == 0)
+ state[axis] = 0;
+ else if (value < 0)
+ state[axis] = 1;
+ else if (value > 0)
+ state[axis] = 2;
+
+ _glfwInputJoystickHat(js, index, stateMap[state[0]][state[1]]);
+ }
+ else
+ {
+ const struct input_absinfo* info = &js->linjs.absInfo[code];
+ float normalized = value;
+
+ const int range = info->maximum - info->minimum;
+ if (range)
+ {
+ // Normalize to 0.0 -> 1.0
+ normalized = (normalized - info->minimum) / range;
+ // Normalize to -1.0 -> 1.0
+ normalized = normalized * 2.0f - 1.0f;
+ }
+
+ _glfwInputJoystickAxis(js, index, normalized);
+ }
+}
+
+// Poll state of absolute axes
+//
+static void pollAbsState(_GLFWjoystick* js)
+{
+ for (int code = 0; code < ABS_CNT; code++)
+ {
+ if (js->linjs.absMap[code] < 0)
+ continue;
+
+ struct input_absinfo* info = &js->linjs.absInfo[code];
+
+ if (ioctl(js->linjs.fd, EVIOCGABS(code), info) < 0)
+ continue;
+
+ handleAbsEvent(js, code, info->value);
+ }
+}
+
+#define isBitSet(bit, arr) (arr[(bit) / 8] & (1 << ((bit) % 8)))
+
+// Attempt to open the specified joystick device
+//
+static GLFWbool openJoystickDevice(const char* path)
+{
+ for (int jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ if (!_glfw.joysticks[jid].present)
+ continue;
+ if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)
+ return GLFW_FALSE;
+ }
+
+ _GLFWjoystickLinux linjs = {0};
+ linjs.fd = open(path, O_RDONLY | O_NONBLOCK);
+ if (linjs.fd == -1)
+ return GLFW_FALSE;
+
+ char evBits[(EV_CNT + 7) / 8] = {0};
+ char keyBits[(KEY_CNT + 7) / 8] = {0};
+ char absBits[(ABS_CNT + 7) / 8] = {0};
+ struct input_id id;
+
+ if (ioctl(linjs.fd, EVIOCGBIT(0, sizeof(evBits)), evBits) < 0 ||
+ ioctl(linjs.fd, EVIOCGBIT(EV_KEY, sizeof(keyBits)), keyBits) < 0 ||
+ ioctl(linjs.fd, EVIOCGBIT(EV_ABS, sizeof(absBits)), absBits) < 0 ||
+ ioctl(linjs.fd, EVIOCGID, &id) < 0)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Linux: Failed to query input device: %s",
+ strerror(errno));
+ close(linjs.fd);
+ return GLFW_FALSE;
+ }
+
+ // Ensure this device supports the events expected of a joystick
+ if (!isBitSet(EV_KEY, evBits) || !isBitSet(EV_ABS, evBits))
+ {
+ close(linjs.fd);
+ return GLFW_FALSE;
+ }
+
+ char name[256] = "";
+
+ if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)
+ strncpy(name, "Unknown", sizeof(name));
+
+ char guid[33] = "";
+
+ // Generate a joystick GUID that matches the SDL 2.0.5+ one
+ if (id.vendor && id.product && id.version)
+ {
+ sprintf(guid, "%02x%02x0000%02x%02x0000%02x%02x0000%02x%02x0000",
+ id.bustype & 0xff, id.bustype >> 8,
+ id.vendor & 0xff, id.vendor >> 8,
+ id.product & 0xff, id.product >> 8,
+ id.version & 0xff, id.version >> 8);
+ }
+ else
+ {
+ sprintf(guid, "%02x%02x0000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00",
+ id.bustype & 0xff, id.bustype >> 8,
+ name[0], name[1], name[2], name[3],
+ name[4], name[5], name[6], name[7],
+ name[8], name[9], name[10]);
+ }
+
+ int axisCount = 0, buttonCount = 0, hatCount = 0;
+
+ for (int code = BTN_MISC; code < KEY_CNT; code++)
+ {
+ if (!isBitSet(code, keyBits))
+ continue;
+
+ linjs.keyMap[code - BTN_MISC] = buttonCount;
+ buttonCount++;
+ }
+
+ for (int code = 0; code < ABS_CNT; code++)
+ {
+ linjs.absMap[code] = -1;
+ if (!isBitSet(code, absBits))
+ continue;
+
+ if (code >= ABS_HAT0X && code <= ABS_HAT3Y)
+ {
+ linjs.absMap[code] = hatCount;
+ hatCount++;
+ // Skip the Y axis
+ code++;
+ }
+ else
+ {
+ if (ioctl(linjs.fd, EVIOCGABS(code), &linjs.absInfo[code]) < 0)
+ continue;
+
+ linjs.absMap[code] = axisCount;
+ axisCount++;
+ }
+ }
+
+ _GLFWjoystick* js =
+ _glfwAllocJoystick(name, guid, axisCount, buttonCount, hatCount);
+ if (!js)
+ {
+ close(linjs.fd);
+ return GLFW_FALSE;
+ }
+
+ strncpy(linjs.path, path, sizeof(linjs.path) - 1);
+ memcpy(&js->linjs, &linjs, sizeof(linjs));
+
+ pollAbsState(js);
+
+ _glfwInputJoystick(js, GLFW_CONNECTED);
+ return GLFW_TRUE;
+}
+
+#undef isBitSet
+
+// Frees all resources associated with the specified joystick
+//
+static void closeJoystick(_GLFWjoystick* js)
+{
+ close(js->linjs.fd);
+ _glfwFreeJoystick(js);
+ _glfwInputJoystick(js, GLFW_DISCONNECTED);
+}
+
+// Lexically compare joysticks by name; used by qsort
+//
+static int compareJoysticks(const void* fp, const void* sp)
+{
+ const _GLFWjoystick* fj = fp;
+ const _GLFWjoystick* sj = sp;
+ return strcmp(fj->linjs.path, sj->linjs.path);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize joystick interface
+//
+GLFWbool _glfwInitJoysticksLinux(void)
+{
+ const char* dirname = "/dev/input";
+
+ _glfw.linjs.inotify = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
+ if (_glfw.linjs.inotify > 0)
+ {
+ // HACK: Register for IN_ATTRIB to get notified when udev is done
+ // This works well in practice but the true way is libudev
+
+ _glfw.linjs.watch = inotify_add_watch(_glfw.linjs.inotify,
+ dirname,
+ IN_CREATE | IN_ATTRIB | IN_DELETE);
+ }
+
+ // Continue without device connection notifications if inotify fails
+
+ if (regcomp(&_glfw.linjs.regex, "^event[0-9]\\+$", 0) != 0)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "Linux: Failed to compile regex");
+ return GLFW_FALSE;
+ }
+
+ int count = 0;
+
+ DIR* dir = opendir(dirname);
+ if (dir)
+ {
+ struct dirent* entry;
+
+ while ((entry = readdir(dir)))
+ {
+ regmatch_t match;
+
+ if (regexec(&_glfw.linjs.regex, entry->d_name, 1, &match, 0) != 0)
+ continue;
+
+ char path[PATH_MAX];
+
+ snprintf(path, sizeof(path), "%s/%s", dirname, entry->d_name);
+
+ if (openJoystickDevice(path))
+ count++;
+ }
+
+ closedir(dir);
+ }
+
+ // Continue with no joysticks if enumeration fails
+
+ qsort(_glfw.joysticks, count, sizeof(_GLFWjoystick), compareJoysticks);
+ return GLFW_TRUE;
+}
+
+// Close all opened joystick handles
+//
+void _glfwTerminateJoysticksLinux(void)
+{
+ int jid;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ _GLFWjoystick* js = _glfw.joysticks + jid;
+ if (js->present)
+ closeJoystick(js);
+ }
+
+ regfree(&_glfw.linjs.regex);
+
+ if (_glfw.linjs.inotify > 0)
+ {
+ if (_glfw.linjs.watch > 0)
+ inotify_rm_watch(_glfw.linjs.inotify, _glfw.linjs.watch);
+
+ close(_glfw.linjs.inotify);
+ }
+}
+
+void _glfwDetectJoystickConnectionLinux(void)
+{
+ if (_glfw.linjs.inotify <= 0)
+ return;
+
+ ssize_t offset = 0;
+ char buffer[16384];
+ const ssize_t size = read(_glfw.linjs.inotify, buffer, sizeof(buffer));
+
+ while (size > offset)
+ {
+ regmatch_t match;
+ const struct inotify_event* e = (struct inotify_event*) (buffer + offset);
+
+ offset += sizeof(struct inotify_event) + e->len;
+
+ if (regexec(&_glfw.linjs.regex, e->name, 1, &match, 0) != 0)
+ continue;
+
+ char path[PATH_MAX];
+ snprintf(path, sizeof(path), "/dev/input/%s", e->name);
+
+ if (e->mask & (IN_CREATE | IN_ATTRIB))
+ openJoystickDevice(path);
+ else if (e->mask & IN_DELETE)
+ {
+ for (int jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)
+ {
+ closeJoystick(_glfw.joysticks + jid);
+ break;
+ }
+ }
+ }
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
+{
+ // Read all queued events (non-blocking)
+ for (;;)
+ {
+ struct input_event e;
+
+ errno = 0;
+ if (read(js->linjs.fd, &e, sizeof(e)) < 0)
+ {
+ // Reset the joystick slot if the device was disconnected
+ if (errno == ENODEV)
+ closeJoystick(js);
+
+ break;
+ }
+
+ if (e.type == EV_SYN)
+ {
+ if (e.code == SYN_DROPPED)
+ _glfw.linjs.dropped = GLFW_TRUE;
+ else if (e.code == SYN_REPORT)
+ {
+ _glfw.linjs.dropped = GLFW_FALSE;
+ pollAbsState(js);
+ }
+ }
+
+ if (_glfw.linjs.dropped)
+ continue;
+
+ if (e.type == EV_KEY)
+ handleKeyEvent(js, e.code, e.value);
+ else if (e.type == EV_ABS)
+ handleAbsEvent(js, e.code, e.value);
+ }
+
+ return js->present;
+}
+
+void _glfwPlatformUpdateGamepadGUID(char* guid)
+{
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.h
new file mode 100644
index 0000000..25a2a2e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/linux_joystick.h
@@ -0,0 +1,63 @@
+//========================================================================
+// GLFW 3.3 Linux - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <linux/input.h>
+#include <linux/limits.h>
+#include <regex.h>
+
+#define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickLinux linjs
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux linjs
+
+#define _GLFW_PLATFORM_MAPPING_NAME "Linux"
+#define GLFW_BUILD_LINUX_MAPPINGS
+
+// Linux-specific joystick data
+//
+typedef struct _GLFWjoystickLinux
+{
+ int fd;
+ char path[PATH_MAX];
+ int keyMap[KEY_CNT - BTN_MISC];
+ int absMap[ABS_CNT];
+ struct input_absinfo absInfo[ABS_CNT];
+ int hats[4][2];
+} _GLFWjoystickLinux;
+
+// Linux-specific joystick API data
+//
+typedef struct _GLFWlibraryLinux
+{
+ int inotify;
+ int watch;
+ regex_t regex;
+ GLFWbool dropped;
+} _GLFWlibraryLinux;
+
+
+GLFWbool _glfwInitJoysticksLinux(void);
+void _glfwTerminateJoysticksLinux(void);
+void _glfwDetectJoystickConnectionLinux(void);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/mappings.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/mappings.h
new file mode 100644
index 0000000..11853a0
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/mappings.h
@@ -0,0 +1,1001 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// As mappings.h.in, this file is used by CMake to produce the mappings.h
+// header file. If you are adding a GLFW specific gamepad mapping, this is
+// where to put it.
+//========================================================================
+// As mappings.h, this provides all pre-defined gamepad mappings, including
+// all available in SDL_GameControllerDB. Do not edit this file. Any gamepad
+// mappings not specific to GLFW should be submitted to SDL_GameControllerDB.
+// This file can be re-generated from mappings.h.in and the upstream
+// gamecontrollerdb.txt with the 'update_mappings' CMake target.
+//========================================================================
+
+// All gamepad mappings not labeled GLFW are copied from the
+// SDL_GameControllerDB project under the following license:
+//
+// Simple DirectMedia Layer
+// Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the
+// use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+
+const char* _glfwDefaultMappings[] =
+{
+#if defined(GLFW_BUILD_WIN32_MAPPINGS)
+"03000000fa2d00000100000000000000,3DRUDDER,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Windows,",
+"03000000c82d00002038000000000000,8bitdo,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000951000000000000,8BitDo Dogbone Modkit,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Windows,",
+"03000000c82d000011ab000000000000,8BitDo F30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00001038000000000000,8BitDo F30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000090000000000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000650000000000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:a4,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00005106000000000000,8BitDo M30 Gamepad,a:b1,b:b0,back:b10,guide:b2,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000151000000000000,8BitDo M30 ModKit,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00000310000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00002028000000000000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00008010000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00000451000000000000,8BitDo N30 Modkit,a:b1,b:b0,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,start:b11,platform:Windows,",
+"03000000c82d00000190000000000000,8BitDo N30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00001590000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00006528000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000022000000090000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000203800000900000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000360000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00002867000000000000,8BitDo S30 Modkit,a:b0,b:b1,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b8,lefttrigger:b9,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00000130000000000000,8BitDo SF30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000060000000000000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000061000000000000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d000021ab000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000102800000900000000000000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00003028000000000000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000030000000000000,8BitDo SN30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00001290000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d000020ab000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00004028000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00006228000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000351000000000000,8BitDo SN30 Modkit,a:b1,b:b0,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000121000000000000,8BitDo SN30 Pro for Android,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00000260000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000261000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00000031000000000000,8BitDo Wireless Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c82d00001890000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000c82d00003032000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,",
+"03000000a00500003232000000000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000a30c00002700000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000a30c00002800000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,",
+"030000008f0e00001200000000000000,Acme GA-02,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000c01100000355000011010000,ACRUX USB GAME PAD,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000fa190000f0ff000000000000,Acteck AGJ-3200,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"030000006f0e00001413000000000000,Afterglow,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000341a00003608000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00000263000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00001101000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00001401000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00001402000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00001901000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00001a01000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d62000001d57000000000000,Airflo PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000491900001904000000000000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000710100001904000000000000,Amazon Luna Controller,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b8,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b4,rightstick:b7,rightx:a3,righty:a4,start:b6,x:b3,y:b2,platform:Windows,",
+"03000000ef0500000300000000000000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows,",
+"03000000d6200000e557000000000000,Batarang,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000c01100001352000000000000,Battalife Joystick,a:b6,b:b7,back:b2,leftshoulder:b0,leftx:a0,lefty:a1,rightshoulder:b1,start:b3,x:b4,y:b5,platform:Windows,",
+"030000006f0e00003201000000000000,Battlefield 4 PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d62000002a79000000000000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000bc2000006012000000000000,Betop 2126F,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000bc2000000055000000000000,Betop BFM Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000bc2000006312000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000bc2000006321000000000000,BETOP CONTROLLER,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000bc2000006412000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000c01100000555000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000c01100000655000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000790000000700000000000000,Betop Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000808300000300000000000000,Betop Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
+"030000006b1400000055000000000000,Bigben PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000006b1400000103000000000000,Bigben PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,",
+"03000000120c0000210e000000000000,Brook Mars,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"0300000066f700000500000000000000,BrutalLegendTest,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d81d00000b00000000000000,BUFFALO BSGP1601 Series ,a:b5,b:b3,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b4,y:b2,platform:Windows,",
+"03000000e82000006058000000000000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000457500000401000000000000,Cobra,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000005e0400008e02000000000000,Controller (XBOX 360 For Windows),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"030000005e040000a102000000000000,Controller (Xbox 360 Wireless Receiver for Windows),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"030000005e040000ff02000000000000,Controller (Xbox One For Windows) - Wired,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"030000005e040000ea02000000000000,Controller (Xbox One For Windows) - Wireless,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000260900008888000000000000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a4,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000a306000022f6000000000000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000451300000830000000000000,Defender Game Racer X7,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000007d0400000840000000000000,Destroyer Tiltpad,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,x:b0,y:b3,platform:Windows,",
+"03000000791d00000103000000000000,Dual Box WII,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000bd12000002e0000000000000,Dual USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows,",
+"030000008f0e00000910000000000000,DualShock 2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows,",
+"030000006f0e00003001000000000000,EA SPORTS PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000b80500000410000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,",
+"03000000b80500000610000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,",
+"03000000120c0000f61c000000000000,Elite,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000008f0e00000f31000000000000,EXEQ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,",
+"03000000341a00000108000000000000,EXEQ RF USB Gamepad 8206,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000006f0e00008401000000000000,Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00008001000000000000,Faceoff Wired Pro Controller for Nintendo Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000852100000201000000000000,FF-GP1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00008500000000000000,Fighting Commander 2016 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00008400000000000000,Fighting Commander 5,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00008700000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00008800000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,",
+"030000000d0f00002700000000000000,FIGHTING STICK V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"78696e70757403000000000000000000,Fightstick TES,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000790000002201000000000000,Game Controller for PC,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"0300000066f700000100000000000000,Game VIB Joystick,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows,",
+"03000000260900002625000000000000,Gamecube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000790000004618000000000000,GameCube Controller Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,",
+"030000008f0e00000d31000000000000,GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000280400000140000000000000,GamePad Pro USB,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000ac0500003d03000000000000,GameSir,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000ac0500004d04000000000000,GameSir,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000ffff00000000000000000000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000c01100000140000000000000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000009b2800003200000000000000,GC/N64 to USB v3.4,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,",
+"030000009b2800006000000000000000,GC/N64 to USB v3.6,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,",
+"030000008305000009a0000000000000,Genius,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000008305000031b0000000000000,Genius Maxfire Blaze 3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000451300000010000000000000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000005c1a00003330000000000000,Genius MaxFire Grandias 12V,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000300f00000b01000000000000,GGE909 Recoil Pad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000f0250000c283000000000000,Gioteck,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000f025000021c1000000000000,Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000f0250000c383000000000000,Gioteck VX2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000f0250000c483000000000000,Gioteck VX2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"030000007d0400000540000000000000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000341a00000302000000000000,Hama Scorpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00004900000000000000,Hatsune Miku Sho Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000001008000001e1000000000000,Havit HV-G60,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000d81400000862000000000000,HitBox Edition Cthulhu+,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000632500002605000000000000,HJD-X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"030000000d0f00002d00000000000000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00005f00000000000000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00005e00000000000000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00004000000000000000,Hori Fighting Stick Mini 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00005400000000000000,Hori Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00000900000000000000,Hori Pad 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00004d00000000000000,Hori Pad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00009200000000000000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00001600000000007803,HORI Real Arcade Pro EX-SE (Xbox 360),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Windows,",
+"030000000d0f00009c00000000000000,Hori TAC Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f0000c100000000000000,Horipad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00006e00000000000000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00006600000000000000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00005500000000000000,Horipad 4 FPS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f0000ee00000000000000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000250900000017000000000000,HRAP2 on PS/SS/N64 Joypad to USB BOX,a:b2,b:b1,back:b9,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b8,x:b3,y:b0,platform:Windows,",
+"030000008f0e00001330000000000000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000d81d00000f00000000000000,iBUFFALO BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000d81d00001000000000000000,iBUFFALO BSGP1204P Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000830500006020000000000000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Windows,",
+"03000000b50700001403000000000000,Impact Black,a:b2,b:b3,back:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,",
+"030000006f0e00002401000000000000,INJUSTICE FightStick PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000ac0500002c02000000000000,IPEGA,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000491900000204000000000000,Ipega PG-9023,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000491900000304000000000000,Ipega PG-9087 - Bluetooth Gamepad,+righty:+a5,-righty:-a4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,start:b11,x:b3,y:b4,platform:Windows,",
+"030000006e0500000a20000000000000,JC-DUX60 ELECOM MMO Gamepad,a:b2,b:b3,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b14,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b15,righttrigger:b13,rightx:a3,righty:a4,start:b20,x:b0,y:b1,platform:Windows,",
+"030000006e0500000520000000000000,JC-P301U,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,",
+"030000006e0500000320000000000000,JC-U3613M (DInput),a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,",
+"030000006e0500000720000000000000,JC-W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,",
+"030000007e0500000620000000000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows,",
+"030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows,",
+"030000007e0500000720000000000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,",
+"030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000bd12000003c0000010010000,Joypad Alpha Shock,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000bd12000003c0000000000000,JY-P70UR,a:b1,b:b0,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b11,righttrigger:b9,rightx:a3,righty:a2,start:b4,x:b3,y:b2,platform:Windows,",
+"03000000242f00002d00000000000000,JYS Wireless Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000242f00008a00000000000000,JYS Wireless Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,",
+"03000000790000000200000000000000,King PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
+"030000006d040000d1ca000000000000,Logitech ChillStream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006d040000d2ca000000000000,Logitech Cordless Precision,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006d04000011c2000000000000,Logitech Cordless Wingman,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b2,righttrigger:b7,rightx:a3,righty:a4,x:b4,platform:Windows,",
+"030000006d04000016c2000000000000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006d04000018c2000000000000,Logitech F510 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006d04000019c2000000000000,Logitech F710 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006d0400001ac2000000000000,Logitech Precision Gamepad,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006d0400000ac2000000000000,Logitech WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Windows,",
+"03000000380700006652000000000000,Mad Catz C.T.R.L.R,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700005032000000000000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700005082000000000000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008433000000000000,Mad Catz FightStick TE S+ (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008483000000000000,Mad Catz FightStick TE S+ (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008134000000000000,Mad Catz FightStick TE2+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b4,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008184000000000000,Mad Catz FightStick TE2+ PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,leftstick:b10,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700006252000000000000,Mad Catz Micro C.T.R.L.R,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008034000000000000,Mad Catz TE2 PS3 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008084000000000000,Mad Catz TE2 PS4 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700008532000000000000,Madcatz Arcade Fightstick TE S PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700003888000000000000,Madcatz Arcade Fightstick TE S+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000380700001888000000000000,MadCatz SFIV FightStick PS3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000380700008081000000000000,MADCATZ SFV Arcade FightStick Alpha PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000002a0600001024000000000000,Matricom,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows,",
+"030000009f000000adbb000000000000,MaxJoypad Virtual Controller,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,",
+"03000000250900000128000000000000,Mayflash Arcade Stick,a:b1,b:b2,back:b8,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b5,y:b6,platform:Windows,",
+"03000000790000004418000000000000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000790000004318000000000000,Mayflash GameCube Controller Adapter,a:b1,b:b2,back:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b0,leftshoulder:b4,leftstick:b0,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b0,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000242f00007300000000000000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,",
+"0300000079000000d218000000000000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000d620000010a7000000000000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000008f0e00001030000000000000,Mayflash USB Adapter for original Sega Saturn controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,rightshoulder:b2,righttrigger:b7,start:b9,x:b3,y:b4,platform:Windows,",
+"0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,",
+"03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000790000002418000000000000,Mega Drive,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b2,start:b9,x:b3,y:b4,platform:Windows,",
+"03000000380700006382000000000000,MLG GamePad PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000c62400002a89000000000000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c62400002b89000000000000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c62400001a89000000000000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000c62400001b89000000000000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000efbe0000edfe000000000000,Monect Virtual Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000250900006688000000000000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,",
+"030000006b140000010c000000000000,NACON GC-400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000921200004b46000000000000,NES 2-port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Windows,",
+"03000000790000004518000000000000,NEXILUX GAMECUBE Controller Adapter,platform:Windows,a:b1,b:b0,x:b2,y:b3,start:b9,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4,",
+"030000001008000001e5000000000000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000152000000182000000000000,NGDS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000bd12000015d0000000000000,Nintendo Retrolink USB Super SNES Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,",
+"030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000000d0500000308000000000000,Nostromo N45,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Windows,",
+"03000000550900001472000000000000,NVIDIA Controller v01.04,a:b11,b:b10,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b5,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b4,righttrigger:a5,rightx:a3,righty:a6,start:b3,x:b9,y:b8,platform:Windows,",
+"030000004b120000014d000000000000,NYKO AIRFLO,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,rightshoulder:b5,rightstick:a2,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000d620000013a7000000000000,NSW wired controller,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
+"03000000782300000a10000000000000,Onlive Wireless Controller,a:b15,b:b14,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b11,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b13,y:b12,platform:Windows,",
+"03000000d62000006d57000000000000,OPP PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006b14000001a1000000000000,Orange Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000362800000100000000000000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,",
+"03000000120c0000f60e000000000000,P4 Wired Gamepad,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00000901000000000000,PDP Versus Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000008f0e00000300000000000000,Piranha xtreme,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"030000004c050000da0c000000000000,PlayStation Classic Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,",
+"030000004c0500003713000000000000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d62000006dca000000000000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d62000009557000000000000,Pro Elite PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d62000009f31000000000000,Pro Ex mini PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000d6200000c757000000000000,Pro Ex mini PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000632500002306000000000000,PS Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000e30500009605000000000000,PS to USB convert cable,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,",
+"03000000100800000100000000000000,PS1 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"030000008f0e00007530000000000000,PS1 Controller,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b1,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000100800000300000000000000,PS2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000250900008888000000000000,PS2 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,",
+"03000000666600006706000000000000,PS2 Controller,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Windows,",
+"030000006b1400000303000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000009d0d00001330000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000250900000500000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows,",
+"030000004c0500006802000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b10,lefttrigger:a3~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:a4~,rightx:a2,righty:a5,start:b8,x:b3,y:b0,platform:Windows,",
+"03000000632500007505000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000888800000803000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,",
+"030000008f0e00001431000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000003807000056a8000000000000,PS3 RF pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000100000008200000000000000,PS360+ v1.66,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:h0.4,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004c050000a00b000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004c050000cc09000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004c050000e60c000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000ff000000cb01000000000000,PSP,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000300f00000011000000000000,QanBa Arcade JoyStick 1008,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b10,x:b0,y:b3,platform:Windows,",
+"03000000300f00001611000000000000,QanBa Arcade JoyStick 4018,a:b1,b:b2,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,",
+"03000000222c00000020000000000000,QANBA DRONE ARCADE JOYSTICK,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000300f00001210000000000000,QanBa Joystick Plus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000341a00000104000000000000,QanBa Joystick Q4RAF,a:b5,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b1,y:b2,platform:Windows,",
+"03000000222c00000223000000000000,Qanba Obsidian Arcade Joystick PS3 Mode,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000222c00000023000000000000,Qanba Obsidian Arcade Joystick PS4 Mode,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000321500000003000000000000,Razer Hydra,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000321500000204000000000000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000321500000104000000000000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000321500000507000000000000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000321500000707000000000000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000321500000011000000000000,Razer Raion Fightpad for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000321500000009000000000000,Razer Serval,+lefty:+a2,-lefty:-a1,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,leftx:a0,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"030000000d0f00001100000000000000,REAL ARCADE PRO.3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00006a00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00006b00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00008a00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00008b00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00007000000000000000,REAL ARCADE PRO.4 VLX,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00002200000000000000,REAL ARCADE Pro.V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00005b00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000000d0f00005c00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000790000001100000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000bd12000013d0000000000000,Retrolink USB SEGA Saturn Classic,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows,",
+"0300000000f000000300000000000000,RetroUSB.com RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,",
+"0300000000f00000f100000000000000,RetroUSB.com Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,",
+"030000006b140000010d000000000000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006b140000020d000000000000,Revolution Pro Controller 2(1/2),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006b140000130d000000000000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00001e01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00002801000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00002f01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004f04000003d0000000000000,run'n'drive,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:a3,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:a4,rightstick:b11,righttrigger:b5,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000a30600001af5000000000000,Saitek Cyborg,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000a306000023f6000000000000,Saitek Cyborg V.1 Game pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000300f00001201000000000000,Saitek Dual Analog Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,",
+"03000000a30600000701000000000000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Windows,",
+"03000000a30600000cff000000000000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b0,y:b1,platform:Windows,",
+"03000000a30600000c04000000000000,Saitek P2900,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000300f00001001000000000000,Saitek P480 Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,",
+"03000000a30600000b04000000000000,Saitek P990,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Windows,",
+"03000000a30600002106000000000000,Saitek PS1000,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000a306000020f6000000000000,Saitek PS2700,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000300f00001101000000000000,Saitek Rumble Pad,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,",
+"03000000730700000401000000000000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,",
+"0300000000050000289b000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000009b2800000500000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000a30c00002500000000000000,Sega Genesis Mini 3B controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,righttrigger:b5,start:b9,platform:Windows,",
+"03000000a30c00002400000000000000,Sega Mega Drive Mini 6B controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000341a00000208000000000000,SL-6555-SBK,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:-a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a3,righty:a2,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000341a00000908000000000000,SL-6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000008f0e00000800000000000000,SpeedLink Strike FX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000c01100000591000000000000,Speedlink Torid,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000d11800000094000000000000,Stadia Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b11,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000110100001914000000000000,SteelSeries,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000381000001214000000000000,SteelSeries Free,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000110100003114000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000381000001814000000000000,SteelSeries Stratus XL,a:b0,b:b1,back:b18,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b19,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000790000001c18000000000000,STK-7024X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000ff1100003133000000000000,SVEN X-PAD,a:b2,b:b3,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a4,start:b5,x:b0,y:b1,platform:Windows,",
+"03000000d620000011a7000000000000,Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000457500002211000000000000,SZMY-POWER PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004f04000007d0000000000000,T Mini Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004f0400000ab1000000000000,T.16000M,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b10,x:b2,y:b3,platform:Windows,",
+"03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000b50700001203000000000000,Techmobility X6-38V,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,",
+"030000004f04000015b3000000000000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,",
+"030000004f04000023b3000000000000,Thrustmaster Dual Trigger 3-in-1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004f0400000ed0000000000000,ThrustMaster eSwap PRO Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Windows,",
+"030000004f04000004b3000000000000,Thrustmaster Firestorm Dual Power 3,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,",
+"03000000666600000488000000000000,TigerGame PS/PS2 Game Controller Adapter,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,",
+"03000000d62000006000000000000000,Tournament PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"030000005f140000c501000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000b80500000210000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"030000004f04000087b6000000000000,TWCS Throttle,dpdown:b8,dpleft:b9,dpright:b7,dpup:b6,leftstick:b5,lefttrigger:-a5,leftx:a0,lefty:a1,righttrigger:+a5,platform:Windows,",
+"03000000d90400000200000000000000,TwinShock PS2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"030000006e0500001320000000000000,U4113,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000101c0000171c000000000000,uRage Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000300f00000701000000000000,USB 4-Axis 12-Button Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000341a00002308000000000000,USB gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"030000005509000000b4000000000000,USB gamepad,a:b10,b:b11,back:b5,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,guide:b14,leftshoulder:b8,leftstick:b6,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:a5,rightx:a2,righty:a3,start:b4,x:b12,y:b13,platform:Windows,",
+"030000006b1400000203000000000000,USB gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000790000000a00000000000000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000f0250000c183000000000000,USB gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000ff1100004133000000000000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000632500002305000000000000,USB Vibration Joystick (BM),a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000790000001a18000000000000,Venom,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
+"03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00000302000000000000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"030000006f0e00000702000000000000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
+"0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows,",
+"030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"030000005e040000130b000000000000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000341a00000608000000000000,Xeox,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000450c00002043000000000000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,",
+"03000000ac0500005b05000000000000,Xiaoji Gamesir-G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,",
+"03000000172700004431000000000000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000786901006e70000000000000,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,",
+"03000000790000004f18000000000000,ZD-T Android,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,",
+"03000000120c0000101e000000000000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,",
+"78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+"78696e70757402000000000000000000,XInput Wheel (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+"78696e70757403000000000000000000,XInput Arcade Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+"78696e70757404000000000000000000,XInput Flight Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+"78696e70757405000000000000000000,XInput Dance Pad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+"78696e70757406000000000000000000,XInput Guitar (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+"78696e70757408000000000000000000,XInput Drum Kit (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,",
+#endif // GLFW_BUILD_WIN32_MAPPINGS
+
+#if defined(GLFW_BUILD_COCOA_MAPPINGS)
+"030000008f0e00000300000009010000,2In1 USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000c82d00000090000001000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00000650000001000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000c82d00005106000000010000,8BitDo M30 Gamepad,a:b1,b:b0,back:b10,guide:b2,leftshoulder:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00001590000001000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"030000003512000012ab000001000000,8BitDo NES30 Gamepad,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000022000000090000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00000190000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000102800000900000000000000,8Bitdo SFC30 GamePad Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00001290000001000000,8BitDo SN30 Gamepad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00004028000000010000,8Bitdo SN30 GamePad,a:b1,b:b0,x:b4,y:b3,back:b10,start:b11,leftshoulder:b6,rightshoulder:b7,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,platform:Mac OS X,",
+"03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00000260000001000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00000031000001000000,8BitDo Wireless Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000c82d00001890000001000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a31,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"03000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000a00500003232000009010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000a30c00002700000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000a30c00002800000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,",
+"03000000ef0500000300000000020000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Mac OS X,",
+"03000000491900001904000001010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"03000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X,",
+"03000000c62400001a89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X,",
+"03000000c62400001b89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000d62000002a79000000010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000120c0000200e000000010000,Brook Mars,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000120c0000210e000000010000,Brook Mars,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000008305000031b0000000000000,Cideko AK08b,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"03000000a306000022f6000001030000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000790000004618000000010000,GameCube Controller Adapter,a:b4,b:b0,dpdown:b56,dpleft:b60,dpright:b52,dpup:b48,lefttrigger:a12,leftx:a0,lefty:a4,rightshoulder:b28,righttrigger:a16,rightx:a20,righty:a8,start:b36,x:b8,y:b12,platform:Mac OS X,",
+"03000000ad1b000001f9000000000000,Gamestop BB-070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,",
+"03000000c01100000140000000010000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006f0e00000102000000000000,GameStop Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000007d0400000540000001010000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000280400000140000000020000,Gravis Gamepad Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000008f0e00000300000007010000,GreenAsia Inc. USB Joystick,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Mac OS X,",
+"030000000d0f00002d00000000100000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00005f00000000010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00005e00000000010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00005f00000000000000,HORI Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00005e00000000000000,HORI Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00004d00000000000000,HORI Gem Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00009200000000010000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00006e00000000010000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00006600000000010000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f00006600000000000000,HORIPAD FPS PLUS 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000000d0f0000ee00000000010000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000008f0e00001330000011010000,HuiJia SNES Controller,a:b4,b:b2,back:b16,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b12,rightshoulder:b14,start:b18,x:b6,y:b0,platform:Mac OS X,",
+"03000000830500006020000000010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,",
+"03000000830500006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,",
+"030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Mac OS X,",
+"03000000242f00002d00000007010000,JYS Wireless Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"030000006d04000016c2000000020000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d04000016c2000000030000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d04000016c2000014040000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d04000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d04000018c2000000000000,Logitech F510 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d04000019c2000005030000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d0400001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000006d04000018c2000000010000,Logitech RumblePad 2 USB,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3~,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006d04000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000380700005032000000010000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000380700005082000000010000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000380700008433000000010000,Mad Catz FightStick TE S+ (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000380700008483000000010000,Mad Catz FightStick TE S+ (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000790000000600000007010000,Marvo GT-004,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Mac OS X,",
+"03000000790000004418000000010000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000242f00007300000000020000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Mac OS X,",
+"0300000079000000d218000026010000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000d620000010a7000003010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Mac OS X,",
+"03000000790000000018000000010000,Mayflash Wii U Pro Controller Adapter,a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X,",
+"03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X,",
+"03000000d8140000cecf000000000000,MC Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000005e0400002700000001010000,Microsoft SideWinder Plug & Play Game Pad,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b4,leftx:a0,lefty:a1,righttrigger:b5,x:b2,y:b3,platform:Mac OS X,",
+"03000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X,",
+"03000000c62400002a89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000c62400002b89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000632500007505000000020000,NEOGEO mini PAD Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b2,y:b3,platform:Mac OS X,",
+"03000000921200004b46000003020000,NES 2-port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Mac OS X,",
+"030000001008000001e5000006010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000d620000011a7000000020000,Nintendo Switch Core (Plus) Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000d620000011a7000010050000,Nintendo Switch PowerA Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,",
+"030000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,",
+"03000000550900001472000025050000,NVIDIA Controller v01.04,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Mac OS X,",
+"030000006f0e00000901000002010000,PDP Versus Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000008f0e00000300000000000000,Piranha xtreme,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"030000004c050000da0c000000010000,Playstation Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"030000004c0500003713000000010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000d62000006dca000000010000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000100800000300000006010000,PS2 Adapter,a:b2,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X,",
+"030000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X,",
+"030000004c050000a00b000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000008916000000fd000000000000,Razer Onza TE,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"03000000321500000204000000010000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000321500000104000000010000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000321500000010000000010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000321500000507000001010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000321500000011000000010000,Razer Raion Fightpad for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000321500000009000000020000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"030000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"0300000032150000030a000000000000,Razer Wildcat,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"03000000790000001100000000000000,Retrolink Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a3,lefty:a4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"030000006b140000010d000000010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006b140000130d000000010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000c6240000fefa000000000000,Rock Candy Gamepad for PS3,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"03000000730700000401000000010000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Mac OS X,",
+"03000000811700007e05000000000000,Sega Saturn,a:b2,b:b4,dpdown:b16,dpleft:b15,dpright:b14,dpup:b17,leftshoulder:b8,lefttrigger:a5,leftx:a0,lefty:a2,rightshoulder:b9,righttrigger:a4,start:b13,x:b0,y:b6,platform:Mac OS X,",
+"03000000b40400000a01000000000000,Sega Saturn USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X,",
+"030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,",
+"0300000000f00000f100000000000000,SNES RetroPort,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,rightshoulder:b7,start:b6,x:b0,y:b1,platform:Mac OS X,",
+"030000004c050000e60c000000010000,Sony DualSense,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004c050000a00b000000000000,Sony DualShock 4 Wireless Adaptor,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000d11800000094000000010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"030000005e0400008e02000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"03000000110100002014000000000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b12,x:b2,y:b3,platform:Mac OS X,",
+"03000000110100002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,",
+"03000000381000002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,",
+"050000004e696d6275732b0000000000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,",
+"03000000110100001714000000000000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,",
+"03000000110100001714000020010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,",
+"03000000457500002211000000010000,SZMY-POWER PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004f04000015b3000000000000,Thrustmaster Dual Analog 3.2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Mac OS X,",
+"030000004f0400000ed0000000020000,ThrustMaster eSwap PRO Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Mac OS X,",
+"03000000bd12000015d0000000000000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000bd12000015d0000000010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"03000000100800000100000000000000,Twin USB Joystick,a:b4,b:b2,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b12,leftstick:b20,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b14,rightstick:b22,righttrigger:b10,rightx:a6,righty:a4,start:b18,x:b6,y:b0,platform:Mac OS X,",
+"030000006f0e00000302000025040000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"030000006f0e00000702000003060000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000791d00000103000009010000,Wii Classic Controller,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,",
+"050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,back:b7,dpdown:b3,dpleft:b0,dpright:b1,dpup:b2,guide:b8,leftshoulder:b11,lefttrigger:b12,leftx:a0,lefty:a1,start:b6,x:b10,y:b9,platform:Mac OS X,",
+"050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,back:b7,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b8,leftshoulder:b19,leftstick:b23,lefttrigger:b21,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b24,righttrigger:b22,rightx:a2,righty:a3,start:b6,x:b18,y:b17,platform:Mac OS X,",
+"030000005e0400008e02000000000000,X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000006f0e00000104000000000000,Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"03000000c6240000045d000000000000,Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000050b000003090000,Xbox Elite Wireless Controller Series 2,a:b0,b:b1,back:b31,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b53,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000c62400003a54000000000000,Xbox One PowerA Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000d102000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000dd02000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000e302000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"030000005e040000e002000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000e002000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000ea02000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
+"030000005e040000fd02000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Mac OS X,",
+"03000000120c0000100e000000010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+"03000000120c0000101e000000010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,",
+#endif // GLFW_BUILD_COCOA_MAPPINGS
+
+#if defined(GLFW_BUILD_LINUX_MAPPINGS)
+"03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00001038000000010000,8Bitdo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00005106000000010000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000c82d00001590000011010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000310000011010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000c82d00008010000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000022000000090000011010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00002038000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000190000011010000,8Bitdo NES30 Pro 8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00000060000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00000061000000010000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,",
+"030000003512000012ab000010010000,8Bitdo SFC30 GamePad,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux,",
+"05000000102800000900000000010000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00003028000000010000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000160000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00001290000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00006228000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000260000011010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000202800000900000000010000,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,",
+"03000000c82d00000031000011010000,8BitDo Wireless Adapter (DInput),a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005e0400008e02000020010000,8BitDo Wireless Adapter (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,",
+"05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,",
+"050000005e040000e002000030110000,8BitDo Zero 2 (XInput),a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,",
+"05000000a00500003232000001000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000c01100000355000011010000,ACRUX USB GAME PAD,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006f0e00001302000000010000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00003901000020060000,Afterglow Controller for Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00003901000000430000,Afterglow Prismatic Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00003901000013020000,Afterglow Prismatic Wired Controller 048-007-NA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000100000008200000011010000,Akishop Customs PS360+ v1.66,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000007c1800000006000010010000,Alienware Dual Compatible Game Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Linux,",
+"05000000491900000204000021000000,Amazon Fire Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b17,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b12,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000491900001904000011010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Linux,",
+"05000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,",
+"03000000790000003018000011010000,Arcade Fightstick F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000a30c00002700000011010000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000a30c00002800000011010000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"05000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,",
+"05000000050b00000045000040000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,",
+"03000000503200000110000000000000,Atari Classic Controller,a:b0,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,x:b1,platform:Linux,",
+"05000000503200000110000000000000,Atari Classic Controller,a:b0,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,x:b1,platform:Linux,",
+"03000000503200000210000000000000,Atari Game Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux,",
+"05000000503200000210000000000000,Atari Game Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux,",
+"03000000120c00000500000010010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux,",
+"03000000ef0500000300000000010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux,",
+"03000000c62400001b89000011010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000d62000002a79000011010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000c21100000791000011010000,Be1 GC101 Controller 1.03 mode,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000c31100000791000011010000,Be1 GC101 GAMEPAD 1.03 mode,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005e0400008e02000003030000,Be1 GC101 Xbox 360 Controller mode,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"05000000bc2000000055000001000000,BETOP AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000666600006706000000010000,boom PSX to PC Converter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Linux,",
+"03000000120c0000200e000011010000,Brook Mars,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000120c0000210e000011010000,Brook Mars,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000120c0000f70e000011010000,Brook Universal Fighting Board,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000ffff0000ffff000000010000,Chinese-made Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,",
+"03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000000b0400003365000000010000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Linux,",
+"03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000a306000022f6000011010000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000b40400000a01000000010000,CYPRESS USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Linux,",
+"03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,",
+"030000004f04000004b3000010010000,Dual Power 2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,",
+"030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000341a000005f7000010010000,GameCube {HuiJia USB box},a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000bc2000000055000011010000,GameSir G3w,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000006f0e00000104000000010000,Gamestop Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000008f0e00000800000010010000,Gasia Co. Ltd PS(R) Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000006f0e00001304000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000451300000010000010010000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"0300000079000000d418000000010000,GPD Win 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000007d0400000540000000010000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000280400000140000000010000,Gravis GamePad Pro USB ,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000008f0e00000610000000010000,GreenAsia Electronics 4Axes 12Keys GamePad ,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Linux,",
+"030000008f0e00001200000010010000,GreenAsia Inc. USB Joystick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,",
+"0500000047532067616d657061640000,GS gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000f0250000c383000010010000,GT VX2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"06000000adde0000efbe000002010000,Hidromancer Game Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000d81400000862000011010000,HitBox (PS3/PC) Analog Mode,a:b1,b:b2,back:b8,guide:b9,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b12,x:b0,y:b3,platform:Linux,",
+"03000000c9110000f055000011010000,HJC Game GAMEPAD,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000632500002605000010010000,HJD-X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000000d0f00000d00000000010000,hori,a:b0,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftx:b4,lefty:b5,rightshoulder:b7,start:b9,x:b1,y:b2,platform:Linux,",
+"030000000d0f00001000000011010000,HORI CO. LTD. FIGHTING STICK 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f0000c100000011010000,HORI CO. LTD. HORIPAD S,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00006a00000011010000,HORI CO. LTD. Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00006b00000011010000,HORI CO. LTD. Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00002200000011010000,HORI CO. LTD. REAL ARCADE Pro.V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00008500000010010000,HORI Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00008600000002010000,Hori Fighting Commander,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000000d0f00005f00000011010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00005e00000011010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000000d0f00009200000011010000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f0000aa00000011010000,HORI Real Arcade Pro,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000000d0f0000d800000072056800,HORI Real Arcade Pro S,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,",
+"030000000d0f00001600000000010000,Hori Real Arcade Pro.EX-SE (Xbox 360),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux,",
+"030000000d0f00006e00000011010000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00006600000011010000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f0000ee00000011010000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000000d0f00006700000001010000,HORIPAD ONE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000008f0e00001330000010010000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000830500006020000010010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,",
+"050000006964726f69643a636f6e0000,idroid:con,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000b50700001503000010010000,impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,",
+"03000000d80400008200000003000000,IMS PCU#0 Gamepad Interface,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b5,x:b3,y:b2,platform:Linux,",
+"03000000fd0500000030000000010000,InterAct GoPad I-73000 (Fighting Game Layout),a:b3,b:b4,back:b6,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b7,x:b0,y:b1,platform:Linux,",
+"0500000049190000020400001b010000,Ipega PG-9069 - Bluetooth Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b161,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000632500007505000011010000,Ipega PG-9099 - Bluetooth Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000006e0500000320000010010000,JC-U3613M - DirectInput Mode,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Linux,",
+"03000000300f00001001000010010000,Jess Tech Dual Analog Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,",
+"03000000300f00000b01000010010000,Jess Tech GGE909 PC Recoil Pad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000ba2200002010000001010000,Jess Technology USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,",
+"030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Linux,",
+"050000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Linux,",
+"030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux,",
+"050000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000bd12000003c0000010010000,Joypad Alpha Shock,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000242f00002d00000011010000,JYS Wireless Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000242f00008a00000011010000,JYS Wireless Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux,",
+"030000006f0e00000103000000020000,Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006d040000d1ca000000000000,Logitech ChillStream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006d04000016c2000010010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006d04000016c2000011010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006d0400001ec2000019200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006d0400000ac2000010010000,Logitech Inc. WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Linux,",
+"030000006d04000018c2000010010000,Logitech RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006d04000011c2000010010000,Logitech WingMan Cordless RumblePad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,rightx:a3,righty:a4,start:b8,x:b3,y:b4,platform:Linux,",
+"050000004d4f435554452d3035305800,M54-PC,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000380700006652000025010000,Mad Catz C.T.R.L.R ,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700005032000011010000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700005082000011010000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000ad1b00002ef0000090040000,Mad Catz Fightpad SFxT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000380700008034000011010000,Mad Catz fightstick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700008084000011010000,Mad Catz fightstick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700008433000011010000,Mad Catz FightStick TE S+ (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700008483000011010000,Mad Catz FightStick TE S+ (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700001647000010040000,Mad Catz Wired Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000380700003847000090040000,Mad Catz Wired Xbox 360 Controller (SFIV),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000ad1b000016f0000090040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000380700001888000010010000,MadCatz PC USB Wired Stick 8818,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000380700003888000010010000,MadCatz PC USB Wired Stick 8838,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:a0,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000242f0000f700000001010000,Magic-S Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000120c00000500000000010000,Manta Dualshock 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000790000004418000010010000,Mayflash GameCube Controller,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000790000004318000010010000,Mayflash GameCube Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000242f00007300000011010000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux,",
+"0300000079000000d218000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000d620000010a7000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"0300000025090000e803000001010000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:a5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,",
+"03000000780000000600000010010000,Microntek USB Joystick,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"030000005e0400000e00000000010000,Microsoft SideWinder,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Linux,",
+"030000005e0400008e02000004010000,Microsoft X-Box 360 pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400008e02000062230000,Microsoft X-Box 360 pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"050000005e040000050b000003090000,Microsoft X-Box One Elite 2 pad,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005e040000e302000003020000,Microsoft X-Box One Elite pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000d102000001010000,Microsoft X-Box One pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000dd02000003020000,Microsoft X-Box One pad (Firmware 2015),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000d102000003020000,Microsoft X-Box One pad v2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400008502000000010000,Microsoft X-Box pad (Japan),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,",
+"030000005e0400008902000021010000,Microsoft X-Box pad v2 (US),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,",
+"030000005e040000000b000008040000,Microsoft Xbox One Elite 2 pad - Wired,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000ea02000008040000,Microsoft Xbox One S pad - Wired,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c62400001a53000000010000,Mini PE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000030000000300000002000000,Miroof,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,",
+"05000000d6200000e589000001000000,Moga 2 HID,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,",
+"05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,",
+"05000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,",
+"03000000c62400002b89000011010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000c62400002a89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000c62400001a89000000010000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000250900006688000000010000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,",
+"030000006b140000010c000010010000,NACON GC-400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000000d0f00000900000010010000,Natec Genesis P44,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000790000004518000010010000,NEXILUX GAMECUBE Controller Adapter,a:b1,b:b0,x:b2,y:b3,start:b9,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4,platform:Linux,",
+"030000001008000001e5000010010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Linux,",
+"060000007e0500003713000000000000,Nintendo 3DS,a:b0,b:b1,back:b8,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,",
+"060000007e0500000820000000000000,Nintendo Combined Joy-Cons (joycond),a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,",
+"030000007e0500003703000000016800,Nintendo GameCube Controller,a:b0,b:b2,dpdown:b6,dpleft:b4,dpright:b5,dpup:b7,lefttrigger:a4,leftx:a0,lefty:a1~,rightshoulder:b9,righttrigger:a5,rightx:a2,righty:a3~,start:b8,x:b1,y:b3,platform:Linux,",
+"03000000790000004618000010010000,Nintendo GameCube Controller Adapter,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5~,righty:a2~,start:b9,x:b2,y:b3,platform:Linux,",
+"050000007e0500000620000001800000,Nintendo Switch Left Joy-Con,a:b9,b:b8,back:b5,leftshoulder:b2,leftstick:b6,leftx:a1,lefty:a0~,rightshoulder:b4,start:b0,x:b7,y:b10,platform:Linux,",
+"030000007e0500000920000011810000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,",
+"050000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"050000007e0500000920000001800000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,",
+"050000007e0500000720000001800000,Nintendo Switch Right Joy-Con,a:b1,b:b2,back:b9,leftshoulder:b4,leftstick:b10,leftx:a1~,lefty:a0~,rightshoulder:b6,start:b8,x:b0,y:b3,platform:Linux,",
+"050000007e0500001720000001000000,Nintendo Switch SNES Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux,",
+"050000007e0500003003000001000000,Nintendo Wii Remote Pro Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,",
+"05000000010000000100000003000000,Nintendo Wiimote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000000d0500000308000010010000,Nostromo n45 Dual Analog Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Linux,",
+"03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,",
+"05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,",
+"03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"19000000010000000100000001010000,odroidgo2_joypad,a:b1,b:b0,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,guide:b10,leftshoulder:b4,leftstick:b12,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b13,righttrigger:b14,start:b15,x:b2,y:b3,platform:Linux,",
+"19000000010000000200000011000000,odroidgo2_joypad_v11,a:b1,b:b0,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b12,leftshoulder:b4,leftstick:b14,lefttrigger:b13,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b16,start:b17,x:b2,y:b3,platform:Linux,",
+"030000005e0400000202000000010000,Old Xbox pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,",
+"03000000c0160000dc27000001010000,OnyxSoft Dual JoyDivision,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:Linux,",
+"05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,",
+"05000000362800000100000003010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,",
+"03000000830500005020000010010000,Padix Co. Ltd. Rockfire PSX/USB Bridge,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Linux,",
+"03000000790000001c18000011010000,PC Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000ff1100003133000010010000,PC Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000006f0e0000b802000001010000,PDP AFTERGLOW Wired Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e0000b802000013020000,PDP AFTERGLOW Wired Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00006401000001010000,PDP Battlefield One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00008001000011010000,PDP CO. LTD. Faceoff Wired Pro Controller for Nintendo Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006f0e00003101000000010000,PDP EA Sports Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e0000c802000012010000,PDP Kingdom Hearts Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00008701000011010000,PDP Rock Candy Wired Controller for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000006f0e00000901000011010000,PDP Versus Fighting Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006f0e0000a802000023020000,PDP Wired Controller for Xbox One,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000006f0e00008501000011010000,PDP Wired Fight Pad Pro for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"0500000049190000030400001b010000,PG-9099,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000491900000204000000000000,PG-9118,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000004c050000da0c000011010000,Playstation Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"030000004c0500003713000011010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000c62400000053000000010000,PowerA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c62400003a54000001010000,PowerA 1428124-01,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000d62000006dca000011010000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000d62000000228000001010000,PowerA Wired Controller for Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c62400001a58000001010000,PowerA Xbox One Cabled,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c62400001a54000001010000,PowerA Xbox One Mini Wired Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006d040000d2ca000011010000,Precision Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000341a00003608000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004c0500006802000010010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,",
+"030000004c0500006802000010810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,",
+"030000004c0500006802000011810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"030000006f0e00001402000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000008f0e00000300000010010000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"050000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,",
+"050000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:a12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:a13,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,",
+"050000004c0500006802000000800000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"050000004c0500006802000000810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"05000000504c415953544154494f4e00,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,",
+"060000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,",
+"030000004c050000a00b000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004c050000a00b000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"030000004c050000c405000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004c050000c405000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004c050000cc09000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004c050000cc09000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"03000000c01100000140000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"050000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"050000004c050000c405000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"050000004c050000c405000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"050000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"050000004c050000cc09000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"030000004c050000e60c000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000ff000000cb01000010010000,PSP,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000300f00001211000011010000,QanBa Arcade JoyStick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,platform:Linux,",
+"030000009b2800004200000001010000,Raphnet Technologies Dual NES to USB v2.0,a:b0,b:b1,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Linux,",
+"030000009b2800003200000001010000,Raphnet Technologies GC/N64 to USB v3.4,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,",
+"030000009b2800006000000001010000,Raphnet Technologies GC/N64 to USB v3.6,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,",
+"030000009b2800000300000001010000,raphnet.net 4nes4snes v1.5,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Linux,",
+"030000008916000001fd000024010000,Razer Onza Classic Edition,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000008916000000fd000024010000,Razer Onza Tournament Edition,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000321500000204000011010000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000321500000104000011010000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000321500000810000011010000,Razer Panthera Evo Arcade Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000321500000010000011010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000321500000507000000010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000321500000011000011010000,Razer Raion Fightpad for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000008916000000fe000024010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c6240000045d000024010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c6240000045d000025010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000321500000009000011010000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"050000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"0300000032150000030a000001010000,Razer Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000790000001100000010010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"0300000081170000990a000001010000,Retronic Adapter,a:b0,leftx:a0,lefty:a1,platform:Linux,",
+"0300000000f000000300000000010000,RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,",
+"030000006b140000010d000011010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006b140000130d000011010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006f0e00001f01000000010000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000006f0e00001e01000011010000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006f0e00004601000001010000,Rock Candy Xbox One Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000a306000023f6000011010000,Saitek Cyborg V.1 Game Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000a30600001005000000010000,Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux,",
+"03000000a30600000701000000010000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Linux,",
+"03000000a30600000cff000010010000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b0,y:b1,platform:Linux,",
+"03000000a30600000c04000011010000,Saitek P2900 Wireless Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b12,x:b0,y:b3,platform:Linux,",
+"03000000300f00001201000010010000,Saitek P380,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,",
+"03000000a30600000901000000010000,Saitek P880,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,x:b0,y:b1,platform:Linux,",
+"03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Linux,",
+"03000000a306000018f5000010010000,Saitek PLC Saitek P3200 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000a306000020f6000011010000,Saitek PS2700 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000d81d00000e00000010010000,Savior,a:b0,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b9,x:b4,y:b5,platform:Linux,",
+"03000000f025000021c1000010010000,ShanWan Gioteck PS3 Wired Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000632500007505000010010000,SHANWAN PS3/PC Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000bc2000000055000010010000,ShanWan PS3/PC Wired GamePad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005f140000c501000010010000,SHANWAN Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000632500002305000010010000,ShanWan USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000341a00000908000010010000,SL-6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000004c050000e60c000011810000,Sony DualSense,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,",
+"03000000250900000500000000010000,Sony PS2 pad with SmartJoy adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,",
+"030000005e0400008e02000073050000,Speedlink TORID Wireless Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400008e02000020200000,SpeedLink XEOX Pro Analog Gamepad pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000d11800000094000011010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000de2800000112000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000de2800000211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000de2800000211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b15,paddle2:b16,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux,",
+"03000000de2800004211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000de2800004211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b15,paddle2:b16,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux,",
+"03000000de280000fc11000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000de280000ff11000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000381000003014000075010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000381000003114000075010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"0500000011010000311400001b010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b32,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"05000000110100001914000009010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000ad1b000038f0000090040000,Street Fighter IV FightStick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000003b07000004a1000000010000,Suncom SFX Plus for USB,a:b0,b:b2,back:b7,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Linux,",
+"03000000666600000488000000010000,Super Joy Box 5 Pro,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,",
+"0300000000f00000f100000000010000,Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,",
+"03000000457500002211000010010000,SZMY-POWER CO. LTD. GAMEPAD,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"030000008f0e00000d31000010010000,SZMY-POWER CO. LTD. GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000008f0e00001431000010010000,SZMY-POWER CO. LTD. PS3 gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004f04000020b3000010010000,Thrustmaster 2 in 1 DT,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,",
+"030000004f04000015b3000010010000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,",
+"030000004f04000023b3000000010000,Thrustmaster Dual Trigger 3-in-1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004f0400000ed0000011010000,ThrustMaster eSwap PRO Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000b50700000399000000010000,Thrustmaster Firestorm Digital 2,a:b2,b:b4,back:b11,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b0,righttrigger:b9,start:b1,x:b3,y:b5,platform:Linux,",
+"030000004f04000003b3000010010000,Thrustmaster Firestorm Dual Analog 2,a:b0,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b9,rightx:a2,righty:a3,x:b1,y:b3,platform:Linux,",
+"030000004f04000000b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Linux,",
+"030000004f04000026b3000002040000,Thrustmaster Gamepad GP XID,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c6240000025b000002020000,Thrustmaster GPX Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000004f04000008d0000000010000,Thrustmaster Run N Drive Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004f04000009d0000000010000,Thrustmaster Run N Drive Wireless PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004f04000007d0000000010000,Thrustmaster T Mini Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,",
+"030000004f04000012b3000010010000,Thrustmaster vibrating gamepad,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,",
+"03000000bd12000015d0000010010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000d814000007cd000011010000,Toodles 2008 Chimp PC/PS3,a:b0,b:b1,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,platform:Linux,",
+"030000005e0400008e02000070050000,Torid,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000c01100000591000011010000,Torid,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000100800000100000010010000,Twin USB PS2 Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000790000000600000007010000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,",
+"03000000790000001100000000010000,USB Gamepad1,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux,",
+"030000006f0e00000302000011010000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"030000006f0e00000702000011010000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,",
+"05000000ac0500003232000001000000,VR-BOX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000791d00000103000010010000,Wii Classic Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"050000000d0f0000f600000001000000,Wireless HORIPAD Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400009102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000a102000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000a102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"0000000058626f782033363020576900,Xbox 360 Wireless Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux,",
+"030000005e040000a102000014010000,Xbox 360 Wireless Receiver (XBOX),a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"0000000058626f782047616d65706100,Xbox Gamepad (userspace driver),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000d102000002010000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"050000005e040000fd02000030110000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"050000005e040000050b000002090000,Xbox One Elite Series 2,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005e040000ea02000000000000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"050000005e040000e002000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"050000005e040000fd02000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005e040000ea02000001030000,Xbox One Wireless Controller (Model 1708),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000120b000001050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"050000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"050000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,",
+"030000005e040000120b000005050000,XBox Series pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"030000005e0400008e02000000010000,xbox360 Wireless EasySMX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,",
+"03000000450c00002043000010010000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,",
+"03000000ac0500005b05000010010000,Xiaoji Gamesir-G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,",
+"05000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Linux,",
+"03000000c0160000e105000001010000,Xin-Mo Xin-Mo Dual Arcade,a:b4,b:b3,back:b6,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b9,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b1,y:b0,platform:Linux,",
+"03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+"03000000120c0000101e000011010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,",
+#endif // GLFW_BUILD_LINUX_MAPPINGS
+};
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/monitor.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/monitor.c
new file mode 100644
index 0000000..7341141
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/monitor.c
@@ -0,0 +1,542 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <assert.h>
+#include <math.h>
+#include <float.h>
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+
+
+// Lexically compare video modes, used by qsort
+//
+static int compareVideoModes(const void* fp, const void* sp)
+{
+ const GLFWvidmode* fm = fp;
+ const GLFWvidmode* sm = sp;
+ const int fbpp = fm->redBits + fm->greenBits + fm->blueBits;
+ const int sbpp = sm->redBits + sm->greenBits + sm->blueBits;
+ const int farea = fm->width * fm->height;
+ const int sarea = sm->width * sm->height;
+
+ // First sort on color bits per pixel
+ if (fbpp != sbpp)
+ return fbpp - sbpp;
+
+ // Then sort on screen area
+ if (farea != sarea)
+ return farea - sarea;
+
+ // Then sort on width
+ if (fm->width != sm->width)
+ return fm->width - sm->width;
+
+ // Lastly sort on refresh rate
+ return fm->refreshRate - sm->refreshRate;
+}
+
+// Retrieves the available modes for the specified monitor
+//
+static GLFWbool refreshVideoModes(_GLFWmonitor* monitor)
+{
+ int modeCount;
+ GLFWvidmode* modes;
+
+ if (monitor->modes)
+ return GLFW_TRUE;
+
+ modes = _glfwPlatformGetVideoModes(monitor, &modeCount);
+ if (!modes)
+ return GLFW_FALSE;
+
+ qsort(modes, modeCount, sizeof(GLFWvidmode), compareVideoModes);
+
+ free(monitor->modes);
+ monitor->modes = modes;
+ monitor->modeCount = modeCount;
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW event API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Notifies shared code of a monitor connection or disconnection
+//
+void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement)
+{
+ if (action == GLFW_CONNECTED)
+ {
+ _glfw.monitorCount++;
+ _glfw.monitors =
+ realloc(_glfw.monitors, sizeof(_GLFWmonitor*) * _glfw.monitorCount);
+
+ if (placement == _GLFW_INSERT_FIRST)
+ {
+ memmove(_glfw.monitors + 1,
+ _glfw.monitors,
+ ((size_t) _glfw.monitorCount - 1) * sizeof(_GLFWmonitor*));
+ _glfw.monitors[0] = monitor;
+ }
+ else
+ _glfw.monitors[_glfw.monitorCount - 1] = monitor;
+ }
+ else if (action == GLFW_DISCONNECTED)
+ {
+ int i;
+ _GLFWwindow* window;
+
+ for (window = _glfw.windowListHead; window; window = window->next)
+ {
+ if (window->monitor == monitor)
+ {
+ int width, height, xoff, yoff;
+ _glfwPlatformGetWindowSize(window, &width, &height);
+ _glfwPlatformSetWindowMonitor(window, NULL, 0, 0, width, height, 0);
+ _glfwPlatformGetWindowFrameSize(window, &xoff, &yoff, NULL, NULL);
+ _glfwPlatformSetWindowPos(window, xoff, yoff);
+ }
+ }
+
+ for (i = 0; i < _glfw.monitorCount; i++)
+ {
+ if (_glfw.monitors[i] == monitor)
+ {
+ _glfw.monitorCount--;
+ memmove(_glfw.monitors + i,
+ _glfw.monitors + i + 1,
+ ((size_t) _glfw.monitorCount - i) * sizeof(_GLFWmonitor*));
+ break;
+ }
+ }
+ }
+
+ if (_glfw.callbacks.monitor)
+ _glfw.callbacks.monitor((GLFWmonitor*) monitor, action);
+
+ if (action == GLFW_DISCONNECTED)
+ _glfwFreeMonitor(monitor);
+}
+
+// Notifies shared code that a full screen window has acquired or released
+// a monitor
+//
+void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window)
+{
+ monitor->window = window;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Allocates and returns a monitor object with the specified name and dimensions
+//
+_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM)
+{
+ _GLFWmonitor* monitor = calloc(1, sizeof(_GLFWmonitor));
+ monitor->widthMM = widthMM;
+ monitor->heightMM = heightMM;
+
+ strncpy(monitor->name, name, sizeof(monitor->name) - 1);
+
+ return monitor;
+}
+
+// Frees a monitor object and any data associated with it
+//
+void _glfwFreeMonitor(_GLFWmonitor* monitor)
+{
+ if (monitor == NULL)
+ return;
+
+ _glfwPlatformFreeMonitor(monitor);
+
+ _glfwFreeGammaArrays(&monitor->originalRamp);
+ _glfwFreeGammaArrays(&monitor->currentRamp);
+
+ free(monitor->modes);
+ free(monitor);
+}
+
+// Allocates red, green and blue value arrays of the specified size
+//
+void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size)
+{
+ ramp->red = calloc(size, sizeof(unsigned short));
+ ramp->green = calloc(size, sizeof(unsigned short));
+ ramp->blue = calloc(size, sizeof(unsigned short));
+ ramp->size = size;
+}
+
+// Frees the red, green and blue value arrays and clears the struct
+//
+void _glfwFreeGammaArrays(GLFWgammaramp* ramp)
+{
+ free(ramp->red);
+ free(ramp->green);
+ free(ramp->blue);
+
+ memset(ramp, 0, sizeof(GLFWgammaramp));
+}
+
+// Chooses the video mode most closely matching the desired one
+//
+const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,
+ const GLFWvidmode* desired)
+{
+ int i;
+ unsigned int sizeDiff, leastSizeDiff = UINT_MAX;
+ unsigned int rateDiff, leastRateDiff = UINT_MAX;
+ unsigned int colorDiff, leastColorDiff = UINT_MAX;
+ const GLFWvidmode* current;
+ const GLFWvidmode* closest = NULL;
+
+ if (!refreshVideoModes(monitor))
+ return NULL;
+
+ for (i = 0; i < monitor->modeCount; i++)
+ {
+ current = monitor->modes + i;
+
+ colorDiff = 0;
+
+ if (desired->redBits != GLFW_DONT_CARE)
+ colorDiff += abs(current->redBits - desired->redBits);
+ if (desired->greenBits != GLFW_DONT_CARE)
+ colorDiff += abs(current->greenBits - desired->greenBits);
+ if (desired->blueBits != GLFW_DONT_CARE)
+ colorDiff += abs(current->blueBits - desired->blueBits);
+
+ sizeDiff = abs((current->width - desired->width) *
+ (current->width - desired->width) +
+ (current->height - desired->height) *
+ (current->height - desired->height));
+
+ if (desired->refreshRate != GLFW_DONT_CARE)
+ rateDiff = abs(current->refreshRate - desired->refreshRate);
+ else
+ rateDiff = UINT_MAX - current->refreshRate;
+
+ if ((colorDiff < leastColorDiff) ||
+ (colorDiff == leastColorDiff && sizeDiff < leastSizeDiff) ||
+ (colorDiff == leastColorDiff && sizeDiff == leastSizeDiff && rateDiff < leastRateDiff))
+ {
+ closest = current;
+ leastSizeDiff = sizeDiff;
+ leastRateDiff = rateDiff;
+ leastColorDiff = colorDiff;
+ }
+ }
+
+ return closest;
+}
+
+// Performs lexical comparison between two @ref GLFWvidmode structures
+//
+int _glfwCompareVideoModes(const GLFWvidmode* fm, const GLFWvidmode* sm)
+{
+ return compareVideoModes(fm, sm);
+}
+
+// Splits a color depth into red, green and blue bit depths
+//
+void _glfwSplitBPP(int bpp, int* red, int* green, int* blue)
+{
+ int delta;
+
+ // We assume that by 32 the user really meant 24
+ if (bpp == 32)
+ bpp = 24;
+
+ // Convert "bits per pixel" to red, green & blue sizes
+
+ *red = *green = *blue = bpp / 3;
+ delta = bpp - (*red * 3);
+ if (delta >= 1)
+ *green = *green + 1;
+
+ if (delta == 2)
+ *red = *red + 1;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW public API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI GLFWmonitor** glfwGetMonitors(int* count)
+{
+ assert(count != NULL);
+
+ *count = 0;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ *count = _glfw.monitorCount;
+ return (GLFWmonitor**) _glfw.monitors;
+}
+
+GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (!_glfw.monitorCount)
+ return NULL;
+
+ return (GLFWmonitor*) _glfw.monitors[0];
+}
+
+GLFWAPI void glfwGetMonitorPos(GLFWmonitor* handle, int* xpos, int* ypos)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ if (xpos)
+ *xpos = 0;
+ if (ypos)
+ *ypos = 0;
+
+ _GLFW_REQUIRE_INIT();
+
+ _glfwPlatformGetMonitorPos(monitor, xpos, ypos);
+}
+
+GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* handle,
+ int* xpos, int* ypos,
+ int* width, int* height)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ if (xpos)
+ *xpos = 0;
+ if (ypos)
+ *ypos = 0;
+ if (width)
+ *width = 0;
+ if (height)
+ *height = 0;
+
+ _GLFW_REQUIRE_INIT();
+
+ _glfwPlatformGetMonitorWorkarea(monitor, xpos, ypos, width, height);
+}
+
+GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* handle, int* widthMM, int* heightMM)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ if (widthMM)
+ *widthMM = 0;
+ if (heightMM)
+ *heightMM = 0;
+
+ _GLFW_REQUIRE_INIT();
+
+ if (widthMM)
+ *widthMM = monitor->widthMM;
+ if (heightMM)
+ *heightMM = monitor->heightMM;
+}
+
+GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* handle,
+ float* xscale, float* yscale)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ if (xscale)
+ *xscale = 0.f;
+ if (yscale)
+ *yscale = 0.f;
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformGetMonitorContentScale(monitor, xscale, yscale);
+}
+
+GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return monitor->name;
+}
+
+GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* handle, void* pointer)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ monitor->userPointer = pointer;
+}
+
+GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return monitor->userPointer;
+}
+
+GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(_glfw.callbacks.monitor, cbfun);
+ return cbfun;
+}
+
+GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+ assert(count != NULL);
+
+ *count = 0;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (!refreshVideoModes(monitor))
+ return NULL;
+
+ *count = monitor->modeCount;
+ return monitor->modes;
+}
+
+GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ _glfwPlatformGetVideoMode(monitor, &monitor->currentMode);
+ return &monitor->currentMode;
+}
+
+GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma)
+{
+ unsigned int i;
+ unsigned short* values;
+ GLFWgammaramp ramp;
+ const GLFWgammaramp* original;
+ assert(handle != NULL);
+ assert(gamma > 0.f);
+ assert(gamma <= FLT_MAX);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (gamma != gamma || gamma <= 0.f || gamma > FLT_MAX)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid gamma value %f", gamma);
+ return;
+ }
+
+ original = glfwGetGammaRamp(handle);
+ if (!original)
+ return;
+
+ values = calloc(original->size, sizeof(unsigned short));
+
+ for (i = 0; i < original->size; i++)
+ {
+ float value;
+
+ // Calculate intensity
+ value = i / (float) (original->size - 1);
+ // Apply gamma curve
+ value = powf(value, 1.f / gamma) * 65535.f + 0.5f;
+ // Clamp to value range
+ value = _glfw_fminf(value, 65535.f);
+
+ values[i] = (unsigned short) value;
+ }
+
+ ramp.red = values;
+ ramp.green = values;
+ ramp.blue = values;
+ ramp.size = original->size;
+
+ glfwSetGammaRamp(handle, &ramp);
+ free(values);
+}
+
+GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ _glfwFreeGammaArrays(&monitor->currentRamp);
+ if (!_glfwPlatformGetGammaRamp(monitor, &monitor->currentRamp))
+ return NULL;
+
+ return &monitor->currentRamp;
+}
+
+GLFWAPI void glfwSetGammaRamp(GLFWmonitor* handle, const GLFWgammaramp* ramp)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ assert(monitor != NULL);
+ assert(ramp != NULL);
+ assert(ramp->size > 0);
+ assert(ramp->red != NULL);
+ assert(ramp->green != NULL);
+ assert(ramp->blue != NULL);
+
+ if (ramp->size <= 0)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid gamma ramp size %i",
+ ramp->size);
+ return;
+ }
+
+ _GLFW_REQUIRE_INIT();
+
+ if (!monitor->originalRamp.size)
+ {
+ if (!_glfwPlatformGetGammaRamp(monitor, &monitor->originalRamp))
+ return;
+ }
+
+ _glfwPlatformSetGammaRamp(monitor, ramp);
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.h
new file mode 100644
index 0000000..be77e7b
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.h
@@ -0,0 +1,64 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+// NOTE: Many Cocoa enum values have been renamed and we need to build across
+// SDK versions where one is unavailable or the other deprecated
+// We use the newer names in code and these macros to handle compatibility
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 101400
+ #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval
+ #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity
+#endif
+
+#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL nsgl
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl
+
+#include <stdatomic.h>
+
+
+// NSGL-specific per-context data
+//
+typedef struct _GLFWcontextNSGL
+{
+ id pixelFormat;
+ id object;
+} _GLFWcontextNSGL;
+
+// NSGL-specific global data
+//
+typedef struct _GLFWlibraryNSGL
+{
+ // dlopen handle for OpenGL.framework (for glfwGetProcAddress)
+ CFBundleRef framework;
+} _GLFWlibraryNSGL;
+
+
+GLFWbool _glfwInitNSGL(void);
+void _glfwTerminateNSGL(void);
+GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig);
+void _glfwDestroyContextNSGL(_GLFWwindow* window);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.m b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.m
new file mode 100644
index 0000000..78d688c
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/nsgl_context.m
@@ -0,0 +1,376 @@
+//========================================================================
+// GLFW 3.3 macOS - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <unistd.h>
+#include <math.h>
+
+static void makeContextCurrentNSGL(_GLFWwindow* window)
+{
+ @autoreleasepool {
+
+ if (window)
+ [window->context.nsgl.object makeCurrentContext];
+ else
+ [NSOpenGLContext clearCurrentContext];
+
+ _glfwPlatformSetTls(&_glfw.contextSlot, window);
+
+ } // autoreleasepool
+}
+
+static void swapBuffersNSGL(_GLFWwindow* window)
+{
+ @autoreleasepool {
+
+ // HACK: Simulate vsync with usleep as NSGL swap interval does not apply to
+ // windows with a non-visible occlusion state
+ if (window->ns.occluded)
+ {
+ int interval = 0;
+ [window->context.nsgl.object getValues:&interval
+ forParameter:NSOpenGLContextParameterSwapInterval];
+
+ if (interval > 0)
+ {
+ const double framerate = 60.0;
+ const uint64_t frequency = _glfwPlatformGetTimerFrequency();
+ const uint64_t value = _glfwPlatformGetTimerValue();
+
+ const double elapsed = value / (double) frequency;
+ const double period = 1.0 / framerate;
+ const double delay = period - fmod(elapsed, period);
+
+ usleep(floorl(delay * 1e6));
+ }
+ }
+
+ [window->context.nsgl.object flushBuffer];
+
+ } // autoreleasepool
+}
+
+static void swapIntervalNSGL(int interval)
+{
+ @autoreleasepool {
+
+ _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
+ if (window)
+ {
+ [window->context.nsgl.object setValues:&interval
+ forParameter:NSOpenGLContextParameterSwapInterval];
+ }
+
+ } // autoreleasepool
+}
+
+static int extensionSupportedNSGL(const char* extension)
+{
+ // There are no NSGL extensions
+ return GLFW_FALSE;
+}
+
+static GLFWglproc getProcAddressNSGL(const char* procname)
+{
+ CFStringRef symbolName = CFStringCreateWithCString(kCFAllocatorDefault,
+ procname,
+ kCFStringEncodingASCII);
+
+ GLFWglproc symbol = CFBundleGetFunctionPointerForName(_glfw.nsgl.framework,
+ symbolName);
+
+ CFRelease(symbolName);
+
+ return symbol;
+}
+
+static void destroyContextNSGL(_GLFWwindow* window)
+{
+ @autoreleasepool {
+
+ [window->context.nsgl.pixelFormat release];
+ window->context.nsgl.pixelFormat = nil;
+
+ [window->context.nsgl.object release];
+ window->context.nsgl.object = nil;
+
+ } // autoreleasepool
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize OpenGL support
+//
+GLFWbool _glfwInitNSGL(void)
+{
+ if (_glfw.nsgl.framework)
+ return GLFW_TRUE;
+
+ _glfw.nsgl.framework =
+ CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl"));
+ if (_glfw.nsgl.framework == NULL)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "NSGL: Failed to locate OpenGL framework");
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+// Terminate OpenGL support
+//
+void _glfwTerminateNSGL(void)
+{
+}
+
+// Create the OpenGL context
+//
+GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "NSGL: OpenGL ES is not available on macOS");
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->major > 2)
+ {
+ if (ctxconfig->major == 3 && ctxconfig->minor < 2)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "NSGL: The targeted version of macOS does not support OpenGL 3.0 or 3.1 but may support 3.2 and above");
+ return GLFW_FALSE;
+ }
+
+ if (!ctxconfig->forward || ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above");
+ return GLFW_FALSE;
+ }
+ }
+
+ // Context robustness modes (GL_KHR_robustness) are not yet supported by
+ // macOS but are not a hard constraint, so ignore and continue
+
+ // Context release behaviors (GL_KHR_context_flush_control) are not yet
+ // supported by macOS but are not a hard constraint, so ignore and continue
+
+ // Debug contexts (GL_KHR_debug) are not yet supported by macOS but are not
+ // a hard constraint, so ignore and continue
+
+ // No-error contexts (GL_KHR_no_error) are not yet supported by macOS but
+ // are not a hard constraint, so ignore and continue
+
+#define addAttrib(a) \
+{ \
+ assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \
+ attribs[index++] = a; \
+}
+#define setAttrib(a, v) { addAttrib(a); addAttrib(v); }
+
+ NSOpenGLPixelFormatAttribute attribs[40];
+ int index = 0;
+
+ addAttrib(NSOpenGLPFAAccelerated);
+ addAttrib(NSOpenGLPFAClosestPolicy);
+
+ if (ctxconfig->nsgl.offline)
+ {
+ addAttrib(NSOpenGLPFAAllowOfflineRenderers);
+ // NOTE: This replaces the NSSupportsAutomaticGraphicsSwitching key in
+ // Info.plist for unbundled applications
+ // HACK: This assumes that NSOpenGLPixelFormat will remain
+ // a straightforward wrapper of its CGL counterpart
+ addAttrib(kCGLPFASupportsAutomaticGraphicsSwitching);
+ }
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+ if (ctxconfig->major >= 4)
+ {
+ setAttrib(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core);
+ }
+ else
+#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
+ if (ctxconfig->major >= 3)
+ {
+ setAttrib(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core);
+ }
+
+ if (ctxconfig->major <= 2)
+ {
+ if (fbconfig->auxBuffers != GLFW_DONT_CARE)
+ setAttrib(NSOpenGLPFAAuxBuffers, fbconfig->auxBuffers);
+
+ if (fbconfig->accumRedBits != GLFW_DONT_CARE &&
+ fbconfig->accumGreenBits != GLFW_DONT_CARE &&
+ fbconfig->accumBlueBits != GLFW_DONT_CARE &&
+ fbconfig->accumAlphaBits != GLFW_DONT_CARE)
+ {
+ const int accumBits = fbconfig->accumRedBits +
+ fbconfig->accumGreenBits +
+ fbconfig->accumBlueBits +
+ fbconfig->accumAlphaBits;
+
+ setAttrib(NSOpenGLPFAAccumSize, accumBits);
+ }
+ }
+
+ if (fbconfig->redBits != GLFW_DONT_CARE &&
+ fbconfig->greenBits != GLFW_DONT_CARE &&
+ fbconfig->blueBits != GLFW_DONT_CARE)
+ {
+ int colorBits = fbconfig->redBits +
+ fbconfig->greenBits +
+ fbconfig->blueBits;
+
+ // macOS needs non-zero color size, so set reasonable values
+ if (colorBits == 0)
+ colorBits = 24;
+ else if (colorBits < 15)
+ colorBits = 15;
+
+ setAttrib(NSOpenGLPFAColorSize, colorBits);
+ }
+
+ if (fbconfig->alphaBits != GLFW_DONT_CARE)
+ setAttrib(NSOpenGLPFAAlphaSize, fbconfig->alphaBits);
+
+ if (fbconfig->depthBits != GLFW_DONT_CARE)
+ setAttrib(NSOpenGLPFADepthSize, fbconfig->depthBits);
+
+ if (fbconfig->stencilBits != GLFW_DONT_CARE)
+ setAttrib(NSOpenGLPFAStencilSize, fbconfig->stencilBits);
+
+ if (fbconfig->stereo)
+ {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "NSGL: Stereo rendering is deprecated");
+ return GLFW_FALSE;
+#else
+ addAttrib(NSOpenGLPFAStereo);
+#endif
+ }
+
+ if (fbconfig->doublebuffer)
+ addAttrib(NSOpenGLPFADoubleBuffer);
+
+ if (fbconfig->samples != GLFW_DONT_CARE)
+ {
+ if (fbconfig->samples == 0)
+ {
+ setAttrib(NSOpenGLPFASampleBuffers, 0);
+ }
+ else
+ {
+ setAttrib(NSOpenGLPFASampleBuffers, 1);
+ setAttrib(NSOpenGLPFASamples, fbconfig->samples);
+ }
+ }
+
+ // NOTE: All NSOpenGLPixelFormats on the relevant cards support sRGB
+ // framebuffer, so there's no need (and no way) to request it
+
+ addAttrib(0);
+
+#undef addAttrib
+#undef setAttrib
+
+ window->context.nsgl.pixelFormat =
+ [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
+ if (window->context.nsgl.pixelFormat == nil)
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "NSGL: Failed to find a suitable pixel format");
+ return GLFW_FALSE;
+ }
+
+ NSOpenGLContext* share = nil;
+
+ if (ctxconfig->share)
+ share = ctxconfig->share->context.nsgl.object;
+
+ window->context.nsgl.object =
+ [[NSOpenGLContext alloc] initWithFormat:window->context.nsgl.pixelFormat
+ shareContext:share];
+ if (window->context.nsgl.object == nil)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "NSGL: Failed to create OpenGL context");
+ return GLFW_FALSE;
+ }
+
+ if (fbconfig->transparent)
+ {
+ GLint opaque = 0;
+ [window->context.nsgl.object setValues:&opaque
+ forParameter:NSOpenGLContextParameterSurfaceOpacity];
+ }
+
+ [window->ns.view setWantsBestResolutionOpenGLSurface:window->ns.retina];
+
+ [window->context.nsgl.object setView:window->ns.view];
+
+ window->context.makeCurrent = makeContextCurrentNSGL;
+ window->context.swapBuffers = swapBuffersNSGL;
+ window->context.swapInterval = swapIntervalNSGL;
+ window->context.extensionSupported = extensionSupportedNSGL;
+ window->context.getProcAddress = getProcAddressNSGL;
+ window->context.destroy = destroyContextNSGL;
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI id glfwGetNSGLContext(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(nil);
+
+ if (window->context.source != GLFW_NATIVE_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return nil;
+ }
+
+ return window->context.nsgl.object;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_init.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_init.c
new file mode 100644
index 0000000..569bc8c
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_init.c
@@ -0,0 +1,52 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformInit(void)
+{
+ _glfwInitTimerPOSIX();
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformTerminate(void)
+{
+ _glfwTerminateOSMesa();
+}
+
+const char* _glfwPlatformGetVersionString(void)
+{
+ return _GLFW_VERSION_NUMBER " null OSMesa";
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.c
new file mode 100644
index 0000000..000faf2
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.c
@@ -0,0 +1,44 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
+{
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformUpdateGamepadGUID(char* guid)
+{
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.h
new file mode 100644
index 0000000..9307ae8
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_joystick.h
@@ -0,0 +1,31 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#define _GLFW_PLATFORM_JOYSTICK_STATE struct { int dummyJoystick; }
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; }
+
+#define _GLFW_PLATFORM_MAPPING_NAME ""
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_monitor.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_monitor.c
new file mode 100644
index 0000000..4514dae
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_monitor.c
@@ -0,0 +1,77 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)
+{
+}
+
+void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
+{
+}
+
+void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
+ float* xscale, float* yscale)
+{
+ if (xscale)
+ *xscale = 1.f;
+ if (yscale)
+ *yscale = 1.f;
+}
+
+void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
+ int* xpos, int* ypos,
+ int* width, int* height)
+{
+}
+
+GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
+{
+ return NULL;
+}
+
+void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
+{
+}
+
+GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
+{
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
+{
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_platform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_platform.h
new file mode 100644
index 0000000..708975d
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_platform.h
@@ -0,0 +1,62 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <dlfcn.h>
+
+#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNull null
+
+#define _GLFW_PLATFORM_CONTEXT_STATE struct { int dummyContext; }
+#define _GLFW_PLATFORM_MONITOR_STATE struct { int dummyMonitor; }
+#define _GLFW_PLATFORM_CURSOR_STATE struct { int dummyCursor; }
+#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE struct { int dummyLibraryWindow; }
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; }
+#define _GLFW_EGL_CONTEXT_STATE struct { int dummyEGLContext; }
+#define _GLFW_EGL_LIBRARY_CONTEXT_STATE struct { int dummyEGLLibraryContext; }
+
+#include "osmesa_context.h"
+#include "posix_time.h"
+#include "posix_thread.h"
+#include "null_joystick.h"
+
+#if defined(_GLFW_WIN32)
+ #define _glfw_dlopen(name) LoadLibraryA(name)
+ #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle)
+ #define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
+#else
+ #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
+ #define _glfw_dlclose(handle) dlclose(handle)
+ #define _glfw_dlsym(handle, name) dlsym(handle, name)
+#endif
+
+// Null-specific per-window data
+//
+typedef struct _GLFWwindowNull
+{
+ int width;
+ int height;
+} _GLFWwindowNull;
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_window.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_window.c
new file mode 100644
index 0000000..045c76a
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/null_window.c
@@ -0,0 +1,332 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+
+static int createNativeWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig)
+{
+ window->null.width = wndconfig->width;
+ window->null.height = wndconfig->height;
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformCreateWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ if (!createNativeWindow(window, wndconfig))
+ return GLFW_FALSE;
+
+ if (ctxconfig->client != GLFW_NO_API)
+ {
+ if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API ||
+ ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
+ {
+ if (!_glfwInitOSMesa())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "Null: EGL not available");
+ return GLFW_FALSE;
+ }
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyWindow(_GLFWwindow* window)
+{
+ if (window->context.destroy)
+ window->context.destroy(window);
+}
+
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
+{
+}
+
+void _glfwPlatformSetWindowIcon(_GLFWwindow* window, int count,
+ const GLFWimage* images)
+{
+}
+
+void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
+ _GLFWmonitor* monitor,
+ int xpos, int ypos,
+ int width, int height,
+ int refreshRate)
+{
+}
+
+void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
+{
+}
+
+void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
+{
+}
+
+void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
+{
+ if (width)
+ *width = window->null.width;
+ if (height)
+ *height = window->null.height;
+}
+
+void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
+{
+ window->null.width = width;
+ window->null.height = height;
+}
+
+void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight)
+{
+}
+
+void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int n, int d)
+{
+}
+
+void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
+{
+ if (width)
+ *width = window->null.width;
+ if (height)
+ *height = window->null.height;
+}
+
+void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
+ int* left, int* top,
+ int* right, int* bottom)
+{
+}
+
+void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
+ float* xscale, float* yscale)
+{
+ if (xscale)
+ *xscale = 1.f;
+ if (yscale)
+ *yscale = 1.f;
+}
+
+void _glfwPlatformIconifyWindow(_GLFWwindow* window)
+{
+}
+
+void _glfwPlatformRestoreWindow(_GLFWwindow* window)
+{
+}
+
+void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
+{
+}
+
+int _glfwPlatformWindowMaximized(_GLFWwindow* window)
+{
+ return GLFW_FALSE;
+}
+
+int _glfwPlatformWindowHovered(_GLFWwindow* window)
+{
+ return GLFW_FALSE;
+}
+
+int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
+{
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
+{
+}
+
+void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
+{
+}
+
+void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
+{
+}
+
+float _glfwPlatformGetWindowOpacity(_GLFWwindow* window)
+{
+ return 1.f;
+}
+
+void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
+{
+}
+
+void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
+{
+}
+
+GLFWbool _glfwPlatformRawMouseMotionSupported(void)
+{
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformShowWindow(_GLFWwindow* window)
+{
+}
+
+
+void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
+{
+}
+
+void _glfwPlatformUnhideWindow(_GLFWwindow* window)
+{
+}
+
+void _glfwPlatformHideWindow(_GLFWwindow* window)
+{
+}
+
+void _glfwPlatformFocusWindow(_GLFWwindow* window)
+{
+}
+
+int _glfwPlatformWindowFocused(_GLFWwindow* window)
+{
+ return GLFW_FALSE;
+}
+
+int _glfwPlatformWindowIconified(_GLFWwindow* window)
+{
+ return GLFW_FALSE;
+}
+
+int _glfwPlatformWindowVisible(_GLFWwindow* window)
+{
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformPollEvents(void)
+{
+}
+
+void _glfwPlatformWaitEvents(void)
+{
+}
+
+void _glfwPlatformWaitEventsTimeout(double timeout)
+{
+}
+
+void _glfwPlatformPostEmptyEvent(void)
+{
+}
+
+void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)
+{
+}
+
+void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
+{
+}
+
+void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
+{
+}
+
+int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
+ const GLFWimage* image,
+ int xhot, int yhot)
+{
+ return GLFW_TRUE;
+}
+
+int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
+{
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
+{
+}
+
+void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
+{
+}
+
+void _glfwPlatformSetClipboardString(const char* string)
+{
+}
+
+const char* _glfwPlatformGetClipboardString(void)
+{
+ return NULL;
+}
+
+const char* _glfwPlatformGetScancodeName(int scancode)
+{
+ return "";
+}
+
+int _glfwPlatformGetKeyScancode(int key)
+{
+ return -1;
+}
+
+void _glfwPlatformGetRequiredInstanceExtensions(char** extensions)
+{
+}
+
+int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily)
+{
+ return GLFW_FALSE;
+}
+
+VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
+ _GLFWwindow* window,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface)
+{
+ // This seems like the most appropriate error to return here
+ return VK_ERROR_INITIALIZATION_FAILED;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.c
new file mode 100644
index 0000000..f29f9cd
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.c
@@ -0,0 +1,384 @@
+//========================================================================
+// GLFW 3.3 OSMesa - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "internal.h"
+
+
+static void makeContextCurrentOSMesa(_GLFWwindow* window)
+{
+ if (window)
+ {
+ int width, height;
+ _glfwPlatformGetFramebufferSize(window, &width, &height);
+
+ // Check to see if we need to allocate a new buffer
+ if ((window->context.osmesa.buffer == NULL) ||
+ (width != window->context.osmesa.width) ||
+ (height != window->context.osmesa.height))
+ {
+ free(window->context.osmesa.buffer);
+
+ // Allocate the new buffer (width * height * 8-bit RGBA)
+ window->context.osmesa.buffer = calloc(4, (size_t) width * height);
+ window->context.osmesa.width = width;
+ window->context.osmesa.height = height;
+ }
+
+ if (!OSMesaMakeCurrent(window->context.osmesa.handle,
+ window->context.osmesa.buffer,
+ GL_UNSIGNED_BYTE,
+ width, height))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "OSMesa: Failed to make context current");
+ return;
+ }
+ }
+
+ _glfwPlatformSetTls(&_glfw.contextSlot, window);
+}
+
+static GLFWglproc getProcAddressOSMesa(const char* procname)
+{
+ return (GLFWglproc) OSMesaGetProcAddress(procname);
+}
+
+static void destroyContextOSMesa(_GLFWwindow* window)
+{
+ if (window->context.osmesa.handle)
+ {
+ OSMesaDestroyContext(window->context.osmesa.handle);
+ window->context.osmesa.handle = NULL;
+ }
+
+ if (window->context.osmesa.buffer)
+ {
+ free(window->context.osmesa.buffer);
+ window->context.osmesa.width = 0;
+ window->context.osmesa.height = 0;
+ }
+}
+
+static void swapBuffersOSMesa(_GLFWwindow* window)
+{
+ // No double buffering on OSMesa
+}
+
+static void swapIntervalOSMesa(int interval)
+{
+ // No swap interval on OSMesa
+}
+
+static int extensionSupportedOSMesa(const char* extension)
+{
+ // OSMesa does not have extensions
+ return GLFW_FALSE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWbool _glfwInitOSMesa(void)
+{
+ int i;
+ const char* sonames[] =
+ {
+#if defined(_GLFW_OSMESA_LIBRARY)
+ _GLFW_OSMESA_LIBRARY,
+#elif defined(_WIN32)
+ "libOSMesa.dll",
+ "OSMesa.dll",
+#elif defined(__APPLE__)
+ "libOSMesa.8.dylib",
+#elif defined(__CYGWIN__)
+ "libOSMesa-8.so",
+#else
+ "libOSMesa.so.8",
+ "libOSMesa.so.6",
+#endif
+ NULL
+ };
+
+ if (_glfw.osmesa.handle)
+ return GLFW_TRUE;
+
+ for (i = 0; sonames[i]; i++)
+ {
+ _glfw.osmesa.handle = _glfw_dlopen(sonames[i]);
+ if (_glfw.osmesa.handle)
+ break;
+ }
+
+ if (!_glfw.osmesa.handle)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE, "OSMesa: Library not found");
+ return GLFW_FALSE;
+ }
+
+ _glfw.osmesa.CreateContextExt = (PFN_OSMesaCreateContextExt)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaCreateContextExt");
+ _glfw.osmesa.CreateContextAttribs = (PFN_OSMesaCreateContextAttribs)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaCreateContextAttribs");
+ _glfw.osmesa.DestroyContext = (PFN_OSMesaDestroyContext)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaDestroyContext");
+ _glfw.osmesa.MakeCurrent = (PFN_OSMesaMakeCurrent)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaMakeCurrent");
+ _glfw.osmesa.GetColorBuffer = (PFN_OSMesaGetColorBuffer)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetColorBuffer");
+ _glfw.osmesa.GetDepthBuffer = (PFN_OSMesaGetDepthBuffer)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetDepthBuffer");
+ _glfw.osmesa.GetProcAddress = (PFN_OSMesaGetProcAddress)
+ _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetProcAddress");
+
+ if (!_glfw.osmesa.CreateContextExt ||
+ !_glfw.osmesa.DestroyContext ||
+ !_glfw.osmesa.MakeCurrent ||
+ !_glfw.osmesa.GetColorBuffer ||
+ !_glfw.osmesa.GetDepthBuffer ||
+ !_glfw.osmesa.GetProcAddress)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "OSMesa: Failed to load required entry points");
+
+ _glfwTerminateOSMesa();
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwTerminateOSMesa(void)
+{
+ if (_glfw.osmesa.handle)
+ {
+ _glfw_dlclose(_glfw.osmesa.handle);
+ _glfw.osmesa.handle = NULL;
+ }
+}
+
+#define setAttrib(a, v) \
+{ \
+ assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \
+ attribs[index++] = a; \
+ attribs[index++] = v; \
+}
+
+GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ OSMesaContext share = NULL;
+ const int accumBits = fbconfig->accumRedBits +
+ fbconfig->accumGreenBits +
+ fbconfig->accumBlueBits +
+ fbconfig->accumAlphaBits;
+
+ if (ctxconfig->client == GLFW_OPENGL_ES_API)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "OSMesa: OpenGL ES is not available on OSMesa");
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->share)
+ share = ctxconfig->share->context.osmesa.handle;
+
+ if (OSMesaCreateContextAttribs)
+ {
+ int index = 0, attribs[40];
+
+ setAttrib(OSMESA_FORMAT, OSMESA_RGBA);
+ setAttrib(OSMESA_DEPTH_BITS, fbconfig->depthBits);
+ setAttrib(OSMESA_STENCIL_BITS, fbconfig->stencilBits);
+ setAttrib(OSMESA_ACCUM_BITS, accumBits);
+
+ if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)
+ {
+ setAttrib(OSMESA_PROFILE, OSMESA_CORE_PROFILE);
+ }
+ else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)
+ {
+ setAttrib(OSMESA_PROFILE, OSMESA_COMPAT_PROFILE);
+ }
+
+ if (ctxconfig->major != 1 || ctxconfig->minor != 0)
+ {
+ setAttrib(OSMESA_CONTEXT_MAJOR_VERSION, ctxconfig->major);
+ setAttrib(OSMESA_CONTEXT_MINOR_VERSION, ctxconfig->minor);
+ }
+
+ if (ctxconfig->forward)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "OSMesa: Forward-compatible contexts not supported");
+ return GLFW_FALSE;
+ }
+
+ setAttrib(0, 0);
+
+ window->context.osmesa.handle =
+ OSMesaCreateContextAttribs(attribs, share);
+ }
+ else
+ {
+ if (ctxconfig->profile)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "OSMesa: OpenGL profiles unavailable");
+ return GLFW_FALSE;
+ }
+
+ window->context.osmesa.handle =
+ OSMesaCreateContextExt(OSMESA_RGBA,
+ fbconfig->depthBits,
+ fbconfig->stencilBits,
+ accumBits,
+ share);
+ }
+
+ if (window->context.osmesa.handle == NULL)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "OSMesa: Failed to create context");
+ return GLFW_FALSE;
+ }
+
+ window->context.makeCurrent = makeContextCurrentOSMesa;
+ window->context.swapBuffers = swapBuffersOSMesa;
+ window->context.swapInterval = swapIntervalOSMesa;
+ window->context.extensionSupported = extensionSupportedOSMesa;
+ window->context.getProcAddress = getProcAddressOSMesa;
+ window->context.destroy = destroyContextOSMesa;
+
+ return GLFW_TRUE;
+}
+
+#undef setAttrib
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* handle, int* width,
+ int* height, int* format, void** buffer)
+{
+ void* mesaBuffer;
+ GLint mesaWidth, mesaHeight, mesaFormat;
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ if (window->context.source != GLFW_OSMESA_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return GLFW_FALSE;
+ }
+
+ if (!OSMesaGetColorBuffer(window->context.osmesa.handle,
+ &mesaWidth, &mesaHeight,
+ &mesaFormat, &mesaBuffer))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "OSMesa: Failed to retrieve color buffer");
+ return GLFW_FALSE;
+ }
+
+ if (width)
+ *width = mesaWidth;
+ if (height)
+ *height = mesaHeight;
+ if (format)
+ *format = mesaFormat;
+ if (buffer)
+ *buffer = mesaBuffer;
+
+ return GLFW_TRUE;
+}
+
+GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* handle,
+ int* width, int* height,
+ int* bytesPerValue,
+ void** buffer)
+{
+ void* mesaBuffer;
+ GLint mesaWidth, mesaHeight, mesaBytes;
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ if (window->context.source != GLFW_OSMESA_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return GLFW_FALSE;
+ }
+
+ if (!OSMesaGetDepthBuffer(window->context.osmesa.handle,
+ &mesaWidth, &mesaHeight,
+ &mesaBytes, &mesaBuffer))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "OSMesa: Failed to retrieve depth buffer");
+ return GLFW_FALSE;
+ }
+
+ if (width)
+ *width = mesaWidth;
+ if (height)
+ *height = mesaHeight;
+ if (bytesPerValue)
+ *bytesPerValue = mesaBytes;
+ if (buffer)
+ *buffer = mesaBuffer;
+
+ return GLFW_TRUE;
+}
+
+GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (window->context.source != GLFW_OSMESA_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return NULL;
+ }
+
+ return window->context.osmesa.handle;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.h
new file mode 100644
index 0000000..6462637
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/osmesa_context.h
@@ -0,0 +1,92 @@
+//========================================================================
+// GLFW 3.3 OSMesa - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#define OSMESA_RGBA 0x1908
+#define OSMESA_FORMAT 0x22
+#define OSMESA_DEPTH_BITS 0x30
+#define OSMESA_STENCIL_BITS 0x31
+#define OSMESA_ACCUM_BITS 0x32
+#define OSMESA_PROFILE 0x33
+#define OSMESA_CORE_PROFILE 0x34
+#define OSMESA_COMPAT_PROFILE 0x35
+#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
+#define OSMESA_CONTEXT_MINOR_VERSION 0x37
+
+typedef void* OSMesaContext;
+typedef void (*OSMESAproc)(void);
+
+typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);
+typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);
+typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext);
+typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int);
+typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**);
+typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**);
+typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*);
+#define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt
+#define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs
+#define OSMesaDestroyContext _glfw.osmesa.DestroyContext
+#define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent
+#define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer
+#define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer
+#define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress
+
+#define _GLFW_OSMESA_CONTEXT_STATE _GLFWcontextOSMesa osmesa
+#define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE _GLFWlibraryOSMesa osmesa
+
+
+// OSMesa-specific per-context data
+//
+typedef struct _GLFWcontextOSMesa
+{
+ OSMesaContext handle;
+ int width;
+ int height;
+ void* buffer;
+} _GLFWcontextOSMesa;
+
+// OSMesa-specific global data
+//
+typedef struct _GLFWlibraryOSMesa
+{
+ void* handle;
+
+ PFN_OSMesaCreateContextExt CreateContextExt;
+ PFN_OSMesaCreateContextAttribs CreateContextAttribs;
+ PFN_OSMesaDestroyContext DestroyContext;
+ PFN_OSMesaMakeCurrent MakeCurrent;
+ PFN_OSMesaGetColorBuffer GetColorBuffer;
+ PFN_OSMesaGetDepthBuffer GetDepthBuffer;
+ PFN_OSMesaGetProcAddress GetProcAddress;
+} _GLFWlibraryOSMesa;
+
+
+GLFWbool _glfwInitOSMesa(void);
+void _glfwTerminateOSMesa(void);
+GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.c
new file mode 100644
index 0000000..f1697dc
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.c
@@ -0,0 +1,105 @@
+//========================================================================
+// GLFW 3.3 POSIX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <assert.h>
+#include <string.h>
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls)
+{
+ assert(tls->posix.allocated == GLFW_FALSE);
+
+ if (pthread_key_create(&tls->posix.key, NULL) != 0)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "POSIX: Failed to create context TLS");
+ return GLFW_FALSE;
+ }
+
+ tls->posix.allocated = GLFW_TRUE;
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyTls(_GLFWtls* tls)
+{
+ if (tls->posix.allocated)
+ pthread_key_delete(tls->posix.key);
+ memset(tls, 0, sizeof(_GLFWtls));
+}
+
+void* _glfwPlatformGetTls(_GLFWtls* tls)
+{
+ assert(tls->posix.allocated == GLFW_TRUE);
+ return pthread_getspecific(tls->posix.key);
+}
+
+void _glfwPlatformSetTls(_GLFWtls* tls, void* value)
+{
+ assert(tls->posix.allocated == GLFW_TRUE);
+ pthread_setspecific(tls->posix.key, value);
+}
+
+GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex)
+{
+ assert(mutex->posix.allocated == GLFW_FALSE);
+
+ if (pthread_mutex_init(&mutex->posix.handle, NULL) != 0)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "POSIX: Failed to create mutex");
+ return GLFW_FALSE;
+ }
+
+ return mutex->posix.allocated = GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyMutex(_GLFWmutex* mutex)
+{
+ if (mutex->posix.allocated)
+ pthread_mutex_destroy(&mutex->posix.handle);
+ memset(mutex, 0, sizeof(_GLFWmutex));
+}
+
+void _glfwPlatformLockMutex(_GLFWmutex* mutex)
+{
+ assert(mutex->posix.allocated == GLFW_TRUE);
+ pthread_mutex_lock(&mutex->posix.handle);
+}
+
+void _glfwPlatformUnlockMutex(_GLFWmutex* mutex)
+{
+ assert(mutex->posix.allocated == GLFW_TRUE);
+ pthread_mutex_unlock(&mutex->posix.handle);
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.h
new file mode 100644
index 0000000..1c6a5c4
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_thread.h
@@ -0,0 +1,49 @@
+//========================================================================
+// GLFW 3.3 POSIX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <pthread.h>
+
+#define _GLFW_PLATFORM_TLS_STATE _GLFWtlsPOSIX posix
+#define _GLFW_PLATFORM_MUTEX_STATE _GLFWmutexPOSIX posix
+
+
+// POSIX-specific thread local storage data
+//
+typedef struct _GLFWtlsPOSIX
+{
+ GLFWbool allocated;
+ pthread_key_t key;
+} _GLFWtlsPOSIX;
+
+// POSIX-specific mutex data
+//
+typedef struct _GLFWmutexPOSIX
+{
+ GLFWbool allocated;
+ pthread_mutex_t handle;
+} _GLFWmutexPOSIX;
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.c
new file mode 100644
index 0000000..040c8f1
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.c
@@ -0,0 +1,87 @@
+//========================================================================
+// GLFW 3.3 POSIX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <sys/time.h>
+#include <time.h>
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialise timer
+//
+void _glfwInitTimerPOSIX(void)
+{
+#if defined(CLOCK_MONOTONIC)
+ struct timespec ts;
+
+ if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
+ {
+ _glfw.timer.posix.monotonic = GLFW_TRUE;
+ _glfw.timer.posix.frequency = 1000000000;
+ }
+ else
+#endif
+ {
+ _glfw.timer.posix.monotonic = GLFW_FALSE;
+ _glfw.timer.posix.frequency = 1000000;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+uint64_t _glfwPlatformGetTimerValue(void)
+{
+#if defined(CLOCK_MONOTONIC)
+ if (_glfw.timer.posix.monotonic)
+ {
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return (uint64_t) ts.tv_sec * (uint64_t) 1000000000 + (uint64_t) ts.tv_nsec;
+ }
+ else
+#endif
+ {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (uint64_t) tv.tv_sec * (uint64_t) 1000000 + (uint64_t) tv.tv_usec;
+ }
+}
+
+uint64_t _glfwPlatformGetTimerFrequency(void)
+{
+ return _glfw.timer.posix.frequency;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.h
new file mode 100644
index 0000000..911399e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/posix_time.h
@@ -0,0 +1,43 @@
+//========================================================================
+// GLFW 3.3 POSIX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix
+
+#include <stdint.h>
+
+
+// POSIX-specific global timer data
+//
+typedef struct _GLFWtimerPOSIX
+{
+ GLFWbool monotonic;
+ uint64_t frequency;
+} _GLFWtimerPOSIX;
+
+
+void _glfwInitTimerPOSIX(void);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/vulkan.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/vulkan.c
new file mode 100644
index 0000000..22c54e4
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/vulkan.c
@@ -0,0 +1,332 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define _GLFW_FIND_LOADER 1
+#define _GLFW_REQUIRE_LOADER 2
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWbool _glfwInitVulkan(int mode)
+{
+ VkResult err;
+ VkExtensionProperties* ep;
+ uint32_t i, count;
+
+ if (_glfw.vk.available)
+ return GLFW_TRUE;
+
+#if !defined(_GLFW_VULKAN_STATIC)
+#if defined(_GLFW_VULKAN_LIBRARY)
+ _glfw.vk.handle = _glfw_dlopen(_GLFW_VULKAN_LIBRARY);
+#elif defined(_GLFW_WIN32)
+ _glfw.vk.handle = _glfw_dlopen("vulkan-1.dll");
+#elif defined(_GLFW_COCOA)
+ _glfw.vk.handle = _glfw_dlopen("libvulkan.1.dylib");
+ if (!_glfw.vk.handle)
+ _glfw.vk.handle = _glfwLoadLocalVulkanLoaderNS();
+#else
+ _glfw.vk.handle = _glfw_dlopen("libvulkan.so.1");
+#endif
+ if (!_glfw.vk.handle)
+ {
+ if (mode == _GLFW_REQUIRE_LOADER)
+ _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Loader not found");
+
+ return GLFW_FALSE;
+ }
+
+ _glfw.vk.GetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)
+ _glfw_dlsym(_glfw.vk.handle, "vkGetInstanceProcAddr");
+ if (!_glfw.vk.GetInstanceProcAddr)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Vulkan: Loader does not export vkGetInstanceProcAddr");
+
+ _glfwTerminateVulkan();
+ return GLFW_FALSE;
+ }
+
+ _glfw.vk.EnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties)
+ vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceExtensionProperties");
+ if (!_glfw.vk.EnumerateInstanceExtensionProperties)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties");
+
+ _glfwTerminateVulkan();
+ return GLFW_FALSE;
+ }
+#endif // _GLFW_VULKAN_STATIC
+
+ err = vkEnumerateInstanceExtensionProperties(NULL, &count, NULL);
+ if (err)
+ {
+ // NOTE: This happens on systems with a loader but without any Vulkan ICD
+ if (mode == _GLFW_REQUIRE_LOADER)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Vulkan: Failed to query instance extension count: %s",
+ _glfwGetVulkanResultString(err));
+ }
+
+ _glfwTerminateVulkan();
+ return GLFW_FALSE;
+ }
+
+ ep = calloc(count, sizeof(VkExtensionProperties));
+
+ err = vkEnumerateInstanceExtensionProperties(NULL, &count, ep);
+ if (err)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Vulkan: Failed to query instance extensions: %s",
+ _glfwGetVulkanResultString(err));
+
+ free(ep);
+ _glfwTerminateVulkan();
+ return GLFW_FALSE;
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ if (strcmp(ep[i].extensionName, "VK_KHR_surface") == 0)
+ _glfw.vk.KHR_surface = GLFW_TRUE;
+#if defined(_GLFW_WIN32)
+ else if (strcmp(ep[i].extensionName, "VK_KHR_win32_surface") == 0)
+ _glfw.vk.KHR_win32_surface = GLFW_TRUE;
+#elif defined(_GLFW_COCOA)
+ else if (strcmp(ep[i].extensionName, "VK_MVK_macos_surface") == 0)
+ _glfw.vk.MVK_macos_surface = GLFW_TRUE;
+ else if (strcmp(ep[i].extensionName, "VK_EXT_metal_surface") == 0)
+ _glfw.vk.EXT_metal_surface = GLFW_TRUE;
+#elif defined(_GLFW_X11)
+ else if (strcmp(ep[i].extensionName, "VK_KHR_xlib_surface") == 0)
+ _glfw.vk.KHR_xlib_surface = GLFW_TRUE;
+ else if (strcmp(ep[i].extensionName, "VK_KHR_xcb_surface") == 0)
+ _glfw.vk.KHR_xcb_surface = GLFW_TRUE;
+#elif defined(_GLFW_WAYLAND)
+ else if (strcmp(ep[i].extensionName, "VK_KHR_wayland_surface") == 0)
+ _glfw.vk.KHR_wayland_surface = GLFW_TRUE;
+#endif
+ }
+
+ free(ep);
+
+ _glfw.vk.available = GLFW_TRUE;
+
+ _glfwPlatformGetRequiredInstanceExtensions(_glfw.vk.extensions);
+
+ return GLFW_TRUE;
+}
+
+void _glfwTerminateVulkan(void)
+{
+#if !defined(_GLFW_VULKAN_STATIC)
+ if (_glfw.vk.handle)
+ _glfw_dlclose(_glfw.vk.handle);
+#endif
+}
+
+const char* _glfwGetVulkanResultString(VkResult result)
+{
+ switch (result)
+ {
+ case VK_SUCCESS:
+ return "Success";
+ case VK_NOT_READY:
+ return "A fence or query has not yet completed";
+ case VK_TIMEOUT:
+ return "A wait operation has not completed in the specified time";
+ case VK_EVENT_SET:
+ return "An event is signaled";
+ case VK_EVENT_RESET:
+ return "An event is unsignaled";
+ case VK_INCOMPLETE:
+ return "A return array was too small for the result";
+ case VK_ERROR_OUT_OF_HOST_MEMORY:
+ return "A host memory allocation has failed";
+ case VK_ERROR_OUT_OF_DEVICE_MEMORY:
+ return "A device memory allocation has failed";
+ case VK_ERROR_INITIALIZATION_FAILED:
+ return "Initialization of an object could not be completed for implementation-specific reasons";
+ case VK_ERROR_DEVICE_LOST:
+ return "The logical or physical device has been lost";
+ case VK_ERROR_MEMORY_MAP_FAILED:
+ return "Mapping of a memory object has failed";
+ case VK_ERROR_LAYER_NOT_PRESENT:
+ return "A requested layer is not present or could not be loaded";
+ case VK_ERROR_EXTENSION_NOT_PRESENT:
+ return "A requested extension is not supported";
+ case VK_ERROR_FEATURE_NOT_PRESENT:
+ return "A requested feature is not supported";
+ case VK_ERROR_INCOMPATIBLE_DRIVER:
+ return "The requested version of Vulkan is not supported by the driver or is otherwise incompatible";
+ case VK_ERROR_TOO_MANY_OBJECTS:
+ return "Too many objects of the type have already been created";
+ case VK_ERROR_FORMAT_NOT_SUPPORTED:
+ return "A requested format is not supported on this device";
+ case VK_ERROR_SURFACE_LOST_KHR:
+ return "A surface is no longer available";
+ case VK_SUBOPTIMAL_KHR:
+ return "A swapchain no longer matches the surface properties exactly, but can still be used";
+ case VK_ERROR_OUT_OF_DATE_KHR:
+ return "A surface has changed in such a way that it is no longer compatible with the swapchain";
+ case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR:
+ return "The display used by a swapchain does not use the same presentable image layout";
+ case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR:
+ return "The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API";
+ case VK_ERROR_VALIDATION_FAILED_EXT:
+ return "A validation layer found an error";
+ default:
+ return "ERROR: UNKNOWN VULKAN ERROR";
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW public API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI int glfwVulkanSupported(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+ return _glfwInitVulkan(_GLFW_FIND_LOADER);
+}
+
+GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count)
+{
+ assert(count != NULL);
+
+ *count = 0;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))
+ return NULL;
+
+ if (!_glfw.vk.extensions[0])
+ return NULL;
+
+ *count = 2;
+ return (const char**) _glfw.vk.extensions;
+}
+
+GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance,
+ const char* procname)
+{
+ GLFWvkproc proc;
+ assert(procname != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))
+ return NULL;
+
+ proc = (GLFWvkproc) vkGetInstanceProcAddr(instance, procname);
+#if defined(_GLFW_VULKAN_STATIC)
+ if (!proc)
+ {
+ if (strcmp(procname, "vkGetInstanceProcAddr") == 0)
+ return (GLFWvkproc) vkGetInstanceProcAddr;
+ }
+#else
+ if (!proc)
+ proc = (GLFWvkproc) _glfw_dlsym(_glfw.vk.handle, procname);
+#endif
+
+ return proc;
+}
+
+GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily)
+{
+ assert(instance != VK_NULL_HANDLE);
+ assert(device != VK_NULL_HANDLE);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
+
+ if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))
+ return GLFW_FALSE;
+
+ if (!_glfw.vk.extensions[0])
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Vulkan: Window surface creation extensions not found");
+ return GLFW_FALSE;
+ }
+
+ return _glfwPlatformGetPhysicalDevicePresentationSupport(instance,
+ device,
+ queuefamily);
+}
+
+GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance,
+ GLFWwindow* handle,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(instance != VK_NULL_HANDLE);
+ assert(window != NULL);
+ assert(surface != NULL);
+
+ *surface = VK_NULL_HANDLE;
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(VK_ERROR_INITIALIZATION_FAILED);
+
+ if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))
+ return VK_ERROR_INITIALIZATION_FAILED;
+
+ if (!_glfw.vk.extensions[0])
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Vulkan: Window surface creation extensions not found");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ if (window->context.client != GLFW_NO_API)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Vulkan: Window surface creation requires the window to have the client API set to GLFW_NO_API");
+ return VK_ERROR_NATIVE_WINDOW_IN_USE_KHR;
+ }
+
+ return _glfwPlatformCreateWindowSurface(instance, window, allocator, surface);
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c
new file mode 100644
index 0000000..6a70a81
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c
@@ -0,0 +1,68 @@
+/* Generated by wayland-scanner */
+
+/*
+ * Copyright © 2015 Samsung Electronics Co., Ltd
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
+
+static const struct wl_interface *idle_inhibit_unstable_v1_types[] = {
+ &zwp_idle_inhibitor_v1_interface,
+ &wl_surface_interface,
+};
+
+static const struct wl_message zwp_idle_inhibit_manager_v1_requests[] = {
+ { "destroy", "", idle_inhibit_unstable_v1_types + 0 },
+ { "create_inhibitor", "no", idle_inhibit_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_idle_inhibit_manager_v1_interface = {
+ "zwp_idle_inhibit_manager_v1", 1,
+ 2, zwp_idle_inhibit_manager_v1_requests,
+ 0, NULL,
+};
+
+static const struct wl_message zwp_idle_inhibitor_v1_requests[] = {
+ { "destroy", "", idle_inhibit_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_idle_inhibitor_v1_interface = {
+ "zwp_idle_inhibitor_v1", 1,
+ 1, zwp_idle_inhibitor_v1_requests,
+ 0, NULL,
+};
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.h
new file mode 100644
index 0000000..1ecebf4
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.h
@@ -0,0 +1,236 @@
+/* Generated by wayland-scanner */
+
+#ifndef IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
+#define IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_idle_inhibit_unstable_v1 The idle_inhibit_unstable_v1 protocol
+ * @section page_ifaces_idle_inhibit_unstable_v1 Interfaces
+ * - @subpage page_iface_zwp_idle_inhibit_manager_v1 - control behavior when display idles
+ * - @subpage page_iface_zwp_idle_inhibitor_v1 - context object for inhibiting idle behavior
+ * @section page_copyright_idle_inhibit_unstable_v1 Copyright
+ * <pre>
+ *
+ * Copyright © 2015 Samsung Electronics Co., Ltd
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * </pre>
+ */
+struct wl_surface;
+struct zwp_idle_inhibit_manager_v1;
+struct zwp_idle_inhibitor_v1;
+
+#ifndef ZWP_IDLE_INHIBIT_MANAGER_V1_INTERFACE
+#define ZWP_IDLE_INHIBIT_MANAGER_V1_INTERFACE
+/**
+ * @page page_iface_zwp_idle_inhibit_manager_v1 zwp_idle_inhibit_manager_v1
+ * @section page_iface_zwp_idle_inhibit_manager_v1_desc Description
+ *
+ * This interface permits inhibiting the idle behavior such as screen
+ * blanking, locking, and screensaving. The client binds the idle manager
+ * globally, then creates idle-inhibitor objects for each surface.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding interface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and interface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ * @section page_iface_zwp_idle_inhibit_manager_v1_api API
+ * See @ref iface_zwp_idle_inhibit_manager_v1.
+ */
+/**
+ * @defgroup iface_zwp_idle_inhibit_manager_v1 The zwp_idle_inhibit_manager_v1 interface
+ *
+ * This interface permits inhibiting the idle behavior such as screen
+ * blanking, locking, and screensaving. The client binds the idle manager
+ * globally, then creates idle-inhibitor objects for each surface.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding interface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and interface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ */
+extern const struct wl_interface zwp_idle_inhibit_manager_v1_interface;
+#endif
+#ifndef ZWP_IDLE_INHIBITOR_V1_INTERFACE
+#define ZWP_IDLE_INHIBITOR_V1_INTERFACE
+/**
+ * @page page_iface_zwp_idle_inhibitor_v1 zwp_idle_inhibitor_v1
+ * @section page_iface_zwp_idle_inhibitor_v1_desc Description
+ *
+ * An idle inhibitor prevents the output that the associated surface is
+ * visible on from being set to a state where it is not visually usable due
+ * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
+ * save, etc.) Any screensaver processes are also blocked from displaying.
+ *
+ * If the surface is destroyed, unmapped, becomes occluded, loses
+ * visibility, or otherwise becomes not visually relevant for the user, the
+ * idle inhibitor will not be honored by the compositor; if the surface
+ * subsequently regains visibility the inhibitor takes effect once again.
+ * Likewise, the inhibitor isn't honored if the system was already idled at
+ * the time the inhibitor was established, although if the system later
+ * de-idles and re-idles the inhibitor will take effect.
+ * @section page_iface_zwp_idle_inhibitor_v1_api API
+ * See @ref iface_zwp_idle_inhibitor_v1.
+ */
+/**
+ * @defgroup iface_zwp_idle_inhibitor_v1 The zwp_idle_inhibitor_v1 interface
+ *
+ * An idle inhibitor prevents the output that the associated surface is
+ * visible on from being set to a state where it is not visually usable due
+ * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
+ * save, etc.) Any screensaver processes are also blocked from displaying.
+ *
+ * If the surface is destroyed, unmapped, becomes occluded, loses
+ * visibility, or otherwise becomes not visually relevant for the user, the
+ * idle inhibitor will not be honored by the compositor; if the surface
+ * subsequently regains visibility the inhibitor takes effect once again.
+ * Likewise, the inhibitor isn't honored if the system was already idled at
+ * the time the inhibitor was established, although if the system later
+ * de-idles and re-idles the inhibitor will take effect.
+ */
+extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
+#endif
+
+#define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY 0
+#define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR 1
+
+
+/**
+ * @ingroup iface_zwp_idle_inhibit_manager_v1
+ */
+#define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_idle_inhibit_manager_v1
+ */
+#define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_idle_inhibit_manager_v1 */
+static inline void
+zwp_idle_inhibit_manager_v1_set_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1, user_data);
+}
+
+/** @ingroup iface_zwp_idle_inhibit_manager_v1 */
+static inline void *
+zwp_idle_inhibit_manager_v1_get_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
+}
+
+static inline uint32_t
+zwp_idle_inhibit_manager_v1_get_version(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
+}
+
+/**
+ * @ingroup iface_zwp_idle_inhibit_manager_v1
+ *
+ * Destroy the inhibit manager.
+ */
+static inline void
+zwp_idle_inhibit_manager_v1_destroy(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
+ ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
+}
+
+/**
+ * @ingroup iface_zwp_idle_inhibit_manager_v1
+ *
+ * Create a new inhibitor object associated with the given surface.
+ */
+static inline struct zwp_idle_inhibitor_v1 *
+zwp_idle_inhibit_manager_v1_create_inhibitor(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, struct wl_surface *surface)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
+ ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR, &zwp_idle_inhibitor_v1_interface, NULL, surface);
+
+ return (struct zwp_idle_inhibitor_v1 *) id;
+}
+
+#define ZWP_IDLE_INHIBITOR_V1_DESTROY 0
+
+
+/**
+ * @ingroup iface_zwp_idle_inhibitor_v1
+ */
+#define ZWP_IDLE_INHIBITOR_V1_DESTROY_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_idle_inhibitor_v1 */
+static inline void
+zwp_idle_inhibitor_v1_set_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1, user_data);
+}
+
+/** @ingroup iface_zwp_idle_inhibitor_v1 */
+static inline void *
+zwp_idle_inhibitor_v1_get_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1);
+}
+
+static inline uint32_t
+zwp_idle_inhibitor_v1_get_version(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibitor_v1);
+}
+
+/**
+ * @ingroup iface_zwp_idle_inhibitor_v1
+ *
+ * Remove the inhibitor effect from the associated wl_surface.
+ */
+static inline void
+zwp_idle_inhibitor_v1_destroy(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_idle_inhibitor_v1,
+ ZWP_IDLE_INHIBITOR_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_idle_inhibitor_v1);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c
new file mode 100644
index 0000000..f97c52e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c
@@ -0,0 +1,108 @@
+/* Generated by wayland-scanner */
+
+/*
+ * Copyright © 2014 Jonas Ådahl
+ * Copyright © 2015 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_pointer_interface;
+extern const struct wl_interface wl_region_interface;
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface zwp_confined_pointer_v1_interface;
+extern const struct wl_interface zwp_locked_pointer_v1_interface;
+
+static const struct wl_interface *pointer_constraints_unstable_v1_types[] = {
+ NULL,
+ NULL,
+ &zwp_locked_pointer_v1_interface,
+ &wl_surface_interface,
+ &wl_pointer_interface,
+ &wl_region_interface,
+ NULL,
+ &zwp_confined_pointer_v1_interface,
+ &wl_surface_interface,
+ &wl_pointer_interface,
+ &wl_region_interface,
+ NULL,
+ &wl_region_interface,
+ &wl_region_interface,
+};
+
+static const struct wl_message zwp_pointer_constraints_v1_requests[] = {
+ { "destroy", "", pointer_constraints_unstable_v1_types + 0 },
+ { "lock_pointer", "noo?ou", pointer_constraints_unstable_v1_types + 2 },
+ { "confine_pointer", "noo?ou", pointer_constraints_unstable_v1_types + 7 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_pointer_constraints_v1_interface = {
+ "zwp_pointer_constraints_v1", 1,
+ 3, zwp_pointer_constraints_v1_requests,
+ 0, NULL,
+};
+
+static const struct wl_message zwp_locked_pointer_v1_requests[] = {
+ { "destroy", "", pointer_constraints_unstable_v1_types + 0 },
+ { "set_cursor_position_hint", "ff", pointer_constraints_unstable_v1_types + 0 },
+ { "set_region", "?o", pointer_constraints_unstable_v1_types + 12 },
+};
+
+static const struct wl_message zwp_locked_pointer_v1_events[] = {
+ { "locked", "", pointer_constraints_unstable_v1_types + 0 },
+ { "unlocked", "", pointer_constraints_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_locked_pointer_v1_interface = {
+ "zwp_locked_pointer_v1", 1,
+ 3, zwp_locked_pointer_v1_requests,
+ 2, zwp_locked_pointer_v1_events,
+};
+
+static const struct wl_message zwp_confined_pointer_v1_requests[] = {
+ { "destroy", "", pointer_constraints_unstable_v1_types + 0 },
+ { "set_region", "?o", pointer_constraints_unstable_v1_types + 13 },
+};
+
+static const struct wl_message zwp_confined_pointer_v1_events[] = {
+ { "confined", "", pointer_constraints_unstable_v1_types + 0 },
+ { "unconfined", "", pointer_constraints_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_confined_pointer_v1_interface = {
+ "zwp_confined_pointer_v1", 1,
+ 2, zwp_confined_pointer_v1_requests,
+ 2, zwp_confined_pointer_v1_events,
+};
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.h
new file mode 100644
index 0000000..430ccb2
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.h
@@ -0,0 +1,658 @@
+/* Generated by wayland-scanner */
+
+#ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_CLIENT_PROTOCOL_H
+#define POINTER_CONSTRAINTS_UNSTABLE_V1_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_pointer_constraints_unstable_v1 The pointer_constraints_unstable_v1 protocol
+ * protocol for constraining pointer motions
+ *
+ * @section page_desc_pointer_constraints_unstable_v1 Description
+ *
+ * This protocol specifies a set of interfaces used for adding constraints to
+ * the motion of a pointer. Possible constraints include confining pointer
+ * motions to a given region, or locking it to its current position.
+ *
+ * In order to constrain the pointer, a client must first bind the global
+ * interface "wp_pointer_constraints" which, if a compositor supports pointer
+ * constraints, is exposed by the registry. Using the bound global object, the
+ * client uses the request that corresponds to the type of constraint it wants
+ * to make. See wp_pointer_constraints for more details.
+ *
+ * Warning! The protocol described in this file is experimental and backward
+ * incompatible changes may be made. Backward compatible changes may be added
+ * together with the corresponding interface version bump. Backward
+ * incompatible changes are done by bumping the version number in the protocol
+ * and interface names and resetting the interface version. Once the protocol
+ * is to be declared stable, the 'z' prefix and the version number in the
+ * protocol and interface names are removed and the interface version number is
+ * reset.
+ *
+ * @section page_ifaces_pointer_constraints_unstable_v1 Interfaces
+ * - @subpage page_iface_zwp_pointer_constraints_v1 - constrain the movement of a pointer
+ * - @subpage page_iface_zwp_locked_pointer_v1 - receive relative pointer motion events
+ * - @subpage page_iface_zwp_confined_pointer_v1 - confined pointer object
+ * @section page_copyright_pointer_constraints_unstable_v1 Copyright
+ * <pre>
+ *
+ * Copyright © 2014 Jonas Ådahl
+ * Copyright © 2015 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * </pre>
+ */
+struct wl_pointer;
+struct wl_region;
+struct wl_surface;
+struct zwp_confined_pointer_v1;
+struct zwp_locked_pointer_v1;
+struct zwp_pointer_constraints_v1;
+
+#ifndef ZWP_POINTER_CONSTRAINTS_V1_INTERFACE
+#define ZWP_POINTER_CONSTRAINTS_V1_INTERFACE
+/**
+ * @page page_iface_zwp_pointer_constraints_v1 zwp_pointer_constraints_v1
+ * @section page_iface_zwp_pointer_constraints_v1_desc Description
+ *
+ * The global interface exposing pointer constraining functionality. It
+ * exposes two requests: lock_pointer for locking the pointer to its
+ * position, and confine_pointer for locking the pointer to a region.
+ *
+ * The lock_pointer and confine_pointer requests create the objects
+ * wp_locked_pointer and wp_confined_pointer respectively, and the client can
+ * use these objects to interact with the lock.
+ *
+ * For any surface, only one lock or confinement may be active across all
+ * wl_pointer objects of the same seat. If a lock or confinement is requested
+ * when another lock or confinement is active or requested on the same surface
+ * and with any of the wl_pointer objects of the same seat, an
+ * 'already_constrained' error will be raised.
+ * @section page_iface_zwp_pointer_constraints_v1_api API
+ * See @ref iface_zwp_pointer_constraints_v1.
+ */
+/**
+ * @defgroup iface_zwp_pointer_constraints_v1 The zwp_pointer_constraints_v1 interface
+ *
+ * The global interface exposing pointer constraining functionality. It
+ * exposes two requests: lock_pointer for locking the pointer to its
+ * position, and confine_pointer for locking the pointer to a region.
+ *
+ * The lock_pointer and confine_pointer requests create the objects
+ * wp_locked_pointer and wp_confined_pointer respectively, and the client can
+ * use these objects to interact with the lock.
+ *
+ * For any surface, only one lock or confinement may be active across all
+ * wl_pointer objects of the same seat. If a lock or confinement is requested
+ * when another lock or confinement is active or requested on the same surface
+ * and with any of the wl_pointer objects of the same seat, an
+ * 'already_constrained' error will be raised.
+ */
+extern const struct wl_interface zwp_pointer_constraints_v1_interface;
+#endif
+#ifndef ZWP_LOCKED_POINTER_V1_INTERFACE
+#define ZWP_LOCKED_POINTER_V1_INTERFACE
+/**
+ * @page page_iface_zwp_locked_pointer_v1 zwp_locked_pointer_v1
+ * @section page_iface_zwp_locked_pointer_v1_desc Description
+ *
+ * The wp_locked_pointer interface represents a locked pointer state.
+ *
+ * While the lock of this object is active, the wl_pointer objects of the
+ * associated seat will not emit any wl_pointer.motion events.
+ *
+ * This object will send the event 'locked' when the lock is activated.
+ * Whenever the lock is activated, it is guaranteed that the locked surface
+ * will already have received pointer focus and that the pointer will be
+ * within the region passed to the request creating this object.
+ *
+ * To unlock the pointer, send the destroy request. This will also destroy
+ * the wp_locked_pointer object.
+ *
+ * If the compositor decides to unlock the pointer the unlocked event is
+ * sent. See wp_locked_pointer.unlock for details.
+ *
+ * When unlocking, the compositor may warp the cursor position to the set
+ * cursor position hint. If it does, it will not result in any relative
+ * motion events emitted via wp_relative_pointer.
+ *
+ * If the surface the lock was requested on is destroyed and the lock is not
+ * yet activated, the wp_locked_pointer object is now defunct and must be
+ * destroyed.
+ * @section page_iface_zwp_locked_pointer_v1_api API
+ * See @ref iface_zwp_locked_pointer_v1.
+ */
+/**
+ * @defgroup iface_zwp_locked_pointer_v1 The zwp_locked_pointer_v1 interface
+ *
+ * The wp_locked_pointer interface represents a locked pointer state.
+ *
+ * While the lock of this object is active, the wl_pointer objects of the
+ * associated seat will not emit any wl_pointer.motion events.
+ *
+ * This object will send the event 'locked' when the lock is activated.
+ * Whenever the lock is activated, it is guaranteed that the locked surface
+ * will already have received pointer focus and that the pointer will be
+ * within the region passed to the request creating this object.
+ *
+ * To unlock the pointer, send the destroy request. This will also destroy
+ * the wp_locked_pointer object.
+ *
+ * If the compositor decides to unlock the pointer the unlocked event is
+ * sent. See wp_locked_pointer.unlock for details.
+ *
+ * When unlocking, the compositor may warp the cursor position to the set
+ * cursor position hint. If it does, it will not result in any relative
+ * motion events emitted via wp_relative_pointer.
+ *
+ * If the surface the lock was requested on is destroyed and the lock is not
+ * yet activated, the wp_locked_pointer object is now defunct and must be
+ * destroyed.
+ */
+extern const struct wl_interface zwp_locked_pointer_v1_interface;
+#endif
+#ifndef ZWP_CONFINED_POINTER_V1_INTERFACE
+#define ZWP_CONFINED_POINTER_V1_INTERFACE
+/**
+ * @page page_iface_zwp_confined_pointer_v1 zwp_confined_pointer_v1
+ * @section page_iface_zwp_confined_pointer_v1_desc Description
+ *
+ * The wp_confined_pointer interface represents a confined pointer state.
+ *
+ * This object will send the event 'confined' when the confinement is
+ * activated. Whenever the confinement is activated, it is guaranteed that
+ * the surface the pointer is confined to will already have received pointer
+ * focus and that the pointer will be within the region passed to the request
+ * creating this object. It is up to the compositor to decide whether this
+ * requires some user interaction and if the pointer will warp to within the
+ * passed region if outside.
+ *
+ * To unconfine the pointer, send the destroy request. This will also destroy
+ * the wp_confined_pointer object.
+ *
+ * If the compositor decides to unconfine the pointer the unconfined event is
+ * sent. The wp_confined_pointer object is at this point defunct and should
+ * be destroyed.
+ * @section page_iface_zwp_confined_pointer_v1_api API
+ * See @ref iface_zwp_confined_pointer_v1.
+ */
+/**
+ * @defgroup iface_zwp_confined_pointer_v1 The zwp_confined_pointer_v1 interface
+ *
+ * The wp_confined_pointer interface represents a confined pointer state.
+ *
+ * This object will send the event 'confined' when the confinement is
+ * activated. Whenever the confinement is activated, it is guaranteed that
+ * the surface the pointer is confined to will already have received pointer
+ * focus and that the pointer will be within the region passed to the request
+ * creating this object. It is up to the compositor to decide whether this
+ * requires some user interaction and if the pointer will warp to within the
+ * passed region if outside.
+ *
+ * To unconfine the pointer, send the destroy request. This will also destroy
+ * the wp_confined_pointer object.
+ *
+ * If the compositor decides to unconfine the pointer the unconfined event is
+ * sent. The wp_confined_pointer object is at this point defunct and should
+ * be destroyed.
+ */
+extern const struct wl_interface zwp_confined_pointer_v1_interface;
+#endif
+
+#ifndef ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
+#define ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ * wp_pointer_constraints error values
+ *
+ * These errors can be emitted in response to wp_pointer_constraints
+ * requests.
+ */
+enum zwp_pointer_constraints_v1_error {
+ /**
+ * pointer constraint already requested on that surface
+ */
+ ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED = 1,
+};
+#endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM */
+
+#ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
+#define ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ * the pointer constraint may reactivate
+ *
+ * A persistent pointer constraint may again reactivate once it has
+ * been deactivated. See the corresponding deactivation event
+ * (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
+ * details.
+ */
+enum zwp_pointer_constraints_v1_lifetime {
+ ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT = 1,
+ ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT = 2,
+};
+#endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM */
+
+#define ZWP_POINTER_CONSTRAINTS_V1_DESTROY 0
+#define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER 1
+#define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER 2
+
+
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ */
+#define ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ */
+#define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ */
+#define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_pointer_constraints_v1 */
+static inline void
+zwp_pointer_constraints_v1_set_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_constraints_v1, user_data);
+}
+
+/** @ingroup iface_zwp_pointer_constraints_v1 */
+static inline void *
+zwp_pointer_constraints_v1_get_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_constraints_v1);
+}
+
+static inline uint32_t
+zwp_pointer_constraints_v1_get_version(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_constraints_v1);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ *
+ * Used by the client to notify the server that it will no longer use this
+ * pointer constraints object.
+ */
+static inline void
+zwp_pointer_constraints_v1_destroy(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_pointer_constraints_v1,
+ ZWP_POINTER_CONSTRAINTS_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_pointer_constraints_v1);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ *
+ * The lock_pointer request lets the client request to disable movements of
+ * the virtual pointer (i.e. the cursor), effectively locking the pointer
+ * to a position. This request may not take effect immediately; in the
+ * future, when the compositor deems implementation-specific constraints
+ * are satisfied, the pointer lock will be activated and the compositor
+ * sends a locked event.
+ *
+ * The protocol provides no guarantee that the constraints are ever
+ * satisfied, and does not require the compositor to send an error if the
+ * constraints cannot ever be satisfied. It is thus possible to request a
+ * lock that will never activate.
+ *
+ * There may not be another pointer constraint of any kind requested or
+ * active on the surface for any of the wl_pointer objects of the seat of
+ * the passed pointer when requesting a lock. If there is, an error will be
+ * raised. See general pointer lock documentation for more details.
+ *
+ * The intersection of the region passed with this request and the input
+ * region of the surface is used to determine where the pointer must be
+ * in order for the lock to activate. It is up to the compositor whether to
+ * warp the pointer or require some kind of user interaction for the lock
+ * to activate. If the region is null the surface input region is used.
+ *
+ * A surface may receive pointer focus without the lock being activated.
+ *
+ * The request creates a new object wp_locked_pointer which is used to
+ * interact with the lock as well as receive updates about its state. See
+ * the the description of wp_locked_pointer for further information.
+ *
+ * Note that while a pointer is locked, the wl_pointer objects of the
+ * corresponding seat will not emit any wl_pointer.motion events, but
+ * relative motion events will still be emitted via wp_relative_pointer
+ * objects of the same seat. wl_pointer.axis and wl_pointer.button events
+ * are unaffected.
+ */
+static inline struct zwp_locked_pointer_v1 *
+zwp_pointer_constraints_v1_lock_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_constraints_v1,
+ ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER, &zwp_locked_pointer_v1_interface, NULL, surface, pointer, region, lifetime);
+
+ return (struct zwp_locked_pointer_v1 *) id;
+}
+
+/**
+ * @ingroup iface_zwp_pointer_constraints_v1
+ *
+ * The confine_pointer request lets the client request to confine the
+ * pointer cursor to a given region. This request may not take effect
+ * immediately; in the future, when the compositor deems implementation-
+ * specific constraints are satisfied, the pointer confinement will be
+ * activated and the compositor sends a confined event.
+ *
+ * The intersection of the region passed with this request and the input
+ * region of the surface is used to determine where the pointer must be
+ * in order for the confinement to activate. It is up to the compositor
+ * whether to warp the pointer or require some kind of user interaction for
+ * the confinement to activate. If the region is null the surface input
+ * region is used.
+ *
+ * The request will create a new object wp_confined_pointer which is used
+ * to interact with the confinement as well as receive updates about its
+ * state. See the the description of wp_confined_pointer for further
+ * information.
+ */
+static inline struct zwp_confined_pointer_v1 *
+zwp_pointer_constraints_v1_confine_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_constraints_v1,
+ ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER, &zwp_confined_pointer_v1_interface, NULL, surface, pointer, region, lifetime);
+
+ return (struct zwp_confined_pointer_v1 *) id;
+}
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ * @struct zwp_locked_pointer_v1_listener
+ */
+struct zwp_locked_pointer_v1_listener {
+ /**
+ * lock activation event
+ *
+ * Notification that the pointer lock of the seat's pointer is
+ * activated.
+ */
+ void (*locked)(void *data,
+ struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1);
+ /**
+ * lock deactivation event
+ *
+ * Notification that the pointer lock of the seat's pointer is no
+ * longer active. If this is a oneshot pointer lock (see
+ * wp_pointer_constraints.lifetime) this object is now defunct and
+ * should be destroyed. If this is a persistent pointer lock (see
+ * wp_pointer_constraints.lifetime) this pointer lock may again
+ * reactivate in the future.
+ */
+ void (*unlocked)(void *data,
+ struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1);
+};
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ */
+static inline int
+zwp_locked_pointer_v1_add_listener(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1,
+ const struct zwp_locked_pointer_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zwp_locked_pointer_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZWP_LOCKED_POINTER_V1_DESTROY 0
+#define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT 1
+#define ZWP_LOCKED_POINTER_V1_SET_REGION 2
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ */
+#define ZWP_LOCKED_POINTER_V1_LOCKED_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ */
+#define ZWP_LOCKED_POINTER_V1_UNLOCKED_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ */
+#define ZWP_LOCKED_POINTER_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ */
+#define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ */
+#define ZWP_LOCKED_POINTER_V1_SET_REGION_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_locked_pointer_v1 */
+static inline void
+zwp_locked_pointer_v1_set_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_locked_pointer_v1, user_data);
+}
+
+/** @ingroup iface_zwp_locked_pointer_v1 */
+static inline void *
+zwp_locked_pointer_v1_get_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_locked_pointer_v1);
+}
+
+static inline uint32_t
+zwp_locked_pointer_v1_get_version(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_locked_pointer_v1);
+}
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ *
+ * Destroy the locked pointer object. If applicable, the compositor will
+ * unlock the pointer.
+ */
+static inline void
+zwp_locked_pointer_v1_destroy(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_locked_pointer_v1,
+ ZWP_LOCKED_POINTER_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_locked_pointer_v1);
+}
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ *
+ * Set the cursor position hint relative to the top left corner of the
+ * surface.
+ *
+ * If the client is drawing its own cursor, it should update the position
+ * hint to the position of its own cursor. A compositor may use this
+ * information to warp the pointer upon unlock in order to avoid pointer
+ * jumps.
+ *
+ * The cursor position hint is double buffered. The new hint will only take
+ * effect when the associated surface gets it pending state applied. See
+ * wl_surface.commit for details.
+ */
+static inline void
+zwp_locked_pointer_v1_set_cursor_position_hint(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, wl_fixed_t surface_x, wl_fixed_t surface_y)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_locked_pointer_v1,
+ ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT, surface_x, surface_y);
+}
+
+/**
+ * @ingroup iface_zwp_locked_pointer_v1
+ *
+ * Set a new region used to lock the pointer.
+ *
+ * The new lock region is double-buffered. The new lock region will
+ * only take effect when the associated surface gets its pending state
+ * applied. See wl_surface.commit for details.
+ *
+ * For details about the lock region, see wp_locked_pointer.
+ */
+static inline void
+zwp_locked_pointer_v1_set_region(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, struct wl_region *region)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_locked_pointer_v1,
+ ZWP_LOCKED_POINTER_V1_SET_REGION, region);
+}
+
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ * @struct zwp_confined_pointer_v1_listener
+ */
+struct zwp_confined_pointer_v1_listener {
+ /**
+ * pointer confined
+ *
+ * Notification that the pointer confinement of the seat's
+ * pointer is activated.
+ */
+ void (*confined)(void *data,
+ struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1);
+ /**
+ * pointer unconfined
+ *
+ * Notification that the pointer confinement of the seat's
+ * pointer is no longer active. If this is a oneshot pointer
+ * confinement (see wp_pointer_constraints.lifetime) this object is
+ * now defunct and should be destroyed. If this is a persistent
+ * pointer confinement (see wp_pointer_constraints.lifetime) this
+ * pointer confinement may again reactivate in the future.
+ */
+ void (*unconfined)(void *data,
+ struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1);
+};
+
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ */
+static inline int
+zwp_confined_pointer_v1_add_listener(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1,
+ const struct zwp_confined_pointer_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zwp_confined_pointer_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZWP_CONFINED_POINTER_V1_DESTROY 0
+#define ZWP_CONFINED_POINTER_V1_SET_REGION 1
+
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ */
+#define ZWP_CONFINED_POINTER_V1_CONFINED_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ */
+#define ZWP_CONFINED_POINTER_V1_UNCONFINED_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ */
+#define ZWP_CONFINED_POINTER_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ */
+#define ZWP_CONFINED_POINTER_V1_SET_REGION_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_confined_pointer_v1 */
+static inline void
+zwp_confined_pointer_v1_set_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_confined_pointer_v1, user_data);
+}
+
+/** @ingroup iface_zwp_confined_pointer_v1 */
+static inline void *
+zwp_confined_pointer_v1_get_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_confined_pointer_v1);
+}
+
+static inline uint32_t
+zwp_confined_pointer_v1_get_version(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_confined_pointer_v1);
+}
+
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ *
+ * Destroy the confined pointer object. If applicable, the compositor will
+ * unconfine the pointer.
+ */
+static inline void
+zwp_confined_pointer_v1_destroy(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_confined_pointer_v1,
+ ZWP_CONFINED_POINTER_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_confined_pointer_v1);
+}
+
+/**
+ * @ingroup iface_zwp_confined_pointer_v1
+ *
+ * Set a new region used to confine the pointer.
+ *
+ * The new confine region is double-buffered. The new confine region will
+ * only take effect when the associated surface gets its pending state
+ * applied. See wl_surface.commit for details.
+ *
+ * If the confinement is active when the new confinement region is applied
+ * and the pointer ends up outside of newly applied region, the pointer may
+ * warped to a position within the new confinement region. If warped, a
+ * wl_pointer.motion event will be emitted, but no
+ * wp_relative_pointer.relative_motion event.
+ *
+ * The compositor may also, instead of using the new region, unconfine the
+ * pointer.
+ *
+ * For details about the confine region, see wp_confined_pointer.
+ */
+static inline void
+zwp_confined_pointer_v1_set_region(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, struct wl_region *region)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_confined_pointer_v1,
+ ZWP_CONFINED_POINTER_V1_SET_REGION, region);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c
new file mode 100644
index 0000000..cb8946b
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c
@@ -0,0 +1,79 @@
+/* Generated by wayland-scanner */
+
+/*
+ * Copyright © 2014 Jonas Ådahl
+ * Copyright © 2015 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_pointer_interface;
+extern const struct wl_interface zwp_relative_pointer_v1_interface;
+
+static const struct wl_interface *relative_pointer_unstable_v1_types[] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &zwp_relative_pointer_v1_interface,
+ &wl_pointer_interface,
+};
+
+static const struct wl_message zwp_relative_pointer_manager_v1_requests[] = {
+ { "destroy", "", relative_pointer_unstable_v1_types + 0 },
+ { "get_relative_pointer", "no", relative_pointer_unstable_v1_types + 6 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_relative_pointer_manager_v1_interface = {
+ "zwp_relative_pointer_manager_v1", 1,
+ 2, zwp_relative_pointer_manager_v1_requests,
+ 0, NULL,
+};
+
+static const struct wl_message zwp_relative_pointer_v1_requests[] = {
+ { "destroy", "", relative_pointer_unstable_v1_types + 0 },
+};
+
+static const struct wl_message zwp_relative_pointer_v1_events[] = {
+ { "relative_motion", "uuffff", relative_pointer_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_relative_pointer_v1_interface = {
+ "zwp_relative_pointer_v1", 1,
+ 1, zwp_relative_pointer_v1_requests,
+ 1, zwp_relative_pointer_v1_events,
+};
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.h
new file mode 100644
index 0000000..a657127
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.h
@@ -0,0 +1,301 @@
+/* Generated by wayland-scanner */
+
+#ifndef RELATIVE_POINTER_UNSTABLE_V1_CLIENT_PROTOCOL_H
+#define RELATIVE_POINTER_UNSTABLE_V1_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_relative_pointer_unstable_v1 The relative_pointer_unstable_v1 protocol
+ * protocol for relative pointer motion events
+ *
+ * @section page_desc_relative_pointer_unstable_v1 Description
+ *
+ * This protocol specifies a set of interfaces used for making clients able to
+ * receive relative pointer events not obstructed by barriers (such as the
+ * monitor edge or other pointer barriers).
+ *
+ * To start receiving relative pointer events, a client must first bind the
+ * global interface "wp_relative_pointer_manager" which, if a compositor
+ * supports relative pointer motion events, is exposed by the registry. After
+ * having created the relative pointer manager proxy object, the client uses
+ * it to create the actual relative pointer object using the
+ * "get_relative_pointer" request given a wl_pointer. The relative pointer
+ * motion events will then, when applicable, be transmitted via the proxy of
+ * the newly created relative pointer object. See the documentation of the
+ * relative pointer interface for more details.
+ *
+ * Warning! The protocol described in this file is experimental and backward
+ * incompatible changes may be made. Backward compatible changes may be added
+ * together with the corresponding interface version bump. Backward
+ * incompatible changes are done by bumping the version number in the protocol
+ * and interface names and resetting the interface version. Once the protocol
+ * is to be declared stable, the 'z' prefix and the version number in the
+ * protocol and interface names are removed and the interface version number is
+ * reset.
+ *
+ * @section page_ifaces_relative_pointer_unstable_v1 Interfaces
+ * - @subpage page_iface_zwp_relative_pointer_manager_v1 - get relative pointer objects
+ * - @subpage page_iface_zwp_relative_pointer_v1 - relative pointer object
+ * @section page_copyright_relative_pointer_unstable_v1 Copyright
+ * <pre>
+ *
+ * Copyright © 2014 Jonas Ådahl
+ * Copyright © 2015 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * </pre>
+ */
+struct wl_pointer;
+struct zwp_relative_pointer_manager_v1;
+struct zwp_relative_pointer_v1;
+
+#ifndef ZWP_RELATIVE_POINTER_MANAGER_V1_INTERFACE
+#define ZWP_RELATIVE_POINTER_MANAGER_V1_INTERFACE
+/**
+ * @page page_iface_zwp_relative_pointer_manager_v1 zwp_relative_pointer_manager_v1
+ * @section page_iface_zwp_relative_pointer_manager_v1_desc Description
+ *
+ * A global interface used for getting the relative pointer object for a
+ * given pointer.
+ * @section page_iface_zwp_relative_pointer_manager_v1_api API
+ * See @ref iface_zwp_relative_pointer_manager_v1.
+ */
+/**
+ * @defgroup iface_zwp_relative_pointer_manager_v1 The zwp_relative_pointer_manager_v1 interface
+ *
+ * A global interface used for getting the relative pointer object for a
+ * given pointer.
+ */
+extern const struct wl_interface zwp_relative_pointer_manager_v1_interface;
+#endif
+#ifndef ZWP_RELATIVE_POINTER_V1_INTERFACE
+#define ZWP_RELATIVE_POINTER_V1_INTERFACE
+/**
+ * @page page_iface_zwp_relative_pointer_v1 zwp_relative_pointer_v1
+ * @section page_iface_zwp_relative_pointer_v1_desc Description
+ *
+ * A wp_relative_pointer object is an extension to the wl_pointer interface
+ * used for emitting relative pointer events. It shares the same focus as
+ * wl_pointer objects of the same seat and will only emit events when it has
+ * focus.
+ * @section page_iface_zwp_relative_pointer_v1_api API
+ * See @ref iface_zwp_relative_pointer_v1.
+ */
+/**
+ * @defgroup iface_zwp_relative_pointer_v1 The zwp_relative_pointer_v1 interface
+ *
+ * A wp_relative_pointer object is an extension to the wl_pointer interface
+ * used for emitting relative pointer events. It shares the same focus as
+ * wl_pointer objects of the same seat and will only emit events when it has
+ * focus.
+ */
+extern const struct wl_interface zwp_relative_pointer_v1_interface;
+#endif
+
+#define ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY 0
+#define ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER 1
+
+
+/**
+ * @ingroup iface_zwp_relative_pointer_manager_v1
+ */
+#define ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_relative_pointer_manager_v1
+ */
+#define ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_relative_pointer_manager_v1 */
+static inline void
+zwp_relative_pointer_manager_v1_set_user_data(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_relative_pointer_manager_v1, user_data);
+}
+
+/** @ingroup iface_zwp_relative_pointer_manager_v1 */
+static inline void *
+zwp_relative_pointer_manager_v1_get_user_data(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_relative_pointer_manager_v1);
+}
+
+static inline uint32_t
+zwp_relative_pointer_manager_v1_get_version(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_manager_v1);
+}
+
+/**
+ * @ingroup iface_zwp_relative_pointer_manager_v1
+ *
+ * Used by the client to notify the server that it will no longer use this
+ * relative pointer manager object.
+ */
+static inline void
+zwp_relative_pointer_manager_v1_destroy(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_relative_pointer_manager_v1,
+ ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_relative_pointer_manager_v1);
+}
+
+/**
+ * @ingroup iface_zwp_relative_pointer_manager_v1
+ *
+ * Create a relative pointer interface given a wl_pointer object. See the
+ * wp_relative_pointer interface for more details.
+ */
+static inline struct zwp_relative_pointer_v1 *
+zwp_relative_pointer_manager_v1_get_relative_pointer(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1, struct wl_pointer *pointer)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_relative_pointer_manager_v1,
+ ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER, &zwp_relative_pointer_v1_interface, NULL, pointer);
+
+ return (struct zwp_relative_pointer_v1 *) id;
+}
+
+/**
+ * @ingroup iface_zwp_relative_pointer_v1
+ * @struct zwp_relative_pointer_v1_listener
+ */
+struct zwp_relative_pointer_v1_listener {
+ /**
+ * relative pointer motion
+ *
+ * Relative x/y pointer motion from the pointer of the seat
+ * associated with this object.
+ *
+ * A relative motion is in the same dimension as regular wl_pointer
+ * motion events, except they do not represent an absolute
+ * position. For example, moving a pointer from (x, y) to (x', y')
+ * would have the equivalent relative motion (x' - x, y' - y). If a
+ * pointer motion caused the absolute pointer position to be
+ * clipped by for example the edge of the monitor, the relative
+ * motion is unaffected by the clipping and will represent the
+ * unclipped motion.
+ *
+ * This event also contains non-accelerated motion deltas. The
+ * non-accelerated delta is, when applicable, the regular pointer
+ * motion delta as it was before having applied motion acceleration
+ * and other transformations such as normalization.
+ *
+ * Note that the non-accelerated delta does not represent 'raw'
+ * events as they were read from some device. Pointer motion
+ * acceleration is device- and configuration-specific and
+ * non-accelerated deltas and accelerated deltas may have the same
+ * value on some devices.
+ *
+ * Relative motions are not coupled to wl_pointer.motion events,
+ * and can be sent in combination with such events, but also
+ * independently. There may also be scenarios where
+ * wl_pointer.motion is sent, but there is no relative motion. The
+ * order of an absolute and relative motion event originating from
+ * the same physical motion is not guaranteed.
+ *
+ * If the client needs button events or focus state, it can receive
+ * them from a wl_pointer object of the same seat that the
+ * wp_relative_pointer object is associated with.
+ * @param utime_hi high 32 bits of a 64 bit timestamp with microsecond granularity
+ * @param utime_lo low 32 bits of a 64 bit timestamp with microsecond granularity
+ * @param dx the x component of the motion vector
+ * @param dy the y component of the motion vector
+ * @param dx_unaccel the x component of the unaccelerated motion vector
+ * @param dy_unaccel the y component of the unaccelerated motion vector
+ */
+ void (*relative_motion)(void *data,
+ struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1,
+ uint32_t utime_hi,
+ uint32_t utime_lo,
+ wl_fixed_t dx,
+ wl_fixed_t dy,
+ wl_fixed_t dx_unaccel,
+ wl_fixed_t dy_unaccel);
+};
+
+/**
+ * @ingroup iface_zwp_relative_pointer_v1
+ */
+static inline int
+zwp_relative_pointer_v1_add_listener(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1,
+ const struct zwp_relative_pointer_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zwp_relative_pointer_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZWP_RELATIVE_POINTER_V1_DESTROY 0
+
+/**
+ * @ingroup iface_zwp_relative_pointer_v1
+ */
+#define ZWP_RELATIVE_POINTER_V1_RELATIVE_MOTION_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_zwp_relative_pointer_v1
+ */
+#define ZWP_RELATIVE_POINTER_V1_DESTROY_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_relative_pointer_v1 */
+static inline void
+zwp_relative_pointer_v1_set_user_data(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_relative_pointer_v1, user_data);
+}
+
+/** @ingroup iface_zwp_relative_pointer_v1 */
+static inline void *
+zwp_relative_pointer_v1_get_user_data(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_relative_pointer_v1);
+}
+
+static inline uint32_t
+zwp_relative_pointer_v1_get_version(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_v1);
+}
+
+/**
+ * @ingroup iface_zwp_relative_pointer_v1
+ */
+static inline void
+zwp_relative_pointer_v1_destroy(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zwp_relative_pointer_v1,
+ ZWP_RELATIVE_POINTER_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zwp_relative_pointer_v1);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.c
new file mode 100644
index 0000000..9526e83
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.c
@@ -0,0 +1,74 @@
+/* Generated by wayland-scanner */
+
+/*
+ * Copyright © 2013-2016 Collabora, Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface wp_viewport_interface;
+
+static const struct wl_interface *viewporter_types[] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &wp_viewport_interface,
+ &wl_surface_interface,
+};
+
+static const struct wl_message wp_viewporter_requests[] = {
+ { "destroy", "", viewporter_types + 0 },
+ { "get_viewport", "no", viewporter_types + 4 },
+};
+
+WL_PRIVATE const struct wl_interface wp_viewporter_interface = {
+ "wp_viewporter", 1,
+ 2, wp_viewporter_requests,
+ 0, NULL,
+};
+
+static const struct wl_message wp_viewport_requests[] = {
+ { "destroy", "", viewporter_types + 0 },
+ { "set_source", "ffff", viewporter_types + 0 },
+ { "set_destination", "ii", viewporter_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface wp_viewport_interface = {
+ "wp_viewport", 1,
+ 3, wp_viewport_requests,
+ 0, NULL,
+};
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.h
new file mode 100644
index 0000000..3c0bc47
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.h
@@ -0,0 +1,414 @@
+/* Generated by wayland-scanner */
+
+#ifndef VIEWPORTER_CLIENT_PROTOCOL_H
+#define VIEWPORTER_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_viewporter The viewporter protocol
+ * @section page_ifaces_viewporter Interfaces
+ * - @subpage page_iface_wp_viewporter - surface cropping and scaling
+ * - @subpage page_iface_wp_viewport - crop and scale interface to a wl_surface
+ * @section page_copyright_viewporter Copyright
+ * <pre>
+ *
+ * Copyright © 2013-2016 Collabora, Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * </pre>
+ */
+struct wl_surface;
+struct wp_viewport;
+struct wp_viewporter;
+
+#ifndef WP_VIEWPORTER_INTERFACE
+#define WP_VIEWPORTER_INTERFACE
+/**
+ * @page page_iface_wp_viewporter wp_viewporter
+ * @section page_iface_wp_viewporter_desc Description
+ *
+ * The global interface exposing surface cropping and scaling
+ * capabilities is used to instantiate an interface extension for a
+ * wl_surface object. This extended interface will then allow
+ * cropping and scaling the surface contents, effectively
+ * disconnecting the direct relationship between the buffer and the
+ * surface size.
+ * @section page_iface_wp_viewporter_api API
+ * See @ref iface_wp_viewporter.
+ */
+/**
+ * @defgroup iface_wp_viewporter The wp_viewporter interface
+ *
+ * The global interface exposing surface cropping and scaling
+ * capabilities is used to instantiate an interface extension for a
+ * wl_surface object. This extended interface will then allow
+ * cropping and scaling the surface contents, effectively
+ * disconnecting the direct relationship between the buffer and the
+ * surface size.
+ */
+extern const struct wl_interface wp_viewporter_interface;
+#endif
+#ifndef WP_VIEWPORT_INTERFACE
+#define WP_VIEWPORT_INTERFACE
+/**
+ * @page page_iface_wp_viewport wp_viewport
+ * @section page_iface_wp_viewport_desc Description
+ *
+ * An additional interface to a wl_surface object, which allows the
+ * client to specify the cropping and scaling of the surface
+ * contents.
+ *
+ * This interface works with two concepts: the source rectangle (src_x,
+ * src_y, src_width, src_height), and the destination size (dst_width,
+ * dst_height). The contents of the source rectangle are scaled to the
+ * destination size, and content outside the source rectangle is ignored.
+ * This state is double-buffered, and is applied on the next
+ * wl_surface.commit.
+ *
+ * The two parts of crop and scale state are independent: the source
+ * rectangle, and the destination size. Initially both are unset, that
+ * is, no scaling is applied. The whole of the current wl_buffer is
+ * used as the source, and the surface size is as defined in
+ * wl_surface.attach.
+ *
+ * If the destination size is set, it causes the surface size to become
+ * dst_width, dst_height. The source (rectangle) is scaled to exactly
+ * this size. This overrides whatever the attached wl_buffer size is,
+ * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
+ * has no content and therefore no size. Otherwise, the size is always
+ * at least 1x1 in surface local coordinates.
+ *
+ * If the source rectangle is set, it defines what area of the wl_buffer is
+ * taken as the source. If the source rectangle is set and the destination
+ * size is not set, then src_width and src_height must be integers, and the
+ * surface size becomes the source rectangle size. This results in cropping
+ * without scaling. If src_width or src_height are not integers and
+ * destination size is not set, the bad_size protocol error is raised when
+ * the surface state is applied.
+ *
+ * The coordinate transformations from buffer pixel coordinates up to
+ * the surface-local coordinates happen in the following order:
+ * 1. buffer_transform (wl_surface.set_buffer_transform)
+ * 2. buffer_scale (wl_surface.set_buffer_scale)
+ * 3. crop and scale (wp_viewport.set*)
+ * This means, that the source rectangle coordinates of crop and scale
+ * are given in the coordinates after the buffer transform and scale,
+ * i.e. in the coordinates that would be the surface-local coordinates
+ * if the crop and scale was not applied.
+ *
+ * If src_x or src_y are negative, the bad_value protocol error is raised.
+ * Otherwise, if the source rectangle is partially or completely outside of
+ * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
+ * when the surface state is applied. A NULL wl_buffer does not raise the
+ * out_of_buffer error.
+ *
+ * The x, y arguments of wl_surface.attach are applied as normal to
+ * the surface. They indicate how many pixels to remove from the
+ * surface size from the left and the top. In other words, they are
+ * still in the surface-local coordinate system, just like dst_width
+ * and dst_height are.
+ *
+ * If the wl_surface associated with the wp_viewport is destroyed,
+ * all wp_viewport requests except 'destroy' raise the protocol error
+ * no_surface.
+ *
+ * If the wp_viewport object is destroyed, the crop and scale
+ * state is removed from the wl_surface. The change will be applied
+ * on the next wl_surface.commit.
+ * @section page_iface_wp_viewport_api API
+ * See @ref iface_wp_viewport.
+ */
+/**
+ * @defgroup iface_wp_viewport The wp_viewport interface
+ *
+ * An additional interface to a wl_surface object, which allows the
+ * client to specify the cropping and scaling of the surface
+ * contents.
+ *
+ * This interface works with two concepts: the source rectangle (src_x,
+ * src_y, src_width, src_height), and the destination size (dst_width,
+ * dst_height). The contents of the source rectangle are scaled to the
+ * destination size, and content outside the source rectangle is ignored.
+ * This state is double-buffered, and is applied on the next
+ * wl_surface.commit.
+ *
+ * The two parts of crop and scale state are independent: the source
+ * rectangle, and the destination size. Initially both are unset, that
+ * is, no scaling is applied. The whole of the current wl_buffer is
+ * used as the source, and the surface size is as defined in
+ * wl_surface.attach.
+ *
+ * If the destination size is set, it causes the surface size to become
+ * dst_width, dst_height. The source (rectangle) is scaled to exactly
+ * this size. This overrides whatever the attached wl_buffer size is,
+ * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
+ * has no content and therefore no size. Otherwise, the size is always
+ * at least 1x1 in surface local coordinates.
+ *
+ * If the source rectangle is set, it defines what area of the wl_buffer is
+ * taken as the source. If the source rectangle is set and the destination
+ * size is not set, then src_width and src_height must be integers, and the
+ * surface size becomes the source rectangle size. This results in cropping
+ * without scaling. If src_width or src_height are not integers and
+ * destination size is not set, the bad_size protocol error is raised when
+ * the surface state is applied.
+ *
+ * The coordinate transformations from buffer pixel coordinates up to
+ * the surface-local coordinates happen in the following order:
+ * 1. buffer_transform (wl_surface.set_buffer_transform)
+ * 2. buffer_scale (wl_surface.set_buffer_scale)
+ * 3. crop and scale (wp_viewport.set*)
+ * This means, that the source rectangle coordinates of crop and scale
+ * are given in the coordinates after the buffer transform and scale,
+ * i.e. in the coordinates that would be the surface-local coordinates
+ * if the crop and scale was not applied.
+ *
+ * If src_x or src_y are negative, the bad_value protocol error is raised.
+ * Otherwise, if the source rectangle is partially or completely outside of
+ * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
+ * when the surface state is applied. A NULL wl_buffer does not raise the
+ * out_of_buffer error.
+ *
+ * The x, y arguments of wl_surface.attach are applied as normal to
+ * the surface. They indicate how many pixels to remove from the
+ * surface size from the left and the top. In other words, they are
+ * still in the surface-local coordinate system, just like dst_width
+ * and dst_height are.
+ *
+ * If the wl_surface associated with the wp_viewport is destroyed,
+ * all wp_viewport requests except 'destroy' raise the protocol error
+ * no_surface.
+ *
+ * If the wp_viewport object is destroyed, the crop and scale
+ * state is removed from the wl_surface. The change will be applied
+ * on the next wl_surface.commit.
+ */
+extern const struct wl_interface wp_viewport_interface;
+#endif
+
+#ifndef WP_VIEWPORTER_ERROR_ENUM
+#define WP_VIEWPORTER_ERROR_ENUM
+enum wp_viewporter_error {
+ /**
+ * the surface already has a viewport object associated
+ */
+ WP_VIEWPORTER_ERROR_VIEWPORT_EXISTS = 0,
+};
+#endif /* WP_VIEWPORTER_ERROR_ENUM */
+
+#define WP_VIEWPORTER_DESTROY 0
+#define WP_VIEWPORTER_GET_VIEWPORT 1
+
+
+/**
+ * @ingroup iface_wp_viewporter
+ */
+#define WP_VIEWPORTER_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_viewporter
+ */
+#define WP_VIEWPORTER_GET_VIEWPORT_SINCE_VERSION 1
+
+/** @ingroup iface_wp_viewporter */
+static inline void
+wp_viewporter_set_user_data(struct wp_viewporter *wp_viewporter, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wp_viewporter, user_data);
+}
+
+/** @ingroup iface_wp_viewporter */
+static inline void *
+wp_viewporter_get_user_data(struct wp_viewporter *wp_viewporter)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wp_viewporter);
+}
+
+static inline uint32_t
+wp_viewporter_get_version(struct wp_viewporter *wp_viewporter)
+{
+ return wl_proxy_get_version((struct wl_proxy *) wp_viewporter);
+}
+
+/**
+ * @ingroup iface_wp_viewporter
+ *
+ * Informs the server that the client will not be using this
+ * protocol object anymore. This does not affect any other objects,
+ * wp_viewport objects included.
+ */
+static inline void
+wp_viewporter_destroy(struct wp_viewporter *wp_viewporter)
+{
+ wl_proxy_marshal((struct wl_proxy *) wp_viewporter,
+ WP_VIEWPORTER_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) wp_viewporter);
+}
+
+/**
+ * @ingroup iface_wp_viewporter
+ *
+ * Instantiate an interface extension for the given wl_surface to
+ * crop and scale its content. If the given wl_surface already has
+ * a wp_viewport object associated, the viewport_exists
+ * protocol error is raised.
+ */
+static inline struct wp_viewport *
+wp_viewporter_get_viewport(struct wp_viewporter *wp_viewporter, struct wl_surface *surface)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) wp_viewporter,
+ WP_VIEWPORTER_GET_VIEWPORT, &wp_viewport_interface, NULL, surface);
+
+ return (struct wp_viewport *) id;
+}
+
+#ifndef WP_VIEWPORT_ERROR_ENUM
+#define WP_VIEWPORT_ERROR_ENUM
+enum wp_viewport_error {
+ /**
+ * negative or zero values in width or height
+ */
+ WP_VIEWPORT_ERROR_BAD_VALUE = 0,
+ /**
+ * destination size is not integer
+ */
+ WP_VIEWPORT_ERROR_BAD_SIZE = 1,
+ /**
+ * source rectangle extends outside of the content area
+ */
+ WP_VIEWPORT_ERROR_OUT_OF_BUFFER = 2,
+ /**
+ * the wl_surface was destroyed
+ */
+ WP_VIEWPORT_ERROR_NO_SURFACE = 3,
+};
+#endif /* WP_VIEWPORT_ERROR_ENUM */
+
+#define WP_VIEWPORT_DESTROY 0
+#define WP_VIEWPORT_SET_SOURCE 1
+#define WP_VIEWPORT_SET_DESTINATION 2
+
+
+/**
+ * @ingroup iface_wp_viewport
+ */
+#define WP_VIEWPORT_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_viewport
+ */
+#define WP_VIEWPORT_SET_SOURCE_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_viewport
+ */
+#define WP_VIEWPORT_SET_DESTINATION_SINCE_VERSION 1
+
+/** @ingroup iface_wp_viewport */
+static inline void
+wp_viewport_set_user_data(struct wp_viewport *wp_viewport, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wp_viewport, user_data);
+}
+
+/** @ingroup iface_wp_viewport */
+static inline void *
+wp_viewport_get_user_data(struct wp_viewport *wp_viewport)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wp_viewport);
+}
+
+static inline uint32_t
+wp_viewport_get_version(struct wp_viewport *wp_viewport)
+{
+ return wl_proxy_get_version((struct wl_proxy *) wp_viewport);
+}
+
+/**
+ * @ingroup iface_wp_viewport
+ *
+ * The associated wl_surface's crop and scale state is removed.
+ * The change is applied on the next wl_surface.commit.
+ */
+static inline void
+wp_viewport_destroy(struct wp_viewport *wp_viewport)
+{
+ wl_proxy_marshal((struct wl_proxy *) wp_viewport,
+ WP_VIEWPORT_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) wp_viewport);
+}
+
+/**
+ * @ingroup iface_wp_viewport
+ *
+ * Set the source rectangle of the associated wl_surface. See
+ * wp_viewport for the description, and relation to the wl_buffer
+ * size.
+ *
+ * If all of x, y, width and height are -1.0, the source rectangle is
+ * unset instead. Any other set of values where width or height are zero
+ * or negative, or x or y are negative, raise the bad_value protocol
+ * error.
+ *
+ * The crop and scale state is double-buffered state, and will be
+ * applied on the next wl_surface.commit.
+ */
+static inline void
+wp_viewport_set_source(struct wp_viewport *wp_viewport, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) wp_viewport,
+ WP_VIEWPORT_SET_SOURCE, x, y, width, height);
+}
+
+/**
+ * @ingroup iface_wp_viewport
+ *
+ * Set the destination size of the associated wl_surface. See
+ * wp_viewport for the description, and relation to the wl_buffer
+ * size.
+ *
+ * If width is -1 and height is -1, the destination size is unset
+ * instead. Any other pair of values for width and height that
+ * contains zero or negative values raises the bad_value protocol
+ * error.
+ *
+ * The crop and scale state is double-buffered state, and will be
+ * applied on the next wl_surface.commit.
+ */
+static inline void
+wp_viewport_set_destination(struct wp_viewport *wp_viewport, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) wp_viewport,
+ WP_VIEWPORT_SET_DESTINATION, width, height);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-client-protocol.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-client-protocol.h
new file mode 100644
index 0000000..b766119
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-client-protocol.h
@@ -0,0 +1,382 @@
+/* Generated by wayland-scanner */
+
+#ifndef XDG_DECORATION_UNSTABLE_V1_CLIENT_PROTOCOL_H
+#define XDG_DECORATION_UNSTABLE_V1_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_xdg_decoration_unstable_v1 The xdg_decoration_unstable_v1 protocol
+ * @section page_ifaces_xdg_decoration_unstable_v1 Interfaces
+ * - @subpage page_iface_zxdg_decoration_manager_v1 - window decoration manager
+ * - @subpage page_iface_zxdg_toplevel_decoration_v1 - decoration object for a toplevel surface
+ * @section page_copyright_xdg_decoration_unstable_v1 Copyright
+ * <pre>
+ *
+ * Copyright © 2018 Simon Ser
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * </pre>
+ */
+struct xdg_toplevel;
+struct zxdg_decoration_manager_v1;
+struct zxdg_toplevel_decoration_v1;
+
+#ifndef ZXDG_DECORATION_MANAGER_V1_INTERFACE
+#define ZXDG_DECORATION_MANAGER_V1_INTERFACE
+/**
+ * @page page_iface_zxdg_decoration_manager_v1 zxdg_decoration_manager_v1
+ * @section page_iface_zxdg_decoration_manager_v1_desc Description
+ *
+ * This interface allows a compositor to announce support for server-side
+ * decorations.
+ *
+ * A window decoration is a set of window controls as deemed appropriate by
+ * the party managing them, such as user interface components used to move,
+ * resize and change a window's state.
+ *
+ * A client can use this protocol to request being decorated by a supporting
+ * compositor.
+ *
+ * If compositor and client do not negotiate the use of a server-side
+ * decoration using this protocol, clients continue to self-decorate as they
+ * see fit.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding interface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and interface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ * @section page_iface_zxdg_decoration_manager_v1_api API
+ * See @ref iface_zxdg_decoration_manager_v1.
+ */
+/**
+ * @defgroup iface_zxdg_decoration_manager_v1 The zxdg_decoration_manager_v1 interface
+ *
+ * This interface allows a compositor to announce support for server-side
+ * decorations.
+ *
+ * A window decoration is a set of window controls as deemed appropriate by
+ * the party managing them, such as user interface components used to move,
+ * resize and change a window's state.
+ *
+ * A client can use this protocol to request being decorated by a supporting
+ * compositor.
+ *
+ * If compositor and client do not negotiate the use of a server-side
+ * decoration using this protocol, clients continue to self-decorate as they
+ * see fit.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding interface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and interface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ */
+extern const struct wl_interface zxdg_decoration_manager_v1_interface;
+#endif
+#ifndef ZXDG_TOPLEVEL_DECORATION_V1_INTERFACE
+#define ZXDG_TOPLEVEL_DECORATION_V1_INTERFACE
+/**
+ * @page page_iface_zxdg_toplevel_decoration_v1 zxdg_toplevel_decoration_v1
+ * @section page_iface_zxdg_toplevel_decoration_v1_desc Description
+ *
+ * The decoration object allows the compositor to toggle server-side window
+ * decorations for a toplevel surface. The client can request to switch to
+ * another mode.
+ *
+ * The xdg_toplevel_decoration object must be destroyed before its
+ * xdg_toplevel.
+ * @section page_iface_zxdg_toplevel_decoration_v1_api API
+ * See @ref iface_zxdg_toplevel_decoration_v1.
+ */
+/**
+ * @defgroup iface_zxdg_toplevel_decoration_v1 The zxdg_toplevel_decoration_v1 interface
+ *
+ * The decoration object allows the compositor to toggle server-side window
+ * decorations for a toplevel surface. The client can request to switch to
+ * another mode.
+ *
+ * The xdg_toplevel_decoration object must be destroyed before its
+ * xdg_toplevel.
+ */
+extern const struct wl_interface zxdg_toplevel_decoration_v1_interface;
+#endif
+
+#define ZXDG_DECORATION_MANAGER_V1_DESTROY 0
+#define ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION 1
+
+
+/**
+ * @ingroup iface_zxdg_decoration_manager_v1
+ */
+#define ZXDG_DECORATION_MANAGER_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zxdg_decoration_manager_v1
+ */
+#define ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION_SINCE_VERSION 1
+
+/** @ingroup iface_zxdg_decoration_manager_v1 */
+static inline void
+zxdg_decoration_manager_v1_set_user_data(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zxdg_decoration_manager_v1, user_data);
+}
+
+/** @ingroup iface_zxdg_decoration_manager_v1 */
+static inline void *
+zxdg_decoration_manager_v1_get_user_data(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zxdg_decoration_manager_v1);
+}
+
+static inline uint32_t
+zxdg_decoration_manager_v1_get_version(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zxdg_decoration_manager_v1);
+}
+
+/**
+ * @ingroup iface_zxdg_decoration_manager_v1
+ *
+ * Destroy the decoration manager. This doesn't destroy objects created
+ * with the manager.
+ */
+static inline void
+zxdg_decoration_manager_v1_destroy(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zxdg_decoration_manager_v1,
+ ZXDG_DECORATION_MANAGER_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zxdg_decoration_manager_v1);
+}
+
+/**
+ * @ingroup iface_zxdg_decoration_manager_v1
+ *
+ * Create a new decoration object associated with the given toplevel.
+ *
+ * Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
+ * buffer attached or committed is a client error, and any attempts by a
+ * client to attach or manipulate a buffer prior to the first
+ * xdg_toplevel_decoration.configure event must also be treated as
+ * errors.
+ */
+static inline struct zxdg_toplevel_decoration_v1 *
+zxdg_decoration_manager_v1_get_toplevel_decoration(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1, struct xdg_toplevel *toplevel)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_decoration_manager_v1,
+ ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION, &zxdg_toplevel_decoration_v1_interface, NULL, toplevel);
+
+ return (struct zxdg_toplevel_decoration_v1 *) id;
+}
+
+#ifndef ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ENUM
+#define ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ENUM
+enum zxdg_toplevel_decoration_v1_error {
+ /**
+ * xdg_toplevel has a buffer attached before configure
+ */
+ ZXDG_TOPLEVEL_DECORATION_V1_ERROR_UNCONFIGURED_BUFFER = 0,
+ /**
+ * xdg_toplevel already has a decoration object
+ */
+ ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED = 1,
+ /**
+ * xdg_toplevel destroyed before the decoration object
+ */
+ ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ORPHANED = 2,
+};
+#endif /* ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ENUM */
+
+#ifndef ZXDG_TOPLEVEL_DECORATION_V1_MODE_ENUM
+#define ZXDG_TOPLEVEL_DECORATION_V1_MODE_ENUM
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ * window decoration modes
+ *
+ * These values describe window decoration modes.
+ */
+enum zxdg_toplevel_decoration_v1_mode {
+ /**
+ * no server-side window decoration
+ */
+ ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE = 1,
+ /**
+ * server-side window decoration
+ */
+ ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE = 2,
+};
+#endif /* ZXDG_TOPLEVEL_DECORATION_V1_MODE_ENUM */
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ * @struct zxdg_toplevel_decoration_v1_listener
+ */
+struct zxdg_toplevel_decoration_v1_listener {
+ /**
+ * suggest a surface change
+ *
+ * The configure event asks the client to change its decoration
+ * mode. The configured state should not be applied immediately.
+ * Clients must send an ack_configure in response to this event.
+ * See xdg_surface.configure and xdg_surface.ack_configure for
+ * details.
+ *
+ * A configure event can be sent at any time. The specified mode
+ * must be obeyed by the client.
+ * @param mode the decoration mode
+ */
+ void (*configure)(void *data,
+ struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1,
+ uint32_t mode);
+};
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ */
+static inline int
+zxdg_toplevel_decoration_v1_add_listener(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1,
+ const struct zxdg_toplevel_decoration_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_decoration_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY 0
+#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE 1
+#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE 2
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ */
+#define ZXDG_TOPLEVEL_DECORATION_V1_CONFIGURE_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ */
+#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ */
+#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE_SINCE_VERSION 1
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ */
+#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE_SINCE_VERSION 1
+
+/** @ingroup iface_zxdg_toplevel_decoration_v1 */
+static inline void
+zxdg_toplevel_decoration_v1_set_user_data(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_decoration_v1, user_data);
+}
+
+/** @ingroup iface_zxdg_toplevel_decoration_v1 */
+static inline void *
+zxdg_toplevel_decoration_v1_get_user_data(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_decoration_v1);
+}
+
+static inline uint32_t
+zxdg_toplevel_decoration_v1_get_version(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_decoration_v1);
+}
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ *
+ * Switch back to a mode without any server-side decorations at the next
+ * commit.
+ */
+static inline void
+zxdg_toplevel_decoration_v1_destroy(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_decoration_v1,
+ ZXDG_TOPLEVEL_DECORATION_V1_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) zxdg_toplevel_decoration_v1);
+}
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ *
+ * Set the toplevel surface decoration mode. This informs the compositor
+ * that the client prefers the provided decoration mode.
+ *
+ * After requesting a decoration mode, the compositor will respond by
+ * emitting an xdg_surface.configure event. The client should then update
+ * its content, drawing it without decorations if the received mode is
+ * server-side decorations. The client must also acknowledge the configure
+ * when committing the new content (see xdg_surface.ack_configure).
+ *
+ * The compositor can decide not to use the client's mode and enforce a
+ * different mode instead.
+ *
+ * Clients whose decoration mode depend on the xdg_toplevel state may send
+ * a set_mode request in response to an xdg_surface.configure event and wait
+ * for the next xdg_surface.configure event to prevent unwanted state.
+ * Such clients are responsible for preventing configure loops and must
+ * make sure not to send multiple successive set_mode requests with the
+ * same decoration mode.
+ */
+static inline void
+zxdg_toplevel_decoration_v1_set_mode(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, uint32_t mode)
+{
+ wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_decoration_v1,
+ ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE, mode);
+}
+
+/**
+ * @ingroup iface_zxdg_toplevel_decoration_v1
+ *
+ * Unset the toplevel surface decoration mode. This informs the compositor
+ * that the client doesn't prefer a particular decoration mode.
+ *
+ * This request has the same semantics as set_mode.
+ */
+static inline void
+zxdg_toplevel_decoration_v1_unset_mode(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
+{
+ wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_decoration_v1,
+ ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-unstable-v1-client-protocol.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-unstable-v1-client-protocol.c
new file mode 100644
index 0000000..d8dbb2f
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-decoration-unstable-v1-client-protocol.c
@@ -0,0 +1,75 @@
+/* Generated by wayland-scanner */
+
+/*
+ * Copyright © 2018 Simon Ser
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface xdg_toplevel_interface;
+extern const struct wl_interface zxdg_toplevel_decoration_v1_interface;
+
+static const struct wl_interface *xdg_decoration_unstable_v1_types[] = {
+ NULL,
+ &zxdg_toplevel_decoration_v1_interface,
+ &xdg_toplevel_interface,
+};
+
+static const struct wl_message zxdg_decoration_manager_v1_requests[] = {
+ { "destroy", "", xdg_decoration_unstable_v1_types + 0 },
+ { "get_toplevel_decoration", "no", xdg_decoration_unstable_v1_types + 1 },
+};
+
+WL_PRIVATE const struct wl_interface zxdg_decoration_manager_v1_interface = {
+ "zxdg_decoration_manager_v1", 1,
+ 2, zxdg_decoration_manager_v1_requests,
+ 0, NULL,
+};
+
+static const struct wl_message zxdg_toplevel_decoration_v1_requests[] = {
+ { "destroy", "", xdg_decoration_unstable_v1_types + 0 },
+ { "set_mode", "u", xdg_decoration_unstable_v1_types + 0 },
+ { "unset_mode", "", xdg_decoration_unstable_v1_types + 0 },
+};
+
+static const struct wl_message zxdg_toplevel_decoration_v1_events[] = {
+ { "configure", "u", xdg_decoration_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zxdg_toplevel_decoration_v1_interface = {
+ "zxdg_toplevel_decoration_v1", 1,
+ 3, zxdg_toplevel_decoration_v1_requests,
+ 1, zxdg_toplevel_decoration_v1_events,
+};
+
diff --git a/vendor/gioui.org/app/internal/window/wayland_xdg_shell.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.c
index 1947847..9f8f0a5 100644
--- a/vendor/gioui.org/app/internal/window/wayland_xdg_shell.c
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.c
@@ -1,6 +1,4 @@
-// +build linux,!android,!nowayland freebsd
-
-/* Generated by wayland-scanner 1.17.0 */
+/* Generated by wayland-scanner */
/*
* Copyright © 2008-2013 Kristian Høgsberg
@@ -52,7 +50,7 @@ extern const struct wl_interface xdg_positioner_interface;
extern const struct wl_interface xdg_surface_interface;
extern const struct wl_interface xdg_toplevel_interface;
-static const struct wl_interface *types[] = {
+static const struct wl_interface *xdg_shell_types[] = {
NULL,
NULL,
NULL,
@@ -77,100 +75,107 @@ static const struct wl_interface *types[] = {
&wl_output_interface,
&wl_seat_interface,
NULL,
+ &xdg_positioner_interface,
+ NULL,
};
static const struct wl_message xdg_wm_base_requests[] = {
- { "destroy", "", types + 0 },
- { "create_positioner", "n", types + 4 },
- { "get_xdg_surface", "no", types + 5 },
- { "pong", "u", types + 0 },
+ { "destroy", "", xdg_shell_types + 0 },
+ { "create_positioner", "n", xdg_shell_types + 4 },
+ { "get_xdg_surface", "no", xdg_shell_types + 5 },
+ { "pong", "u", xdg_shell_types + 0 },
};
static const struct wl_message xdg_wm_base_events[] = {
- { "ping", "u", types + 0 },
+ { "ping", "u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
- "xdg_wm_base", 2,
+ "xdg_wm_base", 3,
4, xdg_wm_base_requests,
1, xdg_wm_base_events,
};
static const struct wl_message xdg_positioner_requests[] = {
- { "destroy", "", types + 0 },
- { "set_size", "ii", types + 0 },
- { "set_anchor_rect", "iiii", types + 0 },
- { "set_anchor", "u", types + 0 },
- { "set_gravity", "u", types + 0 },
- { "set_constraint_adjustment", "u", types + 0 },
- { "set_offset", "ii", types + 0 },
+ { "destroy", "", xdg_shell_types + 0 },
+ { "set_size", "ii", xdg_shell_types + 0 },
+ { "set_anchor_rect", "iiii", xdg_shell_types + 0 },
+ { "set_anchor", "u", xdg_shell_types + 0 },
+ { "set_gravity", "u", xdg_shell_types + 0 },
+ { "set_constraint_adjustment", "u", xdg_shell_types + 0 },
+ { "set_offset", "ii", xdg_shell_types + 0 },
+ { "set_reactive", "3", xdg_shell_types + 0 },
+ { "set_parent_size", "3ii", xdg_shell_types + 0 },
+ { "set_parent_configure", "3u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
- "xdg_positioner", 2,
- 7, xdg_positioner_requests,
+ "xdg_positioner", 3,
+ 10, xdg_positioner_requests,
0, NULL,
};
static const struct wl_message xdg_surface_requests[] = {
- { "destroy", "", types + 0 },
- { "get_toplevel", "n", types + 7 },
- { "get_popup", "n?oo", types + 8 },
- { "set_window_geometry", "iiii", types + 0 },
- { "ack_configure", "u", types + 0 },
+ { "destroy", "", xdg_shell_types + 0 },
+ { "get_toplevel", "n", xdg_shell_types + 7 },
+ { "get_popup", "n?oo", xdg_shell_types + 8 },
+ { "set_window_geometry", "iiii", xdg_shell_types + 0 },
+ { "ack_configure", "u", xdg_shell_types + 0 },
};
static const struct wl_message xdg_surface_events[] = {
- { "configure", "u", types + 0 },
+ { "configure", "u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_surface_interface = {
- "xdg_surface", 2,
+ "xdg_surface", 3,
5, xdg_surface_requests,
1, xdg_surface_events,
};
static const struct wl_message xdg_toplevel_requests[] = {
- { "destroy", "", types + 0 },
- { "set_parent", "?o", types + 11 },
- { "set_title", "s", types + 0 },
- { "set_app_id", "s", types + 0 },
- { "show_window_menu", "ouii", types + 12 },
- { "move", "ou", types + 16 },
- { "resize", "ouu", types + 18 },
- { "set_max_size", "ii", types + 0 },
- { "set_min_size", "ii", types + 0 },
- { "set_maximized", "", types + 0 },
- { "unset_maximized", "", types + 0 },
- { "set_fullscreen", "?o", types + 21 },
- { "unset_fullscreen", "", types + 0 },
- { "set_minimized", "", types + 0 },
+ { "destroy", "", xdg_shell_types + 0 },
+ { "set_parent", "?o", xdg_shell_types + 11 },
+ { "set_title", "s", xdg_shell_types + 0 },
+ { "set_app_id", "s", xdg_shell_types + 0 },
+ { "show_window_menu", "ouii", xdg_shell_types + 12 },
+ { "move", "ou", xdg_shell_types + 16 },
+ { "resize", "ouu", xdg_shell_types + 18 },
+ { "set_max_size", "ii", xdg_shell_types + 0 },
+ { "set_min_size", "ii", xdg_shell_types + 0 },
+ { "set_maximized", "", xdg_shell_types + 0 },
+ { "unset_maximized", "", xdg_shell_types + 0 },
+ { "set_fullscreen", "?o", xdg_shell_types + 21 },
+ { "unset_fullscreen", "", xdg_shell_types + 0 },
+ { "set_minimized", "", xdg_shell_types + 0 },
};
static const struct wl_message xdg_toplevel_events[] = {
- { "configure", "iia", types + 0 },
- { "close", "", types + 0 },
+ { "configure", "iia", xdg_shell_types + 0 },
+ { "close", "", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
- "xdg_toplevel", 2,
+ "xdg_toplevel", 3,
14, xdg_toplevel_requests,
2, xdg_toplevel_events,
};
static const struct wl_message xdg_popup_requests[] = {
- { "destroy", "", types + 0 },
- { "grab", "ou", types + 22 },
+ { "destroy", "", xdg_shell_types + 0 },
+ { "grab", "ou", xdg_shell_types + 22 },
+ { "reposition", "3ou", xdg_shell_types + 24 },
};
static const struct wl_message xdg_popup_events[] = {
- { "configure", "iiii", types + 0 },
- { "popup_done", "", types + 0 },
+ { "configure", "iiii", xdg_shell_types + 0 },
+ { "popup_done", "", xdg_shell_types + 0 },
+ { "repositioned", "3u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_popup_interface = {
- "xdg_popup", 2,
- 2, xdg_popup_requests,
- 2, xdg_popup_events,
+ "xdg_popup", 3,
+ 3, xdg_popup_requests,
+ 3, xdg_popup_events,
};
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.h
new file mode 100644
index 0000000..67fac1e
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.h
@@ -0,0 +1,2007 @@
+/* Generated by wayland-scanner */
+
+#ifndef XDG_SHELL_CLIENT_PROTOCOL_H
+#define XDG_SHELL_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_xdg_shell The xdg_shell protocol
+ * @section page_ifaces_xdg_shell Interfaces
+ * - @subpage page_iface_xdg_wm_base - create desktop-style surfaces
+ * - @subpage page_iface_xdg_positioner - child surface positioner
+ * - @subpage page_iface_xdg_surface - desktop user interface surface base interface
+ * - @subpage page_iface_xdg_toplevel - toplevel surface
+ * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus
+ * @section page_copyright_xdg_shell Copyright
+ * <pre>
+ *
+ * Copyright © 2008-2013 Kristian Høgsberg
+ * Copyright © 2013 Rafael Antognolli
+ * Copyright © 2013 Jasper St. Pierre
+ * Copyright © 2010-2013 Intel Corporation
+ * Copyright © 2015-2017 Samsung Electronics Co., Ltd
+ * Copyright © 2015-2017 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * </pre>
+ */
+struct wl_output;
+struct wl_seat;
+struct wl_surface;
+struct xdg_popup;
+struct xdg_positioner;
+struct xdg_surface;
+struct xdg_toplevel;
+struct xdg_wm_base;
+
+#ifndef XDG_WM_BASE_INTERFACE
+#define XDG_WM_BASE_INTERFACE
+/**
+ * @page page_iface_xdg_wm_base xdg_wm_base
+ * @section page_iface_xdg_wm_base_desc Description
+ *
+ * The xdg_wm_base interface is exposed as a global object enabling clients
+ * to turn their wl_surfaces into windows in a desktop environment. It
+ * defines the basic functionality needed for clients and the compositor to
+ * create windows that can be dragged, resized, maximized, etc, as well as
+ * creating transient windows such as popup menus.
+ * @section page_iface_xdg_wm_base_api API
+ * See @ref iface_xdg_wm_base.
+ */
+/**
+ * @defgroup iface_xdg_wm_base The xdg_wm_base interface
+ *
+ * The xdg_wm_base interface is exposed as a global object enabling clients
+ * to turn their wl_surfaces into windows in a desktop environment. It
+ * defines the basic functionality needed for clients and the compositor to
+ * create windows that can be dragged, resized, maximized, etc, as well as
+ * creating transient windows such as popup menus.
+ */
+extern const struct wl_interface xdg_wm_base_interface;
+#endif
+#ifndef XDG_POSITIONER_INTERFACE
+#define XDG_POSITIONER_INTERFACE
+/**
+ * @page page_iface_xdg_positioner xdg_positioner
+ * @section page_iface_xdg_positioner_desc Description
+ *
+ * The xdg_positioner provides a collection of rules for the placement of a
+ * child surface relative to a parent surface. Rules can be defined to ensure
+ * the child surface remains within the visible area's borders, and to
+ * specify how the child surface changes its position, such as sliding along
+ * an axis, or flipping around a rectangle. These positioner-created rules are
+ * constrained by the requirement that a child surface must intersect with or
+ * be at least partially adjacent to its parent surface.
+ *
+ * See the various requests for details about possible rules.
+ *
+ * At the time of the request, the compositor makes a copy of the rules
+ * specified by the xdg_positioner. Thus, after the request is complete the
+ * xdg_positioner object can be destroyed or reused; further changes to the
+ * object will have no effect on previous usages.
+ *
+ * For an xdg_positioner object to be considered complete, it must have a
+ * non-zero size set by set_size, and a non-zero anchor rectangle set by
+ * set_anchor_rect. Passing an incomplete xdg_positioner object when
+ * positioning a surface raises an error.
+ * @section page_iface_xdg_positioner_api API
+ * See @ref iface_xdg_positioner.
+ */
+/**
+ * @defgroup iface_xdg_positioner The xdg_positioner interface
+ *
+ * The xdg_positioner provides a collection of rules for the placement of a
+ * child surface relative to a parent surface. Rules can be defined to ensure
+ * the child surface remains within the visible area's borders, and to
+ * specify how the child surface changes its position, such as sliding along
+ * an axis, or flipping around a rectangle. These positioner-created rules are
+ * constrained by the requirement that a child surface must intersect with or
+ * be at least partially adjacent to its parent surface.
+ *
+ * See the various requests for details about possible rules.
+ *
+ * At the time of the request, the compositor makes a copy of the rules
+ * specified by the xdg_positioner. Thus, after the request is complete the
+ * xdg_positioner object can be destroyed or reused; further changes to the
+ * object will have no effect on previous usages.
+ *
+ * For an xdg_positioner object to be considered complete, it must have a
+ * non-zero size set by set_size, and a non-zero anchor rectangle set by
+ * set_anchor_rect. Passing an incomplete xdg_positioner object when
+ * positioning a surface raises an error.
+ */
+extern const struct wl_interface xdg_positioner_interface;
+#endif
+#ifndef XDG_SURFACE_INTERFACE
+#define XDG_SURFACE_INTERFACE
+/**
+ * @page page_iface_xdg_surface xdg_surface
+ * @section page_iface_xdg_surface_desc Description
+ *
+ * An interface that may be implemented by a wl_surface, for
+ * implementations that provide a desktop-style user interface.
+ *
+ * It provides a base set of functionality required to construct user
+ * interface elements requiring management by the compositor, such as
+ * toplevel windows, menus, etc. The types of functionality are split into
+ * xdg_surface roles.
+ *
+ * Creating an xdg_surface does not set the role for a wl_surface. In order
+ * to map an xdg_surface, the client must create a role-specific object
+ * using, e.g., get_toplevel, get_popup. The wl_surface for any given
+ * xdg_surface can have at most one role, and may not be assigned any role
+ * not based on xdg_surface.
+ *
+ * A role must be assigned before any other requests are made to the
+ * xdg_surface object.
+ *
+ * The client must call wl_surface.commit on the corresponding wl_surface
+ * for the xdg_surface state to take effect.
+ *
+ * Creating an xdg_surface from a wl_surface which has a buffer attached or
+ * committed is a client error, and any attempts by a client to attach or
+ * manipulate a buffer prior to the first xdg_surface.configure call must
+ * also be treated as errors.
+ *
+ * After creating a role-specific object and setting it up, the client must
+ * perform an initial commit without any buffer attached. The compositor
+ * will reply with an xdg_surface.configure event. The client must
+ * acknowledge it and is then allowed to attach a buffer to map the surface.
+ *
+ * Mapping an xdg_surface-based role surface is defined as making it
+ * possible for the surface to be shown by the compositor. Note that
+ * a mapped surface is not guaranteed to be visible once it is mapped.
+ *
+ * For an xdg_surface to be mapped by the compositor, the following
+ * conditions must be met:
+ * (1) the client has assigned an xdg_surface-based role to the surface
+ * (2) the client has set and committed the xdg_surface state and the
+ * role-dependent state to the surface
+ * (3) the client has committed a buffer to the surface
+ *
+ * A newly-unmapped surface is considered to have met condition (1) out
+ * of the 3 required conditions for mapping a surface if its role surface
+ * has not been destroyed, i.e. the client must perform the initial commit
+ * again before attaching a buffer.
+ * @section page_iface_xdg_surface_api API
+ * See @ref iface_xdg_surface.
+ */
+/**
+ * @defgroup iface_xdg_surface The xdg_surface interface
+ *
+ * An interface that may be implemented by a wl_surface, for
+ * implementations that provide a desktop-style user interface.
+ *
+ * It provides a base set of functionality required to construct user
+ * interface elements requiring management by the compositor, such as
+ * toplevel windows, menus, etc. The types of functionality are split into
+ * xdg_surface roles.
+ *
+ * Creating an xdg_surface does not set the role for a wl_surface. In order
+ * to map an xdg_surface, the client must create a role-specific object
+ * using, e.g., get_toplevel, get_popup. The wl_surface for any given
+ * xdg_surface can have at most one role, and may not be assigned any role
+ * not based on xdg_surface.
+ *
+ * A role must be assigned before any other requests are made to the
+ * xdg_surface object.
+ *
+ * The client must call wl_surface.commit on the corresponding wl_surface
+ * for the xdg_surface state to take effect.
+ *
+ * Creating an xdg_surface from a wl_surface which has a buffer attached or
+ * committed is a client error, and any attempts by a client to attach or
+ * manipulate a buffer prior to the first xdg_surface.configure call must
+ * also be treated as errors.
+ *
+ * After creating a role-specific object and setting it up, the client must
+ * perform an initial commit without any buffer attached. The compositor
+ * will reply with an xdg_surface.configure event. The client must
+ * acknowledge it and is then allowed to attach a buffer to map the surface.
+ *
+ * Mapping an xdg_surface-based role surface is defined as making it
+ * possible for the surface to be shown by the compositor. Note that
+ * a mapped surface is not guaranteed to be visible once it is mapped.
+ *
+ * For an xdg_surface to be mapped by the compositor, the following
+ * conditions must be met:
+ * (1) the client has assigned an xdg_surface-based role to the surface
+ * (2) the client has set and committed the xdg_surface state and the
+ * role-dependent state to the surface
+ * (3) the client has committed a buffer to the surface
+ *
+ * A newly-unmapped surface is considered to have met condition (1) out
+ * of the 3 required conditions for mapping a surface if its role surface
+ * has not been destroyed, i.e. the client must perform the initial commit
+ * again before attaching a buffer.
+ */
+extern const struct wl_interface xdg_surface_interface;
+#endif
+#ifndef XDG_TOPLEVEL_INTERFACE
+#define XDG_TOPLEVEL_INTERFACE
+/**
+ * @page page_iface_xdg_toplevel xdg_toplevel
+ * @section page_iface_xdg_toplevel_desc Description
+ *
+ * This interface defines an xdg_surface role which allows a surface to,
+ * among other things, set window-like properties such as maximize,
+ * fullscreen, and minimize, set application-specific metadata like title and
+ * id, and well as trigger user interactive operations such as interactive
+ * resize and move.
+ *
+ * Unmapping an xdg_toplevel means that the surface cannot be shown
+ * by the compositor until it is explicitly mapped again.
+ * All active operations (e.g., move, resize) are canceled and all
+ * attributes (e.g. title, state, stacking, ...) are discarded for
+ * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
+ * the state it had right after xdg_surface.get_toplevel. The client
+ * can re-map the toplevel by perfoming a commit without any buffer
+ * attached, waiting for a configure event and handling it as usual (see
+ * xdg_surface description).
+ *
+ * Attaching a null buffer to a toplevel unmaps the surface.
+ * @section page_iface_xdg_toplevel_api API
+ * See @ref iface_xdg_toplevel.
+ */
+/**
+ * @defgroup iface_xdg_toplevel The xdg_toplevel interface
+ *
+ * This interface defines an xdg_surface role which allows a surface to,
+ * among other things, set window-like properties such as maximize,
+ * fullscreen, and minimize, set application-specific metadata like title and
+ * id, and well as trigger user interactive operations such as interactive
+ * resize and move.
+ *
+ * Unmapping an xdg_toplevel means that the surface cannot be shown
+ * by the compositor until it is explicitly mapped again.
+ * All active operations (e.g., move, resize) are canceled and all
+ * attributes (e.g. title, state, stacking, ...) are discarded for
+ * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
+ * the state it had right after xdg_surface.get_toplevel. The client
+ * can re-map the toplevel by perfoming a commit without any buffer
+ * attached, waiting for a configure event and handling it as usual (see
+ * xdg_surface description).
+ *
+ * Attaching a null buffer to a toplevel unmaps the surface.
+ */
+extern const struct wl_interface xdg_toplevel_interface;
+#endif
+#ifndef XDG_POPUP_INTERFACE
+#define XDG_POPUP_INTERFACE
+/**
+ * @page page_iface_xdg_popup xdg_popup
+ * @section page_iface_xdg_popup_desc Description
+ *
+ * A popup surface is a short-lived, temporary surface. It can be used to
+ * implement for example menus, popovers, tooltips and other similar user
+ * interface concepts.
+ *
+ * A popup can be made to take an explicit grab. See xdg_popup.grab for
+ * details.
+ *
+ * When the popup is dismissed, a popup_done event will be sent out, and at
+ * the same time the surface will be unmapped. See the xdg_popup.popup_done
+ * event for details.
+ *
+ * Explicitly destroying the xdg_popup object will also dismiss the popup and
+ * unmap the surface. Clients that want to dismiss the popup when another
+ * surface of their own is clicked should dismiss the popup using the destroy
+ * request.
+ *
+ * A newly created xdg_popup will be stacked on top of all previously created
+ * xdg_popup surfaces associated with the same xdg_toplevel.
+ *
+ * The parent of an xdg_popup must be mapped (see the xdg_surface
+ * description) before the xdg_popup itself.
+ *
+ * The client must call wl_surface.commit on the corresponding wl_surface
+ * for the xdg_popup state to take effect.
+ * @section page_iface_xdg_popup_api API
+ * See @ref iface_xdg_popup.
+ */
+/**
+ * @defgroup iface_xdg_popup The xdg_popup interface
+ *
+ * A popup surface is a short-lived, temporary surface. It can be used to
+ * implement for example menus, popovers, tooltips and other similar user
+ * interface concepts.
+ *
+ * A popup can be made to take an explicit grab. See xdg_popup.grab for
+ * details.
+ *
+ * When the popup is dismissed, a popup_done event will be sent out, and at
+ * the same time the surface will be unmapped. See the xdg_popup.popup_done
+ * event for details.
+ *
+ * Explicitly destroying the xdg_popup object will also dismiss the popup and
+ * unmap the surface. Clients that want to dismiss the popup when another
+ * surface of their own is clicked should dismiss the popup using the destroy
+ * request.
+ *
+ * A newly created xdg_popup will be stacked on top of all previously created
+ * xdg_popup surfaces associated with the same xdg_toplevel.
+ *
+ * The parent of an xdg_popup must be mapped (see the xdg_surface
+ * description) before the xdg_popup itself.
+ *
+ * The client must call wl_surface.commit on the corresponding wl_surface
+ * for the xdg_popup state to take effect.
+ */
+extern const struct wl_interface xdg_popup_interface;
+#endif
+
+#ifndef XDG_WM_BASE_ERROR_ENUM
+#define XDG_WM_BASE_ERROR_ENUM
+enum xdg_wm_base_error {
+ /**
+ * given wl_surface has another role
+ */
+ XDG_WM_BASE_ERROR_ROLE = 0,
+ /**
+ * xdg_wm_base was destroyed before children
+ */
+ XDG_WM_BASE_ERROR_DEFUNCT_SURFACES = 1,
+ /**
+ * the client tried to map or destroy a non-topmost popup
+ */
+ XDG_WM_BASE_ERROR_NOT_THE_TOPMOST_POPUP = 2,
+ /**
+ * the client specified an invalid popup parent surface
+ */
+ XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT = 3,
+ /**
+ * the client provided an invalid surface state
+ */
+ XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE = 4,
+ /**
+ * the client provided an invalid positioner
+ */
+ XDG_WM_BASE_ERROR_INVALID_POSITIONER = 5,
+};
+#endif /* XDG_WM_BASE_ERROR_ENUM */
+
+/**
+ * @ingroup iface_xdg_wm_base
+ * @struct xdg_wm_base_listener
+ */
+struct xdg_wm_base_listener {
+ /**
+ * check if the client is alive
+ *
+ * The ping event asks the client if it's still alive. Pass the
+ * serial specified in the event back to the compositor by sending
+ * a "pong" request back with the specified serial. See
+ * xdg_wm_base.pong.
+ *
+ * Compositors can use this to determine if the client is still
+ * alive. It's unspecified what will happen if the client doesn't
+ * respond to the ping request, or in what timeframe. Clients
+ * should try to respond in a reasonable amount of time.
+ *
+ * A compositor is free to ping in any way it wants, but a client
+ * must always respond to any xdg_wm_base object it created.
+ * @param serial pass this to the pong request
+ */
+ void (*ping)(void *data,
+ struct xdg_wm_base *xdg_wm_base,
+ uint32_t serial);
+};
+
+/**
+ * @ingroup iface_xdg_wm_base
+ */
+static inline int
+xdg_wm_base_add_listener(struct xdg_wm_base *xdg_wm_base,
+ const struct xdg_wm_base_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) xdg_wm_base,
+ (void (**)(void)) listener, data);
+}
+
+#define XDG_WM_BASE_DESTROY 0
+#define XDG_WM_BASE_CREATE_POSITIONER 1
+#define XDG_WM_BASE_GET_XDG_SURFACE 2
+#define XDG_WM_BASE_PONG 3
+
+/**
+ * @ingroup iface_xdg_wm_base
+ */
+#define XDG_WM_BASE_PING_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_xdg_wm_base
+ */
+#define XDG_WM_BASE_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_wm_base
+ */
+#define XDG_WM_BASE_CREATE_POSITIONER_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_wm_base
+ */
+#define XDG_WM_BASE_GET_XDG_SURFACE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_wm_base
+ */
+#define XDG_WM_BASE_PONG_SINCE_VERSION 1
+
+/** @ingroup iface_xdg_wm_base */
+static inline void
+xdg_wm_base_set_user_data(struct xdg_wm_base *xdg_wm_base, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) xdg_wm_base, user_data);
+}
+
+/** @ingroup iface_xdg_wm_base */
+static inline void *
+xdg_wm_base_get_user_data(struct xdg_wm_base *xdg_wm_base)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) xdg_wm_base);
+}
+
+static inline uint32_t
+xdg_wm_base_get_version(struct xdg_wm_base *xdg_wm_base)
+{
+ return wl_proxy_get_version((struct wl_proxy *) xdg_wm_base);
+}
+
+/**
+ * @ingroup iface_xdg_wm_base
+ *
+ * Destroy this xdg_wm_base object.
+ *
+ * Destroying a bound xdg_wm_base object while there are surfaces
+ * still alive created by this xdg_wm_base object instance is illegal
+ * and will result in a protocol error.
+ */
+static inline void
+xdg_wm_base_destroy(struct xdg_wm_base *xdg_wm_base)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_wm_base,
+ XDG_WM_BASE_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) xdg_wm_base);
+}
+
+/**
+ * @ingroup iface_xdg_wm_base
+ *
+ * Create a positioner object. A positioner object is used to position
+ * surfaces relative to some parent surface. See the interface description
+ * and xdg_surface.get_popup for details.
+ */
+static inline struct xdg_positioner *
+xdg_wm_base_create_positioner(struct xdg_wm_base *xdg_wm_base)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_wm_base,
+ XDG_WM_BASE_CREATE_POSITIONER, &xdg_positioner_interface, NULL);
+
+ return (struct xdg_positioner *) id;
+}
+
+/**
+ * @ingroup iface_xdg_wm_base
+ *
+ * This creates an xdg_surface for the given surface. While xdg_surface
+ * itself is not a role, the corresponding surface may only be assigned
+ * a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is
+ * illegal to create an xdg_surface for a wl_surface which already has an
+ * assigned role and this will result in a protocol error.
+ *
+ * This creates an xdg_surface for the given surface. An xdg_surface is
+ * used as basis to define a role to a given surface, such as xdg_toplevel
+ * or xdg_popup. It also manages functionality shared between xdg_surface
+ * based surface roles.
+ *
+ * See the documentation of xdg_surface for more details about what an
+ * xdg_surface is and how it is used.
+ */
+static inline struct xdg_surface *
+xdg_wm_base_get_xdg_surface(struct xdg_wm_base *xdg_wm_base, struct wl_surface *surface)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_wm_base,
+ XDG_WM_BASE_GET_XDG_SURFACE, &xdg_surface_interface, NULL, surface);
+
+ return (struct xdg_surface *) id;
+}
+
+/**
+ * @ingroup iface_xdg_wm_base
+ *
+ * A client must respond to a ping event with a pong request or
+ * the client may be deemed unresponsive. See xdg_wm_base.ping.
+ */
+static inline void
+xdg_wm_base_pong(struct xdg_wm_base *xdg_wm_base, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_wm_base,
+ XDG_WM_BASE_PONG, serial);
+}
+
+#ifndef XDG_POSITIONER_ERROR_ENUM
+#define XDG_POSITIONER_ERROR_ENUM
+enum xdg_positioner_error {
+ /**
+ * invalid input provided
+ */
+ XDG_POSITIONER_ERROR_INVALID_INPUT = 0,
+};
+#endif /* XDG_POSITIONER_ERROR_ENUM */
+
+#ifndef XDG_POSITIONER_ANCHOR_ENUM
+#define XDG_POSITIONER_ANCHOR_ENUM
+enum xdg_positioner_anchor {
+ XDG_POSITIONER_ANCHOR_NONE = 0,
+ XDG_POSITIONER_ANCHOR_TOP = 1,
+ XDG_POSITIONER_ANCHOR_BOTTOM = 2,
+ XDG_POSITIONER_ANCHOR_LEFT = 3,
+ XDG_POSITIONER_ANCHOR_RIGHT = 4,
+ XDG_POSITIONER_ANCHOR_TOP_LEFT = 5,
+ XDG_POSITIONER_ANCHOR_BOTTOM_LEFT = 6,
+ XDG_POSITIONER_ANCHOR_TOP_RIGHT = 7,
+ XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT = 8,
+};
+#endif /* XDG_POSITIONER_ANCHOR_ENUM */
+
+#ifndef XDG_POSITIONER_GRAVITY_ENUM
+#define XDG_POSITIONER_GRAVITY_ENUM
+enum xdg_positioner_gravity {
+ XDG_POSITIONER_GRAVITY_NONE = 0,
+ XDG_POSITIONER_GRAVITY_TOP = 1,
+ XDG_POSITIONER_GRAVITY_BOTTOM = 2,
+ XDG_POSITIONER_GRAVITY_LEFT = 3,
+ XDG_POSITIONER_GRAVITY_RIGHT = 4,
+ XDG_POSITIONER_GRAVITY_TOP_LEFT = 5,
+ XDG_POSITIONER_GRAVITY_BOTTOM_LEFT = 6,
+ XDG_POSITIONER_GRAVITY_TOP_RIGHT = 7,
+ XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT = 8,
+};
+#endif /* XDG_POSITIONER_GRAVITY_ENUM */
+
+#ifndef XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM
+#define XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM
+/**
+ * @ingroup iface_xdg_positioner
+ * vertically resize the surface
+ *
+ * Resize the surface vertically so that it is completely unconstrained.
+ */
+enum xdg_positioner_constraint_adjustment {
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE = 0,
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1,
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2,
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X = 4,
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8,
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16,
+ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32,
+};
+#endif /* XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM */
+
+#define XDG_POSITIONER_DESTROY 0
+#define XDG_POSITIONER_SET_SIZE 1
+#define XDG_POSITIONER_SET_ANCHOR_RECT 2
+#define XDG_POSITIONER_SET_ANCHOR 3
+#define XDG_POSITIONER_SET_GRAVITY 4
+#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT 5
+#define XDG_POSITIONER_SET_OFFSET 6
+#define XDG_POSITIONER_SET_REACTIVE 7
+#define XDG_POSITIONER_SET_PARENT_SIZE 8
+#define XDG_POSITIONER_SET_PARENT_CONFIGURE 9
+
+
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_SIZE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_ANCHOR_RECT_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_ANCHOR_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_GRAVITY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_REACTIVE_SINCE_VERSION 3
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_PARENT_SIZE_SINCE_VERSION 3
+/**
+ * @ingroup iface_xdg_positioner
+ */
+#define XDG_POSITIONER_SET_PARENT_CONFIGURE_SINCE_VERSION 3
+
+/** @ingroup iface_xdg_positioner */
+static inline void
+xdg_positioner_set_user_data(struct xdg_positioner *xdg_positioner, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) xdg_positioner, user_data);
+}
+
+/** @ingroup iface_xdg_positioner */
+static inline void *
+xdg_positioner_get_user_data(struct xdg_positioner *xdg_positioner)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) xdg_positioner);
+}
+
+static inline uint32_t
+xdg_positioner_get_version(struct xdg_positioner *xdg_positioner)
+{
+ return wl_proxy_get_version((struct wl_proxy *) xdg_positioner);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Notify the compositor that the xdg_positioner will no longer be used.
+ */
+static inline void
+xdg_positioner_destroy(struct xdg_positioner *xdg_positioner)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) xdg_positioner);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Set the size of the surface that is to be positioned with the positioner
+ * object. The size is in surface-local coordinates and corresponds to the
+ * window geometry. See xdg_surface.set_window_geometry.
+ *
+ * If a zero or negative size is set the invalid_input error is raised.
+ */
+static inline void
+xdg_positioner_set_size(struct xdg_positioner *xdg_positioner, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_SIZE, width, height);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Specify the anchor rectangle within the parent surface that the child
+ * surface will be placed relative to. The rectangle is relative to the
+ * window geometry as defined by xdg_surface.set_window_geometry of the
+ * parent surface.
+ *
+ * When the xdg_positioner object is used to position a child surface, the
+ * anchor rectangle may not extend outside the window geometry of the
+ * positioned child's parent surface.
+ *
+ * If a negative size is set the invalid_input error is raised.
+ */
+static inline void
+xdg_positioner_set_anchor_rect(struct xdg_positioner *xdg_positioner, int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_ANCHOR_RECT, x, y, width, height);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Defines the anchor point for the anchor rectangle. The specified anchor
+ * is used derive an anchor point that the child surface will be
+ * positioned relative to. If a corner anchor is set (e.g. 'top_left' or
+ * 'bottom_right'), the anchor point will be at the specified corner;
+ * otherwise, the derived anchor point will be centered on the specified
+ * edge, or in the center of the anchor rectangle if no edge is specified.
+ */
+static inline void
+xdg_positioner_set_anchor(struct xdg_positioner *xdg_positioner, uint32_t anchor)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_ANCHOR, anchor);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Defines in what direction a surface should be positioned, relative to
+ * the anchor point of the parent surface. If a corner gravity is
+ * specified (e.g. 'bottom_right' or 'top_left'), then the child surface
+ * will be placed towards the specified gravity; otherwise, the child
+ * surface will be centered over the anchor point on any axis that had no
+ * gravity specified.
+ */
+static inline void
+xdg_positioner_set_gravity(struct xdg_positioner *xdg_positioner, uint32_t gravity)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_GRAVITY, gravity);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Specify how the window should be positioned if the originally intended
+ * position caused the surface to be constrained, meaning at least
+ * partially outside positioning boundaries set by the compositor. The
+ * adjustment is set by constructing a bitmask describing the adjustment to
+ * be made when the surface is constrained on that axis.
+ *
+ * If no bit for one axis is set, the compositor will assume that the child
+ * surface should not change its position on that axis when constrained.
+ *
+ * If more than one bit for one axis is set, the order of how adjustments
+ * are applied is specified in the corresponding adjustment descriptions.
+ *
+ * The default adjustment is none.
+ */
+static inline void
+xdg_positioner_set_constraint_adjustment(struct xdg_positioner *xdg_positioner, uint32_t constraint_adjustment)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT, constraint_adjustment);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Specify the surface position offset relative to the position of the
+ * anchor on the anchor rectangle and the anchor on the surface. For
+ * example if the anchor of the anchor rectangle is at (x, y), the surface
+ * has the gravity bottom|right, and the offset is (ox, oy), the calculated
+ * surface position will be (x + ox, y + oy). The offset position of the
+ * surface is the one used for constraint testing. See
+ * set_constraint_adjustment.
+ *
+ * An example use case is placing a popup menu on top of a user interface
+ * element, while aligning the user interface element of the parent surface
+ * with some user interface element placed somewhere in the popup surface.
+ */
+static inline void
+xdg_positioner_set_offset(struct xdg_positioner *xdg_positioner, int32_t x, int32_t y)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_OFFSET, x, y);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * When set reactive, the surface is reconstrained if the conditions used
+ * for constraining changed, e.g. the parent window moved.
+ *
+ * If the conditions changed and the popup was reconstrained, an
+ * xdg_popup.configure event is sent with updated geometry, followed by an
+ * xdg_surface.configure event.
+ */
+static inline void
+xdg_positioner_set_reactive(struct xdg_positioner *xdg_positioner)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_REACTIVE);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Set the parent window geometry the compositor should use when
+ * positioning the popup. The compositor may use this information to
+ * determine the future state the popup should be constrained using. If
+ * this doesn't match the dimension of the parent the popup is eventually
+ * positioned against, the behavior is undefined.
+ *
+ * The arguments are given in the surface-local coordinate space.
+ */
+static inline void
+xdg_positioner_set_parent_size(struct xdg_positioner *xdg_positioner, int32_t parent_width, int32_t parent_height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_PARENT_SIZE, parent_width, parent_height);
+}
+
+/**
+ * @ingroup iface_xdg_positioner
+ *
+ * Set the serial of an xdg_surface.configure event this positioner will be
+ * used in response to. The compositor may use this information together
+ * with set_parent_size to determine what future state the popup should be
+ * constrained using.
+ */
+static inline void
+xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
+ XDG_POSITIONER_SET_PARENT_CONFIGURE, serial);
+}
+
+#ifndef XDG_SURFACE_ERROR_ENUM
+#define XDG_SURFACE_ERROR_ENUM
+enum xdg_surface_error {
+ XDG_SURFACE_ERROR_NOT_CONSTRUCTED = 1,
+ XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED = 2,
+ XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER = 3,
+};
+#endif /* XDG_SURFACE_ERROR_ENUM */
+
+/**
+ * @ingroup iface_xdg_surface
+ * @struct xdg_surface_listener
+ */
+struct xdg_surface_listener {
+ /**
+ * suggest a surface change
+ *
+ * The configure event marks the end of a configure sequence. A
+ * configure sequence is a set of one or more events configuring
+ * the state of the xdg_surface, including the final
+ * xdg_surface.configure event.
+ *
+ * Where applicable, xdg_surface surface roles will during a
+ * configure sequence extend this event as a latched state sent as
+ * events before the xdg_surface.configure event. Such events
+ * should be considered to make up a set of atomically applied
+ * configuration states, where the xdg_surface.configure commits
+ * the accumulated state.
+ *
+ * Clients should arrange their surface for the new states, and
+ * then send an ack_configure request with the serial sent in this
+ * configure event at some point before committing the new surface.
+ *
+ * If the client receives multiple configure events before it can
+ * respond to one, it is free to discard all but the last event it
+ * received.
+ * @param serial serial of the configure event
+ */
+ void (*configure)(void *data,
+ struct xdg_surface *xdg_surface,
+ uint32_t serial);
+};
+
+/**
+ * @ingroup iface_xdg_surface
+ */
+static inline int
+xdg_surface_add_listener(struct xdg_surface *xdg_surface,
+ const struct xdg_surface_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) xdg_surface,
+ (void (**)(void)) listener, data);
+}
+
+#define XDG_SURFACE_DESTROY 0
+#define XDG_SURFACE_GET_TOPLEVEL 1
+#define XDG_SURFACE_GET_POPUP 2
+#define XDG_SURFACE_SET_WINDOW_GEOMETRY 3
+#define XDG_SURFACE_ACK_CONFIGURE 4
+
+/**
+ * @ingroup iface_xdg_surface
+ */
+#define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_xdg_surface
+ */
+#define XDG_SURFACE_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_surface
+ */
+#define XDG_SURFACE_GET_TOPLEVEL_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_surface
+ */
+#define XDG_SURFACE_GET_POPUP_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_surface
+ */
+#define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_surface
+ */
+#define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1
+
+/** @ingroup iface_xdg_surface */
+static inline void
+xdg_surface_set_user_data(struct xdg_surface *xdg_surface, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) xdg_surface, user_data);
+}
+
+/** @ingroup iface_xdg_surface */
+static inline void *
+xdg_surface_get_user_data(struct xdg_surface *xdg_surface)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) xdg_surface);
+}
+
+static inline uint32_t
+xdg_surface_get_version(struct xdg_surface *xdg_surface)
+{
+ return wl_proxy_get_version((struct wl_proxy *) xdg_surface);
+}
+
+/**
+ * @ingroup iface_xdg_surface
+ *
+ * Destroy the xdg_surface object. An xdg_surface must only be destroyed
+ * after its role object has been destroyed.
+ */
+static inline void
+xdg_surface_destroy(struct xdg_surface *xdg_surface)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_surface,
+ XDG_SURFACE_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) xdg_surface);
+}
+
+/**
+ * @ingroup iface_xdg_surface
+ *
+ * This creates an xdg_toplevel object for the given xdg_surface and gives
+ * the associated wl_surface the xdg_toplevel role.
+ *
+ * See the documentation of xdg_toplevel for more details about what an
+ * xdg_toplevel is and how it is used.
+ */
+static inline struct xdg_toplevel *
+xdg_surface_get_toplevel(struct xdg_surface *xdg_surface)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_surface,
+ XDG_SURFACE_GET_TOPLEVEL, &xdg_toplevel_interface, NULL);
+
+ return (struct xdg_toplevel *) id;
+}
+
+/**
+ * @ingroup iface_xdg_surface
+ *
+ * This creates an xdg_popup object for the given xdg_surface and gives
+ * the associated wl_surface the xdg_popup role.
+ *
+ * If null is passed as a parent, a parent surface must be specified using
+ * some other protocol, before committing the initial state.
+ *
+ * See the documentation of xdg_popup for more details about what an
+ * xdg_popup is and how it is used.
+ */
+static inline struct xdg_popup *
+xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *parent, struct xdg_positioner *positioner)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_surface,
+ XDG_SURFACE_GET_POPUP, &xdg_popup_interface, NULL, parent, positioner);
+
+ return (struct xdg_popup *) id;
+}
+
+/**
+ * @ingroup iface_xdg_surface
+ *
+ * The window geometry of a surface is its "visible bounds" from the
+ * user's perspective. Client-side decorations often have invisible
+ * portions like drop-shadows which should be ignored for the
+ * purposes of aligning, placing and constraining windows.
+ *
+ * The window geometry is double buffered, and will be applied at the
+ * time wl_surface.commit of the corresponding wl_surface is called.
+ *
+ * When maintaining a position, the compositor should treat the (x, y)
+ * coordinate of the window geometry as the top left corner of the window.
+ * A client changing the (x, y) window geometry coordinate should in
+ * general not alter the position of the window.
+ *
+ * Once the window geometry of the surface is set, it is not possible to
+ * unset it, and it will remain the same until set_window_geometry is
+ * called again, even if a new subsurface or buffer is attached.
+ *
+ * If never set, the value is the full bounds of the surface,
+ * including any subsurfaces. This updates dynamically on every
+ * commit. This unset is meant for extremely simple clients.
+ *
+ * The arguments are given in the surface-local coordinate space of
+ * the wl_surface associated with this xdg_surface.
+ *
+ * The width and height must be greater than zero. Setting an invalid size
+ * will raise an error. When applied, the effective window geometry will be
+ * the set window geometry clamped to the bounding rectangle of the
+ * combined geometry of the surface of the xdg_surface and the associated
+ * subsurfaces.
+ */
+static inline void
+xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_surface,
+ XDG_SURFACE_SET_WINDOW_GEOMETRY, x, y, width, height);
+}
+
+/**
+ * @ingroup iface_xdg_surface
+ *
+ * When a configure event is received, if a client commits the
+ * surface in response to the configure event, then the client
+ * must make an ack_configure request sometime before the commit
+ * request, passing along the serial of the configure event.
+ *
+ * For instance, for toplevel surfaces the compositor might use this
+ * information to move a surface to the top left only when the client has
+ * drawn itself for the maximized or fullscreen state.
+ *
+ * If the client receives multiple configure events before it
+ * can respond to one, it only has to ack the last configure event.
+ *
+ * A client is not required to commit immediately after sending
+ * an ack_configure request - it may even ack_configure several times
+ * before its next surface commit.
+ *
+ * A client may send multiple ack_configure requests before committing, but
+ * only the last request sent before a commit indicates which configure
+ * event the client really is responding to.
+ */
+static inline void
+xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_surface,
+ XDG_SURFACE_ACK_CONFIGURE, serial);
+}
+
+#ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM
+#define XDG_TOPLEVEL_RESIZE_EDGE_ENUM
+/**
+ * @ingroup iface_xdg_toplevel
+ * edge values for resizing
+ *
+ * These values are used to indicate which edge of a surface
+ * is being dragged in a resize operation.
+ */
+enum xdg_toplevel_resize_edge {
+ XDG_TOPLEVEL_RESIZE_EDGE_NONE = 0,
+ XDG_TOPLEVEL_RESIZE_EDGE_TOP = 1,
+ XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM = 2,
+ XDG_TOPLEVEL_RESIZE_EDGE_LEFT = 4,
+ XDG_TOPLEVEL_RESIZE_EDGE_TOP_LEFT = 5,
+ XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_LEFT = 6,
+ XDG_TOPLEVEL_RESIZE_EDGE_RIGHT = 8,
+ XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT = 9,
+ XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT = 10,
+};
+#endif /* XDG_TOPLEVEL_RESIZE_EDGE_ENUM */
+
+#ifndef XDG_TOPLEVEL_STATE_ENUM
+#define XDG_TOPLEVEL_STATE_ENUM
+/**
+ * @ingroup iface_xdg_toplevel
+ * the surface’s bottom edge is tiled
+ *
+ * The window is currently in a tiled layout and the bottom edge is
+ * considered to be adjacent to another part of the tiling grid.
+ */
+enum xdg_toplevel_state {
+ /**
+ * the surface is maximized
+ */
+ XDG_TOPLEVEL_STATE_MAXIMIZED = 1,
+ /**
+ * the surface is fullscreen
+ */
+ XDG_TOPLEVEL_STATE_FULLSCREEN = 2,
+ /**
+ * the surface is being resized
+ */
+ XDG_TOPLEVEL_STATE_RESIZING = 3,
+ /**
+ * the surface is now activated
+ */
+ XDG_TOPLEVEL_STATE_ACTIVATED = 4,
+ /**
+ * @since 2
+ */
+ XDG_TOPLEVEL_STATE_TILED_LEFT = 5,
+ /**
+ * @since 2
+ */
+ XDG_TOPLEVEL_STATE_TILED_RIGHT = 6,
+ /**
+ * @since 2
+ */
+ XDG_TOPLEVEL_STATE_TILED_TOP = 7,
+ /**
+ * @since 2
+ */
+ XDG_TOPLEVEL_STATE_TILED_BOTTOM = 8,
+};
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION 2
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION 2
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_TILED_TOP_SINCE_VERSION 2
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_TILED_BOTTOM_SINCE_VERSION 2
+#endif /* XDG_TOPLEVEL_STATE_ENUM */
+
+/**
+ * @ingroup iface_xdg_toplevel
+ * @struct xdg_toplevel_listener
+ */
+struct xdg_toplevel_listener {
+ /**
+ * suggest a surface change
+ *
+ * This configure event asks the client to resize its toplevel
+ * surface or to change its state. The configured state should not
+ * be applied immediately. See xdg_surface.configure for details.
+ *
+ * The width and height arguments specify a hint to the window
+ * about how its surface should be resized in window geometry
+ * coordinates. See set_window_geometry.
+ *
+ * If the width or height arguments are zero, it means the client
+ * should decide its own window dimension. This may happen when the
+ * compositor needs to configure the state of the surface but
+ * doesn't have any information about any previous or expected
+ * dimension.
+ *
+ * The states listed in the event specify how the width/height
+ * arguments should be interpreted, and possibly how it should be
+ * drawn.
+ *
+ * Clients must send an ack_configure in response to this event.
+ * See xdg_surface.configure and xdg_surface.ack_configure for
+ * details.
+ */
+ void (*configure)(void *data,
+ struct xdg_toplevel *xdg_toplevel,
+ int32_t width,
+ int32_t height,
+ struct wl_array *states);
+ /**
+ * surface wants to be closed
+ *
+ * The close event is sent by the compositor when the user wants
+ * the surface to be closed. This should be equivalent to the user
+ * clicking the close button in client-side decorations, if your
+ * application has any.
+ *
+ * This is only a request that the user intends to close the
+ * window. The client may choose to ignore this request, or show a
+ * dialog to ask the user to save their data, etc.
+ */
+ void (*close)(void *data,
+ struct xdg_toplevel *xdg_toplevel);
+};
+
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+static inline int
+xdg_toplevel_add_listener(struct xdg_toplevel *xdg_toplevel,
+ const struct xdg_toplevel_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) xdg_toplevel,
+ (void (**)(void)) listener, data);
+}
+
+#define XDG_TOPLEVEL_DESTROY 0
+#define XDG_TOPLEVEL_SET_PARENT 1
+#define XDG_TOPLEVEL_SET_TITLE 2
+#define XDG_TOPLEVEL_SET_APP_ID 3
+#define XDG_TOPLEVEL_SHOW_WINDOW_MENU 4
+#define XDG_TOPLEVEL_MOVE 5
+#define XDG_TOPLEVEL_RESIZE 6
+#define XDG_TOPLEVEL_SET_MAX_SIZE 7
+#define XDG_TOPLEVEL_SET_MIN_SIZE 8
+#define XDG_TOPLEVEL_SET_MAXIMIZED 9
+#define XDG_TOPLEVEL_UNSET_MAXIMIZED 10
+#define XDG_TOPLEVEL_SET_FULLSCREEN 11
+#define XDG_TOPLEVEL_UNSET_FULLSCREEN 12
+#define XDG_TOPLEVEL_SET_MINIMIZED 13
+
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_CONFIGURE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_CLOSE_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_PARENT_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_TITLE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_APP_ID_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SHOW_WINDOW_MENU_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_MOVE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_RESIZE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_MAX_SIZE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_MIN_SIZE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_MAXIMIZED_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_UNSET_MAXIMIZED_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_FULLSCREEN_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_UNSET_FULLSCREEN_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_SET_MINIMIZED_SINCE_VERSION 1
+
+/** @ingroup iface_xdg_toplevel */
+static inline void
+xdg_toplevel_set_user_data(struct xdg_toplevel *xdg_toplevel, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel, user_data);
+}
+
+/** @ingroup iface_xdg_toplevel */
+static inline void *
+xdg_toplevel_get_user_data(struct xdg_toplevel *xdg_toplevel)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel);
+}
+
+static inline uint32_t
+xdg_toplevel_get_version(struct xdg_toplevel *xdg_toplevel)
+{
+ return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * This request destroys the role surface and unmaps the surface;
+ * see "Unmapping" behavior in interface section for details.
+ */
+static inline void
+xdg_toplevel_destroy(struct xdg_toplevel *xdg_toplevel)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) xdg_toplevel);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Set the "parent" of this surface. This surface should be stacked
+ * above the parent surface and all other ancestor surfaces.
+ *
+ * Parent windows should be set on dialogs, toolboxes, or other
+ * "auxiliary" surfaces, so that the parent is raised when the dialog
+ * is raised.
+ *
+ * Setting a null parent for a child window removes any parent-child
+ * relationship for the child. Setting a null parent for a window which
+ * currently has no parent is a no-op.
+ *
+ * If the parent is unmapped then its children are managed as
+ * though the parent of the now-unmapped parent has become the
+ * parent of this surface. If no parent exists for the now-unmapped
+ * parent then the children are managed as though they have no
+ * parent surface.
+ */
+static inline void
+xdg_toplevel_set_parent(struct xdg_toplevel *xdg_toplevel, struct xdg_toplevel *parent)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_PARENT, parent);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Set a short title for the surface.
+ *
+ * This string may be used to identify the surface in a task bar,
+ * window list, or other user interface elements provided by the
+ * compositor.
+ *
+ * The string must be encoded in UTF-8.
+ */
+static inline void
+xdg_toplevel_set_title(struct xdg_toplevel *xdg_toplevel, const char *title)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_TITLE, title);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Set an application identifier for the surface.
+ *
+ * The app ID identifies the general class of applications to which
+ * the surface belongs. The compositor can use this to group multiple
+ * surfaces together, or to determine how to launch a new application.
+ *
+ * For D-Bus activatable applications, the app ID is used as the D-Bus
+ * service name.
+ *
+ * The compositor shell will try to group application surfaces together
+ * by their app ID. As a best practice, it is suggested to select app
+ * ID's that match the basename of the application's .desktop file.
+ * For example, "org.freedesktop.FooViewer" where the .desktop file is
+ * "org.freedesktop.FooViewer.desktop".
+ *
+ * Like other properties, a set_app_id request can be sent after the
+ * xdg_toplevel has been mapped to update the property.
+ *
+ * See the desktop-entry specification [0] for more details on
+ * application identifiers and how they relate to well-known D-Bus
+ * names and .desktop files.
+ *
+ * [0] http://standards.freedesktop.org/desktop-entry-spec/
+ */
+static inline void
+xdg_toplevel_set_app_id(struct xdg_toplevel *xdg_toplevel, const char *app_id)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_APP_ID, app_id);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Clients implementing client-side decorations might want to show
+ * a context menu when right-clicking on the decorations, giving the
+ * user a menu that they can use to maximize or minimize the window.
+ *
+ * This request asks the compositor to pop up such a window menu at
+ * the given position, relative to the local surface coordinates of
+ * the parent surface. There are no guarantees as to what menu items
+ * the window menu contains.
+ *
+ * This request must be used in response to some sort of user action
+ * like a button press, key press, or touch down event.
+ */
+static inline void
+xdg_toplevel_show_window_menu(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SHOW_WINDOW_MENU, seat, serial, x, y);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Start an interactive, user-driven move of the surface.
+ *
+ * This request must be used in response to some sort of user action
+ * like a button press, key press, or touch down event. The passed
+ * serial is used to determine the type of interactive move (touch,
+ * pointer, etc).
+ *
+ * The server may ignore move requests depending on the state of
+ * the surface (e.g. fullscreen or maximized), or if the passed serial
+ * is no longer valid.
+ *
+ * If triggered, the surface will lose the focus of the device
+ * (wl_pointer, wl_touch, etc) used for the move. It is up to the
+ * compositor to visually indicate that the move is taking place, such as
+ * updating a pointer cursor, during the move. There is no guarantee
+ * that the device focus will return when the move is completed.
+ */
+static inline void
+xdg_toplevel_move(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_MOVE, seat, serial);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Start a user-driven, interactive resize of the surface.
+ *
+ * This request must be used in response to some sort of user action
+ * like a button press, key press, or touch down event. The passed
+ * serial is used to determine the type of interactive resize (touch,
+ * pointer, etc).
+ *
+ * The server may ignore resize requests depending on the state of
+ * the surface (e.g. fullscreen or maximized).
+ *
+ * If triggered, the client will receive configure events with the
+ * "resize" state enum value and the expected sizes. See the "resize"
+ * enum value for more details about what is required. The client
+ * must also acknowledge configure events using "ack_configure". After
+ * the resize is completed, the client will receive another "configure"
+ * event without the resize state.
+ *
+ * If triggered, the surface also will lose the focus of the device
+ * (wl_pointer, wl_touch, etc) used for the resize. It is up to the
+ * compositor to visually indicate that the resize is taking place,
+ * such as updating a pointer cursor, during the resize. There is no
+ * guarantee that the device focus will return when the resize is
+ * completed.
+ *
+ * The edges parameter specifies how the surface should be resized,
+ * and is one of the values of the resize_edge enum. The compositor
+ * may use this information to update the surface position for
+ * example when dragging the top left corner. The compositor may also
+ * use this information to adapt its behavior, e.g. choose an
+ * appropriate cursor image.
+ */
+static inline void
+xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, uint32_t edges)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_RESIZE, seat, serial, edges);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Set a maximum size for the window.
+ *
+ * The client can specify a maximum size so that the compositor does
+ * not try to configure the window beyond this size.
+ *
+ * The width and height arguments are in window geometry coordinates.
+ * See xdg_surface.set_window_geometry.
+ *
+ * Values set in this way are double-buffered. They will get applied
+ * on the next commit.
+ *
+ * The compositor can use this information to allow or disallow
+ * different states like maximize or fullscreen and draw accurate
+ * animations.
+ *
+ * Similarly, a tiling window manager may use this information to
+ * place and resize client windows in a more effective way.
+ *
+ * The client should not rely on the compositor to obey the maximum
+ * size. The compositor may decide to ignore the values set by the
+ * client and request a larger size.
+ *
+ * If never set, or a value of zero in the request, means that the
+ * client has no expected maximum size in the given dimension.
+ * As a result, a client wishing to reset the maximum size
+ * to an unspecified state can use zero for width and height in the
+ * request.
+ *
+ * Requesting a maximum size to be smaller than the minimum size of
+ * a surface is illegal and will result in a protocol error.
+ *
+ * The width and height must be greater than or equal to zero. Using
+ * strictly negative values for width and height will result in a
+ * protocol error.
+ */
+static inline void
+xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_MAX_SIZE, width, height);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Set a minimum size for the window.
+ *
+ * The client can specify a minimum size so that the compositor does
+ * not try to configure the window below this size.
+ *
+ * The width and height arguments are in window geometry coordinates.
+ * See xdg_surface.set_window_geometry.
+ *
+ * Values set in this way are double-buffered. They will get applied
+ * on the next commit.
+ *
+ * The compositor can use this information to allow or disallow
+ * different states like maximize or fullscreen and draw accurate
+ * animations.
+ *
+ * Similarly, a tiling window manager may use this information to
+ * place and resize client windows in a more effective way.
+ *
+ * The client should not rely on the compositor to obey the minimum
+ * size. The compositor may decide to ignore the values set by the
+ * client and request a smaller size.
+ *
+ * If never set, or a value of zero in the request, means that the
+ * client has no expected minimum size in the given dimension.
+ * As a result, a client wishing to reset the minimum size
+ * to an unspecified state can use zero for width and height in the
+ * request.
+ *
+ * Requesting a minimum size to be larger than the maximum size of
+ * a surface is illegal and will result in a protocol error.
+ *
+ * The width and height must be greater than or equal to zero. Using
+ * strictly negative values for width and height will result in a
+ * protocol error.
+ */
+static inline void
+xdg_toplevel_set_min_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_MIN_SIZE, width, height);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Maximize the surface.
+ *
+ * After requesting that the surface should be maximized, the compositor
+ * will respond by emitting a configure event. Whether this configure
+ * actually sets the window maximized is subject to compositor policies.
+ * The client must then update its content, drawing in the configured
+ * state. The client must also acknowledge the configure when committing
+ * the new content (see ack_configure).
+ *
+ * It is up to the compositor to decide how and where to maximize the
+ * surface, for example which output and what region of the screen should
+ * be used.
+ *
+ * If the surface was already maximized, the compositor will still emit
+ * a configure event with the "maximized" state.
+ *
+ * If the surface is in a fullscreen state, this request has no direct
+ * effect. It may alter the state the surface is returned to when
+ * unmaximized unless overridden by the compositor.
+ */
+static inline void
+xdg_toplevel_set_maximized(struct xdg_toplevel *xdg_toplevel)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_MAXIMIZED);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Unmaximize the surface.
+ *
+ * After requesting that the surface should be unmaximized, the compositor
+ * will respond by emitting a configure event. Whether this actually
+ * un-maximizes the window is subject to compositor policies.
+ * If available and applicable, the compositor will include the window
+ * geometry dimensions the window had prior to being maximized in the
+ * configure event. The client must then update its content, drawing it in
+ * the configured state. The client must also acknowledge the configure
+ * when committing the new content (see ack_configure).
+ *
+ * It is up to the compositor to position the surface after it was
+ * unmaximized; usually the position the surface had before maximizing, if
+ * applicable.
+ *
+ * If the surface was already not maximized, the compositor will still
+ * emit a configure event without the "maximized" state.
+ *
+ * If the surface is in a fullscreen state, this request has no direct
+ * effect. It may alter the state the surface is returned to when
+ * unmaximized unless overridden by the compositor.
+ */
+static inline void
+xdg_toplevel_unset_maximized(struct xdg_toplevel *xdg_toplevel)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_UNSET_MAXIMIZED);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Make the surface fullscreen.
+ *
+ * After requesting that the surface should be fullscreened, the
+ * compositor will respond by emitting a configure event. Whether the
+ * client is actually put into a fullscreen state is subject to compositor
+ * policies. The client must also acknowledge the configure when
+ * committing the new content (see ack_configure).
+ *
+ * The output passed by the request indicates the client's preference as
+ * to which display it should be set fullscreen on. If this value is NULL,
+ * it's up to the compositor to choose which display will be used to map
+ * this surface.
+ *
+ * If the surface doesn't cover the whole output, the compositor will
+ * position the surface in the center of the output and compensate with
+ * with border fill covering the rest of the output. The content of the
+ * border fill is undefined, but should be assumed to be in some way that
+ * attempts to blend into the surrounding area (e.g. solid black).
+ *
+ * If the fullscreened surface is not opaque, the compositor must make
+ * sure that other screen content not part of the same surface tree (made
+ * up of subsurfaces, popups or similarly coupled surfaces) are not
+ * visible below the fullscreened surface.
+ */
+static inline void
+xdg_toplevel_set_fullscreen(struct xdg_toplevel *xdg_toplevel, struct wl_output *output)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_FULLSCREEN, output);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Make the surface no longer fullscreen.
+ *
+ * After requesting that the surface should be unfullscreened, the
+ * compositor will respond by emitting a configure event.
+ * Whether this actually removes the fullscreen state of the client is
+ * subject to compositor policies.
+ *
+ * Making a surface unfullscreen sets states for the surface based on the following:
+ * * the state(s) it may have had before becoming fullscreen
+ * * any state(s) decided by the compositor
+ * * any state(s) requested by the client while the surface was fullscreen
+ *
+ * The compositor may include the previous window geometry dimensions in
+ * the configure event, if applicable.
+ *
+ * The client must also acknowledge the configure when committing the new
+ * content (see ack_configure).
+ */
+static inline void
+xdg_toplevel_unset_fullscreen(struct xdg_toplevel *xdg_toplevel)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_UNSET_FULLSCREEN);
+}
+
+/**
+ * @ingroup iface_xdg_toplevel
+ *
+ * Request that the compositor minimize your surface. There is no
+ * way to know if the surface is currently minimized, nor is there
+ * any way to unset minimization on this surface.
+ *
+ * If you are looking to throttle redrawing when minimized, please
+ * instead use the wl_surface.frame event for this, as this will
+ * also work with live previews on windows in Alt-Tab, Expose or
+ * similar compositor features.
+ */
+static inline void
+xdg_toplevel_set_minimized(struct xdg_toplevel *xdg_toplevel)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_toplevel,
+ XDG_TOPLEVEL_SET_MINIMIZED);
+}
+
+#ifndef XDG_POPUP_ERROR_ENUM
+#define XDG_POPUP_ERROR_ENUM
+enum xdg_popup_error {
+ /**
+ * tried to grab after being mapped
+ */
+ XDG_POPUP_ERROR_INVALID_GRAB = 0,
+};
+#endif /* XDG_POPUP_ERROR_ENUM */
+
+/**
+ * @ingroup iface_xdg_popup
+ * @struct xdg_popup_listener
+ */
+struct xdg_popup_listener {
+ /**
+ * configure the popup surface
+ *
+ * This event asks the popup surface to configure itself given
+ * the configuration. The configured state should not be applied
+ * immediately. See xdg_surface.configure for details.
+ *
+ * The x and y arguments represent the position the popup was
+ * placed at given the xdg_positioner rule, relative to the upper
+ * left corner of the window geometry of the parent surface.
+ *
+ * For version 2 or older, the configure event for an xdg_popup is
+ * only ever sent once for the initial configuration. Starting with
+ * version 3, it may be sent again if the popup is setup with an
+ * xdg_positioner with set_reactive requested, or in response to
+ * xdg_popup.reposition requests.
+ * @param x x position relative to parent surface window geometry
+ * @param y y position relative to parent surface window geometry
+ * @param width window geometry width
+ * @param height window geometry height
+ */
+ void (*configure)(void *data,
+ struct xdg_popup *xdg_popup,
+ int32_t x,
+ int32_t y,
+ int32_t width,
+ int32_t height);
+ /**
+ * popup interaction is done
+ *
+ * The popup_done event is sent out when a popup is dismissed by
+ * the compositor. The client should destroy the xdg_popup object
+ * at this point.
+ */
+ void (*popup_done)(void *data,
+ struct xdg_popup *xdg_popup);
+ /**
+ * signal the completion of a repositioned request
+ *
+ * The repositioned event is sent as part of a popup
+ * configuration sequence, together with xdg_popup.configure and
+ * lastly xdg_surface.configure to notify the completion of a
+ * reposition request.
+ *
+ * The repositioned event is to notify about the completion of a
+ * xdg_popup.reposition request. The token argument is the token
+ * passed in the xdg_popup.reposition request.
+ *
+ * Immediately after this event is emitted, xdg_popup.configure and
+ * xdg_surface.configure will be sent with the updated size and
+ * position, as well as a new configure serial.
+ *
+ * The client should optionally update the content of the popup,
+ * but must acknowledge the new popup configuration for the new
+ * position to take effect. See xdg_surface.ack_configure for
+ * details.
+ * @param token reposition request token
+ * @since 3
+ */
+ void (*repositioned)(void *data,
+ struct xdg_popup *xdg_popup,
+ uint32_t token);
+};
+
+/**
+ * @ingroup iface_xdg_popup
+ */
+static inline int
+xdg_popup_add_listener(struct xdg_popup *xdg_popup,
+ const struct xdg_popup_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) xdg_popup,
+ (void (**)(void)) listener, data);
+}
+
+#define XDG_POPUP_DESTROY 0
+#define XDG_POPUP_GRAB 1
+#define XDG_POPUP_REPOSITION 2
+
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_CONFIGURE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_REPOSITIONED_SINCE_VERSION 3
+
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_GRAB_SINCE_VERSION 1
+/**
+ * @ingroup iface_xdg_popup
+ */
+#define XDG_POPUP_REPOSITION_SINCE_VERSION 3
+
+/** @ingroup iface_xdg_popup */
+static inline void
+xdg_popup_set_user_data(struct xdg_popup *xdg_popup, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) xdg_popup, user_data);
+}
+
+/** @ingroup iface_xdg_popup */
+static inline void *
+xdg_popup_get_user_data(struct xdg_popup *xdg_popup)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) xdg_popup);
+}
+
+static inline uint32_t
+xdg_popup_get_version(struct xdg_popup *xdg_popup)
+{
+ return wl_proxy_get_version((struct wl_proxy *) xdg_popup);
+}
+
+/**
+ * @ingroup iface_xdg_popup
+ *
+ * This destroys the popup. Explicitly destroying the xdg_popup
+ * object will also dismiss the popup, and unmap the surface.
+ *
+ * If this xdg_popup is not the "topmost" popup, a protocol error
+ * will be sent.
+ */
+static inline void
+xdg_popup_destroy(struct xdg_popup *xdg_popup)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_popup,
+ XDG_POPUP_DESTROY);
+
+ wl_proxy_destroy((struct wl_proxy *) xdg_popup);
+}
+
+/**
+ * @ingroup iface_xdg_popup
+ *
+ * This request makes the created popup take an explicit grab. An explicit
+ * grab will be dismissed when the user dismisses the popup, or when the
+ * client destroys the xdg_popup. This can be done by the user clicking
+ * outside the surface, using the keyboard, or even locking the screen
+ * through closing the lid or a timeout.
+ *
+ * If the compositor denies the grab, the popup will be immediately
+ * dismissed.
+ *
+ * This request must be used in response to some sort of user action like a
+ * button press, key press, or touch down event. The serial number of the
+ * event should be passed as 'serial'.
+ *
+ * The parent of a grabbing popup must either be an xdg_toplevel surface or
+ * another xdg_popup with an explicit grab. If the parent is another
+ * xdg_popup it means that the popups are nested, with this popup now being
+ * the topmost popup.
+ *
+ * Nested popups must be destroyed in the reverse order they were created
+ * in, e.g. the only popup you are allowed to destroy at all times is the
+ * topmost one.
+ *
+ * When compositors choose to dismiss a popup, they may dismiss every
+ * nested grabbing popup as well. When a compositor dismisses popups, it
+ * will follow the same dismissing order as required from the client.
+ *
+ * The parent of a grabbing popup must either be another xdg_popup with an
+ * active explicit grab, or an xdg_popup or xdg_toplevel, if there are no
+ * explicit grabs already taken.
+ *
+ * If the topmost grabbing popup is destroyed, the grab will be returned to
+ * the parent of the popup, if that parent previously had an explicit grab.
+ *
+ * If the parent is a grabbing popup which has already been dismissed, this
+ * popup will be immediately dismissed. If the parent is a popup that did
+ * not take an explicit grab, an error will be raised.
+ *
+ * During a popup grab, the client owning the grab will receive pointer
+ * and touch events for all their surfaces as normal (similar to an
+ * "owner-events" grab in X11 parlance), while the top most grabbing popup
+ * will always have keyboard focus.
+ */
+static inline void
+xdg_popup_grab(struct xdg_popup *xdg_popup, struct wl_seat *seat, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_popup,
+ XDG_POPUP_GRAB, seat, serial);
+}
+
+/**
+ * @ingroup iface_xdg_popup
+ *
+ * Reposition an already-mapped popup. The popup will be placed given the
+ * details in the passed xdg_positioner object, and a
+ * xdg_popup.repositioned followed by xdg_popup.configure and
+ * xdg_surface.configure will be emitted in response. Any parameters set
+ * by the previous positioner will be discarded.
+ *
+ * The passed token will be sent in the corresponding
+ * xdg_popup.repositioned event. The new popup position will not take
+ * effect until the corresponding configure event is acknowledged by the
+ * client. See xdg_popup.repositioned for details. The token itself is
+ * opaque, and has no other special meaning.
+ *
+ * If multiple reposition requests are sent, the compositor may skip all
+ * but the last one.
+ *
+ * If the popup is repositioned in response to a configure event for its
+ * parent, the client should send an xdg_positioner.set_parent_configure
+ * and possibly an xdg_positioner.set_parent_size request to allow the
+ * compositor to properly constrain the popup.
+ *
+ * If the popup is repositioned together with a parent that is being
+ * resized, but not in response to a configure event, the client should
+ * send an xdg_positioner.set_parent_size request.
+ */
+static inline void
+xdg_popup_reposition(struct xdg_popup *xdg_popup, struct xdg_positioner *positioner, uint32_t token)
+{
+ wl_proxy_marshal((struct wl_proxy *) xdg_popup,
+ XDG_POPUP_REPOSITION, positioner, token);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.c
new file mode 100644
index 0000000..72ad11d
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.c
@@ -0,0 +1,798 @@
+//========================================================================
+// GLFW 3.3 WGL - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <stdlib.h>
+#include <malloc.h>
+#include <assert.h>
+
+// Return the value corresponding to the specified attribute
+//
+static int findPixelFormatAttribValue(const int* attribs,
+ int attribCount,
+ const int* values,
+ int attrib)
+{
+ int i;
+
+ for (i = 0; i < attribCount; i++)
+ {
+ if (attribs[i] == attrib)
+ return values[i];
+ }
+
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Unknown pixel format attribute requested");
+ return 0;
+}
+
+#define addAttrib(a) \
+{ \
+ assert((size_t) attribCount < sizeof(attribs) / sizeof(attribs[0])); \
+ attribs[attribCount++] = a; \
+}
+#define findAttribValue(a) \
+ findPixelFormatAttribValue(attribs, attribCount, values, a)
+
+// Return a list of available and usable framebuffer configs
+//
+static int choosePixelFormat(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ _GLFWfbconfig* usableConfigs;
+ const _GLFWfbconfig* closest;
+ int i, pixelFormat, nativeCount, usableCount = 0, attribCount = 0;
+ int attribs[40];
+ int values[sizeof(attribs) / sizeof(attribs[0])];
+
+ if (_glfw.wgl.ARB_pixel_format)
+ {
+ const int attrib = WGL_NUMBER_PIXEL_FORMATS_ARB;
+
+ if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,
+ 1, 0, 1, &attrib, &nativeCount))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to retrieve pixel format attribute");
+ return 0;
+ }
+
+ addAttrib(WGL_SUPPORT_OPENGL_ARB);
+ addAttrib(WGL_DRAW_TO_WINDOW_ARB);
+ addAttrib(WGL_PIXEL_TYPE_ARB);
+ addAttrib(WGL_ACCELERATION_ARB);
+ addAttrib(WGL_RED_BITS_ARB);
+ addAttrib(WGL_RED_SHIFT_ARB);
+ addAttrib(WGL_GREEN_BITS_ARB);
+ addAttrib(WGL_GREEN_SHIFT_ARB);
+ addAttrib(WGL_BLUE_BITS_ARB);
+ addAttrib(WGL_BLUE_SHIFT_ARB);
+ addAttrib(WGL_ALPHA_BITS_ARB);
+ addAttrib(WGL_ALPHA_SHIFT_ARB);
+ addAttrib(WGL_DEPTH_BITS_ARB);
+ addAttrib(WGL_STENCIL_BITS_ARB);
+ addAttrib(WGL_ACCUM_BITS_ARB);
+ addAttrib(WGL_ACCUM_RED_BITS_ARB);
+ addAttrib(WGL_ACCUM_GREEN_BITS_ARB);
+ addAttrib(WGL_ACCUM_BLUE_BITS_ARB);
+ addAttrib(WGL_ACCUM_ALPHA_BITS_ARB);
+ addAttrib(WGL_AUX_BUFFERS_ARB);
+ addAttrib(WGL_STEREO_ARB);
+ addAttrib(WGL_DOUBLE_BUFFER_ARB);
+
+ if (_glfw.wgl.ARB_multisample)
+ addAttrib(WGL_SAMPLES_ARB);
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (_glfw.wgl.ARB_framebuffer_sRGB || _glfw.wgl.EXT_framebuffer_sRGB)
+ addAttrib(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB);
+ }
+ else
+ {
+ if (_glfw.wgl.EXT_colorspace)
+ addAttrib(WGL_COLORSPACE_EXT);
+ }
+ }
+ else
+ {
+ nativeCount = DescribePixelFormat(window->context.wgl.dc,
+ 1,
+ sizeof(PIXELFORMATDESCRIPTOR),
+ NULL);
+ }
+
+ usableConfigs = calloc(nativeCount, sizeof(_GLFWfbconfig));
+
+ for (i = 0; i < nativeCount; i++)
+ {
+ _GLFWfbconfig* u = usableConfigs + usableCount;
+ pixelFormat = i + 1;
+
+ if (_glfw.wgl.ARB_pixel_format)
+ {
+ // Get pixel format attributes through "modern" extension
+
+ if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,
+ pixelFormat, 0,
+ attribCount,
+ attribs, values))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to retrieve pixel format attributes");
+
+ free(usableConfigs);
+ return 0;
+ }
+
+ if (!findAttribValue(WGL_SUPPORT_OPENGL_ARB) ||
+ !findAttribValue(WGL_DRAW_TO_WINDOW_ARB))
+ {
+ continue;
+ }
+
+ if (findAttribValue(WGL_PIXEL_TYPE_ARB) != WGL_TYPE_RGBA_ARB)
+ continue;
+
+ if (findAttribValue(WGL_ACCELERATION_ARB) == WGL_NO_ACCELERATION_ARB)
+ continue;
+
+ if (findAttribValue(WGL_DOUBLE_BUFFER_ARB) != fbconfig->doublebuffer)
+ continue;
+
+ u->redBits = findAttribValue(WGL_RED_BITS_ARB);
+ u->greenBits = findAttribValue(WGL_GREEN_BITS_ARB);
+ u->blueBits = findAttribValue(WGL_BLUE_BITS_ARB);
+ u->alphaBits = findAttribValue(WGL_ALPHA_BITS_ARB);
+
+ u->depthBits = findAttribValue(WGL_DEPTH_BITS_ARB);
+ u->stencilBits = findAttribValue(WGL_STENCIL_BITS_ARB);
+
+ u->accumRedBits = findAttribValue(WGL_ACCUM_RED_BITS_ARB);
+ u->accumGreenBits = findAttribValue(WGL_ACCUM_GREEN_BITS_ARB);
+ u->accumBlueBits = findAttribValue(WGL_ACCUM_BLUE_BITS_ARB);
+ u->accumAlphaBits = findAttribValue(WGL_ACCUM_ALPHA_BITS_ARB);
+
+ u->auxBuffers = findAttribValue(WGL_AUX_BUFFERS_ARB);
+
+ if (findAttribValue(WGL_STEREO_ARB))
+ u->stereo = GLFW_TRUE;
+
+ if (_glfw.wgl.ARB_multisample)
+ u->samples = findAttribValue(WGL_SAMPLES_ARB);
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (_glfw.wgl.ARB_framebuffer_sRGB ||
+ _glfw.wgl.EXT_framebuffer_sRGB)
+ {
+ if (findAttribValue(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB))
+ u->sRGB = GLFW_TRUE;
+ }
+ }
+ else
+ {
+ if (_glfw.wgl.EXT_colorspace)
+ {
+ if (findAttribValue(WGL_COLORSPACE_EXT) == WGL_COLORSPACE_SRGB_EXT)
+ u->sRGB = GLFW_TRUE;
+ }
+ }
+ }
+ else
+ {
+ // Get pixel format attributes through legacy PFDs
+
+ PIXELFORMATDESCRIPTOR pfd;
+
+ if (!DescribePixelFormat(window->context.wgl.dc,
+ pixelFormat,
+ sizeof(PIXELFORMATDESCRIPTOR),
+ &pfd))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to describe pixel format");
+
+ free(usableConfigs);
+ return 0;
+ }
+
+ if (!(pfd.dwFlags & PFD_DRAW_TO_WINDOW) ||
+ !(pfd.dwFlags & PFD_SUPPORT_OPENGL))
+ {
+ continue;
+ }
+
+ if (!(pfd.dwFlags & PFD_GENERIC_ACCELERATED) &&
+ (pfd.dwFlags & PFD_GENERIC_FORMAT))
+ {
+ continue;
+ }
+
+ if (pfd.iPixelType != PFD_TYPE_RGBA)
+ continue;
+
+ if (!!(pfd.dwFlags & PFD_DOUBLEBUFFER) != fbconfig->doublebuffer)
+ continue;
+
+ u->redBits = pfd.cRedBits;
+ u->greenBits = pfd.cGreenBits;
+ u->blueBits = pfd.cBlueBits;
+ u->alphaBits = pfd.cAlphaBits;
+
+ u->depthBits = pfd.cDepthBits;
+ u->stencilBits = pfd.cStencilBits;
+
+ u->accumRedBits = pfd.cAccumRedBits;
+ u->accumGreenBits = pfd.cAccumGreenBits;
+ u->accumBlueBits = pfd.cAccumBlueBits;
+ u->accumAlphaBits = pfd.cAccumAlphaBits;
+
+ u->auxBuffers = pfd.cAuxBuffers;
+
+ if (pfd.dwFlags & PFD_STEREO)
+ u->stereo = GLFW_TRUE;
+ }
+
+ u->handle = pixelFormat;
+ usableCount++;
+ }
+
+ if (!usableCount)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "WGL: The driver does not appear to support OpenGL");
+
+ free(usableConfigs);
+ return 0;
+ }
+
+ closest = _glfwChooseFBConfig(fbconfig, usableConfigs, usableCount);
+ if (!closest)
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "WGL: Failed to find a suitable pixel format");
+
+ free(usableConfigs);
+ return 0;
+ }
+
+ pixelFormat = (int) closest->handle;
+ free(usableConfigs);
+
+ return pixelFormat;
+}
+
+#undef addAttrib
+#undef findAttribValue
+
+static void makeContextCurrentWGL(_GLFWwindow* window)
+{
+ if (window)
+ {
+ if (wglMakeCurrent(window->context.wgl.dc, window->context.wgl.handle))
+ _glfwPlatformSetTls(&_glfw.contextSlot, window);
+ else
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to make context current");
+ _glfwPlatformSetTls(&_glfw.contextSlot, NULL);
+ }
+ }
+ else
+ {
+ if (!wglMakeCurrent(NULL, NULL))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to clear current context");
+ }
+
+ _glfwPlatformSetTls(&_glfw.contextSlot, NULL);
+ }
+}
+
+static void swapBuffersWGL(_GLFWwindow* window)
+{
+ if (!window->monitor)
+ {
+ if (IsWindowsVistaOrGreater())
+ {
+ // DWM Composition is always enabled on Win8+
+ BOOL enabled = IsWindows8OrGreater();
+
+ // HACK: Use DwmFlush when desktop composition is enabled
+ if (enabled ||
+ (SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled))
+ {
+ int count = abs(window->context.wgl.interval);
+ while (count--)
+ DwmFlush();
+ }
+ }
+ }
+
+ SwapBuffers(window->context.wgl.dc);
+}
+
+static void swapIntervalWGL(int interval)
+{
+ _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
+
+ window->context.wgl.interval = interval;
+
+ if (!window->monitor)
+ {
+ if (IsWindowsVistaOrGreater())
+ {
+ // DWM Composition is always enabled on Win8+
+ BOOL enabled = IsWindows8OrGreater();
+
+ // HACK: Disable WGL swap interval when desktop composition is enabled to
+ // avoid interfering with DWM vsync
+ if (enabled ||
+ (SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled))
+ interval = 0;
+ }
+ }
+
+ if (_glfw.wgl.EXT_swap_control)
+ wglSwapIntervalEXT(interval);
+}
+
+static int extensionSupportedWGL(const char* extension)
+{
+ const char* extensions = NULL;
+
+ if (_glfw.wgl.GetExtensionsStringARB)
+ extensions = wglGetExtensionsStringARB(wglGetCurrentDC());
+ else if (_glfw.wgl.GetExtensionsStringEXT)
+ extensions = wglGetExtensionsStringEXT();
+
+ if (!extensions)
+ return GLFW_FALSE;
+
+ return _glfwStringInExtensionString(extension, extensions);
+}
+
+static GLFWglproc getProcAddressWGL(const char* procname)
+{
+ const GLFWglproc proc = (GLFWglproc) wglGetProcAddress(procname);
+ if (proc)
+ return proc;
+
+ return (GLFWglproc) GetProcAddress(_glfw.wgl.instance, procname);
+}
+
+static void destroyContextWGL(_GLFWwindow* window)
+{
+ if (window->context.wgl.handle)
+ {
+ wglDeleteContext(window->context.wgl.handle);
+ window->context.wgl.handle = NULL;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize WGL
+//
+GLFWbool _glfwInitWGL(void)
+{
+ PIXELFORMATDESCRIPTOR pfd;
+ HGLRC prc, rc;
+ HDC pdc, dc;
+
+ if (_glfw.wgl.instance)
+ return GLFW_TRUE;
+
+ _glfw.wgl.instance = LoadLibraryA("opengl32.dll");
+ if (!_glfw.wgl.instance)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to load opengl32.dll");
+ return GLFW_FALSE;
+ }
+
+ _glfw.wgl.CreateContext = (PFN_wglCreateContext)
+ GetProcAddress(_glfw.wgl.instance, "wglCreateContext");
+ _glfw.wgl.DeleteContext = (PFN_wglDeleteContext)
+ GetProcAddress(_glfw.wgl.instance, "wglDeleteContext");
+ _glfw.wgl.GetProcAddress = (PFN_wglGetProcAddress)
+ GetProcAddress(_glfw.wgl.instance, "wglGetProcAddress");
+ _glfw.wgl.GetCurrentDC = (PFN_wglGetCurrentDC)
+ GetProcAddress(_glfw.wgl.instance, "wglGetCurrentDC");
+ _glfw.wgl.GetCurrentContext = (PFN_wglGetCurrentContext)
+ GetProcAddress(_glfw.wgl.instance, "wglGetCurrentContext");
+ _glfw.wgl.MakeCurrent = (PFN_wglMakeCurrent)
+ GetProcAddress(_glfw.wgl.instance, "wglMakeCurrent");
+ _glfw.wgl.ShareLists = (PFN_wglShareLists)
+ GetProcAddress(_glfw.wgl.instance, "wglShareLists");
+
+ // NOTE: A dummy context has to be created for opengl32.dll to load the
+ // OpenGL ICD, from which we can then query WGL extensions
+ // NOTE: This code will accept the Microsoft GDI ICD; accelerated context
+ // creation failure occurs during manual pixel format enumeration
+
+ dc = GetDC(_glfw.win32.helperWindowHandle);
+
+ ZeroMemory(&pfd, sizeof(pfd));
+ pfd.nSize = sizeof(pfd);
+ pfd.nVersion = 1;
+ pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
+ pfd.iPixelType = PFD_TYPE_RGBA;
+ pfd.cColorBits = 24;
+
+ if (!SetPixelFormat(dc, ChoosePixelFormat(dc, &pfd), &pfd))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to set pixel format for dummy context");
+ return GLFW_FALSE;
+ }
+
+ rc = wglCreateContext(dc);
+ if (!rc)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to create dummy context");
+ return GLFW_FALSE;
+ }
+
+ pdc = wglGetCurrentDC();
+ prc = wglGetCurrentContext();
+
+ if (!wglMakeCurrent(dc, rc))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to make dummy context current");
+ wglMakeCurrent(pdc, prc);
+ wglDeleteContext(rc);
+ return GLFW_FALSE;
+ }
+
+ // NOTE: Functions must be loaded first as they're needed to retrieve the
+ // extension string that tells us whether the functions are supported
+ _glfw.wgl.GetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)
+ wglGetProcAddress("wglGetExtensionsStringEXT");
+ _glfw.wgl.GetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)
+ wglGetProcAddress("wglGetExtensionsStringARB");
+ _glfw.wgl.CreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)
+ wglGetProcAddress("wglCreateContextAttribsARB");
+ _glfw.wgl.SwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)
+ wglGetProcAddress("wglSwapIntervalEXT");
+ _glfw.wgl.GetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)
+ wglGetProcAddress("wglGetPixelFormatAttribivARB");
+
+ // NOTE: WGL_ARB_extensions_string and WGL_EXT_extensions_string are not
+ // checked below as we are already using them
+ _glfw.wgl.ARB_multisample =
+ extensionSupportedWGL("WGL_ARB_multisample");
+ _glfw.wgl.ARB_framebuffer_sRGB =
+ extensionSupportedWGL("WGL_ARB_framebuffer_sRGB");
+ _glfw.wgl.EXT_framebuffer_sRGB =
+ extensionSupportedWGL("WGL_EXT_framebuffer_sRGB");
+ _glfw.wgl.ARB_create_context =
+ extensionSupportedWGL("WGL_ARB_create_context");
+ _glfw.wgl.ARB_create_context_profile =
+ extensionSupportedWGL("WGL_ARB_create_context_profile");
+ _glfw.wgl.EXT_create_context_es2_profile =
+ extensionSupportedWGL("WGL_EXT_create_context_es2_profile");
+ _glfw.wgl.ARB_create_context_robustness =
+ extensionSupportedWGL("WGL_ARB_create_context_robustness");
+ _glfw.wgl.ARB_create_context_no_error =
+ extensionSupportedWGL("WGL_ARB_create_context_no_error");
+ _glfw.wgl.EXT_swap_control =
+ extensionSupportedWGL("WGL_EXT_swap_control");
+ _glfw.wgl.EXT_colorspace =
+ extensionSupportedWGL("WGL_EXT_colorspace");
+ _glfw.wgl.ARB_pixel_format =
+ extensionSupportedWGL("WGL_ARB_pixel_format");
+ _glfw.wgl.ARB_context_flush_control =
+ extensionSupportedWGL("WGL_ARB_context_flush_control");
+
+ wglMakeCurrent(pdc, prc);
+ wglDeleteContext(rc);
+ return GLFW_TRUE;
+}
+
+// Terminate WGL
+//
+void _glfwTerminateWGL(void)
+{
+ if (_glfw.wgl.instance)
+ FreeLibrary(_glfw.wgl.instance);
+}
+
+#define setAttrib(a, v) \
+{ \
+ assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \
+ attribs[index++] = a; \
+ attribs[index++] = v; \
+}
+
+// Create the OpenGL or OpenGL ES context
+//
+GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ int attribs[40];
+ int pixelFormat;
+ PIXELFORMATDESCRIPTOR pfd;
+ HGLRC share = NULL;
+
+ if (ctxconfig->share)
+ share = ctxconfig->share->context.wgl.handle;
+
+ window->context.wgl.dc = GetDC(window->win32.handle);
+ if (!window->context.wgl.dc)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to retrieve DC for window");
+ return GLFW_FALSE;
+ }
+
+ pixelFormat = choosePixelFormat(window, ctxconfig, fbconfig);
+ if (!pixelFormat)
+ return GLFW_FALSE;
+
+ if (!DescribePixelFormat(window->context.wgl.dc,
+ pixelFormat, sizeof(pfd), &pfd))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to retrieve PFD for selected pixel format");
+ return GLFW_FALSE;
+ }
+
+ if (!SetPixelFormat(window->context.wgl.dc, pixelFormat, &pfd))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to set selected pixel format");
+ return GLFW_FALSE;
+ }
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (ctxconfig->forward)
+ {
+ if (!_glfw.wgl.ARB_create_context)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: A forward compatible OpenGL context requested but WGL_ARB_create_context is unavailable");
+ return GLFW_FALSE;
+ }
+ }
+
+ if (ctxconfig->profile)
+ {
+ if (!_glfw.wgl.ARB_create_context_profile)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable");
+ return GLFW_FALSE;
+ }
+ }
+ }
+ else
+ {
+ if (!_glfw.wgl.ARB_create_context ||
+ !_glfw.wgl.ARB_create_context_profile ||
+ !_glfw.wgl.EXT_create_context_es2_profile)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "WGL: OpenGL ES requested but WGL_ARB_create_context_es2_profile is unavailable");
+ return GLFW_FALSE;
+ }
+ }
+
+ if (_glfw.wgl.ARB_create_context)
+ {
+ int index = 0, mask = 0, flags = 0;
+
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ if (ctxconfig->forward)
+ flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+
+ if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)
+ mask |= WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
+ else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)
+ mask |= WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+ }
+ else
+ mask |= WGL_CONTEXT_ES2_PROFILE_BIT_EXT;
+
+ if (ctxconfig->debug)
+ flags |= WGL_CONTEXT_DEBUG_BIT_ARB;
+
+ if (ctxconfig->robustness)
+ {
+ if (_glfw.wgl.ARB_create_context_robustness)
+ {
+ if (ctxconfig->robustness == GLFW_NO_RESET_NOTIFICATION)
+ {
+ setAttrib(WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,
+ WGL_NO_RESET_NOTIFICATION_ARB);
+ }
+ else if (ctxconfig->robustness == GLFW_LOSE_CONTEXT_ON_RESET)
+ {
+ setAttrib(WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,
+ WGL_LOSE_CONTEXT_ON_RESET_ARB);
+ }
+
+ flags |= WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB;
+ }
+ }
+
+ if (ctxconfig->release)
+ {
+ if (_glfw.wgl.ARB_context_flush_control)
+ {
+ if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_NONE)
+ {
+ setAttrib(WGL_CONTEXT_RELEASE_BEHAVIOR_ARB,
+ WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB);
+ }
+ else if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_FLUSH)
+ {
+ setAttrib(WGL_CONTEXT_RELEASE_BEHAVIOR_ARB,
+ WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB);
+ }
+ }
+ }
+
+ if (ctxconfig->noerror)
+ {
+ if (_glfw.wgl.ARB_create_context_no_error)
+ setAttrib(WGL_CONTEXT_OPENGL_NO_ERROR_ARB, GLFW_TRUE);
+ }
+
+ // NOTE: Only request an explicitly versioned context when necessary, as
+ // explicitly requesting version 1.0 does not always return the
+ // highest version supported by the driver
+ if (ctxconfig->major != 1 || ctxconfig->minor != 0)
+ {
+ setAttrib(WGL_CONTEXT_MAJOR_VERSION_ARB, ctxconfig->major);
+ setAttrib(WGL_CONTEXT_MINOR_VERSION_ARB, ctxconfig->minor);
+ }
+
+ if (flags)
+ setAttrib(WGL_CONTEXT_FLAGS_ARB, flags);
+
+ if (mask)
+ setAttrib(WGL_CONTEXT_PROFILE_MASK_ARB, mask);
+
+ setAttrib(0, 0);
+
+ window->context.wgl.handle =
+ wglCreateContextAttribsARB(window->context.wgl.dc, share, attribs);
+ if (!window->context.wgl.handle)
+ {
+ const DWORD error = GetLastError();
+
+ if (error == (0xc0070000 | ERROR_INVALID_VERSION_ARB))
+ {
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: Driver does not support OpenGL version %i.%i",
+ ctxconfig->major,
+ ctxconfig->minor);
+ }
+ else
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: Driver does not support OpenGL ES version %i.%i",
+ ctxconfig->major,
+ ctxconfig->minor);
+ }
+ }
+ else if (error == (0xc0070000 | ERROR_INVALID_PROFILE_ARB))
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: Driver does not support the requested OpenGL profile");
+ }
+ else if (error == (0xc0070000 | ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB))
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "WGL: The share context is not compatible with the requested context");
+ }
+ else
+ {
+ if (ctxconfig->client == GLFW_OPENGL_API)
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: Failed to create OpenGL context");
+ }
+ else
+ {
+ _glfwInputError(GLFW_VERSION_UNAVAILABLE,
+ "WGL: Failed to create OpenGL ES context");
+ }
+ }
+
+ return GLFW_FALSE;
+ }
+ }
+ else
+ {
+ window->context.wgl.handle = wglCreateContext(window->context.wgl.dc);
+ if (!window->context.wgl.handle)
+ {
+ _glfwInputErrorWin32(GLFW_VERSION_UNAVAILABLE,
+ "WGL: Failed to create OpenGL context");
+ return GLFW_FALSE;
+ }
+
+ if (share)
+ {
+ if (!wglShareLists(share, window->context.wgl.handle))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "WGL: Failed to enable sharing with specified OpenGL context");
+ return GLFW_FALSE;
+ }
+ }
+ }
+
+ window->context.makeCurrent = makeContextCurrentWGL;
+ window->context.swapBuffers = swapBuffersWGL;
+ window->context.swapInterval = swapIntervalWGL;
+ window->context.extensionSupported = extensionSupportedWGL;
+ window->context.getProcAddress = getProcAddressWGL;
+ window->context.destroy = destroyContextWGL;
+
+ return GLFW_TRUE;
+}
+
+#undef setAttrib
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (window->context.source != GLFW_NATIVE_CONTEXT_API)
+ {
+ _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
+ return NULL;
+ }
+
+ return window->context.wgl.handle;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.h
new file mode 100644
index 0000000..47f0459
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wgl_context.h
@@ -0,0 +1,158 @@
+//========================================================================
+// GLFW 3.3 WGL - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
+#define WGL_SUPPORT_OPENGL_ARB 0x2010
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
+#define WGL_PIXEL_TYPE_ARB 0x2013
+#define WGL_TYPE_RGBA_ARB 0x202b
+#define WGL_ACCELERATION_ARB 0x2003
+#define WGL_NO_ACCELERATION_ARB 0x2025
+#define WGL_RED_BITS_ARB 0x2015
+#define WGL_RED_SHIFT_ARB 0x2016
+#define WGL_GREEN_BITS_ARB 0x2017
+#define WGL_GREEN_SHIFT_ARB 0x2018
+#define WGL_BLUE_BITS_ARB 0x2019
+#define WGL_BLUE_SHIFT_ARB 0x201a
+#define WGL_ALPHA_BITS_ARB 0x201b
+#define WGL_ALPHA_SHIFT_ARB 0x201c
+#define WGL_ACCUM_BITS_ARB 0x201d
+#define WGL_ACCUM_RED_BITS_ARB 0x201e
+#define WGL_ACCUM_GREEN_BITS_ARB 0x201f
+#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
+#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
+#define WGL_DEPTH_BITS_ARB 0x2022
+#define WGL_STENCIL_BITS_ARB 0x2023
+#define WGL_AUX_BUFFERS_ARB 0x2024
+#define WGL_STEREO_ARB 0x2012
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
+#define WGL_SAMPLES_ARB 0x2042
+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9
+#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
+#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define WGL_CONTEXT_FLAGS_ARB 0x2094
+#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
+#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
+#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
+#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
+#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
+#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
+#define WGL_COLORSPACE_EXT 0x309d
+#define WGL_COLORSPACE_SRGB_EXT 0x3089
+
+#define ERROR_INVALID_VERSION_ARB 0x2095
+#define ERROR_INVALID_PROFILE_ARB 0x2096
+#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
+
+// WGL extension pointer typedefs
+typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);
+typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
+typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
+typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);
+#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT
+#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB
+#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT
+#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB
+#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB
+
+// opengl32.dll function pointer typedefs
+typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);
+typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);
+typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);
+typedef HDC (WINAPI * PFN_wglGetCurrentDC)(void);
+typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);
+typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);
+typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);
+#define wglCreateContext _glfw.wgl.CreateContext
+#define wglDeleteContext _glfw.wgl.DeleteContext
+#define wglGetProcAddress _glfw.wgl.GetProcAddress
+#define wglGetCurrentDC _glfw.wgl.GetCurrentDC
+#define wglGetCurrentContext _glfw.wgl.GetCurrentContext
+#define wglMakeCurrent _glfw.wgl.MakeCurrent
+#define wglShareLists _glfw.wgl.ShareLists
+
+#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl
+
+
+// WGL-specific per-context data
+//
+typedef struct _GLFWcontextWGL
+{
+ HDC dc;
+ HGLRC handle;
+ int interval;
+} _GLFWcontextWGL;
+
+// WGL-specific global data
+//
+typedef struct _GLFWlibraryWGL
+{
+ HINSTANCE instance;
+ PFN_wglCreateContext CreateContext;
+ PFN_wglDeleteContext DeleteContext;
+ PFN_wglGetProcAddress GetProcAddress;
+ PFN_wglGetCurrentDC GetCurrentDC;
+ PFN_wglGetCurrentContext GetCurrentContext;
+ PFN_wglMakeCurrent MakeCurrent;
+ PFN_wglShareLists ShareLists;
+
+ PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT;
+ PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;
+ PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT;
+ PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB;
+ PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
+ GLFWbool EXT_swap_control;
+ GLFWbool EXT_colorspace;
+ GLFWbool ARB_multisample;
+ GLFWbool ARB_framebuffer_sRGB;
+ GLFWbool EXT_framebuffer_sRGB;
+ GLFWbool ARB_pixel_format;
+ GLFWbool ARB_create_context;
+ GLFWbool ARB_create_context_profile;
+ GLFWbool EXT_create_context_es2_profile;
+ GLFWbool ARB_create_context_robustness;
+ GLFWbool ARB_create_context_no_error;
+ GLFWbool ARB_context_flush_control;
+} _GLFWlibraryWGL;
+
+
+GLFWbool _glfwInitWGL(void);
+void _glfwTerminateWGL(void);
+GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_init.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_init.c
new file mode 100644
index 0000000..40eb795
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_init.c
@@ -0,0 +1,623 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <stdlib.h>
+#include <malloc.h>
+
+static const GUID _glfw_GUID_DEVINTERFACE_HID =
+ {0x4d1e55b2,0xf16f,0x11cf,{0x88,0xcb,0x00,0x11,0x11,0x00,0x00,0x30}};
+
+#define GUID_DEVINTERFACE_HID _glfw_GUID_DEVINTERFACE_HID
+
+#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)
+
+#if defined(_GLFW_BUILD_DLL)
+ #pragma message("These symbols must be exported by the executable and have no effect in a DLL")
+#endif
+
+// Executables (but not DLLs) exporting this symbol with this value will be
+// automatically directed to the high-performance GPU on Nvidia Optimus systems
+// with up-to-date drivers
+//
+__declspec(dllexport) DWORD NvOptimusEnablement = 1;
+
+// Executables (but not DLLs) exporting this symbol with this value will be
+// automatically directed to the high-performance GPU on AMD PowerXpress systems
+// with up-to-date drivers
+//
+__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
+
+#endif // _GLFW_USE_HYBRID_HPG
+
+#if defined(_GLFW_BUILD_DLL)
+
+// GLFW DLL entry point
+//
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
+{
+ return TRUE;
+}
+
+#endif // _GLFW_BUILD_DLL
+
+// Load necessary libraries (DLLs)
+//
+static GLFWbool loadLibraries(void)
+{
+ _glfw.win32.user32.instance = LoadLibraryA("user32.dll");
+ if (!_glfw.win32.user32.instance)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to load user32.dll");
+ return GLFW_FALSE;
+ }
+
+ _glfw.win32.user32.SetProcessDPIAware_ = (PFN_SetProcessDPIAware)
+ GetProcAddress(_glfw.win32.user32.instance, "SetProcessDPIAware");
+ _glfw.win32.user32.ChangeWindowMessageFilterEx_ = (PFN_ChangeWindowMessageFilterEx)
+ GetProcAddress(_glfw.win32.user32.instance, "ChangeWindowMessageFilterEx");
+ _glfw.win32.user32.EnableNonClientDpiScaling_ = (PFN_EnableNonClientDpiScaling)
+ GetProcAddress(_glfw.win32.user32.instance, "EnableNonClientDpiScaling");
+ _glfw.win32.user32.SetProcessDpiAwarenessContext_ = (PFN_SetProcessDpiAwarenessContext)
+ GetProcAddress(_glfw.win32.user32.instance, "SetProcessDpiAwarenessContext");
+ _glfw.win32.user32.GetDpiForWindow_ = (PFN_GetDpiForWindow)
+ GetProcAddress(_glfw.win32.user32.instance, "GetDpiForWindow");
+ _glfw.win32.user32.AdjustWindowRectExForDpi_ = (PFN_AdjustWindowRectExForDpi)
+ GetProcAddress(_glfw.win32.user32.instance, "AdjustWindowRectExForDpi");
+
+ _glfw.win32.dinput8.instance = LoadLibraryA("dinput8.dll");
+ if (_glfw.win32.dinput8.instance)
+ {
+ _glfw.win32.dinput8.Create = (PFN_DirectInput8Create)
+ GetProcAddress(_glfw.win32.dinput8.instance, "DirectInput8Create");
+ }
+
+ {
+ int i;
+ const char* names[] =
+ {
+ "xinput1_4.dll",
+ "xinput1_3.dll",
+ "xinput9_1_0.dll",
+ "xinput1_2.dll",
+ "xinput1_1.dll",
+ NULL
+ };
+
+ for (i = 0; names[i]; i++)
+ {
+ _glfw.win32.xinput.instance = LoadLibraryA(names[i]);
+ if (_glfw.win32.xinput.instance)
+ {
+ _glfw.win32.xinput.GetCapabilities = (PFN_XInputGetCapabilities)
+ GetProcAddress(_glfw.win32.xinput.instance, "XInputGetCapabilities");
+ _glfw.win32.xinput.GetState = (PFN_XInputGetState)
+ GetProcAddress(_glfw.win32.xinput.instance, "XInputGetState");
+
+ break;
+ }
+ }
+ }
+
+ _glfw.win32.dwmapi.instance = LoadLibraryA("dwmapi.dll");
+ if (_glfw.win32.dwmapi.instance)
+ {
+ _glfw.win32.dwmapi.IsCompositionEnabled = (PFN_DwmIsCompositionEnabled)
+ GetProcAddress(_glfw.win32.dwmapi.instance, "DwmIsCompositionEnabled");
+ _glfw.win32.dwmapi.Flush = (PFN_DwmFlush)
+ GetProcAddress(_glfw.win32.dwmapi.instance, "DwmFlush");
+ _glfw.win32.dwmapi.EnableBlurBehindWindow = (PFN_DwmEnableBlurBehindWindow)
+ GetProcAddress(_glfw.win32.dwmapi.instance, "DwmEnableBlurBehindWindow");
+ _glfw.win32.dwmapi.GetColorizationColor = (PFN_DwmGetColorizationColor)
+ GetProcAddress(_glfw.win32.dwmapi.instance, "DwmGetColorizationColor");
+ }
+
+ _glfw.win32.shcore.instance = LoadLibraryA("shcore.dll");
+ if (_glfw.win32.shcore.instance)
+ {
+ _glfw.win32.shcore.SetProcessDpiAwareness_ = (PFN_SetProcessDpiAwareness)
+ GetProcAddress(_glfw.win32.shcore.instance, "SetProcessDpiAwareness");
+ _glfw.win32.shcore.GetDpiForMonitor_ = (PFN_GetDpiForMonitor)
+ GetProcAddress(_glfw.win32.shcore.instance, "GetDpiForMonitor");
+ }
+
+ _glfw.win32.ntdll.instance = LoadLibraryA("ntdll.dll");
+ if (_glfw.win32.ntdll.instance)
+ {
+ _glfw.win32.ntdll.RtlVerifyVersionInfo_ = (PFN_RtlVerifyVersionInfo)
+ GetProcAddress(_glfw.win32.ntdll.instance, "RtlVerifyVersionInfo");
+ }
+
+ return GLFW_TRUE;
+}
+
+// Unload used libraries (DLLs)
+//
+static void freeLibraries(void)
+{
+ if (_glfw.win32.xinput.instance)
+ FreeLibrary(_glfw.win32.xinput.instance);
+
+ if (_glfw.win32.dinput8.instance)
+ FreeLibrary(_glfw.win32.dinput8.instance);
+
+ if (_glfw.win32.user32.instance)
+ FreeLibrary(_glfw.win32.user32.instance);
+
+ if (_glfw.win32.dwmapi.instance)
+ FreeLibrary(_glfw.win32.dwmapi.instance);
+
+ if (_glfw.win32.shcore.instance)
+ FreeLibrary(_glfw.win32.shcore.instance);
+
+ if (_glfw.win32.ntdll.instance)
+ FreeLibrary(_glfw.win32.ntdll.instance);
+}
+
+// Create key code translation tables
+//
+static void createKeyTables(void)
+{
+ int scancode;
+
+ memset(_glfw.win32.keycodes, -1, sizeof(_glfw.win32.keycodes));
+ memset(_glfw.win32.scancodes, -1, sizeof(_glfw.win32.scancodes));
+
+ _glfw.win32.keycodes[0x00B] = GLFW_KEY_0;
+ _glfw.win32.keycodes[0x002] = GLFW_KEY_1;
+ _glfw.win32.keycodes[0x003] = GLFW_KEY_2;
+ _glfw.win32.keycodes[0x004] = GLFW_KEY_3;
+ _glfw.win32.keycodes[0x005] = GLFW_KEY_4;
+ _glfw.win32.keycodes[0x006] = GLFW_KEY_5;
+ _glfw.win32.keycodes[0x007] = GLFW_KEY_6;
+ _glfw.win32.keycodes[0x008] = GLFW_KEY_7;
+ _glfw.win32.keycodes[0x009] = GLFW_KEY_8;
+ _glfw.win32.keycodes[0x00A] = GLFW_KEY_9;
+ _glfw.win32.keycodes[0x01E] = GLFW_KEY_A;
+ _glfw.win32.keycodes[0x030] = GLFW_KEY_B;
+ _glfw.win32.keycodes[0x02E] = GLFW_KEY_C;
+ _glfw.win32.keycodes[0x020] = GLFW_KEY_D;
+ _glfw.win32.keycodes[0x012] = GLFW_KEY_E;
+ _glfw.win32.keycodes[0x021] = GLFW_KEY_F;
+ _glfw.win32.keycodes[0x022] = GLFW_KEY_G;
+ _glfw.win32.keycodes[0x023] = GLFW_KEY_H;
+ _glfw.win32.keycodes[0x017] = GLFW_KEY_I;
+ _glfw.win32.keycodes[0x024] = GLFW_KEY_J;
+ _glfw.win32.keycodes[0x025] = GLFW_KEY_K;
+ _glfw.win32.keycodes[0x026] = GLFW_KEY_L;
+ _glfw.win32.keycodes[0x032] = GLFW_KEY_M;
+ _glfw.win32.keycodes[0x031] = GLFW_KEY_N;
+ _glfw.win32.keycodes[0x018] = GLFW_KEY_O;
+ _glfw.win32.keycodes[0x019] = GLFW_KEY_P;
+ _glfw.win32.keycodes[0x010] = GLFW_KEY_Q;
+ _glfw.win32.keycodes[0x013] = GLFW_KEY_R;
+ _glfw.win32.keycodes[0x01F] = GLFW_KEY_S;
+ _glfw.win32.keycodes[0x014] = GLFW_KEY_T;
+ _glfw.win32.keycodes[0x016] = GLFW_KEY_U;
+ _glfw.win32.keycodes[0x02F] = GLFW_KEY_V;
+ _glfw.win32.keycodes[0x011] = GLFW_KEY_W;
+ _glfw.win32.keycodes[0x02D] = GLFW_KEY_X;
+ _glfw.win32.keycodes[0x015] = GLFW_KEY_Y;
+ _glfw.win32.keycodes[0x02C] = GLFW_KEY_Z;
+
+ _glfw.win32.keycodes[0x028] = GLFW_KEY_APOSTROPHE;
+ _glfw.win32.keycodes[0x02B] = GLFW_KEY_BACKSLASH;
+ _glfw.win32.keycodes[0x033] = GLFW_KEY_COMMA;
+ _glfw.win32.keycodes[0x00D] = GLFW_KEY_EQUAL;
+ _glfw.win32.keycodes[0x029] = GLFW_KEY_GRAVE_ACCENT;
+ _glfw.win32.keycodes[0x01A] = GLFW_KEY_LEFT_BRACKET;
+ _glfw.win32.keycodes[0x00C] = GLFW_KEY_MINUS;
+ _glfw.win32.keycodes[0x034] = GLFW_KEY_PERIOD;
+ _glfw.win32.keycodes[0x01B] = GLFW_KEY_RIGHT_BRACKET;
+ _glfw.win32.keycodes[0x027] = GLFW_KEY_SEMICOLON;
+ _glfw.win32.keycodes[0x035] = GLFW_KEY_SLASH;
+ _glfw.win32.keycodes[0x056] = GLFW_KEY_WORLD_2;
+
+ _glfw.win32.keycodes[0x00E] = GLFW_KEY_BACKSPACE;
+ _glfw.win32.keycodes[0x153] = GLFW_KEY_DELETE;
+ _glfw.win32.keycodes[0x14F] = GLFW_KEY_END;
+ _glfw.win32.keycodes[0x01C] = GLFW_KEY_ENTER;
+ _glfw.win32.keycodes[0x001] = GLFW_KEY_ESCAPE;
+ _glfw.win32.keycodes[0x147] = GLFW_KEY_HOME;
+ _glfw.win32.keycodes[0x152] = GLFW_KEY_INSERT;
+ _glfw.win32.keycodes[0x15D] = GLFW_KEY_MENU;
+ _glfw.win32.keycodes[0x151] = GLFW_KEY_PAGE_DOWN;
+ _glfw.win32.keycodes[0x149] = GLFW_KEY_PAGE_UP;
+ _glfw.win32.keycodes[0x045] = GLFW_KEY_PAUSE;
+ _glfw.win32.keycodes[0x146] = GLFW_KEY_PAUSE;
+ _glfw.win32.keycodes[0x039] = GLFW_KEY_SPACE;
+ _glfw.win32.keycodes[0x00F] = GLFW_KEY_TAB;
+ _glfw.win32.keycodes[0x03A] = GLFW_KEY_CAPS_LOCK;
+ _glfw.win32.keycodes[0x145] = GLFW_KEY_NUM_LOCK;
+ _glfw.win32.keycodes[0x046] = GLFW_KEY_SCROLL_LOCK;
+ _glfw.win32.keycodes[0x03B] = GLFW_KEY_F1;
+ _glfw.win32.keycodes[0x03C] = GLFW_KEY_F2;
+ _glfw.win32.keycodes[0x03D] = GLFW_KEY_F3;
+ _glfw.win32.keycodes[0x03E] = GLFW_KEY_F4;
+ _glfw.win32.keycodes[0x03F] = GLFW_KEY_F5;
+ _glfw.win32.keycodes[0x040] = GLFW_KEY_F6;
+ _glfw.win32.keycodes[0x041] = GLFW_KEY_F7;
+ _glfw.win32.keycodes[0x042] = GLFW_KEY_F8;
+ _glfw.win32.keycodes[0x043] = GLFW_KEY_F9;
+ _glfw.win32.keycodes[0x044] = GLFW_KEY_F10;
+ _glfw.win32.keycodes[0x057] = GLFW_KEY_F11;
+ _glfw.win32.keycodes[0x058] = GLFW_KEY_F12;
+ _glfw.win32.keycodes[0x064] = GLFW_KEY_F13;
+ _glfw.win32.keycodes[0x065] = GLFW_KEY_F14;
+ _glfw.win32.keycodes[0x066] = GLFW_KEY_F15;
+ _glfw.win32.keycodes[0x067] = GLFW_KEY_F16;
+ _glfw.win32.keycodes[0x068] = GLFW_KEY_F17;
+ _glfw.win32.keycodes[0x069] = GLFW_KEY_F18;
+ _glfw.win32.keycodes[0x06A] = GLFW_KEY_F19;
+ _glfw.win32.keycodes[0x06B] = GLFW_KEY_F20;
+ _glfw.win32.keycodes[0x06C] = GLFW_KEY_F21;
+ _glfw.win32.keycodes[0x06D] = GLFW_KEY_F22;
+ _glfw.win32.keycodes[0x06E] = GLFW_KEY_F23;
+ _glfw.win32.keycodes[0x076] = GLFW_KEY_F24;
+ _glfw.win32.keycodes[0x038] = GLFW_KEY_LEFT_ALT;
+ _glfw.win32.keycodes[0x01D] = GLFW_KEY_LEFT_CONTROL;
+ _glfw.win32.keycodes[0x02A] = GLFW_KEY_LEFT_SHIFT;
+ _glfw.win32.keycodes[0x15B] = GLFW_KEY_LEFT_SUPER;
+ _glfw.win32.keycodes[0x137] = GLFW_KEY_PRINT_SCREEN;
+ _glfw.win32.keycodes[0x138] = GLFW_KEY_RIGHT_ALT;
+ _glfw.win32.keycodes[0x11D] = GLFW_KEY_RIGHT_CONTROL;
+ _glfw.win32.keycodes[0x036] = GLFW_KEY_RIGHT_SHIFT;
+ _glfw.win32.keycodes[0x15C] = GLFW_KEY_RIGHT_SUPER;
+ _glfw.win32.keycodes[0x150] = GLFW_KEY_DOWN;
+ _glfw.win32.keycodes[0x14B] = GLFW_KEY_LEFT;
+ _glfw.win32.keycodes[0x14D] = GLFW_KEY_RIGHT;
+ _glfw.win32.keycodes[0x148] = GLFW_KEY_UP;
+
+ _glfw.win32.keycodes[0x052] = GLFW_KEY_KP_0;
+ _glfw.win32.keycodes[0x04F] = GLFW_KEY_KP_1;
+ _glfw.win32.keycodes[0x050] = GLFW_KEY_KP_2;
+ _glfw.win32.keycodes[0x051] = GLFW_KEY_KP_3;
+ _glfw.win32.keycodes[0x04B] = GLFW_KEY_KP_4;
+ _glfw.win32.keycodes[0x04C] = GLFW_KEY_KP_5;
+ _glfw.win32.keycodes[0x04D] = GLFW_KEY_KP_6;
+ _glfw.win32.keycodes[0x047] = GLFW_KEY_KP_7;
+ _glfw.win32.keycodes[0x048] = GLFW_KEY_KP_8;
+ _glfw.win32.keycodes[0x049] = GLFW_KEY_KP_9;
+ _glfw.win32.keycodes[0x04E] = GLFW_KEY_KP_ADD;
+ _glfw.win32.keycodes[0x053] = GLFW_KEY_KP_DECIMAL;
+ _glfw.win32.keycodes[0x135] = GLFW_KEY_KP_DIVIDE;
+ _glfw.win32.keycodes[0x11C] = GLFW_KEY_KP_ENTER;
+ _glfw.win32.keycodes[0x059] = GLFW_KEY_KP_EQUAL;
+ _glfw.win32.keycodes[0x037] = GLFW_KEY_KP_MULTIPLY;
+ _glfw.win32.keycodes[0x04A] = GLFW_KEY_KP_SUBTRACT;
+
+ for (scancode = 0; scancode < 512; scancode++)
+ {
+ if (_glfw.win32.keycodes[scancode] > 0)
+ _glfw.win32.scancodes[_glfw.win32.keycodes[scancode]] = scancode;
+ }
+}
+
+// Creates a dummy window for behind-the-scenes work
+//
+static GLFWbool createHelperWindow(void)
+{
+ MSG msg;
+
+ _glfw.win32.helperWindowHandle =
+ CreateWindowExW(WS_EX_OVERLAPPEDWINDOW,
+ _GLFW_WNDCLASSNAME,
+ L"GLFW message window",
+ WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+ 0, 0, 1, 1,
+ NULL, NULL,
+ GetModuleHandleW(NULL),
+ NULL);
+
+ if (!_glfw.win32.helperWindowHandle)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create helper window");
+ return GLFW_FALSE;
+ }
+
+ // HACK: The command to the first ShowWindow call is ignored if the parent
+ // process passed along a STARTUPINFO, so clear that with a no-op call
+ ShowWindow(_glfw.win32.helperWindowHandle, SW_HIDE);
+
+ // Register for HID device notifications
+ {
+ DEV_BROADCAST_DEVICEINTERFACE_W dbi;
+ ZeroMemory(&dbi, sizeof(dbi));
+ dbi.dbcc_size = sizeof(dbi);
+ dbi.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
+ dbi.dbcc_classguid = GUID_DEVINTERFACE_HID;
+
+ _glfw.win32.deviceNotificationHandle =
+ RegisterDeviceNotificationW(_glfw.win32.helperWindowHandle,
+ (DEV_BROADCAST_HDR*) &dbi,
+ DEVICE_NOTIFY_WINDOW_HANDLE);
+ }
+
+ while (PeekMessageW(&msg, _glfw.win32.helperWindowHandle, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessageW(&msg);
+ }
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Returns a wide string version of the specified UTF-8 string
+//
+WCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source)
+{
+ WCHAR* target;
+ int count;
+
+ count = MultiByteToWideChar(CP_UTF8, 0, source, -1, NULL, 0);
+ if (!count)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to convert string from UTF-8");
+ return NULL;
+ }
+
+ target = calloc(count, sizeof(WCHAR));
+
+ if (!MultiByteToWideChar(CP_UTF8, 0, source, -1, target, count))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to convert string from UTF-8");
+ free(target);
+ return NULL;
+ }
+
+ return target;
+}
+
+// Returns a UTF-8 string version of the specified wide string
+//
+char* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source)
+{
+ char* target;
+ int size;
+
+ size = WideCharToMultiByte(CP_UTF8, 0, source, -1, NULL, 0, NULL, NULL);
+ if (!size)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to convert string to UTF-8");
+ return NULL;
+ }
+
+ target = calloc(size, 1);
+
+ if (!WideCharToMultiByte(CP_UTF8, 0, source, -1, target, size, NULL, NULL))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to convert string to UTF-8");
+ free(target);
+ return NULL;
+ }
+
+ return target;
+}
+
+// Reports the specified error, appending information about the last Win32 error
+//
+void _glfwInputErrorWin32(int error, const char* description)
+{
+ WCHAR buffer[_GLFW_MESSAGE_SIZE] = L"";
+ char message[_GLFW_MESSAGE_SIZE] = "";
+
+ FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_MAX_WIDTH_MASK,
+ NULL,
+ GetLastError() & 0xffff,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ buffer,
+ sizeof(buffer) / sizeof(WCHAR),
+ NULL);
+ WideCharToMultiByte(CP_UTF8, 0, buffer, -1, message, sizeof(message), NULL, NULL);
+
+ _glfwInputError(error, "%s: %s", description, message);
+}
+
+// Updates key names according to the current keyboard layout
+//
+void _glfwUpdateKeyNamesWin32(void)
+{
+ int key;
+ BYTE state[256] = {0};
+
+ memset(_glfw.win32.keynames, 0, sizeof(_glfw.win32.keynames));
+
+ for (key = GLFW_KEY_SPACE; key <= GLFW_KEY_LAST; key++)
+ {
+ UINT vk;
+ int scancode, length;
+ WCHAR chars[16];
+
+ scancode = _glfw.win32.scancodes[key];
+ if (scancode == -1)
+ continue;
+
+ if (key >= GLFW_KEY_KP_0 && key <= GLFW_KEY_KP_ADD)
+ {
+ const UINT vks[] = {
+ VK_NUMPAD0, VK_NUMPAD1, VK_NUMPAD2, VK_NUMPAD3,
+ VK_NUMPAD4, VK_NUMPAD5, VK_NUMPAD6, VK_NUMPAD7,
+ VK_NUMPAD8, VK_NUMPAD9, VK_DECIMAL, VK_DIVIDE,
+ VK_MULTIPLY, VK_SUBTRACT, VK_ADD
+ };
+
+ vk = vks[key - GLFW_KEY_KP_0];
+ }
+ else
+ vk = MapVirtualKey(scancode, MAPVK_VSC_TO_VK);
+
+ length = ToUnicode(vk, scancode, state,
+ chars, sizeof(chars) / sizeof(WCHAR),
+ 0);
+
+ if (length == -1)
+ {
+ length = ToUnicode(vk, scancode, state,
+ chars, sizeof(chars) / sizeof(WCHAR),
+ 0);
+ }
+
+ if (length < 1)
+ continue;
+
+ WideCharToMultiByte(CP_UTF8, 0, chars, 1,
+ _glfw.win32.keynames[key],
+ sizeof(_glfw.win32.keynames[key]),
+ NULL, NULL);
+ }
+}
+
+// Replacement for IsWindowsVersionOrGreater as MinGW lacks versionhelpers.h
+//
+BOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp)
+{
+ OSVERSIONINFOEXW osvi = { sizeof(osvi), major, minor, 0, 0, {0}, sp };
+ DWORD mask = VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR;
+ ULONGLONG cond = VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ cond = VerSetConditionMask(cond, VER_MINORVERSION, VER_GREATER_EQUAL);
+ cond = VerSetConditionMask(cond, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
+ // HACK: Use RtlVerifyVersionInfo instead of VerifyVersionInfoW as the
+ // latter lies unless the user knew to embed a non-default manifest
+ // announcing support for Windows 10 via supportedOS GUID
+ return RtlVerifyVersionInfo(&osvi, mask, cond) == 0;
+}
+
+// Checks whether we are on at least the specified build of Windows 10
+//
+BOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build)
+{
+ OSVERSIONINFOEXW osvi = { sizeof(osvi), 10, 0, build };
+ DWORD mask = VER_MAJORVERSION | VER_MINORVERSION | VER_BUILDNUMBER;
+ ULONGLONG cond = VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ cond = VerSetConditionMask(cond, VER_MINORVERSION, VER_GREATER_EQUAL);
+ cond = VerSetConditionMask(cond, VER_BUILDNUMBER, VER_GREATER_EQUAL);
+ // HACK: Use RtlVerifyVersionInfo instead of VerifyVersionInfoW as the
+ // latter lies unless the user knew to embed a non-default manifest
+ // announcing support for Windows 10 via supportedOS GUID
+ return RtlVerifyVersionInfo(&osvi, mask, cond) == 0;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformInit(void)
+{
+ // To make SetForegroundWindow work as we want, we need to fiddle
+ // with the FOREGROUNDLOCKTIMEOUT system setting (we do this as early
+ // as possible in the hope of still being the foreground process)
+ SystemParametersInfoW(SPI_GETFOREGROUNDLOCKTIMEOUT, 0,
+ &_glfw.win32.foregroundLockTimeout, 0);
+ SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, UIntToPtr(0),
+ SPIF_SENDCHANGE);
+
+ if (!loadLibraries())
+ return GLFW_FALSE;
+
+ createKeyTables();
+ _glfwUpdateKeyNamesWin32();
+
+ if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())
+ SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
+ else if (IsWindows8Point1OrGreater())
+ SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
+ else if (IsWindowsVistaOrGreater())
+ SetProcessDPIAware();
+
+ if (!_glfwRegisterWindowClassWin32())
+ return GLFW_FALSE;
+
+ if (!createHelperWindow())
+ return GLFW_FALSE;
+
+ _glfwInitTimerWin32();
+ _glfwInitJoysticksWin32();
+
+ _glfwPollMonitorsWin32();
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformTerminate(void)
+{
+ if (_glfw.win32.deviceNotificationHandle)
+ UnregisterDeviceNotification(_glfw.win32.deviceNotificationHandle);
+
+ if (_glfw.win32.helperWindowHandle)
+ DestroyWindow(_glfw.win32.helperWindowHandle);
+
+ _glfwUnregisterWindowClassWin32();
+
+ // Restore previous foreground lock timeout system setting
+ SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0,
+ UIntToPtr(_glfw.win32.foregroundLockTimeout),
+ SPIF_SENDCHANGE);
+
+ free(_glfw.win32.clipboardString);
+ free(_glfw.win32.rawInput);
+
+ _glfwTerminateWGL();
+ _glfwTerminateEGL();
+
+ _glfwTerminateJoysticksWin32();
+
+ freeLibraries();
+}
+
+const char* _glfwPlatformGetVersionString(void)
+{
+ return _GLFW_VERSION_NUMBER " Win32 WGL EGL OSMesa"
+#if defined(__MINGW32__)
+ " MinGW"
+#elif defined(_MSC_VER)
+ " VisualC"
+#endif
+#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)
+ " hybrid-GPU"
+#endif
+#if defined(_GLFW_BUILD_DLL)
+ " DLL"
+#endif
+ ;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.c
new file mode 100644
index 0000000..62ad7a5
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.c
@@ -0,0 +1,755 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <stdio.h>
+#include <math.h>
+
+#define _GLFW_TYPE_AXIS 0
+#define _GLFW_TYPE_SLIDER 1
+#define _GLFW_TYPE_BUTTON 2
+#define _GLFW_TYPE_POV 3
+
+// Data produced with DirectInput device object enumeration
+//
+typedef struct _GLFWobjenumWin32
+{
+ IDirectInputDevice8W* device;
+ _GLFWjoyobjectWin32* objects;
+ int objectCount;
+ int axisCount;
+ int sliderCount;
+ int buttonCount;
+ int povCount;
+} _GLFWobjenumWin32;
+
+// Define local copies of the necessary GUIDs
+//
+static const GUID _glfw_IID_IDirectInput8W =
+ {0xbf798031,0x483a,0x4da2,{0xaa,0x99,0x5d,0x64,0xed,0x36,0x97,0x00}};
+static const GUID _glfw_GUID_XAxis =
+ {0xa36d02e0,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_YAxis =
+ {0xa36d02e1,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_ZAxis =
+ {0xa36d02e2,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_RxAxis =
+ {0xa36d02f4,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_RyAxis =
+ {0xa36d02f5,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_RzAxis =
+ {0xa36d02e3,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_Slider =
+ {0xa36d02e4,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+static const GUID _glfw_GUID_POV =
+ {0xa36d02f2,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};
+
+#define IID_IDirectInput8W _glfw_IID_IDirectInput8W
+#define GUID_XAxis _glfw_GUID_XAxis
+#define GUID_YAxis _glfw_GUID_YAxis
+#define GUID_ZAxis _glfw_GUID_ZAxis
+#define GUID_RxAxis _glfw_GUID_RxAxis
+#define GUID_RyAxis _glfw_GUID_RyAxis
+#define GUID_RzAxis _glfw_GUID_RzAxis
+#define GUID_Slider _glfw_GUID_Slider
+#define GUID_POV _glfw_GUID_POV
+
+// Object data array for our clone of c_dfDIJoystick
+// Generated with https://github.com/elmindreda/c_dfDIJoystick2
+//
+static DIOBJECTDATAFORMAT _glfwObjectDataFormats[] =
+{
+ { &GUID_XAxis,DIJOFS_X,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_YAxis,DIJOFS_Y,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_ZAxis,DIJOFS_Z,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_RxAxis,DIJOFS_RX,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_RyAxis,DIJOFS_RY,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_RzAxis,DIJOFS_RZ,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_Slider,DIJOFS_SLIDER(0),DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_Slider,DIJOFS_SLIDER(1),DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },
+ { &GUID_POV,DIJOFS_POV(0),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { &GUID_POV,DIJOFS_POV(1),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { &GUID_POV,DIJOFS_POV(2),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { &GUID_POV,DIJOFS_POV(3),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(0),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(1),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(2),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(3),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(4),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(5),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(6),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(7),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(8),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(9),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(10),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(11),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(12),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(13),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(14),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(15),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(16),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(17),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(18),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(19),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(20),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(21),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(22),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(23),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(24),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(25),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(26),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(27),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(28),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(29),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(30),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+ { NULL,DIJOFS_BUTTON(31),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },
+};
+
+// Our clone of c_dfDIJoystick
+//
+static const DIDATAFORMAT _glfwDataFormat =
+{
+ sizeof(DIDATAFORMAT),
+ sizeof(DIOBJECTDATAFORMAT),
+ DIDFT_ABSAXIS,
+ sizeof(DIJOYSTATE),
+ sizeof(_glfwObjectDataFormats) / sizeof(DIOBJECTDATAFORMAT),
+ _glfwObjectDataFormats
+};
+
+// Returns a description fitting the specified XInput capabilities
+//
+static const char* getDeviceDescription(const XINPUT_CAPABILITIES* xic)
+{
+ switch (xic->SubType)
+ {
+ case XINPUT_DEVSUBTYPE_WHEEL:
+ return "XInput Wheel";
+ case XINPUT_DEVSUBTYPE_ARCADE_STICK:
+ return "XInput Arcade Stick";
+ case XINPUT_DEVSUBTYPE_FLIGHT_STICK:
+ return "XInput Flight Stick";
+ case XINPUT_DEVSUBTYPE_DANCE_PAD:
+ return "XInput Dance Pad";
+ case XINPUT_DEVSUBTYPE_GUITAR:
+ return "XInput Guitar";
+ case XINPUT_DEVSUBTYPE_DRUM_KIT:
+ return "XInput Drum Kit";
+ case XINPUT_DEVSUBTYPE_GAMEPAD:
+ {
+ if (xic->Flags & XINPUT_CAPS_WIRELESS)
+ return "Wireless Xbox Controller";
+ else
+ return "Xbox Controller";
+ }
+ }
+
+ return "Unknown XInput Device";
+}
+
+// Lexically compare device objects
+//
+static int compareJoystickObjects(const void* first, const void* second)
+{
+ const _GLFWjoyobjectWin32* fo = first;
+ const _GLFWjoyobjectWin32* so = second;
+
+ if (fo->type != so->type)
+ return fo->type - so->type;
+
+ return fo->offset - so->offset;
+}
+
+// Checks whether the specified device supports XInput
+// Technique from FDInputJoystickManager::IsXInputDeviceFast in ZDoom
+//
+static GLFWbool supportsXInput(const GUID* guid)
+{
+ UINT i, count = 0;
+ RAWINPUTDEVICELIST* ridl;
+ GLFWbool result = GLFW_FALSE;
+
+ if (GetRawInputDeviceList(NULL, &count, sizeof(RAWINPUTDEVICELIST)) != 0)
+ return GLFW_FALSE;
+
+ ridl = calloc(count, sizeof(RAWINPUTDEVICELIST));
+
+ if (GetRawInputDeviceList(ridl, &count, sizeof(RAWINPUTDEVICELIST)) == (UINT) -1)
+ {
+ free(ridl);
+ return GLFW_FALSE;
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ RID_DEVICE_INFO rdi;
+ char name[256];
+ UINT size;
+
+ if (ridl[i].dwType != RIM_TYPEHID)
+ continue;
+
+ ZeroMemory(&rdi, sizeof(rdi));
+ rdi.cbSize = sizeof(rdi);
+ size = sizeof(rdi);
+
+ if ((INT) GetRawInputDeviceInfoA(ridl[i].hDevice,
+ RIDI_DEVICEINFO,
+ &rdi, &size) == -1)
+ {
+ continue;
+ }
+
+ if (MAKELONG(rdi.hid.dwVendorId, rdi.hid.dwProductId) != (LONG) guid->Data1)
+ continue;
+
+ memset(name, 0, sizeof(name));
+ size = sizeof(name);
+
+ if ((INT) GetRawInputDeviceInfoA(ridl[i].hDevice,
+ RIDI_DEVICENAME,
+ name, &size) == -1)
+ {
+ break;
+ }
+
+ name[sizeof(name) - 1] = '\0';
+ if (strstr(name, "IG_"))
+ {
+ result = GLFW_TRUE;
+ break;
+ }
+ }
+
+ free(ridl);
+ return result;
+}
+
+// Frees all resources associated with the specified joystick
+//
+static void closeJoystick(_GLFWjoystick* js)
+{
+ if (js->win32.device)
+ {
+ IDirectInputDevice8_Unacquire(js->win32.device);
+ IDirectInputDevice8_Release(js->win32.device);
+ }
+
+ free(js->win32.objects);
+
+ _glfwFreeJoystick(js);
+ _glfwInputJoystick(js, GLFW_DISCONNECTED);
+}
+
+// DirectInput device object enumeration callback
+// Insights gleaned from SDL
+//
+static BOOL CALLBACK deviceObjectCallback(const DIDEVICEOBJECTINSTANCEW* doi,
+ void* user)
+{
+ _GLFWobjenumWin32* data = user;
+ _GLFWjoyobjectWin32* object = data->objects + data->objectCount;
+
+ if (DIDFT_GETTYPE(doi->dwType) & DIDFT_AXIS)
+ {
+ DIPROPRANGE dipr;
+
+ if (memcmp(&doi->guidType, &GUID_Slider, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_SLIDER(data->sliderCount);
+ else if (memcmp(&doi->guidType, &GUID_XAxis, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_X;
+ else if (memcmp(&doi->guidType, &GUID_YAxis, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_Y;
+ else if (memcmp(&doi->guidType, &GUID_ZAxis, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_Z;
+ else if (memcmp(&doi->guidType, &GUID_RxAxis, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_RX;
+ else if (memcmp(&doi->guidType, &GUID_RyAxis, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_RY;
+ else if (memcmp(&doi->guidType, &GUID_RzAxis, sizeof(GUID)) == 0)
+ object->offset = DIJOFS_RZ;
+ else
+ return DIENUM_CONTINUE;
+
+ ZeroMemory(&dipr, sizeof(dipr));
+ dipr.diph.dwSize = sizeof(dipr);
+ dipr.diph.dwHeaderSize = sizeof(dipr.diph);
+ dipr.diph.dwObj = doi->dwType;
+ dipr.diph.dwHow = DIPH_BYID;
+ dipr.lMin = -32768;
+ dipr.lMax = 32767;
+
+ if (FAILED(IDirectInputDevice8_SetProperty(data->device,
+ DIPROP_RANGE,
+ &dipr.diph)))
+ {
+ return DIENUM_CONTINUE;
+ }
+
+ if (memcmp(&doi->guidType, &GUID_Slider, sizeof(GUID)) == 0)
+ {
+ object->type = _GLFW_TYPE_SLIDER;
+ data->sliderCount++;
+ }
+ else
+ {
+ object->type = _GLFW_TYPE_AXIS;
+ data->axisCount++;
+ }
+ }
+ else if (DIDFT_GETTYPE(doi->dwType) & DIDFT_BUTTON)
+ {
+ object->offset = DIJOFS_BUTTON(data->buttonCount);
+ object->type = _GLFW_TYPE_BUTTON;
+ data->buttonCount++;
+ }
+ else if (DIDFT_GETTYPE(doi->dwType) & DIDFT_POV)
+ {
+ object->offset = DIJOFS_POV(data->povCount);
+ object->type = _GLFW_TYPE_POV;
+ data->povCount++;
+ }
+
+ data->objectCount++;
+ return DIENUM_CONTINUE;
+}
+
+// DirectInput device enumeration callback
+//
+static BOOL CALLBACK deviceCallback(const DIDEVICEINSTANCE* di, void* user)
+{
+ int jid = 0;
+ DIDEVCAPS dc;
+ DIPROPDWORD dipd;
+ IDirectInputDevice8* device;
+ _GLFWobjenumWin32 data;
+ _GLFWjoystick* js;
+ char guid[33];
+ char name[256];
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ js = _glfw.joysticks + jid;
+ if (js->present)
+ {
+ if (memcmp(&js->win32.guid, &di->guidInstance, sizeof(GUID)) == 0)
+ return DIENUM_CONTINUE;
+ }
+ }
+
+ if (supportsXInput(&di->guidProduct))
+ return DIENUM_CONTINUE;
+
+ if (FAILED(IDirectInput8_CreateDevice(_glfw.win32.dinput8.api,
+ &di->guidInstance,
+ &device,
+ NULL)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to create device");
+ return DIENUM_CONTINUE;
+ }
+
+ if (FAILED(IDirectInputDevice8_SetDataFormat(device, &_glfwDataFormat)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to set device data format");
+
+ IDirectInputDevice8_Release(device);
+ return DIENUM_CONTINUE;
+ }
+
+ ZeroMemory(&dc, sizeof(dc));
+ dc.dwSize = sizeof(dc);
+
+ if (FAILED(IDirectInputDevice8_GetCapabilities(device, &dc)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to query device capabilities");
+
+ IDirectInputDevice8_Release(device);
+ return DIENUM_CONTINUE;
+ }
+
+ ZeroMemory(&dipd, sizeof(dipd));
+ dipd.diph.dwSize = sizeof(dipd);
+ dipd.diph.dwHeaderSize = sizeof(dipd.diph);
+ dipd.diph.dwHow = DIPH_DEVICE;
+ dipd.dwData = DIPROPAXISMODE_ABS;
+
+ if (FAILED(IDirectInputDevice8_SetProperty(device,
+ DIPROP_AXISMODE,
+ &dipd.diph)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to set device axis mode");
+
+ IDirectInputDevice8_Release(device);
+ return DIENUM_CONTINUE;
+ }
+
+ memset(&data, 0, sizeof(data));
+ data.device = device;
+ data.objects = calloc(dc.dwAxes + (size_t) dc.dwButtons + dc.dwPOVs,
+ sizeof(_GLFWjoyobjectWin32));
+
+ if (FAILED(IDirectInputDevice8_EnumObjects(device,
+ deviceObjectCallback,
+ &data,
+ DIDFT_AXIS | DIDFT_BUTTON | DIDFT_POV)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to enumerate device objects");
+
+ IDirectInputDevice8_Release(device);
+ free(data.objects);
+ return DIENUM_CONTINUE;
+ }
+
+ qsort(data.objects, data.objectCount,
+ sizeof(_GLFWjoyobjectWin32),
+ compareJoystickObjects);
+
+ if (!WideCharToMultiByte(CP_UTF8, 0,
+ di->tszInstanceName, -1,
+ name, sizeof(name),
+ NULL, NULL))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to convert joystick name to UTF-8");
+
+ IDirectInputDevice8_Release(device);
+ free(data.objects);
+ return DIENUM_STOP;
+ }
+
+ // Generate a joystick GUID that matches the SDL 2.0.5+ one
+ if (memcmp(&di->guidProduct.Data4[2], "PIDVID", 6) == 0)
+ {
+ sprintf(guid, "03000000%02x%02x0000%02x%02x000000000000",
+ (uint8_t) di->guidProduct.Data1,
+ (uint8_t) (di->guidProduct.Data1 >> 8),
+ (uint8_t) (di->guidProduct.Data1 >> 16),
+ (uint8_t) (di->guidProduct.Data1 >> 24));
+ }
+ else
+ {
+ sprintf(guid, "05000000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00",
+ name[0], name[1], name[2], name[3],
+ name[4], name[5], name[6], name[7],
+ name[8], name[9], name[10]);
+ }
+
+ js = _glfwAllocJoystick(name, guid,
+ data.axisCount + data.sliderCount,
+ data.buttonCount,
+ data.povCount);
+ if (!js)
+ {
+ IDirectInputDevice8_Release(device);
+ free(data.objects);
+ return DIENUM_STOP;
+ }
+
+ js->win32.device = device;
+ js->win32.guid = di->guidInstance;
+ js->win32.objects = data.objects;
+ js->win32.objectCount = data.objectCount;
+
+ _glfwInputJoystick(js, GLFW_CONNECTED);
+ return DIENUM_CONTINUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialize joystick interface
+//
+void _glfwInitJoysticksWin32(void)
+{
+ if (_glfw.win32.dinput8.instance)
+ {
+ if (FAILED(DirectInput8Create(GetModuleHandle(NULL),
+ DIRECTINPUT_VERSION,
+ &IID_IDirectInput8W,
+ (void**) &_glfw.win32.dinput8.api,
+ NULL)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create interface");
+ }
+ }
+
+ _glfwDetectJoystickConnectionWin32();
+}
+
+// Close all opened joystick handles
+//
+void _glfwTerminateJoysticksWin32(void)
+{
+ int jid;
+
+ for (jid = GLFW_JOYSTICK_1; jid <= GLFW_JOYSTICK_LAST; jid++)
+ closeJoystick(_glfw.joysticks + jid);
+
+ if (_glfw.win32.dinput8.api)
+ IDirectInput8_Release(_glfw.win32.dinput8.api);
+}
+
+// Checks for new joysticks after DBT_DEVICEARRIVAL
+//
+void _glfwDetectJoystickConnectionWin32(void)
+{
+ if (_glfw.win32.xinput.instance)
+ {
+ DWORD index;
+
+ for (index = 0; index < XUSER_MAX_COUNT; index++)
+ {
+ int jid;
+ char guid[33];
+ XINPUT_CAPABILITIES xic;
+ _GLFWjoystick* js;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ if (_glfw.joysticks[jid].present &&
+ _glfw.joysticks[jid].win32.device == NULL &&
+ _glfw.joysticks[jid].win32.index == index)
+ {
+ break;
+ }
+ }
+
+ if (jid <= GLFW_JOYSTICK_LAST)
+ continue;
+
+ if (XInputGetCapabilities(index, 0, &xic) != ERROR_SUCCESS)
+ continue;
+
+ // Generate a joystick GUID that matches the SDL 2.0.5+ one
+ sprintf(guid, "78696e707574%02x000000000000000000",
+ xic.SubType & 0xff);
+
+ js = _glfwAllocJoystick(getDeviceDescription(&xic), guid, 6, 10, 1);
+ if (!js)
+ continue;
+
+ js->win32.index = index;
+
+ _glfwInputJoystick(js, GLFW_CONNECTED);
+ }
+ }
+
+ if (_glfw.win32.dinput8.api)
+ {
+ if (FAILED(IDirectInput8_EnumDevices(_glfw.win32.dinput8.api,
+ DI8DEVCLASS_GAMECTRL,
+ deviceCallback,
+ NULL,
+ DIEDFL_ALLDEVICES)))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Failed to enumerate DirectInput8 devices");
+ return;
+ }
+ }
+}
+
+// Checks for joystick disconnection after DBT_DEVICEREMOVECOMPLETE
+//
+void _glfwDetectJoystickDisconnectionWin32(void)
+{
+ int jid;
+
+ for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
+ {
+ _GLFWjoystick* js = _glfw.joysticks + jid;
+ if (js->present)
+ _glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE);
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
+{
+ if (js->win32.device)
+ {
+ int i, ai = 0, bi = 0, pi = 0;
+ HRESULT result;
+ DIJOYSTATE state;
+
+ IDirectInputDevice8_Poll(js->win32.device);
+ result = IDirectInputDevice8_GetDeviceState(js->win32.device,
+ sizeof(state),
+ &state);
+ if (result == DIERR_NOTACQUIRED || result == DIERR_INPUTLOST)
+ {
+ IDirectInputDevice8_Acquire(js->win32.device);
+ IDirectInputDevice8_Poll(js->win32.device);
+ result = IDirectInputDevice8_GetDeviceState(js->win32.device,
+ sizeof(state),
+ &state);
+ }
+
+ if (FAILED(result))
+ {
+ closeJoystick(js);
+ return GLFW_FALSE;
+ }
+
+ if (mode == _GLFW_POLL_PRESENCE)
+ return GLFW_TRUE;
+
+ for (i = 0; i < js->win32.objectCount; i++)
+ {
+ const void* data = (char*) &state + js->win32.objects[i].offset;
+
+ switch (js->win32.objects[i].type)
+ {
+ case _GLFW_TYPE_AXIS:
+ case _GLFW_TYPE_SLIDER:
+ {
+ const float value = (*((LONG*) data) + 0.5f) / 32767.5f;
+ _glfwInputJoystickAxis(js, ai, value);
+ ai++;
+ break;
+ }
+
+ case _GLFW_TYPE_BUTTON:
+ {
+ const char value = (*((BYTE*) data) & 0x80) != 0;
+ _glfwInputJoystickButton(js, bi, value);
+ bi++;
+ break;
+ }
+
+ case _GLFW_TYPE_POV:
+ {
+ const int states[9] =
+ {
+ GLFW_HAT_UP,
+ GLFW_HAT_RIGHT_UP,
+ GLFW_HAT_RIGHT,
+ GLFW_HAT_RIGHT_DOWN,
+ GLFW_HAT_DOWN,
+ GLFW_HAT_LEFT_DOWN,
+ GLFW_HAT_LEFT,
+ GLFW_HAT_LEFT_UP,
+ GLFW_HAT_CENTERED
+ };
+
+ // Screams of horror are appropriate at this point
+ int stateIndex = LOWORD(*(DWORD*) data) / (45 * DI_DEGREES);
+ if (stateIndex < 0 || stateIndex > 8)
+ stateIndex = 8;
+
+ _glfwInputJoystickHat(js, pi, states[stateIndex]);
+ pi++;
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ int i, dpad = 0;
+ DWORD result;
+ XINPUT_STATE xis;
+ const WORD buttons[10] =
+ {
+ XINPUT_GAMEPAD_A,
+ XINPUT_GAMEPAD_B,
+ XINPUT_GAMEPAD_X,
+ XINPUT_GAMEPAD_Y,
+ XINPUT_GAMEPAD_LEFT_SHOULDER,
+ XINPUT_GAMEPAD_RIGHT_SHOULDER,
+ XINPUT_GAMEPAD_BACK,
+ XINPUT_GAMEPAD_START,
+ XINPUT_GAMEPAD_LEFT_THUMB,
+ XINPUT_GAMEPAD_RIGHT_THUMB
+ };
+
+ result = XInputGetState(js->win32.index, &xis);
+ if (result != ERROR_SUCCESS)
+ {
+ if (result == ERROR_DEVICE_NOT_CONNECTED)
+ closeJoystick(js);
+
+ return GLFW_FALSE;
+ }
+
+ if (mode == _GLFW_POLL_PRESENCE)
+ return GLFW_TRUE;
+
+ _glfwInputJoystickAxis(js, 0, (xis.Gamepad.sThumbLX + 0.5f) / 32767.5f);
+ _glfwInputJoystickAxis(js, 1, -(xis.Gamepad.sThumbLY + 0.5f) / 32767.5f);
+ _glfwInputJoystickAxis(js, 2, (xis.Gamepad.sThumbRX + 0.5f) / 32767.5f);
+ _glfwInputJoystickAxis(js, 3, -(xis.Gamepad.sThumbRY + 0.5f) / 32767.5f);
+ _glfwInputJoystickAxis(js, 4, xis.Gamepad.bLeftTrigger / 127.5f - 1.f);
+ _glfwInputJoystickAxis(js, 5, xis.Gamepad.bRightTrigger / 127.5f - 1.f);
+
+ for (i = 0; i < 10; i++)
+ {
+ const char value = (xis.Gamepad.wButtons & buttons[i]) ? 1 : 0;
+ _glfwInputJoystickButton(js, i, value);
+ }
+
+ if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP)
+ dpad |= GLFW_HAT_UP;
+ if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT)
+ dpad |= GLFW_HAT_RIGHT;
+ if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN)
+ dpad |= GLFW_HAT_DOWN;
+ if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT)
+ dpad |= GLFW_HAT_LEFT;
+
+ _glfwInputJoystickHat(js, 0, dpad);
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformUpdateGamepadGUID(char* guid)
+{
+ if (strcmp(guid + 20, "504944564944") == 0)
+ {
+ char original[33];
+ strncpy(original, guid, sizeof(original) - 1);
+ sprintf(guid, "03000000%.4s0000%.4s000000000000",
+ original, original + 4);
+ }
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.h
new file mode 100644
index 0000000..d591a82
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_joystick.h
@@ -0,0 +1,57 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickWin32 win32
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; }
+
+#define _GLFW_PLATFORM_MAPPING_NAME "Windows"
+#define GLFW_BUILD_WIN32_MAPPINGS
+
+// Joystick element (axis, button or slider)
+//
+typedef struct _GLFWjoyobjectWin32
+{
+ int offset;
+ int type;
+} _GLFWjoyobjectWin32;
+
+// Win32-specific per-joystick data
+//
+typedef struct _GLFWjoystickWin32
+{
+ _GLFWjoyobjectWin32* objects;
+ int objectCount;
+ IDirectInputDevice8W* device;
+ DWORD index;
+ GUID guid;
+} _GLFWjoystickWin32;
+
+
+void _glfwInitJoysticksWin32(void);
+void _glfwTerminateJoysticksWin32(void);
+void _glfwDetectJoystickConnectionWin32(void);
+void _glfwDetectJoystickDisconnectionWin32(void);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_monitor.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_monitor.c
new file mode 100644
index 0000000..3cb3393
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_monitor.c
@@ -0,0 +1,548 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <malloc.h>
+#include <wchar.h>
+
+
+// Callback for EnumDisplayMonitors in createMonitor
+//
+static BOOL CALLBACK monitorCallback(HMONITOR handle,
+ HDC dc,
+ RECT* rect,
+ LPARAM data)
+{
+ MONITORINFOEXW mi;
+ ZeroMemory(&mi, sizeof(mi));
+ mi.cbSize = sizeof(mi);
+
+ if (GetMonitorInfoW(handle, (MONITORINFO*) &mi))
+ {
+ _GLFWmonitor* monitor = (_GLFWmonitor*) data;
+ if (wcscmp(mi.szDevice, monitor->win32.adapterName) == 0)
+ monitor->win32.handle = handle;
+ }
+
+ return TRUE;
+}
+
+// Create monitor from an adapter and (optionally) a display
+//
+static _GLFWmonitor* createMonitor(DISPLAY_DEVICEW* adapter,
+ DISPLAY_DEVICEW* display)
+{
+ _GLFWmonitor* monitor;
+ int widthMM, heightMM;
+ char* name;
+ HDC dc;
+ DEVMODEW dm;
+ RECT rect;
+
+ if (display)
+ name = _glfwCreateUTF8FromWideStringWin32(display->DeviceString);
+ else
+ name = _glfwCreateUTF8FromWideStringWin32(adapter->DeviceString);
+ if (!name)
+ return NULL;
+
+ ZeroMemory(&dm, sizeof(dm));
+ dm.dmSize = sizeof(dm);
+ EnumDisplaySettingsW(adapter->DeviceName, ENUM_CURRENT_SETTINGS, &dm);
+
+ dc = CreateDCW(L"DISPLAY", adapter->DeviceName, NULL, NULL);
+
+ if (IsWindows8Point1OrGreater())
+ {
+ widthMM = GetDeviceCaps(dc, HORZSIZE);
+ heightMM = GetDeviceCaps(dc, VERTSIZE);
+ }
+ else
+ {
+ widthMM = (int) (dm.dmPelsWidth * 25.4f / GetDeviceCaps(dc, LOGPIXELSX));
+ heightMM = (int) (dm.dmPelsHeight * 25.4f / GetDeviceCaps(dc, LOGPIXELSY));
+ }
+
+ DeleteDC(dc);
+
+ monitor = _glfwAllocMonitor(name, widthMM, heightMM);
+ free(name);
+
+ if (adapter->StateFlags & DISPLAY_DEVICE_MODESPRUNED)
+ monitor->win32.modesPruned = GLFW_TRUE;
+
+ wcscpy(monitor->win32.adapterName, adapter->DeviceName);
+ WideCharToMultiByte(CP_UTF8, 0,
+ adapter->DeviceName, -1,
+ monitor->win32.publicAdapterName,
+ sizeof(monitor->win32.publicAdapterName),
+ NULL, NULL);
+
+ if (display)
+ {
+ wcscpy(monitor->win32.displayName, display->DeviceName);
+ WideCharToMultiByte(CP_UTF8, 0,
+ display->DeviceName, -1,
+ monitor->win32.publicDisplayName,
+ sizeof(monitor->win32.publicDisplayName),
+ NULL, NULL);
+ }
+
+ rect.left = dm.dmPosition.x;
+ rect.top = dm.dmPosition.y;
+ rect.right = dm.dmPosition.x + dm.dmPelsWidth;
+ rect.bottom = dm.dmPosition.y + dm.dmPelsHeight;
+
+ EnumDisplayMonitors(NULL, &rect, monitorCallback, (LPARAM) monitor);
+ return monitor;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Poll for changes in the set of connected monitors
+//
+void _glfwPollMonitorsWin32(void)
+{
+ int i, disconnectedCount;
+ _GLFWmonitor** disconnected = NULL;
+ DWORD adapterIndex, displayIndex;
+ DISPLAY_DEVICEW adapter, display;
+ _GLFWmonitor* monitor;
+
+ disconnectedCount = _glfw.monitorCount;
+ if (disconnectedCount)
+ {
+ disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));
+ memcpy(disconnected,
+ _glfw.monitors,
+ _glfw.monitorCount * sizeof(_GLFWmonitor*));
+ }
+
+ for (adapterIndex = 0; ; adapterIndex++)
+ {
+ int type = _GLFW_INSERT_LAST;
+
+ ZeroMemory(&adapter, sizeof(adapter));
+ adapter.cb = sizeof(adapter);
+
+ if (!EnumDisplayDevicesW(NULL, adapterIndex, &adapter, 0))
+ break;
+
+ if (!(adapter.StateFlags & DISPLAY_DEVICE_ACTIVE))
+ continue;
+
+ if (adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
+ type = _GLFW_INSERT_FIRST;
+
+ for (displayIndex = 0; ; displayIndex++)
+ {
+ ZeroMemory(&display, sizeof(display));
+ display.cb = sizeof(display);
+
+ if (!EnumDisplayDevicesW(adapter.DeviceName, displayIndex, &display, 0))
+ break;
+
+ if (!(display.StateFlags & DISPLAY_DEVICE_ACTIVE))
+ continue;
+
+ for (i = 0; i < disconnectedCount; i++)
+ {
+ if (disconnected[i] &&
+ wcscmp(disconnected[i]->win32.displayName,
+ display.DeviceName) == 0)
+ {
+ disconnected[i] = NULL;
+ // handle may have changed, update
+ EnumDisplayMonitors(NULL, NULL, monitorCallback, (LPARAM) _glfw.monitors[i]);
+ break;
+ }
+ }
+
+ if (i < disconnectedCount)
+ continue;
+
+ monitor = createMonitor(&adapter, &display);
+ if (!monitor)
+ {
+ free(disconnected);
+ return;
+ }
+
+ _glfwInputMonitor(monitor, GLFW_CONNECTED, type);
+
+ type = _GLFW_INSERT_LAST;
+ }
+
+ // HACK: If an active adapter does not have any display devices
+ // (as sometimes happens), add it directly as a monitor
+ if (displayIndex == 0)
+ {
+ for (i = 0; i < disconnectedCount; i++)
+ {
+ if (disconnected[i] &&
+ wcscmp(disconnected[i]->win32.adapterName,
+ adapter.DeviceName) == 0)
+ {
+ disconnected[i] = NULL;
+ break;
+ }
+ }
+
+ if (i < disconnectedCount)
+ continue;
+
+ monitor = createMonitor(&adapter, NULL);
+ if (!monitor)
+ {
+ free(disconnected);
+ return;
+ }
+
+ _glfwInputMonitor(monitor, GLFW_CONNECTED, type);
+ }
+ }
+
+ for (i = 0; i < disconnectedCount; i++)
+ {
+ if (disconnected[i])
+ _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);
+ }
+
+ free(disconnected);
+}
+
+// Change the current video mode
+//
+void _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired)
+{
+ GLFWvidmode current;
+ const GLFWvidmode* best;
+ DEVMODEW dm;
+ LONG result;
+
+ best = _glfwChooseVideoMode(monitor, desired);
+ _glfwPlatformGetVideoMode(monitor, &current);
+ if (_glfwCompareVideoModes(&current, best) == 0)
+ return;
+
+ ZeroMemory(&dm, sizeof(dm));
+ dm.dmSize = sizeof(dm);
+ dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL |
+ DM_DISPLAYFREQUENCY;
+ dm.dmPelsWidth = best->width;
+ dm.dmPelsHeight = best->height;
+ dm.dmBitsPerPel = best->redBits + best->greenBits + best->blueBits;
+ dm.dmDisplayFrequency = best->refreshRate;
+
+ if (dm.dmBitsPerPel < 15 || dm.dmBitsPerPel >= 24)
+ dm.dmBitsPerPel = 32;
+
+ result = ChangeDisplaySettingsExW(monitor->win32.adapterName,
+ &dm,
+ NULL,
+ CDS_FULLSCREEN,
+ NULL);
+ if (result == DISP_CHANGE_SUCCESSFUL)
+ monitor->win32.modeChanged = GLFW_TRUE;
+ else
+ {
+ const char* description = "Unknown error";
+
+ if (result == DISP_CHANGE_BADDUALVIEW)
+ description = "The system uses DualView";
+ else if (result == DISP_CHANGE_BADFLAGS)
+ description = "Invalid flags";
+ else if (result == DISP_CHANGE_BADMODE)
+ description = "Graphics mode not supported";
+ else if (result == DISP_CHANGE_BADPARAM)
+ description = "Invalid parameter";
+ else if (result == DISP_CHANGE_FAILED)
+ description = "Graphics mode failed";
+ else if (result == DISP_CHANGE_NOTUPDATED)
+ description = "Failed to write to registry";
+ else if (result == DISP_CHANGE_RESTART)
+ description = "Computer restart required";
+
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to set video mode: %s",
+ description);
+ }
+}
+
+// Restore the previously saved (original) video mode
+//
+void _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor)
+{
+ if (monitor->win32.modeChanged)
+ {
+ ChangeDisplaySettingsExW(monitor->win32.adapterName,
+ NULL, NULL, CDS_FULLSCREEN, NULL);
+ monitor->win32.modeChanged = GLFW_FALSE;
+ }
+}
+
+void _glfwGetMonitorContentScaleWin32(HMONITOR handle, float* xscale, float* yscale)
+{
+ UINT xdpi, ydpi;
+
+ if (xscale)
+ *xscale = 0.f;
+ if (yscale)
+ *yscale = 0.f;
+
+ if (IsWindows8Point1OrGreater())
+ {
+ if (GetDpiForMonitor(handle, MDT_EFFECTIVE_DPI, &xdpi, &ydpi) != S_OK)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to query monitor DPI");
+ return;
+ }
+ }
+ else
+ {
+ const HDC dc = GetDC(NULL);
+ xdpi = GetDeviceCaps(dc, LOGPIXELSX);
+ ydpi = GetDeviceCaps(dc, LOGPIXELSY);
+ ReleaseDC(NULL, dc);
+ }
+
+ if (xscale)
+ *xscale = xdpi / (float) USER_DEFAULT_SCREEN_DPI;
+ if (yscale)
+ *yscale = ydpi / (float) USER_DEFAULT_SCREEN_DPI;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)
+{
+}
+
+void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
+{
+ DEVMODEW dm;
+ ZeroMemory(&dm, sizeof(dm));
+ dm.dmSize = sizeof(dm);
+
+ EnumDisplaySettingsExW(monitor->win32.adapterName,
+ ENUM_CURRENT_SETTINGS,
+ &dm,
+ EDS_ROTATEDMODE);
+
+ if (xpos)
+ *xpos = dm.dmPosition.x;
+ if (ypos)
+ *ypos = dm.dmPosition.y;
+}
+
+void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
+ float* xscale, float* yscale)
+{
+ _glfwGetMonitorContentScaleWin32(monitor->win32.handle, xscale, yscale);
+}
+
+void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
+ int* xpos, int* ypos,
+ int* width, int* height)
+{
+ MONITORINFO mi = { sizeof(mi) };
+ GetMonitorInfo(monitor->win32.handle, &mi);
+
+ if (xpos)
+ *xpos = mi.rcWork.left;
+ if (ypos)
+ *ypos = mi.rcWork.top;
+ if (width)
+ *width = mi.rcWork.right - mi.rcWork.left;
+ if (height)
+ *height = mi.rcWork.bottom - mi.rcWork.top;
+}
+
+GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
+{
+ int modeIndex = 0, size = 0;
+ GLFWvidmode* result = NULL;
+
+ *count = 0;
+
+ for (;;)
+ {
+ int i;
+ GLFWvidmode mode;
+ DEVMODEW dm;
+
+ ZeroMemory(&dm, sizeof(dm));
+ dm.dmSize = sizeof(dm);
+
+ if (!EnumDisplaySettingsW(monitor->win32.adapterName, modeIndex, &dm))
+ break;
+
+ modeIndex++;
+
+ // Skip modes with less than 15 BPP
+ if (dm.dmBitsPerPel < 15)
+ continue;
+
+ mode.width = dm.dmPelsWidth;
+ mode.height = dm.dmPelsHeight;
+ mode.refreshRate = dm.dmDisplayFrequency;
+ _glfwSplitBPP(dm.dmBitsPerPel,
+ &mode.redBits,
+ &mode.greenBits,
+ &mode.blueBits);
+
+ for (i = 0; i < *count; i++)
+ {
+ if (_glfwCompareVideoModes(result + i, &mode) == 0)
+ break;
+ }
+
+ // Skip duplicate modes
+ if (i < *count)
+ continue;
+
+ if (monitor->win32.modesPruned)
+ {
+ // Skip modes not supported by the connected displays
+ if (ChangeDisplaySettingsExW(monitor->win32.adapterName,
+ &dm,
+ NULL,
+ CDS_TEST,
+ NULL) != DISP_CHANGE_SUCCESSFUL)
+ {
+ continue;
+ }
+ }
+
+ if (*count == size)
+ {
+ size += 128;
+ result = (GLFWvidmode*) realloc(result, size * sizeof(GLFWvidmode));
+ }
+
+ (*count)++;
+ result[*count - 1] = mode;
+ }
+
+ if (!*count)
+ {
+ // HACK: Report the current mode if no valid modes were found
+ result = calloc(1, sizeof(GLFWvidmode));
+ _glfwPlatformGetVideoMode(monitor, result);
+ *count = 1;
+ }
+
+ return result;
+}
+
+void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
+{
+ DEVMODEW dm;
+ ZeroMemory(&dm, sizeof(dm));
+ dm.dmSize = sizeof(dm);
+
+ EnumDisplaySettingsW(monitor->win32.adapterName, ENUM_CURRENT_SETTINGS, &dm);
+
+ mode->width = dm.dmPelsWidth;
+ mode->height = dm.dmPelsHeight;
+ mode->refreshRate = dm.dmDisplayFrequency;
+ _glfwSplitBPP(dm.dmBitsPerPel,
+ &mode->redBits,
+ &mode->greenBits,
+ &mode->blueBits);
+}
+
+GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
+{
+ HDC dc;
+ WORD values[3][256];
+
+ dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
+ GetDeviceGammaRamp(dc, values);
+ DeleteDC(dc);
+
+ _glfwAllocGammaArrays(ramp, 256);
+
+ memcpy(ramp->red, values[0], sizeof(values[0]));
+ memcpy(ramp->green, values[1], sizeof(values[1]));
+ memcpy(ramp->blue, values[2], sizeof(values[2]));
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
+{
+ HDC dc;
+ WORD values[3][256];
+
+ if (ramp->size != 256)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Gamma ramp size must be 256");
+ return;
+ }
+
+ memcpy(values[0], ramp->red, sizeof(values[0]));
+ memcpy(values[1], ramp->green, sizeof(values[1]));
+ memcpy(values[2], ramp->blue, sizeof(values[2]));
+
+ dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
+ SetDeviceGammaRamp(dc, values);
+ DeleteDC(dc);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return monitor->win32.publicAdapterName;
+}
+
+GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return monitor->win32.publicDisplayName;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_platform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_platform.h
new file mode 100644
index 0000000..b964e13
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_platform.h
@@ -0,0 +1,452 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+// We don't need all the fancy stuff
+#ifndef NOMINMAX
+ #define NOMINMAX
+#endif
+
+#ifndef VC_EXTRALEAN
+ #define VC_EXTRALEAN
+#endif
+
+#ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+#endif
+
+// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
+// example to allow applications to correctly declare a GL_KHR_debug callback)
+// but windows.h assumes no one will define APIENTRY before it does
+#undef APIENTRY
+
+// GLFW on Windows is Unicode only and does not work in MBCS mode
+#ifndef UNICODE
+ #define UNICODE
+#endif
+
+// GLFW requires Windows XP or later
+#if WINVER < 0x0501
+ #undef WINVER
+ #define WINVER 0x0501
+#endif
+#if _WIN32_WINNT < 0x0501
+ #undef _WIN32_WINNT
+ #define _WIN32_WINNT 0x0501
+#endif
+
+// GLFW uses DirectInput8 interfaces
+#define DIRECTINPUT_VERSION 0x0800
+
+// GLFW uses OEM cursor resources
+#define OEMRESOURCE
+
+#include <wctype.h>
+#include <windows.h>
+#include <dinput.h>
+#include <xinput.h>
+#include <dbt.h>
+
+// HACK: Define macros that some windows.h variants don't
+#ifndef WM_MOUSEHWHEEL
+ #define WM_MOUSEHWHEEL 0x020E
+#endif
+#ifndef WM_DWMCOMPOSITIONCHANGED
+ #define WM_DWMCOMPOSITIONCHANGED 0x031E
+#endif
+#ifndef WM_DWMCOLORIZATIONCOLORCHANGED
+ #define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
+#endif
+#ifndef WM_COPYGLOBALDATA
+ #define WM_COPYGLOBALDATA 0x0049
+#endif
+#ifndef WM_UNICHAR
+ #define WM_UNICHAR 0x0109
+#endif
+#ifndef UNICODE_NOCHAR
+ #define UNICODE_NOCHAR 0xFFFF
+#endif
+#ifndef WM_DPICHANGED
+ #define WM_DPICHANGED 0x02E0
+#endif
+#ifndef GET_XBUTTON_WPARAM
+ #define GET_XBUTTON_WPARAM(w) (HIWORD(w))
+#endif
+#ifndef EDS_ROTATEDMODE
+ #define EDS_ROTATEDMODE 0x00000004
+#endif
+#ifndef DISPLAY_DEVICE_ACTIVE
+ #define DISPLAY_DEVICE_ACTIVE 0x00000001
+#endif
+#ifndef _WIN32_WINNT_WINBLUE
+ #define _WIN32_WINNT_WINBLUE 0x0603
+#endif
+#ifndef _WIN32_WINNT_WIN8
+ #define _WIN32_WINNT_WIN8 0x0602
+#endif
+#ifndef WM_GETDPISCALEDSIZE
+ #define WM_GETDPISCALEDSIZE 0x02e4
+#endif
+#ifndef USER_DEFAULT_SCREEN_DPI
+ #define USER_DEFAULT_SCREEN_DPI 96
+#endif
+#ifndef OCR_HAND
+ #define OCR_HAND 32649
+#endif
+
+#if WINVER < 0x0601
+typedef struct
+{
+ DWORD cbSize;
+ DWORD ExtStatus;
+} CHANGEFILTERSTRUCT;
+#ifndef MSGFLT_ALLOW
+ #define MSGFLT_ALLOW 1
+#endif
+#endif /*Windows 7*/
+
+#if WINVER < 0x0600
+#define DWM_BB_ENABLE 0x00000001
+#define DWM_BB_BLURREGION 0x00000002
+typedef struct
+{
+ DWORD dwFlags;
+ BOOL fEnable;
+ HRGN hRgnBlur;
+ BOOL fTransitionOnMaximized;
+} DWM_BLURBEHIND;
+#else
+ #include <dwmapi.h>
+#endif /*Windows Vista*/
+
+#ifndef DPI_ENUMS_DECLARED
+typedef enum
+{
+ PROCESS_DPI_UNAWARE = 0,
+ PROCESS_SYSTEM_DPI_AWARE = 1,
+ PROCESS_PER_MONITOR_DPI_AWARE = 2
+} PROCESS_DPI_AWARENESS;
+typedef enum
+{
+ MDT_EFFECTIVE_DPI = 0,
+ MDT_ANGULAR_DPI = 1,
+ MDT_RAW_DPI = 2,
+ MDT_DEFAULT = MDT_EFFECTIVE_DPI
+} MONITOR_DPI_TYPE;
+#endif /*DPI_ENUMS_DECLARED*/
+
+#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
+#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE) -4)
+#endif /*DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2*/
+
+// HACK: Define versionhelpers.h functions manually as MinGW lacks the header
+#define IsWindowsXPOrGreater() \
+ _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINXP), \
+ LOBYTE(_WIN32_WINNT_WINXP), 0)
+#define IsWindowsVistaOrGreater() \
+ _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_VISTA), \
+ LOBYTE(_WIN32_WINNT_VISTA), 0)
+#define IsWindows7OrGreater() \
+ _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN7), \
+ LOBYTE(_WIN32_WINNT_WIN7), 0)
+#define IsWindows8OrGreater() \
+ _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN8), \
+ LOBYTE(_WIN32_WINNT_WIN8), 0)
+#define IsWindows8Point1OrGreater() \
+ _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINBLUE), \
+ LOBYTE(_WIN32_WINNT_WINBLUE), 0)
+
+#define _glfwIsWindows10AnniversaryUpdateOrGreaterWin32() \
+ _glfwIsWindows10BuildOrGreaterWin32(14393)
+#define _glfwIsWindows10CreatorsUpdateOrGreaterWin32() \
+ _glfwIsWindows10BuildOrGreaterWin32(15063)
+
+// HACK: Define macros that some xinput.h variants don't
+#ifndef XINPUT_CAPS_WIRELESS
+ #define XINPUT_CAPS_WIRELESS 0x0002
+#endif
+#ifndef XINPUT_DEVSUBTYPE_WHEEL
+ #define XINPUT_DEVSUBTYPE_WHEEL 0x02
+#endif
+#ifndef XINPUT_DEVSUBTYPE_ARCADE_STICK
+ #define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
+#endif
+#ifndef XINPUT_DEVSUBTYPE_FLIGHT_STICK
+ #define XINPUT_DEVSUBTYPE_FLIGHT_STICK 0x04
+#endif
+#ifndef XINPUT_DEVSUBTYPE_DANCE_PAD
+ #define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
+#endif
+#ifndef XINPUT_DEVSUBTYPE_GUITAR
+ #define XINPUT_DEVSUBTYPE_GUITAR 0x06
+#endif
+#ifndef XINPUT_DEVSUBTYPE_DRUM_KIT
+ #define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
+#endif
+#ifndef XINPUT_DEVSUBTYPE_ARCADE_PAD
+ #define XINPUT_DEVSUBTYPE_ARCADE_PAD 0x13
+#endif
+#ifndef XUSER_MAX_COUNT
+ #define XUSER_MAX_COUNT 4
+#endif
+
+// HACK: Define macros that some dinput.h variants don't
+#ifndef DIDFT_OPTIONAL
+ #define DIDFT_OPTIONAL 0x80000000
+#endif
+
+// xinput.dll function pointer typedefs
+typedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
+typedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);
+#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities
+#define XInputGetState _glfw.win32.xinput.GetState
+
+// dinput8.dll function pointer typedefs
+typedef HRESULT (WINAPI * PFN_DirectInput8Create)(HINSTANCE,DWORD,REFIID,LPVOID*,LPUNKNOWN);
+#define DirectInput8Create _glfw.win32.dinput8.Create
+
+// user32.dll function pointer typedefs
+typedef BOOL (WINAPI * PFN_SetProcessDPIAware)(void);
+typedef BOOL (WINAPI * PFN_ChangeWindowMessageFilterEx)(HWND,UINT,DWORD,CHANGEFILTERSTRUCT*);
+typedef BOOL (WINAPI * PFN_EnableNonClientDpiScaling)(HWND);
+typedef BOOL (WINAPI * PFN_SetProcessDpiAwarenessContext)(HANDLE);
+typedef UINT (WINAPI * PFN_GetDpiForWindow)(HWND);
+typedef BOOL (WINAPI * PFN_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT);
+#define SetProcessDPIAware _glfw.win32.user32.SetProcessDPIAware_
+#define ChangeWindowMessageFilterEx _glfw.win32.user32.ChangeWindowMessageFilterEx_
+#define EnableNonClientDpiScaling _glfw.win32.user32.EnableNonClientDpiScaling_
+#define SetProcessDpiAwarenessContext _glfw.win32.user32.SetProcessDpiAwarenessContext_
+#define GetDpiForWindow _glfw.win32.user32.GetDpiForWindow_
+#define AdjustWindowRectExForDpi _glfw.win32.user32.AdjustWindowRectExForDpi_
+
+// dwmapi.dll function pointer typedefs
+typedef HRESULT (WINAPI * PFN_DwmIsCompositionEnabled)(BOOL*);
+typedef HRESULT (WINAPI * PFN_DwmFlush)(VOID);
+typedef HRESULT(WINAPI * PFN_DwmEnableBlurBehindWindow)(HWND,const DWM_BLURBEHIND*);
+typedef HRESULT (WINAPI * PFN_DwmGetColorizationColor)(DWORD*,BOOL*);
+#define DwmIsCompositionEnabled _glfw.win32.dwmapi.IsCompositionEnabled
+#define DwmFlush _glfw.win32.dwmapi.Flush
+#define DwmEnableBlurBehindWindow _glfw.win32.dwmapi.EnableBlurBehindWindow
+#define DwmGetColorizationColor _glfw.win32.dwmapi.GetColorizationColor
+
+// shcore.dll function pointer typedefs
+typedef HRESULT (WINAPI * PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS);
+typedef HRESULT (WINAPI * PFN_GetDpiForMonitor)(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*);
+#define SetProcessDpiAwareness _glfw.win32.shcore.SetProcessDpiAwareness_
+#define GetDpiForMonitor _glfw.win32.shcore.GetDpiForMonitor_
+
+// ntdll.dll function pointer typedefs
+typedef LONG (WINAPI * PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*,ULONG,ULONGLONG);
+#define RtlVerifyVersionInfo _glfw.win32.ntdll.RtlVerifyVersionInfo_
+
+typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
+
+typedef struct VkWin32SurfaceCreateInfoKHR
+{
+ VkStructureType sType;
+ const void* pNext;
+ VkWin32SurfaceCreateFlagsKHR flags;
+ HINSTANCE hinstance;
+ HWND hwnd;
+} VkWin32SurfaceCreateInfoKHR;
+
+typedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
+typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t);
+
+#include "win32_joystick.h"
+#include "wgl_context.h"
+#include "egl_context.h"
+#include "osmesa_context.h"
+
+#if !defined(_GLFW_WNDCLASSNAME)
+ #define _GLFW_WNDCLASSNAME L"GLFW30"
+#endif
+
+#define _glfw_dlopen(name) LoadLibraryA(name)
+#define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle)
+#define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
+
+#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->win32.handle)
+#define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY
+
+#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWin32 win32
+#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32
+#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerWin32 win32
+#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorWin32 win32
+#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorWin32 win32
+#define _GLFW_PLATFORM_TLS_STATE _GLFWtlsWin32 win32
+#define _GLFW_PLATFORM_MUTEX_STATE _GLFWmutexWin32 win32
+
+
+// Win32-specific per-window data
+//
+typedef struct _GLFWwindowWin32
+{
+ HWND handle;
+ HICON bigIcon;
+ HICON smallIcon;
+
+ GLFWbool cursorTracked;
+ GLFWbool frameAction;
+ GLFWbool iconified;
+ GLFWbool maximized;
+ // Whether to enable framebuffer transparency on DWM
+ GLFWbool transparent;
+ GLFWbool scaleToMonitor;
+
+ // Cached size used to filter out duplicate events
+ int width, height;
+
+ // The last received cursor position, regardless of source
+ int lastCursorPosX, lastCursorPosY;
+ // The last recevied high surrogate when decoding pairs of UTF-16 messages
+ WCHAR highSurrogate;
+} _GLFWwindowWin32;
+
+// Win32-specific global data
+//
+typedef struct _GLFWlibraryWin32
+{
+ HWND helperWindowHandle;
+ HDEVNOTIFY deviceNotificationHandle;
+ DWORD foregroundLockTimeout;
+ int acquiredMonitorCount;
+ char* clipboardString;
+ short int keycodes[512];
+ short int scancodes[GLFW_KEY_LAST + 1];
+ char keynames[GLFW_KEY_LAST + 1][5];
+ // Where to place the cursor when re-enabled
+ double restoreCursorPosX, restoreCursorPosY;
+ // The window whose disabled cursor mode is active
+ _GLFWwindow* disabledCursorWindow;
+ RAWINPUT* rawInput;
+ int rawInputSize;
+ UINT mouseTrailSize;
+
+ struct {
+ HINSTANCE instance;
+ PFN_DirectInput8Create Create;
+ IDirectInput8W* api;
+ } dinput8;
+
+ struct {
+ HINSTANCE instance;
+ PFN_XInputGetCapabilities GetCapabilities;
+ PFN_XInputGetState GetState;
+ } xinput;
+
+ struct {
+ HINSTANCE instance;
+ PFN_SetProcessDPIAware SetProcessDPIAware_;
+ PFN_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx_;
+ PFN_EnableNonClientDpiScaling EnableNonClientDpiScaling_;
+ PFN_SetProcessDpiAwarenessContext SetProcessDpiAwarenessContext_;
+ PFN_GetDpiForWindow GetDpiForWindow_;
+ PFN_AdjustWindowRectExForDpi AdjustWindowRectExForDpi_;
+ } user32;
+
+ struct {
+ HINSTANCE instance;
+ PFN_DwmIsCompositionEnabled IsCompositionEnabled;
+ PFN_DwmFlush Flush;
+ PFN_DwmEnableBlurBehindWindow EnableBlurBehindWindow;
+ PFN_DwmGetColorizationColor GetColorizationColor;
+ } dwmapi;
+
+ struct {
+ HINSTANCE instance;
+ PFN_SetProcessDpiAwareness SetProcessDpiAwareness_;
+ PFN_GetDpiForMonitor GetDpiForMonitor_;
+ } shcore;
+
+ struct {
+ HINSTANCE instance;
+ PFN_RtlVerifyVersionInfo RtlVerifyVersionInfo_;
+ } ntdll;
+} _GLFWlibraryWin32;
+
+// Win32-specific per-monitor data
+//
+typedef struct _GLFWmonitorWin32
+{
+ HMONITOR handle;
+ // This size matches the static size of DISPLAY_DEVICE.DeviceName
+ WCHAR adapterName[32];
+ WCHAR displayName[32];
+ char publicAdapterName[32];
+ char publicDisplayName[32];
+ GLFWbool modesPruned;
+ GLFWbool modeChanged;
+} _GLFWmonitorWin32;
+
+// Win32-specific per-cursor data
+//
+typedef struct _GLFWcursorWin32
+{
+ HCURSOR handle;
+} _GLFWcursorWin32;
+
+// Win32-specific global timer data
+//
+typedef struct _GLFWtimerWin32
+{
+ uint64_t frequency;
+} _GLFWtimerWin32;
+
+// Win32-specific thread local storage data
+//
+typedef struct _GLFWtlsWin32
+{
+ GLFWbool allocated;
+ DWORD index;
+} _GLFWtlsWin32;
+
+// Win32-specific mutex data
+//
+typedef struct _GLFWmutexWin32
+{
+ GLFWbool allocated;
+ CRITICAL_SECTION section;
+} _GLFWmutexWin32;
+
+
+GLFWbool _glfwRegisterWindowClassWin32(void);
+void _glfwUnregisterWindowClassWin32(void);
+
+WCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source);
+char* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source);
+BOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp);
+BOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build);
+void _glfwInputErrorWin32(int error, const char* description);
+void _glfwUpdateKeyNamesWin32(void);
+
+void _glfwInitTimerWin32(void);
+
+void _glfwPollMonitorsWin32(void);
+void _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired);
+void _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor);
+void _glfwGetMonitorContentScaleWin32(HMONITOR handle, float* xscale, float* yscale);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_thread.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_thread.c
new file mode 100644
index 0000000..ce0686d
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_thread.c
@@ -0,0 +1,99 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <assert.h>
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls)
+{
+ assert(tls->win32.allocated == GLFW_FALSE);
+
+ tls->win32.index = TlsAlloc();
+ if (tls->win32.index == TLS_OUT_OF_INDEXES)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to allocate TLS index");
+ return GLFW_FALSE;
+ }
+
+ tls->win32.allocated = GLFW_TRUE;
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyTls(_GLFWtls* tls)
+{
+ if (tls->win32.allocated)
+ TlsFree(tls->win32.index);
+ memset(tls, 0, sizeof(_GLFWtls));
+}
+
+void* _glfwPlatformGetTls(_GLFWtls* tls)
+{
+ assert(tls->win32.allocated == GLFW_TRUE);
+ return TlsGetValue(tls->win32.index);
+}
+
+void _glfwPlatformSetTls(_GLFWtls* tls, void* value)
+{
+ assert(tls->win32.allocated == GLFW_TRUE);
+ TlsSetValue(tls->win32.index, value);
+}
+
+GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex)
+{
+ assert(mutex->win32.allocated == GLFW_FALSE);
+ InitializeCriticalSection(&mutex->win32.section);
+ return mutex->win32.allocated = GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyMutex(_GLFWmutex* mutex)
+{
+ if (mutex->win32.allocated)
+ DeleteCriticalSection(&mutex->win32.section);
+ memset(mutex, 0, sizeof(_GLFWmutex));
+}
+
+void _glfwPlatformLockMutex(_GLFWmutex* mutex)
+{
+ assert(mutex->win32.allocated == GLFW_TRUE);
+ EnterCriticalSection(&mutex->win32.section);
+}
+
+void _glfwPlatformUnlockMutex(_GLFWmutex* mutex)
+{
+ assert(mutex->win32.allocated == GLFW_TRUE);
+ LeaveCriticalSection(&mutex->win32.section);
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_time.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_time.c
new file mode 100644
index 0000000..b4e31ab
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_time.c
@@ -0,0 +1,60 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Initialise timer
+//
+void _glfwInitTimerWin32(void)
+{
+ QueryPerformanceFrequency((LARGE_INTEGER*) &_glfw.timer.win32.frequency);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+uint64_t _glfwPlatformGetTimerValue(void)
+{
+ uint64_t value;
+ QueryPerformanceCounter((LARGE_INTEGER*) &value);
+ return value;
+}
+
+uint64_t _glfwPlatformGetTimerFrequency(void)
+{
+ return _glfw.timer.win32.frequency;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_window.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_window.c
new file mode 100644
index 0000000..8f2bd18
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/win32_window.c
@@ -0,0 +1,2295 @@
+//========================================================================
+// GLFW 3.3 Win32 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <limits.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <string.h>
+#include <windowsx.h>
+#include <shellapi.h>
+
+// Returns the window style for the specified window
+//
+static DWORD getWindowStyle(const _GLFWwindow* window)
+{
+ DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
+
+ if (window->monitor)
+ style |= WS_POPUP;
+ else
+ {
+ style |= WS_SYSMENU | WS_MINIMIZEBOX;
+
+ if (window->decorated)
+ {
+ style |= WS_CAPTION;
+
+ if (window->resizable)
+ style |= WS_MAXIMIZEBOX | WS_THICKFRAME;
+ }
+ else
+ style |= WS_POPUP;
+ }
+
+ return style;
+}
+
+// Returns the extended window style for the specified window
+//
+static DWORD getWindowExStyle(const _GLFWwindow* window)
+{
+ DWORD style = WS_EX_APPWINDOW;
+
+ if (window->monitor || window->floating)
+ style |= WS_EX_TOPMOST;
+
+ return style;
+}
+
+// Returns the image whose area most closely matches the desired one
+//
+static const GLFWimage* chooseImage(int count, const GLFWimage* images,
+ int width, int height)
+{
+ int i, leastDiff = INT_MAX;
+ const GLFWimage* closest = NULL;
+
+ for (i = 0; i < count; i++)
+ {
+ const int currDiff = abs(images[i].width * images[i].height -
+ width * height);
+ if (currDiff < leastDiff)
+ {
+ closest = images + i;
+ leastDiff = currDiff;
+ }
+ }
+
+ return closest;
+}
+
+// Creates an RGBA icon or cursor
+//
+static HICON createIcon(const GLFWimage* image,
+ int xhot, int yhot, GLFWbool icon)
+{
+ int i;
+ HDC dc;
+ HICON handle;
+ HBITMAP color, mask;
+ BITMAPV5HEADER bi;
+ ICONINFO ii;
+ unsigned char* target = NULL;
+ unsigned char* source = image->pixels;
+
+ ZeroMemory(&bi, sizeof(bi));
+ bi.bV5Size = sizeof(bi);
+ bi.bV5Width = image->width;
+ bi.bV5Height = -image->height;
+ bi.bV5Planes = 1;
+ bi.bV5BitCount = 32;
+ bi.bV5Compression = BI_BITFIELDS;
+ bi.bV5RedMask = 0x00ff0000;
+ bi.bV5GreenMask = 0x0000ff00;
+ bi.bV5BlueMask = 0x000000ff;
+ bi.bV5AlphaMask = 0xff000000;
+
+ dc = GetDC(NULL);
+ color = CreateDIBSection(dc,
+ (BITMAPINFO*) &bi,
+ DIB_RGB_COLORS,
+ (void**) &target,
+ NULL,
+ (DWORD) 0);
+ ReleaseDC(NULL, dc);
+
+ if (!color)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create RGBA bitmap");
+ return NULL;
+ }
+
+ mask = CreateBitmap(image->width, image->height, 1, 1, NULL);
+ if (!mask)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create mask bitmap");
+ DeleteObject(color);
+ return NULL;
+ }
+
+ for (i = 0; i < image->width * image->height; i++)
+ {
+ target[0] = source[2];
+ target[1] = source[1];
+ target[2] = source[0];
+ target[3] = source[3];
+ target += 4;
+ source += 4;
+ }
+
+ ZeroMemory(&ii, sizeof(ii));
+ ii.fIcon = icon;
+ ii.xHotspot = xhot;
+ ii.yHotspot = yhot;
+ ii.hbmMask = mask;
+ ii.hbmColor = color;
+
+ handle = CreateIconIndirect(&ii);
+
+ DeleteObject(color);
+ DeleteObject(mask);
+
+ if (!handle)
+ {
+ if (icon)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create icon");
+ }
+ else
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create cursor");
+ }
+ }
+
+ return handle;
+}
+
+// Translate content area size to full window size according to styles and DPI
+//
+static void getFullWindowSize(DWORD style, DWORD exStyle,
+ int contentWidth, int contentHeight,
+ int* fullWidth, int* fullHeight,
+ UINT dpi)
+{
+ RECT rect = { 0, 0, contentWidth, contentHeight };
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ AdjustWindowRectExForDpi(&rect, style, FALSE, exStyle, dpi);
+ else
+ AdjustWindowRectEx(&rect, style, FALSE, exStyle);
+
+ *fullWidth = rect.right - rect.left;
+ *fullHeight = rect.bottom - rect.top;
+}
+
+// Enforce the content area aspect ratio based on which edge is being dragged
+//
+static void applyAspectRatio(_GLFWwindow* window, int edge, RECT* area)
+{
+ int xoff, yoff;
+ UINT dpi = USER_DEFAULT_SCREEN_DPI;
+ const float ratio = (float) window->numer / (float) window->denom;
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ dpi = GetDpiForWindow(window->win32.handle);
+
+ getFullWindowSize(getWindowStyle(window), getWindowExStyle(window),
+ 0, 0, &xoff, &yoff, dpi);
+
+ if (edge == WMSZ_LEFT || edge == WMSZ_BOTTOMLEFT ||
+ edge == WMSZ_RIGHT || edge == WMSZ_BOTTOMRIGHT)
+ {
+ area->bottom = area->top + yoff +
+ (int) ((area->right - area->left - xoff) / ratio);
+ }
+ else if (edge == WMSZ_TOPLEFT || edge == WMSZ_TOPRIGHT)
+ {
+ area->top = area->bottom - yoff -
+ (int) ((area->right - area->left - xoff) / ratio);
+ }
+ else if (edge == WMSZ_TOP || edge == WMSZ_BOTTOM)
+ {
+ area->right = area->left + xoff +
+ (int) ((area->bottom - area->top - yoff) * ratio);
+ }
+}
+
+// Updates the cursor image according to its cursor mode
+//
+static void updateCursorImage(_GLFWwindow* window)
+{
+ if (window->cursorMode == GLFW_CURSOR_NORMAL)
+ {
+ if (window->cursor)
+ SetCursor(window->cursor->win32.handle);
+ else
+ SetCursor(LoadCursorW(NULL, IDC_ARROW));
+ }
+ else
+ SetCursor(NULL);
+}
+
+// Updates the cursor clip rect
+//
+static void updateClipRect(_GLFWwindow* window)
+{
+ if (window)
+ {
+ RECT clipRect;
+ GetClientRect(window->win32.handle, &clipRect);
+ ClientToScreen(window->win32.handle, (POINT*) &clipRect.left);
+ ClientToScreen(window->win32.handle, (POINT*) &clipRect.right);
+ ClipCursor(&clipRect);
+ }
+ else
+ ClipCursor(NULL);
+}
+
+// Enables WM_INPUT messages for the mouse for the specified window
+//
+static void enableRawMouseMotion(_GLFWwindow* window)
+{
+ const RAWINPUTDEVICE rid = { 0x01, 0x02, 0, window->win32.handle };
+
+ if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to register raw input device");
+ }
+}
+
+// Disables WM_INPUT messages for the mouse
+//
+static void disableRawMouseMotion(_GLFWwindow* window)
+{
+ const RAWINPUTDEVICE rid = { 0x01, 0x02, RIDEV_REMOVE, NULL };
+
+ if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to remove raw input device");
+ }
+}
+
+// Apply disabled cursor mode to a focused window
+//
+static void disableCursor(_GLFWwindow* window)
+{
+ _glfw.win32.disabledCursorWindow = window;
+ _glfwPlatformGetCursorPos(window,
+ &_glfw.win32.restoreCursorPosX,
+ &_glfw.win32.restoreCursorPosY);
+ updateCursorImage(window);
+ _glfwCenterCursorInContentArea(window);
+ updateClipRect(window);
+
+ if (window->rawMouseMotion)
+ enableRawMouseMotion(window);
+}
+
+// Exit disabled cursor mode for the specified window
+//
+static void enableCursor(_GLFWwindow* window)
+{
+ if (window->rawMouseMotion)
+ disableRawMouseMotion(window);
+
+ _glfw.win32.disabledCursorWindow = NULL;
+ updateClipRect(NULL);
+ _glfwPlatformSetCursorPos(window,
+ _glfw.win32.restoreCursorPosX,
+ _glfw.win32.restoreCursorPosY);
+ updateCursorImage(window);
+}
+
+// Returns whether the cursor is in the content area of the specified window
+//
+static GLFWbool cursorInContentArea(_GLFWwindow* window)
+{
+ RECT area;
+ POINT pos;
+
+ if (!GetCursorPos(&pos))
+ return GLFW_FALSE;
+
+ if (WindowFromPoint(pos) != window->win32.handle)
+ return GLFW_FALSE;
+
+ GetClientRect(window->win32.handle, &area);
+ ClientToScreen(window->win32.handle, (POINT*) &area.left);
+ ClientToScreen(window->win32.handle, (POINT*) &area.right);
+
+ return PtInRect(&area, pos);
+}
+
+// Update native window styles to match attributes
+//
+static void updateWindowStyles(const _GLFWwindow* window)
+{
+ RECT rect;
+ DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);
+ style &= ~(WS_OVERLAPPEDWINDOW | WS_POPUP);
+ style |= getWindowStyle(window);
+
+ GetClientRect(window->win32.handle, &rect);
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, style, FALSE,
+ getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ AdjustWindowRectEx(&rect, style, FALSE, getWindowExStyle(window));
+
+ ClientToScreen(window->win32.handle, (POINT*) &rect.left);
+ ClientToScreen(window->win32.handle, (POINT*) &rect.right);
+ SetWindowLongW(window->win32.handle, GWL_STYLE, style);
+ SetWindowPos(window->win32.handle, HWND_TOP,
+ rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top,
+ SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER);
+}
+
+// Update window framebuffer transparency
+//
+static void updateFramebufferTransparency(const _GLFWwindow* window)
+{
+ BOOL composition, opaque;
+ DWORD color;
+
+ if (!IsWindowsVistaOrGreater())
+ return;
+
+ if (FAILED(DwmIsCompositionEnabled(&composition)) || !composition)
+ return;
+
+ if (IsWindows8OrGreater() ||
+ (SUCCEEDED(DwmGetColorizationColor(&color, &opaque)) && !opaque))
+ {
+ HRGN region = CreateRectRgn(0, 0, -1, -1);
+ DWM_BLURBEHIND bb = {0};
+ bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
+ bb.hRgnBlur = region;
+ bb.fEnable = TRUE;
+
+ DwmEnableBlurBehindWindow(window->win32.handle, &bb);
+ DeleteObject(region);
+ }
+ else
+ {
+ // HACK: Disable framebuffer transparency on Windows 7 when the
+ // colorization color is opaque, because otherwise the window
+ // contents is blended additively with the previous frame instead
+ // of replacing it
+ DWM_BLURBEHIND bb = {0};
+ bb.dwFlags = DWM_BB_ENABLE;
+ DwmEnableBlurBehindWindow(window->win32.handle, &bb);
+ }
+}
+
+// Retrieves and translates modifier keys
+//
+static int getKeyMods(void)
+{
+ int mods = 0;
+
+ if (GetKeyState(VK_SHIFT) & 0x8000)
+ mods |= GLFW_MOD_SHIFT;
+ if (GetKeyState(VK_CONTROL) & 0x8000)
+ mods |= GLFW_MOD_CONTROL;
+ if (GetKeyState(VK_MENU) & 0x8000)
+ mods |= GLFW_MOD_ALT;
+ if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & 0x8000)
+ mods |= GLFW_MOD_SUPER;
+ if (GetKeyState(VK_CAPITAL) & 1)
+ mods |= GLFW_MOD_CAPS_LOCK;
+ if (GetKeyState(VK_NUMLOCK) & 1)
+ mods |= GLFW_MOD_NUM_LOCK;
+
+ return mods;
+}
+
+static void fitToMonitor(_GLFWwindow* window)
+{
+ MONITORINFO mi = { sizeof(mi) };
+ GetMonitorInfo(window->monitor->win32.handle, &mi);
+ SetWindowPos(window->win32.handle, HWND_TOPMOST,
+ mi.rcMonitor.left,
+ mi.rcMonitor.top,
+ mi.rcMonitor.right - mi.rcMonitor.left,
+ mi.rcMonitor.bottom - mi.rcMonitor.top,
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);
+}
+
+// Make the specified window and its video mode active on its monitor
+//
+static void acquireMonitor(_GLFWwindow* window)
+{
+ if (!_glfw.win32.acquiredMonitorCount)
+ {
+ SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
+
+ // HACK: When mouse trails are enabled the cursor becomes invisible when
+ // the OpenGL ICD switches to page flipping
+ if (IsWindowsXPOrGreater())
+ {
+ SystemParametersInfo(SPI_GETMOUSETRAILS, 0, &_glfw.win32.mouseTrailSize, 0);
+ SystemParametersInfo(SPI_SETMOUSETRAILS, 0, 0, 0);
+ }
+ }
+
+ if (!window->monitor->window)
+ _glfw.win32.acquiredMonitorCount++;
+
+ _glfwSetVideoModeWin32(window->monitor, &window->videoMode);
+ _glfwInputMonitorWindow(window->monitor, window);
+}
+
+// Remove the window and restore the original video mode
+//
+static void releaseMonitor(_GLFWwindow* window)
+{
+ if (window->monitor->window != window)
+ return;
+
+ _glfw.win32.acquiredMonitorCount--;
+ if (!_glfw.win32.acquiredMonitorCount)
+ {
+ SetThreadExecutionState(ES_CONTINUOUS);
+
+ // HACK: Restore mouse trail length saved in acquireMonitor
+ if (IsWindowsXPOrGreater())
+ SystemParametersInfo(SPI_SETMOUSETRAILS, _glfw.win32.mouseTrailSize, 0, 0);
+ }
+
+ _glfwInputMonitorWindow(window->monitor, NULL);
+ _glfwRestoreVideoModeWin32(window->monitor);
+}
+
+// Window callback function (handles window messages)
+//
+static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
+ WPARAM wParam, LPARAM lParam)
+{
+ _GLFWwindow* window = GetPropW(hWnd, L"GLFW");
+ if (!window)
+ {
+ // This is the message handling for the hidden helper window
+ // and for a regular window during its initial creation
+
+ switch (uMsg)
+ {
+ case WM_NCCREATE:
+ {
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ const CREATESTRUCTW* cs = (const CREATESTRUCTW*) lParam;
+ const _GLFWwndconfig* wndconfig = cs->lpCreateParams;
+
+ // On per-monitor DPI aware V1 systems, only enable
+ // non-client scaling for windows that scale the client area
+ // We need WM_GETDPISCALEDSIZE from V2 to keep the client
+ // area static when the non-client area is scaled
+ if (wndconfig && wndconfig->scaleToMonitor)
+ EnableNonClientDpiScaling(hWnd);
+ }
+
+ break;
+ }
+
+ case WM_DISPLAYCHANGE:
+ _glfwPollMonitorsWin32();
+ break;
+
+ case WM_DEVICECHANGE:
+ {
+ if (wParam == DBT_DEVICEARRIVAL)
+ {
+ DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;
+ if (dbh && dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
+ _glfwDetectJoystickConnectionWin32();
+ }
+ else if (wParam == DBT_DEVICEREMOVECOMPLETE)
+ {
+ DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;
+ if (dbh && dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
+ _glfwDetectJoystickDisconnectionWin32();
+ }
+
+ break;
+ }
+ }
+
+ return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+ }
+
+ switch (uMsg)
+ {
+ case WM_MOUSEACTIVATE:
+ {
+ // HACK: Postpone cursor disabling when the window was activated by
+ // clicking a caption button
+ if (HIWORD(lParam) == WM_LBUTTONDOWN)
+ {
+ if (LOWORD(lParam) != HTCLIENT)
+ window->win32.frameAction = GLFW_TRUE;
+ }
+
+ break;
+ }
+
+ case WM_CAPTURECHANGED:
+ {
+ // HACK: Disable the cursor once the caption button action has been
+ // completed or cancelled
+ if (lParam == 0 && window->win32.frameAction)
+ {
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ disableCursor(window);
+
+ window->win32.frameAction = GLFW_FALSE;
+ }
+
+ break;
+ }
+
+ case WM_SETFOCUS:
+ {
+ _glfwInputWindowFocus(window, GLFW_TRUE);
+
+ // HACK: Do not disable cursor while the user is interacting with
+ // a caption button
+ if (window->win32.frameAction)
+ break;
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ disableCursor(window);
+
+ return 0;
+ }
+
+ case WM_KILLFOCUS:
+ {
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ enableCursor(window);
+
+ if (window->monitor && window->autoIconify)
+ _glfwPlatformIconifyWindow(window);
+
+ _glfwInputWindowFocus(window, GLFW_FALSE);
+ return 0;
+ }
+
+ case WM_SYSCOMMAND:
+ {
+ switch (wParam & 0xfff0)
+ {
+ case SC_SCREENSAVE:
+ case SC_MONITORPOWER:
+ {
+ if (window->monitor)
+ {
+ // We are running in full screen mode, so disallow
+ // screen saver and screen blanking
+ return 0;
+ }
+ else
+ break;
+ }
+
+ // User trying to access application menu using ALT?
+ case SC_KEYMENU:
+ return 0;
+ }
+ break;
+ }
+
+ case WM_CLOSE:
+ {
+ _glfwInputWindowCloseRequest(window);
+ return 0;
+ }
+
+ case WM_INPUTLANGCHANGE:
+ {
+ _glfwUpdateKeyNamesWin32();
+ break;
+ }
+
+ case WM_CHAR:
+ case WM_SYSCHAR:
+ {
+ if (wParam >= 0xd800 && wParam <= 0xdbff)
+ window->win32.highSurrogate = (WCHAR) wParam;
+ else
+ {
+ unsigned int codepoint = 0;
+
+ if (wParam >= 0xdc00 && wParam <= 0xdfff)
+ {
+ if (window->win32.highSurrogate)
+ {
+ codepoint += (window->win32.highSurrogate - 0xd800) << 10;
+ codepoint += (WCHAR) wParam - 0xdc00;
+ codepoint += 0x10000;
+ }
+ }
+ else
+ codepoint = (WCHAR) wParam;
+
+ window->win32.highSurrogate = 0;
+ _glfwInputChar(window, codepoint, getKeyMods(), uMsg != WM_SYSCHAR);
+ }
+
+ return 0;
+ }
+
+ case WM_UNICHAR:
+ {
+ if (wParam == UNICODE_NOCHAR)
+ {
+ // WM_UNICHAR is not sent by Windows, but is sent by some
+ // third-party input method engine
+ // Returning TRUE here announces support for this message
+ return TRUE;
+ }
+
+ _glfwInputChar(window, (unsigned int) wParam, getKeyMods(), GLFW_TRUE);
+ return 0;
+ }
+
+ case WM_KEYDOWN:
+ case WM_SYSKEYDOWN:
+ case WM_KEYUP:
+ case WM_SYSKEYUP:
+ {
+ int key, scancode;
+ const int action = (HIWORD(lParam) & KF_UP) ? GLFW_RELEASE : GLFW_PRESS;
+ const int mods = getKeyMods();
+
+ scancode = (HIWORD(lParam) & (KF_EXTENDED | 0xff));
+ if (!scancode)
+ {
+ // NOTE: Some synthetic key messages have a scancode of zero
+ // HACK: Map the virtual key back to a usable scancode
+ scancode = MapVirtualKeyW((UINT) wParam, MAPVK_VK_TO_VSC);
+ }
+
+ key = _glfw.win32.keycodes[scancode];
+
+ // The Ctrl keys require special handling
+ if (wParam == VK_CONTROL)
+ {
+ if (HIWORD(lParam) & KF_EXTENDED)
+ {
+ // Right side keys have the extended key bit set
+ key = GLFW_KEY_RIGHT_CONTROL;
+ }
+ else
+ {
+ // NOTE: Alt Gr sends Left Ctrl followed by Right Alt
+ // HACK: We only want one event for Alt Gr, so if we detect
+ // this sequence we discard this Left Ctrl message now
+ // and later report Right Alt normally
+ MSG next;
+ const DWORD time = GetMessageTime();
+
+ if (PeekMessageW(&next, NULL, 0, 0, PM_NOREMOVE))
+ {
+ if (next.message == WM_KEYDOWN ||
+ next.message == WM_SYSKEYDOWN ||
+ next.message == WM_KEYUP ||
+ next.message == WM_SYSKEYUP)
+ {
+ if (next.wParam == VK_MENU &&
+ (HIWORD(next.lParam) & KF_EXTENDED) &&
+ next.time == time)
+ {
+ // Next message is Right Alt down so discard this
+ break;
+ }
+ }
+ }
+
+ // This is a regular Left Ctrl message
+ key = GLFW_KEY_LEFT_CONTROL;
+ }
+ }
+ else if (wParam == VK_PROCESSKEY)
+ {
+ // IME notifies that keys have been filtered by setting the
+ // virtual key-code to VK_PROCESSKEY
+ break;
+ }
+
+ if (action == GLFW_RELEASE && wParam == VK_SHIFT)
+ {
+ // HACK: Release both Shift keys on Shift up event, as when both
+ // are pressed the first release does not emit any event
+ // NOTE: The other half of this is in _glfwPlatformPollEvents
+ _glfwInputKey(window, GLFW_KEY_LEFT_SHIFT, scancode, action, mods);
+ _glfwInputKey(window, GLFW_KEY_RIGHT_SHIFT, scancode, action, mods);
+ }
+ else if (wParam == VK_SNAPSHOT)
+ {
+ // HACK: Key down is not reported for the Print Screen key
+ _glfwInputKey(window, key, scancode, GLFW_PRESS, mods);
+ _glfwInputKey(window, key, scancode, GLFW_RELEASE, mods);
+ }
+ else
+ _glfwInputKey(window, key, scancode, action, mods);
+
+ break;
+ }
+
+ case WM_LBUTTONDOWN:
+ case WM_RBUTTONDOWN:
+ case WM_MBUTTONDOWN:
+ case WM_XBUTTONDOWN:
+ case WM_LBUTTONUP:
+ case WM_RBUTTONUP:
+ case WM_MBUTTONUP:
+ case WM_XBUTTONUP:
+ {
+ int i, button, action;
+
+ if (uMsg == WM_LBUTTONDOWN || uMsg == WM_LBUTTONUP)
+ button = GLFW_MOUSE_BUTTON_LEFT;
+ else if (uMsg == WM_RBUTTONDOWN || uMsg == WM_RBUTTONUP)
+ button = GLFW_MOUSE_BUTTON_RIGHT;
+ else if (uMsg == WM_MBUTTONDOWN || uMsg == WM_MBUTTONUP)
+ button = GLFW_MOUSE_BUTTON_MIDDLE;
+ else if (GET_XBUTTON_WPARAM(wParam) == XBUTTON1)
+ button = GLFW_MOUSE_BUTTON_4;
+ else
+ button = GLFW_MOUSE_BUTTON_5;
+
+ if (uMsg == WM_LBUTTONDOWN || uMsg == WM_RBUTTONDOWN ||
+ uMsg == WM_MBUTTONDOWN || uMsg == WM_XBUTTONDOWN)
+ {
+ action = GLFW_PRESS;
+ }
+ else
+ action = GLFW_RELEASE;
+
+ for (i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++)
+ {
+ if (window->mouseButtons[i] == GLFW_PRESS)
+ break;
+ }
+
+ if (i > GLFW_MOUSE_BUTTON_LAST)
+ SetCapture(hWnd);
+
+ _glfwInputMouseClick(window, button, action, getKeyMods());
+
+ for (i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++)
+ {
+ if (window->mouseButtons[i] == GLFW_PRESS)
+ break;
+ }
+
+ if (i > GLFW_MOUSE_BUTTON_LAST)
+ ReleaseCapture();
+
+ if (uMsg == WM_XBUTTONDOWN || uMsg == WM_XBUTTONUP)
+ return TRUE;
+
+ return 0;
+ }
+
+ case WM_MOUSEMOVE:
+ {
+ const int x = GET_X_LPARAM(lParam);
+ const int y = GET_Y_LPARAM(lParam);
+
+ if (!window->win32.cursorTracked)
+ {
+ TRACKMOUSEEVENT tme;
+ ZeroMemory(&tme, sizeof(tme));
+ tme.cbSize = sizeof(tme);
+ tme.dwFlags = TME_LEAVE;
+ tme.hwndTrack = window->win32.handle;
+ TrackMouseEvent(&tme);
+
+ window->win32.cursorTracked = GLFW_TRUE;
+ _glfwInputCursorEnter(window, GLFW_TRUE);
+ }
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ const int dx = x - window->win32.lastCursorPosX;
+ const int dy = y - window->win32.lastCursorPosY;
+
+ if (_glfw.win32.disabledCursorWindow != window)
+ break;
+ if (window->rawMouseMotion)
+ break;
+
+ _glfwInputCursorPos(window,
+ window->virtualCursorPosX + dx,
+ window->virtualCursorPosY + dy);
+ }
+ else
+ _glfwInputCursorPos(window, x, y);
+
+ window->win32.lastCursorPosX = x;
+ window->win32.lastCursorPosY = y;
+
+ return 0;
+ }
+
+ case WM_INPUT:
+ {
+ UINT size = 0;
+ HRAWINPUT ri = (HRAWINPUT) lParam;
+ RAWINPUT* data = NULL;
+ int dx, dy;
+
+ if (_glfw.win32.disabledCursorWindow != window)
+ break;
+ if (!window->rawMouseMotion)
+ break;
+
+ GetRawInputData(ri, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER));
+ if (size > (UINT) _glfw.win32.rawInputSize)
+ {
+ free(_glfw.win32.rawInput);
+ _glfw.win32.rawInput = calloc(size, 1);
+ _glfw.win32.rawInputSize = size;
+ }
+
+ size = _glfw.win32.rawInputSize;
+ if (GetRawInputData(ri, RID_INPUT,
+ _glfw.win32.rawInput, &size,
+ sizeof(RAWINPUTHEADER)) == (UINT) -1)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to retrieve raw input data");
+ break;
+ }
+
+ data = _glfw.win32.rawInput;
+ if (data->data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE)
+ {
+ dx = data->data.mouse.lLastX - window->win32.lastCursorPosX;
+ dy = data->data.mouse.lLastY - window->win32.lastCursorPosY;
+ }
+ else
+ {
+ dx = data->data.mouse.lLastX;
+ dy = data->data.mouse.lLastY;
+ }
+
+ _glfwInputCursorPos(window,
+ window->virtualCursorPosX + dx,
+ window->virtualCursorPosY + dy);
+
+ window->win32.lastCursorPosX += dx;
+ window->win32.lastCursorPosY += dy;
+ break;
+ }
+
+ case WM_MOUSELEAVE:
+ {
+ window->win32.cursorTracked = GLFW_FALSE;
+ _glfwInputCursorEnter(window, GLFW_FALSE);
+ return 0;
+ }
+
+ case WM_MOUSEWHEEL:
+ {
+ _glfwInputScroll(window, 0.0, (SHORT) HIWORD(wParam) / (double) WHEEL_DELTA);
+ return 0;
+ }
+
+ case WM_MOUSEHWHEEL:
+ {
+ // This message is only sent on Windows Vista and later
+ // NOTE: The X-axis is inverted for consistency with macOS and X11
+ _glfwInputScroll(window, -((SHORT) HIWORD(wParam) / (double) WHEEL_DELTA), 0.0);
+ return 0;
+ }
+
+ case WM_ENTERSIZEMOVE:
+ case WM_ENTERMENULOOP:
+ {
+ if (window->win32.frameAction)
+ break;
+
+ // HACK: Enable the cursor while the user is moving or
+ // resizing the window or using the window menu
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ enableCursor(window);
+
+ break;
+ }
+
+ case WM_EXITSIZEMOVE:
+ case WM_EXITMENULOOP:
+ {
+ if (window->win32.frameAction)
+ break;
+
+ // HACK: Disable the cursor once the user is done moving or
+ // resizing the window or using the menu
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ disableCursor(window);
+
+ break;
+ }
+
+ case WM_SIZE:
+ {
+ const int width = LOWORD(lParam);
+ const int height = HIWORD(lParam);
+ const GLFWbool iconified = wParam == SIZE_MINIMIZED;
+ const GLFWbool maximized = wParam == SIZE_MAXIMIZED ||
+ (window->win32.maximized &&
+ wParam != SIZE_RESTORED);
+
+ if (_glfw.win32.disabledCursorWindow == window)
+ updateClipRect(window);
+
+ if (window->win32.iconified != iconified)
+ _glfwInputWindowIconify(window, iconified);
+
+ if (window->win32.maximized != maximized)
+ _glfwInputWindowMaximize(window, maximized);
+
+ if (width != window->win32.width || height != window->win32.height)
+ {
+ window->win32.width = width;
+ window->win32.height = height;
+
+ _glfwInputFramebufferSize(window, width, height);
+ _glfwInputWindowSize(window, width, height);
+ }
+
+ if (window->monitor && window->win32.iconified != iconified)
+ {
+ if (iconified)
+ releaseMonitor(window);
+ else
+ {
+ acquireMonitor(window);
+ fitToMonitor(window);
+ }
+ }
+
+ window->win32.iconified = iconified;
+ window->win32.maximized = maximized;
+ return 0;
+ }
+
+ case WM_MOVE:
+ {
+ if (_glfw.win32.disabledCursorWindow == window)
+ updateClipRect(window);
+
+ // NOTE: This cannot use LOWORD/HIWORD recommended by MSDN, as
+ // those macros do not handle negative window positions correctly
+ _glfwInputWindowPos(window,
+ GET_X_LPARAM(lParam),
+ GET_Y_LPARAM(lParam));
+ return 0;
+ }
+
+ case WM_SIZING:
+ {
+ if (window->numer == GLFW_DONT_CARE ||
+ window->denom == GLFW_DONT_CARE)
+ {
+ break;
+ }
+
+ applyAspectRatio(window, (int) wParam, (RECT*) lParam);
+ return TRUE;
+ }
+
+ case WM_GETMINMAXINFO:
+ {
+ int xoff, yoff;
+ UINT dpi = USER_DEFAULT_SCREEN_DPI;
+ MINMAXINFO* mmi = (MINMAXINFO*) lParam;
+
+ if (window->monitor)
+ break;
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ dpi = GetDpiForWindow(window->win32.handle);
+
+ getFullWindowSize(getWindowStyle(window), getWindowExStyle(window),
+ 0, 0, &xoff, &yoff, dpi);
+
+ if (window->minwidth != GLFW_DONT_CARE &&
+ window->minheight != GLFW_DONT_CARE)
+ {
+ mmi->ptMinTrackSize.x = window->minwidth + xoff;
+ mmi->ptMinTrackSize.y = window->minheight + yoff;
+ }
+
+ if (window->maxwidth != GLFW_DONT_CARE &&
+ window->maxheight != GLFW_DONT_CARE)
+ {
+ mmi->ptMaxTrackSize.x = window->maxwidth + xoff;
+ mmi->ptMaxTrackSize.y = window->maxheight + yoff;
+ }
+
+ if (!window->decorated)
+ {
+ MONITORINFO mi;
+ const HMONITOR mh = MonitorFromWindow(window->win32.handle,
+ MONITOR_DEFAULTTONEAREST);
+
+ ZeroMemory(&mi, sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ GetMonitorInfo(mh, &mi);
+
+ mmi->ptMaxPosition.x = mi.rcWork.left - mi.rcMonitor.left;
+ mmi->ptMaxPosition.y = mi.rcWork.top - mi.rcMonitor.top;
+ mmi->ptMaxSize.x = mi.rcWork.right - mi.rcWork.left;
+ mmi->ptMaxSize.y = mi.rcWork.bottom - mi.rcWork.top;
+ }
+
+ return 0;
+ }
+
+ case WM_PAINT:
+ {
+ _glfwInputWindowDamage(window);
+ break;
+ }
+
+ case WM_ERASEBKGND:
+ {
+ return TRUE;
+ }
+
+ case WM_NCACTIVATE:
+ case WM_NCPAINT:
+ {
+ // Prevent title bar from being drawn after restoring a minimized
+ // undecorated window
+ if (!window->decorated)
+ return TRUE;
+
+ break;
+ }
+
+ case WM_DWMCOMPOSITIONCHANGED:
+ case WM_DWMCOLORIZATIONCOLORCHANGED:
+ {
+ if (window->win32.transparent)
+ updateFramebufferTransparency(window);
+ return 0;
+ }
+
+ case WM_GETDPISCALEDSIZE:
+ {
+ if (window->win32.scaleToMonitor)
+ break;
+
+ // Adjust the window size to keep the content area size constant
+ if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())
+ {
+ RECT source = {0}, target = {0};
+ SIZE* size = (SIZE*) lParam;
+
+ AdjustWindowRectExForDpi(&source, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ AdjustWindowRectExForDpi(&target, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ LOWORD(wParam));
+
+ size->cx += (target.right - target.left) -
+ (source.right - source.left);
+ size->cy += (target.bottom - target.top) -
+ (source.bottom - source.top);
+ return TRUE;
+ }
+
+ break;
+ }
+
+ case WM_DPICHANGED:
+ {
+ const float xscale = HIWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
+ const float yscale = LOWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
+
+ // Resize windowed mode windows that either permit rescaling or that
+ // need it to compensate for non-client area scaling
+ if (!window->monitor &&
+ (window->win32.scaleToMonitor ||
+ _glfwIsWindows10CreatorsUpdateOrGreaterWin32()))
+ {
+ RECT* suggested = (RECT*) lParam;
+ SetWindowPos(window->win32.handle, HWND_TOP,
+ suggested->left,
+ suggested->top,
+ suggested->right - suggested->left,
+ suggested->bottom - suggested->top,
+ SWP_NOACTIVATE | SWP_NOZORDER);
+ }
+
+ _glfwInputWindowContentScale(window, xscale, yscale);
+ break;
+ }
+
+ case WM_SETCURSOR:
+ {
+ if (LOWORD(lParam) == HTCLIENT)
+ {
+ updateCursorImage(window);
+ return TRUE;
+ }
+
+ break;
+ }
+
+ case WM_DROPFILES:
+ {
+ HDROP drop = (HDROP) wParam;
+ POINT pt;
+ int i;
+
+ const int count = DragQueryFileW(drop, 0xffffffff, NULL, 0);
+ char** paths = calloc(count, sizeof(char*));
+
+ // Move the mouse to the position of the drop
+ DragQueryPoint(drop, &pt);
+ _glfwInputCursorPos(window, pt.x, pt.y);
+
+ for (i = 0; i < count; i++)
+ {
+ const UINT length = DragQueryFileW(drop, i, NULL, 0);
+ WCHAR* buffer = calloc((size_t) length + 1, sizeof(WCHAR));
+
+ DragQueryFileW(drop, i, buffer, length + 1);
+ paths[i] = _glfwCreateUTF8FromWideStringWin32(buffer);
+
+ free(buffer);
+ }
+
+ _glfwInputDrop(window, count, (const char**) paths);
+
+ for (i = 0; i < count; i++)
+ free(paths[i]);
+ free(paths);
+
+ DragFinish(drop);
+ return 0;
+ }
+ }
+
+ return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+}
+
+// Creates the GLFW window
+//
+static int createNativeWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ int xpos, ypos, fullWidth, fullHeight;
+ WCHAR* wideTitle;
+ DWORD style = getWindowStyle(window);
+ DWORD exStyle = getWindowExStyle(window);
+
+ if (window->monitor)
+ {
+ GLFWvidmode mode;
+
+ // NOTE: This window placement is temporary and approximate, as the
+ // correct position and size cannot be known until the monitor
+ // video mode has been picked in _glfwSetVideoModeWin32
+ _glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
+ _glfwPlatformGetVideoMode(window->monitor, &mode);
+ fullWidth = mode.width;
+ fullHeight = mode.height;
+ }
+ else
+ {
+ xpos = CW_USEDEFAULT;
+ ypos = CW_USEDEFAULT;
+
+ window->win32.maximized = wndconfig->maximized;
+ if (wndconfig->maximized)
+ style |= WS_MAXIMIZE;
+
+ getFullWindowSize(style, exStyle,
+ wndconfig->width, wndconfig->height,
+ &fullWidth, &fullHeight,
+ USER_DEFAULT_SCREEN_DPI);
+ }
+
+ wideTitle = _glfwCreateWideStringFromUTF8Win32(wndconfig->title);
+ if (!wideTitle)
+ return GLFW_FALSE;
+
+ window->win32.handle = CreateWindowExW(exStyle,
+ _GLFW_WNDCLASSNAME,
+ wideTitle,
+ style,
+ xpos, ypos,
+ fullWidth, fullHeight,
+ NULL, // No parent window
+ NULL, // No window menu
+ GetModuleHandleW(NULL),
+ (LPVOID) wndconfig);
+
+ free(wideTitle);
+
+ if (!window->win32.handle)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create window");
+ return GLFW_FALSE;
+ }
+
+ SetPropW(window->win32.handle, L"GLFW", window);
+
+ if (IsWindows7OrGreater())
+ {
+ ChangeWindowMessageFilterEx(window->win32.handle,
+ WM_DROPFILES, MSGFLT_ALLOW, NULL);
+ ChangeWindowMessageFilterEx(window->win32.handle,
+ WM_COPYDATA, MSGFLT_ALLOW, NULL);
+ ChangeWindowMessageFilterEx(window->win32.handle,
+ WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL);
+ }
+
+ window->win32.scaleToMonitor = wndconfig->scaleToMonitor;
+
+ // Adjust window rect to account for DPI scaling of the window frame and
+ // (if enabled) DPI scaling of the content area
+ // This cannot be done until we know what monitor the window was placed on
+ if (!window->monitor)
+ {
+ RECT rect = { 0, 0, wndconfig->width, wndconfig->height };
+ WINDOWPLACEMENT wp = { sizeof(wp) };
+
+ if (wndconfig->scaleToMonitor)
+ {
+ float xscale, yscale;
+ _glfwPlatformGetWindowContentScale(window, &xscale, &yscale);
+
+ if (xscale > 0.f && yscale > 0.f)
+ {
+ rect.right = (int) (rect.right * xscale);
+ rect.bottom = (int) (rect.bottom * yscale);
+ }
+ }
+
+ ClientToScreen(window->win32.handle, (POINT*) &rect.left);
+ ClientToScreen(window->win32.handle, (POINT*) &rect.right);
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, style, FALSE, exStyle,
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ AdjustWindowRectEx(&rect, style, FALSE, exStyle);
+
+ // Only update the restored window rect as the window may be maximized
+ GetWindowPlacement(window->win32.handle, &wp);
+ wp.rcNormalPosition = rect;
+ wp.showCmd = SW_HIDE;
+ SetWindowPlacement(window->win32.handle, &wp);
+ }
+
+ DragAcceptFiles(window->win32.handle, TRUE);
+
+ if (fbconfig->transparent)
+ {
+ updateFramebufferTransparency(window);
+ window->win32.transparent = GLFW_TRUE;
+ }
+
+ _glfwPlatformGetWindowSize(window, &window->win32.width, &window->win32.height);
+
+ return GLFW_TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Registers the GLFW window class
+//
+GLFWbool _glfwRegisterWindowClassWin32(void)
+{
+ WNDCLASSEXW wc;
+
+ ZeroMemory(&wc, sizeof(wc));
+ wc.cbSize = sizeof(wc);
+ wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
+ wc.lpfnWndProc = (WNDPROC) windowProc;
+ wc.hInstance = GetModuleHandleW(NULL);
+ wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
+ wc.lpszClassName = _GLFW_WNDCLASSNAME;
+
+ // Load user-provided icon if available
+ wc.hIcon = LoadImageW(GetModuleHandleW(NULL),
+ L"GLFW_ICON", IMAGE_ICON,
+ 0, 0, LR_DEFAULTSIZE | LR_SHARED);
+ if (!wc.hIcon)
+ {
+ // No user-provided icon found, load default icon
+ wc.hIcon = LoadImageW(NULL,
+ IDI_APPLICATION, IMAGE_ICON,
+ 0, 0, LR_DEFAULTSIZE | LR_SHARED);
+ }
+
+ if (!RegisterClassExW(&wc))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to register window class");
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+// Unregisters the GLFW window class
+//
+void _glfwUnregisterWindowClassWin32(void)
+{
+ UnregisterClassW(_GLFW_WNDCLASSNAME, GetModuleHandleW(NULL));
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformCreateWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ if (!createNativeWindow(window, wndconfig, fbconfig))
+ return GLFW_FALSE;
+
+ if (ctxconfig->client != GLFW_NO_API)
+ {
+ if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
+ {
+ if (!_glfwInitWGL())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextWGL(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)
+ {
+ if (!_glfwInitEGL())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
+ {
+ if (!_glfwInitOSMesa())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ }
+
+ if (window->monitor)
+ {
+ _glfwPlatformShowWindow(window);
+ _glfwPlatformFocusWindow(window);
+ acquireMonitor(window);
+ fitToMonitor(window);
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyWindow(_GLFWwindow* window)
+{
+ if (window->monitor)
+ releaseMonitor(window);
+
+ if (window->context.destroy)
+ window->context.destroy(window);
+
+ if (_glfw.win32.disabledCursorWindow == window)
+ _glfw.win32.disabledCursorWindow = NULL;
+
+ if (window->win32.handle)
+ {
+ RemovePropW(window->win32.handle, L"GLFW");
+ DestroyWindow(window->win32.handle);
+ window->win32.handle = NULL;
+ }
+
+ if (window->win32.bigIcon)
+ DestroyIcon(window->win32.bigIcon);
+
+ if (window->win32.smallIcon)
+ DestroyIcon(window->win32.smallIcon);
+}
+
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
+{
+ WCHAR* wideTitle = _glfwCreateWideStringFromUTF8Win32(title);
+ if (!wideTitle)
+ return;
+
+ SetWindowTextW(window->win32.handle, wideTitle);
+ free(wideTitle);
+}
+
+void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
+ int count, const GLFWimage* images)
+{
+ HICON bigIcon = NULL, smallIcon = NULL;
+
+ if (count)
+ {
+ const GLFWimage* bigImage = chooseImage(count, images,
+ GetSystemMetrics(SM_CXICON),
+ GetSystemMetrics(SM_CYICON));
+ const GLFWimage* smallImage = chooseImage(count, images,
+ GetSystemMetrics(SM_CXSMICON),
+ GetSystemMetrics(SM_CYSMICON));
+
+ bigIcon = createIcon(bigImage, 0, 0, GLFW_TRUE);
+ smallIcon = createIcon(smallImage, 0, 0, GLFW_TRUE);
+ }
+ else
+ {
+ bigIcon = (HICON) GetClassLongPtrW(window->win32.handle, GCLP_HICON);
+ smallIcon = (HICON) GetClassLongPtrW(window->win32.handle, GCLP_HICONSM);
+ }
+
+ SendMessage(window->win32.handle, WM_SETICON, ICON_BIG, (LPARAM) bigIcon);
+ SendMessage(window->win32.handle, WM_SETICON, ICON_SMALL, (LPARAM) smallIcon);
+
+ if (window->win32.bigIcon)
+ DestroyIcon(window->win32.bigIcon);
+
+ if (window->win32.smallIcon)
+ DestroyIcon(window->win32.smallIcon);
+
+ if (count)
+ {
+ window->win32.bigIcon = bigIcon;
+ window->win32.smallIcon = smallIcon;
+ }
+}
+
+void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
+{
+ POINT pos = { 0, 0 };
+ ClientToScreen(window->win32.handle, &pos);
+
+ if (xpos)
+ *xpos = pos.x;
+ if (ypos)
+ *ypos = pos.y;
+}
+
+void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
+{
+ RECT rect = { xpos, ypos, xpos, ypos };
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ {
+ AdjustWindowRectEx(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window));
+ }
+
+ SetWindowPos(window->win32.handle, NULL, rect.left, rect.top, 0, 0,
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE);
+}
+
+void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
+{
+ RECT area;
+ GetClientRect(window->win32.handle, &area);
+
+ if (width)
+ *width = area.right;
+ if (height)
+ *height = area.bottom;
+}
+
+void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
+{
+ if (window->monitor)
+ {
+ if (window->monitor->window == window)
+ {
+ acquireMonitor(window);
+ fitToMonitor(window);
+ }
+ }
+ else
+ {
+ RECT rect = { 0, 0, width, height };
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ {
+ AdjustWindowRectEx(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window));
+ }
+
+ SetWindowPos(window->win32.handle, HWND_TOP,
+ 0, 0, rect.right - rect.left, rect.bottom - rect.top,
+ SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOZORDER);
+ }
+}
+
+void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight)
+{
+ RECT area;
+
+ if ((minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE) &&
+ (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE))
+ {
+ return;
+ }
+
+ GetWindowRect(window->win32.handle, &area);
+ MoveWindow(window->win32.handle,
+ area.left, area.top,
+ area.right - area.left,
+ area.bottom - area.top, TRUE);
+}
+
+void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
+{
+ RECT area;
+
+ if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE)
+ return;
+
+ GetWindowRect(window->win32.handle, &area);
+ applyAspectRatio(window, WMSZ_BOTTOMRIGHT, &area);
+ MoveWindow(window->win32.handle,
+ area.left, area.top,
+ area.right - area.left,
+ area.bottom - area.top, TRUE);
+}
+
+void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
+{
+ _glfwPlatformGetWindowSize(window, width, height);
+}
+
+void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
+ int* left, int* top,
+ int* right, int* bottom)
+{
+ RECT rect;
+ int width, height;
+
+ _glfwPlatformGetWindowSize(window, &width, &height);
+ SetRect(&rect, 0, 0, width, height);
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ {
+ AdjustWindowRectEx(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window));
+ }
+
+ if (left)
+ *left = -rect.left;
+ if (top)
+ *top = -rect.top;
+ if (right)
+ *right = rect.right - width;
+ if (bottom)
+ *bottom = rect.bottom - height;
+}
+
+void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
+ float* xscale, float* yscale)
+{
+ const HANDLE handle = MonitorFromWindow(window->win32.handle,
+ MONITOR_DEFAULTTONEAREST);
+ _glfwGetMonitorContentScaleWin32(handle, xscale, yscale);
+}
+
+void _glfwPlatformIconifyWindow(_GLFWwindow* window)
+{
+ ShowWindow(window->win32.handle, SW_MINIMIZE);
+}
+
+void _glfwPlatformRestoreWindow(_GLFWwindow* window)
+{
+ ShowWindow(window->win32.handle, SW_RESTORE);
+}
+
+void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
+{
+ ShowWindow(window->win32.handle, SW_MAXIMIZE);
+}
+
+void _glfwPlatformShowWindow(_GLFWwindow* window)
+{
+ ShowWindow(window->win32.handle, SW_SHOWNA);
+}
+
+void _glfwPlatformHideWindow(_GLFWwindow* window)
+{
+ ShowWindow(window->win32.handle, SW_HIDE);
+}
+
+void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
+{
+ FlashWindow(window->win32.handle, TRUE);
+}
+
+void _glfwPlatformFocusWindow(_GLFWwindow* window)
+{
+ BringWindowToTop(window->win32.handle);
+ SetForegroundWindow(window->win32.handle);
+ SetFocus(window->win32.handle);
+}
+
+void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
+ _GLFWmonitor* monitor,
+ int xpos, int ypos,
+ int width, int height,
+ int refreshRate)
+{
+ if (window->monitor == monitor)
+ {
+ if (monitor)
+ {
+ if (monitor->window == window)
+ {
+ acquireMonitor(window);
+ fitToMonitor(window);
+ }
+ }
+ else
+ {
+ RECT rect = { xpos, ypos, xpos + width, ypos + height };
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ {
+ AdjustWindowRectEx(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window));
+ }
+
+ SetWindowPos(window->win32.handle, HWND_TOP,
+ rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top,
+ SWP_NOCOPYBITS | SWP_NOACTIVATE | SWP_NOZORDER);
+ }
+
+ return;
+ }
+
+ if (window->monitor)
+ releaseMonitor(window);
+
+ _glfwInputWindowMonitor(window, monitor);
+
+ if (window->monitor)
+ {
+ MONITORINFO mi = { sizeof(mi) };
+ UINT flags = SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOCOPYBITS;
+
+ if (window->decorated)
+ {
+ DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);
+ style &= ~WS_OVERLAPPEDWINDOW;
+ style |= getWindowStyle(window);
+ SetWindowLongW(window->win32.handle, GWL_STYLE, style);
+ flags |= SWP_FRAMECHANGED;
+ }
+
+ acquireMonitor(window);
+
+ GetMonitorInfo(window->monitor->win32.handle, &mi);
+ SetWindowPos(window->win32.handle, HWND_TOPMOST,
+ mi.rcMonitor.left,
+ mi.rcMonitor.top,
+ mi.rcMonitor.right - mi.rcMonitor.left,
+ mi.rcMonitor.bottom - mi.rcMonitor.top,
+ flags);
+ }
+ else
+ {
+ HWND after;
+ RECT rect = { xpos, ypos, xpos + width, ypos + height };
+ DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);
+ UINT flags = SWP_NOACTIVATE | SWP_NOCOPYBITS;
+
+ if (window->decorated)
+ {
+ style &= ~WS_POPUP;
+ style |= getWindowStyle(window);
+ SetWindowLongW(window->win32.handle, GWL_STYLE, style);
+
+ flags |= SWP_FRAMECHANGED;
+ }
+
+ if (window->floating)
+ after = HWND_TOPMOST;
+ else
+ after = HWND_NOTOPMOST;
+
+ if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
+ {
+ AdjustWindowRectExForDpi(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window),
+ GetDpiForWindow(window->win32.handle));
+ }
+ else
+ {
+ AdjustWindowRectEx(&rect, getWindowStyle(window),
+ FALSE, getWindowExStyle(window));
+ }
+
+ SetWindowPos(window->win32.handle, after,
+ rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top,
+ flags);
+ }
+}
+
+int _glfwPlatformWindowFocused(_GLFWwindow* window)
+{
+ return window->win32.handle == GetActiveWindow();
+}
+
+int _glfwPlatformWindowIconified(_GLFWwindow* window)
+{
+ return IsIconic(window->win32.handle);
+}
+
+int _glfwPlatformWindowVisible(_GLFWwindow* window)
+{
+ return IsWindowVisible(window->win32.handle);
+}
+
+int _glfwPlatformWindowMaximized(_GLFWwindow* window)
+{
+ return IsZoomed(window->win32.handle);
+}
+
+int _glfwPlatformWindowHovered(_GLFWwindow* window)
+{
+ return cursorInContentArea(window);
+}
+
+int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
+{
+ BOOL composition, opaque;
+ DWORD color;
+
+ if (!window->win32.transparent)
+ return GLFW_FALSE;
+
+ if (!IsWindowsVistaOrGreater())
+ return GLFW_FALSE;
+
+ if (FAILED(DwmIsCompositionEnabled(&composition)) || !composition)
+ return GLFW_FALSE;
+
+ if (!IsWindows8OrGreater())
+ {
+ // HACK: Disable framebuffer transparency on Windows 7 when the
+ // colorization color is opaque, because otherwise the window
+ // contents is blended additively with the previous frame instead
+ // of replacing it
+ if (FAILED(DwmGetColorizationColor(&color, &opaque)) || opaque)
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
+{
+ updateWindowStyles(window);
+}
+
+void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
+{
+ updateWindowStyles(window);
+}
+
+void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
+{
+ const HWND after = enabled ? HWND_TOPMOST : HWND_NOTOPMOST;
+ SetWindowPos(window->win32.handle, after, 0, 0, 0, 0,
+ SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+}
+
+float _glfwPlatformGetWindowOpacity(_GLFWwindow* window)
+{
+ BYTE alpha;
+ DWORD flags;
+
+ if ((GetWindowLongW(window->win32.handle, GWL_EXSTYLE) & WS_EX_LAYERED) &&
+ GetLayeredWindowAttributes(window->win32.handle, NULL, &alpha, &flags))
+ {
+ if (flags & LWA_ALPHA)
+ return alpha / 255.f;
+ }
+
+ return 1.f;
+}
+
+void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
+{
+ if (opacity < 1.f)
+ {
+ const BYTE alpha = (BYTE) (255 * opacity);
+ DWORD style = GetWindowLongW(window->win32.handle, GWL_EXSTYLE);
+ style |= WS_EX_LAYERED;
+ SetWindowLongW(window->win32.handle, GWL_EXSTYLE, style);
+ SetLayeredWindowAttributes(window->win32.handle, 0, alpha, LWA_ALPHA);
+ }
+ else
+ {
+ DWORD style = GetWindowLongW(window->win32.handle, GWL_EXSTYLE);
+ style &= ~WS_EX_LAYERED;
+ SetWindowLongW(window->win32.handle, GWL_EXSTYLE, style);
+ }
+}
+
+void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
+{
+ if (_glfw.win32.disabledCursorWindow != window)
+ return;
+
+ if (enabled)
+ enableRawMouseMotion(window);
+ else
+ disableRawMouseMotion(window);
+}
+
+GLFWbool _glfwPlatformRawMouseMotionSupported(void)
+{
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformPollEvents(void)
+{
+ MSG msg;
+ HWND handle;
+ _GLFWwindow* window;
+
+ while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ if (msg.message == WM_QUIT)
+ {
+ // NOTE: While GLFW does not itself post WM_QUIT, other processes
+ // may post it to this one, for example Task Manager
+ // HACK: Treat WM_QUIT as a close on all windows
+
+ window = _glfw.windowListHead;
+ while (window)
+ {
+ _glfwInputWindowCloseRequest(window);
+ window = window->next;
+ }
+ }
+ else
+ {
+ TranslateMessage(&msg);
+ DispatchMessageW(&msg);
+ }
+ }
+
+ // HACK: Release modifier keys that the system did not emit KEYUP for
+ // NOTE: Shift keys on Windows tend to "stick" when both are pressed as
+ // no key up message is generated by the first key release
+ // NOTE: Windows key is not reported as released by the Win+V hotkey
+ // Other Win hotkeys are handled implicitly by _glfwInputWindowFocus
+ // because they change the input focus
+ // NOTE: The other half of this is in the WM_*KEY* handler in windowProc
+ handle = GetActiveWindow();
+ if (handle)
+ {
+ window = GetPropW(handle, L"GLFW");
+ if (window)
+ {
+ int i;
+ const int keys[4][2] =
+ {
+ { VK_LSHIFT, GLFW_KEY_LEFT_SHIFT },
+ { VK_RSHIFT, GLFW_KEY_RIGHT_SHIFT },
+ { VK_LWIN, GLFW_KEY_LEFT_SUPER },
+ { VK_RWIN, GLFW_KEY_RIGHT_SUPER }
+ };
+
+ for (i = 0; i < 4; i++)
+ {
+ const int vk = keys[i][0];
+ const int key = keys[i][1];
+ const int scancode = _glfw.win32.scancodes[key];
+
+ if ((GetKeyState(vk) & 0x8000))
+ continue;
+ if (window->keys[key] != GLFW_PRESS)
+ continue;
+
+ _glfwInputKey(window, key, scancode, GLFW_RELEASE, getKeyMods());
+ }
+ }
+ }
+
+ window = _glfw.win32.disabledCursorWindow;
+ if (window)
+ {
+ int width, height;
+ _glfwPlatformGetWindowSize(window, &width, &height);
+
+ // NOTE: Re-center the cursor only if it has moved since the last call,
+ // to avoid breaking glfwWaitEvents with WM_MOUSEMOVE
+ if (window->win32.lastCursorPosX != width / 2 ||
+ window->win32.lastCursorPosY != height / 2)
+ {
+ _glfwPlatformSetCursorPos(window, width / 2, height / 2);
+ }
+ }
+}
+
+void _glfwPlatformWaitEvents(void)
+{
+ WaitMessage();
+
+ _glfwPlatformPollEvents();
+}
+
+void _glfwPlatformWaitEventsTimeout(double timeout)
+{
+ MsgWaitForMultipleObjects(0, NULL, FALSE, (DWORD) (timeout * 1e3), QS_ALLEVENTS);
+
+ _glfwPlatformPollEvents();
+}
+
+void _glfwPlatformPostEmptyEvent(void)
+{
+ PostMessage(_glfw.win32.helperWindowHandle, WM_NULL, 0, 0);
+}
+
+void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)
+{
+ POINT pos;
+
+ if (GetCursorPos(&pos))
+ {
+ ScreenToClient(window->win32.handle, &pos);
+
+ if (xpos)
+ *xpos = pos.x;
+ if (ypos)
+ *ypos = pos.y;
+ }
+}
+
+void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos)
+{
+ POINT pos = { (int) xpos, (int) ypos };
+
+ // Store the new position so it can be recognized later
+ window->win32.lastCursorPosX = pos.x;
+ window->win32.lastCursorPosY = pos.y;
+
+ ClientToScreen(window->win32.handle, &pos);
+ SetCursorPos(pos.x, pos.y);
+}
+
+void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
+{
+ if (mode == GLFW_CURSOR_DISABLED)
+ {
+ if (_glfwPlatformWindowFocused(window))
+ disableCursor(window);
+ }
+ else if (_glfw.win32.disabledCursorWindow == window)
+ enableCursor(window);
+ else if (cursorInContentArea(window))
+ updateCursorImage(window);
+}
+
+const char* _glfwPlatformGetScancodeName(int scancode)
+{
+ if (scancode < 0 || scancode > (KF_EXTENDED | 0xff) ||
+ _glfw.win32.keycodes[scancode] == GLFW_KEY_UNKNOWN)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode);
+ return NULL;
+ }
+
+ return _glfw.win32.keynames[_glfw.win32.keycodes[scancode]];
+}
+
+int _glfwPlatformGetKeyScancode(int key)
+{
+ return _glfw.win32.scancodes[key];
+}
+
+int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
+ const GLFWimage* image,
+ int xhot, int yhot)
+{
+ cursor->win32.handle = (HCURSOR) createIcon(image, xhot, yhot, GLFW_FALSE);
+ if (!cursor->win32.handle)
+ return GLFW_FALSE;
+
+ return GLFW_TRUE;
+}
+
+int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
+{
+ int id = 0;
+
+ if (shape == GLFW_ARROW_CURSOR)
+ id = OCR_NORMAL;
+ else if (shape == GLFW_IBEAM_CURSOR)
+ id = OCR_IBEAM;
+ else if (shape == GLFW_CROSSHAIR_CURSOR)
+ id = OCR_CROSS;
+ else if (shape == GLFW_HAND_CURSOR)
+ id = OCR_HAND;
+ else if (shape == GLFW_HRESIZE_CURSOR)
+ id = OCR_SIZEWE;
+ else if (shape == GLFW_VRESIZE_CURSOR)
+ id = OCR_SIZENS;
+ else
+ return GLFW_FALSE;
+
+ cursor->win32.handle = LoadImageW(NULL,
+ MAKEINTRESOURCEW(id), IMAGE_CURSOR, 0, 0,
+ LR_DEFAULTSIZE | LR_SHARED);
+ if (!cursor->win32.handle)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create standard cursor");
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
+{
+ if (cursor->win32.handle)
+ DestroyIcon((HICON) cursor->win32.handle);
+}
+
+void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
+{
+ if (cursorInContentArea(window))
+ updateCursorImage(window);
+}
+
+void _glfwPlatformSetClipboardString(const char* string)
+{
+ int characterCount;
+ HANDLE object;
+ WCHAR* buffer;
+
+ characterCount = MultiByteToWideChar(CP_UTF8, 0, string, -1, NULL, 0);
+ if (!characterCount)
+ return;
+
+ object = GlobalAlloc(GMEM_MOVEABLE, characterCount * sizeof(WCHAR));
+ if (!object)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to allocate global handle for clipboard");
+ return;
+ }
+
+ buffer = GlobalLock(object);
+ if (!buffer)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to lock global handle");
+ GlobalFree(object);
+ return;
+ }
+
+ MultiByteToWideChar(CP_UTF8, 0, string, -1, buffer, characterCount);
+ GlobalUnlock(object);
+
+ if (!OpenClipboard(_glfw.win32.helperWindowHandle))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to open clipboard");
+ GlobalFree(object);
+ return;
+ }
+
+ EmptyClipboard();
+ SetClipboardData(CF_UNICODETEXT, object);
+ CloseClipboard();
+}
+
+const char* _glfwPlatformGetClipboardString(void)
+{
+ HANDLE object;
+ WCHAR* buffer;
+
+ if (!OpenClipboard(_glfw.win32.helperWindowHandle))
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to open clipboard");
+ return NULL;
+ }
+
+ object = GetClipboardData(CF_UNICODETEXT);
+ if (!object)
+ {
+ _glfwInputErrorWin32(GLFW_FORMAT_UNAVAILABLE,
+ "Win32: Failed to convert clipboard to string");
+ CloseClipboard();
+ return NULL;
+ }
+
+ buffer = GlobalLock(object);
+ if (!buffer)
+ {
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to lock global handle");
+ CloseClipboard();
+ return NULL;
+ }
+
+ free(_glfw.win32.clipboardString);
+ _glfw.win32.clipboardString = _glfwCreateUTF8FromWideStringWin32(buffer);
+
+ GlobalUnlock(object);
+ CloseClipboard();
+
+ return _glfw.win32.clipboardString;
+}
+
+void _glfwPlatformGetRequiredInstanceExtensions(char** extensions)
+{
+ if (!_glfw.vk.KHR_surface || !_glfw.vk.KHR_win32_surface)
+ return;
+
+ extensions[0] = "VK_KHR_surface";
+ extensions[1] = "VK_KHR_win32_surface";
+}
+
+int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily)
+{
+ PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
+ vkGetPhysicalDeviceWin32PresentationSupportKHR =
+ (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)
+ vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
+ if (!vkGetPhysicalDeviceWin32PresentationSupportKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Win32: Vulkan instance missing VK_KHR_win32_surface extension");
+ return GLFW_FALSE;
+ }
+
+ return vkGetPhysicalDeviceWin32PresentationSupportKHR(device, queuefamily);
+}
+
+VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
+ _GLFWwindow* window,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface)
+{
+ VkResult err;
+ VkWin32SurfaceCreateInfoKHR sci;
+ PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR;
+
+ vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)
+ vkGetInstanceProcAddr(instance, "vkCreateWin32SurfaceKHR");
+ if (!vkCreateWin32SurfaceKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Win32: Vulkan instance missing VK_KHR_win32_surface extension");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ memset(&sci, 0, sizeof(sci));
+ sci.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
+ sci.hinstance = GetModuleHandle(NULL);
+ sci.hwnd = window->win32.handle;
+
+ err = vkCreateWin32SurfaceKHR(instance, &sci, allocator, surface);
+ if (err)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Win32: Failed to create Vulkan surface: %s",
+ _glfwGetVulkanResultString(err));
+ }
+
+ return err;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI HWND glfwGetWin32Window(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return window->win32.handle;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/window.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/window.c
new file mode 100644
index 0000000..b87a260
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/window.c
@@ -0,0 +1,1104 @@
+//========================================================================
+// GLFW 3.3 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
+
+#include "internal.h"
+
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+#include <float.h>
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW event API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Notifies shared code that a window has lost or received input focus
+//
+void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)
+{
+ if (window->callbacks.focus)
+ window->callbacks.focus((GLFWwindow*) window, focused);
+
+ if (!focused)
+ {
+ int key, button;
+
+ for (key = 0; key <= GLFW_KEY_LAST; key++)
+ {
+ if (window->keys[key] == GLFW_PRESS)
+ {
+ const int scancode = _glfwPlatformGetKeyScancode(key);
+ _glfwInputKey(window, key, scancode, GLFW_RELEASE, 0);
+ }
+ }
+
+ for (button = 0; button <= GLFW_MOUSE_BUTTON_LAST; button++)
+ {
+ if (window->mouseButtons[button] == GLFW_PRESS)
+ _glfwInputMouseClick(window, button, GLFW_RELEASE, 0);
+ }
+ }
+}
+
+// Notifies shared code that a window has moved
+// The position is specified in content area relative screen coordinates
+//
+void _glfwInputWindowPos(_GLFWwindow* window, int x, int y)
+{
+ if (window->callbacks.pos)
+ window->callbacks.pos((GLFWwindow*) window, x, y);
+}
+
+// Notifies shared code that a window has been resized
+// The size is specified in screen coordinates
+//
+void _glfwInputWindowSize(_GLFWwindow* window, int width, int height)
+{
+ if (window->callbacks.size)
+ window->callbacks.size((GLFWwindow*) window, width, height);
+}
+
+// Notifies shared code that a window has been iconified or restored
+//
+void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified)
+{
+ if (window->callbacks.iconify)
+ window->callbacks.iconify((GLFWwindow*) window, iconified);
+}
+
+// Notifies shared code that a window has been maximized or restored
+//
+void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized)
+{
+ if (window->callbacks.maximize)
+ window->callbacks.maximize((GLFWwindow*) window, maximized);
+}
+
+// Notifies shared code that a window framebuffer has been resized
+// The size is specified in pixels
+//
+void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height)
+{
+ if (window->callbacks.fbsize)
+ window->callbacks.fbsize((GLFWwindow*) window, width, height);
+}
+
+// Notifies shared code that a window content scale has changed
+// The scale is specified as the ratio between the current and default DPI
+//
+void _glfwInputWindowContentScale(_GLFWwindow* window, float xscale, float yscale)
+{
+ if (window->callbacks.scale)
+ window->callbacks.scale((GLFWwindow*) window, xscale, yscale);
+}
+
+// Notifies shared code that the window contents needs updating
+//
+void _glfwInputWindowDamage(_GLFWwindow* window)
+{
+ if (window->callbacks.refresh)
+ window->callbacks.refresh((GLFWwindow*) window);
+}
+
+// Notifies shared code that the user wishes to close a window
+//
+void _glfwInputWindowCloseRequest(_GLFWwindow* window)
+{
+ window->shouldClose = GLFW_TRUE;
+
+ if (window->callbacks.close)
+ window->callbacks.close((GLFWwindow*) window);
+}
+
+// Notifies shared code that a window has changed its desired monitor
+//
+void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor)
+{
+ window->monitor = monitor;
+}
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW public API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
+ const char* title,
+ GLFWmonitor* monitor,
+ GLFWwindow* share)
+{
+ _GLFWfbconfig fbconfig;
+ _GLFWctxconfig ctxconfig;
+ _GLFWwndconfig wndconfig;
+ _GLFWwindow* window;
+
+ assert(title != NULL);
+ assert(width >= 0);
+ assert(height >= 0);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+
+ if (width <= 0 || height <= 0)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid window size %ix%i",
+ width, height);
+
+ return NULL;
+ }
+
+ fbconfig = _glfw.hints.framebuffer;
+ ctxconfig = _glfw.hints.context;
+ wndconfig = _glfw.hints.window;
+
+ wndconfig.width = width;
+ wndconfig.height = height;
+ wndconfig.title = title;
+ ctxconfig.share = (_GLFWwindow*) share;
+
+ if (!_glfwIsValidContextConfig(&ctxconfig))
+ return NULL;
+
+ window = calloc(1, sizeof(_GLFWwindow));
+ window->next = _glfw.windowListHead;
+ _glfw.windowListHead = window;
+
+ window->videoMode.width = width;
+ window->videoMode.height = height;
+ window->videoMode.redBits = fbconfig.redBits;
+ window->videoMode.greenBits = fbconfig.greenBits;
+ window->videoMode.blueBits = fbconfig.blueBits;
+ window->videoMode.refreshRate = _glfw.hints.refreshRate;
+
+ window->monitor = (_GLFWmonitor*) monitor;
+ window->resizable = wndconfig.resizable;
+ window->decorated = wndconfig.decorated;
+ window->autoIconify = wndconfig.autoIconify;
+ window->floating = wndconfig.floating;
+ window->focusOnShow = wndconfig.focusOnShow;
+ window->cursorMode = GLFW_CURSOR_NORMAL;
+
+ window->doublebuffer = fbconfig.doublebuffer;
+
+ window->minwidth = GLFW_DONT_CARE;
+ window->minheight = GLFW_DONT_CARE;
+ window->maxwidth = GLFW_DONT_CARE;
+ window->maxheight = GLFW_DONT_CARE;
+ window->numer = GLFW_DONT_CARE;
+ window->denom = GLFW_DONT_CARE;
+
+ // Open the actual window and create its context
+ if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig))
+ {
+ glfwDestroyWindow((GLFWwindow*) window);
+ return NULL;
+ }
+
+ if (ctxconfig.client != GLFW_NO_API)
+ {
+ if (!_glfwRefreshContextAttribs(window, &ctxconfig))
+ {
+ glfwDestroyWindow((GLFWwindow*) window);
+ return NULL;
+ }
+ }
+
+ if (window->monitor)
+ {
+ if (wndconfig.centerCursor)
+ _glfwCenterCursorInContentArea(window);
+ }
+ else
+ {
+ if (wndconfig.visible)
+ {
+ _glfwPlatformShowWindow(window);
+ if (wndconfig.focused)
+ _glfwPlatformFocusWindow(window);
+ }
+ }
+
+ return (GLFWwindow*) window;
+}
+
+void glfwDefaultWindowHints(void)
+{
+ _GLFW_REQUIRE_INIT();
+
+ // The default is OpenGL with minimum version 1.0
+ memset(&_glfw.hints.context, 0, sizeof(_glfw.hints.context));
+ _glfw.hints.context.client = GLFW_OPENGL_API;
+ _glfw.hints.context.source = GLFW_NATIVE_CONTEXT_API;
+ _glfw.hints.context.major = 1;
+ _glfw.hints.context.minor = 0;
+
+ // The default is a focused, visible, resizable window with decorations
+ memset(&_glfw.hints.window, 0, sizeof(_glfw.hints.window));
+ _glfw.hints.window.resizable = GLFW_TRUE;
+ _glfw.hints.window.visible = GLFW_TRUE;
+ _glfw.hints.window.decorated = GLFW_TRUE;
+ _glfw.hints.window.focused = GLFW_TRUE;
+ _glfw.hints.window.autoIconify = GLFW_TRUE;
+ _glfw.hints.window.centerCursor = GLFW_TRUE;
+ _glfw.hints.window.focusOnShow = GLFW_TRUE;
+
+ // The default is 24 bits of color, 24 bits of depth and 8 bits of stencil,
+ // double buffered
+ memset(&_glfw.hints.framebuffer, 0, sizeof(_glfw.hints.framebuffer));
+ _glfw.hints.framebuffer.redBits = 8;
+ _glfw.hints.framebuffer.greenBits = 8;
+ _glfw.hints.framebuffer.blueBits = 8;
+ _glfw.hints.framebuffer.alphaBits = 8;
+ _glfw.hints.framebuffer.depthBits = 24;
+ _glfw.hints.framebuffer.stencilBits = 8;
+ _glfw.hints.framebuffer.doublebuffer = GLFW_TRUE;
+
+ // The default is to select the highest available refresh rate
+ _glfw.hints.refreshRate = GLFW_DONT_CARE;
+
+ // The default is to use full Retina resolution framebuffers
+ _glfw.hints.window.ns.retina = GLFW_TRUE;
+}
+
+GLFWAPI void glfwWindowHint(int hint, int value)
+{
+ _GLFW_REQUIRE_INIT();
+
+ switch (hint)
+ {
+ case GLFW_RED_BITS:
+ _glfw.hints.framebuffer.redBits = value;
+ return;
+ case GLFW_GREEN_BITS:
+ _glfw.hints.framebuffer.greenBits = value;
+ return;
+ case GLFW_BLUE_BITS:
+ _glfw.hints.framebuffer.blueBits = value;
+ return;
+ case GLFW_ALPHA_BITS:
+ _glfw.hints.framebuffer.alphaBits = value;
+ return;
+ case GLFW_DEPTH_BITS:
+ _glfw.hints.framebuffer.depthBits = value;
+ return;
+ case GLFW_STENCIL_BITS:
+ _glfw.hints.framebuffer.stencilBits = value;
+ return;
+ case GLFW_ACCUM_RED_BITS:
+ _glfw.hints.framebuffer.accumRedBits = value;
+ return;
+ case GLFW_ACCUM_GREEN_BITS:
+ _glfw.hints.framebuffer.accumGreenBits = value;
+ return;
+ case GLFW_ACCUM_BLUE_BITS:
+ _glfw.hints.framebuffer.accumBlueBits = value;
+ return;
+ case GLFW_ACCUM_ALPHA_BITS:
+ _glfw.hints.framebuffer.accumAlphaBits = value;
+ return;
+ case GLFW_AUX_BUFFERS:
+ _glfw.hints.framebuffer.auxBuffers = value;
+ return;
+ case GLFW_STEREO:
+ _glfw.hints.framebuffer.stereo = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_DOUBLEBUFFER:
+ _glfw.hints.framebuffer.doublebuffer = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_TRANSPARENT_FRAMEBUFFER:
+ _glfw.hints.framebuffer.transparent = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_SAMPLES:
+ _glfw.hints.framebuffer.samples = value;
+ return;
+ case GLFW_SRGB_CAPABLE:
+ _glfw.hints.framebuffer.sRGB = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_RESIZABLE:
+ _glfw.hints.window.resizable = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_DECORATED:
+ _glfw.hints.window.decorated = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_FOCUSED:
+ _glfw.hints.window.focused = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_AUTO_ICONIFY:
+ _glfw.hints.window.autoIconify = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_FLOATING:
+ _glfw.hints.window.floating = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_MAXIMIZED:
+ _glfw.hints.window.maximized = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_VISIBLE:
+ _glfw.hints.window.visible = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_COCOA_RETINA_FRAMEBUFFER:
+ _glfw.hints.window.ns.retina = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_COCOA_GRAPHICS_SWITCHING:
+ _glfw.hints.context.nsgl.offline = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_SCALE_TO_MONITOR:
+ _glfw.hints.window.scaleToMonitor = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_CENTER_CURSOR:
+ _glfw.hints.window.centerCursor = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_FOCUS_ON_SHOW:
+ _glfw.hints.window.focusOnShow = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_CLIENT_API:
+ _glfw.hints.context.client = value;
+ return;
+ case GLFW_CONTEXT_CREATION_API:
+ _glfw.hints.context.source = value;
+ return;
+ case GLFW_CONTEXT_VERSION_MAJOR:
+ _glfw.hints.context.major = value;
+ return;
+ case GLFW_CONTEXT_VERSION_MINOR:
+ _glfw.hints.context.minor = value;
+ return;
+ case GLFW_CONTEXT_ROBUSTNESS:
+ _glfw.hints.context.robustness = value;
+ return;
+ case GLFW_OPENGL_FORWARD_COMPAT:
+ _glfw.hints.context.forward = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_OPENGL_DEBUG_CONTEXT:
+ _glfw.hints.context.debug = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_CONTEXT_NO_ERROR:
+ _glfw.hints.context.noerror = value ? GLFW_TRUE : GLFW_FALSE;
+ return;
+ case GLFW_OPENGL_PROFILE:
+ _glfw.hints.context.profile = value;
+ return;
+ case GLFW_CONTEXT_RELEASE_BEHAVIOR:
+ _glfw.hints.context.release = value;
+ return;
+ case GLFW_REFRESH_RATE:
+ _glfw.hints.refreshRate = value;
+ return;
+ }
+
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint 0x%08X", hint);
+}
+
+GLFWAPI void glfwWindowHintString(int hint, const char* value)
+{
+ assert(value != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ switch (hint)
+ {
+ case GLFW_COCOA_FRAME_NAME:
+ strncpy(_glfw.hints.window.ns.frameName, value,
+ sizeof(_glfw.hints.window.ns.frameName) - 1);
+ return;
+ case GLFW_X11_CLASS_NAME:
+ strncpy(_glfw.hints.window.x11.className, value,
+ sizeof(_glfw.hints.window.x11.className) - 1);
+ return;
+ case GLFW_X11_INSTANCE_NAME:
+ strncpy(_glfw.hints.window.x11.instanceName, value,
+ sizeof(_glfw.hints.window.x11.instanceName) - 1);
+ return;
+ }
+
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint string 0x%08X", hint);
+}
+
+GLFWAPI void glfwDestroyWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+
+ _GLFW_REQUIRE_INIT();
+
+ // Allow closing of NULL (to match the behavior of free)
+ if (window == NULL)
+ return;
+
+ // Clear all callbacks to avoid exposing a half torn-down window object
+ memset(&window->callbacks, 0, sizeof(window->callbacks));
+
+ // The window's context must not be current on another thread when the
+ // window is destroyed
+ if (window == _glfwPlatformGetTls(&_glfw.contextSlot))
+ glfwMakeContextCurrent(NULL);
+
+ _glfwPlatformDestroyWindow(window);
+
+ // Unlink window from global linked list
+ {
+ _GLFWwindow** prev = &_glfw.windowListHead;
+
+ while (*prev != window)
+ prev = &((*prev)->next);
+
+ *prev = window->next;
+ }
+
+ free(window);
+}
+
+GLFWAPI int glfwWindowShouldClose(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(0);
+ return window->shouldClose;
+}
+
+GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* handle, int value)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ window->shouldClose = value;
+}
+
+GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+ assert(title != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformSetWindowTitle(window, title);
+}
+
+GLFWAPI void glfwSetWindowIcon(GLFWwindow* handle,
+ int count, const GLFWimage* images)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+ assert(count >= 0);
+ assert(count == 0 || images != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformSetWindowIcon(window, count, images);
+}
+
+GLFWAPI void glfwGetWindowPos(GLFWwindow* handle, int* xpos, int* ypos)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ if (xpos)
+ *xpos = 0;
+ if (ypos)
+ *ypos = 0;
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformGetWindowPos(window, xpos, ypos);
+}
+
+GLFWAPI void glfwSetWindowPos(GLFWwindow* handle, int xpos, int ypos)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window->monitor)
+ return;
+
+ _glfwPlatformSetWindowPos(window, xpos, ypos);
+}
+
+GLFWAPI void glfwGetWindowSize(GLFWwindow* handle, int* width, int* height)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ if (width)
+ *width = 0;
+ if (height)
+ *height = 0;
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformGetWindowSize(window, width, height);
+}
+
+GLFWAPI void glfwSetWindowSize(GLFWwindow* handle, int width, int height)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+ assert(width >= 0);
+ assert(height >= 0);
+
+ _GLFW_REQUIRE_INIT();
+
+ window->videoMode.width = width;
+ window->videoMode.height = height;
+
+ _glfwPlatformSetWindowSize(window, width, height);
+}
+
+GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* handle,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (minwidth != GLFW_DONT_CARE && minheight != GLFW_DONT_CARE)
+ {
+ if (minwidth < 0 || minheight < 0)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid window minimum size %ix%i",
+ minwidth, minheight);
+ return;
+ }
+ }
+
+ if (maxwidth != GLFW_DONT_CARE && maxheight != GLFW_DONT_CARE)
+ {
+ if (maxwidth < 0 || maxheight < 0 ||
+ maxwidth < minwidth || maxheight < minheight)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid window maximum size %ix%i",
+ maxwidth, maxheight);
+ return;
+ }
+ }
+
+ window->minwidth = minwidth;
+ window->minheight = minheight;
+ window->maxwidth = maxwidth;
+ window->maxheight = maxheight;
+
+ if (window->monitor || !window->resizable)
+ return;
+
+ _glfwPlatformSetWindowSizeLimits(window,
+ minwidth, minheight,
+ maxwidth, maxheight);
+}
+
+GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* handle, int numer, int denom)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+ assert(numer != 0);
+ assert(denom != 0);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (numer != GLFW_DONT_CARE && denom != GLFW_DONT_CARE)
+ {
+ if (numer <= 0 || denom <= 0)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid window aspect ratio %i:%i",
+ numer, denom);
+ return;
+ }
+ }
+
+ window->numer = numer;
+ window->denom = denom;
+
+ if (window->monitor || !window->resizable)
+ return;
+
+ _glfwPlatformSetWindowAspectRatio(window, numer, denom);
+}
+
+GLFWAPI void glfwGetFramebufferSize(GLFWwindow* handle, int* width, int* height)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ if (width)
+ *width = 0;
+ if (height)
+ *height = 0;
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformGetFramebufferSize(window, width, height);
+}
+
+GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* handle,
+ int* left, int* top,
+ int* right, int* bottom)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ if (left)
+ *left = 0;
+ if (top)
+ *top = 0;
+ if (right)
+ *right = 0;
+ if (bottom)
+ *bottom = 0;
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformGetWindowFrameSize(window, left, top, right, bottom);
+}
+
+GLFWAPI void glfwGetWindowContentScale(GLFWwindow* handle,
+ float* xscale, float* yscale)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ if (xscale)
+ *xscale = 0.f;
+ if (yscale)
+ *yscale = 0.f;
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformGetWindowContentScale(window, xscale, yscale);
+}
+
+GLFWAPI float glfwGetWindowOpacity(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(1.f);
+ return _glfwPlatformGetWindowOpacity(window);
+}
+
+GLFWAPI void glfwSetWindowOpacity(GLFWwindow* handle, float opacity)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+ assert(opacity == opacity);
+ assert(opacity >= 0.f);
+ assert(opacity <= 1.f);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (opacity != opacity || opacity < 0.f || opacity > 1.f)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid window opacity %f", opacity);
+ return;
+ }
+
+ _glfwPlatformSetWindowOpacity(window, opacity);
+}
+
+GLFWAPI void glfwIconifyWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformIconifyWindow(window);
+}
+
+GLFWAPI void glfwRestoreWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformRestoreWindow(window);
+}
+
+GLFWAPI void glfwMaximizeWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window->monitor)
+ return;
+
+ _glfwPlatformMaximizeWindow(window);
+}
+
+GLFWAPI void glfwShowWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window->monitor)
+ return;
+
+ _glfwPlatformShowWindow(window);
+
+ if (window->focusOnShow)
+ _glfwPlatformFocusWindow(window);
+}
+
+GLFWAPI void glfwRequestWindowAttention(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ _glfwPlatformRequestWindowAttention(window);
+}
+
+GLFWAPI void glfwHideWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (window->monitor)
+ return;
+
+ _glfwPlatformHideWindow(window);
+}
+
+GLFWAPI void glfwFocusWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ _glfwPlatformFocusWindow(window);
+}
+
+GLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(0);
+
+ switch (attrib)
+ {
+ case GLFW_FOCUSED:
+ return _glfwPlatformWindowFocused(window);
+ case GLFW_ICONIFIED:
+ return _glfwPlatformWindowIconified(window);
+ case GLFW_VISIBLE:
+ return _glfwPlatformWindowVisible(window);
+ case GLFW_MAXIMIZED:
+ return _glfwPlatformWindowMaximized(window);
+ case GLFW_HOVERED:
+ return _glfwPlatformWindowHovered(window);
+ case GLFW_FOCUS_ON_SHOW:
+ return window->focusOnShow;
+ case GLFW_TRANSPARENT_FRAMEBUFFER:
+ return _glfwPlatformFramebufferTransparent(window);
+ case GLFW_RESIZABLE:
+ return window->resizable;
+ case GLFW_DECORATED:
+ return window->decorated;
+ case GLFW_FLOATING:
+ return window->floating;
+ case GLFW_AUTO_ICONIFY:
+ return window->autoIconify;
+ case GLFW_CLIENT_API:
+ return window->context.client;
+ case GLFW_CONTEXT_CREATION_API:
+ return window->context.source;
+ case GLFW_CONTEXT_VERSION_MAJOR:
+ return window->context.major;
+ case GLFW_CONTEXT_VERSION_MINOR:
+ return window->context.minor;
+ case GLFW_CONTEXT_REVISION:
+ return window->context.revision;
+ case GLFW_CONTEXT_ROBUSTNESS:
+ return window->context.robustness;
+ case GLFW_OPENGL_FORWARD_COMPAT:
+ return window->context.forward;
+ case GLFW_OPENGL_DEBUG_CONTEXT:
+ return window->context.debug;
+ case GLFW_OPENGL_PROFILE:
+ return window->context.profile;
+ case GLFW_CONTEXT_RELEASE_BEHAVIOR:
+ return window->context.release;
+ case GLFW_CONTEXT_NO_ERROR:
+ return window->context.noerror;
+ }
+
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib);
+ return 0;
+}
+
+GLFWAPI void glfwSetWindowAttrib(GLFWwindow* handle, int attrib, int value)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+
+ value = value ? GLFW_TRUE : GLFW_FALSE;
+
+ if (attrib == GLFW_AUTO_ICONIFY)
+ window->autoIconify = value;
+ else if (attrib == GLFW_RESIZABLE)
+ {
+ if (window->resizable == value)
+ return;
+
+ window->resizable = value;
+ if (!window->monitor)
+ _glfwPlatformSetWindowResizable(window, value);
+ }
+ else if (attrib == GLFW_DECORATED)
+ {
+ if (window->decorated == value)
+ return;
+
+ window->decorated = value;
+ if (!window->monitor)
+ _glfwPlatformSetWindowDecorated(window, value);
+ }
+ else if (attrib == GLFW_FLOATING)
+ {
+ if (window->floating == value)
+ return;
+
+ window->floating = value;
+ if (!window->monitor)
+ _glfwPlatformSetWindowFloating(window, value);
+ }
+ else if (attrib == GLFW_FOCUS_ON_SHOW)
+ window->focusOnShow = value;
+ else
+ _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib);
+}
+
+GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return (GLFWmonitor*) window->monitor;
+}
+
+GLFWAPI void glfwSetWindowMonitor(GLFWwindow* wh,
+ GLFWmonitor* mh,
+ int xpos, int ypos,
+ int width, int height,
+ int refreshRate)
+{
+ _GLFWwindow* window = (_GLFWwindow*) wh;
+ _GLFWmonitor* monitor = (_GLFWmonitor*) mh;
+ assert(window != NULL);
+ assert(width >= 0);
+ assert(height >= 0);
+
+ _GLFW_REQUIRE_INIT();
+
+ if (width <= 0 || height <= 0)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid window size %ix%i",
+ width, height);
+ return;
+ }
+
+ if (refreshRate < 0 && refreshRate != GLFW_DONT_CARE)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE,
+ "Invalid refresh rate %i",
+ refreshRate);
+ return;
+ }
+
+ window->videoMode.width = width;
+ window->videoMode.height = height;
+ window->videoMode.refreshRate = refreshRate;
+
+ _glfwPlatformSetWindowMonitor(window, monitor,
+ xpos, ypos, width, height,
+ refreshRate);
+}
+
+GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* handle, void* pointer)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT();
+ window->userPointer = pointer;
+}
+
+GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return window->userPointer;
+}
+
+GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* handle,
+ GLFWwindowposfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.pos, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* handle,
+ GLFWwindowsizefun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.size, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* handle,
+ GLFWwindowclosefun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.close, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* handle,
+ GLFWwindowrefreshfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.refresh, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* handle,
+ GLFWwindowfocusfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.focus, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* handle,
+ GLFWwindowiconifyfun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.iconify, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* handle,
+ GLFWwindowmaximizefun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.maximize, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* handle,
+ GLFWframebuffersizefun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.fbsize, cbfun);
+ return cbfun;
+}
+
+GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* handle,
+ GLFWwindowcontentscalefun cbfun)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ assert(window != NULL);
+
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ _GLFW_SWAP_POINTERS(window->callbacks.scale, cbfun);
+ return cbfun;
+}
+
+GLFWAPI void glfwPollEvents(void)
+{
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformPollEvents();
+}
+
+GLFWAPI void glfwWaitEvents(void)
+{
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformWaitEvents();
+}
+
+GLFWAPI void glfwWaitEventsTimeout(double timeout)
+{
+ _GLFW_REQUIRE_INIT();
+ assert(timeout == timeout);
+ assert(timeout >= 0.0);
+ assert(timeout <= DBL_MAX);
+
+ if (timeout != timeout || timeout < 0.0 || timeout > DBL_MAX)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid time %f", timeout);
+ return;
+ }
+
+ _glfwPlatformWaitEventsTimeout(timeout);
+}
+
+GLFWAPI void glfwPostEmptyEvent(void)
+{
+ _GLFW_REQUIRE_INIT();
+ _glfwPlatformPostEmptyEvent();
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_init.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_init.c
new file mode 100644
index 0000000..0ce45a3
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_init.c
@@ -0,0 +1,1327 @@
+//========================================================================
+// GLFW 3.3 Wayland - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#define _POSIX_C_SOURCE 200809L
+
+#include "internal.h"
+
+#include <assert.h>
+#include <errno.h>
+#include <limits.h>
+#include <linux/input.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/timerfd.h>
+#include <unistd.h>
+#include <wayland-client.h>
+
+
+static inline int min(int n1, int n2)
+{
+ return n1 < n2 ? n1 : n2;
+}
+
+static _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface,
+ int* which)
+{
+ int focus;
+ _GLFWwindow* window = _glfw.windowListHead;
+ if (!which)
+ which = &focus;
+ while (window)
+ {
+ if (surface == window->wl.decorations.top.surface)
+ {
+ *which = topDecoration;
+ break;
+ }
+ if (surface == window->wl.decorations.left.surface)
+ {
+ *which = leftDecoration;
+ break;
+ }
+ if (surface == window->wl.decorations.right.surface)
+ {
+ *which = rightDecoration;
+ break;
+ }
+ if (surface == window->wl.decorations.bottom.surface)
+ {
+ *which = bottomDecoration;
+ break;
+ }
+ window = window->next;
+ }
+ return window;
+}
+
+static void pointerHandleEnter(void* data,
+ struct wl_pointer* pointer,
+ uint32_t serial,
+ struct wl_surface* surface,
+ wl_fixed_t sx,
+ wl_fixed_t sy)
+{
+ // Happens in the case we just destroyed the surface.
+ if (!surface)
+ return;
+
+ int focus = 0;
+ _GLFWwindow* window = wl_surface_get_user_data(surface);
+ if (!window)
+ {
+ window = findWindowFromDecorationSurface(surface, &focus);
+ if (!window)
+ return;
+ }
+
+ window->wl.decorations.focus = focus;
+ _glfw.wl.serial = serial;
+ _glfw.wl.pointerEnterSerial = serial;
+ _glfw.wl.pointerFocus = window;
+
+ window->wl.hovered = GLFW_TRUE;
+
+ _glfwPlatformSetCursor(window, window->wl.currentCursor);
+ _glfwInputCursorEnter(window, GLFW_TRUE);
+}
+
+static void pointerHandleLeave(void* data,
+ struct wl_pointer* pointer,
+ uint32_t serial,
+ struct wl_surface* surface)
+{
+ _GLFWwindow* window = _glfw.wl.pointerFocus;
+
+ if (!window)
+ return;
+
+ window->wl.hovered = GLFW_FALSE;
+
+ _glfw.wl.serial = serial;
+ _glfw.wl.pointerFocus = NULL;
+ _glfwInputCursorEnter(window, GLFW_FALSE);
+ _glfw.wl.cursorPreviousName = NULL;
+}
+
+static void setCursor(_GLFWwindow* window, const char* name)
+{
+ struct wl_buffer* buffer;
+ struct wl_cursor* cursor;
+ struct wl_cursor_image* image;
+ struct wl_surface* surface = _glfw.wl.cursorSurface;
+ struct wl_cursor_theme* theme = _glfw.wl.cursorTheme;
+ int scale = 1;
+
+ if (window->wl.scale > 1 && _glfw.wl.cursorThemeHiDPI)
+ {
+ // We only support up to scale=2 for now, since libwayland-cursor
+ // requires us to load a different theme for each size.
+ scale = 2;
+ theme = _glfw.wl.cursorThemeHiDPI;
+ }
+
+ cursor = wl_cursor_theme_get_cursor(theme, name);
+ if (!cursor)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Standard cursor not found");
+ return;
+ }
+ // TODO: handle animated cursors too.
+ image = cursor->images[0];
+
+ if (!image)
+ return;
+
+ buffer = wl_cursor_image_get_buffer(image);
+ if (!buffer)
+ return;
+ wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.pointerEnterSerial,
+ surface,
+ image->hotspot_x / scale,
+ image->hotspot_y / scale);
+ wl_surface_set_buffer_scale(surface, scale);
+ wl_surface_attach(surface, buffer, 0, 0);
+ wl_surface_damage(surface, 0, 0,
+ image->width, image->height);
+ wl_surface_commit(surface);
+ _glfw.wl.cursorPreviousName = name;
+}
+
+static void pointerHandleMotion(void* data,
+ struct wl_pointer* pointer,
+ uint32_t time,
+ wl_fixed_t sx,
+ wl_fixed_t sy)
+{
+ _GLFWwindow* window = _glfw.wl.pointerFocus;
+ const char* cursorName = NULL;
+ double x, y;
+
+ if (!window)
+ return;
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ return;
+ x = wl_fixed_to_double(sx);
+ y = wl_fixed_to_double(sy);
+
+ switch (window->wl.decorations.focus)
+ {
+ case mainWindow:
+ window->wl.cursorPosX = x;
+ window->wl.cursorPosY = y;
+ _glfwInputCursorPos(window, x, y);
+ _glfw.wl.cursorPreviousName = NULL;
+ return;
+ case topDecoration:
+ if (y < _GLFW_DECORATION_WIDTH)
+ cursorName = "n-resize";
+ else
+ cursorName = "left_ptr";
+ break;
+ case leftDecoration:
+ if (y < _GLFW_DECORATION_WIDTH)
+ cursorName = "nw-resize";
+ else
+ cursorName = "w-resize";
+ break;
+ case rightDecoration:
+ if (y < _GLFW_DECORATION_WIDTH)
+ cursorName = "ne-resize";
+ else
+ cursorName = "e-resize";
+ break;
+ case bottomDecoration:
+ if (x < _GLFW_DECORATION_WIDTH)
+ cursorName = "sw-resize";
+ else if (x > window->wl.width + _GLFW_DECORATION_WIDTH)
+ cursorName = "se-resize";
+ else
+ cursorName = "s-resize";
+ break;
+ default:
+ assert(0);
+ }
+ if (_glfw.wl.cursorPreviousName != cursorName)
+ setCursor(window, cursorName);
+}
+
+static void pointerHandleButton(void* data,
+ struct wl_pointer* pointer,
+ uint32_t serial,
+ uint32_t time,
+ uint32_t button,
+ uint32_t state)
+{
+ _GLFWwindow* window = _glfw.wl.pointerFocus;
+ int glfwButton;
+
+ // Both xdg-shell and wl_shell use the same values.
+ uint32_t edges = WL_SHELL_SURFACE_RESIZE_NONE;
+
+ if (!window)
+ return;
+ if (button == BTN_LEFT)
+ {
+ switch (window->wl.decorations.focus)
+ {
+ case mainWindow:
+ break;
+ case topDecoration:
+ if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
+ edges = WL_SHELL_SURFACE_RESIZE_TOP;
+ else
+ {
+ if (window->wl.xdg.toplevel)
+ xdg_toplevel_move(window->wl.xdg.toplevel, _glfw.wl.seat, serial);
+ else
+ wl_shell_surface_move(window->wl.shellSurface, _glfw.wl.seat, serial);
+ }
+ break;
+ case leftDecoration:
+ if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
+ edges = WL_SHELL_SURFACE_RESIZE_TOP_LEFT;
+ else
+ edges = WL_SHELL_SURFACE_RESIZE_LEFT;
+ break;
+ case rightDecoration:
+ if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
+ edges = WL_SHELL_SURFACE_RESIZE_TOP_RIGHT;
+ else
+ edges = WL_SHELL_SURFACE_RESIZE_RIGHT;
+ break;
+ case bottomDecoration:
+ if (window->wl.cursorPosX < _GLFW_DECORATION_WIDTH)
+ edges = WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT;
+ else if (window->wl.cursorPosX > window->wl.width + _GLFW_DECORATION_WIDTH)
+ edges = WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT;
+ else
+ edges = WL_SHELL_SURFACE_RESIZE_BOTTOM;
+ break;
+ default:
+ assert(0);
+ }
+ if (edges != WL_SHELL_SURFACE_RESIZE_NONE)
+ {
+ if (window->wl.xdg.toplevel)
+ xdg_toplevel_resize(window->wl.xdg.toplevel, _glfw.wl.seat,
+ serial, edges);
+ else
+ wl_shell_surface_resize(window->wl.shellSurface, _glfw.wl.seat,
+ serial, edges);
+ }
+ }
+ else if (button == BTN_RIGHT)
+ {
+ if (window->wl.decorations.focus != mainWindow && window->wl.xdg.toplevel)
+ {
+ xdg_toplevel_show_window_menu(window->wl.xdg.toplevel,
+ _glfw.wl.seat, serial,
+ window->wl.cursorPosX,
+ window->wl.cursorPosY);
+ return;
+ }
+ }
+
+ // Don’t pass the button to the user if it was related to a decoration.
+ if (window->wl.decorations.focus != mainWindow)
+ return;
+
+ _glfw.wl.serial = serial;
+
+ /* Makes left, right and middle 0, 1 and 2. Overall order follows evdev
+ * codes. */
+ glfwButton = button - BTN_LEFT;
+
+ _glfwInputMouseClick(window,
+ glfwButton,
+ state == WL_POINTER_BUTTON_STATE_PRESSED
+ ? GLFW_PRESS
+ : GLFW_RELEASE,
+ _glfw.wl.xkb.modifiers);
+}
+
+static void pointerHandleAxis(void* data,
+ struct wl_pointer* pointer,
+ uint32_t time,
+ uint32_t axis,
+ wl_fixed_t value)
+{
+ _GLFWwindow* window = _glfw.wl.pointerFocus;
+ double x = 0.0, y = 0.0;
+ // Wayland scroll events are in pointer motion coordinate space (think two
+ // finger scroll). The factor 10 is commonly used to convert to "scroll
+ // step means 1.0.
+ const double scrollFactor = 1.0 / 10.0;
+
+ if (!window)
+ return;
+
+ assert(axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL ||
+ axis == WL_POINTER_AXIS_VERTICAL_SCROLL);
+
+ if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL)
+ x = -wl_fixed_to_double(value) * scrollFactor;
+ else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL)
+ y = -wl_fixed_to_double(value) * scrollFactor;
+
+ _glfwInputScroll(window, x, y);
+}
+
+static const struct wl_pointer_listener pointerListener = {
+ pointerHandleEnter,
+ pointerHandleLeave,
+ pointerHandleMotion,
+ pointerHandleButton,
+ pointerHandleAxis,
+};
+
+static void keyboardHandleKeymap(void* data,
+ struct wl_keyboard* keyboard,
+ uint32_t format,
+ int fd,
+ uint32_t size)
+{
+ struct xkb_keymap* keymap;
+ struct xkb_state* state;
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ struct xkb_compose_table* composeTable;
+ struct xkb_compose_state* composeState;
+#endif
+
+ char* mapStr;
+ const char* locale;
+
+ if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1)
+ {
+ close(fd);
+ return;
+ }
+
+ mapStr = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
+ if (mapStr == MAP_FAILED) {
+ close(fd);
+ return;
+ }
+
+ keymap = xkb_keymap_new_from_string(_glfw.wl.xkb.context,
+ mapStr,
+ XKB_KEYMAP_FORMAT_TEXT_V1,
+ 0);
+ munmap(mapStr, size);
+ close(fd);
+
+ if (!keymap)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to compile keymap");
+ return;
+ }
+
+ state = xkb_state_new(keymap);
+ if (!state)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to create XKB state");
+ xkb_keymap_unref(keymap);
+ return;
+ }
+
+ // Look up the preferred locale, falling back to "C" as default.
+ locale = getenv("LC_ALL");
+ if (!locale)
+ locale = getenv("LC_CTYPE");
+ if (!locale)
+ locale = getenv("LANG");
+ if (!locale)
+ locale = "C";
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ composeTable =
+ xkb_compose_table_new_from_locale(_glfw.wl.xkb.context, locale,
+ XKB_COMPOSE_COMPILE_NO_FLAGS);
+ if (composeTable)
+ {
+ composeState =
+ xkb_compose_state_new(composeTable, XKB_COMPOSE_STATE_NO_FLAGS);
+ xkb_compose_table_unref(composeTable);
+ if (composeState)
+ _glfw.wl.xkb.composeState = composeState;
+ else
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to create XKB compose state");
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to create XKB compose table");
+ }
+#endif
+
+ xkb_keymap_unref(_glfw.wl.xkb.keymap);
+ xkb_state_unref(_glfw.wl.xkb.state);
+ _glfw.wl.xkb.keymap = keymap;
+ _glfw.wl.xkb.state = state;
+
+ _glfw.wl.xkb.controlMask =
+ 1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, "Control");
+ _glfw.wl.xkb.altMask =
+ 1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, "Mod1");
+ _glfw.wl.xkb.shiftMask =
+ 1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, "Shift");
+ _glfw.wl.xkb.superMask =
+ 1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, "Mod4");
+ _glfw.wl.xkb.capsLockMask =
+ 1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, "Lock");
+ _glfw.wl.xkb.numLockMask =
+ 1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, "Mod2");
+}
+
+static void keyboardHandleEnter(void* data,
+ struct wl_keyboard* keyboard,
+ uint32_t serial,
+ struct wl_surface* surface,
+ struct wl_array* keys)
+{
+ // Happens in the case we just destroyed the surface.
+ if (!surface)
+ return;
+
+ _GLFWwindow* window = wl_surface_get_user_data(surface);
+ if (!window)
+ {
+ window = findWindowFromDecorationSurface(surface, NULL);
+ if (!window)
+ return;
+ }
+
+ _glfw.wl.serial = serial;
+ _glfw.wl.keyboardFocus = window;
+ _glfwInputWindowFocus(window, GLFW_TRUE);
+}
+
+static void keyboardHandleLeave(void* data,
+ struct wl_keyboard* keyboard,
+ uint32_t serial,
+ struct wl_surface* surface)
+{
+ _GLFWwindow* window = _glfw.wl.keyboardFocus;
+
+ if (!window)
+ return;
+
+ _glfw.wl.serial = serial;
+ _glfw.wl.keyboardFocus = NULL;
+ _glfwInputWindowFocus(window, GLFW_FALSE);
+}
+
+static int toGLFWKeyCode(uint32_t key)
+{
+ if (key < sizeof(_glfw.wl.keycodes) / sizeof(_glfw.wl.keycodes[0]))
+ return _glfw.wl.keycodes[key];
+
+ return GLFW_KEY_UNKNOWN;
+}
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+static xkb_keysym_t composeSymbol(xkb_keysym_t sym)
+{
+ if (sym == XKB_KEY_NoSymbol || !_glfw.wl.xkb.composeState)
+ return sym;
+ if (xkb_compose_state_feed(_glfw.wl.xkb.composeState, sym)
+ != XKB_COMPOSE_FEED_ACCEPTED)
+ return sym;
+ switch (xkb_compose_state_get_status(_glfw.wl.xkb.composeState))
+ {
+ case XKB_COMPOSE_COMPOSED:
+ return xkb_compose_state_get_one_sym(_glfw.wl.xkb.composeState);
+ case XKB_COMPOSE_COMPOSING:
+ case XKB_COMPOSE_CANCELLED:
+ return XKB_KEY_NoSymbol;
+ case XKB_COMPOSE_NOTHING:
+ default:
+ return sym;
+ }
+}
+#endif
+
+static GLFWbool inputChar(_GLFWwindow* window, uint32_t key)
+{
+ uint32_t code, numSyms;
+ long cp;
+ const xkb_keysym_t *syms;
+ xkb_keysym_t sym;
+
+ code = key + 8;
+ numSyms = xkb_state_key_get_syms(_glfw.wl.xkb.state, code, &syms);
+
+ if (numSyms == 1)
+ {
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ sym = composeSymbol(syms[0]);
+#else
+ sym = syms[0];
+#endif
+ cp = _glfwKeySym2Unicode(sym);
+ if (cp != -1)
+ {
+ const int mods = _glfw.wl.xkb.modifiers;
+ const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));
+ _glfwInputChar(window, cp, mods, plain);
+ }
+ }
+
+ return xkb_keymap_key_repeats(_glfw.wl.xkb.keymap, code);
+}
+
+static void keyboardHandleKey(void* data,
+ struct wl_keyboard* keyboard,
+ uint32_t serial,
+ uint32_t time,
+ uint32_t key,
+ uint32_t state)
+{
+ int keyCode;
+ int action;
+ _GLFWwindow* window = _glfw.wl.keyboardFocus;
+ GLFWbool shouldRepeat;
+ struct itimerspec timer = {};
+
+ if (!window)
+ return;
+
+ keyCode = toGLFWKeyCode(key);
+ action = state == WL_KEYBOARD_KEY_STATE_PRESSED
+ ? GLFW_PRESS : GLFW_RELEASE;
+
+ _glfw.wl.serial = serial;
+ _glfwInputKey(window, keyCode, key, action,
+ _glfw.wl.xkb.modifiers);
+
+ if (action == GLFW_PRESS)
+ {
+ shouldRepeat = inputChar(window, key);
+
+ if (shouldRepeat && _glfw.wl.keyboardRepeatRate > 0)
+ {
+ _glfw.wl.keyboardLastKey = keyCode;
+ _glfw.wl.keyboardLastScancode = key;
+ if (_glfw.wl.keyboardRepeatRate > 1)
+ timer.it_interval.tv_nsec = 1000000000 / _glfw.wl.keyboardRepeatRate;
+ else
+ timer.it_interval.tv_sec = 1;
+ timer.it_value.tv_sec = _glfw.wl.keyboardRepeatDelay / 1000;
+ timer.it_value.tv_nsec = (_glfw.wl.keyboardRepeatDelay % 1000) * 1000000;
+ }
+ }
+ timerfd_settime(_glfw.wl.timerfd, 0, &timer, NULL);
+}
+
+static void keyboardHandleModifiers(void* data,
+ struct wl_keyboard* keyboard,
+ uint32_t serial,
+ uint32_t modsDepressed,
+ uint32_t modsLatched,
+ uint32_t modsLocked,
+ uint32_t group)
+{
+ xkb_mod_mask_t mask;
+ unsigned int modifiers = 0;
+
+ _glfw.wl.serial = serial;
+
+ if (!_glfw.wl.xkb.keymap)
+ return;
+
+ xkb_state_update_mask(_glfw.wl.xkb.state,
+ modsDepressed,
+ modsLatched,
+ modsLocked,
+ 0,
+ 0,
+ group);
+
+ mask = xkb_state_serialize_mods(_glfw.wl.xkb.state,
+ XKB_STATE_MODS_DEPRESSED |
+ XKB_STATE_LAYOUT_DEPRESSED |
+ XKB_STATE_MODS_LATCHED |
+ XKB_STATE_LAYOUT_LATCHED);
+ if (mask & _glfw.wl.xkb.controlMask)
+ modifiers |= GLFW_MOD_CONTROL;
+ if (mask & _glfw.wl.xkb.altMask)
+ modifiers |= GLFW_MOD_ALT;
+ if (mask & _glfw.wl.xkb.shiftMask)
+ modifiers |= GLFW_MOD_SHIFT;
+ if (mask & _glfw.wl.xkb.superMask)
+ modifiers |= GLFW_MOD_SUPER;
+ if (mask & _glfw.wl.xkb.capsLockMask)
+ modifiers |= GLFW_MOD_CAPS_LOCK;
+ if (mask & _glfw.wl.xkb.numLockMask)
+ modifiers |= GLFW_MOD_NUM_LOCK;
+ _glfw.wl.xkb.modifiers = modifiers;
+}
+
+#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION
+static void keyboardHandleRepeatInfo(void* data,
+ struct wl_keyboard* keyboard,
+ int32_t rate,
+ int32_t delay)
+{
+ if (keyboard != _glfw.wl.keyboard)
+ return;
+
+ _glfw.wl.keyboardRepeatRate = rate;
+ _glfw.wl.keyboardRepeatDelay = delay;
+}
+#endif
+
+static const struct wl_keyboard_listener keyboardListener = {
+ keyboardHandleKeymap,
+ keyboardHandleEnter,
+ keyboardHandleLeave,
+ keyboardHandleKey,
+ keyboardHandleModifiers,
+#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION
+ keyboardHandleRepeatInfo,
+#endif
+};
+
+static void seatHandleCapabilities(void* data,
+ struct wl_seat* seat,
+ enum wl_seat_capability caps)
+{
+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !_glfw.wl.pointer)
+ {
+ _glfw.wl.pointer = wl_seat_get_pointer(seat);
+ wl_pointer_add_listener(_glfw.wl.pointer, &pointerListener, NULL);
+ }
+ else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && _glfw.wl.pointer)
+ {
+ wl_pointer_destroy(_glfw.wl.pointer);
+ _glfw.wl.pointer = NULL;
+ }
+
+ if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !_glfw.wl.keyboard)
+ {
+ _glfw.wl.keyboard = wl_seat_get_keyboard(seat);
+ wl_keyboard_add_listener(_glfw.wl.keyboard, &keyboardListener, NULL);
+ }
+ else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && _glfw.wl.keyboard)
+ {
+ wl_keyboard_destroy(_glfw.wl.keyboard);
+ _glfw.wl.keyboard = NULL;
+ }
+}
+
+static void seatHandleName(void* data,
+ struct wl_seat* seat,
+ const char* name)
+{
+}
+
+static const struct wl_seat_listener seatListener = {
+ seatHandleCapabilities,
+ seatHandleName,
+};
+
+static void dataOfferHandleOffer(void* data,
+ struct wl_data_offer* dataOffer,
+ const char* mimeType)
+{
+}
+
+static const struct wl_data_offer_listener dataOfferListener = {
+ dataOfferHandleOffer,
+};
+
+static void dataDeviceHandleDataOffer(void* data,
+ struct wl_data_device* dataDevice,
+ struct wl_data_offer* id)
+{
+ if (_glfw.wl.dataOffer)
+ wl_data_offer_destroy(_glfw.wl.dataOffer);
+
+ _glfw.wl.dataOffer = id;
+ wl_data_offer_add_listener(_glfw.wl.dataOffer, &dataOfferListener, NULL);
+}
+
+static void dataDeviceHandleEnter(void* data,
+ struct wl_data_device* dataDevice,
+ uint32_t serial,
+ struct wl_surface *surface,
+ wl_fixed_t x,
+ wl_fixed_t y,
+ struct wl_data_offer *id)
+{
+}
+
+static void dataDeviceHandleLeave(void* data,
+ struct wl_data_device* dataDevice)
+{
+}
+
+static void dataDeviceHandleMotion(void* data,
+ struct wl_data_device* dataDevice,
+ uint32_t time,
+ wl_fixed_t x,
+ wl_fixed_t y)
+{
+}
+
+static void dataDeviceHandleDrop(void* data,
+ struct wl_data_device* dataDevice)
+{
+}
+
+static void dataDeviceHandleSelection(void* data,
+ struct wl_data_device* dataDevice,
+ struct wl_data_offer* id)
+{
+}
+
+static const struct wl_data_device_listener dataDeviceListener = {
+ dataDeviceHandleDataOffer,
+ dataDeviceHandleEnter,
+ dataDeviceHandleLeave,
+ dataDeviceHandleMotion,
+ dataDeviceHandleDrop,
+ dataDeviceHandleSelection,
+};
+
+static void wmBaseHandlePing(void* data,
+ struct xdg_wm_base* wmBase,
+ uint32_t serial)
+{
+ xdg_wm_base_pong(wmBase, serial);
+}
+
+static const struct xdg_wm_base_listener wmBaseListener = {
+ wmBaseHandlePing
+};
+
+static void registryHandleGlobal(void* data,
+ struct wl_registry* registry,
+ uint32_t name,
+ const char* interface,
+ uint32_t version)
+{
+ if (strcmp(interface, "wl_compositor") == 0)
+ {
+ _glfw.wl.compositorVersion = min(3, version);
+ _glfw.wl.compositor =
+ wl_registry_bind(registry, name, &wl_compositor_interface,
+ _glfw.wl.compositorVersion);
+ }
+ else if (strcmp(interface, "wl_subcompositor") == 0)
+ {
+ _glfw.wl.subcompositor =
+ wl_registry_bind(registry, name, &wl_subcompositor_interface, 1);
+ }
+ else if (strcmp(interface, "wl_shm") == 0)
+ {
+ _glfw.wl.shm =
+ wl_registry_bind(registry, name, &wl_shm_interface, 1);
+ }
+ else if (strcmp(interface, "wl_shell") == 0)
+ {
+ _glfw.wl.shell =
+ wl_registry_bind(registry, name, &wl_shell_interface, 1);
+ }
+ else if (strcmp(interface, "wl_output") == 0)
+ {
+ _glfwAddOutputWayland(name, version);
+ }
+ else if (strcmp(interface, "wl_seat") == 0)
+ {
+ if (!_glfw.wl.seat)
+ {
+ _glfw.wl.seatVersion = min(4, version);
+ _glfw.wl.seat =
+ wl_registry_bind(registry, name, &wl_seat_interface,
+ _glfw.wl.seatVersion);
+ wl_seat_add_listener(_glfw.wl.seat, &seatListener, NULL);
+ }
+ }
+ else if (strcmp(interface, "wl_data_device_manager") == 0)
+ {
+ if (!_glfw.wl.dataDeviceManager)
+ {
+ _glfw.wl.dataDeviceManager =
+ wl_registry_bind(registry, name,
+ &wl_data_device_manager_interface, 1);
+ }
+ }
+ else if (strcmp(interface, "xdg_wm_base") == 0)
+ {
+ _glfw.wl.wmBase =
+ wl_registry_bind(registry, name, &xdg_wm_base_interface, 1);
+ xdg_wm_base_add_listener(_glfw.wl.wmBase, &wmBaseListener, NULL);
+ }
+ else if (strcmp(interface, "zxdg_decoration_manager_v1") == 0)
+ {
+ _glfw.wl.decorationManager =
+ wl_registry_bind(registry, name,
+ &zxdg_decoration_manager_v1_interface,
+ 1);
+ }
+ else if (strcmp(interface, "wp_viewporter") == 0)
+ {
+ _glfw.wl.viewporter =
+ wl_registry_bind(registry, name, &wp_viewporter_interface, 1);
+ }
+ else if (strcmp(interface, "zwp_relative_pointer_manager_v1") == 0)
+ {
+ _glfw.wl.relativePointerManager =
+ wl_registry_bind(registry, name,
+ &zwp_relative_pointer_manager_v1_interface,
+ 1);
+ }
+ else if (strcmp(interface, "zwp_pointer_constraints_v1") == 0)
+ {
+ _glfw.wl.pointerConstraints =
+ wl_registry_bind(registry, name,
+ &zwp_pointer_constraints_v1_interface,
+ 1);
+ }
+ else if (strcmp(interface, "zwp_idle_inhibit_manager_v1") == 0)
+ {
+ _glfw.wl.idleInhibitManager =
+ wl_registry_bind(registry, name,
+ &zwp_idle_inhibit_manager_v1_interface,
+ 1);
+ }
+}
+
+static void registryHandleGlobalRemove(void *data,
+ struct wl_registry *registry,
+ uint32_t name)
+{
+ int i;
+ _GLFWmonitor* monitor;
+
+ for (i = 0; i < _glfw.monitorCount; ++i)
+ {
+ monitor = _glfw.monitors[i];
+ if (monitor->wl.name == name)
+ {
+ _glfwInputMonitor(monitor, GLFW_DISCONNECTED, 0);
+ return;
+ }
+ }
+}
+
+
+static const struct wl_registry_listener registryListener = {
+ registryHandleGlobal,
+ registryHandleGlobalRemove
+};
+
+// Create key code translation tables
+//
+static void createKeyTables(void)
+{
+ int scancode;
+
+ memset(_glfw.wl.keycodes, -1, sizeof(_glfw.wl.keycodes));
+ memset(_glfw.wl.scancodes, -1, sizeof(_glfw.wl.scancodes));
+
+ _glfw.wl.keycodes[KEY_GRAVE] = GLFW_KEY_GRAVE_ACCENT;
+ _glfw.wl.keycodes[KEY_1] = GLFW_KEY_1;
+ _glfw.wl.keycodes[KEY_2] = GLFW_KEY_2;
+ _glfw.wl.keycodes[KEY_3] = GLFW_KEY_3;
+ _glfw.wl.keycodes[KEY_4] = GLFW_KEY_4;
+ _glfw.wl.keycodes[KEY_5] = GLFW_KEY_5;
+ _glfw.wl.keycodes[KEY_6] = GLFW_KEY_6;
+ _glfw.wl.keycodes[KEY_7] = GLFW_KEY_7;
+ _glfw.wl.keycodes[KEY_8] = GLFW_KEY_8;
+ _glfw.wl.keycodes[KEY_9] = GLFW_KEY_9;
+ _glfw.wl.keycodes[KEY_0] = GLFW_KEY_0;
+ _glfw.wl.keycodes[KEY_SPACE] = GLFW_KEY_SPACE;
+ _glfw.wl.keycodes[KEY_MINUS] = GLFW_KEY_MINUS;
+ _glfw.wl.keycodes[KEY_EQUAL] = GLFW_KEY_EQUAL;
+ _glfw.wl.keycodes[KEY_Q] = GLFW_KEY_Q;
+ _glfw.wl.keycodes[KEY_W] = GLFW_KEY_W;
+ _glfw.wl.keycodes[KEY_E] = GLFW_KEY_E;
+ _glfw.wl.keycodes[KEY_R] = GLFW_KEY_R;
+ _glfw.wl.keycodes[KEY_T] = GLFW_KEY_T;
+ _glfw.wl.keycodes[KEY_Y] = GLFW_KEY_Y;
+ _glfw.wl.keycodes[KEY_U] = GLFW_KEY_U;
+ _glfw.wl.keycodes[KEY_I] = GLFW_KEY_I;
+ _glfw.wl.keycodes[KEY_O] = GLFW_KEY_O;
+ _glfw.wl.keycodes[KEY_P] = GLFW_KEY_P;
+ _glfw.wl.keycodes[KEY_LEFTBRACE] = GLFW_KEY_LEFT_BRACKET;
+ _glfw.wl.keycodes[KEY_RIGHTBRACE] = GLFW_KEY_RIGHT_BRACKET;
+ _glfw.wl.keycodes[KEY_A] = GLFW_KEY_A;
+ _glfw.wl.keycodes[KEY_S] = GLFW_KEY_S;
+ _glfw.wl.keycodes[KEY_D] = GLFW_KEY_D;
+ _glfw.wl.keycodes[KEY_F] = GLFW_KEY_F;
+ _glfw.wl.keycodes[KEY_G] = GLFW_KEY_G;
+ _glfw.wl.keycodes[KEY_H] = GLFW_KEY_H;
+ _glfw.wl.keycodes[KEY_J] = GLFW_KEY_J;
+ _glfw.wl.keycodes[KEY_K] = GLFW_KEY_K;
+ _glfw.wl.keycodes[KEY_L] = GLFW_KEY_L;
+ _glfw.wl.keycodes[KEY_SEMICOLON] = GLFW_KEY_SEMICOLON;
+ _glfw.wl.keycodes[KEY_APOSTROPHE] = GLFW_KEY_APOSTROPHE;
+ _glfw.wl.keycodes[KEY_Z] = GLFW_KEY_Z;
+ _glfw.wl.keycodes[KEY_X] = GLFW_KEY_X;
+ _glfw.wl.keycodes[KEY_C] = GLFW_KEY_C;
+ _glfw.wl.keycodes[KEY_V] = GLFW_KEY_V;
+ _glfw.wl.keycodes[KEY_B] = GLFW_KEY_B;
+ _glfw.wl.keycodes[KEY_N] = GLFW_KEY_N;
+ _glfw.wl.keycodes[KEY_M] = GLFW_KEY_M;
+ _glfw.wl.keycodes[KEY_COMMA] = GLFW_KEY_COMMA;
+ _glfw.wl.keycodes[KEY_DOT] = GLFW_KEY_PERIOD;
+ _glfw.wl.keycodes[KEY_SLASH] = GLFW_KEY_SLASH;
+ _glfw.wl.keycodes[KEY_BACKSLASH] = GLFW_KEY_BACKSLASH;
+ _glfw.wl.keycodes[KEY_ESC] = GLFW_KEY_ESCAPE;
+ _glfw.wl.keycodes[KEY_TAB] = GLFW_KEY_TAB;
+ _glfw.wl.keycodes[KEY_LEFTSHIFT] = GLFW_KEY_LEFT_SHIFT;
+ _glfw.wl.keycodes[KEY_RIGHTSHIFT] = GLFW_KEY_RIGHT_SHIFT;
+ _glfw.wl.keycodes[KEY_LEFTCTRL] = GLFW_KEY_LEFT_CONTROL;
+ _glfw.wl.keycodes[KEY_RIGHTCTRL] = GLFW_KEY_RIGHT_CONTROL;
+ _glfw.wl.keycodes[KEY_LEFTALT] = GLFW_KEY_LEFT_ALT;
+ _glfw.wl.keycodes[KEY_RIGHTALT] = GLFW_KEY_RIGHT_ALT;
+ _glfw.wl.keycodes[KEY_LEFTMETA] = GLFW_KEY_LEFT_SUPER;
+ _glfw.wl.keycodes[KEY_RIGHTMETA] = GLFW_KEY_RIGHT_SUPER;
+ _glfw.wl.keycodes[KEY_MENU] = GLFW_KEY_MENU;
+ _glfw.wl.keycodes[KEY_NUMLOCK] = GLFW_KEY_NUM_LOCK;
+ _glfw.wl.keycodes[KEY_CAPSLOCK] = GLFW_KEY_CAPS_LOCK;
+ _glfw.wl.keycodes[KEY_PRINT] = GLFW_KEY_PRINT_SCREEN;
+ _glfw.wl.keycodes[KEY_SCROLLLOCK] = GLFW_KEY_SCROLL_LOCK;
+ _glfw.wl.keycodes[KEY_PAUSE] = GLFW_KEY_PAUSE;
+ _glfw.wl.keycodes[KEY_DELETE] = GLFW_KEY_DELETE;
+ _glfw.wl.keycodes[KEY_BACKSPACE] = GLFW_KEY_BACKSPACE;
+ _glfw.wl.keycodes[KEY_ENTER] = GLFW_KEY_ENTER;
+ _glfw.wl.keycodes[KEY_HOME] = GLFW_KEY_HOME;
+ _glfw.wl.keycodes[KEY_END] = GLFW_KEY_END;
+ _glfw.wl.keycodes[KEY_PAGEUP] = GLFW_KEY_PAGE_UP;
+ _glfw.wl.keycodes[KEY_PAGEDOWN] = GLFW_KEY_PAGE_DOWN;
+ _glfw.wl.keycodes[KEY_INSERT] = GLFW_KEY_INSERT;
+ _glfw.wl.keycodes[KEY_LEFT] = GLFW_KEY_LEFT;
+ _glfw.wl.keycodes[KEY_RIGHT] = GLFW_KEY_RIGHT;
+ _glfw.wl.keycodes[KEY_DOWN] = GLFW_KEY_DOWN;
+ _glfw.wl.keycodes[KEY_UP] = GLFW_KEY_UP;
+ _glfw.wl.keycodes[KEY_F1] = GLFW_KEY_F1;
+ _glfw.wl.keycodes[KEY_F2] = GLFW_KEY_F2;
+ _glfw.wl.keycodes[KEY_F3] = GLFW_KEY_F3;
+ _glfw.wl.keycodes[KEY_F4] = GLFW_KEY_F4;
+ _glfw.wl.keycodes[KEY_F5] = GLFW_KEY_F5;
+ _glfw.wl.keycodes[KEY_F6] = GLFW_KEY_F6;
+ _glfw.wl.keycodes[KEY_F7] = GLFW_KEY_F7;
+ _glfw.wl.keycodes[KEY_F8] = GLFW_KEY_F8;
+ _glfw.wl.keycodes[KEY_F9] = GLFW_KEY_F9;
+ _glfw.wl.keycodes[KEY_F10] = GLFW_KEY_F10;
+ _glfw.wl.keycodes[KEY_F11] = GLFW_KEY_F11;
+ _glfw.wl.keycodes[KEY_F12] = GLFW_KEY_F12;
+ _glfw.wl.keycodes[KEY_F13] = GLFW_KEY_F13;
+ _glfw.wl.keycodes[KEY_F14] = GLFW_KEY_F14;
+ _glfw.wl.keycodes[KEY_F15] = GLFW_KEY_F15;
+ _glfw.wl.keycodes[KEY_F16] = GLFW_KEY_F16;
+ _glfw.wl.keycodes[KEY_F17] = GLFW_KEY_F17;
+ _glfw.wl.keycodes[KEY_F18] = GLFW_KEY_F18;
+ _glfw.wl.keycodes[KEY_F19] = GLFW_KEY_F19;
+ _glfw.wl.keycodes[KEY_F20] = GLFW_KEY_F20;
+ _glfw.wl.keycodes[KEY_F21] = GLFW_KEY_F21;
+ _glfw.wl.keycodes[KEY_F22] = GLFW_KEY_F22;
+ _glfw.wl.keycodes[KEY_F23] = GLFW_KEY_F23;
+ _glfw.wl.keycodes[KEY_F24] = GLFW_KEY_F24;
+ _glfw.wl.keycodes[KEY_KPSLASH] = GLFW_KEY_KP_DIVIDE;
+ _glfw.wl.keycodes[KEY_KPDOT] = GLFW_KEY_KP_MULTIPLY;
+ _glfw.wl.keycodes[KEY_KPMINUS] = GLFW_KEY_KP_SUBTRACT;
+ _glfw.wl.keycodes[KEY_KPPLUS] = GLFW_KEY_KP_ADD;
+ _glfw.wl.keycodes[KEY_KP0] = GLFW_KEY_KP_0;
+ _glfw.wl.keycodes[KEY_KP1] = GLFW_KEY_KP_1;
+ _glfw.wl.keycodes[KEY_KP2] = GLFW_KEY_KP_2;
+ _glfw.wl.keycodes[KEY_KP3] = GLFW_KEY_KP_3;
+ _glfw.wl.keycodes[KEY_KP4] = GLFW_KEY_KP_4;
+ _glfw.wl.keycodes[KEY_KP5] = GLFW_KEY_KP_5;
+ _glfw.wl.keycodes[KEY_KP6] = GLFW_KEY_KP_6;
+ _glfw.wl.keycodes[KEY_KP7] = GLFW_KEY_KP_7;
+ _glfw.wl.keycodes[KEY_KP8] = GLFW_KEY_KP_8;
+ _glfw.wl.keycodes[KEY_KP9] = GLFW_KEY_KP_9;
+ _glfw.wl.keycodes[KEY_KPCOMMA] = GLFW_KEY_KP_DECIMAL;
+ _glfw.wl.keycodes[KEY_KPEQUAL] = GLFW_KEY_KP_EQUAL;
+ _glfw.wl.keycodes[KEY_KPENTER] = GLFW_KEY_KP_ENTER;
+
+ for (scancode = 0; scancode < 256; scancode++)
+ {
+ if (_glfw.wl.keycodes[scancode] > 0)
+ _glfw.wl.scancodes[_glfw.wl.keycodes[scancode]] = scancode;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformInit(void)
+{
+ const char *cursorTheme;
+ const char *cursorSizeStr;
+ char *cursorSizeEnd;
+ long cursorSizeLong;
+ int cursorSize;
+
+ _glfw.wl.cursor.handle = _glfw_dlopen("libwayland-cursor.so.0");
+ if (!_glfw.wl.cursor.handle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to open libwayland-cursor");
+ return GLFW_FALSE;
+ }
+
+ _glfw.wl.cursor.theme_load = (PFN_wl_cursor_theme_load)
+ _glfw_dlsym(_glfw.wl.cursor.handle, "wl_cursor_theme_load");
+ _glfw.wl.cursor.theme_destroy = (PFN_wl_cursor_theme_destroy)
+ _glfw_dlsym(_glfw.wl.cursor.handle, "wl_cursor_theme_destroy");
+ _glfw.wl.cursor.theme_get_cursor = (PFN_wl_cursor_theme_get_cursor)
+ _glfw_dlsym(_glfw.wl.cursor.handle, "wl_cursor_theme_get_cursor");
+ _glfw.wl.cursor.image_get_buffer = (PFN_wl_cursor_image_get_buffer)
+ _glfw_dlsym(_glfw.wl.cursor.handle, "wl_cursor_image_get_buffer");
+
+ _glfw.wl.egl.handle = _glfw_dlopen("libwayland-egl.so.1");
+ if (!_glfw.wl.egl.handle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to open libwayland-egl");
+ return GLFW_FALSE;
+ }
+
+ _glfw.wl.egl.window_create = (PFN_wl_egl_window_create)
+ _glfw_dlsym(_glfw.wl.egl.handle, "wl_egl_window_create");
+ _glfw.wl.egl.window_destroy = (PFN_wl_egl_window_destroy)
+ _glfw_dlsym(_glfw.wl.egl.handle, "wl_egl_window_destroy");
+ _glfw.wl.egl.window_resize = (PFN_wl_egl_window_resize)
+ _glfw_dlsym(_glfw.wl.egl.handle, "wl_egl_window_resize");
+
+ _glfw.wl.xkb.handle = _glfw_dlopen("libxkbcommon.so.0");
+ if (!_glfw.wl.xkb.handle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to open libxkbcommon");
+ return GLFW_FALSE;
+ }
+
+ _glfw.wl.xkb.context_new = (PFN_xkb_context_new)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_context_new");
+ _glfw.wl.xkb.context_unref = (PFN_xkb_context_unref)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_context_unref");
+ _glfw.wl.xkb.keymap_new_from_string = (PFN_xkb_keymap_new_from_string)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_keymap_new_from_string");
+ _glfw.wl.xkb.keymap_unref = (PFN_xkb_keymap_unref)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_keymap_unref");
+ _glfw.wl.xkb.keymap_mod_get_index = (PFN_xkb_keymap_mod_get_index)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_keymap_mod_get_index");
+ _glfw.wl.xkb.keymap_key_repeats = (PFN_xkb_keymap_key_repeats)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_keymap_key_repeats");
+ _glfw.wl.xkb.state_new = (PFN_xkb_state_new)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_state_new");
+ _glfw.wl.xkb.state_unref = (PFN_xkb_state_unref)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_state_unref");
+ _glfw.wl.xkb.state_key_get_syms = (PFN_xkb_state_key_get_syms)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_state_key_get_syms");
+ _glfw.wl.xkb.state_update_mask = (PFN_xkb_state_update_mask)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_state_update_mask");
+ _glfw.wl.xkb.state_serialize_mods = (PFN_xkb_state_serialize_mods)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_state_serialize_mods");
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ _glfw.wl.xkb.compose_table_new_from_locale = (PFN_xkb_compose_table_new_from_locale)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_table_new_from_locale");
+ _glfw.wl.xkb.compose_table_unref = (PFN_xkb_compose_table_unref)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_table_unref");
+ _glfw.wl.xkb.compose_state_new = (PFN_xkb_compose_state_new)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_state_new");
+ _glfw.wl.xkb.compose_state_unref = (PFN_xkb_compose_state_unref)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_state_unref");
+ _glfw.wl.xkb.compose_state_feed = (PFN_xkb_compose_state_feed)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_state_feed");
+ _glfw.wl.xkb.compose_state_get_status = (PFN_xkb_compose_state_get_status)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_state_get_status");
+ _glfw.wl.xkb.compose_state_get_one_sym = (PFN_xkb_compose_state_get_one_sym)
+ _glfw_dlsym(_glfw.wl.xkb.handle, "xkb_compose_state_get_one_sym");
+#endif
+
+ _glfw.wl.display = wl_display_connect(NULL);
+ if (!_glfw.wl.display)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to connect to display");
+ return GLFW_FALSE;
+ }
+
+ _glfw.wl.registry = wl_display_get_registry(_glfw.wl.display);
+ wl_registry_add_listener(_glfw.wl.registry, &registryListener, NULL);
+
+ createKeyTables();
+
+ _glfw.wl.xkb.context = xkb_context_new(0);
+ if (!_glfw.wl.xkb.context)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to initialize xkb context");
+ return GLFW_FALSE;
+ }
+
+ // Sync so we got all registry objects
+ wl_display_roundtrip(_glfw.wl.display);
+
+ // Sync so we got all initial output events
+ wl_display_roundtrip(_glfw.wl.display);
+
+#ifdef __linux__
+ if (!_glfwInitJoysticksLinux())
+ return GLFW_FALSE;
+#endif
+
+ _glfwInitTimerPOSIX();
+
+ _glfw.wl.timerfd = -1;
+ if (_glfw.wl.seatVersion >= 4)
+ _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
+
+ if (_glfw.wl.pointer && _glfw.wl.shm)
+ {
+ cursorTheme = getenv("XCURSOR_THEME");
+ cursorSizeStr = getenv("XCURSOR_SIZE");
+ cursorSize = 32;
+ if (cursorSizeStr)
+ {
+ errno = 0;
+ cursorSizeLong = strtol(cursorSizeStr, &cursorSizeEnd, 10);
+ if (!*cursorSizeEnd && !errno && cursorSizeLong > 0 && cursorSizeLong <= INT_MAX)
+ cursorSize = (int)cursorSizeLong;
+ }
+ _glfw.wl.cursorTheme =
+ wl_cursor_theme_load(cursorTheme, cursorSize, _glfw.wl.shm);
+ if (!_glfw.wl.cursorTheme)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Unable to load default cursor theme");
+ return GLFW_FALSE;
+ }
+ // If this happens to be NULL, we just fallback to the scale=1 version.
+ _glfw.wl.cursorThemeHiDPI =
+ wl_cursor_theme_load(cursorTheme, 2 * cursorSize, _glfw.wl.shm);
+ _glfw.wl.cursorSurface =
+ wl_compositor_create_surface(_glfw.wl.compositor);
+ _glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
+ }
+
+ if (_glfw.wl.seat && _glfw.wl.dataDeviceManager)
+ {
+ _glfw.wl.dataDevice =
+ wl_data_device_manager_get_data_device(_glfw.wl.dataDeviceManager,
+ _glfw.wl.seat);
+ wl_data_device_add_listener(_glfw.wl.dataDevice, &dataDeviceListener, NULL);
+ _glfw.wl.clipboardString = malloc(4096);
+ if (!_glfw.wl.clipboardString)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Unable to allocate clipboard memory");
+ return GLFW_FALSE;
+ }
+ _glfw.wl.clipboardSize = 4096;
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformTerminate(void)
+{
+#ifdef __linux__
+ _glfwTerminateJoysticksLinux();
+#endif
+ _glfwTerminateEGL();
+ if (_glfw.wl.egl.handle)
+ {
+ _glfw_dlclose(_glfw.wl.egl.handle);
+ _glfw.wl.egl.handle = NULL;
+ }
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ if (_glfw.wl.xkb.composeState)
+ xkb_compose_state_unref(_glfw.wl.xkb.composeState);
+#endif
+ if (_glfw.wl.xkb.keymap)
+ xkb_keymap_unref(_glfw.wl.xkb.keymap);
+ if (_glfw.wl.xkb.state)
+ xkb_state_unref(_glfw.wl.xkb.state);
+ if (_glfw.wl.xkb.context)
+ xkb_context_unref(_glfw.wl.xkb.context);
+ if (_glfw.wl.xkb.handle)
+ {
+ _glfw_dlclose(_glfw.wl.xkb.handle);
+ _glfw.wl.xkb.handle = NULL;
+ }
+
+ if (_glfw.wl.cursorTheme)
+ wl_cursor_theme_destroy(_glfw.wl.cursorTheme);
+ if (_glfw.wl.cursorThemeHiDPI)
+ wl_cursor_theme_destroy(_glfw.wl.cursorThemeHiDPI);
+ if (_glfw.wl.cursor.handle)
+ {
+ _glfw_dlclose(_glfw.wl.cursor.handle);
+ _glfw.wl.cursor.handle = NULL;
+ }
+
+ if (_glfw.wl.cursorSurface)
+ wl_surface_destroy(_glfw.wl.cursorSurface);
+ if (_glfw.wl.subcompositor)
+ wl_subcompositor_destroy(_glfw.wl.subcompositor);
+ if (_glfw.wl.compositor)
+ wl_compositor_destroy(_glfw.wl.compositor);
+ if (_glfw.wl.shm)
+ wl_shm_destroy(_glfw.wl.shm);
+ if (_glfw.wl.shell)
+ wl_shell_destroy(_glfw.wl.shell);
+ if (_glfw.wl.viewporter)
+ wp_viewporter_destroy(_glfw.wl.viewporter);
+ if (_glfw.wl.decorationManager)
+ zxdg_decoration_manager_v1_destroy(_glfw.wl.decorationManager);
+ if (_glfw.wl.wmBase)
+ xdg_wm_base_destroy(_glfw.wl.wmBase);
+ if (_glfw.wl.dataSource)
+ wl_data_source_destroy(_glfw.wl.dataSource);
+ if (_glfw.wl.dataDevice)
+ wl_data_device_destroy(_glfw.wl.dataDevice);
+ if (_glfw.wl.dataOffer)
+ wl_data_offer_destroy(_glfw.wl.dataOffer);
+ if (_glfw.wl.dataDeviceManager)
+ wl_data_device_manager_destroy(_glfw.wl.dataDeviceManager);
+ if (_glfw.wl.pointer)
+ wl_pointer_destroy(_glfw.wl.pointer);
+ if (_glfw.wl.keyboard)
+ wl_keyboard_destroy(_glfw.wl.keyboard);
+ if (_glfw.wl.seat)
+ wl_seat_destroy(_glfw.wl.seat);
+ if (_glfw.wl.relativePointerManager)
+ zwp_relative_pointer_manager_v1_destroy(_glfw.wl.relativePointerManager);
+ if (_glfw.wl.pointerConstraints)
+ zwp_pointer_constraints_v1_destroy(_glfw.wl.pointerConstraints);
+ if (_glfw.wl.idleInhibitManager)
+ zwp_idle_inhibit_manager_v1_destroy(_glfw.wl.idleInhibitManager);
+ if (_glfw.wl.registry)
+ wl_registry_destroy(_glfw.wl.registry);
+ if (_glfw.wl.display)
+ {
+ wl_display_flush(_glfw.wl.display);
+ wl_display_disconnect(_glfw.wl.display);
+ }
+
+ if (_glfw.wl.timerfd >= 0)
+ close(_glfw.wl.timerfd);
+ if (_glfw.wl.cursorTimerfd >= 0)
+ close(_glfw.wl.cursorTimerfd);
+
+ if (_glfw.wl.clipboardString)
+ free(_glfw.wl.clipboardString);
+ if (_glfw.wl.clipboardSendString)
+ free(_glfw.wl.clipboardSendString);
+}
+
+const char* _glfwPlatformGetVersionString(void)
+{
+ return _GLFW_VERSION_NUMBER " Wayland EGL OSMesa"
+#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
+ " clock_gettime"
+#else
+ " gettimeofday"
+#endif
+ " evdev"
+#if defined(_GLFW_BUILD_DLL)
+ " shared"
+#endif
+ ;
+}
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_monitor.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_monitor.c
new file mode 100644
index 0000000..d1448a2
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_monitor.c
@@ -0,0 +1,231 @@
+//========================================================================
+// GLFW 3.3 Wayland - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <math.h>
+
+
+static void outputHandleGeometry(void* data,
+ struct wl_output* output,
+ int32_t x,
+ int32_t y,
+ int32_t physicalWidth,
+ int32_t physicalHeight,
+ int32_t subpixel,
+ const char* make,
+ const char* model,
+ int32_t transform)
+{
+ struct _GLFWmonitor *monitor = data;
+
+ monitor->wl.x = x;
+ monitor->wl.y = y;
+ monitor->widthMM = physicalWidth;
+ monitor->heightMM = physicalHeight;
+
+ snprintf(monitor->name, sizeof(monitor->name), "%s %s", make, model);
+}
+
+static void outputHandleMode(void* data,
+ struct wl_output* output,
+ uint32_t flags,
+ int32_t width,
+ int32_t height,
+ int32_t refresh)
+{
+ struct _GLFWmonitor *monitor = data;
+ GLFWvidmode mode;
+
+ mode.width = width;
+ mode.height = height;
+ mode.redBits = 8;
+ mode.greenBits = 8;
+ mode.blueBits = 8;
+ mode.refreshRate = (int) round(refresh / 1000.0);
+
+ monitor->modeCount++;
+ monitor->modes =
+ realloc(monitor->modes, monitor->modeCount * sizeof(GLFWvidmode));
+ monitor->modes[monitor->modeCount - 1] = mode;
+
+ if (flags & WL_OUTPUT_MODE_CURRENT)
+ monitor->wl.currentMode = monitor->modeCount - 1;
+}
+
+static void outputHandleDone(void* data, struct wl_output* output)
+{
+ struct _GLFWmonitor *monitor = data;
+
+ if (monitor->widthMM <= 0 || monitor->heightMM <= 0)
+ {
+ // If Wayland does not provide a physical size, assume the default 96 DPI
+ const GLFWvidmode* mode = &monitor->modes[monitor->wl.currentMode];
+ monitor->widthMM = (int) (mode->width * 25.4f / 96.f);
+ monitor->heightMM = (int) (mode->height * 25.4f / 96.f);
+ }
+
+ _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
+}
+
+static void outputHandleScale(void* data,
+ struct wl_output* output,
+ int32_t factor)
+{
+ struct _GLFWmonitor *monitor = data;
+
+ monitor->wl.scale = factor;
+}
+
+static const struct wl_output_listener outputListener = {
+ outputHandleGeometry,
+ outputHandleMode,
+ outputHandleDone,
+ outputHandleScale,
+};
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwAddOutputWayland(uint32_t name, uint32_t version)
+{
+ _GLFWmonitor *monitor;
+ struct wl_output *output;
+
+ if (version < 2)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Unsupported output interface version");
+ return;
+ }
+
+ // The actual name of this output will be set in the geometry handler.
+ monitor = _glfwAllocMonitor("", 0, 0);
+
+ output = wl_registry_bind(_glfw.wl.registry,
+ name,
+ &wl_output_interface,
+ 2);
+ if (!output)
+ {
+ _glfwFreeMonitor(monitor);
+ return;
+ }
+
+ monitor->wl.scale = 1;
+ monitor->wl.output = output;
+ monitor->wl.name = name;
+
+ wl_output_add_listener(output, &outputListener, monitor);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)
+{
+ if (monitor->wl.output)
+ wl_output_destroy(monitor->wl.output);
+}
+
+void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
+{
+ if (xpos)
+ *xpos = monitor->wl.x;
+ if (ypos)
+ *ypos = monitor->wl.y;
+}
+
+void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
+ float* xscale, float* yscale)
+{
+ if (xscale)
+ *xscale = (float) monitor->wl.scale;
+ if (yscale)
+ *yscale = (float) monitor->wl.scale;
+}
+
+void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
+ int* xpos, int* ypos,
+ int* width, int* height)
+{
+ if (xpos)
+ *xpos = monitor->wl.x;
+ if (ypos)
+ *ypos = monitor->wl.y;
+ if (width)
+ *width = monitor->modes[monitor->wl.currentMode].width;
+ if (height)
+ *height = monitor->modes[monitor->wl.currentMode].height;
+}
+
+GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
+{
+ *found = monitor->modeCount;
+ return monitor->modes;
+}
+
+void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
+{
+ *mode = monitor->modes[monitor->wl.currentMode];
+}
+
+GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
+{
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Gamma ramp access is not available");
+ return GLFW_FALSE;
+}
+
+void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor,
+ const GLFWgammaramp* ramp)
+{
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Gamma ramp access is not available");
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return monitor->wl.output;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_platform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_platform.h
new file mode 100644
index 0000000..135fe42
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_platform.h
@@ -0,0 +1,355 @@
+//========================================================================
+// GLFW 3.3 Wayland - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <wayland-client.h>
+#include <xkbcommon/xkbcommon.h>
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+#include <xkbcommon/xkbcommon-compose.h>
+#endif
+#include <dlfcn.h>
+
+typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
+
+typedef struct VkWaylandSurfaceCreateInfoKHR
+{
+ VkStructureType sType;
+ const void* pNext;
+ VkWaylandSurfaceCreateFlagsKHR flags;
+ struct wl_display* display;
+ struct wl_surface* surface;
+} VkWaylandSurfaceCreateInfoKHR;
+
+typedef VkResult (APIENTRY *PFN_vkCreateWaylandSurfaceKHR)(VkInstance,const VkWaylandSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
+typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice,uint32_t,struct wl_display*);
+
+#include "posix_thread.h"
+#include "posix_time.h"
+#ifdef __linux__
+#include "linux_joystick.h"
+#else
+#include "null_joystick.h"
+#endif
+#include "xkb_unicode.h"
+#include "egl_context.h"
+#include "osmesa_context.h"
+
+#include "wayland-xdg-shell-client-protocol.h"
+#include "wayland-xdg-decoration-client-protocol.h"
+#include "wayland-viewporter-client-protocol.h"
+#include "wayland-relative-pointer-unstable-v1-client-protocol.h"
+#include "wayland-pointer-constraints-unstable-v1-client-protocol.h"
+#include "wayland-idle-inhibit-unstable-v1-client-protocol.h"
+
+#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
+#define _glfw_dlclose(handle) dlclose(handle)
+#define _glfw_dlsym(handle, name) dlsym(handle, name)
+
+#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->wl.native)
+#define _GLFW_EGL_NATIVE_DISPLAY ((EGLNativeDisplayType) _glfw.wl.display)
+
+#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWayland wl
+#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWayland wl
+#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorWayland wl
+#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorWayland wl
+
+#define _GLFW_PLATFORM_CONTEXT_STATE struct { int dummyContext; }
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; }
+
+struct wl_cursor_image {
+ uint32_t width;
+ uint32_t height;
+ uint32_t hotspot_x;
+ uint32_t hotspot_y;
+ uint32_t delay;
+};
+struct wl_cursor {
+ unsigned int image_count;
+ struct wl_cursor_image** images;
+ char* name;
+};
+typedef struct wl_cursor_theme* (* PFN_wl_cursor_theme_load)(const char*, int, struct wl_shm*);
+typedef void (* PFN_wl_cursor_theme_destroy)(struct wl_cursor_theme*);
+typedef struct wl_cursor* (* PFN_wl_cursor_theme_get_cursor)(struct wl_cursor_theme*, const char*);
+typedef struct wl_buffer* (* PFN_wl_cursor_image_get_buffer)(struct wl_cursor_image*);
+#define wl_cursor_theme_load _glfw.wl.cursor.theme_load
+#define wl_cursor_theme_destroy _glfw.wl.cursor.theme_destroy
+#define wl_cursor_theme_get_cursor _glfw.wl.cursor.theme_get_cursor
+#define wl_cursor_image_get_buffer _glfw.wl.cursor.image_get_buffer
+
+typedef struct wl_egl_window* (* PFN_wl_egl_window_create)(struct wl_surface*, int, int);
+typedef void (* PFN_wl_egl_window_destroy)(struct wl_egl_window*);
+typedef void (* PFN_wl_egl_window_resize)(struct wl_egl_window*, int, int, int, int);
+#define wl_egl_window_create _glfw.wl.egl.window_create
+#define wl_egl_window_destroy _glfw.wl.egl.window_destroy
+#define wl_egl_window_resize _glfw.wl.egl.window_resize
+
+typedef struct xkb_context* (* PFN_xkb_context_new)(enum xkb_context_flags);
+typedef void (* PFN_xkb_context_unref)(struct xkb_context*);
+typedef struct xkb_keymap* (* PFN_xkb_keymap_new_from_string)(struct xkb_context*, const char*, enum xkb_keymap_format, enum xkb_keymap_compile_flags);
+typedef void (* PFN_xkb_keymap_unref)(struct xkb_keymap*);
+typedef xkb_mod_index_t (* PFN_xkb_keymap_mod_get_index)(struct xkb_keymap*, const char*);
+typedef int (* PFN_xkb_keymap_key_repeats)(struct xkb_keymap*, xkb_keycode_t);
+typedef struct xkb_state* (* PFN_xkb_state_new)(struct xkb_keymap*);
+typedef void (* PFN_xkb_state_unref)(struct xkb_state*);
+typedef int (* PFN_xkb_state_key_get_syms)(struct xkb_state*, xkb_keycode_t, const xkb_keysym_t**);
+typedef enum xkb_state_component (* PFN_xkb_state_update_mask)(struct xkb_state*, xkb_mod_mask_t, xkb_mod_mask_t, xkb_mod_mask_t, xkb_layout_index_t, xkb_layout_index_t, xkb_layout_index_t);
+typedef xkb_mod_mask_t (* PFN_xkb_state_serialize_mods)(struct xkb_state*, enum xkb_state_component);
+#define xkb_context_new _glfw.wl.xkb.context_new
+#define xkb_context_unref _glfw.wl.xkb.context_unref
+#define xkb_keymap_new_from_string _glfw.wl.xkb.keymap_new_from_string
+#define xkb_keymap_unref _glfw.wl.xkb.keymap_unref
+#define xkb_keymap_mod_get_index _glfw.wl.xkb.keymap_mod_get_index
+#define xkb_keymap_key_repeats _glfw.wl.xkb.keymap_key_repeats
+#define xkb_state_new _glfw.wl.xkb.state_new
+#define xkb_state_unref _glfw.wl.xkb.state_unref
+#define xkb_state_key_get_syms _glfw.wl.xkb.state_key_get_syms
+#define xkb_state_update_mask _glfw.wl.xkb.state_update_mask
+#define xkb_state_serialize_mods _glfw.wl.xkb.state_serialize_mods
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+typedef struct xkb_compose_table* (* PFN_xkb_compose_table_new_from_locale)(struct xkb_context*, const char*, enum xkb_compose_compile_flags);
+typedef void (* PFN_xkb_compose_table_unref)(struct xkb_compose_table*);
+typedef struct xkb_compose_state* (* PFN_xkb_compose_state_new)(struct xkb_compose_table*, enum xkb_compose_state_flags);
+typedef void (* PFN_xkb_compose_state_unref)(struct xkb_compose_state*);
+typedef enum xkb_compose_feed_result (* PFN_xkb_compose_state_feed)(struct xkb_compose_state*, xkb_keysym_t);
+typedef enum xkb_compose_status (* PFN_xkb_compose_state_get_status)(struct xkb_compose_state*);
+typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_state*);
+#define xkb_compose_table_new_from_locale _glfw.wl.xkb.compose_table_new_from_locale
+#define xkb_compose_table_unref _glfw.wl.xkb.compose_table_unref
+#define xkb_compose_state_new _glfw.wl.xkb.compose_state_new
+#define xkb_compose_state_unref _glfw.wl.xkb.compose_state_unref
+#define xkb_compose_state_feed _glfw.wl.xkb.compose_state_feed
+#define xkb_compose_state_get_status _glfw.wl.xkb.compose_state_get_status
+#define xkb_compose_state_get_one_sym _glfw.wl.xkb.compose_state_get_one_sym
+#endif
+
+#define _GLFW_DECORATION_WIDTH 4
+#define _GLFW_DECORATION_TOP 24
+#define _GLFW_DECORATION_VERTICAL (_GLFW_DECORATION_TOP + _GLFW_DECORATION_WIDTH)
+#define _GLFW_DECORATION_HORIZONTAL (2 * _GLFW_DECORATION_WIDTH)
+
+typedef enum _GLFWdecorationSideWayland
+{
+ mainWindow,
+ topDecoration,
+ leftDecoration,
+ rightDecoration,
+ bottomDecoration,
+} _GLFWdecorationSideWayland;
+
+typedef struct _GLFWdecorationWayland
+{
+ struct wl_surface* surface;
+ struct wl_subsurface* subsurface;
+ struct wp_viewport* viewport;
+} _GLFWdecorationWayland;
+
+// Wayland-specific per-window data
+//
+typedef struct _GLFWwindowWayland
+{
+ int width, height;
+ GLFWbool visible;
+ GLFWbool maximized;
+ GLFWbool hovered;
+ GLFWbool transparent;
+ struct wl_surface* surface;
+ struct wl_egl_window* native;
+ struct wl_shell_surface* shellSurface;
+ struct wl_callback* callback;
+
+ struct {
+ struct xdg_surface* surface;
+ struct xdg_toplevel* toplevel;
+ struct zxdg_toplevel_decoration_v1* decoration;
+ } xdg;
+
+ _GLFWcursor* currentCursor;
+ double cursorPosX, cursorPosY;
+
+ char* title;
+
+ // We need to track the monitors the window spans on to calculate the
+ // optimal scaling factor.
+ int scale;
+ _GLFWmonitor** monitors;
+ int monitorsCount;
+ int monitorsSize;
+
+ struct {
+ struct zwp_relative_pointer_v1* relativePointer;
+ struct zwp_locked_pointer_v1* lockedPointer;
+ } pointerLock;
+
+ struct zwp_idle_inhibitor_v1* idleInhibitor;
+
+ GLFWbool wasFullscreen;
+
+ struct {
+ GLFWbool serverSide;
+ struct wl_buffer* buffer;
+ _GLFWdecorationWayland top, left, right, bottom;
+ int focus;
+ } decorations;
+} _GLFWwindowWayland;
+
+// Wayland-specific global data
+//
+typedef struct _GLFWlibraryWayland
+{
+ struct wl_display* display;
+ struct wl_registry* registry;
+ struct wl_compositor* compositor;
+ struct wl_subcompositor* subcompositor;
+ struct wl_shell* shell;
+ struct wl_shm* shm;
+ struct wl_seat* seat;
+ struct wl_pointer* pointer;
+ struct wl_keyboard* keyboard;
+ struct wl_data_device_manager* dataDeviceManager;
+ struct wl_data_device* dataDevice;
+ struct wl_data_offer* dataOffer;
+ struct wl_data_source* dataSource;
+ struct xdg_wm_base* wmBase;
+ struct zxdg_decoration_manager_v1* decorationManager;
+ struct wp_viewporter* viewporter;
+ struct zwp_relative_pointer_manager_v1* relativePointerManager;
+ struct zwp_pointer_constraints_v1* pointerConstraints;
+ struct zwp_idle_inhibit_manager_v1* idleInhibitManager;
+
+ int compositorVersion;
+ int seatVersion;
+
+ struct wl_cursor_theme* cursorTheme;
+ struct wl_cursor_theme* cursorThemeHiDPI;
+ struct wl_surface* cursorSurface;
+ const char* cursorPreviousName;
+ int cursorTimerfd;
+ uint32_t serial;
+ uint32_t pointerEnterSerial;
+
+ int32_t keyboardRepeatRate;
+ int32_t keyboardRepeatDelay;
+ int keyboardLastKey;
+ int keyboardLastScancode;
+ char* clipboardString;
+ size_t clipboardSize;
+ char* clipboardSendString;
+ size_t clipboardSendSize;
+ int timerfd;
+ short int keycodes[256];
+ short int scancodes[GLFW_KEY_LAST + 1];
+
+ struct {
+ void* handle;
+ struct xkb_context* context;
+ struct xkb_keymap* keymap;
+ struct xkb_state* state;
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ struct xkb_compose_state* composeState;
+#endif
+
+ xkb_mod_mask_t controlMask;
+ xkb_mod_mask_t altMask;
+ xkb_mod_mask_t shiftMask;
+ xkb_mod_mask_t superMask;
+ xkb_mod_mask_t capsLockMask;
+ xkb_mod_mask_t numLockMask;
+ unsigned int modifiers;
+
+ PFN_xkb_context_new context_new;
+ PFN_xkb_context_unref context_unref;
+ PFN_xkb_keymap_new_from_string keymap_new_from_string;
+ PFN_xkb_keymap_unref keymap_unref;
+ PFN_xkb_keymap_mod_get_index keymap_mod_get_index;
+ PFN_xkb_keymap_key_repeats keymap_key_repeats;
+ PFN_xkb_state_new state_new;
+ PFN_xkb_state_unref state_unref;
+ PFN_xkb_state_key_get_syms state_key_get_syms;
+ PFN_xkb_state_update_mask state_update_mask;
+ PFN_xkb_state_serialize_mods state_serialize_mods;
+
+#ifdef HAVE_XKBCOMMON_COMPOSE_H
+ PFN_xkb_compose_table_new_from_locale compose_table_new_from_locale;
+ PFN_xkb_compose_table_unref compose_table_unref;
+ PFN_xkb_compose_state_new compose_state_new;
+ PFN_xkb_compose_state_unref compose_state_unref;
+ PFN_xkb_compose_state_feed compose_state_feed;
+ PFN_xkb_compose_state_get_status compose_state_get_status;
+ PFN_xkb_compose_state_get_one_sym compose_state_get_one_sym;
+#endif
+ } xkb;
+
+ _GLFWwindow* pointerFocus;
+ _GLFWwindow* keyboardFocus;
+
+ struct {
+ void* handle;
+
+ PFN_wl_cursor_theme_load theme_load;
+ PFN_wl_cursor_theme_destroy theme_destroy;
+ PFN_wl_cursor_theme_get_cursor theme_get_cursor;
+ PFN_wl_cursor_image_get_buffer image_get_buffer;
+ } cursor;
+
+ struct {
+ void* handle;
+
+ PFN_wl_egl_window_create window_create;
+ PFN_wl_egl_window_destroy window_destroy;
+ PFN_wl_egl_window_resize window_resize;
+ } egl;
+} _GLFWlibraryWayland;
+
+// Wayland-specific per-monitor data
+//
+typedef struct _GLFWmonitorWayland
+{
+ struct wl_output* output;
+ uint32_t name;
+ int currentMode;
+
+ int x;
+ int y;
+ int scale;
+} _GLFWmonitorWayland;
+
+// Wayland-specific per-cursor data
+//
+typedef struct _GLFWcursorWayland
+{
+ struct wl_cursor* cursor;
+ struct wl_cursor* cursorHiDPI;
+ struct wl_buffer* buffer;
+ int width, height;
+ int xhot, yhot;
+ int currentImage;
+} _GLFWcursorWayland;
+
+
+void _glfwAddOutputWayland(uint32_t name, uint32_t version);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_window.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_window.c
new file mode 100644
index 0000000..db32f44
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_window.c
@@ -0,0 +1,1903 @@
+//========================================================================
+// GLFW 3.3 Wayland - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#define _GNU_SOURCE
+
+#include "internal.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/timerfd.h>
+#include <poll.h>
+
+
+static void shellSurfaceHandlePing(void* data,
+ struct wl_shell_surface* shellSurface,
+ uint32_t serial)
+{
+ wl_shell_surface_pong(shellSurface, serial);
+}
+
+static void shellSurfaceHandleConfigure(void* data,
+ struct wl_shell_surface* shellSurface,
+ uint32_t edges,
+ int32_t width,
+ int32_t height)
+{
+ _GLFWwindow* window = data;
+ float aspectRatio;
+ float targetRatio;
+
+ if (!window->monitor)
+ {
+ if (_glfw.wl.viewporter && window->decorated)
+ {
+ width -= _GLFW_DECORATION_HORIZONTAL;
+ height -= _GLFW_DECORATION_VERTICAL;
+ }
+ if (width < 1)
+ width = 1;
+ if (height < 1)
+ height = 1;
+
+ if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)
+ {
+ aspectRatio = (float)width / (float)height;
+ targetRatio = (float)window->numer / (float)window->denom;
+ if (aspectRatio < targetRatio)
+ height = width / targetRatio;
+ else if (aspectRatio > targetRatio)
+ width = height * targetRatio;
+ }
+
+ if (window->minwidth != GLFW_DONT_CARE && width < window->minwidth)
+ width = window->minwidth;
+ else if (window->maxwidth != GLFW_DONT_CARE && width > window->maxwidth)
+ width = window->maxwidth;
+
+ if (window->minheight != GLFW_DONT_CARE && height < window->minheight)
+ height = window->minheight;
+ else if (window->maxheight != GLFW_DONT_CARE && height > window->maxheight)
+ height = window->maxheight;
+ }
+
+ _glfwInputWindowSize(window, width, height);
+ _glfwPlatformSetWindowSize(window, width, height);
+ _glfwInputWindowDamage(window);
+}
+
+static void shellSurfaceHandlePopupDone(void* data,
+ struct wl_shell_surface* shellSurface)
+{
+}
+
+static const struct wl_shell_surface_listener shellSurfaceListener = {
+ shellSurfaceHandlePing,
+ shellSurfaceHandleConfigure,
+ shellSurfaceHandlePopupDone
+};
+
+static int createTmpfileCloexec(char* tmpname)
+{
+ int fd;
+
+ fd = mkostemp(tmpname, O_CLOEXEC);
+ if (fd >= 0)
+ unlink(tmpname);
+
+ return fd;
+}
+
+/*
+ * Create a new, unique, anonymous file of the given size, and
+ * return the file descriptor for it. The file descriptor is set
+ * CLOEXEC. The file is immediately suitable for mmap()'ing
+ * the given size at offset zero.
+ *
+ * The file should not have a permanent backing store like a disk,
+ * but may have if XDG_RUNTIME_DIR is not properly implemented in OS.
+ *
+ * The file name is deleted from the file system.
+ *
+ * The file is suitable for buffer sharing between processes by
+ * transmitting the file descriptor over Unix sockets using the
+ * SCM_RIGHTS methods.
+ *
+ * posix_fallocate() is used to guarantee that disk space is available
+ * for the file at the given size. If disk space is insufficient, errno
+ * is set to ENOSPC. If posix_fallocate() is not supported, program may
+ * receive SIGBUS on accessing mmap()'ed file contents instead.
+ */
+static int createAnonymousFile(off_t size)
+{
+ static const char template[] = "/glfw-shared-XXXXXX";
+ const char* path;
+ char* name;
+ int fd;
+ int ret;
+
+#ifdef HAVE_MEMFD_CREATE
+ fd = memfd_create("glfw-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
+ if (fd >= 0)
+ {
+ // We can add this seal before calling posix_fallocate(), as the file
+ // is currently zero-sized anyway.
+ //
+ // There is also no need to check for the return value, we couldn’t do
+ // anything with it anyway.
+ fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
+ }
+ else
+#elif defined(SHM_ANON)
+ fd = shm_open(SHM_ANON, O_RDWR | O_CLOEXEC, 0600);
+ if (fd < 0)
+#endif
+ {
+ path = getenv("XDG_RUNTIME_DIR");
+ if (!path)
+ {
+ errno = ENOENT;
+ return -1;
+ }
+
+ name = calloc(strlen(path) + sizeof(template), 1);
+ strcpy(name, path);
+ strcat(name, template);
+
+ fd = createTmpfileCloexec(name);
+ free(name);
+ if (fd < 0)
+ return -1;
+ }
+
+#if defined(SHM_ANON)
+ // posix_fallocate does not work on SHM descriptors
+ ret = ftruncate(fd, size);
+#else
+ ret = posix_fallocate(fd, 0, size);
+#endif
+ if (ret != 0)
+ {
+ close(fd);
+ errno = ret;
+ return -1;
+ }
+ return fd;
+}
+
+static struct wl_buffer* createShmBuffer(const GLFWimage* image)
+{
+ struct wl_shm_pool* pool;
+ struct wl_buffer* buffer;
+ int stride = image->width * 4;
+ int length = image->width * image->height * 4;
+ void* data;
+ int fd, i;
+
+ fd = createAnonymousFile(length);
+ if (fd < 0)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Creating a buffer file for %d B failed: %s",
+ length, strerror(errno));
+ return NULL;
+ }
+
+ data = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ if (data == MAP_FAILED)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: mmap failed: %s", strerror(errno));
+ close(fd);
+ return NULL;
+ }
+
+ pool = wl_shm_create_pool(_glfw.wl.shm, fd, length);
+
+ close(fd);
+ unsigned char* source = (unsigned char*) image->pixels;
+ unsigned char* target = data;
+ for (i = 0; i < image->width * image->height; i++, source += 4)
+ {
+ unsigned int alpha = source[3];
+
+ *target++ = (unsigned char) ((source[2] * alpha) / 255);
+ *target++ = (unsigned char) ((source[1] * alpha) / 255);
+ *target++ = (unsigned char) ((source[0] * alpha) / 255);
+ *target++ = (unsigned char) alpha;
+ }
+
+ buffer =
+ wl_shm_pool_create_buffer(pool, 0,
+ image->width,
+ image->height,
+ stride, WL_SHM_FORMAT_ARGB8888);
+ munmap(data, length);
+ wl_shm_pool_destroy(pool);
+
+ return buffer;
+}
+
+static void createDecoration(_GLFWdecorationWayland* decoration,
+ struct wl_surface* parent,
+ struct wl_buffer* buffer, GLFWbool opaque,
+ int x, int y,
+ int width, int height)
+{
+ struct wl_region* region;
+
+ decoration->surface = wl_compositor_create_surface(_glfw.wl.compositor);
+ decoration->subsurface =
+ wl_subcompositor_get_subsurface(_glfw.wl.subcompositor,
+ decoration->surface, parent);
+ wl_subsurface_set_position(decoration->subsurface, x, y);
+ decoration->viewport = wp_viewporter_get_viewport(_glfw.wl.viewporter,
+ decoration->surface);
+ wp_viewport_set_destination(decoration->viewport, width, height);
+ wl_surface_attach(decoration->surface, buffer, 0, 0);
+
+ if (opaque)
+ {
+ region = wl_compositor_create_region(_glfw.wl.compositor);
+ wl_region_add(region, 0, 0, width, height);
+ wl_surface_set_opaque_region(decoration->surface, region);
+ wl_surface_commit(decoration->surface);
+ wl_region_destroy(region);
+ }
+ else
+ wl_surface_commit(decoration->surface);
+}
+
+static void createDecorations(_GLFWwindow* window)
+{
+ unsigned char data[] = { 224, 224, 224, 255 };
+ const GLFWimage image = { 1, 1, data };
+ GLFWbool opaque = (data[3] == 255);
+
+ if (!_glfw.wl.viewporter || !window->decorated || window->wl.decorations.serverSide)
+ return;
+
+ if (!window->wl.decorations.buffer)
+ window->wl.decorations.buffer = createShmBuffer(&image);
+ if (!window->wl.decorations.buffer)
+ return;
+
+ createDecoration(&window->wl.decorations.top, window->wl.surface,
+ window->wl.decorations.buffer, opaque,
+ 0, -_GLFW_DECORATION_TOP,
+ window->wl.width, _GLFW_DECORATION_TOP);
+ createDecoration(&window->wl.decorations.left, window->wl.surface,
+ window->wl.decorations.buffer, opaque,
+ -_GLFW_DECORATION_WIDTH, -_GLFW_DECORATION_TOP,
+ _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
+ createDecoration(&window->wl.decorations.right, window->wl.surface,
+ window->wl.decorations.buffer, opaque,
+ window->wl.width, -_GLFW_DECORATION_TOP,
+ _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
+ createDecoration(&window->wl.decorations.bottom, window->wl.surface,
+ window->wl.decorations.buffer, opaque,
+ -_GLFW_DECORATION_WIDTH, window->wl.height,
+ window->wl.width + _GLFW_DECORATION_HORIZONTAL, _GLFW_DECORATION_WIDTH);
+}
+
+static void destroyDecoration(_GLFWdecorationWayland* decoration)
+{
+ if (decoration->subsurface)
+ wl_subsurface_destroy(decoration->subsurface);
+ if (decoration->surface)
+ wl_surface_destroy(decoration->surface);
+ if (decoration->viewport)
+ wp_viewport_destroy(decoration->viewport);
+ decoration->surface = NULL;
+ decoration->subsurface = NULL;
+ decoration->viewport = NULL;
+}
+
+static void destroyDecorations(_GLFWwindow* window)
+{
+ destroyDecoration(&window->wl.decorations.top);
+ destroyDecoration(&window->wl.decorations.left);
+ destroyDecoration(&window->wl.decorations.right);
+ destroyDecoration(&window->wl.decorations.bottom);
+}
+
+static void xdgDecorationHandleConfigure(void* data,
+ struct zxdg_toplevel_decoration_v1* decoration,
+ uint32_t mode)
+{
+ _GLFWwindow* window = data;
+
+ window->wl.decorations.serverSide = (mode == ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
+
+ if (!window->wl.decorations.serverSide)
+ createDecorations(window);
+}
+
+static const struct zxdg_toplevel_decoration_v1_listener xdgDecorationListener = {
+ xdgDecorationHandleConfigure,
+};
+
+// Makes the surface considered as XRGB instead of ARGB.
+static void setOpaqueRegion(_GLFWwindow* window)
+{
+ struct wl_region* region;
+
+ region = wl_compositor_create_region(_glfw.wl.compositor);
+ if (!region)
+ return;
+
+ wl_region_add(region, 0, 0, window->wl.width, window->wl.height);
+ wl_surface_set_opaque_region(window->wl.surface, region);
+ wl_surface_commit(window->wl.surface);
+ wl_region_destroy(region);
+}
+
+
+static void resizeWindow(_GLFWwindow* window)
+{
+ int scale = window->wl.scale;
+ int scaledWidth = window->wl.width * scale;
+ int scaledHeight = window->wl.height * scale;
+ wl_egl_window_resize(window->wl.native, scaledWidth, scaledHeight, 0, 0);
+ if (!window->wl.transparent)
+ setOpaqueRegion(window);
+ _glfwInputFramebufferSize(window, scaledWidth, scaledHeight);
+ _glfwInputWindowContentScale(window, scale, scale);
+
+ if (!window->wl.decorations.top.surface)
+ return;
+
+ // Top decoration.
+ wp_viewport_set_destination(window->wl.decorations.top.viewport,
+ window->wl.width, _GLFW_DECORATION_TOP);
+ wl_surface_commit(window->wl.decorations.top.surface);
+
+ // Left decoration.
+ wp_viewport_set_destination(window->wl.decorations.left.viewport,
+ _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
+ wl_surface_commit(window->wl.decorations.left.surface);
+
+ // Right decoration.
+ wl_subsurface_set_position(window->wl.decorations.right.subsurface,
+ window->wl.width, -_GLFW_DECORATION_TOP);
+ wp_viewport_set_destination(window->wl.decorations.right.viewport,
+ _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
+ wl_surface_commit(window->wl.decorations.right.surface);
+
+ // Bottom decoration.
+ wl_subsurface_set_position(window->wl.decorations.bottom.subsurface,
+ -_GLFW_DECORATION_WIDTH, window->wl.height);
+ wp_viewport_set_destination(window->wl.decorations.bottom.viewport,
+ window->wl.width + _GLFW_DECORATION_HORIZONTAL, _GLFW_DECORATION_WIDTH);
+ wl_surface_commit(window->wl.decorations.bottom.surface);
+}
+
+static void checkScaleChange(_GLFWwindow* window)
+{
+ int scale = 1;
+ int i;
+ int monitorScale;
+
+ // Check if we will be able to set the buffer scale or not.
+ if (_glfw.wl.compositorVersion < 3)
+ return;
+
+ // Get the scale factor from the highest scale monitor.
+ for (i = 0; i < window->wl.monitorsCount; ++i)
+ {
+ monitorScale = window->wl.monitors[i]->wl.scale;
+ if (scale < monitorScale)
+ scale = monitorScale;
+ }
+
+ // Only change the framebuffer size if the scale changed.
+ if (scale != window->wl.scale)
+ {
+ window->wl.scale = scale;
+ wl_surface_set_buffer_scale(window->wl.surface, scale);
+ resizeWindow(window);
+ }
+}
+
+static void surfaceHandleEnter(void *data,
+ struct wl_surface *surface,
+ struct wl_output *output)
+{
+ _GLFWwindow* window = data;
+ _GLFWmonitor* monitor = wl_output_get_user_data(output);
+
+ if (window->wl.monitorsCount + 1 > window->wl.monitorsSize)
+ {
+ ++window->wl.monitorsSize;
+ window->wl.monitors =
+ realloc(window->wl.monitors,
+ window->wl.monitorsSize * sizeof(_GLFWmonitor*));
+ }
+
+ window->wl.monitors[window->wl.monitorsCount++] = monitor;
+
+ checkScaleChange(window);
+}
+
+static void surfaceHandleLeave(void *data,
+ struct wl_surface *surface,
+ struct wl_output *output)
+{
+ _GLFWwindow* window = data;
+ _GLFWmonitor* monitor = wl_output_get_user_data(output);
+ GLFWbool found;
+ int i;
+
+ for (i = 0, found = GLFW_FALSE; i < window->wl.monitorsCount - 1; ++i)
+ {
+ if (monitor == window->wl.monitors[i])
+ found = GLFW_TRUE;
+ if (found)
+ window->wl.monitors[i] = window->wl.monitors[i + 1];
+ }
+ window->wl.monitors[--window->wl.monitorsCount] = NULL;
+
+ checkScaleChange(window);
+}
+
+static const struct wl_surface_listener surfaceListener = {
+ surfaceHandleEnter,
+ surfaceHandleLeave
+};
+
+static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable)
+{
+ if (enable && !window->wl.idleInhibitor && _glfw.wl.idleInhibitManager)
+ {
+ window->wl.idleInhibitor =
+ zwp_idle_inhibit_manager_v1_create_inhibitor(
+ _glfw.wl.idleInhibitManager, window->wl.surface);
+ if (!window->wl.idleInhibitor)
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Idle inhibitor creation failed");
+ }
+ else if (!enable && window->wl.idleInhibitor)
+ {
+ zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);
+ window->wl.idleInhibitor = NULL;
+ }
+}
+
+static GLFWbool createSurface(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig)
+{
+ window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);
+ if (!window->wl.surface)
+ return GLFW_FALSE;
+
+ wl_surface_add_listener(window->wl.surface,
+ &surfaceListener,
+ window);
+
+ wl_surface_set_user_data(window->wl.surface, window);
+
+ window->wl.native = wl_egl_window_create(window->wl.surface,
+ wndconfig->width,
+ wndconfig->height);
+ if (!window->wl.native)
+ return GLFW_FALSE;
+
+ window->wl.width = wndconfig->width;
+ window->wl.height = wndconfig->height;
+ window->wl.scale = 1;
+
+ if (!window->wl.transparent)
+ setOpaqueRegion(window);
+
+ return GLFW_TRUE;
+}
+
+static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor,
+ int refreshRate)
+{
+ if (window->wl.xdg.toplevel)
+ {
+ xdg_toplevel_set_fullscreen(
+ window->wl.xdg.toplevel,
+ monitor->wl.output);
+ }
+ else if (window->wl.shellSurface)
+ {
+ wl_shell_surface_set_fullscreen(
+ window->wl.shellSurface,
+ WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
+ refreshRate * 1000, // Convert Hz to mHz.
+ monitor->wl.output);
+ }
+ setIdleInhibitor(window, GLFW_TRUE);
+ if (!window->wl.decorations.serverSide)
+ destroyDecorations(window);
+}
+
+static GLFWbool createShellSurface(_GLFWwindow* window)
+{
+ if (!_glfw.wl.shell)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: wl_shell protocol not available");
+ return GLFW_FALSE;
+ }
+
+ window->wl.shellSurface = wl_shell_get_shell_surface(_glfw.wl.shell,
+ window->wl.surface);
+ if (!window->wl.shellSurface)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Shell surface creation failed");
+ return GLFW_FALSE;
+ }
+
+ wl_shell_surface_add_listener(window->wl.shellSurface,
+ &shellSurfaceListener,
+ window);
+
+ if (window->wl.title)
+ wl_shell_surface_set_title(window->wl.shellSurface, window->wl.title);
+
+ if (window->monitor)
+ {
+ setFullscreen(window, window->monitor, 0);
+ }
+ else if (window->wl.maximized)
+ {
+ wl_shell_surface_set_maximized(window->wl.shellSurface, NULL);
+ setIdleInhibitor(window, GLFW_FALSE);
+ createDecorations(window);
+ }
+ else
+ {
+ wl_shell_surface_set_toplevel(window->wl.shellSurface);
+ setIdleInhibitor(window, GLFW_FALSE);
+ createDecorations(window);
+ }
+
+ wl_surface_commit(window->wl.surface);
+
+ return GLFW_TRUE;
+}
+
+static void xdgToplevelHandleConfigure(void* data,
+ struct xdg_toplevel* toplevel,
+ int32_t width,
+ int32_t height,
+ struct wl_array* states)
+{
+ _GLFWwindow* window = data;
+ float aspectRatio;
+ float targetRatio;
+ uint32_t* state;
+ GLFWbool maximized = GLFW_FALSE;
+ GLFWbool fullscreen = GLFW_FALSE;
+ GLFWbool activated = GLFW_FALSE;
+
+ wl_array_for_each(state, states)
+ {
+ switch (*state)
+ {
+ case XDG_TOPLEVEL_STATE_MAXIMIZED:
+ maximized = GLFW_TRUE;
+ break;
+ case XDG_TOPLEVEL_STATE_FULLSCREEN:
+ fullscreen = GLFW_TRUE;
+ break;
+ case XDG_TOPLEVEL_STATE_RESIZING:
+ break;
+ case XDG_TOPLEVEL_STATE_ACTIVATED:
+ activated = GLFW_TRUE;
+ break;
+ }
+ }
+
+ if (width != 0 && height != 0)
+ {
+ if (!maximized && !fullscreen)
+ {
+ if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)
+ {
+ aspectRatio = (float)width / (float)height;
+ targetRatio = (float)window->numer / (float)window->denom;
+ if (aspectRatio < targetRatio)
+ height = width / targetRatio;
+ else if (aspectRatio > targetRatio)
+ width = height * targetRatio;
+ }
+ }
+
+ _glfwInputWindowSize(window, width, height);
+ _glfwPlatformSetWindowSize(window, width, height);
+ _glfwInputWindowDamage(window);
+ }
+
+ if (window->wl.wasFullscreen && window->autoIconify)
+ {
+ if (!activated || !fullscreen)
+ {
+ _glfwPlatformIconifyWindow(window);
+ window->wl.wasFullscreen = GLFW_FALSE;
+ }
+ }
+ if (fullscreen && activated)
+ window->wl.wasFullscreen = GLFW_TRUE;
+ _glfwInputWindowFocus(window, activated);
+}
+
+static void xdgToplevelHandleClose(void* data,
+ struct xdg_toplevel* toplevel)
+{
+ _GLFWwindow* window = data;
+ _glfwInputWindowCloseRequest(window);
+}
+
+static const struct xdg_toplevel_listener xdgToplevelListener = {
+ xdgToplevelHandleConfigure,
+ xdgToplevelHandleClose
+};
+
+static void xdgSurfaceHandleConfigure(void* data,
+ struct xdg_surface* surface,
+ uint32_t serial)
+{
+ xdg_surface_ack_configure(surface, serial);
+}
+
+static const struct xdg_surface_listener xdgSurfaceListener = {
+ xdgSurfaceHandleConfigure
+};
+
+static void setXdgDecorations(_GLFWwindow* window)
+{
+ if (_glfw.wl.decorationManager)
+ {
+ window->wl.xdg.decoration =
+ zxdg_decoration_manager_v1_get_toplevel_decoration(
+ _glfw.wl.decorationManager, window->wl.xdg.toplevel);
+ zxdg_toplevel_decoration_v1_add_listener(window->wl.xdg.decoration,
+ &xdgDecorationListener,
+ window);
+ zxdg_toplevel_decoration_v1_set_mode(
+ window->wl.xdg.decoration,
+ ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
+ }
+ else
+ {
+ window->wl.decorations.serverSide = GLFW_FALSE;
+ createDecorations(window);
+ }
+}
+
+static GLFWbool createXdgSurface(_GLFWwindow* window)
+{
+ window->wl.xdg.surface = xdg_wm_base_get_xdg_surface(_glfw.wl.wmBase,
+ window->wl.surface);
+ if (!window->wl.xdg.surface)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: xdg-surface creation failed");
+ return GLFW_FALSE;
+ }
+
+ xdg_surface_add_listener(window->wl.xdg.surface,
+ &xdgSurfaceListener,
+ window);
+
+ window->wl.xdg.toplevel = xdg_surface_get_toplevel(window->wl.xdg.surface);
+ if (!window->wl.xdg.toplevel)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: xdg-toplevel creation failed");
+ return GLFW_FALSE;
+ }
+
+ xdg_toplevel_add_listener(window->wl.xdg.toplevel,
+ &xdgToplevelListener,
+ window);
+
+ if (window->wl.title)
+ xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);
+
+ if (window->minwidth != GLFW_DONT_CARE && window->minheight != GLFW_DONT_CARE)
+ xdg_toplevel_set_min_size(window->wl.xdg.toplevel,
+ window->minwidth, window->minheight);
+ if (window->maxwidth != GLFW_DONT_CARE && window->maxheight != GLFW_DONT_CARE)
+ xdg_toplevel_set_max_size(window->wl.xdg.toplevel,
+ window->maxwidth, window->maxheight);
+
+ if (window->monitor)
+ {
+ xdg_toplevel_set_fullscreen(window->wl.xdg.toplevel,
+ window->monitor->wl.output);
+ setIdleInhibitor(window, GLFW_TRUE);
+ }
+ else if (window->wl.maximized)
+ {
+ xdg_toplevel_set_maximized(window->wl.xdg.toplevel);
+ setIdleInhibitor(window, GLFW_FALSE);
+ setXdgDecorations(window);
+ }
+ else
+ {
+ setIdleInhibitor(window, GLFW_FALSE);
+ setXdgDecorations(window);
+ }
+
+ wl_surface_commit(window->wl.surface);
+ wl_display_roundtrip(_glfw.wl.display);
+
+ return GLFW_TRUE;
+}
+
+static void setCursorImage(_GLFWwindow* window,
+ _GLFWcursorWayland* cursorWayland)
+{
+ struct itimerspec timer = {};
+ struct wl_cursor* wlCursor = cursorWayland->cursor;
+ struct wl_cursor_image* image;
+ struct wl_buffer* buffer;
+ struct wl_surface* surface = _glfw.wl.cursorSurface;
+ int scale = 1;
+
+ if (!wlCursor)
+ buffer = cursorWayland->buffer;
+ else
+ {
+ if (window->wl.scale > 1 && cursorWayland->cursorHiDPI)
+ {
+ wlCursor = cursorWayland->cursorHiDPI;
+ scale = 2;
+ }
+
+ image = wlCursor->images[cursorWayland->currentImage];
+ buffer = wl_cursor_image_get_buffer(image);
+ if (!buffer)
+ return;
+
+ timer.it_value.tv_sec = image->delay / 1000;
+ timer.it_value.tv_nsec = (image->delay % 1000) * 1000000;
+ timerfd_settime(_glfw.wl.cursorTimerfd, 0, &timer, NULL);
+
+ cursorWayland->width = image->width;
+ cursorWayland->height = image->height;
+ cursorWayland->xhot = image->hotspot_x;
+ cursorWayland->yhot = image->hotspot_y;
+ }
+
+ wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.pointerEnterSerial,
+ surface,
+ cursorWayland->xhot / scale,
+ cursorWayland->yhot / scale);
+ wl_surface_set_buffer_scale(surface, scale);
+ wl_surface_attach(surface, buffer, 0, 0);
+ wl_surface_damage(surface, 0, 0,
+ cursorWayland->width, cursorWayland->height);
+ wl_surface_commit(surface);
+}
+
+static void incrementCursorImage(_GLFWwindow* window)
+{
+ _GLFWcursor* cursor;
+
+ if (!window || window->wl.decorations.focus != mainWindow)
+ return;
+
+ cursor = window->wl.currentCursor;
+ if (cursor && cursor->wl.cursor)
+ {
+ cursor->wl.currentImage += 1;
+ cursor->wl.currentImage %= cursor->wl.cursor->image_count;
+ setCursorImage(window, &cursor->wl);
+ }
+}
+
+static void handleEvents(int timeout)
+{
+ struct wl_display* display = _glfw.wl.display;
+ struct pollfd fds[] = {
+ { wl_display_get_fd(display), POLLIN },
+ { _glfw.wl.timerfd, POLLIN },
+ { _glfw.wl.cursorTimerfd, POLLIN },
+ };
+ ssize_t read_ret;
+ uint64_t repeats, i;
+
+ while (wl_display_prepare_read(display) != 0)
+ wl_display_dispatch_pending(display);
+
+ // If an error different from EAGAIN happens, we have likely been
+ // disconnected from the Wayland session, try to handle that the best we
+ // can.
+ if (wl_display_flush(display) < 0 && errno != EAGAIN)
+ {
+ _GLFWwindow* window = _glfw.windowListHead;
+ while (window)
+ {
+ _glfwInputWindowCloseRequest(window);
+ window = window->next;
+ }
+ wl_display_cancel_read(display);
+ return;
+ }
+
+ if (poll(fds, 3, timeout) > 0)
+ {
+ if (fds[0].revents & POLLIN)
+ {
+ wl_display_read_events(display);
+ wl_display_dispatch_pending(display);
+ }
+ else
+ {
+ wl_display_cancel_read(display);
+ }
+
+ if (fds[1].revents & POLLIN)
+ {
+ read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
+ if (read_ret != 8)
+ return;
+
+ if (_glfw.wl.keyboardFocus)
+ {
+ for (i = 0; i < repeats; ++i)
+ {
+ _glfwInputKey(_glfw.wl.keyboardFocus,
+ _glfw.wl.keyboardLastKey,
+ _glfw.wl.keyboardLastScancode,
+ GLFW_REPEAT,
+ _glfw.wl.xkb.modifiers);
+ }
+ }
+ }
+
+ if (fds[2].revents & POLLIN)
+ {
+ read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
+ if (read_ret != 8)
+ return;
+
+ incrementCursorImage(_glfw.wl.pointerFocus);
+ }
+ }
+ else
+ {
+ wl_display_cancel_read(display);
+ }
+}
+
+// Translates a GLFW standard cursor to a theme cursor name
+//
+static char *translateCursorShape(int shape)
+{
+ switch (shape)
+ {
+ case GLFW_ARROW_CURSOR:
+ return "left_ptr";
+ case GLFW_IBEAM_CURSOR:
+ return "xterm";
+ case GLFW_CROSSHAIR_CURSOR:
+ return "crosshair";
+ case GLFW_HAND_CURSOR:
+ return "hand2";
+ case GLFW_HRESIZE_CURSOR:
+ return "sb_h_double_arrow";
+ case GLFW_VRESIZE_CURSOR:
+ return "sb_v_double_arrow";
+ }
+ return NULL;
+}
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformCreateWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ window->wl.transparent = fbconfig->transparent;
+
+ if (!createSurface(window, wndconfig))
+ return GLFW_FALSE;
+
+ if (ctxconfig->client != GLFW_NO_API)
+ {
+ if (ctxconfig->source == GLFW_EGL_CONTEXT_API ||
+ ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
+ {
+ if (!_glfwInitEGL())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
+ {
+ if (!_glfwInitOSMesa())
+ return GLFW_FALSE;
+ if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ }
+
+ if (wndconfig->title)
+ window->wl.title = _glfw_strdup(wndconfig->title);
+
+ if (wndconfig->visible)
+ {
+ if (_glfw.wl.wmBase)
+ {
+ if (!createXdgSurface(window))
+ return GLFW_FALSE;
+ }
+ else
+ {
+ if (!createShellSurface(window))
+ return GLFW_FALSE;
+ }
+
+ window->wl.visible = GLFW_TRUE;
+ }
+ else
+ {
+ window->wl.xdg.surface = NULL;
+ window->wl.xdg.toplevel = NULL;
+ window->wl.shellSurface = NULL;
+ window->wl.visible = GLFW_FALSE;
+ }
+
+ window->wl.currentCursor = NULL;
+
+ window->wl.monitors = calloc(1, sizeof(_GLFWmonitor*));
+ window->wl.monitorsCount = 0;
+ window->wl.monitorsSize = 1;
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyWindow(_GLFWwindow* window)
+{
+ if (window == _glfw.wl.pointerFocus)
+ {
+ _glfw.wl.pointerFocus = NULL;
+ _glfwInputCursorEnter(window, GLFW_FALSE);
+ }
+ if (window == _glfw.wl.keyboardFocus)
+ {
+ _glfw.wl.keyboardFocus = NULL;
+ _glfwInputWindowFocus(window, GLFW_FALSE);
+ }
+
+ if (window->wl.idleInhibitor)
+ zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);
+
+ if (window->context.destroy)
+ window->context.destroy(window);
+
+ destroyDecorations(window);
+ if (window->wl.xdg.decoration)
+ zxdg_toplevel_decoration_v1_destroy(window->wl.xdg.decoration);
+
+ if (window->wl.decorations.buffer)
+ wl_buffer_destroy(window->wl.decorations.buffer);
+
+ if (window->wl.native)
+ wl_egl_window_destroy(window->wl.native);
+
+ if (window->wl.shellSurface)
+ wl_shell_surface_destroy(window->wl.shellSurface);
+
+ if (window->wl.xdg.toplevel)
+ xdg_toplevel_destroy(window->wl.xdg.toplevel);
+
+ if (window->wl.xdg.surface)
+ xdg_surface_destroy(window->wl.xdg.surface);
+
+ if (window->wl.surface)
+ wl_surface_destroy(window->wl.surface);
+
+ free(window->wl.title);
+ free(window->wl.monitors);
+}
+
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
+{
+ if (window->wl.title)
+ free(window->wl.title);
+ window->wl.title = _glfw_strdup(title);
+ if (window->wl.xdg.toplevel)
+ xdg_toplevel_set_title(window->wl.xdg.toplevel, title);
+ else if (window->wl.shellSurface)
+ wl_shell_surface_set_title(window->wl.shellSurface, title);
+}
+
+void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
+ int count, const GLFWimage* images)
+{
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Setting window icon not supported");
+}
+
+void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
+{
+ // A Wayland client is not aware of its position, so just warn and leave it
+ // as (0, 0)
+
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Window position retrieval not supported");
+}
+
+void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
+{
+ // A Wayland client can not set its position, so just warn
+
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Window position setting not supported");
+}
+
+void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
+{
+ if (width)
+ *width = window->wl.width;
+ if (height)
+ *height = window->wl.height;
+}
+
+void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
+{
+ window->wl.width = width;
+ window->wl.height = height;
+ resizeWindow(window);
+}
+
+void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight)
+{
+ if (_glfw.wl.wmBase)
+ {
+ if (window->wl.xdg.toplevel)
+ {
+ if (minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE)
+ minwidth = minheight = 0;
+ if (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE)
+ maxwidth = maxheight = 0;
+ xdg_toplevel_set_min_size(window->wl.xdg.toplevel, minwidth, minheight);
+ xdg_toplevel_set_max_size(window->wl.xdg.toplevel, maxwidth, maxheight);
+ wl_surface_commit(window->wl.surface);
+ }
+ }
+ else
+ {
+ // TODO: find out how to trigger a resize.
+ // The actual limits are checked in the wl_shell_surface::configure handler.
+ }
+}
+
+void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window,
+ int numer, int denom)
+{
+ // TODO: find out how to trigger a resize.
+ // The actual limits are checked in the wl_shell_surface::configure handler.
+}
+
+void _glfwPlatformGetFramebufferSize(_GLFWwindow* window,
+ int* width, int* height)
+{
+ _glfwPlatformGetWindowSize(window, width, height);
+ if (width)
+ *width *= window->wl.scale;
+ if (height)
+ *height *= window->wl.scale;
+}
+
+void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
+ int* left, int* top,
+ int* right, int* bottom)
+{
+ if (window->decorated && !window->monitor && !window->wl.decorations.serverSide)
+ {
+ if (top)
+ *top = _GLFW_DECORATION_TOP;
+ if (left)
+ *left = _GLFW_DECORATION_WIDTH;
+ if (right)
+ *right = _GLFW_DECORATION_WIDTH;
+ if (bottom)
+ *bottom = _GLFW_DECORATION_WIDTH;
+ }
+}
+
+void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
+ float* xscale, float* yscale)
+{
+ if (xscale)
+ *xscale = (float) window->wl.scale;
+ if (yscale)
+ *yscale = (float) window->wl.scale;
+}
+
+void _glfwPlatformIconifyWindow(_GLFWwindow* window)
+{
+ if (_glfw.wl.wmBase)
+ {
+ if (window->wl.xdg.toplevel)
+ xdg_toplevel_set_minimized(window->wl.xdg.toplevel);
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Iconify window not supported on wl_shell");
+ }
+}
+
+void _glfwPlatformRestoreWindow(_GLFWwindow* window)
+{
+ if (window->wl.xdg.toplevel)
+ {
+ if (window->monitor)
+ xdg_toplevel_unset_fullscreen(window->wl.xdg.toplevel);
+ if (window->wl.maximized)
+ xdg_toplevel_unset_maximized(window->wl.xdg.toplevel);
+ // There is no way to unset minimized, or even to know if we are
+ // minimized, so there is nothing to do here.
+ }
+ else if (window->wl.shellSurface)
+ {
+ if (window->monitor || window->wl.maximized)
+ wl_shell_surface_set_toplevel(window->wl.shellSurface);
+ }
+ _glfwInputWindowMonitor(window, NULL);
+ window->wl.maximized = GLFW_FALSE;
+}
+
+void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
+{
+ if (window->wl.xdg.toplevel)
+ {
+ xdg_toplevel_set_maximized(window->wl.xdg.toplevel);
+ }
+ else if (window->wl.shellSurface)
+ {
+ // Let the compositor select the best output.
+ wl_shell_surface_set_maximized(window->wl.shellSurface, NULL);
+ }
+ window->wl.maximized = GLFW_TRUE;
+}
+
+void _glfwPlatformShowWindow(_GLFWwindow* window)
+{
+ if (!window->wl.visible)
+ {
+ if (_glfw.wl.wmBase)
+ createXdgSurface(window);
+ else if (!window->wl.shellSurface)
+ createShellSurface(window);
+ window->wl.visible = GLFW_TRUE;
+ }
+}
+
+void _glfwPlatformHideWindow(_GLFWwindow* window)
+{
+ if (window->wl.xdg.toplevel)
+ {
+ xdg_toplevel_destroy(window->wl.xdg.toplevel);
+ xdg_surface_destroy(window->wl.xdg.surface);
+ window->wl.xdg.toplevel = NULL;
+ window->wl.xdg.surface = NULL;
+ }
+ else if (window->wl.shellSurface)
+ {
+ wl_shell_surface_destroy(window->wl.shellSurface);
+ window->wl.shellSurface = NULL;
+ }
+ window->wl.visible = GLFW_FALSE;
+}
+
+void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
+{
+ // TODO
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Window attention request not implemented yet");
+}
+
+void _glfwPlatformFocusWindow(_GLFWwindow* window)
+{
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Focusing a window requires user interaction");
+}
+
+void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
+ _GLFWmonitor* monitor,
+ int xpos, int ypos,
+ int width, int height,
+ int refreshRate)
+{
+ if (monitor)
+ {
+ setFullscreen(window, monitor, refreshRate);
+ }
+ else
+ {
+ if (window->wl.xdg.toplevel)
+ xdg_toplevel_unset_fullscreen(window->wl.xdg.toplevel);
+ else if (window->wl.shellSurface)
+ wl_shell_surface_set_toplevel(window->wl.shellSurface);
+ setIdleInhibitor(window, GLFW_FALSE);
+ if (!_glfw.wl.decorationManager)
+ createDecorations(window);
+ }
+ _glfwInputWindowMonitor(window, monitor);
+}
+
+int _glfwPlatformWindowFocused(_GLFWwindow* window)
+{
+ return _glfw.wl.keyboardFocus == window;
+}
+
+int _glfwPlatformWindowIconified(_GLFWwindow* window)
+{
+ // wl_shell doesn't have any iconified concept, and xdg-shell doesn’t give
+ // any way to request whether a surface is iconified.
+ return GLFW_FALSE;
+}
+
+int _glfwPlatformWindowVisible(_GLFWwindow* window)
+{
+ return window->wl.visible;
+}
+
+int _glfwPlatformWindowMaximized(_GLFWwindow* window)
+{
+ return window->wl.maximized;
+}
+
+int _glfwPlatformWindowHovered(_GLFWwindow* window)
+{
+ return window->wl.hovered;
+}
+
+int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
+{
+ return window->wl.transparent;
+}
+
+void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
+{
+ // TODO
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Window attribute setting not implemented yet");
+}
+
+void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
+{
+ if (!window->monitor)
+ {
+ if (enabled)
+ createDecorations(window);
+ else
+ destroyDecorations(window);
+ }
+}
+
+void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
+{
+ // TODO
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Window attribute setting not implemented yet");
+}
+
+float _glfwPlatformGetWindowOpacity(_GLFWwindow* window)
+{
+ return 1.f;
+}
+
+void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
+{
+}
+
+void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
+{
+ // This is handled in relativePointerHandleRelativeMotion
+}
+
+GLFWbool _glfwPlatformRawMouseMotionSupported(void)
+{
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformPollEvents(void)
+{
+ handleEvents(0);
+}
+
+void _glfwPlatformWaitEvents(void)
+{
+ handleEvents(-1);
+}
+
+void _glfwPlatformWaitEventsTimeout(double timeout)
+{
+ handleEvents((int) (timeout * 1e3));
+}
+
+void _glfwPlatformPostEmptyEvent(void)
+{
+ wl_display_sync(_glfw.wl.display);
+}
+
+void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)
+{
+ if (xpos)
+ *xpos = window->wl.cursorPosX;
+ if (ypos)
+ *ypos = window->wl.cursorPosY;
+}
+
+static GLFWbool isPointerLocked(_GLFWwindow* window);
+
+void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
+{
+ if (isPointerLocked(window))
+ {
+ zwp_locked_pointer_v1_set_cursor_position_hint(
+ window->wl.pointerLock.lockedPointer,
+ wl_fixed_from_double(x), wl_fixed_from_double(y));
+ wl_surface_commit(window->wl.surface);
+ }
+}
+
+void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
+{
+ _glfwPlatformSetCursor(window, window->wl.currentCursor);
+}
+
+const char* _glfwPlatformGetScancodeName(int scancode)
+{
+ // TODO
+ return NULL;
+}
+
+int _glfwPlatformGetKeyScancode(int key)
+{
+ return _glfw.wl.scancodes[key];
+}
+
+int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
+ const GLFWimage* image,
+ int xhot, int yhot)
+{
+ cursor->wl.buffer = createShmBuffer(image);
+ if (!cursor->wl.buffer)
+ return GLFW_FALSE;
+
+ cursor->wl.width = image->width;
+ cursor->wl.height = image->height;
+ cursor->wl.xhot = xhot;
+ cursor->wl.yhot = yhot;
+ return GLFW_TRUE;
+}
+
+int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
+{
+ struct wl_cursor* standardCursor;
+
+ standardCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
+ translateCursorShape(shape));
+ if (!standardCursor)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Standard cursor \"%s\" not found",
+ translateCursorShape(shape));
+ return GLFW_FALSE;
+ }
+
+ cursor->wl.cursor = standardCursor;
+ cursor->wl.currentImage = 0;
+
+ if (_glfw.wl.cursorThemeHiDPI)
+ {
+ standardCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI,
+ translateCursorShape(shape));
+ cursor->wl.cursorHiDPI = standardCursor;
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
+{
+ // If it's a standard cursor we don't need to do anything here
+ if (cursor->wl.cursor)
+ return;
+
+ if (cursor->wl.buffer)
+ wl_buffer_destroy(cursor->wl.buffer);
+}
+
+static void relativePointerHandleRelativeMotion(void* data,
+ struct zwp_relative_pointer_v1* pointer,
+ uint32_t timeHi,
+ uint32_t timeLo,
+ wl_fixed_t dx,
+ wl_fixed_t dy,
+ wl_fixed_t dxUnaccel,
+ wl_fixed_t dyUnaccel)
+{
+ _GLFWwindow* window = data;
+ double xpos = window->virtualCursorPosX;
+ double ypos = window->virtualCursorPosY;
+
+ if (window->cursorMode != GLFW_CURSOR_DISABLED)
+ return;
+
+ if (window->rawMouseMotion)
+ {
+ xpos += wl_fixed_to_double(dxUnaccel);
+ ypos += wl_fixed_to_double(dyUnaccel);
+ }
+ else
+ {
+ xpos += wl_fixed_to_double(dx);
+ ypos += wl_fixed_to_double(dy);
+ }
+
+ _glfwInputCursorPos(window, xpos, ypos);
+}
+
+static const struct zwp_relative_pointer_v1_listener relativePointerListener = {
+ relativePointerHandleRelativeMotion
+};
+
+static void lockedPointerHandleLocked(void* data,
+ struct zwp_locked_pointer_v1* lockedPointer)
+{
+}
+
+static void unlockPointer(_GLFWwindow* window)
+{
+ struct zwp_relative_pointer_v1* relativePointer =
+ window->wl.pointerLock.relativePointer;
+ struct zwp_locked_pointer_v1* lockedPointer =
+ window->wl.pointerLock.lockedPointer;
+
+ zwp_relative_pointer_v1_destroy(relativePointer);
+ zwp_locked_pointer_v1_destroy(lockedPointer);
+
+ window->wl.pointerLock.relativePointer = NULL;
+ window->wl.pointerLock.lockedPointer = NULL;
+}
+
+static void lockPointer(_GLFWwindow* window);
+
+static void lockedPointerHandleUnlocked(void* data,
+ struct zwp_locked_pointer_v1* lockedPointer)
+{
+}
+
+static const struct zwp_locked_pointer_v1_listener lockedPointerListener = {
+ lockedPointerHandleLocked,
+ lockedPointerHandleUnlocked
+};
+
+static void lockPointer(_GLFWwindow* window)
+{
+ struct zwp_relative_pointer_v1* relativePointer;
+ struct zwp_locked_pointer_v1* lockedPointer;
+
+ if (!_glfw.wl.relativePointerManager)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: no relative pointer manager");
+ return;
+ }
+
+ relativePointer =
+ zwp_relative_pointer_manager_v1_get_relative_pointer(
+ _glfw.wl.relativePointerManager,
+ _glfw.wl.pointer);
+ zwp_relative_pointer_v1_add_listener(relativePointer,
+ &relativePointerListener,
+ window);
+
+ lockedPointer =
+ zwp_pointer_constraints_v1_lock_pointer(
+ _glfw.wl.pointerConstraints,
+ window->wl.surface,
+ _glfw.wl.pointer,
+ NULL,
+ ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT);
+ zwp_locked_pointer_v1_add_listener(lockedPointer,
+ &lockedPointerListener,
+ window);
+
+ window->wl.pointerLock.relativePointer = relativePointer;
+ window->wl.pointerLock.lockedPointer = lockedPointer;
+
+ wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.pointerEnterSerial,
+ NULL, 0, 0);
+}
+
+static GLFWbool isPointerLocked(_GLFWwindow* window)
+{
+ return window->wl.pointerLock.lockedPointer != NULL;
+}
+
+void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
+{
+ struct wl_cursor* defaultCursor;
+ struct wl_cursor* defaultCursorHiDPI = NULL;
+
+ if (!_glfw.wl.pointer)
+ return;
+
+ window->wl.currentCursor = cursor;
+
+ // If we're not in the correct window just save the cursor
+ // the next time the pointer enters the window the cursor will change
+ if (window != _glfw.wl.pointerFocus || window->wl.decorations.focus != mainWindow)
+ return;
+
+ // Unlock possible pointer lock if no longer disabled.
+ if (window->cursorMode != GLFW_CURSOR_DISABLED && isPointerLocked(window))
+ unlockPointer(window);
+
+ if (window->cursorMode == GLFW_CURSOR_NORMAL)
+ {
+ if (cursor)
+ setCursorImage(window, &cursor->wl);
+ else
+ {
+ defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
+ "left_ptr");
+ if (!defaultCursor)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Standard cursor not found");
+ return;
+ }
+ if (_glfw.wl.cursorThemeHiDPI)
+ defaultCursorHiDPI =
+ wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI,
+ "left_ptr");
+ _GLFWcursorWayland cursorWayland = {
+ defaultCursor,
+ defaultCursorHiDPI,
+ NULL,
+ 0, 0,
+ 0, 0,
+ 0
+ };
+ setCursorImage(window, &cursorWayland);
+ }
+ }
+ else if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ if (!isPointerLocked(window))
+ lockPointer(window);
+ }
+ else if (window->cursorMode == GLFW_CURSOR_HIDDEN)
+ {
+ wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.pointerEnterSerial, NULL, 0, 0);
+ }
+}
+
+static void dataSourceHandleTarget(void* data,
+ struct wl_data_source* dataSource,
+ const char* mimeType)
+{
+ if (_glfw.wl.dataSource != dataSource)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Unknown clipboard data source");
+ return;
+ }
+}
+
+static void dataSourceHandleSend(void* data,
+ struct wl_data_source* dataSource,
+ const char* mimeType,
+ int fd)
+{
+ const char* string = _glfw.wl.clipboardSendString;
+ size_t len = _glfw.wl.clipboardSendSize;
+ int ret;
+
+ if (_glfw.wl.dataSource != dataSource)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Unknown clipboard data source");
+ return;
+ }
+
+ if (!string)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Copy requested from an invalid string");
+ return;
+ }
+
+ if (strcmp(mimeType, "text/plain;charset=utf-8") != 0)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Wrong MIME type asked from clipboard");
+ close(fd);
+ return;
+ }
+
+ while (len > 0)
+ {
+ ret = write(fd, string, len);
+ if (ret == -1 && errno == EINTR)
+ continue;
+ if (ret == -1)
+ {
+ // TODO: also report errno maybe.
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Error while writing the clipboard");
+ close(fd);
+ return;
+ }
+ len -= ret;
+ }
+ close(fd);
+}
+
+static void dataSourceHandleCancelled(void* data,
+ struct wl_data_source* dataSource)
+{
+ wl_data_source_destroy(dataSource);
+
+ if (_glfw.wl.dataSource != dataSource)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Unknown clipboard data source");
+ return;
+ }
+
+ _glfw.wl.dataSource = NULL;
+}
+
+static const struct wl_data_source_listener dataSourceListener = {
+ dataSourceHandleTarget,
+ dataSourceHandleSend,
+ dataSourceHandleCancelled,
+};
+
+void _glfwPlatformSetClipboardString(const char* string)
+{
+ if (_glfw.wl.dataSource)
+ {
+ wl_data_source_destroy(_glfw.wl.dataSource);
+ _glfw.wl.dataSource = NULL;
+ }
+
+ if (_glfw.wl.clipboardSendString)
+ {
+ free(_glfw.wl.clipboardSendString);
+ _glfw.wl.clipboardSendString = NULL;
+ }
+
+ _glfw.wl.clipboardSendString = strdup(string);
+ if (!_glfw.wl.clipboardSendString)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Impossible to allocate clipboard string");
+ return;
+ }
+ _glfw.wl.clipboardSendSize = strlen(string);
+ _glfw.wl.dataSource =
+ wl_data_device_manager_create_data_source(_glfw.wl.dataDeviceManager);
+ if (!_glfw.wl.dataSource)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Impossible to create clipboard source");
+ free(_glfw.wl.clipboardSendString);
+ return;
+ }
+ wl_data_source_add_listener(_glfw.wl.dataSource,
+ &dataSourceListener,
+ NULL);
+ wl_data_source_offer(_glfw.wl.dataSource, "text/plain;charset=utf-8");
+ wl_data_device_set_selection(_glfw.wl.dataDevice,
+ _glfw.wl.dataSource,
+ _glfw.wl.serial);
+}
+
+static GLFWbool growClipboardString(void)
+{
+ char* clipboard = _glfw.wl.clipboardString;
+
+ clipboard = realloc(clipboard, _glfw.wl.clipboardSize * 2);
+ if (!clipboard)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Impossible to grow clipboard string");
+ return GLFW_FALSE;
+ }
+ _glfw.wl.clipboardString = clipboard;
+ _glfw.wl.clipboardSize = _glfw.wl.clipboardSize * 2;
+ return GLFW_TRUE;
+}
+
+const char* _glfwPlatformGetClipboardString(void)
+{
+ int fds[2];
+ int ret;
+ size_t len = 0;
+
+ if (!_glfw.wl.dataOffer)
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "No clipboard data has been sent yet");
+ return NULL;
+ }
+
+ ret = pipe2(fds, O_CLOEXEC);
+ if (ret < 0)
+ {
+ // TODO: also report errno maybe?
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Impossible to create clipboard pipe fds");
+ return NULL;
+ }
+
+ wl_data_offer_receive(_glfw.wl.dataOffer, "text/plain;charset=utf-8", fds[1]);
+ close(fds[1]);
+
+ // XXX: this is a huge hack, this function shouldn’t be synchronous!
+ handleEvents(-1);
+
+ while (1)
+ {
+ // Grow the clipboard if we need to paste something bigger, there is no
+ // shrink operation yet.
+ if (len + 4096 > _glfw.wl.clipboardSize)
+ {
+ if (!growClipboardString())
+ {
+ close(fds[0]);
+ return NULL;
+ }
+ }
+
+ // Then read from the fd to the clipboard, handling all known errors.
+ ret = read(fds[0], _glfw.wl.clipboardString + len, 4096);
+ if (ret == 0)
+ break;
+ if (ret == -1 && errno == EINTR)
+ continue;
+ if (ret == -1)
+ {
+ // TODO: also report errno maybe.
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Impossible to read from clipboard fd");
+ close(fds[0]);
+ return NULL;
+ }
+ len += ret;
+ }
+ close(fds[0]);
+ if (len + 1 > _glfw.wl.clipboardSize)
+ {
+ if (!growClipboardString())
+ return NULL;
+ }
+ _glfw.wl.clipboardString[len] = '\0';
+ return _glfw.wl.clipboardString;
+}
+
+void _glfwPlatformGetRequiredInstanceExtensions(char** extensions)
+{
+ if (!_glfw.vk.KHR_surface || !_glfw.vk.KHR_wayland_surface)
+ return;
+
+ extensions[0] = "VK_KHR_surface";
+ extensions[1] = "VK_KHR_wayland_surface";
+}
+
+int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily)
+{
+ PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
+ vkGetPhysicalDeviceWaylandPresentationSupportKHR =
+ (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)
+ vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
+ if (!vkGetPhysicalDeviceWaylandPresentationSupportKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Wayland: Vulkan instance missing VK_KHR_wayland_surface extension");
+ return VK_NULL_HANDLE;
+ }
+
+ return vkGetPhysicalDeviceWaylandPresentationSupportKHR(device,
+ queuefamily,
+ _glfw.wl.display);
+}
+
+VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
+ _GLFWwindow* window,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface)
+{
+ VkResult err;
+ VkWaylandSurfaceCreateInfoKHR sci;
+ PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;
+
+ vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)
+ vkGetInstanceProcAddr(instance, "vkCreateWaylandSurfaceKHR");
+ if (!vkCreateWaylandSurfaceKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "Wayland: Vulkan instance missing VK_KHR_wayland_surface extension");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ memset(&sci, 0, sizeof(sci));
+ sci.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
+ sci.display = _glfw.wl.display;
+ sci.surface = window->wl.surface;
+
+ err = vkCreateWaylandSurfaceKHR(instance, &sci, allocator, surface);
+ if (err)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "Wayland: Failed to create Vulkan surface: %s",
+ _glfwGetVulkanResultString(err));
+ }
+
+ return err;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI struct wl_display* glfwGetWaylandDisplay(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return _glfw.wl.display;
+}
+
+GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return window->wl.surface;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_init.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_init.c
new file mode 100644
index 0000000..87b3eb7
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_init.c
@@ -0,0 +1,1211 @@
+//========================================================================
+// GLFW 3.3 X11 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <X11/Xresource.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <stdio.h>
+#include <locale.h>
+
+
+// Translate the X11 KeySyms for a key to a GLFW key code
+// NOTE: This is only used as a fallback, in case the XKB method fails
+// It is layout-dependent and will fail partially on most non-US layouts
+//
+static int translateKeySyms(const KeySym* keysyms, int width)
+{
+ if (width > 1)
+ {
+ switch (keysyms[1])
+ {
+ case XK_KP_0: return GLFW_KEY_KP_0;
+ case XK_KP_1: return GLFW_KEY_KP_1;
+ case XK_KP_2: return GLFW_KEY_KP_2;
+ case XK_KP_3: return GLFW_KEY_KP_3;
+ case XK_KP_4: return GLFW_KEY_KP_4;
+ case XK_KP_5: return GLFW_KEY_KP_5;
+ case XK_KP_6: return GLFW_KEY_KP_6;
+ case XK_KP_7: return GLFW_KEY_KP_7;
+ case XK_KP_8: return GLFW_KEY_KP_8;
+ case XK_KP_9: return GLFW_KEY_KP_9;
+ case XK_KP_Separator:
+ case XK_KP_Decimal: return GLFW_KEY_KP_DECIMAL;
+ case XK_KP_Equal: return GLFW_KEY_KP_EQUAL;
+ case XK_KP_Enter: return GLFW_KEY_KP_ENTER;
+ default: break;
+ }
+ }
+
+ switch (keysyms[0])
+ {
+ case XK_Escape: return GLFW_KEY_ESCAPE;
+ case XK_Tab: return GLFW_KEY_TAB;
+ case XK_Shift_L: return GLFW_KEY_LEFT_SHIFT;
+ case XK_Shift_R: return GLFW_KEY_RIGHT_SHIFT;
+ case XK_Control_L: return GLFW_KEY_LEFT_CONTROL;
+ case XK_Control_R: return GLFW_KEY_RIGHT_CONTROL;
+ case XK_Meta_L:
+ case XK_Alt_L: return GLFW_KEY_LEFT_ALT;
+ case XK_Mode_switch: // Mapped to Alt_R on many keyboards
+ case XK_ISO_Level3_Shift: // AltGr on at least some machines
+ case XK_Meta_R:
+ case XK_Alt_R: return GLFW_KEY_RIGHT_ALT;
+ case XK_Super_L: return GLFW_KEY_LEFT_SUPER;
+ case XK_Super_R: return GLFW_KEY_RIGHT_SUPER;
+ case XK_Menu: return GLFW_KEY_MENU;
+ case XK_Num_Lock: return GLFW_KEY_NUM_LOCK;
+ case XK_Caps_Lock: return GLFW_KEY_CAPS_LOCK;
+ case XK_Print: return GLFW_KEY_PRINT_SCREEN;
+ case XK_Scroll_Lock: return GLFW_KEY_SCROLL_LOCK;
+ case XK_Pause: return GLFW_KEY_PAUSE;
+ case XK_Delete: return GLFW_KEY_DELETE;
+ case XK_BackSpace: return GLFW_KEY_BACKSPACE;
+ case XK_Return: return GLFW_KEY_ENTER;
+ case XK_Home: return GLFW_KEY_HOME;
+ case XK_End: return GLFW_KEY_END;
+ case XK_Page_Up: return GLFW_KEY_PAGE_UP;
+ case XK_Page_Down: return GLFW_KEY_PAGE_DOWN;
+ case XK_Insert: return GLFW_KEY_INSERT;
+ case XK_Left: return GLFW_KEY_LEFT;
+ case XK_Right: return GLFW_KEY_RIGHT;
+ case XK_Down: return GLFW_KEY_DOWN;
+ case XK_Up: return GLFW_KEY_UP;
+ case XK_F1: return GLFW_KEY_F1;
+ case XK_F2: return GLFW_KEY_F2;
+ case XK_F3: return GLFW_KEY_F3;
+ case XK_F4: return GLFW_KEY_F4;
+ case XK_F5: return GLFW_KEY_F5;
+ case XK_F6: return GLFW_KEY_F6;
+ case XK_F7: return GLFW_KEY_F7;
+ case XK_F8: return GLFW_KEY_F8;
+ case XK_F9: return GLFW_KEY_F9;
+ case XK_F10: return GLFW_KEY_F10;
+ case XK_F11: return GLFW_KEY_F11;
+ case XK_F12: return GLFW_KEY_F12;
+ case XK_F13: return GLFW_KEY_F13;
+ case XK_F14: return GLFW_KEY_F14;
+ case XK_F15: return GLFW_KEY_F15;
+ case XK_F16: return GLFW_KEY_F16;
+ case XK_F17: return GLFW_KEY_F17;
+ case XK_F18: return GLFW_KEY_F18;
+ case XK_F19: return GLFW_KEY_F19;
+ case XK_F20: return GLFW_KEY_F20;
+ case XK_F21: return GLFW_KEY_F21;
+ case XK_F22: return GLFW_KEY_F22;
+ case XK_F23: return GLFW_KEY_F23;
+ case XK_F24: return GLFW_KEY_F24;
+ case XK_F25: return GLFW_KEY_F25;
+
+ // Numeric keypad
+ case XK_KP_Divide: return GLFW_KEY_KP_DIVIDE;
+ case XK_KP_Multiply: return GLFW_KEY_KP_MULTIPLY;
+ case XK_KP_Subtract: return GLFW_KEY_KP_SUBTRACT;
+ case XK_KP_Add: return GLFW_KEY_KP_ADD;
+
+ // These should have been detected in secondary keysym test above!
+ case XK_KP_Insert: return GLFW_KEY_KP_0;
+ case XK_KP_End: return GLFW_KEY_KP_1;
+ case XK_KP_Down: return GLFW_KEY_KP_2;
+ case XK_KP_Page_Down: return GLFW_KEY_KP_3;
+ case XK_KP_Left: return GLFW_KEY_KP_4;
+ case XK_KP_Right: return GLFW_KEY_KP_6;
+ case XK_KP_Home: return GLFW_KEY_KP_7;
+ case XK_KP_Up: return GLFW_KEY_KP_8;
+ case XK_KP_Page_Up: return GLFW_KEY_KP_9;
+ case XK_KP_Delete: return GLFW_KEY_KP_DECIMAL;
+ case XK_KP_Equal: return GLFW_KEY_KP_EQUAL;
+ case XK_KP_Enter: return GLFW_KEY_KP_ENTER;
+
+ // Last resort: Check for printable keys (should not happen if the XKB
+ // extension is available). This will give a layout dependent mapping
+ // (which is wrong, and we may miss some keys, especially on non-US
+ // keyboards), but it's better than nothing...
+ case XK_a: return GLFW_KEY_A;
+ case XK_b: return GLFW_KEY_B;
+ case XK_c: return GLFW_KEY_C;
+ case XK_d: return GLFW_KEY_D;
+ case XK_e: return GLFW_KEY_E;
+ case XK_f: return GLFW_KEY_F;
+ case XK_g: return GLFW_KEY_G;
+ case XK_h: return GLFW_KEY_H;
+ case XK_i: return GLFW_KEY_I;
+ case XK_j: return GLFW_KEY_J;
+ case XK_k: return GLFW_KEY_K;
+ case XK_l: return GLFW_KEY_L;
+ case XK_m: return GLFW_KEY_M;
+ case XK_n: return GLFW_KEY_N;
+ case XK_o: return GLFW_KEY_O;
+ case XK_p: return GLFW_KEY_P;
+ case XK_q: return GLFW_KEY_Q;
+ case XK_r: return GLFW_KEY_R;
+ case XK_s: return GLFW_KEY_S;
+ case XK_t: return GLFW_KEY_T;
+ case XK_u: return GLFW_KEY_U;
+ case XK_v: return GLFW_KEY_V;
+ case XK_w: return GLFW_KEY_W;
+ case XK_x: return GLFW_KEY_X;
+ case XK_y: return GLFW_KEY_Y;
+ case XK_z: return GLFW_KEY_Z;
+ case XK_1: return GLFW_KEY_1;
+ case XK_2: return GLFW_KEY_2;
+ case XK_3: return GLFW_KEY_3;
+ case XK_4: return GLFW_KEY_4;
+ case XK_5: return GLFW_KEY_5;
+ case XK_6: return GLFW_KEY_6;
+ case XK_7: return GLFW_KEY_7;
+ case XK_8: return GLFW_KEY_8;
+ case XK_9: return GLFW_KEY_9;
+ case XK_0: return GLFW_KEY_0;
+ case XK_space: return GLFW_KEY_SPACE;
+ case XK_minus: return GLFW_KEY_MINUS;
+ case XK_equal: return GLFW_KEY_EQUAL;
+ case XK_bracketleft: return GLFW_KEY_LEFT_BRACKET;
+ case XK_bracketright: return GLFW_KEY_RIGHT_BRACKET;
+ case XK_backslash: return GLFW_KEY_BACKSLASH;
+ case XK_semicolon: return GLFW_KEY_SEMICOLON;
+ case XK_apostrophe: return GLFW_KEY_APOSTROPHE;
+ case XK_grave: return GLFW_KEY_GRAVE_ACCENT;
+ case XK_comma: return GLFW_KEY_COMMA;
+ case XK_period: return GLFW_KEY_PERIOD;
+ case XK_slash: return GLFW_KEY_SLASH;
+ case XK_less: return GLFW_KEY_WORLD_1; // At least in some layouts...
+ default: break;
+ }
+
+ // No matching translation was found
+ return GLFW_KEY_UNKNOWN;
+}
+
+// Create key code translation tables
+//
+static void createKeyTables(void)
+{
+ int scancode, scancodeMin, scancodeMax;
+
+ memset(_glfw.x11.keycodes, -1, sizeof(_glfw.x11.keycodes));
+ memset(_glfw.x11.scancodes, -1, sizeof(_glfw.x11.scancodes));
+
+ if (_glfw.x11.xkb.available)
+ {
+ // Use XKB to determine physical key locations independently of the
+ // current keyboard layout
+
+ XkbDescPtr desc = XkbGetMap(_glfw.x11.display, 0, XkbUseCoreKbd);
+ XkbGetNames(_glfw.x11.display, XkbKeyNamesMask | XkbKeyAliasesMask, desc);
+
+ scancodeMin = desc->min_key_code;
+ scancodeMax = desc->max_key_code;
+
+ const struct
+ {
+ int key;
+ char* name;
+ } keymap[] =
+ {
+ { GLFW_KEY_GRAVE_ACCENT, "TLDE" },
+ { GLFW_KEY_1, "AE01" },
+ { GLFW_KEY_2, "AE02" },
+ { GLFW_KEY_3, "AE03" },
+ { GLFW_KEY_4, "AE04" },
+ { GLFW_KEY_5, "AE05" },
+ { GLFW_KEY_6, "AE06" },
+ { GLFW_KEY_7, "AE07" },
+ { GLFW_KEY_8, "AE08" },
+ { GLFW_KEY_9, "AE09" },
+ { GLFW_KEY_0, "AE10" },
+ { GLFW_KEY_MINUS, "AE11" },
+ { GLFW_KEY_EQUAL, "AE12" },
+ { GLFW_KEY_Q, "AD01" },
+ { GLFW_KEY_W, "AD02" },
+ { GLFW_KEY_E, "AD03" },
+ { GLFW_KEY_R, "AD04" },
+ { GLFW_KEY_T, "AD05" },
+ { GLFW_KEY_Y, "AD06" },
+ { GLFW_KEY_U, "AD07" },
+ { GLFW_KEY_I, "AD08" },
+ { GLFW_KEY_O, "AD09" },
+ { GLFW_KEY_P, "AD10" },
+ { GLFW_KEY_LEFT_BRACKET, "AD11" },
+ { GLFW_KEY_RIGHT_BRACKET, "AD12" },
+ { GLFW_KEY_A, "AC01" },
+ { GLFW_KEY_S, "AC02" },
+ { GLFW_KEY_D, "AC03" },
+ { GLFW_KEY_F, "AC04" },
+ { GLFW_KEY_G, "AC05" },
+ { GLFW_KEY_H, "AC06" },
+ { GLFW_KEY_J, "AC07" },
+ { GLFW_KEY_K, "AC08" },
+ { GLFW_KEY_L, "AC09" },
+ { GLFW_KEY_SEMICOLON, "AC10" },
+ { GLFW_KEY_APOSTROPHE, "AC11" },
+ { GLFW_KEY_Z, "AB01" },
+ { GLFW_KEY_X, "AB02" },
+ { GLFW_KEY_C, "AB03" },
+ { GLFW_KEY_V, "AB04" },
+ { GLFW_KEY_B, "AB05" },
+ { GLFW_KEY_N, "AB06" },
+ { GLFW_KEY_M, "AB07" },
+ { GLFW_KEY_COMMA, "AB08" },
+ { GLFW_KEY_PERIOD, "AB09" },
+ { GLFW_KEY_SLASH, "AB10" },
+ { GLFW_KEY_BACKSLASH, "BKSL" },
+ { GLFW_KEY_WORLD_1, "LSGT" },
+ { GLFW_KEY_SPACE, "SPCE" },
+ { GLFW_KEY_ESCAPE, "ESC" },
+ { GLFW_KEY_ENTER, "RTRN" },
+ { GLFW_KEY_TAB, "TAB" },
+ { GLFW_KEY_BACKSPACE, "BKSP" },
+ { GLFW_KEY_INSERT, "INS" },
+ { GLFW_KEY_DELETE, "DELE" },
+ { GLFW_KEY_RIGHT, "RGHT" },
+ { GLFW_KEY_LEFT, "LEFT" },
+ { GLFW_KEY_DOWN, "DOWN" },
+ { GLFW_KEY_UP, "UP" },
+ { GLFW_KEY_PAGE_UP, "PGUP" },
+ { GLFW_KEY_PAGE_DOWN, "PGDN" },
+ { GLFW_KEY_HOME, "HOME" },
+ { GLFW_KEY_END, "END" },
+ { GLFW_KEY_CAPS_LOCK, "CAPS" },
+ { GLFW_KEY_SCROLL_LOCK, "SCLK" },
+ { GLFW_KEY_NUM_LOCK, "NMLK" },
+ { GLFW_KEY_PRINT_SCREEN, "PRSC" },
+ { GLFW_KEY_PAUSE, "PAUS" },
+ { GLFW_KEY_F1, "FK01" },
+ { GLFW_KEY_F2, "FK02" },
+ { GLFW_KEY_F3, "FK03" },
+ { GLFW_KEY_F4, "FK04" },
+ { GLFW_KEY_F5, "FK05" },
+ { GLFW_KEY_F6, "FK06" },
+ { GLFW_KEY_F7, "FK07" },
+ { GLFW_KEY_F8, "FK08" },
+ { GLFW_KEY_F9, "FK09" },
+ { GLFW_KEY_F10, "FK10" },
+ { GLFW_KEY_F11, "FK11" },
+ { GLFW_KEY_F12, "FK12" },
+ { GLFW_KEY_F13, "FK13" },
+ { GLFW_KEY_F14, "FK14" },
+ { GLFW_KEY_F15, "FK15" },
+ { GLFW_KEY_F16, "FK16" },
+ { GLFW_KEY_F17, "FK17" },
+ { GLFW_KEY_F18, "FK18" },
+ { GLFW_KEY_F19, "FK19" },
+ { GLFW_KEY_F20, "FK20" },
+ { GLFW_KEY_F21, "FK21" },
+ { GLFW_KEY_F22, "FK22" },
+ { GLFW_KEY_F23, "FK23" },
+ { GLFW_KEY_F24, "FK24" },
+ { GLFW_KEY_F25, "FK25" },
+ { GLFW_KEY_KP_0, "KP0" },
+ { GLFW_KEY_KP_1, "KP1" },
+ { GLFW_KEY_KP_2, "KP2" },
+ { GLFW_KEY_KP_3, "KP3" },
+ { GLFW_KEY_KP_4, "KP4" },
+ { GLFW_KEY_KP_5, "KP5" },
+ { GLFW_KEY_KP_6, "KP6" },
+ { GLFW_KEY_KP_7, "KP7" },
+ { GLFW_KEY_KP_8, "KP8" },
+ { GLFW_KEY_KP_9, "KP9" },
+ { GLFW_KEY_KP_DECIMAL, "KPDL" },
+ { GLFW_KEY_KP_DIVIDE, "KPDV" },
+ { GLFW_KEY_KP_MULTIPLY, "KPMU" },
+ { GLFW_KEY_KP_SUBTRACT, "KPSU" },
+ { GLFW_KEY_KP_ADD, "KPAD" },
+ { GLFW_KEY_KP_ENTER, "KPEN" },
+ { GLFW_KEY_KP_EQUAL, "KPEQ" },
+ { GLFW_KEY_LEFT_SHIFT, "LFSH" },
+ { GLFW_KEY_LEFT_CONTROL, "LCTL" },
+ { GLFW_KEY_LEFT_ALT, "LALT" },
+ { GLFW_KEY_LEFT_SUPER, "LWIN" },
+ { GLFW_KEY_RIGHT_SHIFT, "RTSH" },
+ { GLFW_KEY_RIGHT_CONTROL, "RCTL" },
+ { GLFW_KEY_RIGHT_ALT, "RALT" },
+ { GLFW_KEY_RIGHT_ALT, "LVL3" },
+ { GLFW_KEY_RIGHT_ALT, "MDSW" },
+ { GLFW_KEY_RIGHT_SUPER, "RWIN" },
+ { GLFW_KEY_MENU, "MENU" }
+ };
+
+ // Find the X11 key code -> GLFW key code mapping
+ for (scancode = scancodeMin; scancode <= scancodeMax; scancode++)
+ {
+ int key = GLFW_KEY_UNKNOWN;
+
+ // Map the key name to a GLFW key code. Note: We use the US
+ // keyboard layout. Because function keys aren't mapped correctly
+ // when using traditional KeySym translations, they are mapped
+ // here instead.
+ for (int i = 0; i < sizeof(keymap) / sizeof(keymap[0]); i++)
+ {
+ if (strncmp(desc->names->keys[scancode].name,
+ keymap[i].name,
+ XkbKeyNameLength) == 0)
+ {
+ key = keymap[i].key;
+ break;
+ }
+ }
+
+ // Fall back to key aliases in case the key name did not match
+ for (int i = 0; i < desc->names->num_key_aliases; i++)
+ {
+ if (key != GLFW_KEY_UNKNOWN)
+ break;
+
+ if (strncmp(desc->names->key_aliases[i].real,
+ desc->names->keys[scancode].name,
+ XkbKeyNameLength) != 0)
+ {
+ continue;
+ }
+
+ for (int j = 0; j < sizeof(keymap) / sizeof(keymap[0]); j++)
+ {
+ if (strncmp(desc->names->key_aliases[i].alias,
+ keymap[j].name,
+ XkbKeyNameLength) == 0)
+ {
+ key = keymap[j].key;
+ break;
+ }
+ }
+ }
+
+ _glfw.x11.keycodes[scancode] = key;
+ }
+
+ XkbFreeNames(desc, XkbKeyNamesMask, True);
+ XkbFreeKeyboard(desc, 0, True);
+ }
+ else
+ XDisplayKeycodes(_glfw.x11.display, &scancodeMin, &scancodeMax);
+
+ int width;
+ KeySym* keysyms = XGetKeyboardMapping(_glfw.x11.display,
+ scancodeMin,
+ scancodeMax - scancodeMin + 1,
+ &width);
+
+ for (scancode = scancodeMin; scancode <= scancodeMax; scancode++)
+ {
+ // Translate the un-translated key codes using traditional X11 KeySym
+ // lookups
+ if (_glfw.x11.keycodes[scancode] < 0)
+ {
+ const size_t base = (scancode - scancodeMin) * width;
+ _glfw.x11.keycodes[scancode] = translateKeySyms(&keysyms[base], width);
+ }
+
+ // Store the reverse translation for faster key name lookup
+ if (_glfw.x11.keycodes[scancode] > 0)
+ _glfw.x11.scancodes[_glfw.x11.keycodes[scancode]] = scancode;
+ }
+
+ XFree(keysyms);
+}
+
+// Check whether the IM has a usable style
+//
+static GLFWbool hasUsableInputMethodStyle(void)
+{
+ GLFWbool found = GLFW_FALSE;
+ XIMStyles* styles = NULL;
+
+ if (XGetIMValues(_glfw.x11.im, XNQueryInputStyle, &styles, NULL) != NULL)
+ return GLFW_FALSE;
+
+ for (unsigned int i = 0; i < styles->count_styles; i++)
+ {
+ if (styles->supported_styles[i] == (XIMPreeditNothing | XIMStatusNothing))
+ {
+ found = GLFW_TRUE;
+ break;
+ }
+ }
+
+ XFree(styles);
+ return found;
+}
+
+// Check whether the specified atom is supported
+//
+static Atom getAtomIfSupported(Atom* supportedAtoms,
+ unsigned long atomCount,
+ const char* atomName)
+{
+ const Atom atom = XInternAtom(_glfw.x11.display, atomName, False);
+
+ for (unsigned long i = 0; i < atomCount; i++)
+ {
+ if (supportedAtoms[i] == atom)
+ return atom;
+ }
+
+ return None;
+}
+
+// Check whether the running window manager is EWMH-compliant
+//
+static void detectEWMH(void)
+{
+ // First we read the _NET_SUPPORTING_WM_CHECK property on the root window
+
+ Window* windowFromRoot = NULL;
+ if (!_glfwGetWindowPropertyX11(_glfw.x11.root,
+ _glfw.x11.NET_SUPPORTING_WM_CHECK,
+ XA_WINDOW,
+ (unsigned char**) &windowFromRoot))
+ {
+ return;
+ }
+
+ _glfwGrabErrorHandlerX11();
+
+ // If it exists, it should be the XID of a top-level window
+ // Then we look for the same property on that window
+
+ Window* windowFromChild = NULL;
+ if (!_glfwGetWindowPropertyX11(*windowFromRoot,
+ _glfw.x11.NET_SUPPORTING_WM_CHECK,
+ XA_WINDOW,
+ (unsigned char**) &windowFromChild))
+ {
+ XFree(windowFromRoot);
+ return;
+ }
+
+ _glfwReleaseErrorHandlerX11();
+
+ // If the property exists, it should contain the XID of the window
+
+ if (*windowFromRoot != *windowFromChild)
+ {
+ XFree(windowFromRoot);
+ XFree(windowFromChild);
+ return;
+ }
+
+ XFree(windowFromRoot);
+ XFree(windowFromChild);
+
+ // We are now fairly sure that an EWMH-compliant WM is currently running
+ // We can now start querying the WM about what features it supports by
+ // looking in the _NET_SUPPORTED property on the root window
+ // It should contain a list of supported EWMH protocol and state atoms
+
+ Atom* supportedAtoms = NULL;
+ const unsigned long atomCount =
+ _glfwGetWindowPropertyX11(_glfw.x11.root,
+ _glfw.x11.NET_SUPPORTED,
+ XA_ATOM,
+ (unsigned char**) &supportedAtoms);
+
+ // See which of the atoms we support that are supported by the WM
+
+ _glfw.x11.NET_WM_STATE =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_STATE");
+ _glfw.x11.NET_WM_STATE_ABOVE =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_STATE_ABOVE");
+ _glfw.x11.NET_WM_STATE_FULLSCREEN =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_STATE_FULLSCREEN");
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_STATE_MAXIMIZED_VERT");
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_STATE_MAXIMIZED_HORZ");
+ _glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_STATE_DEMANDS_ATTENTION");
+ _glfw.x11.NET_WM_FULLSCREEN_MONITORS =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_FULLSCREEN_MONITORS");
+ _glfw.x11.NET_WM_WINDOW_TYPE =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_WINDOW_TYPE");
+ _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WM_WINDOW_TYPE_NORMAL");
+ _glfw.x11.NET_WORKAREA =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_WORKAREA");
+ _glfw.x11.NET_CURRENT_DESKTOP =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_CURRENT_DESKTOP");
+ _glfw.x11.NET_ACTIVE_WINDOW =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_ACTIVE_WINDOW");
+ _glfw.x11.NET_FRAME_EXTENTS =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_FRAME_EXTENTS");
+ _glfw.x11.NET_REQUEST_FRAME_EXTENTS =
+ getAtomIfSupported(supportedAtoms, atomCount, "_NET_REQUEST_FRAME_EXTENTS");
+
+ if (supportedAtoms)
+ XFree(supportedAtoms);
+}
+
+// Look for and initialize supported X11 extensions
+//
+static GLFWbool initExtensions(void)
+{
+ _glfw.x11.vidmode.handle = _glfw_dlopen("libXxf86vm.so.1");
+ if (_glfw.x11.vidmode.handle)
+ {
+ _glfw.x11.vidmode.QueryExtension = (PFN_XF86VidModeQueryExtension)
+ _glfw_dlsym(_glfw.x11.vidmode.handle, "XF86VidModeQueryExtension");
+ _glfw.x11.vidmode.GetGammaRamp = (PFN_XF86VidModeGetGammaRamp)
+ _glfw_dlsym(_glfw.x11.vidmode.handle, "XF86VidModeGetGammaRamp");
+ _glfw.x11.vidmode.SetGammaRamp = (PFN_XF86VidModeSetGammaRamp)
+ _glfw_dlsym(_glfw.x11.vidmode.handle, "XF86VidModeSetGammaRamp");
+ _glfw.x11.vidmode.GetGammaRampSize = (PFN_XF86VidModeGetGammaRampSize)
+ _glfw_dlsym(_glfw.x11.vidmode.handle, "XF86VidModeGetGammaRampSize");
+
+ _glfw.x11.vidmode.available =
+ XF86VidModeQueryExtension(_glfw.x11.display,
+ &_glfw.x11.vidmode.eventBase,
+ &_glfw.x11.vidmode.errorBase);
+ }
+
+#if defined(__CYGWIN__)
+ _glfw.x11.xi.handle = _glfw_dlopen("libXi-6.so");
+#else
+ _glfw.x11.xi.handle = _glfw_dlopen("libXi.so.6");
+#endif
+ if (_glfw.x11.xi.handle)
+ {
+ _glfw.x11.xi.QueryVersion = (PFN_XIQueryVersion)
+ _glfw_dlsym(_glfw.x11.xi.handle, "XIQueryVersion");
+ _glfw.x11.xi.SelectEvents = (PFN_XISelectEvents)
+ _glfw_dlsym(_glfw.x11.xi.handle, "XISelectEvents");
+
+ if (XQueryExtension(_glfw.x11.display,
+ "XInputExtension",
+ &_glfw.x11.xi.majorOpcode,
+ &_glfw.x11.xi.eventBase,
+ &_glfw.x11.xi.errorBase))
+ {
+ _glfw.x11.xi.major = 2;
+ _glfw.x11.xi.minor = 0;
+
+ if (XIQueryVersion(_glfw.x11.display,
+ &_glfw.x11.xi.major,
+ &_glfw.x11.xi.minor) == Success)
+ {
+ _glfw.x11.xi.available = GLFW_TRUE;
+ }
+ }
+ }
+
+#if defined(__CYGWIN__)
+ _glfw.x11.randr.handle = _glfw_dlopen("libXrandr-2.so");
+#else
+ _glfw.x11.randr.handle = _glfw_dlopen("libXrandr.so.2");
+#endif
+ if (_glfw.x11.randr.handle)
+ {
+ _glfw.x11.randr.AllocGamma = (PFN_XRRAllocGamma)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRAllocGamma");
+ _glfw.x11.randr.FreeGamma = (PFN_XRRFreeGamma)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRFreeGamma");
+ _glfw.x11.randr.FreeCrtcInfo = (PFN_XRRFreeCrtcInfo)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRFreeCrtcInfo");
+ _glfw.x11.randr.FreeGamma = (PFN_XRRFreeGamma)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRFreeGamma");
+ _glfw.x11.randr.FreeOutputInfo = (PFN_XRRFreeOutputInfo)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRFreeOutputInfo");
+ _glfw.x11.randr.FreeScreenResources = (PFN_XRRFreeScreenResources)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRFreeScreenResources");
+ _glfw.x11.randr.GetCrtcGamma = (PFN_XRRGetCrtcGamma)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRGetCrtcGamma");
+ _glfw.x11.randr.GetCrtcGammaSize = (PFN_XRRGetCrtcGammaSize)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRGetCrtcGammaSize");
+ _glfw.x11.randr.GetCrtcInfo = (PFN_XRRGetCrtcInfo)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRGetCrtcInfo");
+ _glfw.x11.randr.GetOutputInfo = (PFN_XRRGetOutputInfo)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRGetOutputInfo");
+ _glfw.x11.randr.GetOutputPrimary = (PFN_XRRGetOutputPrimary)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRGetOutputPrimary");
+ _glfw.x11.randr.GetScreenResourcesCurrent = (PFN_XRRGetScreenResourcesCurrent)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRGetScreenResourcesCurrent");
+ _glfw.x11.randr.QueryExtension = (PFN_XRRQueryExtension)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRQueryExtension");
+ _glfw.x11.randr.QueryVersion = (PFN_XRRQueryVersion)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRQueryVersion");
+ _glfw.x11.randr.SelectInput = (PFN_XRRSelectInput)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRSelectInput");
+ _glfw.x11.randr.SetCrtcConfig = (PFN_XRRSetCrtcConfig)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRSetCrtcConfig");
+ _glfw.x11.randr.SetCrtcGamma = (PFN_XRRSetCrtcGamma)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRSetCrtcGamma");
+ _glfw.x11.randr.UpdateConfiguration = (PFN_XRRUpdateConfiguration)
+ _glfw_dlsym(_glfw.x11.randr.handle, "XRRUpdateConfiguration");
+
+ if (XRRQueryExtension(_glfw.x11.display,
+ &_glfw.x11.randr.eventBase,
+ &_glfw.x11.randr.errorBase))
+ {
+ if (XRRQueryVersion(_glfw.x11.display,
+ &_glfw.x11.randr.major,
+ &_glfw.x11.randr.minor))
+ {
+ // The GLFW RandR path requires at least version 1.3
+ if (_glfw.x11.randr.major > 1 || _glfw.x11.randr.minor >= 3)
+ _glfw.x11.randr.available = GLFW_TRUE;
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to query RandR version");
+ }
+ }
+ }
+
+ if (_glfw.x11.randr.available)
+ {
+ XRRScreenResources* sr = XRRGetScreenResourcesCurrent(_glfw.x11.display,
+ _glfw.x11.root);
+
+ if (!sr->ncrtc || !XRRGetCrtcGammaSize(_glfw.x11.display, sr->crtcs[0]))
+ {
+ // This is likely an older Nvidia driver with broken gamma support
+ // Flag it as useless and fall back to xf86vm gamma, if available
+ _glfw.x11.randr.gammaBroken = GLFW_TRUE;
+ }
+
+ if (!sr->ncrtc)
+ {
+ // A system without CRTCs is likely a system with broken RandR
+ // Disable the RandR monitor path and fall back to core functions
+ _glfw.x11.randr.monitorBroken = GLFW_TRUE;
+ }
+
+ XRRFreeScreenResources(sr);
+ }
+
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ XRRSelectInput(_glfw.x11.display, _glfw.x11.root,
+ RROutputChangeNotifyMask);
+ }
+
+#if defined(__CYGWIN__)
+ _glfw.x11.xcursor.handle = _glfw_dlopen("libXcursor-1.so");
+#else
+ _glfw.x11.xcursor.handle = _glfw_dlopen("libXcursor.so.1");
+#endif
+ if (_glfw.x11.xcursor.handle)
+ {
+ _glfw.x11.xcursor.ImageCreate = (PFN_XcursorImageCreate)
+ _glfw_dlsym(_glfw.x11.xcursor.handle, "XcursorImageCreate");
+ _glfw.x11.xcursor.ImageDestroy = (PFN_XcursorImageDestroy)
+ _glfw_dlsym(_glfw.x11.xcursor.handle, "XcursorImageDestroy");
+ _glfw.x11.xcursor.ImageLoadCursor = (PFN_XcursorImageLoadCursor)
+ _glfw_dlsym(_glfw.x11.xcursor.handle, "XcursorImageLoadCursor");
+ }
+
+#if defined(__CYGWIN__)
+ _glfw.x11.xinerama.handle = _glfw_dlopen("libXinerama-1.so");
+#else
+ _glfw.x11.xinerama.handle = _glfw_dlopen("libXinerama.so.1");
+#endif
+ if (_glfw.x11.xinerama.handle)
+ {
+ _glfw.x11.xinerama.IsActive = (PFN_XineramaIsActive)
+ _glfw_dlsym(_glfw.x11.xinerama.handle, "XineramaIsActive");
+ _glfw.x11.xinerama.QueryExtension = (PFN_XineramaQueryExtension)
+ _glfw_dlsym(_glfw.x11.xinerama.handle, "XineramaQueryExtension");
+ _glfw.x11.xinerama.QueryScreens = (PFN_XineramaQueryScreens)
+ _glfw_dlsym(_glfw.x11.xinerama.handle, "XineramaQueryScreens");
+
+ if (XineramaQueryExtension(_glfw.x11.display,
+ &_glfw.x11.xinerama.major,
+ &_glfw.x11.xinerama.minor))
+ {
+ if (XineramaIsActive(_glfw.x11.display))
+ _glfw.x11.xinerama.available = GLFW_TRUE;
+ }
+ }
+
+ _glfw.x11.xkb.major = 1;
+ _glfw.x11.xkb.minor = 0;
+ _glfw.x11.xkb.available =
+ XkbQueryExtension(_glfw.x11.display,
+ &_glfw.x11.xkb.majorOpcode,
+ &_glfw.x11.xkb.eventBase,
+ &_glfw.x11.xkb.errorBase,
+ &_glfw.x11.xkb.major,
+ &_glfw.x11.xkb.minor);
+
+ if (_glfw.x11.xkb.available)
+ {
+ Bool supported;
+
+ if (XkbSetDetectableAutoRepeat(_glfw.x11.display, True, &supported))
+ {
+ if (supported)
+ _glfw.x11.xkb.detectable = GLFW_TRUE;
+ }
+
+ XkbStateRec state;
+ if (XkbGetState(_glfw.x11.display, XkbUseCoreKbd, &state) == Success)
+ _glfw.x11.xkb.group = (unsigned int)state.group;
+
+ XkbSelectEventDetails(_glfw.x11.display, XkbUseCoreKbd, XkbStateNotify,
+ XkbGroupStateMask, XkbGroupStateMask);
+ }
+
+#if defined(__CYGWIN__)
+ _glfw.x11.x11xcb.handle = _glfw_dlopen("libX11-xcb-1.so");
+#else
+ _glfw.x11.x11xcb.handle = _glfw_dlopen("libX11-xcb.so.1");
+#endif
+ if (_glfw.x11.x11xcb.handle)
+ {
+ _glfw.x11.x11xcb.GetXCBConnection = (PFN_XGetXCBConnection)
+ _glfw_dlsym(_glfw.x11.x11xcb.handle, "XGetXCBConnection");
+ }
+
+#if defined(__CYGWIN__)
+ _glfw.x11.xrender.handle = _glfw_dlopen("libXrender-1.so");
+#else
+ _glfw.x11.xrender.handle = _glfw_dlopen("libXrender.so.1");
+#endif
+ if (_glfw.x11.xrender.handle)
+ {
+ _glfw.x11.xrender.QueryExtension = (PFN_XRenderQueryExtension)
+ _glfw_dlsym(_glfw.x11.xrender.handle, "XRenderQueryExtension");
+ _glfw.x11.xrender.QueryVersion = (PFN_XRenderQueryVersion)
+ _glfw_dlsym(_glfw.x11.xrender.handle, "XRenderQueryVersion");
+ _glfw.x11.xrender.FindVisualFormat = (PFN_XRenderFindVisualFormat)
+ _glfw_dlsym(_glfw.x11.xrender.handle, "XRenderFindVisualFormat");
+
+ if (XRenderQueryExtension(_glfw.x11.display,
+ &_glfw.x11.xrender.errorBase,
+ &_glfw.x11.xrender.eventBase))
+ {
+ if (XRenderQueryVersion(_glfw.x11.display,
+ &_glfw.x11.xrender.major,
+ &_glfw.x11.xrender.minor))
+ {
+ _glfw.x11.xrender.available = GLFW_TRUE;
+ }
+ }
+ }
+
+ // Update the key code LUT
+ // FIXME: We should listen to XkbMapNotify events to track changes to
+ // the keyboard mapping.
+ createKeyTables();
+
+ // String format atoms
+ _glfw.x11.NULL_ = XInternAtom(_glfw.x11.display, "NULL", False);
+ _glfw.x11.UTF8_STRING = XInternAtom(_glfw.x11.display, "UTF8_STRING", False);
+ _glfw.x11.ATOM_PAIR = XInternAtom(_glfw.x11.display, "ATOM_PAIR", False);
+
+ // Custom selection property atom
+ _glfw.x11.GLFW_SELECTION =
+ XInternAtom(_glfw.x11.display, "GLFW_SELECTION", False);
+
+ // ICCCM standard clipboard atoms
+ _glfw.x11.TARGETS = XInternAtom(_glfw.x11.display, "TARGETS", False);
+ _glfw.x11.MULTIPLE = XInternAtom(_glfw.x11.display, "MULTIPLE", False);
+ _glfw.x11.PRIMARY = XInternAtom(_glfw.x11.display, "PRIMARY", False);
+ _glfw.x11.INCR = XInternAtom(_glfw.x11.display, "INCR", False);
+ _glfw.x11.CLIPBOARD = XInternAtom(_glfw.x11.display, "CLIPBOARD", False);
+
+ // Clipboard manager atoms
+ _glfw.x11.CLIPBOARD_MANAGER =
+ XInternAtom(_glfw.x11.display, "CLIPBOARD_MANAGER", False);
+ _glfw.x11.SAVE_TARGETS =
+ XInternAtom(_glfw.x11.display, "SAVE_TARGETS", False);
+
+ // Xdnd (drag and drop) atoms
+ _glfw.x11.XdndAware = XInternAtom(_glfw.x11.display, "XdndAware", False);
+ _glfw.x11.XdndEnter = XInternAtom(_glfw.x11.display, "XdndEnter", False);
+ _glfw.x11.XdndPosition = XInternAtom(_glfw.x11.display, "XdndPosition", False);
+ _glfw.x11.XdndStatus = XInternAtom(_glfw.x11.display, "XdndStatus", False);
+ _glfw.x11.XdndActionCopy = XInternAtom(_glfw.x11.display, "XdndActionCopy", False);
+ _glfw.x11.XdndDrop = XInternAtom(_glfw.x11.display, "XdndDrop", False);
+ _glfw.x11.XdndFinished = XInternAtom(_glfw.x11.display, "XdndFinished", False);
+ _glfw.x11.XdndSelection = XInternAtom(_glfw.x11.display, "XdndSelection", False);
+ _glfw.x11.XdndTypeList = XInternAtom(_glfw.x11.display, "XdndTypeList", False);
+ _glfw.x11.text_uri_list = XInternAtom(_glfw.x11.display, "text/uri-list", False);
+
+ // ICCCM, EWMH and Motif window property atoms
+ // These can be set safely even without WM support
+ // The EWMH atoms that require WM support are handled in detectEWMH
+ _glfw.x11.WM_PROTOCOLS =
+ XInternAtom(_glfw.x11.display, "WM_PROTOCOLS", False);
+ _glfw.x11.WM_STATE =
+ XInternAtom(_glfw.x11.display, "WM_STATE", False);
+ _glfw.x11.WM_DELETE_WINDOW =
+ XInternAtom(_glfw.x11.display, "WM_DELETE_WINDOW", False);
+ _glfw.x11.NET_SUPPORTED =
+ XInternAtom(_glfw.x11.display, "_NET_SUPPORTED", False);
+ _glfw.x11.NET_SUPPORTING_WM_CHECK =
+ XInternAtom(_glfw.x11.display, "_NET_SUPPORTING_WM_CHECK", False);
+ _glfw.x11.NET_WM_ICON =
+ XInternAtom(_glfw.x11.display, "_NET_WM_ICON", False);
+ _glfw.x11.NET_WM_PING =
+ XInternAtom(_glfw.x11.display, "_NET_WM_PING", False);
+ _glfw.x11.NET_WM_PID =
+ XInternAtom(_glfw.x11.display, "_NET_WM_PID", False);
+ _glfw.x11.NET_WM_NAME =
+ XInternAtom(_glfw.x11.display, "_NET_WM_NAME", False);
+ _glfw.x11.NET_WM_ICON_NAME =
+ XInternAtom(_glfw.x11.display, "_NET_WM_ICON_NAME", False);
+ _glfw.x11.NET_WM_BYPASS_COMPOSITOR =
+ XInternAtom(_glfw.x11.display, "_NET_WM_BYPASS_COMPOSITOR", False);
+ _glfw.x11.NET_WM_WINDOW_OPACITY =
+ XInternAtom(_glfw.x11.display, "_NET_WM_WINDOW_OPACITY", False);
+ _glfw.x11.MOTIF_WM_HINTS =
+ XInternAtom(_glfw.x11.display, "_MOTIF_WM_HINTS", False);
+
+ // The compositing manager selection name contains the screen number
+ {
+ char name[32];
+ snprintf(name, sizeof(name), "_NET_WM_CM_S%u", _glfw.x11.screen);
+ _glfw.x11.NET_WM_CM_Sx = XInternAtom(_glfw.x11.display, name, False);
+ }
+
+ // Detect whether an EWMH-conformant window manager is running
+ detectEWMH();
+
+ return GLFW_TRUE;
+}
+
+// Retrieve system content scale via folklore heuristics
+//
+static void getSystemContentScale(float* xscale, float* yscale)
+{
+ // Start by assuming the default X11 DPI
+ // NOTE: Some desktop environments (KDE) may remove the Xft.dpi field when it
+ // would be set to 96, so assume that is the case if we cannot find it
+ float xdpi = 96.f, ydpi = 96.f;
+
+ // NOTE: Basing the scale on Xft.dpi where available should provide the most
+ // consistent user experience (matches Qt, Gtk, etc), although not
+ // always the most accurate one
+ char* rms = XResourceManagerString(_glfw.x11.display);
+ if (rms)
+ {
+ XrmDatabase db = XrmGetStringDatabase(rms);
+ if (db)
+ {
+ XrmValue value;
+ char* type = NULL;
+
+ if (XrmGetResource(db, "Xft.dpi", "Xft.Dpi", &type, &value))
+ {
+ if (type && strcmp(type, "String") == 0)
+ xdpi = ydpi = atof(value.addr);
+ }
+
+ XrmDestroyDatabase(db);
+ }
+ }
+
+ *xscale = xdpi / 96.f;
+ *yscale = ydpi / 96.f;
+}
+
+// Create a blank cursor for hidden and disabled cursor modes
+//
+static Cursor createHiddenCursor(void)
+{
+ unsigned char pixels[16 * 16 * 4] = { 0 };
+ GLFWimage image = { 16, 16, pixels };
+ return _glfwCreateCursorX11(&image, 0, 0);
+}
+
+// Create a helper window for IPC
+//
+static Window createHelperWindow(void)
+{
+ XSetWindowAttributes wa;
+ wa.event_mask = PropertyChangeMask;
+
+ return XCreateWindow(_glfw.x11.display, _glfw.x11.root,
+ 0, 0, 1, 1, 0, 0,
+ InputOnly,
+ DefaultVisual(_glfw.x11.display, _glfw.x11.screen),
+ CWEventMask, &wa);
+}
+
+// X error handler
+//
+static int errorHandler(Display *display, XErrorEvent* event)
+{
+ if (_glfw.x11.display != display)
+ return 0;
+
+ _glfw.x11.errorCode = event->error_code;
+ return 0;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Sets the X error handler callback
+//
+void _glfwGrabErrorHandlerX11(void)
+{
+ _glfw.x11.errorCode = Success;
+ XSetErrorHandler(errorHandler);
+}
+
+// Clears the X error handler callback
+//
+void _glfwReleaseErrorHandlerX11(void)
+{
+ // Synchronize to make sure all commands are processed
+ XSync(_glfw.x11.display, False);
+ XSetErrorHandler(NULL);
+}
+
+// Reports the specified error, appending information about the last X error
+//
+void _glfwInputErrorX11(int error, const char* message)
+{
+ char buffer[_GLFW_MESSAGE_SIZE];
+ XGetErrorText(_glfw.x11.display, _glfw.x11.errorCode,
+ buffer, sizeof(buffer));
+
+ _glfwInputError(error, "%s: %s", message, buffer);
+}
+
+// Creates a native cursor object from the specified image and hotspot
+//
+Cursor _glfwCreateCursorX11(const GLFWimage* image, int xhot, int yhot)
+{
+ int i;
+ Cursor cursor;
+
+ if (!_glfw.x11.xcursor.handle)
+ return None;
+
+ XcursorImage* native = XcursorImageCreate(image->width, image->height);
+ if (native == NULL)
+ return None;
+
+ native->xhot = xhot;
+ native->yhot = yhot;
+
+ unsigned char* source = (unsigned char*) image->pixels;
+ XcursorPixel* target = native->pixels;
+
+ for (i = 0; i < image->width * image->height; i++, target++, source += 4)
+ {
+ unsigned int alpha = source[3];
+
+ *target = (alpha << 24) |
+ ((unsigned char) ((source[0] * alpha) / 255) << 16) |
+ ((unsigned char) ((source[1] * alpha) / 255) << 8) |
+ ((unsigned char) ((source[2] * alpha) / 255) << 0);
+ }
+
+ cursor = XcursorImageLoadCursor(_glfw.x11.display, native);
+ XcursorImageDestroy(native);
+
+ return cursor;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformInit(void)
+{
+ // HACK: If the application has left the locale as "C" then both wide
+ // character text input and explicit UTF-8 input via XIM will break
+ // This sets the CTYPE part of the current locale from the environment
+ // in the hope that it is set to something more sane than "C"
+ if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0)
+ setlocale(LC_CTYPE, "");
+
+ XInitThreads();
+ XrmInitialize();
+
+ _glfw.x11.display = XOpenDisplay(NULL);
+ if (!_glfw.x11.display)
+ {
+ const char* display = getenv("DISPLAY");
+ if (display)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to open display %s", display);
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: The DISPLAY environment variable is missing");
+ }
+
+ return GLFW_FALSE;
+ }
+
+ _glfw.x11.screen = DefaultScreen(_glfw.x11.display);
+ _glfw.x11.root = RootWindow(_glfw.x11.display, _glfw.x11.screen);
+ _glfw.x11.context = XUniqueContext();
+
+ getSystemContentScale(&_glfw.x11.contentScaleX, &_glfw.x11.contentScaleY);
+
+ if (!initExtensions())
+ return GLFW_FALSE;
+
+ _glfw.x11.helperWindowHandle = createHelperWindow();
+ _glfw.x11.hiddenCursorHandle = createHiddenCursor();
+
+ if (XSupportsLocale())
+ {
+ XSetLocaleModifiers("");
+
+ _glfw.x11.im = XOpenIM(_glfw.x11.display, 0, NULL, NULL);
+ if (_glfw.x11.im)
+ {
+ if (!hasUsableInputMethodStyle())
+ {
+ XCloseIM(_glfw.x11.im);
+ _glfw.x11.im = NULL;
+ }
+ }
+ }
+
+#if defined(__linux__)
+ if (!_glfwInitJoysticksLinux())
+ return GLFW_FALSE;
+#endif
+
+ _glfwInitTimerPOSIX();
+
+ _glfwPollMonitorsX11();
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformTerminate(void)
+{
+ if (_glfw.x11.helperWindowHandle)
+ {
+ if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) ==
+ _glfw.x11.helperWindowHandle)
+ {
+ _glfwPushSelectionToManagerX11();
+ }
+
+ XDestroyWindow(_glfw.x11.display, _glfw.x11.helperWindowHandle);
+ _glfw.x11.helperWindowHandle = None;
+ }
+
+ if (_glfw.x11.hiddenCursorHandle)
+ {
+ XFreeCursor(_glfw.x11.display, _glfw.x11.hiddenCursorHandle);
+ _glfw.x11.hiddenCursorHandle = (Cursor) 0;
+ }
+
+ free(_glfw.x11.primarySelectionString);
+ free(_glfw.x11.clipboardString);
+
+ if (_glfw.x11.im)
+ {
+ XCloseIM(_glfw.x11.im);
+ _glfw.x11.im = NULL;
+ }
+
+ if (_glfw.x11.display)
+ {
+ XCloseDisplay(_glfw.x11.display);
+ _glfw.x11.display = NULL;
+ }
+
+ if (_glfw.x11.x11xcb.handle)
+ {
+ _glfw_dlclose(_glfw.x11.x11xcb.handle);
+ _glfw.x11.x11xcb.handle = NULL;
+ }
+
+ if (_glfw.x11.xcursor.handle)
+ {
+ _glfw_dlclose(_glfw.x11.xcursor.handle);
+ _glfw.x11.xcursor.handle = NULL;
+ }
+
+ if (_glfw.x11.randr.handle)
+ {
+ _glfw_dlclose(_glfw.x11.randr.handle);
+ _glfw.x11.randr.handle = NULL;
+ }
+
+ if (_glfw.x11.xinerama.handle)
+ {
+ _glfw_dlclose(_glfw.x11.xinerama.handle);
+ _glfw.x11.xinerama.handle = NULL;
+ }
+
+ if (_glfw.x11.xrender.handle)
+ {
+ _glfw_dlclose(_glfw.x11.xrender.handle);
+ _glfw.x11.xrender.handle = NULL;
+ }
+
+ if (_glfw.x11.vidmode.handle)
+ {
+ _glfw_dlclose(_glfw.x11.vidmode.handle);
+ _glfw.x11.vidmode.handle = NULL;
+ }
+
+ if (_glfw.x11.xi.handle)
+ {
+ _glfw_dlclose(_glfw.x11.xi.handle);
+ _glfw.x11.xi.handle = NULL;
+ }
+
+ // NOTE: These need to be unloaded after XCloseDisplay, as they register
+ // cleanup callbacks that get called by that function
+ _glfwTerminateEGL();
+ _glfwTerminateGLX();
+
+#if defined(__linux__)
+ _glfwTerminateJoysticksLinux();
+#endif
+}
+
+const char* _glfwPlatformGetVersionString(void)
+{
+ return _GLFW_VERSION_NUMBER " X11 GLX EGL OSMesa"
+#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
+ " clock_gettime"
+#else
+ " gettimeofday"
+#endif
+#if defined(__linux__)
+ " evdev"
+#endif
+#if defined(_GLFW_BUILD_DLL)
+ " shared"
+#endif
+ ;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_monitor.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_monitor.c
new file mode 100644
index 0000000..fb3a67b
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_monitor.c
@@ -0,0 +1,614 @@
+//========================================================================
+// GLFW 3.3 X11 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+
+// Check whether the display mode should be included in enumeration
+//
+static GLFWbool modeIsGood(const XRRModeInfo* mi)
+{
+ return (mi->modeFlags & RR_Interlace) == 0;
+}
+
+// Calculates the refresh rate, in Hz, from the specified RandR mode info
+//
+static int calculateRefreshRate(const XRRModeInfo* mi)
+{
+ if (mi->hTotal && mi->vTotal)
+ return (int) round((double) mi->dotClock / ((double) mi->hTotal * (double) mi->vTotal));
+ else
+ return 0;
+}
+
+// Returns the mode info for a RandR mode XID
+//
+static const XRRModeInfo* getModeInfo(const XRRScreenResources* sr, RRMode id)
+{
+ for (int i = 0; i < sr->nmode; i++)
+ {
+ if (sr->modes[i].id == id)
+ return sr->modes + i;
+ }
+
+ return NULL;
+}
+
+// Convert RandR mode info to GLFW video mode
+//
+static GLFWvidmode vidmodeFromModeInfo(const XRRModeInfo* mi,
+ const XRRCrtcInfo* ci)
+{
+ GLFWvidmode mode;
+
+ if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)
+ {
+ mode.width = mi->height;
+ mode.height = mi->width;
+ }
+ else
+ {
+ mode.width = mi->width;
+ mode.height = mi->height;
+ }
+
+ mode.refreshRate = calculateRefreshRate(mi);
+
+ _glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen),
+ &mode.redBits, &mode.greenBits, &mode.blueBits);
+
+ return mode;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Poll for changes in the set of connected monitors
+//
+void _glfwPollMonitorsX11(void)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ int disconnectedCount, screenCount = 0;
+ _GLFWmonitor** disconnected = NULL;
+ XineramaScreenInfo* screens = NULL;
+ XRRScreenResources* sr = XRRGetScreenResourcesCurrent(_glfw.x11.display,
+ _glfw.x11.root);
+ RROutput primary = XRRGetOutputPrimary(_glfw.x11.display,
+ _glfw.x11.root);
+
+ if (_glfw.x11.xinerama.available)
+ screens = XineramaQueryScreens(_glfw.x11.display, &screenCount);
+
+ disconnectedCount = _glfw.monitorCount;
+ if (disconnectedCount)
+ {
+ disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));
+ memcpy(disconnected,
+ _glfw.monitors,
+ _glfw.monitorCount * sizeof(_GLFWmonitor*));
+ }
+
+ for (int i = 0; i < sr->noutput; i++)
+ {
+ int j, type, widthMM, heightMM;
+
+ XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, sr->outputs[i]);
+ if (oi->connection != RR_Connected || oi->crtc == None)
+ {
+ XRRFreeOutputInfo(oi);
+ continue;
+ }
+
+ for (j = 0; j < disconnectedCount; j++)
+ {
+ if (disconnected[j] &&
+ disconnected[j]->x11.output == sr->outputs[i])
+ {
+ disconnected[j] = NULL;
+ break;
+ }
+ }
+
+ if (j < disconnectedCount)
+ {
+ XRRFreeOutputInfo(oi);
+ continue;
+ }
+
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, oi->crtc);
+ if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)
+ {
+ widthMM = oi->mm_height;
+ heightMM = oi->mm_width;
+ }
+ else
+ {
+ widthMM = oi->mm_width;
+ heightMM = oi->mm_height;
+ }
+
+ if (widthMM <= 0 || heightMM <= 0)
+ {
+ // HACK: If RandR does not provide a physical size, assume the
+ // X11 default 96 DPI and calculate from the CRTC viewport
+ // NOTE: These members are affected by rotation, unlike the mode
+ // info and output info members
+ widthMM = (int) (ci->width * 25.4f / 96.f);
+ heightMM = (int) (ci->height * 25.4f / 96.f);
+ }
+
+ _GLFWmonitor* monitor = _glfwAllocMonitor(oi->name, widthMM, heightMM);
+ monitor->x11.output = sr->outputs[i];
+ monitor->x11.crtc = oi->crtc;
+
+ for (j = 0; j < screenCount; j++)
+ {
+ if (screens[j].x_org == ci->x &&
+ screens[j].y_org == ci->y &&
+ screens[j].width == ci->width &&
+ screens[j].height == ci->height)
+ {
+ monitor->x11.index = j;
+ break;
+ }
+ }
+
+ if (monitor->x11.output == primary)
+ type = _GLFW_INSERT_FIRST;
+ else
+ type = _GLFW_INSERT_LAST;
+
+ _glfwInputMonitor(monitor, GLFW_CONNECTED, type);
+
+ XRRFreeOutputInfo(oi);
+ XRRFreeCrtcInfo(ci);
+ }
+
+ XRRFreeScreenResources(sr);
+
+ if (screens)
+ XFree(screens);
+
+ for (int i = 0; i < disconnectedCount; i++)
+ {
+ if (disconnected[i])
+ _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);
+ }
+
+ free(disconnected);
+ }
+ else
+ {
+ const int widthMM = DisplayWidthMM(_glfw.x11.display, _glfw.x11.screen);
+ const int heightMM = DisplayHeightMM(_glfw.x11.display, _glfw.x11.screen);
+
+ _glfwInputMonitor(_glfwAllocMonitor("Display", widthMM, heightMM),
+ GLFW_CONNECTED,
+ _GLFW_INSERT_FIRST);
+ }
+}
+
+// Set the current video mode for the specified monitor
+//
+void _glfwSetVideoModeX11(_GLFWmonitor* monitor, const GLFWvidmode* desired)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ GLFWvidmode current;
+ RRMode native = None;
+
+ const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired);
+ _glfwPlatformGetVideoMode(monitor, &current);
+ if (_glfwCompareVideoModes(&current, best) == 0)
+ return;
+
+ XRRScreenResources* sr =
+ XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+ XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
+
+ for (int i = 0; i < oi->nmode; i++)
+ {
+ const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);
+ if (!modeIsGood(mi))
+ continue;
+
+ const GLFWvidmode mode = vidmodeFromModeInfo(mi, ci);
+ if (_glfwCompareVideoModes(best, &mode) == 0)
+ {
+ native = mi->id;
+ break;
+ }
+ }
+
+ if (native)
+ {
+ if (monitor->x11.oldMode == None)
+ monitor->x11.oldMode = ci->mode;
+
+ XRRSetCrtcConfig(_glfw.x11.display,
+ sr, monitor->x11.crtc,
+ CurrentTime,
+ ci->x, ci->y,
+ native,
+ ci->rotation,
+ ci->outputs,
+ ci->noutput);
+ }
+
+ XRRFreeOutputInfo(oi);
+ XRRFreeCrtcInfo(ci);
+ XRRFreeScreenResources(sr);
+ }
+}
+
+// Restore the saved (original) video mode for the specified monitor
+//
+void _glfwRestoreVideoModeX11(_GLFWmonitor* monitor)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ if (monitor->x11.oldMode == None)
+ return;
+
+ XRRScreenResources* sr =
+ XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+
+ XRRSetCrtcConfig(_glfw.x11.display,
+ sr, monitor->x11.crtc,
+ CurrentTime,
+ ci->x, ci->y,
+ monitor->x11.oldMode,
+ ci->rotation,
+ ci->outputs,
+ ci->noutput);
+
+ XRRFreeCrtcInfo(ci);
+ XRRFreeScreenResources(sr);
+
+ monitor->x11.oldMode = None;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)
+{
+}
+
+void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ XRRScreenResources* sr =
+ XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+
+ if (ci)
+ {
+ if (xpos)
+ *xpos = ci->x;
+ if (ypos)
+ *ypos = ci->y;
+
+ XRRFreeCrtcInfo(ci);
+ }
+
+ XRRFreeScreenResources(sr);
+ }
+}
+
+void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
+ float* xscale, float* yscale)
+{
+ if (xscale)
+ *xscale = _glfw.x11.contentScaleX;
+ if (yscale)
+ *yscale = _glfw.x11.contentScaleY;
+}
+
+void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height)
+{
+ int areaX = 0, areaY = 0, areaWidth = 0, areaHeight = 0;
+
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ XRRScreenResources* sr =
+ XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+
+ areaX = ci->x;
+ areaY = ci->y;
+
+ const XRRModeInfo* mi = getModeInfo(sr, ci->mode);
+
+ if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)
+ {
+ areaWidth = mi->height;
+ areaHeight = mi->width;
+ }
+ else
+ {
+ areaWidth = mi->width;
+ areaHeight = mi->height;
+ }
+
+ XRRFreeCrtcInfo(ci);
+ XRRFreeScreenResources(sr);
+ }
+ else
+ {
+ areaWidth = DisplayWidth(_glfw.x11.display, _glfw.x11.screen);
+ areaHeight = DisplayHeight(_glfw.x11.display, _glfw.x11.screen);
+ }
+
+ if (_glfw.x11.NET_WORKAREA && _glfw.x11.NET_CURRENT_DESKTOP)
+ {
+ Atom* extents = NULL;
+ Atom* desktop = NULL;
+ const unsigned long extentCount =
+ _glfwGetWindowPropertyX11(_glfw.x11.root,
+ _glfw.x11.NET_WORKAREA,
+ XA_CARDINAL,
+ (unsigned char**) &extents);
+
+ if (_glfwGetWindowPropertyX11(_glfw.x11.root,
+ _glfw.x11.NET_CURRENT_DESKTOP,
+ XA_CARDINAL,
+ (unsigned char**) &desktop) > 0)
+ {
+ if (extentCount >= 4 && *desktop < extentCount / 4)
+ {
+ const int globalX = extents[*desktop * 4 + 0];
+ const int globalY = extents[*desktop * 4 + 1];
+ const int globalWidth = extents[*desktop * 4 + 2];
+ const int globalHeight = extents[*desktop * 4 + 3];
+
+ if (areaX < globalX)
+ {
+ areaWidth -= globalX - areaX;
+ areaX = globalX;
+ }
+
+ if (areaY < globalY)
+ {
+ areaHeight -= globalY - areaY;
+ areaY = globalY;
+ }
+
+ if (areaX + areaWidth > globalX + globalWidth)
+ areaWidth = globalX - areaX + globalWidth;
+ if (areaY + areaHeight > globalY + globalHeight)
+ areaHeight = globalY - areaY + globalHeight;
+ }
+ }
+
+ if (extents)
+ XFree(extents);
+ if (desktop)
+ XFree(desktop);
+ }
+
+ if (xpos)
+ *xpos = areaX;
+ if (ypos)
+ *ypos = areaY;
+ if (width)
+ *width = areaWidth;
+ if (height)
+ *height = areaHeight;
+}
+
+GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
+{
+ GLFWvidmode* result;
+
+ *count = 0;
+
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ XRRScreenResources* sr =
+ XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+ XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
+
+ result = calloc(oi->nmode, sizeof(GLFWvidmode));
+
+ for (int i = 0; i < oi->nmode; i++)
+ {
+ const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);
+ if (!modeIsGood(mi))
+ continue;
+
+ const GLFWvidmode mode = vidmodeFromModeInfo(mi, ci);
+ int j;
+
+ for (j = 0; j < *count; j++)
+ {
+ if (_glfwCompareVideoModes(result + j, &mode) == 0)
+ break;
+ }
+
+ // Skip duplicate modes
+ if (j < *count)
+ continue;
+
+ (*count)++;
+ result[*count - 1] = mode;
+ }
+
+ XRRFreeOutputInfo(oi);
+ XRRFreeCrtcInfo(ci);
+ XRRFreeScreenResources(sr);
+ }
+ else
+ {
+ *count = 1;
+ result = calloc(1, sizeof(GLFWvidmode));
+ _glfwPlatformGetVideoMode(monitor, result);
+ }
+
+ return result;
+}
+
+void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
+ {
+ XRRScreenResources* sr =
+ XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+ XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+
+ if (ci)
+ {
+ const XRRModeInfo* mi = getModeInfo(sr, ci->mode);
+ if (mi) // mi can be NULL if the monitor has been disconnected
+ *mode = vidmodeFromModeInfo(mi, ci);
+
+ XRRFreeCrtcInfo(ci);
+ }
+
+ XRRFreeScreenResources(sr);
+ }
+ else
+ {
+ mode->width = DisplayWidth(_glfw.x11.display, _glfw.x11.screen);
+ mode->height = DisplayHeight(_glfw.x11.display, _glfw.x11.screen);
+ mode->refreshRate = 0;
+
+ _glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen),
+ &mode->redBits, &mode->greenBits, &mode->blueBits);
+ }
+}
+
+GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.gammaBroken)
+ {
+ const size_t size = XRRGetCrtcGammaSize(_glfw.x11.display,
+ monitor->x11.crtc);
+ XRRCrtcGamma* gamma = XRRGetCrtcGamma(_glfw.x11.display,
+ monitor->x11.crtc);
+
+ _glfwAllocGammaArrays(ramp, size);
+
+ memcpy(ramp->red, gamma->red, size * sizeof(unsigned short));
+ memcpy(ramp->green, gamma->green, size * sizeof(unsigned short));
+ memcpy(ramp->blue, gamma->blue, size * sizeof(unsigned short));
+
+ XRRFreeGamma(gamma);
+ return GLFW_TRUE;
+ }
+ else if (_glfw.x11.vidmode.available)
+ {
+ int size;
+ XF86VidModeGetGammaRampSize(_glfw.x11.display, _glfw.x11.screen, &size);
+
+ _glfwAllocGammaArrays(ramp, size);
+
+ XF86VidModeGetGammaRamp(_glfw.x11.display,
+ _glfw.x11.screen,
+ ramp->size, ramp->red, ramp->green, ramp->blue);
+ return GLFW_TRUE;
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Gamma ramp access not supported by server");
+ return GLFW_FALSE;
+ }
+}
+
+void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
+{
+ if (_glfw.x11.randr.available && !_glfw.x11.randr.gammaBroken)
+ {
+ if (XRRGetCrtcGammaSize(_glfw.x11.display, monitor->x11.crtc) != ramp->size)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Gamma ramp size must match current ramp size");
+ return;
+ }
+
+ XRRCrtcGamma* gamma = XRRAllocGamma(ramp->size);
+
+ memcpy(gamma->red, ramp->red, ramp->size * sizeof(unsigned short));
+ memcpy(gamma->green, ramp->green, ramp->size * sizeof(unsigned short));
+ memcpy(gamma->blue, ramp->blue, ramp->size * sizeof(unsigned short));
+
+ XRRSetCrtcGamma(_glfw.x11.display, monitor->x11.crtc, gamma);
+ XRRFreeGamma(gamma);
+ }
+ else if (_glfw.x11.vidmode.available)
+ {
+ XF86VidModeSetGammaRamp(_glfw.x11.display,
+ _glfw.x11.screen,
+ ramp->size,
+ (unsigned short*) ramp->red,
+ (unsigned short*) ramp->green,
+ (unsigned short*) ramp->blue);
+ }
+ else
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Gamma ramp access not supported by server");
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(None);
+ return monitor->x11.crtc;
+}
+
+GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* handle)
+{
+ _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(None);
+ return monitor->x11.output;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_platform.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_platform.h
new file mode 100644
index 0000000..37946a2
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_platform.h
@@ -0,0 +1,447 @@
+//========================================================================
+// GLFW 3.3 X11 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+#include <unistd.h>
+#include <signal.h>
+#include <stdint.h>
+#include <dlfcn.h>
+
+#include <X11/Xlib.h>
+#include <X11/keysym.h>
+#include <X11/Xatom.h>
+#include <X11/Xcursor/Xcursor.h>
+
+// The XRandR extension provides mode setting and gamma control
+#include <X11/extensions/Xrandr.h>
+
+// The Xkb extension provides improved keyboard support
+#include <X11/XKBlib.h>
+
+// The Xinerama extension provides legacy monitor indices
+#include <X11/extensions/Xinerama.h>
+
+// The XInput extension provides raw mouse motion input
+#include <X11/extensions/XInput2.h>
+
+typedef XRRCrtcGamma* (* PFN_XRRAllocGamma)(int);
+typedef void (* PFN_XRRFreeCrtcInfo)(XRRCrtcInfo*);
+typedef void (* PFN_XRRFreeGamma)(XRRCrtcGamma*);
+typedef void (* PFN_XRRFreeOutputInfo)(XRROutputInfo*);
+typedef void (* PFN_XRRFreeScreenResources)(XRRScreenResources*);
+typedef XRRCrtcGamma* (* PFN_XRRGetCrtcGamma)(Display*,RRCrtc);
+typedef int (* PFN_XRRGetCrtcGammaSize)(Display*,RRCrtc);
+typedef XRRCrtcInfo* (* PFN_XRRGetCrtcInfo) (Display*,XRRScreenResources*,RRCrtc);
+typedef XRROutputInfo* (* PFN_XRRGetOutputInfo)(Display*,XRRScreenResources*,RROutput);
+typedef RROutput (* PFN_XRRGetOutputPrimary)(Display*,Window);
+typedef XRRScreenResources* (* PFN_XRRGetScreenResourcesCurrent)(Display*,Window);
+typedef Bool (* PFN_XRRQueryExtension)(Display*,int*,int*);
+typedef Status (* PFN_XRRQueryVersion)(Display*,int*,int*);
+typedef void (* PFN_XRRSelectInput)(Display*,Window,int);
+typedef Status (* PFN_XRRSetCrtcConfig)(Display*,XRRScreenResources*,RRCrtc,Time,int,int,RRMode,Rotation,RROutput*,int);
+typedef void (* PFN_XRRSetCrtcGamma)(Display*,RRCrtc,XRRCrtcGamma*);
+typedef int (* PFN_XRRUpdateConfiguration)(XEvent*);
+#define XRRAllocGamma _glfw.x11.randr.AllocGamma
+#define XRRFreeCrtcInfo _glfw.x11.randr.FreeCrtcInfo
+#define XRRFreeGamma _glfw.x11.randr.FreeGamma
+#define XRRFreeOutputInfo _glfw.x11.randr.FreeOutputInfo
+#define XRRFreeScreenResources _glfw.x11.randr.FreeScreenResources
+#define XRRGetCrtcGamma _glfw.x11.randr.GetCrtcGamma
+#define XRRGetCrtcGammaSize _glfw.x11.randr.GetCrtcGammaSize
+#define XRRGetCrtcInfo _glfw.x11.randr.GetCrtcInfo
+#define XRRGetOutputInfo _glfw.x11.randr.GetOutputInfo
+#define XRRGetOutputPrimary _glfw.x11.randr.GetOutputPrimary
+#define XRRGetScreenResourcesCurrent _glfw.x11.randr.GetScreenResourcesCurrent
+#define XRRQueryExtension _glfw.x11.randr.QueryExtension
+#define XRRQueryVersion _glfw.x11.randr.QueryVersion
+#define XRRSelectInput _glfw.x11.randr.SelectInput
+#define XRRSetCrtcConfig _glfw.x11.randr.SetCrtcConfig
+#define XRRSetCrtcGamma _glfw.x11.randr.SetCrtcGamma
+#define XRRUpdateConfiguration _glfw.x11.randr.UpdateConfiguration
+
+typedef XcursorImage* (* PFN_XcursorImageCreate)(int,int);
+typedef void (* PFN_XcursorImageDestroy)(XcursorImage*);
+typedef Cursor (* PFN_XcursorImageLoadCursor)(Display*,const XcursorImage*);
+#define XcursorImageCreate _glfw.x11.xcursor.ImageCreate
+#define XcursorImageDestroy _glfw.x11.xcursor.ImageDestroy
+#define XcursorImageLoadCursor _glfw.x11.xcursor.ImageLoadCursor
+
+typedef Bool (* PFN_XineramaIsActive)(Display*);
+typedef Bool (* PFN_XineramaQueryExtension)(Display*,int*,int*);
+typedef XineramaScreenInfo* (* PFN_XineramaQueryScreens)(Display*,int*);
+#define XineramaIsActive _glfw.x11.xinerama.IsActive
+#define XineramaQueryExtension _glfw.x11.xinerama.QueryExtension
+#define XineramaQueryScreens _glfw.x11.xinerama.QueryScreens
+
+typedef XID xcb_window_t;
+typedef XID xcb_visualid_t;
+typedef struct xcb_connection_t xcb_connection_t;
+typedef xcb_connection_t* (* PFN_XGetXCBConnection)(Display*);
+#define XGetXCBConnection _glfw.x11.x11xcb.GetXCBConnection
+
+typedef Bool (* PFN_XF86VidModeQueryExtension)(Display*,int*,int*);
+typedef Bool (* PFN_XF86VidModeGetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*);
+typedef Bool (* PFN_XF86VidModeSetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*);
+typedef Bool (* PFN_XF86VidModeGetGammaRampSize)(Display*,int,int*);
+#define XF86VidModeQueryExtension _glfw.x11.vidmode.QueryExtension
+#define XF86VidModeGetGammaRamp _glfw.x11.vidmode.GetGammaRamp
+#define XF86VidModeSetGammaRamp _glfw.x11.vidmode.SetGammaRamp
+#define XF86VidModeGetGammaRampSize _glfw.x11.vidmode.GetGammaRampSize
+
+typedef Status (* PFN_XIQueryVersion)(Display*,int*,int*);
+typedef int (* PFN_XISelectEvents)(Display*,Window,XIEventMask*,int);
+#define XIQueryVersion _glfw.x11.xi.QueryVersion
+#define XISelectEvents _glfw.x11.xi.SelectEvents
+
+typedef Bool (* PFN_XRenderQueryExtension)(Display*,int*,int*);
+typedef Status (* PFN_XRenderQueryVersion)(Display*dpy,int*,int*);
+typedef XRenderPictFormat* (* PFN_XRenderFindVisualFormat)(Display*,Visual const*);
+#define XRenderQueryExtension _glfw.x11.xrender.QueryExtension
+#define XRenderQueryVersion _glfw.x11.xrender.QueryVersion
+#define XRenderFindVisualFormat _glfw.x11.xrender.FindVisualFormat
+
+typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
+typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
+
+typedef struct VkXlibSurfaceCreateInfoKHR
+{
+ VkStructureType sType;
+ const void* pNext;
+ VkXlibSurfaceCreateFlagsKHR flags;
+ Display* dpy;
+ Window window;
+} VkXlibSurfaceCreateInfoKHR;
+
+typedef struct VkXcbSurfaceCreateInfoKHR
+{
+ VkStructureType sType;
+ const void* pNext;
+ VkXcbSurfaceCreateFlagsKHR flags;
+ xcb_connection_t* connection;
+ xcb_window_t window;
+} VkXcbSurfaceCreateInfoKHR;
+
+typedef VkResult (APIENTRY *PFN_vkCreateXlibSurfaceKHR)(VkInstance,const VkXlibSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
+typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice,uint32_t,Display*,VisualID);
+typedef VkResult (APIENTRY *PFN_vkCreateXcbSurfaceKHR)(VkInstance,const VkXcbSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
+typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice,uint32_t,xcb_connection_t*,xcb_visualid_t);
+
+#include "posix_thread.h"
+#include "posix_time.h"
+#include "xkb_unicode.h"
+#include "glx_context.h"
+#include "egl_context.h"
+#include "osmesa_context.h"
+#if defined(__linux__)
+#include "linux_joystick.h"
+#else
+#include "null_joystick.h"
+#endif
+
+#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
+#define _glfw_dlclose(handle) dlclose(handle)
+#define _glfw_dlsym(handle, name) dlsym(handle, name)
+
+#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->x11.handle)
+#define _GLFW_EGL_NATIVE_DISPLAY ((EGLNativeDisplayType) _glfw.x11.display)
+
+#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowX11 x11
+#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryX11 x11
+#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorX11 x11
+#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorX11 x11
+
+
+// X11-specific per-window data
+//
+typedef struct _GLFWwindowX11
+{
+ Colormap colormap;
+ Window handle;
+ Window parent;
+ XIC ic;
+
+ GLFWbool overrideRedirect;
+ GLFWbool iconified;
+ GLFWbool maximized;
+
+ // Whether the visual supports framebuffer transparency
+ GLFWbool transparent;
+
+ // Cached position and size used to filter out duplicate events
+ int width, height;
+ int xpos, ypos;
+
+ // The last received cursor position, regardless of source
+ int lastCursorPosX, lastCursorPosY;
+ // The last position the cursor was warped to by GLFW
+ int warpCursorPosX, warpCursorPosY;
+
+ // The time of the last KeyPress event per keycode, for discarding
+ // duplicate key events generated for some keys by ibus
+ Time keyPressTimes[256];
+} _GLFWwindowX11;
+
+// X11-specific global data
+//
+typedef struct _GLFWlibraryX11
+{
+ Display* display;
+ int screen;
+ Window root;
+
+ // System content scale
+ float contentScaleX, contentScaleY;
+ // Helper window for IPC
+ Window helperWindowHandle;
+ // Invisible cursor for hidden cursor mode
+ Cursor hiddenCursorHandle;
+ // Context for mapping window XIDs to _GLFWwindow pointers
+ XContext context;
+ // XIM input method
+ XIM im;
+ // Most recent error code received by X error handler
+ int errorCode;
+ // Primary selection string (while the primary selection is owned)
+ char* primarySelectionString;
+ // Clipboard string (while the selection is owned)
+ char* clipboardString;
+ // Key name string
+ char keynames[GLFW_KEY_LAST + 1][5];
+ // X11 keycode to GLFW key LUT
+ short int keycodes[256];
+ // GLFW key to X11 keycode LUT
+ short int scancodes[GLFW_KEY_LAST + 1];
+ // Where to place the cursor when re-enabled
+ double restoreCursorPosX, restoreCursorPosY;
+ // The window whose disabled cursor mode is active
+ _GLFWwindow* disabledCursorWindow;
+
+ // Window manager atoms
+ Atom NET_SUPPORTED;
+ Atom NET_SUPPORTING_WM_CHECK;
+ Atom WM_PROTOCOLS;
+ Atom WM_STATE;
+ Atom WM_DELETE_WINDOW;
+ Atom NET_WM_NAME;
+ Atom NET_WM_ICON_NAME;
+ Atom NET_WM_ICON;
+ Atom NET_WM_PID;
+ Atom NET_WM_PING;
+ Atom NET_WM_WINDOW_TYPE;
+ Atom NET_WM_WINDOW_TYPE_NORMAL;
+ Atom NET_WM_STATE;
+ Atom NET_WM_STATE_ABOVE;
+ Atom NET_WM_STATE_FULLSCREEN;
+ Atom NET_WM_STATE_MAXIMIZED_VERT;
+ Atom NET_WM_STATE_MAXIMIZED_HORZ;
+ Atom NET_WM_STATE_DEMANDS_ATTENTION;
+ Atom NET_WM_BYPASS_COMPOSITOR;
+ Atom NET_WM_FULLSCREEN_MONITORS;
+ Atom NET_WM_WINDOW_OPACITY;
+ Atom NET_WM_CM_Sx;
+ Atom NET_WORKAREA;
+ Atom NET_CURRENT_DESKTOP;
+ Atom NET_ACTIVE_WINDOW;
+ Atom NET_FRAME_EXTENTS;
+ Atom NET_REQUEST_FRAME_EXTENTS;
+ Atom MOTIF_WM_HINTS;
+
+ // Xdnd (drag and drop) atoms
+ Atom XdndAware;
+ Atom XdndEnter;
+ Atom XdndPosition;
+ Atom XdndStatus;
+ Atom XdndActionCopy;
+ Atom XdndDrop;
+ Atom XdndFinished;
+ Atom XdndSelection;
+ Atom XdndTypeList;
+ Atom text_uri_list;
+
+ // Selection (clipboard) atoms
+ Atom TARGETS;
+ Atom MULTIPLE;
+ Atom INCR;
+ Atom CLIPBOARD;
+ Atom PRIMARY;
+ Atom CLIPBOARD_MANAGER;
+ Atom SAVE_TARGETS;
+ Atom NULL_;
+ Atom UTF8_STRING;
+ Atom COMPOUND_STRING;
+ Atom ATOM_PAIR;
+ Atom GLFW_SELECTION;
+
+ struct {
+ GLFWbool available;
+ void* handle;
+ int eventBase;
+ int errorBase;
+ int major;
+ int minor;
+ GLFWbool gammaBroken;
+ GLFWbool monitorBroken;
+ PFN_XRRAllocGamma AllocGamma;
+ PFN_XRRFreeCrtcInfo FreeCrtcInfo;
+ PFN_XRRFreeGamma FreeGamma;
+ PFN_XRRFreeOutputInfo FreeOutputInfo;
+ PFN_XRRFreeScreenResources FreeScreenResources;
+ PFN_XRRGetCrtcGamma GetCrtcGamma;
+ PFN_XRRGetCrtcGammaSize GetCrtcGammaSize;
+ PFN_XRRGetCrtcInfo GetCrtcInfo;
+ PFN_XRRGetOutputInfo GetOutputInfo;
+ PFN_XRRGetOutputPrimary GetOutputPrimary;
+ PFN_XRRGetScreenResourcesCurrent GetScreenResourcesCurrent;
+ PFN_XRRQueryExtension QueryExtension;
+ PFN_XRRQueryVersion QueryVersion;
+ PFN_XRRSelectInput SelectInput;
+ PFN_XRRSetCrtcConfig SetCrtcConfig;
+ PFN_XRRSetCrtcGamma SetCrtcGamma;
+ PFN_XRRUpdateConfiguration UpdateConfiguration;
+ } randr;
+
+ struct {
+ GLFWbool available;
+ GLFWbool detectable;
+ int majorOpcode;
+ int eventBase;
+ int errorBase;
+ int major;
+ int minor;
+ unsigned int group;
+ } xkb;
+
+ struct {
+ int count;
+ int timeout;
+ int interval;
+ int blanking;
+ int exposure;
+ } saver;
+
+ struct {
+ int version;
+ Window source;
+ Atom format;
+ } xdnd;
+
+ struct {
+ void* handle;
+ PFN_XcursorImageCreate ImageCreate;
+ PFN_XcursorImageDestroy ImageDestroy;
+ PFN_XcursorImageLoadCursor ImageLoadCursor;
+ } xcursor;
+
+ struct {
+ GLFWbool available;
+ void* handle;
+ int major;
+ int minor;
+ PFN_XineramaIsActive IsActive;
+ PFN_XineramaQueryExtension QueryExtension;
+ PFN_XineramaQueryScreens QueryScreens;
+ } xinerama;
+
+ struct {
+ void* handle;
+ PFN_XGetXCBConnection GetXCBConnection;
+ } x11xcb;
+
+ struct {
+ GLFWbool available;
+ void* handle;
+ int eventBase;
+ int errorBase;
+ PFN_XF86VidModeQueryExtension QueryExtension;
+ PFN_XF86VidModeGetGammaRamp GetGammaRamp;
+ PFN_XF86VidModeSetGammaRamp SetGammaRamp;
+ PFN_XF86VidModeGetGammaRampSize GetGammaRampSize;
+ } vidmode;
+
+ struct {
+ GLFWbool available;
+ void* handle;
+ int majorOpcode;
+ int eventBase;
+ int errorBase;
+ int major;
+ int minor;
+ PFN_XIQueryVersion QueryVersion;
+ PFN_XISelectEvents SelectEvents;
+ } xi;
+
+ struct {
+ GLFWbool available;
+ void* handle;
+ int major;
+ int minor;
+ int eventBase;
+ int errorBase;
+ PFN_XRenderQueryExtension QueryExtension;
+ PFN_XRenderQueryVersion QueryVersion;
+ PFN_XRenderFindVisualFormat FindVisualFormat;
+ } xrender;
+} _GLFWlibraryX11;
+
+// X11-specific per-monitor data
+//
+typedef struct _GLFWmonitorX11
+{
+ RROutput output;
+ RRCrtc crtc;
+ RRMode oldMode;
+
+ // Index of corresponding Xinerama screen,
+ // for EWMH full screen window placement
+ int index;
+} _GLFWmonitorX11;
+
+// X11-specific per-cursor data
+//
+typedef struct _GLFWcursorX11
+{
+ Cursor handle;
+} _GLFWcursorX11;
+
+
+void _glfwPollMonitorsX11(void);
+void _glfwSetVideoModeX11(_GLFWmonitor* monitor, const GLFWvidmode* desired);
+void _glfwRestoreVideoModeX11(_GLFWmonitor* monitor);
+
+Cursor _glfwCreateCursorX11(const GLFWimage* image, int xhot, int yhot);
+
+unsigned long _glfwGetWindowPropertyX11(Window window,
+ Atom property,
+ Atom type,
+ unsigned char** value);
+GLFWbool _glfwIsVisualTransparentX11(Visual* visual);
+
+void _glfwGrabErrorHandlerX11(void);
+void _glfwReleaseErrorHandlerX11(void);
+void _glfwInputErrorX11(int error, const char* message);
+
+void _glfwPushSelectionToManagerX11(void);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_window.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_window.c
new file mode 100644
index 0000000..5ac94ce
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_window.c
@@ -0,0 +1,3194 @@
+//========================================================================
+// GLFW 3.3 X11 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+#include <X11/cursorfont.h>
+#include <X11/Xmd.h>
+
+#include <sys/select.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <errno.h>
+#include <assert.h>
+
+// Action for EWMH client messages
+#define _NET_WM_STATE_REMOVE 0
+#define _NET_WM_STATE_ADD 1
+#define _NET_WM_STATE_TOGGLE 2
+
+// Additional mouse button names for XButtonEvent
+#define Button6 6
+#define Button7 7
+
+// Motif WM hints flags
+#define MWM_HINTS_DECORATIONS 2
+#define MWM_DECOR_ALL 1
+
+#define _GLFW_XDND_VERSION 5
+
+
+// Wait for data to arrive using select
+// This avoids blocking other threads via the per-display Xlib lock that also
+// covers GLX functions
+//
+static GLFWbool waitForEvent(double* timeout)
+{
+ fd_set fds;
+ const int fd = ConnectionNumber(_glfw.x11.display);
+ int count = fd + 1;
+
+#if defined(__linux__)
+ if (_glfw.linjs.inotify > fd)
+ count = _glfw.linjs.inotify + 1;
+#endif
+ for (;;)
+ {
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+#if defined(__linux__)
+ if (_glfw.linjs.inotify > 0)
+ FD_SET(_glfw.linjs.inotify, &fds);
+#endif
+
+ if (timeout)
+ {
+ const long seconds = (long) *timeout;
+ const long microseconds = (long) ((*timeout - seconds) * 1e6);
+ struct timeval tv = { seconds, microseconds };
+ const uint64_t base = _glfwPlatformGetTimerValue();
+
+ const int result = select(count, &fds, NULL, NULL, &tv);
+ const int error = errno;
+
+ *timeout -= (_glfwPlatformGetTimerValue() - base) /
+ (double) _glfwPlatformGetTimerFrequency();
+
+ if (result > 0)
+ return GLFW_TRUE;
+ if ((result == -1 && error == EINTR) || *timeout <= 0.0)
+ return GLFW_FALSE;
+ }
+ else if (select(count, &fds, NULL, NULL, NULL) != -1 || errno != EINTR)
+ return GLFW_TRUE;
+ }
+}
+
+// Waits until a VisibilityNotify event arrives for the specified window or the
+// timeout period elapses (ICCCM section 4.2.2)
+//
+static GLFWbool waitForVisibilityNotify(_GLFWwindow* window)
+{
+ XEvent dummy;
+ double timeout = 0.1;
+
+ while (!XCheckTypedWindowEvent(_glfw.x11.display,
+ window->x11.handle,
+ VisibilityNotify,
+ &dummy))
+ {
+ if (!waitForEvent(&timeout))
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+// Returns whether the window is iconified
+//
+static int getWindowState(_GLFWwindow* window)
+{
+ int result = WithdrawnState;
+ struct {
+ CARD32 state;
+ Window icon;
+ } *state = NULL;
+
+ if (_glfwGetWindowPropertyX11(window->x11.handle,
+ _glfw.x11.WM_STATE,
+ _glfw.x11.WM_STATE,
+ (unsigned char**) &state) >= 2)
+ {
+ result = state->state;
+ }
+
+ if (state)
+ XFree(state);
+
+ return result;
+}
+
+// Returns whether the event is a selection event
+//
+static Bool isSelectionEvent(Display* display, XEvent* event, XPointer pointer)
+{
+ if (event->xany.window != _glfw.x11.helperWindowHandle)
+ return False;
+
+ return event->type == SelectionRequest ||
+ event->type == SelectionNotify ||
+ event->type == SelectionClear;
+}
+
+// Returns whether it is a _NET_FRAME_EXTENTS event for the specified window
+//
+static Bool isFrameExtentsEvent(Display* display, XEvent* event, XPointer pointer)
+{
+ _GLFWwindow* window = (_GLFWwindow*) pointer;
+ return event->type == PropertyNotify &&
+ event->xproperty.state == PropertyNewValue &&
+ event->xproperty.window == window->x11.handle &&
+ event->xproperty.atom == _glfw.x11.NET_FRAME_EXTENTS;
+}
+
+// Returns whether it is a property event for the specified selection transfer
+//
+static Bool isSelPropNewValueNotify(Display* display, XEvent* event, XPointer pointer)
+{
+ XEvent* notification = (XEvent*) pointer;
+ return event->type == PropertyNotify &&
+ event->xproperty.state == PropertyNewValue &&
+ event->xproperty.window == notification->xselection.requestor &&
+ event->xproperty.atom == notification->xselection.property;
+}
+
+// Translates an X event modifier state mask
+//
+static int translateState(int state)
+{
+ int mods = 0;
+
+ if (state & ShiftMask)
+ mods |= GLFW_MOD_SHIFT;
+ if (state & ControlMask)
+ mods |= GLFW_MOD_CONTROL;
+ if (state & Mod1Mask)
+ mods |= GLFW_MOD_ALT;
+ if (state & Mod4Mask)
+ mods |= GLFW_MOD_SUPER;
+ if (state & LockMask)
+ mods |= GLFW_MOD_CAPS_LOCK;
+ if (state & Mod2Mask)
+ mods |= GLFW_MOD_NUM_LOCK;
+
+ return mods;
+}
+
+// Translates an X11 key code to a GLFW key token
+//
+static int translateKey(int scancode)
+{
+ // Use the pre-filled LUT (see createKeyTables() in x11_init.c)
+ if (scancode < 0 || scancode > 255)
+ return GLFW_KEY_UNKNOWN;
+
+ return _glfw.x11.keycodes[scancode];
+}
+
+// Sends an EWMH or ICCCM event to the window manager
+//
+static void sendEventToWM(_GLFWwindow* window, Atom type,
+ long a, long b, long c, long d, long e)
+{
+ XEvent event = { ClientMessage };
+ event.xclient.window = window->x11.handle;
+ event.xclient.format = 32; // Data is 32-bit longs
+ event.xclient.message_type = type;
+ event.xclient.data.l[0] = a;
+ event.xclient.data.l[1] = b;
+ event.xclient.data.l[2] = c;
+ event.xclient.data.l[3] = d;
+ event.xclient.data.l[4] = e;
+
+ XSendEvent(_glfw.x11.display, _glfw.x11.root,
+ False,
+ SubstructureNotifyMask | SubstructureRedirectMask,
+ &event);
+}
+
+// Updates the normal hints according to the window settings
+//
+static void updateNormalHints(_GLFWwindow* window, int width, int height)
+{
+ XSizeHints* hints = XAllocSizeHints();
+
+ if (!window->monitor)
+ {
+ if (window->resizable)
+ {
+ if (window->minwidth != GLFW_DONT_CARE &&
+ window->minheight != GLFW_DONT_CARE)
+ {
+ hints->flags |= PMinSize;
+ hints->min_width = window->minwidth;
+ hints->min_height = window->minheight;
+ }
+
+ if (window->maxwidth != GLFW_DONT_CARE &&
+ window->maxheight != GLFW_DONT_CARE)
+ {
+ hints->flags |= PMaxSize;
+ hints->max_width = window->maxwidth;
+ hints->max_height = window->maxheight;
+ }
+
+ if (window->numer != GLFW_DONT_CARE &&
+ window->denom != GLFW_DONT_CARE)
+ {
+ hints->flags |= PAspect;
+ hints->min_aspect.x = hints->max_aspect.x = window->numer;
+ hints->min_aspect.y = hints->max_aspect.y = window->denom;
+ }
+ }
+ else
+ {
+ hints->flags |= (PMinSize | PMaxSize);
+ hints->min_width = hints->max_width = width;
+ hints->min_height = hints->max_height = height;
+ }
+ }
+
+ hints->flags |= PWinGravity;
+ hints->win_gravity = StaticGravity;
+
+ XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);
+ XFree(hints);
+}
+
+// Updates the full screen status of the window
+//
+static void updateWindowMode(_GLFWwindow* window)
+{
+ if (window->monitor)
+ {
+ if (_glfw.x11.xinerama.available &&
+ _glfw.x11.NET_WM_FULLSCREEN_MONITORS)
+ {
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_FULLSCREEN_MONITORS,
+ window->monitor->x11.index,
+ window->monitor->x11.index,
+ window->monitor->x11.index,
+ window->monitor->x11.index,
+ 0);
+ }
+
+ if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN)
+ {
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_STATE,
+ _NET_WM_STATE_ADD,
+ _glfw.x11.NET_WM_STATE_FULLSCREEN,
+ 0, 1, 0);
+ }
+ else
+ {
+ // This is the butcher's way of removing window decorations
+ // Setting the override-redirect attribute on a window makes the
+ // window manager ignore the window completely (ICCCM, section 4)
+ // The good thing is that this makes undecorated full screen windows
+ // easy to do; the bad thing is that we have to do everything
+ // manually and some things (like iconify/restore) won't work at
+ // all, as those are tasks usually performed by the window manager
+
+ XSetWindowAttributes attributes;
+ attributes.override_redirect = True;
+ XChangeWindowAttributes(_glfw.x11.display,
+ window->x11.handle,
+ CWOverrideRedirect,
+ &attributes);
+
+ window->x11.overrideRedirect = GLFW_TRUE;
+ }
+
+ // Enable compositor bypass
+ if (!window->x11.transparent)
+ {
+ const unsigned long value = 1;
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char*) &value, 1);
+ }
+ }
+ else
+ {
+ if (_glfw.x11.xinerama.available &&
+ _glfw.x11.NET_WM_FULLSCREEN_MONITORS)
+ {
+ XDeleteProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_FULLSCREEN_MONITORS);
+ }
+
+ if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN)
+ {
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_STATE,
+ _NET_WM_STATE_REMOVE,
+ _glfw.x11.NET_WM_STATE_FULLSCREEN,
+ 0, 1, 0);
+ }
+ else
+ {
+ XSetWindowAttributes attributes;
+ attributes.override_redirect = False;
+ XChangeWindowAttributes(_glfw.x11.display,
+ window->x11.handle,
+ CWOverrideRedirect,
+ &attributes);
+
+ window->x11.overrideRedirect = GLFW_FALSE;
+ }
+
+ // Disable compositor bypass
+ if (!window->x11.transparent)
+ {
+ XDeleteProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_BYPASS_COMPOSITOR);
+ }
+ }
+}
+
+// Splits and translates a text/uri-list into separate file paths
+// NOTE: This function destroys the provided string
+//
+static char** parseUriList(char* text, int* count)
+{
+ const char* prefix = "file://";
+ char** paths = NULL;
+ char* line;
+
+ *count = 0;
+
+ while ((line = strtok(text, "\r\n")))
+ {
+ text = NULL;
+
+ if (line[0] == '#')
+ continue;
+
+ if (strncmp(line, prefix, strlen(prefix)) == 0)
+ {
+ line += strlen(prefix);
+ // TODO: Validate hostname
+ while (*line != '/')
+ line++;
+ }
+
+ (*count)++;
+
+ char* path = calloc(strlen(line) + 1, 1);
+ paths = realloc(paths, *count * sizeof(char*));
+ paths[*count - 1] = path;
+
+ while (*line)
+ {
+ if (line[0] == '%' && line[1] && line[2])
+ {
+ const char digits[3] = { line[1], line[2], '\0' };
+ *path = strtol(digits, NULL, 16);
+ line += 2;
+ }
+ else
+ *path = *line;
+
+ path++;
+ line++;
+ }
+ }
+
+ return paths;
+}
+
+// Encode a Unicode code point to a UTF-8 stream
+// Based on cutef8 by Jeff Bezanson (Public Domain)
+//
+static size_t encodeUTF8(char* s, unsigned int ch)
+{
+ size_t count = 0;
+
+ if (ch < 0x80)
+ s[count++] = (char) ch;
+ else if (ch < 0x800)
+ {
+ s[count++] = (ch >> 6) | 0xc0;
+ s[count++] = (ch & 0x3f) | 0x80;
+ }
+ else if (ch < 0x10000)
+ {
+ s[count++] = (ch >> 12) | 0xe0;
+ s[count++] = ((ch >> 6) & 0x3f) | 0x80;
+ s[count++] = (ch & 0x3f) | 0x80;
+ }
+ else if (ch < 0x110000)
+ {
+ s[count++] = (ch >> 18) | 0xf0;
+ s[count++] = ((ch >> 12) & 0x3f) | 0x80;
+ s[count++] = ((ch >> 6) & 0x3f) | 0x80;
+ s[count++] = (ch & 0x3f) | 0x80;
+ }
+
+ return count;
+}
+
+// Decode a Unicode code point from a UTF-8 stream
+// Based on cutef8 by Jeff Bezanson (Public Domain)
+//
+#if defined(X_HAVE_UTF8_STRING)
+static unsigned int decodeUTF8(const char** s)
+{
+ unsigned int ch = 0, count = 0;
+ static const unsigned int offsets[] =
+ {
+ 0x00000000u, 0x00003080u, 0x000e2080u,
+ 0x03c82080u, 0xfa082080u, 0x82082080u
+ };
+
+ do
+ {
+ ch = (ch << 6) + (unsigned char) **s;
+ (*s)++;
+ count++;
+ } while ((**s & 0xc0) == 0x80);
+
+ assert(count <= 6);
+ return ch - offsets[count - 1];
+}
+#endif /*X_HAVE_UTF8_STRING*/
+
+// Convert the specified Latin-1 string to UTF-8
+//
+static char* convertLatin1toUTF8(const char* source)
+{
+ size_t size = 1;
+ const char* sp;
+
+ for (sp = source; *sp; sp++)
+ size += (*sp & 0x80) ? 2 : 1;
+
+ char* target = calloc(size, 1);
+ char* tp = target;
+
+ for (sp = source; *sp; sp++)
+ tp += encodeUTF8(tp, *sp);
+
+ return target;
+}
+
+// Updates the cursor image according to its cursor mode
+//
+static void updateCursorImage(_GLFWwindow* window)
+{
+ if (window->cursorMode == GLFW_CURSOR_NORMAL)
+ {
+ if (window->cursor)
+ {
+ XDefineCursor(_glfw.x11.display, window->x11.handle,
+ window->cursor->x11.handle);
+ }
+ else
+ XUndefineCursor(_glfw.x11.display, window->x11.handle);
+ }
+ else
+ {
+ XDefineCursor(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.hiddenCursorHandle);
+ }
+}
+
+// Enable XI2 raw mouse motion events
+//
+static void enableRawMouseMotion(_GLFWwindow* window)
+{
+ XIEventMask em;
+ unsigned char mask[XIMaskLen(XI_RawMotion)] = { 0 };
+
+ em.deviceid = XIAllMasterDevices;
+ em.mask_len = sizeof(mask);
+ em.mask = mask;
+ XISetMask(mask, XI_RawMotion);
+
+ XISelectEvents(_glfw.x11.display, _glfw.x11.root, &em, 1);
+}
+
+// Disable XI2 raw mouse motion events
+//
+static void disableRawMouseMotion(_GLFWwindow* window)
+{
+ XIEventMask em;
+ unsigned char mask[] = { 0 };
+
+ em.deviceid = XIAllMasterDevices;
+ em.mask_len = sizeof(mask);
+ em.mask = mask;
+
+ XISelectEvents(_glfw.x11.display, _glfw.x11.root, &em, 1);
+}
+
+// Apply disabled cursor mode to a focused window
+//
+static void disableCursor(_GLFWwindow* window)
+{
+ if (window->rawMouseMotion)
+ enableRawMouseMotion(window);
+
+ _glfw.x11.disabledCursorWindow = window;
+ _glfwPlatformGetCursorPos(window,
+ &_glfw.x11.restoreCursorPosX,
+ &_glfw.x11.restoreCursorPosY);
+ updateCursorImage(window);
+ _glfwCenterCursorInContentArea(window);
+ XGrabPointer(_glfw.x11.display, window->x11.handle, True,
+ ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
+ GrabModeAsync, GrabModeAsync,
+ window->x11.handle,
+ _glfw.x11.hiddenCursorHandle,
+ CurrentTime);
+}
+
+// Exit disabled cursor mode for the specified window
+//
+static void enableCursor(_GLFWwindow* window)
+{
+ if (window->rawMouseMotion)
+ disableRawMouseMotion(window);
+
+ _glfw.x11.disabledCursorWindow = NULL;
+ XUngrabPointer(_glfw.x11.display, CurrentTime);
+ _glfwPlatformSetCursorPos(window,
+ _glfw.x11.restoreCursorPosX,
+ _glfw.x11.restoreCursorPosY);
+ updateCursorImage(window);
+}
+
+// Create the X11 window (and its colormap)
+//
+static GLFWbool createNativeWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ Visual* visual, int depth)
+{
+ int width = wndconfig->width;
+ int height = wndconfig->height;
+
+ if (wndconfig->scaleToMonitor)
+ {
+ width *= _glfw.x11.contentScaleX;
+ height *= _glfw.x11.contentScaleY;
+ }
+
+ // Create a colormap based on the visual used by the current context
+ window->x11.colormap = XCreateColormap(_glfw.x11.display,
+ _glfw.x11.root,
+ visual,
+ AllocNone);
+
+ window->x11.transparent = _glfwIsVisualTransparentX11(visual);
+
+ XSetWindowAttributes wa = { 0 };
+ wa.colormap = window->x11.colormap;
+ wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask |
+ PointerMotionMask | ButtonPressMask | ButtonReleaseMask |
+ ExposureMask | FocusChangeMask | VisibilityChangeMask |
+ EnterWindowMask | LeaveWindowMask | PropertyChangeMask;
+
+ _glfwGrabErrorHandlerX11();
+
+ window->x11.parent = _glfw.x11.root;
+ window->x11.handle = XCreateWindow(_glfw.x11.display,
+ _glfw.x11.root,
+ 0, 0, // Position
+ width, height,
+ 0, // Border width
+ depth, // Color depth
+ InputOutput,
+ visual,
+ CWBorderPixel | CWColormap | CWEventMask,
+ &wa);
+
+ _glfwReleaseErrorHandlerX11();
+
+ if (!window->x11.handle)
+ {
+ _glfwInputErrorX11(GLFW_PLATFORM_ERROR,
+ "X11: Failed to create window");
+ return GLFW_FALSE;
+ }
+
+ XSaveContext(_glfw.x11.display,
+ window->x11.handle,
+ _glfw.x11.context,
+ (XPointer) window);
+
+ if (!wndconfig->decorated)
+ _glfwPlatformSetWindowDecorated(window, GLFW_FALSE);
+
+ if (_glfw.x11.NET_WM_STATE && !window->monitor)
+ {
+ Atom states[3];
+ int count = 0;
+
+ if (wndconfig->floating)
+ {
+ if (_glfw.x11.NET_WM_STATE_ABOVE)
+ states[count++] = _glfw.x11.NET_WM_STATE_ABOVE;
+ }
+
+ if (wndconfig->maximized)
+ {
+ if (_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT &&
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
+ {
+ states[count++] = _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT;
+ states[count++] = _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ;
+ window->x11.maximized = GLFW_TRUE;
+ }
+ }
+
+ if (count)
+ {
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
+ PropModeReplace, (unsigned char*) states, count);
+ }
+ }
+
+ // Declare the WM protocols supported by GLFW
+ {
+ Atom protocols[] =
+ {
+ _glfw.x11.WM_DELETE_WINDOW,
+ _glfw.x11.NET_WM_PING
+ };
+
+ XSetWMProtocols(_glfw.x11.display, window->x11.handle,
+ protocols, sizeof(protocols) / sizeof(Atom));
+ }
+
+ // Declare our PID
+ {
+ const long pid = getpid();
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_PID, XA_CARDINAL, 32,
+ PropModeReplace,
+ (unsigned char*) &pid, 1);
+ }
+
+ if (_glfw.x11.NET_WM_WINDOW_TYPE && _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL)
+ {
+ Atom type = _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL;
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_WINDOW_TYPE, XA_ATOM, 32,
+ PropModeReplace, (unsigned char*) &type, 1);
+ }
+
+ // Set ICCCM WM_HINTS property
+ {
+ XWMHints* hints = XAllocWMHints();
+ if (!hints)
+ {
+ _glfwInputError(GLFW_OUT_OF_MEMORY,
+ "X11: Failed to allocate WM hints");
+ return GLFW_FALSE;
+ }
+
+ hints->flags = StateHint;
+ hints->initial_state = NormalState;
+
+ XSetWMHints(_glfw.x11.display, window->x11.handle, hints);
+ XFree(hints);
+ }
+
+ updateNormalHints(window, width, height);
+
+ // Set ICCCM WM_CLASS property
+ {
+ XClassHint* hint = XAllocClassHint();
+
+ if (strlen(wndconfig->x11.instanceName) &&
+ strlen(wndconfig->x11.className))
+ {
+ hint->res_name = (char*) wndconfig->x11.instanceName;
+ hint->res_class = (char*) wndconfig->x11.className;
+ }
+ else
+ {
+ const char* resourceName = getenv("RESOURCE_NAME");
+ if (resourceName && strlen(resourceName))
+ hint->res_name = (char*) resourceName;
+ else if (strlen(wndconfig->title))
+ hint->res_name = (char*) wndconfig->title;
+ else
+ hint->res_name = (char*) "glfw-application";
+
+ if (strlen(wndconfig->title))
+ hint->res_class = (char*) wndconfig->title;
+ else
+ hint->res_class = (char*) "GLFW-Application";
+ }
+
+ XSetClassHint(_glfw.x11.display, window->x11.handle, hint);
+ XFree(hint);
+ }
+
+ // Announce support for Xdnd (drag and drop)
+ {
+ const Atom version = _GLFW_XDND_VERSION;
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.XdndAware, XA_ATOM, 32,
+ PropModeReplace, (unsigned char*) &version, 1);
+ }
+
+ _glfwPlatformSetWindowTitle(window, wndconfig->title);
+
+ if (_glfw.x11.im)
+ {
+ window->x11.ic = XCreateIC(_glfw.x11.im,
+ XNInputStyle,
+ XIMPreeditNothing | XIMStatusNothing,
+ XNClientWindow,
+ window->x11.handle,
+ XNFocusWindow,
+ window->x11.handle,
+ NULL);
+ }
+
+ if (window->x11.ic)
+ {
+ unsigned long filter = 0;
+ if (XGetICValues(window->x11.ic, XNFilterEvents, &filter, NULL) == NULL)
+ XSelectInput(_glfw.x11.display, window->x11.handle, wa.event_mask | filter);
+ }
+
+ _glfwPlatformGetWindowPos(window, &window->x11.xpos, &window->x11.ypos);
+ _glfwPlatformGetWindowSize(window, &window->x11.width, &window->x11.height);
+
+ return GLFW_TRUE;
+}
+
+// Set the specified property to the selection converted to the requested target
+//
+static Atom writeTargetToProperty(const XSelectionRequestEvent* request)
+{
+ int i;
+ char* selectionString = NULL;
+ const Atom formats[] = { _glfw.x11.UTF8_STRING, XA_STRING };
+ const int formatCount = sizeof(formats) / sizeof(formats[0]);
+
+ if (request->selection == _glfw.x11.PRIMARY)
+ selectionString = _glfw.x11.primarySelectionString;
+ else
+ selectionString = _glfw.x11.clipboardString;
+
+ if (request->property == None)
+ {
+ // The requester is a legacy client (ICCCM section 2.2)
+ // We don't support legacy clients, so fail here
+ return None;
+ }
+
+ if (request->target == _glfw.x11.TARGETS)
+ {
+ // The list of supported targets was requested
+
+ const Atom targets[] = { _glfw.x11.TARGETS,
+ _glfw.x11.MULTIPLE,
+ _glfw.x11.UTF8_STRING,
+ XA_STRING };
+
+ XChangeProperty(_glfw.x11.display,
+ request->requestor,
+ request->property,
+ XA_ATOM,
+ 32,
+ PropModeReplace,
+ (unsigned char*) targets,
+ sizeof(targets) / sizeof(targets[0]));
+
+ return request->property;
+ }
+
+ if (request->target == _glfw.x11.MULTIPLE)
+ {
+ // Multiple conversions were requested
+
+ Atom* targets;
+ unsigned long i, count;
+
+ count = _glfwGetWindowPropertyX11(request->requestor,
+ request->property,
+ _glfw.x11.ATOM_PAIR,
+ (unsigned char**) &targets);
+
+ for (i = 0; i < count; i += 2)
+ {
+ int j;
+
+ for (j = 0; j < formatCount; j++)
+ {
+ if (targets[i] == formats[j])
+ break;
+ }
+
+ if (j < formatCount)
+ {
+ XChangeProperty(_glfw.x11.display,
+ request->requestor,
+ targets[i + 1],
+ targets[i],
+ 8,
+ PropModeReplace,
+ (unsigned char *) selectionString,
+ strlen(selectionString));
+ }
+ else
+ targets[i + 1] = None;
+ }
+
+ XChangeProperty(_glfw.x11.display,
+ request->requestor,
+ request->property,
+ _glfw.x11.ATOM_PAIR,
+ 32,
+ PropModeReplace,
+ (unsigned char*) targets,
+ count);
+
+ XFree(targets);
+
+ return request->property;
+ }
+
+ if (request->target == _glfw.x11.SAVE_TARGETS)
+ {
+ // The request is a check whether we support SAVE_TARGETS
+ // It should be handled as a no-op side effect target
+
+ XChangeProperty(_glfw.x11.display,
+ request->requestor,
+ request->property,
+ _glfw.x11.NULL_,
+ 32,
+ PropModeReplace,
+ NULL,
+ 0);
+
+ return request->property;
+ }
+
+ // Conversion to a data target was requested
+
+ for (i = 0; i < formatCount; i++)
+ {
+ if (request->target == formats[i])
+ {
+ // The requested target is one we support
+
+ XChangeProperty(_glfw.x11.display,
+ request->requestor,
+ request->property,
+ request->target,
+ 8,
+ PropModeReplace,
+ (unsigned char *) selectionString,
+ strlen(selectionString));
+
+ return request->property;
+ }
+ }
+
+ // The requested target is not supported
+
+ return None;
+}
+
+static void handleSelectionClear(XEvent* event)
+{
+ if (event->xselectionclear.selection == _glfw.x11.PRIMARY)
+ {
+ free(_glfw.x11.primarySelectionString);
+ _glfw.x11.primarySelectionString = NULL;
+ }
+ else
+ {
+ free(_glfw.x11.clipboardString);
+ _glfw.x11.clipboardString = NULL;
+ }
+}
+
+static void handleSelectionRequest(XEvent* event)
+{
+ const XSelectionRequestEvent* request = &event->xselectionrequest;
+
+ XEvent reply = { SelectionNotify };
+ reply.xselection.property = writeTargetToProperty(request);
+ reply.xselection.display = request->display;
+ reply.xselection.requestor = request->requestor;
+ reply.xselection.selection = request->selection;
+ reply.xselection.target = request->target;
+ reply.xselection.time = request->time;
+
+ XSendEvent(_glfw.x11.display, request->requestor, False, 0, &reply);
+}
+
+static const char* getSelectionString(Atom selection)
+{
+ char** selectionString = NULL;
+ const Atom targets[] = { _glfw.x11.UTF8_STRING, XA_STRING };
+ const size_t targetCount = sizeof(targets) / sizeof(targets[0]);
+
+ if (selection == _glfw.x11.PRIMARY)
+ selectionString = &_glfw.x11.primarySelectionString;
+ else
+ selectionString = &_glfw.x11.clipboardString;
+
+ if (XGetSelectionOwner(_glfw.x11.display, selection) ==
+ _glfw.x11.helperWindowHandle)
+ {
+ // Instead of doing a large number of X round-trips just to put this
+ // string into a window property and then read it back, just return it
+ return *selectionString;
+ }
+
+ free(*selectionString);
+ *selectionString = NULL;
+
+ for (size_t i = 0; i < targetCount; i++)
+ {
+ char* data;
+ Atom actualType;
+ int actualFormat;
+ unsigned long itemCount, bytesAfter;
+ XEvent notification, dummy;
+
+ XConvertSelection(_glfw.x11.display,
+ selection,
+ targets[i],
+ _glfw.x11.GLFW_SELECTION,
+ _glfw.x11.helperWindowHandle,
+ CurrentTime);
+
+ while (!XCheckTypedWindowEvent(_glfw.x11.display,
+ _glfw.x11.helperWindowHandle,
+ SelectionNotify,
+ &notification))
+ {
+ waitForEvent(NULL);
+ }
+
+ if (notification.xselection.property == None)
+ continue;
+
+ XCheckIfEvent(_glfw.x11.display,
+ &dummy,
+ isSelPropNewValueNotify,
+ (XPointer) &notification);
+
+ XGetWindowProperty(_glfw.x11.display,
+ notification.xselection.requestor,
+ notification.xselection.property,
+ 0,
+ LONG_MAX,
+ True,
+ AnyPropertyType,
+ &actualType,
+ &actualFormat,
+ &itemCount,
+ &bytesAfter,
+ (unsigned char**) &data);
+
+ if (actualType == _glfw.x11.INCR)
+ {
+ size_t size = 1;
+ char* string = NULL;
+
+ for (;;)
+ {
+ while (!XCheckIfEvent(_glfw.x11.display,
+ &dummy,
+ isSelPropNewValueNotify,
+ (XPointer) &notification))
+ {
+ waitForEvent(NULL);
+ }
+
+ XFree(data);
+ XGetWindowProperty(_glfw.x11.display,
+ notification.xselection.requestor,
+ notification.xselection.property,
+ 0,
+ LONG_MAX,
+ True,
+ AnyPropertyType,
+ &actualType,
+ &actualFormat,
+ &itemCount,
+ &bytesAfter,
+ (unsigned char**) &data);
+
+ if (itemCount)
+ {
+ size += itemCount;
+ string = realloc(string, size);
+ string[size - itemCount - 1] = '\0';
+ strcat(string, data);
+ }
+
+ if (!itemCount)
+ {
+ if (targets[i] == XA_STRING)
+ {
+ *selectionString = convertLatin1toUTF8(string);
+ free(string);
+ }
+ else
+ *selectionString = string;
+
+ break;
+ }
+ }
+ }
+ else if (actualType == targets[i])
+ {
+ if (targets[i] == XA_STRING)
+ *selectionString = convertLatin1toUTF8(data);
+ else
+ *selectionString = _glfw_strdup(data);
+ }
+
+ XFree(data);
+
+ if (*selectionString)
+ break;
+ }
+
+ if (!*selectionString)
+ {
+ _glfwInputError(GLFW_FORMAT_UNAVAILABLE,
+ "X11: Failed to convert selection to string");
+ }
+
+ return *selectionString;
+}
+
+// Make the specified window and its video mode active on its monitor
+//
+static void acquireMonitor(_GLFWwindow* window)
+{
+ if (_glfw.x11.saver.count == 0)
+ {
+ // Remember old screen saver settings
+ XGetScreenSaver(_glfw.x11.display,
+ &_glfw.x11.saver.timeout,
+ &_glfw.x11.saver.interval,
+ &_glfw.x11.saver.blanking,
+ &_glfw.x11.saver.exposure);
+
+ // Disable screen saver
+ XSetScreenSaver(_glfw.x11.display, 0, 0, DontPreferBlanking,
+ DefaultExposures);
+ }
+
+ if (!window->monitor->window)
+ _glfw.x11.saver.count++;
+
+ _glfwSetVideoModeX11(window->monitor, &window->videoMode);
+
+ if (window->x11.overrideRedirect)
+ {
+ int xpos, ypos;
+ GLFWvidmode mode;
+
+ // Manually position the window over its monitor
+ _glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
+ _glfwPlatformGetVideoMode(window->monitor, &mode);
+
+ XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
+ xpos, ypos, mode.width, mode.height);
+ }
+
+ _glfwInputMonitorWindow(window->monitor, window);
+}
+
+// Remove the window and restore the original video mode
+//
+static void releaseMonitor(_GLFWwindow* window)
+{
+ if (window->monitor->window != window)
+ return;
+
+ _glfwInputMonitorWindow(window->monitor, NULL);
+ _glfwRestoreVideoModeX11(window->monitor);
+
+ _glfw.x11.saver.count--;
+
+ if (_glfw.x11.saver.count == 0)
+ {
+ // Restore old screen saver settings
+ XSetScreenSaver(_glfw.x11.display,
+ _glfw.x11.saver.timeout,
+ _glfw.x11.saver.interval,
+ _glfw.x11.saver.blanking,
+ _glfw.x11.saver.exposure);
+ }
+}
+
+// Process the specified X event
+//
+static void processEvent(XEvent *event)
+{
+ int keycode = 0;
+ Bool filtered = False;
+
+ // HACK: Save scancode as some IMs clear the field in XFilterEvent
+ if (event->type == KeyPress || event->type == KeyRelease)
+ keycode = event->xkey.keycode;
+
+ if (_glfw.x11.im)
+ filtered = XFilterEvent(event, None);
+
+ if (_glfw.x11.randr.available)
+ {
+ if (event->type == _glfw.x11.randr.eventBase + RRNotify)
+ {
+ XRRUpdateConfiguration(event);
+ _glfwPollMonitorsX11();
+ return;
+ }
+ }
+
+ if (_glfw.x11.xkb.available)
+ {
+ if (event->type == _glfw.x11.xkb.eventBase + XkbEventCode)
+ {
+ if (((XkbEvent*) event)->any.xkb_type == XkbStateNotify &&
+ (((XkbEvent*) event)->state.changed & XkbGroupStateMask))
+ {
+ _glfw.x11.xkb.group = ((XkbEvent*) event)->state.group;
+ }
+
+ return;
+ }
+ }
+
+ if (event->type == GenericEvent)
+ {
+ if (_glfw.x11.xi.available)
+ {
+ _GLFWwindow* window = _glfw.x11.disabledCursorWindow;
+
+ if (window &&
+ window->rawMouseMotion &&
+ event->xcookie.extension == _glfw.x11.xi.majorOpcode &&
+ XGetEventData(_glfw.x11.display, &event->xcookie) &&
+ event->xcookie.evtype == XI_RawMotion)
+ {
+ XIRawEvent* re = event->xcookie.data;
+ if (re->valuators.mask_len)
+ {
+ const double* values = re->raw_values;
+ double xpos = window->virtualCursorPosX;
+ double ypos = window->virtualCursorPosY;
+
+ if (XIMaskIsSet(re->valuators.mask, 0))
+ {
+ xpos += *values;
+ values++;
+ }
+
+ if (XIMaskIsSet(re->valuators.mask, 1))
+ ypos += *values;
+
+ _glfwInputCursorPos(window, xpos, ypos);
+ }
+ }
+
+ XFreeEventData(_glfw.x11.display, &event->xcookie);
+ }
+
+ return;
+ }
+
+ if (event->type == SelectionClear)
+ {
+ handleSelectionClear(event);
+ return;
+ }
+ else if (event->type == SelectionRequest)
+ {
+ handleSelectionRequest(event);
+ return;
+ }
+
+ _GLFWwindow* window = NULL;
+ if (XFindContext(_glfw.x11.display,
+ event->xany.window,
+ _glfw.x11.context,
+ (XPointer*) &window) != 0)
+ {
+ // This is an event for a window that has already been destroyed
+ return;
+ }
+
+ switch (event->type)
+ {
+ case ReparentNotify:
+ {
+ window->x11.parent = event->xreparent.parent;
+ return;
+ }
+
+ case KeyPress:
+ {
+ const int key = translateKey(keycode);
+ const int mods = translateState(event->xkey.state);
+ const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));
+
+ if (window->x11.ic)
+ {
+ // HACK: Do not report the key press events duplicated by XIM
+ // Duplicate key releases are filtered out implicitly by
+ // the GLFW key repeat logic in _glfwInputKey
+ // A timestamp per key is used to handle simultaneous keys
+ // NOTE: Always allow the first event for each key through
+ // (the server never sends a timestamp of zero)
+ // NOTE: Timestamp difference is compared to handle wrap-around
+ Time diff = event->xkey.time - window->x11.keyPressTimes[keycode];
+ if (diff == event->xkey.time || (diff > 0 && diff < (1 << 31)))
+ {
+ if (keycode)
+ _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
+
+ window->x11.keyPressTimes[keycode] = event->xkey.time;
+ }
+
+ if (!filtered)
+ {
+ int count;
+ Status status;
+#if defined(X_HAVE_UTF8_STRING)
+ char buffer[100];
+ char* chars = buffer;
+
+ count = Xutf8LookupString(window->x11.ic,
+ &event->xkey,
+ buffer, sizeof(buffer) - 1,
+ NULL, &status);
+
+ if (status == XBufferOverflow)
+ {
+ chars = calloc(count + 1, 1);
+ count = Xutf8LookupString(window->x11.ic,
+ &event->xkey,
+ chars, count,
+ NULL, &status);
+ }
+
+ if (status == XLookupChars || status == XLookupBoth)
+ {
+ const char* c = chars;
+ chars[count] = '\0';
+ while (c - chars < count)
+ _glfwInputChar(window, decodeUTF8(&c), mods, plain);
+ }
+#else /*X_HAVE_UTF8_STRING*/
+ wchar_t buffer[16];
+ wchar_t* chars = buffer;
+
+ count = XwcLookupString(window->x11.ic,
+ &event->xkey,
+ buffer,
+ sizeof(buffer) / sizeof(wchar_t),
+ NULL,
+ &status);
+
+ if (status == XBufferOverflow)
+ {
+ chars = calloc(count, sizeof(wchar_t));
+ count = XwcLookupString(window->x11.ic,
+ &event->xkey,
+ chars, count,
+ NULL, &status);
+ }
+
+ if (status == XLookupChars || status == XLookupBoth)
+ {
+ int i;
+ for (i = 0; i < count; i++)
+ _glfwInputChar(window, chars[i], mods, plain);
+ }
+#endif /*X_HAVE_UTF8_STRING*/
+
+ if (chars != buffer)
+ free(chars);
+ }
+ }
+ else
+ {
+ KeySym keysym;
+ XLookupString(&event->xkey, NULL, 0, &keysym, NULL);
+
+ _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
+
+ const long character = _glfwKeySym2Unicode(keysym);
+ if (character != -1)
+ _glfwInputChar(window, character, mods, plain);
+ }
+
+ return;
+ }
+
+ case KeyRelease:
+ {
+ const int key = translateKey(keycode);
+ const int mods = translateState(event->xkey.state);
+
+ if (!_glfw.x11.xkb.detectable)
+ {
+ // HACK: Key repeat events will arrive as KeyRelease/KeyPress
+ // pairs with similar or identical time stamps
+ // The key repeat logic in _glfwInputKey expects only key
+ // presses to repeat, so detect and discard release events
+ if (XEventsQueued(_glfw.x11.display, QueuedAfterReading))
+ {
+ XEvent next;
+ XPeekEvent(_glfw.x11.display, &next);
+
+ if (next.type == KeyPress &&
+ next.xkey.window == event->xkey.window &&
+ next.xkey.keycode == keycode)
+ {
+ // HACK: The time of repeat events sometimes doesn't
+ // match that of the press event, so add an
+ // epsilon
+ // Toshiyuki Takahashi can press a button
+ // 16 times per second so it's fairly safe to
+ // assume that no human is pressing the key 50
+ // times per second (value is ms)
+ if ((next.xkey.time - event->xkey.time) < 20)
+ {
+ // This is very likely a server-generated key repeat
+ // event, so ignore it
+ return;
+ }
+ }
+ }
+ }
+
+ _glfwInputKey(window, key, keycode, GLFW_RELEASE, mods);
+ return;
+ }
+
+ case ButtonPress:
+ {
+ const int mods = translateState(event->xbutton.state);
+
+ if (event->xbutton.button == Button1)
+ _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS, mods);
+ else if (event->xbutton.button == Button2)
+ _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS, mods);
+ else if (event->xbutton.button == Button3)
+ _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS, mods);
+
+ // Modern X provides scroll events as mouse button presses
+ else if (event->xbutton.button == Button4)
+ _glfwInputScroll(window, 0.0, 1.0);
+ else if (event->xbutton.button == Button5)
+ _glfwInputScroll(window, 0.0, -1.0);
+ else if (event->xbutton.button == Button6)
+ _glfwInputScroll(window, 1.0, 0.0);
+ else if (event->xbutton.button == Button7)
+ _glfwInputScroll(window, -1.0, 0.0);
+
+ else
+ {
+ // Additional buttons after 7 are treated as regular buttons
+ // We subtract 4 to fill the gap left by scroll input above
+ _glfwInputMouseClick(window,
+ event->xbutton.button - Button1 - 4,
+ GLFW_PRESS,
+ mods);
+ }
+
+ return;
+ }
+
+ case ButtonRelease:
+ {
+ const int mods = translateState(event->xbutton.state);
+
+ if (event->xbutton.button == Button1)
+ {
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_LEFT,
+ GLFW_RELEASE,
+ mods);
+ }
+ else if (event->xbutton.button == Button2)
+ {
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_MIDDLE,
+ GLFW_RELEASE,
+ mods);
+ }
+ else if (event->xbutton.button == Button3)
+ {
+ _glfwInputMouseClick(window,
+ GLFW_MOUSE_BUTTON_RIGHT,
+ GLFW_RELEASE,
+ mods);
+ }
+ else if (event->xbutton.button > Button7)
+ {
+ // Additional buttons after 7 are treated as regular buttons
+ // We subtract 4 to fill the gap left by scroll input above
+ _glfwInputMouseClick(window,
+ event->xbutton.button - Button1 - 4,
+ GLFW_RELEASE,
+ mods);
+ }
+
+ return;
+ }
+
+ case EnterNotify:
+ {
+ // XEnterWindowEvent is XCrossingEvent
+ const int x = event->xcrossing.x;
+ const int y = event->xcrossing.y;
+
+ // HACK: This is a workaround for WMs (KWM, Fluxbox) that otherwise
+ // ignore the defined cursor for hidden cursor mode
+ if (window->cursorMode == GLFW_CURSOR_HIDDEN)
+ updateCursorImage(window);
+
+ _glfwInputCursorEnter(window, GLFW_TRUE);
+ _glfwInputCursorPos(window, x, y);
+
+ window->x11.lastCursorPosX = x;
+ window->x11.lastCursorPosY = y;
+ return;
+ }
+
+ case LeaveNotify:
+ {
+ _glfwInputCursorEnter(window, GLFW_FALSE);
+ return;
+ }
+
+ case MotionNotify:
+ {
+ const int x = event->xmotion.x;
+ const int y = event->xmotion.y;
+
+ if (x != window->x11.warpCursorPosX ||
+ y != window->x11.warpCursorPosY)
+ {
+ // The cursor was moved by something other than GLFW
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ {
+ if (_glfw.x11.disabledCursorWindow != window)
+ return;
+ if (window->rawMouseMotion)
+ return;
+
+ const int dx = x - window->x11.lastCursorPosX;
+ const int dy = y - window->x11.lastCursorPosY;
+
+ _glfwInputCursorPos(window,
+ window->virtualCursorPosX + dx,
+ window->virtualCursorPosY + dy);
+ }
+ else
+ _glfwInputCursorPos(window, x, y);
+ }
+
+ window->x11.lastCursorPosX = x;
+ window->x11.lastCursorPosY = y;
+ return;
+ }
+
+ case ConfigureNotify:
+ {
+ if (event->xconfigure.width != window->x11.width ||
+ event->xconfigure.height != window->x11.height)
+ {
+ _glfwInputFramebufferSize(window,
+ event->xconfigure.width,
+ event->xconfigure.height);
+
+ _glfwInputWindowSize(window,
+ event->xconfigure.width,
+ event->xconfigure.height);
+
+ window->x11.width = event->xconfigure.width;
+ window->x11.height = event->xconfigure.height;
+ }
+
+ int xpos = event->xconfigure.x;
+ int ypos = event->xconfigure.y;
+
+ // NOTE: ConfigureNotify events from the server are in local
+ // coordinates, so if we are reparented we need to translate
+ // the position into root (screen) coordinates
+ if (!event->xany.send_event && window->x11.parent != _glfw.x11.root)
+ {
+ _glfwGrabErrorHandlerX11();
+
+ Window dummy;
+ XTranslateCoordinates(_glfw.x11.display,
+ window->x11.parent,
+ _glfw.x11.root,
+ xpos, ypos,
+ &xpos, &ypos,
+ &dummy);
+
+ _glfwReleaseErrorHandlerX11();
+ if (_glfw.x11.errorCode == BadWindow)
+ return;
+ }
+
+ if (xpos != window->x11.xpos || ypos != window->x11.ypos)
+ {
+ _glfwInputWindowPos(window, xpos, ypos);
+ window->x11.xpos = xpos;
+ window->x11.ypos = ypos;
+ }
+
+ return;
+ }
+
+ case ClientMessage:
+ {
+ // Custom client message, probably from the window manager
+
+ if (filtered)
+ return;
+
+ if (event->xclient.message_type == None)
+ return;
+
+ if (event->xclient.message_type == _glfw.x11.WM_PROTOCOLS)
+ {
+ const Atom protocol = event->xclient.data.l[0];
+ if (protocol == None)
+ return;
+
+ if (protocol == _glfw.x11.WM_DELETE_WINDOW)
+ {
+ // The window manager was asked to close the window, for
+ // example by the user pressing a 'close' window decoration
+ // button
+ _glfwInputWindowCloseRequest(window);
+ }
+ else if (protocol == _glfw.x11.NET_WM_PING)
+ {
+ // The window manager is pinging the application to ensure
+ // it's still responding to events
+
+ XEvent reply = *event;
+ reply.xclient.window = _glfw.x11.root;
+
+ XSendEvent(_glfw.x11.display, _glfw.x11.root,
+ False,
+ SubstructureNotifyMask | SubstructureRedirectMask,
+ &reply);
+ }
+ }
+ else if (event->xclient.message_type == _glfw.x11.XdndEnter)
+ {
+ // A drag operation has entered the window
+ unsigned long i, count;
+ Atom* formats = NULL;
+ const GLFWbool list = event->xclient.data.l[1] & 1;
+
+ _glfw.x11.xdnd.source = event->xclient.data.l[0];
+ _glfw.x11.xdnd.version = event->xclient.data.l[1] >> 24;
+ _glfw.x11.xdnd.format = None;
+
+ if (_glfw.x11.xdnd.version > _GLFW_XDND_VERSION)
+ return;
+
+ if (list)
+ {
+ count = _glfwGetWindowPropertyX11(_glfw.x11.xdnd.source,
+ _glfw.x11.XdndTypeList,
+ XA_ATOM,
+ (unsigned char**) &formats);
+ }
+ else
+ {
+ count = 3;
+ formats = (Atom*) event->xclient.data.l + 2;
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ if (formats[i] == _glfw.x11.text_uri_list)
+ {
+ _glfw.x11.xdnd.format = _glfw.x11.text_uri_list;
+ break;
+ }
+ }
+
+ if (list && formats)
+ XFree(formats);
+ }
+ else if (event->xclient.message_type == _glfw.x11.XdndDrop)
+ {
+ // The drag operation has finished by dropping on the window
+ Time time = CurrentTime;
+
+ if (_glfw.x11.xdnd.version > _GLFW_XDND_VERSION)
+ return;
+
+ if (_glfw.x11.xdnd.format)
+ {
+ if (_glfw.x11.xdnd.version >= 1)
+ time = event->xclient.data.l[2];
+
+ // Request the chosen format from the source window
+ XConvertSelection(_glfw.x11.display,
+ _glfw.x11.XdndSelection,
+ _glfw.x11.xdnd.format,
+ _glfw.x11.XdndSelection,
+ window->x11.handle,
+ time);
+ }
+ else if (_glfw.x11.xdnd.version >= 2)
+ {
+ XEvent reply = { ClientMessage };
+ reply.xclient.window = _glfw.x11.xdnd.source;
+ reply.xclient.message_type = _glfw.x11.XdndFinished;
+ reply.xclient.format = 32;
+ reply.xclient.data.l[0] = window->x11.handle;
+ reply.xclient.data.l[1] = 0; // The drag was rejected
+ reply.xclient.data.l[2] = None;
+
+ XSendEvent(_glfw.x11.display, _glfw.x11.xdnd.source,
+ False, NoEventMask, &reply);
+ XFlush(_glfw.x11.display);
+ }
+ }
+ else if (event->xclient.message_type == _glfw.x11.XdndPosition)
+ {
+ // The drag operation has moved over the window
+ const int xabs = (event->xclient.data.l[2] >> 16) & 0xffff;
+ const int yabs = (event->xclient.data.l[2]) & 0xffff;
+ Window dummy;
+ int xpos, ypos;
+
+ if (_glfw.x11.xdnd.version > _GLFW_XDND_VERSION)
+ return;
+
+ XTranslateCoordinates(_glfw.x11.display,
+ _glfw.x11.root,
+ window->x11.handle,
+ xabs, yabs,
+ &xpos, &ypos,
+ &dummy);
+
+ _glfwInputCursorPos(window, xpos, ypos);
+
+ XEvent reply = { ClientMessage };
+ reply.xclient.window = _glfw.x11.xdnd.source;
+ reply.xclient.message_type = _glfw.x11.XdndStatus;
+ reply.xclient.format = 32;
+ reply.xclient.data.l[0] = window->x11.handle;
+ reply.xclient.data.l[2] = 0; // Specify an empty rectangle
+ reply.xclient.data.l[3] = 0;
+
+ if (_glfw.x11.xdnd.format)
+ {
+ // Reply that we are ready to copy the dragged data
+ reply.xclient.data.l[1] = 1; // Accept with no rectangle
+ if (_glfw.x11.xdnd.version >= 2)
+ reply.xclient.data.l[4] = _glfw.x11.XdndActionCopy;
+ }
+
+ XSendEvent(_glfw.x11.display, _glfw.x11.xdnd.source,
+ False, NoEventMask, &reply);
+ XFlush(_glfw.x11.display);
+ }
+
+ return;
+ }
+
+ case SelectionNotify:
+ {
+ if (event->xselection.property == _glfw.x11.XdndSelection)
+ {
+ // The converted data from the drag operation has arrived
+ char* data;
+ const unsigned long result =
+ _glfwGetWindowPropertyX11(event->xselection.requestor,
+ event->xselection.property,
+ event->xselection.target,
+ (unsigned char**) &data);
+
+ if (result)
+ {
+ int i, count;
+ char** paths = parseUriList(data, &count);
+
+ _glfwInputDrop(window, count, (const char**) paths);
+
+ for (i = 0; i < count; i++)
+ free(paths[i]);
+ free(paths);
+ }
+
+ if (data)
+ XFree(data);
+
+ if (_glfw.x11.xdnd.version >= 2)
+ {
+ XEvent reply = { ClientMessage };
+ reply.xclient.window = _glfw.x11.xdnd.source;
+ reply.xclient.message_type = _glfw.x11.XdndFinished;
+ reply.xclient.format = 32;
+ reply.xclient.data.l[0] = window->x11.handle;
+ reply.xclient.data.l[1] = result;
+ reply.xclient.data.l[2] = _glfw.x11.XdndActionCopy;
+
+ XSendEvent(_glfw.x11.display, _glfw.x11.xdnd.source,
+ False, NoEventMask, &reply);
+ XFlush(_glfw.x11.display);
+ }
+ }
+
+ return;
+ }
+
+ case FocusIn:
+ {
+ if (event->xfocus.mode == NotifyGrab ||
+ event->xfocus.mode == NotifyUngrab)
+ {
+ // Ignore focus events from popup indicator windows, window menu
+ // key chords and window dragging
+ return;
+ }
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ disableCursor(window);
+
+ if (window->x11.ic)
+ XSetICFocus(window->x11.ic);
+
+ _glfwInputWindowFocus(window, GLFW_TRUE);
+ return;
+ }
+
+ case FocusOut:
+ {
+ if (event->xfocus.mode == NotifyGrab ||
+ event->xfocus.mode == NotifyUngrab)
+ {
+ // Ignore focus events from popup indicator windows, window menu
+ // key chords and window dragging
+ return;
+ }
+
+ if (window->cursorMode == GLFW_CURSOR_DISABLED)
+ enableCursor(window);
+
+ if (window->x11.ic)
+ XUnsetICFocus(window->x11.ic);
+
+ if (window->monitor && window->autoIconify)
+ _glfwPlatformIconifyWindow(window);
+
+ _glfwInputWindowFocus(window, GLFW_FALSE);
+ return;
+ }
+
+ case Expose:
+ {
+ _glfwInputWindowDamage(window);
+ return;
+ }
+
+ case PropertyNotify:
+ {
+ if (event->xproperty.state != PropertyNewValue)
+ return;
+
+ if (event->xproperty.atom == _glfw.x11.WM_STATE)
+ {
+ const int state = getWindowState(window);
+ if (state != IconicState && state != NormalState)
+ return;
+
+ const GLFWbool iconified = (state == IconicState);
+ if (window->x11.iconified != iconified)
+ {
+ if (window->monitor)
+ {
+ if (iconified)
+ releaseMonitor(window);
+ else
+ acquireMonitor(window);
+ }
+
+ window->x11.iconified = iconified;
+ _glfwInputWindowIconify(window, iconified);
+ }
+ }
+ else if (event->xproperty.atom == _glfw.x11.NET_WM_STATE)
+ {
+ const GLFWbool maximized = _glfwPlatformWindowMaximized(window);
+ if (window->x11.maximized != maximized)
+ {
+ window->x11.maximized = maximized;
+ _glfwInputWindowMaximize(window, maximized);
+ }
+ }
+
+ return;
+ }
+
+ case DestroyNotify:
+ return;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Retrieve a single window property of the specified type
+// Inspired by fghGetWindowProperty from freeglut
+//
+unsigned long _glfwGetWindowPropertyX11(Window window,
+ Atom property,
+ Atom type,
+ unsigned char** value)
+{
+ Atom actualType;
+ int actualFormat;
+ unsigned long itemCount, bytesAfter;
+
+ XGetWindowProperty(_glfw.x11.display,
+ window,
+ property,
+ 0,
+ LONG_MAX,
+ False,
+ type,
+ &actualType,
+ &actualFormat,
+ &itemCount,
+ &bytesAfter,
+ value);
+
+ return itemCount;
+}
+
+GLFWbool _glfwIsVisualTransparentX11(Visual* visual)
+{
+ if (!_glfw.x11.xrender.available)
+ return GLFW_FALSE;
+
+ XRenderPictFormat* pf = XRenderFindVisualFormat(_glfw.x11.display, visual);
+ return pf && pf->direct.alphaMask;
+}
+
+// Push contents of our selection to clipboard manager
+//
+void _glfwPushSelectionToManagerX11(void)
+{
+ XConvertSelection(_glfw.x11.display,
+ _glfw.x11.CLIPBOARD_MANAGER,
+ _glfw.x11.SAVE_TARGETS,
+ None,
+ _glfw.x11.helperWindowHandle,
+ CurrentTime);
+
+ for (;;)
+ {
+ XEvent event;
+
+ while (XCheckIfEvent(_glfw.x11.display, &event, isSelectionEvent, NULL))
+ {
+ switch (event.type)
+ {
+ case SelectionRequest:
+ handleSelectionRequest(&event);
+ break;
+
+ case SelectionClear:
+ handleSelectionClear(&event);
+ break;
+
+ case SelectionNotify:
+ {
+ if (event.xselection.target == _glfw.x11.SAVE_TARGETS)
+ {
+ // This means one of two things; either the selection
+ // was not owned, which means there is no clipboard
+ // manager, or the transfer to the clipboard manager has
+ // completed
+ // In either case, it means we are done here
+ return;
+ }
+
+ break;
+ }
+ }
+ }
+
+ waitForEvent(NULL);
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW platform API //////
+//////////////////////////////////////////////////////////////////////////
+
+int _glfwPlatformCreateWindow(_GLFWwindow* window,
+ const _GLFWwndconfig* wndconfig,
+ const _GLFWctxconfig* ctxconfig,
+ const _GLFWfbconfig* fbconfig)
+{
+ Visual* visual = NULL;
+ int depth;
+
+ if (ctxconfig->client != GLFW_NO_API)
+ {
+ if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
+ {
+ if (!_glfwInitGLX())
+ return GLFW_FALSE;
+ if (!_glfwChooseVisualGLX(wndconfig, ctxconfig, fbconfig, &visual, &depth))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)
+ {
+ if (!_glfwInitEGL())
+ return GLFW_FALSE;
+ if (!_glfwChooseVisualEGL(wndconfig, ctxconfig, fbconfig, &visual, &depth))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
+ {
+ if (!_glfwInitOSMesa())
+ return GLFW_FALSE;
+ }
+ }
+
+ if (!visual)
+ {
+ visual = DefaultVisual(_glfw.x11.display, _glfw.x11.screen);
+ depth = DefaultDepth(_glfw.x11.display, _glfw.x11.screen);
+ }
+
+ if (!createNativeWindow(window, wndconfig, visual, depth))
+ return GLFW_FALSE;
+
+ if (ctxconfig->client != GLFW_NO_API)
+ {
+ if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
+ {
+ if (!_glfwCreateContextGLX(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)
+ {
+ if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
+ {
+ if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
+ return GLFW_FALSE;
+ }
+ }
+
+ if (window->monitor)
+ {
+ _glfwPlatformShowWindow(window);
+ updateWindowMode(window);
+ acquireMonitor(window);
+ }
+
+ XFlush(_glfw.x11.display);
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyWindow(_GLFWwindow* window)
+{
+ if (_glfw.x11.disabledCursorWindow == window)
+ _glfw.x11.disabledCursorWindow = NULL;
+
+ if (window->monitor)
+ releaseMonitor(window);
+
+ if (window->x11.ic)
+ {
+ XDestroyIC(window->x11.ic);
+ window->x11.ic = NULL;
+ }
+
+ if (window->context.destroy)
+ window->context.destroy(window);
+
+ if (window->x11.handle)
+ {
+ XDeleteContext(_glfw.x11.display, window->x11.handle, _glfw.x11.context);
+ XUnmapWindow(_glfw.x11.display, window->x11.handle);
+ XDestroyWindow(_glfw.x11.display, window->x11.handle);
+ window->x11.handle = (Window) 0;
+ }
+
+ if (window->x11.colormap)
+ {
+ XFreeColormap(_glfw.x11.display, window->x11.colormap);
+ window->x11.colormap = (Colormap) 0;
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
+{
+#if defined(X_HAVE_UTF8_STRING)
+ Xutf8SetWMProperties(_glfw.x11.display,
+ window->x11.handle,
+ title, title,
+ NULL, 0,
+ NULL, NULL, NULL);
+#else
+ // This may be a slightly better fallback than using XStoreName and
+ // XSetIconName, which always store their arguments using STRING
+ XmbSetWMProperties(_glfw.x11.display,
+ window->x11.handle,
+ title, title,
+ NULL, 0,
+ NULL, NULL, NULL);
+#endif
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_NAME, _glfw.x11.UTF8_STRING, 8,
+ PropModeReplace,
+ (unsigned char*) title, strlen(title));
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_ICON_NAME, _glfw.x11.UTF8_STRING, 8,
+ PropModeReplace,
+ (unsigned char*) title, strlen(title));
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
+ int count, const GLFWimage* images)
+{
+ if (count)
+ {
+ int i, j, longCount = 0;
+
+ for (i = 0; i < count; i++)
+ longCount += 2 + images[i].width * images[i].height;
+
+ unsigned long* icon = calloc(longCount, sizeof(unsigned long));
+ unsigned long* target = icon;
+
+ for (i = 0; i < count; i++)
+ {
+ *target++ = images[i].width;
+ *target++ = images[i].height;
+
+ for (j = 0; j < images[i].width * images[i].height; j++)
+ {
+ *target++ = (((unsigned long) images[i].pixels[j * 4 + 0]) << 16) |
+ (((unsigned long) images[i].pixels[j * 4 + 1]) << 8) |
+ (((unsigned long) images[i].pixels[j * 4 + 2]) << 0) |
+ (((unsigned long) images[i].pixels[j * 4 + 3]) << 24);
+ }
+ }
+
+ // NOTE: XChangeProperty expects 32-bit values like the image data above to be
+ // placed in the 32 least significant bits of individual longs. This is
+ // true even if long is 64-bit and a WM protocol calls for "packed" data.
+ // This is because of a historical mistake that then became part of the Xlib
+ // ABI. Xlib will pack these values into a regular array of 32-bit values
+ // before sending it over the wire.
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_ICON,
+ XA_CARDINAL, 32,
+ PropModeReplace,
+ (unsigned char*) icon,
+ longCount);
+
+ free(icon);
+ }
+ else
+ {
+ XDeleteProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_ICON);
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
+{
+ Window dummy;
+ int x, y;
+
+ XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root,
+ 0, 0, &x, &y, &dummy);
+
+ if (xpos)
+ *xpos = x;
+ if (ypos)
+ *ypos = y;
+}
+
+void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
+{
+ // HACK: Explicitly setting PPosition to any value causes some WMs, notably
+ // Compiz and Metacity, to honor the position of unmapped windows
+ if (!_glfwPlatformWindowVisible(window))
+ {
+ long supplied;
+ XSizeHints* hints = XAllocSizeHints();
+
+ if (XGetWMNormalHints(_glfw.x11.display, window->x11.handle, hints, &supplied))
+ {
+ hints->flags |= PPosition;
+ hints->x = hints->y = 0;
+
+ XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);
+ }
+
+ XFree(hints);
+ }
+
+ XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
+{
+ XWindowAttributes attribs;
+ XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &attribs);
+
+ if (width)
+ *width = attribs.width;
+ if (height)
+ *height = attribs.height;
+}
+
+void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
+{
+ if (window->monitor)
+ {
+ if (window->monitor->window == window)
+ acquireMonitor(window);
+ }
+ else
+ {
+ if (!window->resizable)
+ updateNormalHints(window, width, height);
+
+ XResizeWindow(_glfw.x11.display, window->x11.handle, width, height);
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
+ int minwidth, int minheight,
+ int maxwidth, int maxheight)
+{
+ int width, height;
+ _glfwPlatformGetWindowSize(window, &width, &height);
+ updateNormalHints(window, width, height);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
+{
+ int width, height;
+ _glfwPlatformGetWindowSize(window, &width, &height);
+ updateNormalHints(window, width, height);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
+{
+ _glfwPlatformGetWindowSize(window, width, height);
+}
+
+void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
+ int* left, int* top,
+ int* right, int* bottom)
+{
+ long* extents = NULL;
+
+ if (window->monitor || !window->decorated)
+ return;
+
+ if (_glfw.x11.NET_FRAME_EXTENTS == None)
+ return;
+
+ if (!_glfwPlatformWindowVisible(window) &&
+ _glfw.x11.NET_REQUEST_FRAME_EXTENTS)
+ {
+ XEvent event;
+ double timeout = 0.5;
+
+ // Ensure _NET_FRAME_EXTENTS is set, allowing glfwGetWindowFrameSize to
+ // function before the window is mapped
+ sendEventToWM(window, _glfw.x11.NET_REQUEST_FRAME_EXTENTS,
+ 0, 0, 0, 0, 0);
+
+ // HACK: Use a timeout because earlier versions of some window managers
+ // (at least Unity, Fluxbox and Xfwm) failed to send the reply
+ // They have been fixed but broken versions are still in the wild
+ // If you are affected by this and your window manager is NOT
+ // listed above, PLEASE report it to their and our issue trackers
+ while (!XCheckIfEvent(_glfw.x11.display,
+ &event,
+ isFrameExtentsEvent,
+ (XPointer) window))
+ {
+ if (!waitForEvent(&timeout))
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: The window manager has a broken _NET_REQUEST_FRAME_EXTENTS implementation; please report this issue");
+ return;
+ }
+ }
+ }
+
+ if (_glfwGetWindowPropertyX11(window->x11.handle,
+ _glfw.x11.NET_FRAME_EXTENTS,
+ XA_CARDINAL,
+ (unsigned char**) &extents) == 4)
+ {
+ if (left)
+ *left = extents[0];
+ if (top)
+ *top = extents[2];
+ if (right)
+ *right = extents[1];
+ if (bottom)
+ *bottom = extents[3];
+ }
+
+ if (extents)
+ XFree(extents);
+}
+
+void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
+ float* xscale, float* yscale)
+{
+ if (xscale)
+ *xscale = _glfw.x11.contentScaleX;
+ if (yscale)
+ *yscale = _glfw.x11.contentScaleY;
+}
+
+void _glfwPlatformIconifyWindow(_GLFWwindow* window)
+{
+ if (window->x11.overrideRedirect)
+ {
+ // Override-redirect windows cannot be iconified or restored, as those
+ // tasks are performed by the window manager
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Iconification of full screen windows requires a WM that supports EWMH full screen");
+ return;
+ }
+
+ XIconifyWindow(_glfw.x11.display, window->x11.handle, _glfw.x11.screen);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformRestoreWindow(_GLFWwindow* window)
+{
+ if (window->x11.overrideRedirect)
+ {
+ // Override-redirect windows cannot be iconified or restored, as those
+ // tasks are performed by the window manager
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Iconification of full screen windows requires a WM that supports EWMH full screen");
+ return;
+ }
+
+ if (_glfwPlatformWindowIconified(window))
+ {
+ XMapWindow(_glfw.x11.display, window->x11.handle);
+ waitForVisibilityNotify(window);
+ }
+ else if (_glfwPlatformWindowVisible(window))
+ {
+ if (_glfw.x11.NET_WM_STATE &&
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT &&
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
+ {
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_STATE,
+ _NET_WM_STATE_REMOVE,
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,
+ 1, 0);
+ }
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
+{
+ if (!_glfw.x11.NET_WM_STATE ||
+ !_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||
+ !_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
+ {
+ return;
+ }
+
+ if (_glfwPlatformWindowVisible(window))
+ {
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_STATE,
+ _NET_WM_STATE_ADD,
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,
+ 1, 0);
+ }
+ else
+ {
+ Atom* states = NULL;
+ unsigned long count =
+ _glfwGetWindowPropertyX11(window->x11.handle,
+ _glfw.x11.NET_WM_STATE,
+ XA_ATOM,
+ (unsigned char**) &states);
+
+ // NOTE: We don't check for failure as this property may not exist yet
+ // and that's fine (and we'll create it implicitly with append)
+
+ Atom missing[2] =
+ {
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
+ _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ
+ };
+ unsigned long missingCount = 2;
+
+ for (unsigned long i = 0; i < count; i++)
+ {
+ for (unsigned long j = 0; j < missingCount; j++)
+ {
+ if (states[i] == missing[j])
+ {
+ missing[j] = missing[missingCount - 1];
+ missingCount--;
+ }
+ }
+ }
+
+ if (states)
+ XFree(states);
+
+ if (!missingCount)
+ return;
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
+ PropModeAppend,
+ (unsigned char*) missing,
+ missingCount);
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformShowWindow(_GLFWwindow* window)
+{
+ if (_glfwPlatformWindowVisible(window))
+ return;
+
+ XMapWindow(_glfw.x11.display, window->x11.handle);
+ waitForVisibilityNotify(window);
+}
+
+void _glfwPlatformHideWindow(_GLFWwindow* window)
+{
+ XUnmapWindow(_glfw.x11.display, window->x11.handle);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
+{
+ if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION)
+ return;
+
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_STATE,
+ _NET_WM_STATE_ADD,
+ _glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION,
+ 0, 1, 0);
+}
+
+void _glfwPlatformFocusWindow(_GLFWwindow* window)
+{
+ if (_glfw.x11.NET_ACTIVE_WINDOW)
+ sendEventToWM(window, _glfw.x11.NET_ACTIVE_WINDOW, 1, 0, 0, 0, 0);
+ else if (_glfwPlatformWindowVisible(window))
+ {
+ XRaiseWindow(_glfw.x11.display, window->x11.handle);
+ XSetInputFocus(_glfw.x11.display, window->x11.handle,
+ RevertToParent, CurrentTime);
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
+ _GLFWmonitor* monitor,
+ int xpos, int ypos,
+ int width, int height,
+ int refreshRate)
+{
+ if (window->monitor == monitor)
+ {
+ if (monitor)
+ {
+ if (monitor->window == window)
+ acquireMonitor(window);
+ }
+ else
+ {
+ if (!window->resizable)
+ updateNormalHints(window, width, height);
+
+ XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
+ xpos, ypos, width, height);
+ }
+
+ XFlush(_glfw.x11.display);
+ return;
+ }
+
+ if (window->monitor)
+ {
+ _glfwPlatformSetWindowDecorated(window, window->decorated);
+ _glfwPlatformSetWindowFloating(window, window->floating);
+ releaseMonitor(window);
+ }
+
+ _glfwInputWindowMonitor(window, monitor);
+ updateNormalHints(window, width, height);
+
+ if (window->monitor)
+ {
+ if (!_glfwPlatformWindowVisible(window))
+ {
+ XMapRaised(_glfw.x11.display, window->x11.handle);
+ waitForVisibilityNotify(window);
+ }
+
+ updateWindowMode(window);
+ acquireMonitor(window);
+ }
+ else
+ {
+ updateWindowMode(window);
+ XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
+ xpos, ypos, width, height);
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+int _glfwPlatformWindowFocused(_GLFWwindow* window)
+{
+ Window focused;
+ int state;
+
+ XGetInputFocus(_glfw.x11.display, &focused, &state);
+ return window->x11.handle == focused;
+}
+
+int _glfwPlatformWindowIconified(_GLFWwindow* window)
+{
+ return getWindowState(window) == IconicState;
+}
+
+int _glfwPlatformWindowVisible(_GLFWwindow* window)
+{
+ XWindowAttributes wa;
+ XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &wa);
+ return wa.map_state == IsViewable;
+}
+
+int _glfwPlatformWindowMaximized(_GLFWwindow* window)
+{
+ Atom* states;
+ unsigned long i;
+ GLFWbool maximized = GLFW_FALSE;
+
+ if (!_glfw.x11.NET_WM_STATE ||
+ !_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||
+ !_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
+ {
+ return maximized;
+ }
+
+ const unsigned long count =
+ _glfwGetWindowPropertyX11(window->x11.handle,
+ _glfw.x11.NET_WM_STATE,
+ XA_ATOM,
+ (unsigned char**) &states);
+
+ for (i = 0; i < count; i++)
+ {
+ if (states[i] == _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||
+ states[i] == _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
+ {
+ maximized = GLFW_TRUE;
+ break;
+ }
+ }
+
+ if (states)
+ XFree(states);
+
+ return maximized;
+}
+
+int _glfwPlatformWindowHovered(_GLFWwindow* window)
+{
+ Window w = _glfw.x11.root;
+ while (w)
+ {
+ Window root;
+ int rootX, rootY, childX, childY;
+ unsigned int mask;
+
+ _glfwGrabErrorHandlerX11();
+
+ const Bool result = XQueryPointer(_glfw.x11.display, w,
+ &root, &w, &rootX, &rootY,
+ &childX, &childY, &mask);
+
+ _glfwReleaseErrorHandlerX11();
+
+ if (_glfw.x11.errorCode == BadWindow)
+ w = _glfw.x11.root;
+ else if (!result)
+ return GLFW_FALSE;
+ else if (w == window->x11.handle)
+ return GLFW_TRUE;
+ }
+
+ return GLFW_FALSE;
+}
+
+int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
+{
+ if (!window->x11.transparent)
+ return GLFW_FALSE;
+
+ return XGetSelectionOwner(_glfw.x11.display, _glfw.x11.NET_WM_CM_Sx) != None;
+}
+
+void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
+{
+ int width, height;
+ _glfwPlatformGetWindowSize(window, &width, &height);
+ updateNormalHints(window, width, height);
+}
+
+void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
+{
+ struct
+ {
+ unsigned long flags;
+ unsigned long functions;
+ unsigned long decorations;
+ long input_mode;
+ unsigned long status;
+ } hints = {0};
+
+ hints.flags = MWM_HINTS_DECORATIONS;
+ hints.decorations = enabled ? MWM_DECOR_ALL : 0;
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.MOTIF_WM_HINTS,
+ _glfw.x11.MOTIF_WM_HINTS, 32,
+ PropModeReplace,
+ (unsigned char*) &hints,
+ sizeof(hints) / sizeof(long));
+}
+
+void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
+{
+ if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_ABOVE)
+ return;
+
+ if (_glfwPlatformWindowVisible(window))
+ {
+ const long action = enabled ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+ sendEventToWM(window,
+ _glfw.x11.NET_WM_STATE,
+ action,
+ _glfw.x11.NET_WM_STATE_ABOVE,
+ 0, 1, 0);
+ }
+ else
+ {
+ Atom* states = NULL;
+ unsigned long i, count;
+
+ count = _glfwGetWindowPropertyX11(window->x11.handle,
+ _glfw.x11.NET_WM_STATE,
+ XA_ATOM,
+ (unsigned char**) &states);
+
+ // NOTE: We don't check for failure as this property may not exist yet
+ // and that's fine (and we'll create it implicitly with append)
+
+ if (enabled)
+ {
+ for (i = 0; i < count; i++)
+ {
+ if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)
+ break;
+ }
+
+ if (i == count)
+ {
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
+ PropModeAppend,
+ (unsigned char*) &_glfw.x11.NET_WM_STATE_ABOVE,
+ 1);
+ }
+ }
+ else if (states)
+ {
+ for (i = 0; i < count; i++)
+ {
+ if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)
+ break;
+ }
+
+ if (i < count)
+ {
+ states[i] = states[count - 1];
+ count--;
+
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
+ PropModeReplace, (unsigned char*) states, count);
+ }
+ }
+
+ if (states)
+ XFree(states);
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+float _glfwPlatformGetWindowOpacity(_GLFWwindow* window)
+{
+ float opacity = 1.f;
+
+ if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.NET_WM_CM_Sx))
+ {
+ CARD32* value = NULL;
+
+ if (_glfwGetWindowPropertyX11(window->x11.handle,
+ _glfw.x11.NET_WM_WINDOW_OPACITY,
+ XA_CARDINAL,
+ (unsigned char**) &value))
+ {
+ opacity = (float) (*value / (double) 0xffffffffu);
+ }
+
+ if (value)
+ XFree(value);
+ }
+
+ return opacity;
+}
+
+void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
+{
+ const CARD32 value = (CARD32) (0xffffffffu * (double) opacity);
+ XChangeProperty(_glfw.x11.display, window->x11.handle,
+ _glfw.x11.NET_WM_WINDOW_OPACITY, XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char*) &value, 1);
+}
+
+void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
+{
+ if (!_glfw.x11.xi.available)
+ return;
+
+ if (_glfw.x11.disabledCursorWindow != window)
+ return;
+
+ if (enabled)
+ enableRawMouseMotion(window);
+ else
+ disableRawMouseMotion(window);
+}
+
+GLFWbool _glfwPlatformRawMouseMotionSupported(void)
+{
+ return _glfw.x11.xi.available;
+}
+
+void _glfwPlatformPollEvents(void)
+{
+ _GLFWwindow* window;
+
+#if defined(__linux__)
+ _glfwDetectJoystickConnectionLinux();
+#endif
+ XPending(_glfw.x11.display);
+
+ while (XQLength(_glfw.x11.display))
+ {
+ XEvent event;
+ XNextEvent(_glfw.x11.display, &event);
+ processEvent(&event);
+ }
+
+ window = _glfw.x11.disabledCursorWindow;
+ if (window)
+ {
+ int width, height;
+ _glfwPlatformGetWindowSize(window, &width, &height);
+
+ // NOTE: Re-center the cursor only if it has moved since the last call,
+ // to avoid breaking glfwWaitEvents with MotionNotify
+ if (window->x11.lastCursorPosX != width / 2 ||
+ window->x11.lastCursorPosY != height / 2)
+ {
+ _glfwPlatformSetCursorPos(window, width / 2, height / 2);
+ }
+ }
+
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformWaitEvents(void)
+{
+ while (!XPending(_glfw.x11.display))
+ waitForEvent(NULL);
+
+ _glfwPlatformPollEvents();
+}
+
+void _glfwPlatformWaitEventsTimeout(double timeout)
+{
+ while (!XPending(_glfw.x11.display))
+ {
+ if (!waitForEvent(&timeout))
+ break;
+ }
+
+ _glfwPlatformPollEvents();
+}
+
+void _glfwPlatformPostEmptyEvent(void)
+{
+ XEvent event = { ClientMessage };
+ event.xclient.window = _glfw.x11.helperWindowHandle;
+ event.xclient.format = 32; // Data is 32-bit longs
+ event.xclient.message_type = _glfw.x11.NULL_;
+
+ XSendEvent(_glfw.x11.display, _glfw.x11.helperWindowHandle, False, 0, &event);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)
+{
+ Window root, child;
+ int rootX, rootY, childX, childY;
+ unsigned int mask;
+
+ XQueryPointer(_glfw.x11.display, window->x11.handle,
+ &root, &child,
+ &rootX, &rootY, &childX, &childY,
+ &mask);
+
+ if (xpos)
+ *xpos = childX;
+ if (ypos)
+ *ypos = childY;
+}
+
+void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
+{
+ // Store the new position so it can be recognized later
+ window->x11.warpCursorPosX = (int) x;
+ window->x11.warpCursorPosY = (int) y;
+
+ XWarpPointer(_glfw.x11.display, None, window->x11.handle,
+ 0,0,0,0, (int) x, (int) y);
+ XFlush(_glfw.x11.display);
+}
+
+void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
+{
+ if (mode == GLFW_CURSOR_DISABLED)
+ {
+ if (_glfwPlatformWindowFocused(window))
+ disableCursor(window);
+ }
+ else if (_glfw.x11.disabledCursorWindow == window)
+ enableCursor(window);
+ else
+ updateCursorImage(window);
+
+ XFlush(_glfw.x11.display);
+}
+
+const char* _glfwPlatformGetScancodeName(int scancode)
+{
+ if (!_glfw.x11.xkb.available)
+ return NULL;
+
+ if (scancode < 0 || scancode > 0xff ||
+ _glfw.x11.keycodes[scancode] == GLFW_KEY_UNKNOWN)
+ {
+ _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode);
+ return NULL;
+ }
+
+ const int key = _glfw.x11.keycodes[scancode];
+ const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display,
+ scancode, _glfw.x11.xkb.group, 0);
+ if (keysym == NoSymbol)
+ return NULL;
+
+ const long ch = _glfwKeySym2Unicode(keysym);
+ if (ch == -1)
+ return NULL;
+
+ const size_t count = encodeUTF8(_glfw.x11.keynames[key], (unsigned int) ch);
+ if (count == 0)
+ return NULL;
+
+ _glfw.x11.keynames[key][count] = '\0';
+ return _glfw.x11.keynames[key];
+}
+
+int _glfwPlatformGetKeyScancode(int key)
+{
+ return _glfw.x11.scancodes[key];
+}
+
+int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
+ const GLFWimage* image,
+ int xhot, int yhot)
+{
+ cursor->x11.handle = _glfwCreateCursorX11(image, xhot, yhot);
+ if (!cursor->x11.handle)
+ return GLFW_FALSE;
+
+ return GLFW_TRUE;
+}
+
+int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
+{
+ int native = 0;
+
+ if (shape == GLFW_ARROW_CURSOR)
+ native = XC_left_ptr;
+ else if (shape == GLFW_IBEAM_CURSOR)
+ native = XC_xterm;
+ else if (shape == GLFW_CROSSHAIR_CURSOR)
+ native = XC_crosshair;
+ else if (shape == GLFW_HAND_CURSOR)
+ native = XC_hand2;
+ else if (shape == GLFW_HRESIZE_CURSOR)
+ native = XC_sb_h_double_arrow;
+ else if (shape == GLFW_VRESIZE_CURSOR)
+ native = XC_sb_v_double_arrow;
+ else
+ return GLFW_FALSE;
+
+ cursor->x11.handle = XCreateFontCursor(_glfw.x11.display, native);
+ if (!cursor->x11.handle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to create standard cursor");
+ return GLFW_FALSE;
+ }
+
+ return GLFW_TRUE;
+}
+
+void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
+{
+ if (cursor->x11.handle)
+ XFreeCursor(_glfw.x11.display, cursor->x11.handle);
+}
+
+void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
+{
+ if (window->cursorMode == GLFW_CURSOR_NORMAL)
+ {
+ updateCursorImage(window);
+ XFlush(_glfw.x11.display);
+ }
+}
+
+void _glfwPlatformSetClipboardString(const char* string)
+{
+ char* copy = _glfw_strdup(string);
+ free(_glfw.x11.clipboardString);
+ _glfw.x11.clipboardString = copy;
+
+ XSetSelectionOwner(_glfw.x11.display,
+ _glfw.x11.CLIPBOARD,
+ _glfw.x11.helperWindowHandle,
+ CurrentTime);
+
+ if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) !=
+ _glfw.x11.helperWindowHandle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to become owner of clipboard selection");
+ }
+}
+
+const char* _glfwPlatformGetClipboardString(void)
+{
+ return getSelectionString(_glfw.x11.CLIPBOARD);
+}
+
+void _glfwPlatformGetRequiredInstanceExtensions(char** extensions)
+{
+ if (!_glfw.vk.KHR_surface)
+ return;
+
+ if (!_glfw.vk.KHR_xcb_surface || !_glfw.x11.x11xcb.handle)
+ {
+ if (!_glfw.vk.KHR_xlib_surface)
+ return;
+ }
+
+ extensions[0] = "VK_KHR_surface";
+
+ // NOTE: VK_KHR_xcb_surface is preferred due to some early ICDs exposing but
+ // not correctly implementing VK_KHR_xlib_surface
+ if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle)
+ extensions[1] = "VK_KHR_xcb_surface";
+ else
+ extensions[1] = "VK_KHR_xlib_surface";
+}
+
+int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
+ VkPhysicalDevice device,
+ uint32_t queuefamily)
+{
+ VisualID visualID = XVisualIDFromVisual(DefaultVisual(_glfw.x11.display,
+ _glfw.x11.screen));
+
+ if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle)
+ {
+ PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR
+ vkGetPhysicalDeviceXcbPresentationSupportKHR =
+ (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)
+ vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
+ if (!vkGetPhysicalDeviceXcbPresentationSupportKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "X11: Vulkan instance missing VK_KHR_xcb_surface extension");
+ return GLFW_FALSE;
+ }
+
+ xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display);
+ if (!connection)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to retrieve XCB connection");
+ return GLFW_FALSE;
+ }
+
+ return vkGetPhysicalDeviceXcbPresentationSupportKHR(device,
+ queuefamily,
+ connection,
+ visualID);
+ }
+ else
+ {
+ PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR
+ vkGetPhysicalDeviceXlibPresentationSupportKHR =
+ (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)
+ vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
+ if (!vkGetPhysicalDeviceXlibPresentationSupportKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "X11: Vulkan instance missing VK_KHR_xlib_surface extension");
+ return GLFW_FALSE;
+ }
+
+ return vkGetPhysicalDeviceXlibPresentationSupportKHR(device,
+ queuefamily,
+ _glfw.x11.display,
+ visualID);
+ }
+}
+
+VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
+ _GLFWwindow* window,
+ const VkAllocationCallbacks* allocator,
+ VkSurfaceKHR* surface)
+{
+ if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle)
+ {
+ VkResult err;
+ VkXcbSurfaceCreateInfoKHR sci;
+ PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;
+
+ xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display);
+ if (!connection)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to retrieve XCB connection");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)
+ vkGetInstanceProcAddr(instance, "vkCreateXcbSurfaceKHR");
+ if (!vkCreateXcbSurfaceKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "X11: Vulkan instance missing VK_KHR_xcb_surface extension");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ memset(&sci, 0, sizeof(sci));
+ sci.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;
+ sci.connection = connection;
+ sci.window = window->x11.handle;
+
+ err = vkCreateXcbSurfaceKHR(instance, &sci, allocator, surface);
+ if (err)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to create Vulkan XCB surface: %s",
+ _glfwGetVulkanResultString(err));
+ }
+
+ return err;
+ }
+ else
+ {
+ VkResult err;
+ VkXlibSurfaceCreateInfoKHR sci;
+ PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR;
+
+ vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)
+ vkGetInstanceProcAddr(instance, "vkCreateXlibSurfaceKHR");
+ if (!vkCreateXlibSurfaceKHR)
+ {
+ _glfwInputError(GLFW_API_UNAVAILABLE,
+ "X11: Vulkan instance missing VK_KHR_xlib_surface extension");
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+
+ memset(&sci, 0, sizeof(sci));
+ sci.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
+ sci.dpy = _glfw.x11.display;
+ sci.window = window->x11.handle;
+
+ err = vkCreateXlibSurfaceKHR(instance, &sci, allocator, surface);
+ if (err)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to create Vulkan X11 surface: %s",
+ _glfwGetVulkanResultString(err));
+ }
+
+ return err;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW native API //////
+//////////////////////////////////////////////////////////////////////////
+
+GLFWAPI Display* glfwGetX11Display(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return _glfw.x11.display;
+}
+
+GLFWAPI Window glfwGetX11Window(GLFWwindow* handle)
+{
+ _GLFWwindow* window = (_GLFWwindow*) handle;
+ _GLFW_REQUIRE_INIT_OR_RETURN(None);
+ return window->x11.handle;
+}
+
+GLFWAPI void glfwSetX11SelectionString(const char* string)
+{
+ _GLFW_REQUIRE_INIT();
+
+ free(_glfw.x11.primarySelectionString);
+ _glfw.x11.primarySelectionString = _glfw_strdup(string);
+
+ XSetSelectionOwner(_glfw.x11.display,
+ _glfw.x11.PRIMARY,
+ _glfw.x11.helperWindowHandle,
+ CurrentTime);
+
+ if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.PRIMARY) !=
+ _glfw.x11.helperWindowHandle)
+ {
+ _glfwInputError(GLFW_PLATFORM_ERROR,
+ "X11: Failed to become owner of primary selection");
+ }
+}
+
+GLFWAPI const char* glfwGetX11SelectionString(void)
+{
+ _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
+ return getSelectionString(_glfw.x11.PRIMARY);
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.c b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.c
new file mode 100644
index 0000000..f30c4cd
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.c
@@ -0,0 +1,942 @@
+//========================================================================
+// GLFW 3.3 X11 - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
+
+#include "internal.h"
+
+
+/*
+ * Marcus: This code was originally written by Markus G. Kuhn.
+ * I have made some slight changes (trimmed it down a bit from >60 KB to
+ * 20 KB), but the functionality is the same.
+ */
+
+/*
+ * This module converts keysym values into the corresponding ISO 10646
+ * (UCS, Unicode) values.
+ *
+ * The array keysymtab[] contains pairs of X11 keysym values for graphical
+ * characters and the corresponding Unicode value. The function
+ * _glfwKeySym2Unicode() maps a keysym onto a Unicode value using a binary
+ * search, therefore keysymtab[] must remain SORTED by keysym value.
+ *
+ * We allow to represent any UCS character in the range U-00000000 to
+ * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff.
+ * This admittedly does not cover the entire 31-bit space of UCS, but
+ * it does cover all of the characters up to U-10FFFF, which can be
+ * represented by UTF-16, and more, and it is very unlikely that higher
+ * UCS codes will ever be assigned by ISO. So to get Unicode character
+ * U+ABCD you can directly use keysym 0x0100abcd.
+ *
+ * Original author: Markus G. Kuhn <mkuhn@acm.org>, University of
+ * Cambridge, April 2001
+ *
+ * Special thanks to Richard Verhoeven <river@win.tue.nl> for preparing
+ * an initial draft of the mapping table.
+ *
+ */
+
+
+//************************************************************************
+//**** KeySym to Unicode mapping table ****
+//************************************************************************
+
+static const struct codepair {
+ unsigned short keysym;
+ unsigned short ucs;
+} keysymtab[] = {
+ { 0x01a1, 0x0104 },
+ { 0x01a2, 0x02d8 },
+ { 0x01a3, 0x0141 },
+ { 0x01a5, 0x013d },
+ { 0x01a6, 0x015a },
+ { 0x01a9, 0x0160 },
+ { 0x01aa, 0x015e },
+ { 0x01ab, 0x0164 },
+ { 0x01ac, 0x0179 },
+ { 0x01ae, 0x017d },
+ { 0x01af, 0x017b },
+ { 0x01b1, 0x0105 },
+ { 0x01b2, 0x02db },
+ { 0x01b3, 0x0142 },
+ { 0x01b5, 0x013e },
+ { 0x01b6, 0x015b },
+ { 0x01b7, 0x02c7 },
+ { 0x01b9, 0x0161 },
+ { 0x01ba, 0x015f },
+ { 0x01bb, 0x0165 },
+ { 0x01bc, 0x017a },
+ { 0x01bd, 0x02dd },
+ { 0x01be, 0x017e },
+ { 0x01bf, 0x017c },
+ { 0x01c0, 0x0154 },
+ { 0x01c3, 0x0102 },
+ { 0x01c5, 0x0139 },
+ { 0x01c6, 0x0106 },
+ { 0x01c8, 0x010c },
+ { 0x01ca, 0x0118 },
+ { 0x01cc, 0x011a },
+ { 0x01cf, 0x010e },
+ { 0x01d0, 0x0110 },
+ { 0x01d1, 0x0143 },
+ { 0x01d2, 0x0147 },
+ { 0x01d5, 0x0150 },
+ { 0x01d8, 0x0158 },
+ { 0x01d9, 0x016e },
+ { 0x01db, 0x0170 },
+ { 0x01de, 0x0162 },
+ { 0x01e0, 0x0155 },
+ { 0x01e3, 0x0103 },
+ { 0x01e5, 0x013a },
+ { 0x01e6, 0x0107 },
+ { 0x01e8, 0x010d },
+ { 0x01ea, 0x0119 },
+ { 0x01ec, 0x011b },
+ { 0x01ef, 0x010f },
+ { 0x01f0, 0x0111 },
+ { 0x01f1, 0x0144 },
+ { 0x01f2, 0x0148 },
+ { 0x01f5, 0x0151 },
+ { 0x01f8, 0x0159 },
+ { 0x01f9, 0x016f },
+ { 0x01fb, 0x0171 },
+ { 0x01fe, 0x0163 },
+ { 0x01ff, 0x02d9 },
+ { 0x02a1, 0x0126 },
+ { 0x02a6, 0x0124 },
+ { 0x02a9, 0x0130 },
+ { 0x02ab, 0x011e },
+ { 0x02ac, 0x0134 },
+ { 0x02b1, 0x0127 },
+ { 0x02b6, 0x0125 },
+ { 0x02b9, 0x0131 },
+ { 0x02bb, 0x011f },
+ { 0x02bc, 0x0135 },
+ { 0x02c5, 0x010a },
+ { 0x02c6, 0x0108 },
+ { 0x02d5, 0x0120 },
+ { 0x02d8, 0x011c },
+ { 0x02dd, 0x016c },
+ { 0x02de, 0x015c },
+ { 0x02e5, 0x010b },
+ { 0x02e6, 0x0109 },
+ { 0x02f5, 0x0121 },
+ { 0x02f8, 0x011d },
+ { 0x02fd, 0x016d },
+ { 0x02fe, 0x015d },
+ { 0x03a2, 0x0138 },
+ { 0x03a3, 0x0156 },
+ { 0x03a5, 0x0128 },
+ { 0x03a6, 0x013b },
+ { 0x03aa, 0x0112 },
+ { 0x03ab, 0x0122 },
+ { 0x03ac, 0x0166 },
+ { 0x03b3, 0x0157 },
+ { 0x03b5, 0x0129 },
+ { 0x03b6, 0x013c },
+ { 0x03ba, 0x0113 },
+ { 0x03bb, 0x0123 },
+ { 0x03bc, 0x0167 },
+ { 0x03bd, 0x014a },
+ { 0x03bf, 0x014b },
+ { 0x03c0, 0x0100 },
+ { 0x03c7, 0x012e },
+ { 0x03cc, 0x0116 },
+ { 0x03cf, 0x012a },
+ { 0x03d1, 0x0145 },
+ { 0x03d2, 0x014c },
+ { 0x03d3, 0x0136 },
+ { 0x03d9, 0x0172 },
+ { 0x03dd, 0x0168 },
+ { 0x03de, 0x016a },
+ { 0x03e0, 0x0101 },
+ { 0x03e7, 0x012f },
+ { 0x03ec, 0x0117 },
+ { 0x03ef, 0x012b },
+ { 0x03f1, 0x0146 },
+ { 0x03f2, 0x014d },
+ { 0x03f3, 0x0137 },
+ { 0x03f9, 0x0173 },
+ { 0x03fd, 0x0169 },
+ { 0x03fe, 0x016b },
+ { 0x047e, 0x203e },
+ { 0x04a1, 0x3002 },
+ { 0x04a2, 0x300c },
+ { 0x04a3, 0x300d },
+ { 0x04a4, 0x3001 },
+ { 0x04a5, 0x30fb },
+ { 0x04a6, 0x30f2 },
+ { 0x04a7, 0x30a1 },
+ { 0x04a8, 0x30a3 },
+ { 0x04a9, 0x30a5 },
+ { 0x04aa, 0x30a7 },
+ { 0x04ab, 0x30a9 },
+ { 0x04ac, 0x30e3 },
+ { 0x04ad, 0x30e5 },
+ { 0x04ae, 0x30e7 },
+ { 0x04af, 0x30c3 },
+ { 0x04b0, 0x30fc },
+ { 0x04b1, 0x30a2 },
+ { 0x04b2, 0x30a4 },
+ { 0x04b3, 0x30a6 },
+ { 0x04b4, 0x30a8 },
+ { 0x04b5, 0x30aa },
+ { 0x04b6, 0x30ab },
+ { 0x04b7, 0x30ad },
+ { 0x04b8, 0x30af },
+ { 0x04b9, 0x30b1 },
+ { 0x04ba, 0x30b3 },
+ { 0x04bb, 0x30b5 },
+ { 0x04bc, 0x30b7 },
+ { 0x04bd, 0x30b9 },
+ { 0x04be, 0x30bb },
+ { 0x04bf, 0x30bd },
+ { 0x04c0, 0x30bf },
+ { 0x04c1, 0x30c1 },
+ { 0x04c2, 0x30c4 },
+ { 0x04c3, 0x30c6 },
+ { 0x04c4, 0x30c8 },
+ { 0x04c5, 0x30ca },
+ { 0x04c6, 0x30cb },
+ { 0x04c7, 0x30cc },
+ { 0x04c8, 0x30cd },
+ { 0x04c9, 0x30ce },
+ { 0x04ca, 0x30cf },
+ { 0x04cb, 0x30d2 },
+ { 0x04cc, 0x30d5 },
+ { 0x04cd, 0x30d8 },
+ { 0x04ce, 0x30db },
+ { 0x04cf, 0x30de },
+ { 0x04d0, 0x30df },
+ { 0x04d1, 0x30e0 },
+ { 0x04d2, 0x30e1 },
+ { 0x04d3, 0x30e2 },
+ { 0x04d4, 0x30e4 },
+ { 0x04d5, 0x30e6 },
+ { 0x04d6, 0x30e8 },
+ { 0x04d7, 0x30e9 },
+ { 0x04d8, 0x30ea },
+ { 0x04d9, 0x30eb },
+ { 0x04da, 0x30ec },
+ { 0x04db, 0x30ed },
+ { 0x04dc, 0x30ef },
+ { 0x04dd, 0x30f3 },
+ { 0x04de, 0x309b },
+ { 0x04df, 0x309c },
+ { 0x05ac, 0x060c },
+ { 0x05bb, 0x061b },
+ { 0x05bf, 0x061f },
+ { 0x05c1, 0x0621 },
+ { 0x05c2, 0x0622 },
+ { 0x05c3, 0x0623 },
+ { 0x05c4, 0x0624 },
+ { 0x05c5, 0x0625 },
+ { 0x05c6, 0x0626 },
+ { 0x05c7, 0x0627 },
+ { 0x05c8, 0x0628 },
+ { 0x05c9, 0x0629 },
+ { 0x05ca, 0x062a },
+ { 0x05cb, 0x062b },
+ { 0x05cc, 0x062c },
+ { 0x05cd, 0x062d },
+ { 0x05ce, 0x062e },
+ { 0x05cf, 0x062f },
+ { 0x05d0, 0x0630 },
+ { 0x05d1, 0x0631 },
+ { 0x05d2, 0x0632 },
+ { 0x05d3, 0x0633 },
+ { 0x05d4, 0x0634 },
+ { 0x05d5, 0x0635 },
+ { 0x05d6, 0x0636 },
+ { 0x05d7, 0x0637 },
+ { 0x05d8, 0x0638 },
+ { 0x05d9, 0x0639 },
+ { 0x05da, 0x063a },
+ { 0x05e0, 0x0640 },
+ { 0x05e1, 0x0641 },
+ { 0x05e2, 0x0642 },
+ { 0x05e3, 0x0643 },
+ { 0x05e4, 0x0644 },
+ { 0x05e5, 0x0645 },
+ { 0x05e6, 0x0646 },
+ { 0x05e7, 0x0647 },
+ { 0x05e8, 0x0648 },
+ { 0x05e9, 0x0649 },
+ { 0x05ea, 0x064a },
+ { 0x05eb, 0x064b },
+ { 0x05ec, 0x064c },
+ { 0x05ed, 0x064d },
+ { 0x05ee, 0x064e },
+ { 0x05ef, 0x064f },
+ { 0x05f0, 0x0650 },
+ { 0x05f1, 0x0651 },
+ { 0x05f2, 0x0652 },
+ { 0x06a1, 0x0452 },
+ { 0x06a2, 0x0453 },
+ { 0x06a3, 0x0451 },
+ { 0x06a4, 0x0454 },
+ { 0x06a5, 0x0455 },
+ { 0x06a6, 0x0456 },
+ { 0x06a7, 0x0457 },
+ { 0x06a8, 0x0458 },
+ { 0x06a9, 0x0459 },
+ { 0x06aa, 0x045a },
+ { 0x06ab, 0x045b },
+ { 0x06ac, 0x045c },
+ { 0x06ae, 0x045e },
+ { 0x06af, 0x045f },
+ { 0x06b0, 0x2116 },
+ { 0x06b1, 0x0402 },
+ { 0x06b2, 0x0403 },
+ { 0x06b3, 0x0401 },
+ { 0x06b4, 0x0404 },
+ { 0x06b5, 0x0405 },
+ { 0x06b6, 0x0406 },
+ { 0x06b7, 0x0407 },
+ { 0x06b8, 0x0408 },
+ { 0x06b9, 0x0409 },
+ { 0x06ba, 0x040a },
+ { 0x06bb, 0x040b },
+ { 0x06bc, 0x040c },
+ { 0x06be, 0x040e },
+ { 0x06bf, 0x040f },
+ { 0x06c0, 0x044e },
+ { 0x06c1, 0x0430 },
+ { 0x06c2, 0x0431 },
+ { 0x06c3, 0x0446 },
+ { 0x06c4, 0x0434 },
+ { 0x06c5, 0x0435 },
+ { 0x06c6, 0x0444 },
+ { 0x06c7, 0x0433 },
+ { 0x06c8, 0x0445 },
+ { 0x06c9, 0x0438 },
+ { 0x06ca, 0x0439 },
+ { 0x06cb, 0x043a },
+ { 0x06cc, 0x043b },
+ { 0x06cd, 0x043c },
+ { 0x06ce, 0x043d },
+ { 0x06cf, 0x043e },
+ { 0x06d0, 0x043f },
+ { 0x06d1, 0x044f },
+ { 0x06d2, 0x0440 },
+ { 0x06d3, 0x0441 },
+ { 0x06d4, 0x0442 },
+ { 0x06d5, 0x0443 },
+ { 0x06d6, 0x0436 },
+ { 0x06d7, 0x0432 },
+ { 0x06d8, 0x044c },
+ { 0x06d9, 0x044b },
+ { 0x06da, 0x0437 },
+ { 0x06db, 0x0448 },
+ { 0x06dc, 0x044d },
+ { 0x06dd, 0x0449 },
+ { 0x06de, 0x0447 },
+ { 0x06df, 0x044a },
+ { 0x06e0, 0x042e },
+ { 0x06e1, 0x0410 },
+ { 0x06e2, 0x0411 },
+ { 0x06e3, 0x0426 },
+ { 0x06e4, 0x0414 },
+ { 0x06e5, 0x0415 },
+ { 0x06e6, 0x0424 },
+ { 0x06e7, 0x0413 },
+ { 0x06e8, 0x0425 },
+ { 0x06e9, 0x0418 },
+ { 0x06ea, 0x0419 },
+ { 0x06eb, 0x041a },
+ { 0x06ec, 0x041b },
+ { 0x06ed, 0x041c },
+ { 0x06ee, 0x041d },
+ { 0x06ef, 0x041e },
+ { 0x06f0, 0x041f },
+ { 0x06f1, 0x042f },
+ { 0x06f2, 0x0420 },
+ { 0x06f3, 0x0421 },
+ { 0x06f4, 0x0422 },
+ { 0x06f5, 0x0423 },
+ { 0x06f6, 0x0416 },
+ { 0x06f7, 0x0412 },
+ { 0x06f8, 0x042c },
+ { 0x06f9, 0x042b },
+ { 0x06fa, 0x0417 },
+ { 0x06fb, 0x0428 },
+ { 0x06fc, 0x042d },
+ { 0x06fd, 0x0429 },
+ { 0x06fe, 0x0427 },
+ { 0x06ff, 0x042a },
+ { 0x07a1, 0x0386 },
+ { 0x07a2, 0x0388 },
+ { 0x07a3, 0x0389 },
+ { 0x07a4, 0x038a },
+ { 0x07a5, 0x03aa },
+ { 0x07a7, 0x038c },
+ { 0x07a8, 0x038e },
+ { 0x07a9, 0x03ab },
+ { 0x07ab, 0x038f },
+ { 0x07ae, 0x0385 },
+ { 0x07af, 0x2015 },
+ { 0x07b1, 0x03ac },
+ { 0x07b2, 0x03ad },
+ { 0x07b3, 0x03ae },
+ { 0x07b4, 0x03af },
+ { 0x07b5, 0x03ca },
+ { 0x07b6, 0x0390 },
+ { 0x07b7, 0x03cc },
+ { 0x07b8, 0x03cd },
+ { 0x07b9, 0x03cb },
+ { 0x07ba, 0x03b0 },
+ { 0x07bb, 0x03ce },
+ { 0x07c1, 0x0391 },
+ { 0x07c2, 0x0392 },
+ { 0x07c3, 0x0393 },
+ { 0x07c4, 0x0394 },
+ { 0x07c5, 0x0395 },
+ { 0x07c6, 0x0396 },
+ { 0x07c7, 0x0397 },
+ { 0x07c8, 0x0398 },
+ { 0x07c9, 0x0399 },
+ { 0x07ca, 0x039a },
+ { 0x07cb, 0x039b },
+ { 0x07cc, 0x039c },
+ { 0x07cd, 0x039d },
+ { 0x07ce, 0x039e },
+ { 0x07cf, 0x039f },
+ { 0x07d0, 0x03a0 },
+ { 0x07d1, 0x03a1 },
+ { 0x07d2, 0x03a3 },
+ { 0x07d4, 0x03a4 },
+ { 0x07d5, 0x03a5 },
+ { 0x07d6, 0x03a6 },
+ { 0x07d7, 0x03a7 },
+ { 0x07d8, 0x03a8 },
+ { 0x07d9, 0x03a9 },
+ { 0x07e1, 0x03b1 },
+ { 0x07e2, 0x03b2 },
+ { 0x07e3, 0x03b3 },
+ { 0x07e4, 0x03b4 },
+ { 0x07e5, 0x03b5 },
+ { 0x07e6, 0x03b6 },
+ { 0x07e7, 0x03b7 },
+ { 0x07e8, 0x03b8 },
+ { 0x07e9, 0x03b9 },
+ { 0x07ea, 0x03ba },
+ { 0x07eb, 0x03bb },
+ { 0x07ec, 0x03bc },
+ { 0x07ed, 0x03bd },
+ { 0x07ee, 0x03be },
+ { 0x07ef, 0x03bf },
+ { 0x07f0, 0x03c0 },
+ { 0x07f1, 0x03c1 },
+ { 0x07f2, 0x03c3 },
+ { 0x07f3, 0x03c2 },
+ { 0x07f4, 0x03c4 },
+ { 0x07f5, 0x03c5 },
+ { 0x07f6, 0x03c6 },
+ { 0x07f7, 0x03c7 },
+ { 0x07f8, 0x03c8 },
+ { 0x07f9, 0x03c9 },
+ { 0x08a1, 0x23b7 },
+ { 0x08a2, 0x250c },
+ { 0x08a3, 0x2500 },
+ { 0x08a4, 0x2320 },
+ { 0x08a5, 0x2321 },
+ { 0x08a6, 0x2502 },
+ { 0x08a7, 0x23a1 },
+ { 0x08a8, 0x23a3 },
+ { 0x08a9, 0x23a4 },
+ { 0x08aa, 0x23a6 },
+ { 0x08ab, 0x239b },
+ { 0x08ac, 0x239d },
+ { 0x08ad, 0x239e },
+ { 0x08ae, 0x23a0 },
+ { 0x08af, 0x23a8 },
+ { 0x08b0, 0x23ac },
+ { 0x08bc, 0x2264 },
+ { 0x08bd, 0x2260 },
+ { 0x08be, 0x2265 },
+ { 0x08bf, 0x222b },
+ { 0x08c0, 0x2234 },
+ { 0x08c1, 0x221d },
+ { 0x08c2, 0x221e },
+ { 0x08c5, 0x2207 },
+ { 0x08c8, 0x223c },
+ { 0x08c9, 0x2243 },
+ { 0x08cd, 0x21d4 },
+ { 0x08ce, 0x21d2 },
+ { 0x08cf, 0x2261 },
+ { 0x08d6, 0x221a },
+ { 0x08da, 0x2282 },
+ { 0x08db, 0x2283 },
+ { 0x08dc, 0x2229 },
+ { 0x08dd, 0x222a },
+ { 0x08de, 0x2227 },
+ { 0x08df, 0x2228 },
+ { 0x08ef, 0x2202 },
+ { 0x08f6, 0x0192 },
+ { 0x08fb, 0x2190 },
+ { 0x08fc, 0x2191 },
+ { 0x08fd, 0x2192 },
+ { 0x08fe, 0x2193 },
+ { 0x09e0, 0x25c6 },
+ { 0x09e1, 0x2592 },
+ { 0x09e2, 0x2409 },
+ { 0x09e3, 0x240c },
+ { 0x09e4, 0x240d },
+ { 0x09e5, 0x240a },
+ { 0x09e8, 0x2424 },
+ { 0x09e9, 0x240b },
+ { 0x09ea, 0x2518 },
+ { 0x09eb, 0x2510 },
+ { 0x09ec, 0x250c },
+ { 0x09ed, 0x2514 },
+ { 0x09ee, 0x253c },
+ { 0x09ef, 0x23ba },
+ { 0x09f0, 0x23bb },
+ { 0x09f1, 0x2500 },
+ { 0x09f2, 0x23bc },
+ { 0x09f3, 0x23bd },
+ { 0x09f4, 0x251c },
+ { 0x09f5, 0x2524 },
+ { 0x09f6, 0x2534 },
+ { 0x09f7, 0x252c },
+ { 0x09f8, 0x2502 },
+ { 0x0aa1, 0x2003 },
+ { 0x0aa2, 0x2002 },
+ { 0x0aa3, 0x2004 },
+ { 0x0aa4, 0x2005 },
+ { 0x0aa5, 0x2007 },
+ { 0x0aa6, 0x2008 },
+ { 0x0aa7, 0x2009 },
+ { 0x0aa8, 0x200a },
+ { 0x0aa9, 0x2014 },
+ { 0x0aaa, 0x2013 },
+ { 0x0aae, 0x2026 },
+ { 0x0aaf, 0x2025 },
+ { 0x0ab0, 0x2153 },
+ { 0x0ab1, 0x2154 },
+ { 0x0ab2, 0x2155 },
+ { 0x0ab3, 0x2156 },
+ { 0x0ab4, 0x2157 },
+ { 0x0ab5, 0x2158 },
+ { 0x0ab6, 0x2159 },
+ { 0x0ab7, 0x215a },
+ { 0x0ab8, 0x2105 },
+ { 0x0abb, 0x2012 },
+ { 0x0abc, 0x2329 },
+ { 0x0abe, 0x232a },
+ { 0x0ac3, 0x215b },
+ { 0x0ac4, 0x215c },
+ { 0x0ac5, 0x215d },
+ { 0x0ac6, 0x215e },
+ { 0x0ac9, 0x2122 },
+ { 0x0aca, 0x2613 },
+ { 0x0acc, 0x25c1 },
+ { 0x0acd, 0x25b7 },
+ { 0x0ace, 0x25cb },
+ { 0x0acf, 0x25af },
+ { 0x0ad0, 0x2018 },
+ { 0x0ad1, 0x2019 },
+ { 0x0ad2, 0x201c },
+ { 0x0ad3, 0x201d },
+ { 0x0ad4, 0x211e },
+ { 0x0ad6, 0x2032 },
+ { 0x0ad7, 0x2033 },
+ { 0x0ad9, 0x271d },
+ { 0x0adb, 0x25ac },
+ { 0x0adc, 0x25c0 },
+ { 0x0add, 0x25b6 },
+ { 0x0ade, 0x25cf },
+ { 0x0adf, 0x25ae },
+ { 0x0ae0, 0x25e6 },
+ { 0x0ae1, 0x25ab },
+ { 0x0ae2, 0x25ad },
+ { 0x0ae3, 0x25b3 },
+ { 0x0ae4, 0x25bd },
+ { 0x0ae5, 0x2606 },
+ { 0x0ae6, 0x2022 },
+ { 0x0ae7, 0x25aa },
+ { 0x0ae8, 0x25b2 },
+ { 0x0ae9, 0x25bc },
+ { 0x0aea, 0x261c },
+ { 0x0aeb, 0x261e },
+ { 0x0aec, 0x2663 },
+ { 0x0aed, 0x2666 },
+ { 0x0aee, 0x2665 },
+ { 0x0af0, 0x2720 },
+ { 0x0af1, 0x2020 },
+ { 0x0af2, 0x2021 },
+ { 0x0af3, 0x2713 },
+ { 0x0af4, 0x2717 },
+ { 0x0af5, 0x266f },
+ { 0x0af6, 0x266d },
+ { 0x0af7, 0x2642 },
+ { 0x0af8, 0x2640 },
+ { 0x0af9, 0x260e },
+ { 0x0afa, 0x2315 },
+ { 0x0afb, 0x2117 },
+ { 0x0afc, 0x2038 },
+ { 0x0afd, 0x201a },
+ { 0x0afe, 0x201e },
+ { 0x0ba3, 0x003c },
+ { 0x0ba6, 0x003e },
+ { 0x0ba8, 0x2228 },
+ { 0x0ba9, 0x2227 },
+ { 0x0bc0, 0x00af },
+ { 0x0bc2, 0x22a5 },
+ { 0x0bc3, 0x2229 },
+ { 0x0bc4, 0x230a },
+ { 0x0bc6, 0x005f },
+ { 0x0bca, 0x2218 },
+ { 0x0bcc, 0x2395 },
+ { 0x0bce, 0x22a4 },
+ { 0x0bcf, 0x25cb },
+ { 0x0bd3, 0x2308 },
+ { 0x0bd6, 0x222a },
+ { 0x0bd8, 0x2283 },
+ { 0x0bda, 0x2282 },
+ { 0x0bdc, 0x22a2 },
+ { 0x0bfc, 0x22a3 },
+ { 0x0cdf, 0x2017 },
+ { 0x0ce0, 0x05d0 },
+ { 0x0ce1, 0x05d1 },
+ { 0x0ce2, 0x05d2 },
+ { 0x0ce3, 0x05d3 },
+ { 0x0ce4, 0x05d4 },
+ { 0x0ce5, 0x05d5 },
+ { 0x0ce6, 0x05d6 },
+ { 0x0ce7, 0x05d7 },
+ { 0x0ce8, 0x05d8 },
+ { 0x0ce9, 0x05d9 },
+ { 0x0cea, 0x05da },
+ { 0x0ceb, 0x05db },
+ { 0x0cec, 0x05dc },
+ { 0x0ced, 0x05dd },
+ { 0x0cee, 0x05de },
+ { 0x0cef, 0x05df },
+ { 0x0cf0, 0x05e0 },
+ { 0x0cf1, 0x05e1 },
+ { 0x0cf2, 0x05e2 },
+ { 0x0cf3, 0x05e3 },
+ { 0x0cf4, 0x05e4 },
+ { 0x0cf5, 0x05e5 },
+ { 0x0cf6, 0x05e6 },
+ { 0x0cf7, 0x05e7 },
+ { 0x0cf8, 0x05e8 },
+ { 0x0cf9, 0x05e9 },
+ { 0x0cfa, 0x05ea },
+ { 0x0da1, 0x0e01 },
+ { 0x0da2, 0x0e02 },
+ { 0x0da3, 0x0e03 },
+ { 0x0da4, 0x0e04 },
+ { 0x0da5, 0x0e05 },
+ { 0x0da6, 0x0e06 },
+ { 0x0da7, 0x0e07 },
+ { 0x0da8, 0x0e08 },
+ { 0x0da9, 0x0e09 },
+ { 0x0daa, 0x0e0a },
+ { 0x0dab, 0x0e0b },
+ { 0x0dac, 0x0e0c },
+ { 0x0dad, 0x0e0d },
+ { 0x0dae, 0x0e0e },
+ { 0x0daf, 0x0e0f },
+ { 0x0db0, 0x0e10 },
+ { 0x0db1, 0x0e11 },
+ { 0x0db2, 0x0e12 },
+ { 0x0db3, 0x0e13 },
+ { 0x0db4, 0x0e14 },
+ { 0x0db5, 0x0e15 },
+ { 0x0db6, 0x0e16 },
+ { 0x0db7, 0x0e17 },
+ { 0x0db8, 0x0e18 },
+ { 0x0db9, 0x0e19 },
+ { 0x0dba, 0x0e1a },
+ { 0x0dbb, 0x0e1b },
+ { 0x0dbc, 0x0e1c },
+ { 0x0dbd, 0x0e1d },
+ { 0x0dbe, 0x0e1e },
+ { 0x0dbf, 0x0e1f },
+ { 0x0dc0, 0x0e20 },
+ { 0x0dc1, 0x0e21 },
+ { 0x0dc2, 0x0e22 },
+ { 0x0dc3, 0x0e23 },
+ { 0x0dc4, 0x0e24 },
+ { 0x0dc5, 0x0e25 },
+ { 0x0dc6, 0x0e26 },
+ { 0x0dc7, 0x0e27 },
+ { 0x0dc8, 0x0e28 },
+ { 0x0dc9, 0x0e29 },
+ { 0x0dca, 0x0e2a },
+ { 0x0dcb, 0x0e2b },
+ { 0x0dcc, 0x0e2c },
+ { 0x0dcd, 0x0e2d },
+ { 0x0dce, 0x0e2e },
+ { 0x0dcf, 0x0e2f },
+ { 0x0dd0, 0x0e30 },
+ { 0x0dd1, 0x0e31 },
+ { 0x0dd2, 0x0e32 },
+ { 0x0dd3, 0x0e33 },
+ { 0x0dd4, 0x0e34 },
+ { 0x0dd5, 0x0e35 },
+ { 0x0dd6, 0x0e36 },
+ { 0x0dd7, 0x0e37 },
+ { 0x0dd8, 0x0e38 },
+ { 0x0dd9, 0x0e39 },
+ { 0x0dda, 0x0e3a },
+ { 0x0ddf, 0x0e3f },
+ { 0x0de0, 0x0e40 },
+ { 0x0de1, 0x0e41 },
+ { 0x0de2, 0x0e42 },
+ { 0x0de3, 0x0e43 },
+ { 0x0de4, 0x0e44 },
+ { 0x0de5, 0x0e45 },
+ { 0x0de6, 0x0e46 },
+ { 0x0de7, 0x0e47 },
+ { 0x0de8, 0x0e48 },
+ { 0x0de9, 0x0e49 },
+ { 0x0dea, 0x0e4a },
+ { 0x0deb, 0x0e4b },
+ { 0x0dec, 0x0e4c },
+ { 0x0ded, 0x0e4d },
+ { 0x0df0, 0x0e50 },
+ { 0x0df1, 0x0e51 },
+ { 0x0df2, 0x0e52 },
+ { 0x0df3, 0x0e53 },
+ { 0x0df4, 0x0e54 },
+ { 0x0df5, 0x0e55 },
+ { 0x0df6, 0x0e56 },
+ { 0x0df7, 0x0e57 },
+ { 0x0df8, 0x0e58 },
+ { 0x0df9, 0x0e59 },
+ { 0x0ea1, 0x3131 },
+ { 0x0ea2, 0x3132 },
+ { 0x0ea3, 0x3133 },
+ { 0x0ea4, 0x3134 },
+ { 0x0ea5, 0x3135 },
+ { 0x0ea6, 0x3136 },
+ { 0x0ea7, 0x3137 },
+ { 0x0ea8, 0x3138 },
+ { 0x0ea9, 0x3139 },
+ { 0x0eaa, 0x313a },
+ { 0x0eab, 0x313b },
+ { 0x0eac, 0x313c },
+ { 0x0ead, 0x313d },
+ { 0x0eae, 0x313e },
+ { 0x0eaf, 0x313f },
+ { 0x0eb0, 0x3140 },
+ { 0x0eb1, 0x3141 },
+ { 0x0eb2, 0x3142 },
+ { 0x0eb3, 0x3143 },
+ { 0x0eb4, 0x3144 },
+ { 0x0eb5, 0x3145 },
+ { 0x0eb6, 0x3146 },
+ { 0x0eb7, 0x3147 },
+ { 0x0eb8, 0x3148 },
+ { 0x0eb9, 0x3149 },
+ { 0x0eba, 0x314a },
+ { 0x0ebb, 0x314b },
+ { 0x0ebc, 0x314c },
+ { 0x0ebd, 0x314d },
+ { 0x0ebe, 0x314e },
+ { 0x0ebf, 0x314f },
+ { 0x0ec0, 0x3150 },
+ { 0x0ec1, 0x3151 },
+ { 0x0ec2, 0x3152 },
+ { 0x0ec3, 0x3153 },
+ { 0x0ec4, 0x3154 },
+ { 0x0ec5, 0x3155 },
+ { 0x0ec6, 0x3156 },
+ { 0x0ec7, 0x3157 },
+ { 0x0ec8, 0x3158 },
+ { 0x0ec9, 0x3159 },
+ { 0x0eca, 0x315a },
+ { 0x0ecb, 0x315b },
+ { 0x0ecc, 0x315c },
+ { 0x0ecd, 0x315d },
+ { 0x0ece, 0x315e },
+ { 0x0ecf, 0x315f },
+ { 0x0ed0, 0x3160 },
+ { 0x0ed1, 0x3161 },
+ { 0x0ed2, 0x3162 },
+ { 0x0ed3, 0x3163 },
+ { 0x0ed4, 0x11a8 },
+ { 0x0ed5, 0x11a9 },
+ { 0x0ed6, 0x11aa },
+ { 0x0ed7, 0x11ab },
+ { 0x0ed8, 0x11ac },
+ { 0x0ed9, 0x11ad },
+ { 0x0eda, 0x11ae },
+ { 0x0edb, 0x11af },
+ { 0x0edc, 0x11b0 },
+ { 0x0edd, 0x11b1 },
+ { 0x0ede, 0x11b2 },
+ { 0x0edf, 0x11b3 },
+ { 0x0ee0, 0x11b4 },
+ { 0x0ee1, 0x11b5 },
+ { 0x0ee2, 0x11b6 },
+ { 0x0ee3, 0x11b7 },
+ { 0x0ee4, 0x11b8 },
+ { 0x0ee5, 0x11b9 },
+ { 0x0ee6, 0x11ba },
+ { 0x0ee7, 0x11bb },
+ { 0x0ee8, 0x11bc },
+ { 0x0ee9, 0x11bd },
+ { 0x0eea, 0x11be },
+ { 0x0eeb, 0x11bf },
+ { 0x0eec, 0x11c0 },
+ { 0x0eed, 0x11c1 },
+ { 0x0eee, 0x11c2 },
+ { 0x0eef, 0x316d },
+ { 0x0ef0, 0x3171 },
+ { 0x0ef1, 0x3178 },
+ { 0x0ef2, 0x317f },
+ { 0x0ef3, 0x3181 },
+ { 0x0ef4, 0x3184 },
+ { 0x0ef5, 0x3186 },
+ { 0x0ef6, 0x318d },
+ { 0x0ef7, 0x318e },
+ { 0x0ef8, 0x11eb },
+ { 0x0ef9, 0x11f0 },
+ { 0x0efa, 0x11f9 },
+ { 0x0eff, 0x20a9 },
+ { 0x13a4, 0x20ac },
+ { 0x13bc, 0x0152 },
+ { 0x13bd, 0x0153 },
+ { 0x13be, 0x0178 },
+ { 0x20ac, 0x20ac },
+ { 0xfe50, '`' },
+ { 0xfe51, 0x00b4 },
+ { 0xfe52, '^' },
+ { 0xfe53, '~' },
+ { 0xfe54, 0x00af },
+ { 0xfe55, 0x02d8 },
+ { 0xfe56, 0x02d9 },
+ { 0xfe57, 0x00a8 },
+ { 0xfe58, 0x02da },
+ { 0xfe59, 0x02dd },
+ { 0xfe5a, 0x02c7 },
+ { 0xfe5b, 0x00b8 },
+ { 0xfe5c, 0x02db },
+ { 0xfe5d, 0x037a },
+ { 0xfe5e, 0x309b },
+ { 0xfe5f, 0x309c },
+ { 0xfe63, '/' },
+ { 0xfe64, 0x02bc },
+ { 0xfe65, 0x02bd },
+ { 0xfe66, 0x02f5 },
+ { 0xfe67, 0x02f3 },
+ { 0xfe68, 0x02cd },
+ { 0xfe69, 0xa788 },
+ { 0xfe6a, 0x02f7 },
+ { 0xfe6e, ',' },
+ { 0xfe6f, 0x00a4 },
+ { 0xfe80, 'a' }, // XK_dead_a
+ { 0xfe81, 'A' }, // XK_dead_A
+ { 0xfe82, 'e' }, // XK_dead_e
+ { 0xfe83, 'E' }, // XK_dead_E
+ { 0xfe84, 'i' }, // XK_dead_i
+ { 0xfe85, 'I' }, // XK_dead_I
+ { 0xfe86, 'o' }, // XK_dead_o
+ { 0xfe87, 'O' }, // XK_dead_O
+ { 0xfe88, 'u' }, // XK_dead_u
+ { 0xfe89, 'U' }, // XK_dead_U
+ { 0xfe8a, 0x0259 },
+ { 0xfe8b, 0x018f },
+ { 0xfe8c, 0x00b5 },
+ { 0xfe90, '_' },
+ { 0xfe91, 0x02c8 },
+ { 0xfe92, 0x02cc },
+ { 0xff80 /*XKB_KEY_KP_Space*/, ' ' },
+ { 0xff95 /*XKB_KEY_KP_7*/, 0x0037 },
+ { 0xff96 /*XKB_KEY_KP_4*/, 0x0034 },
+ { 0xff97 /*XKB_KEY_KP_8*/, 0x0038 },
+ { 0xff98 /*XKB_KEY_KP_6*/, 0x0036 },
+ { 0xff99 /*XKB_KEY_KP_2*/, 0x0032 },
+ { 0xff9a /*XKB_KEY_KP_9*/, 0x0039 },
+ { 0xff9b /*XKB_KEY_KP_3*/, 0x0033 },
+ { 0xff9c /*XKB_KEY_KP_1*/, 0x0031 },
+ { 0xff9d /*XKB_KEY_KP_5*/, 0x0035 },
+ { 0xff9e /*XKB_KEY_KP_0*/, 0x0030 },
+ { 0xffaa /*XKB_KEY_KP_Multiply*/, '*' },
+ { 0xffab /*XKB_KEY_KP_Add*/, '+' },
+ { 0xffac /*XKB_KEY_KP_Separator*/, ',' },
+ { 0xffad /*XKB_KEY_KP_Subtract*/, '-' },
+ { 0xffae /*XKB_KEY_KP_Decimal*/, '.' },
+ { 0xffaf /*XKB_KEY_KP_Divide*/, '/' },
+ { 0xffb0 /*XKB_KEY_KP_0*/, 0x0030 },
+ { 0xffb1 /*XKB_KEY_KP_1*/, 0x0031 },
+ { 0xffb2 /*XKB_KEY_KP_2*/, 0x0032 },
+ { 0xffb3 /*XKB_KEY_KP_3*/, 0x0033 },
+ { 0xffb4 /*XKB_KEY_KP_4*/, 0x0034 },
+ { 0xffb5 /*XKB_KEY_KP_5*/, 0x0035 },
+ { 0xffb6 /*XKB_KEY_KP_6*/, 0x0036 },
+ { 0xffb7 /*XKB_KEY_KP_7*/, 0x0037 },
+ { 0xffb8 /*XKB_KEY_KP_8*/, 0x0038 },
+ { 0xffb9 /*XKB_KEY_KP_9*/, 0x0039 },
+ { 0xffbd /*XKB_KEY_KP_Equal*/, '=' }
+};
+
+
+//////////////////////////////////////////////////////////////////////////
+////// GLFW internal API //////
+//////////////////////////////////////////////////////////////////////////
+
+// Convert XKB KeySym to Unicode
+//
+long _glfwKeySym2Unicode(unsigned int keysym)
+{
+ int min = 0;
+ int max = sizeof(keysymtab) / sizeof(struct codepair) - 1;
+ int mid;
+
+ // First check for Latin-1 characters (1:1 mapping)
+ if ((keysym >= 0x0020 && keysym <= 0x007e) ||
+ (keysym >= 0x00a0 && keysym <= 0x00ff))
+ {
+ return keysym;
+ }
+
+ // Also check for directly encoded 24-bit UCS characters
+ if ((keysym & 0xff000000) == 0x01000000)
+ return keysym & 0x00ffffff;
+
+ // Binary search in table
+ while (max >= min)
+ {
+ mid = (min + max) / 2;
+ if (keysymtab[mid].keysym < keysym)
+ min = mid + 1;
+ else if (keysymtab[mid].keysym > keysym)
+ max = mid - 1;
+ else
+ return keysymtab[mid].ucs;
+ }
+
+ // No matching Unicode value found
+ return -1;
+}
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.h b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.h
new file mode 100644
index 0000000..f95e14f
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/xkb_unicode.h
@@ -0,0 +1,28 @@
+//========================================================================
+// GLFW 3.3 Linux - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would
+// be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+// be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+// distribution.
+//
+//========================================================================
+
+long _glfwKeySym2Unicode(unsigned int keysym);
+
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw_tree_rebuild.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw_tree_rebuild.go
new file mode 100644
index 0000000..3bdb0a9
--- /dev/null
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw_tree_rebuild.go
@@ -0,0 +1,10 @@
+package glfw
+
+//go:generate ../../scripts/glfw_tree_rebuild.sh
+
+// upstreamTreeSHA is a recursive hash of the full contents of the upstream
+// glfw, as generated by git (doesn't need to be committed) when you run `go
+// generate` on this package. This exists to invalidate the build cache (see
+// https://github.com/go-gl/glfw/issues/269), which is unaffected by C source
+// inputs.
+const upstreamTreeSHA = "6a900c40071c813fab7f32ef4c0b67eae5ce98b5"
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/native_linbsd.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/native_linbsd.go
index 39d9f0c..7b343b9 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/native_linbsd.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/native_linbsd.go
@@ -1,4 +1,4 @@
-// +build linux,!wayland freebsd,!wayland
+// +build linux,!wayland freebsd,!wayland netbsd,!wayland openbsd
package glfw
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/util.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/util.go
index 0d0a2c9..2bf56ed 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/util.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/util.go
@@ -5,11 +5,6 @@ package glfw
//#include "glfw/include/GLFW/glfw3.h"
import "C"
-import (
- "reflect"
- "unsafe"
-)
-
func glfwbool(b C.int) bool {
if b == C.int(True) {
return true
@@ -19,20 +14,10 @@ func glfwbool(b C.int) bool {
func bytes(origin []byte) (pointer *uint8, free func()) {
n := len(origin)
-
if n == 0 {
return nil, func() {}
}
- data := C.malloc(C.size_t(n))
-
- dataSlice := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
- Data: uintptr(data),
- Len: n,
- Cap: n,
- }))
-
- copy(dataSlice, origin)
-
- return &dataSlice[0], func() { C.free(data) }
+ ptr := C.CBytes(origin)
+ return (*uint8)(ptr), func() { C.free(ptr) }
}
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/vulkan.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/vulkan.go
index c769b4e..1ac2950 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/vulkan.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/vulkan.go
@@ -1,8 +1,27 @@
package glfw
-//#define GLFW_INCLUDE_NONE
-//#include "glfw/include/GLFW/glfw3.h"
+/*
+#include "glfw/src/internal.h"
+
+GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
+GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname);
+
+// Helper function for doing raw pointer arithmetic
+static inline const char* getArrayIndex(const char** array, unsigned int index) {
+ return array[index];
+}
+
+void* getVulkanProcAddr() {
+ return glfwGetInstanceProcAddress;
+}
+*/
import "C"
+import (
+ "errors"
+ "fmt"
+ "reflect"
+ "unsafe"
+)
// VulkanSupported reports whether the Vulkan loader has been found. This check is performed by Init.
//
@@ -13,3 +32,54 @@ import "C"
func VulkanSupported() bool {
return glfwbool(C.glfwVulkanSupported())
}
+
+// GetVulkanGetInstanceProcAddress returns the function pointer used to find Vulkan core or
+// extension functions. The return value of this function can be passed to the Vulkan library.
+//
+// Note that this function does not work the same way as the glfwGetInstanceProcAddress.
+func GetVulkanGetInstanceProcAddress() unsafe.Pointer {
+ return C.getVulkanProcAddr()
+}
+
+// GetRequiredInstanceExtensions returns a slice of Vulkan instance extension names required
+// by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will always
+// contain VK_KHR_surface, so if you don't require any additional extensions you can pass this list
+// directly to the VkInstanceCreateInfo struct.
+//
+// If Vulkan is not available on the machine, this function returns nil. Call
+// VulkanSupported to check whether Vulkan is available.
+//
+// If Vulkan is available but no set of extensions allowing window surface creation was found, this
+// function returns nil. You may still use Vulkan for off-screen rendering and compute work.
+func (window *Window) GetRequiredInstanceExtensions() []string {
+ var count C.uint32_t
+ strarr := C.glfwGetRequiredInstanceExtensions(&count)
+ if count == 0 {
+ return nil
+ }
+
+ extensions := make([]string, count)
+ for i := uint(0); i < uint(count); i++ {
+ extensions[i] = C.GoString(C.getArrayIndex(strarr, C.uint(i)))
+ }
+ return extensions
+}
+
+// CreateWindowSurface creates a Vulkan surface for this window.
+func (window *Window) CreateWindowSurface(instance interface{}, allocCallbacks unsafe.Pointer) (surface uintptr, err error) {
+ if instance == nil {
+ return 0, errors.New("vulkan: instance is nil")
+ }
+ val := reflect.ValueOf(instance)
+ if val.Kind() != reflect.Ptr {
+ return 0, fmt.Errorf("vulkan: instance is not a VkInstance (expected kind Ptr, got %s)", val.Kind())
+ }
+ var vulkanSurface C.VkSurfaceKHR
+ ret := C.glfwCreateWindowSurface(
+ (C.VkInstance)(unsafe.Pointer(reflect.ValueOf(instance).Pointer())), window.data,
+ (*C.VkAllocationCallbacks)(allocCallbacks), (*C.VkSurfaceKHR)(unsafe.Pointer(&vulkanSurface)))
+ if ret != C.VK_SUCCESS {
+ return 0, fmt.Errorf("vulkan: error creating window surface: %d", ret)
+ }
+ return uintptr(unsafe.Pointer(&vulkanSurface)), nil
+}
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/window.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/window.go
index 9fc0305..229fdcd 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/window.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/window.go
@@ -930,11 +930,27 @@ func (w *Window) SetClipboardString(str string) {
func (w *Window) GetClipboardString() string {
cs := C.glfwGetClipboardString(w.data)
if cs == nil {
+ acceptError(FormatUnavailable)
return ""
}
return C.GoString(cs)
}
+// panicErrorExceptForInvalidValue is the same as panicError but ignores
+// invalidValue.
+func panicErrorExceptForInvalidValue() {
+ // invalidValue can happen when specific joysticks are used. This issue
+ // will be fixed in GLFW 3.3.5. As a temporary fix, ignore this error.
+ // See go-gl/glfw#292, go-gl/glfw#324, and glfw/glfw#1763.
+ err := acceptError(invalidValue)
+ if e, ok := err.(*Error); ok && e.Code == invalidValue {
+ return
+ }
+ if err != nil {
+ panic(err)
+ }
+}
+
// PollEvents processes only those events that have already been received and
// then returns immediately. Processing events will cause the window and input
// callbacks associated with those events to be called.
@@ -946,7 +962,7 @@ func (w *Window) GetClipboardString() string {
// This function may only be called from the main thread.
func PollEvents() {
C.glfwPollEvents()
- panicError()
+ panicErrorExceptForInvalidValue()
}
// WaitEvents puts the calling thread to sleep until at least one event has been
@@ -964,7 +980,7 @@ func PollEvents() {
// This function may only be called from the main thread.
func WaitEvents() {
C.glfwWaitEvents()
- panicError()
+ panicErrorExceptForInvalidValue()
}
// WaitEventsTimeout puts the calling thread to sleep until at least one event is available in the
@@ -991,7 +1007,7 @@ func WaitEvents() {
// Event processing is not required for joystick input to work.
func WaitEventsTimeout(timeout float64) {
C.glfwWaitEventsTimeout(C.double(timeout))
- panicError()
+ panicErrorExceptForInvalidValue()
}
// PostEmptyEvent posts an empty event from the current thread to the main
diff --git a/vendor/github.com/golang/freetype/truetype/truetype.go b/vendor/github.com/golang/freetype/truetype/truetype.go
index 613fc17..7270bbf 100644
--- a/vendor/github.com/golang/freetype/truetype/truetype.go
+++ b/vendor/github.com/golang/freetype/truetype/truetype.go
@@ -57,7 +57,8 @@ const (
// A 32-bit encoding consists of a most-significant 16-bit Platform ID and a
// least-significant 16-bit Platform Specific ID. The magic numbers are
// specified at https://www.microsoft.com/typography/otspec/name.htm
- unicodeEncoding = 0x00000003 // PID = 0 (Unicode), PSID = 3 (Unicode 2.0)
+ unicodeEncodingBMPOnly = 0x00000003 // PID = 0 (Unicode), PSID = 3 (Unicode 2.0 BMP Only)
+ unicodeEncodingFull = 0x00000004 // PID = 0 (Unicode), PSID = 4 (Unicode 2.0 Full Repertoire)
microsoftSymbolEncoding = 0x00030000 // PID = 3 (Microsoft), PSID = 0 (Symbol)
microsoftUCS2Encoding = 0x00030001 // PID = 3 (Microsoft), PSID = 1 (UCS-2)
microsoftUCS4Encoding = 0x0003000a // PID = 3 (Microsoft), PSID = 10 (UCS-4)
@@ -142,7 +143,7 @@ func parseSubtables(table []byte, name string, offset, size int, pred func([]byt
pidPsid := u32(table, offset)
// We prefer the Unicode cmap encoding. Failing to find that, we fall
// back onto the Microsoft cmap encoding.
- if pidPsid == unicodeEncoding {
+ if pidPsid == unicodeEncodingBMPOnly || pidPsid == unicodeEncodingFull {
bestOffset, bestPID, ok = offset, pidPsid>>16, true
break
@@ -323,11 +324,20 @@ func (f *Font) parseKern() error {
if version != 0 {
return UnsupportedError(fmt.Sprintf("kern version: %d", version))
}
+
n, offset := u16(f.kern, offset), offset+2
- if n != 1 {
- return UnsupportedError(fmt.Sprintf("kern nTables: %d", n))
- }
- offset += 2
+ if n == 0 {
+ return UnsupportedError("kern nTables: 0")
+ }
+ // TODO: support multiple subtables. In practice, almost all .ttf files
+ // have only one subtable, if they have a kern table at all. But it's not
+ // impossible. Xolonium Regular (https://fontlibrary.org/en/font/xolonium)
+ // has 3 subtables. Those subtables appear to be disjoint, rather than
+ // being the same kerning pairs encoded in three different ways.
+ //
+ // For now, we'll use only the first subtable.
+
+ offset += 2 // Skip the version.
length, offset := int(u16(f.kern, offset)), offset+2
coverage, offset := u16(f.kern, offset), offset+2
if coverage != 0x0001 {
@@ -550,8 +560,7 @@ func parse(ttf []byte, offset int) (font *Font, err error) {
return
}
ttcVersion, offset := u32(ttf, offset), offset+4
- if ttcVersion != 0x00010000 {
- // TODO: support TTC version 2.0, once I have such a .ttc file to test with.
+ if ttcVersion != 0x00010000 && ttcVersion != 0x00020000 {
err = FormatError("bad TTC version")
return
}
@@ -578,14 +587,15 @@ func parse(ttf []byte, offset int) (font *Font, err error) {
return
}
n, offset := int(u16(ttf, offset)), offset+2
- if len(ttf) < 16*n+12 {
+ offset += 6 // Skip the searchRange, entrySelector and rangeShift.
+ if len(ttf) < 16*n+offset {
err = FormatError("TTF data is too short")
return
}
f := new(Font)
// Assign the table slices.
for i := 0; i < n; i++ {
- x := 16*i + 12
+ x := 16*i + offset
switch string(ttf[x : x+4]) {
case "cmap":
f.cmap, err = readTable(ttf, ttf[x+8:x+16])
diff --git a/vendor/github.com/hashicorp/golang-lru/2q.go b/vendor/github.com/hashicorp/golang-lru/2q.go
index 337d963..e474cd0 100644
--- a/vendor/github.com/hashicorp/golang-lru/2q.go
+++ b/vendor/github.com/hashicorp/golang-lru/2q.go
@@ -30,9 +30,9 @@ type TwoQueueCache struct {
size int
recentSize int
- recent *simplelru.LRU
- frequent *simplelru.LRU
- recentEvict *simplelru.LRU
+ recent simplelru.LRUCache
+ frequent simplelru.LRUCache
+ recentEvict simplelru.LRUCache
lock sync.RWMutex
}
@@ -84,7 +84,8 @@ func New2QParams(size int, recentRatio float64, ghostRatio float64) (*TwoQueueCa
return c, nil
}
-func (c *TwoQueueCache) Get(key interface{}) (interface{}, bool) {
+// Get looks up a key's value from the cache.
+func (c *TwoQueueCache) Get(key interface{}) (value interface{}, ok bool) {
c.lock.Lock()
defer c.lock.Unlock()
@@ -105,6 +106,7 @@ func (c *TwoQueueCache) Get(key interface{}) (interface{}, bool) {
return nil, false
}
+// Add adds a value to the cache.
func (c *TwoQueueCache) Add(key, value interface{}) {
c.lock.Lock()
defer c.lock.Unlock()
@@ -160,12 +162,15 @@ func (c *TwoQueueCache) ensureSpace(recentEvict bool) {
c.frequent.RemoveOldest()
}
+// Len returns the number of items in the cache.
func (c *TwoQueueCache) Len() int {
c.lock.RLock()
defer c.lock.RUnlock()
return c.recent.Len() + c.frequent.Len()
}
+// Keys returns a slice of the keys in the cache.
+// The frequently used keys are first in the returned slice.
func (c *TwoQueueCache) Keys() []interface{} {
c.lock.RLock()
defer c.lock.RUnlock()
@@ -174,6 +179,7 @@ func (c *TwoQueueCache) Keys() []interface{} {
return append(k1, k2...)
}
+// Remove removes the provided key from the cache.
func (c *TwoQueueCache) Remove(key interface{}) {
c.lock.Lock()
defer c.lock.Unlock()
@@ -188,6 +194,7 @@ func (c *TwoQueueCache) Remove(key interface{}) {
}
}
+// Purge is used to completely clear the cache.
func (c *TwoQueueCache) Purge() {
c.lock.Lock()
defer c.lock.Unlock()
@@ -196,13 +203,17 @@ func (c *TwoQueueCache) Purge() {
c.recentEvict.Purge()
}
+// Contains is used to check if the cache contains a key
+// without updating recency or frequency.
func (c *TwoQueueCache) Contains(key interface{}) bool {
c.lock.RLock()
defer c.lock.RUnlock()
return c.frequent.Contains(key) || c.recent.Contains(key)
}
-func (c *TwoQueueCache) Peek(key interface{}) (interface{}, bool) {
+// Peek is used to inspect the cache value of a key
+// without updating recency or frequency.
+func (c *TwoQueueCache) Peek(key interface{}) (value interface{}, ok bool) {
c.lock.RLock()
defer c.lock.RUnlock()
if val, ok := c.frequent.Peek(key); ok {
diff --git a/vendor/github.com/hashicorp/golang-lru/arc.go b/vendor/github.com/hashicorp/golang-lru/arc.go
index a2a2528..555225a 100644
--- a/vendor/github.com/hashicorp/golang-lru/arc.go
+++ b/vendor/github.com/hashicorp/golang-lru/arc.go
@@ -18,11 +18,11 @@ type ARCCache struct {
size int // Size is the total capacity of the cache
p int // P is the dynamic preference towards T1 or T2
- t1 *simplelru.LRU // T1 is the LRU for recently accessed items
- b1 *simplelru.LRU // B1 is the LRU for evictions from t1
+ t1 simplelru.LRUCache // T1 is the LRU for recently accessed items
+ b1 simplelru.LRUCache // B1 is the LRU for evictions from t1
- t2 *simplelru.LRU // T2 is the LRU for frequently accessed items
- b2 *simplelru.LRU // B2 is the LRU for evictions from t2
+ t2 simplelru.LRUCache // T2 is the LRU for frequently accessed items
+ b2 simplelru.LRUCache // B2 is the LRU for evictions from t2
lock sync.RWMutex
}
@@ -60,11 +60,11 @@ func NewARC(size int) (*ARCCache, error) {
}
// Get looks up a key's value from the cache.
-func (c *ARCCache) Get(key interface{}) (interface{}, bool) {
+func (c *ARCCache) Get(key interface{}) (value interface{}, ok bool) {
c.lock.Lock()
defer c.lock.Unlock()
- // Ff the value is contained in T1 (recent), then
+ // If the value is contained in T1 (recent), then
// promote it to T2 (frequent)
if val, ok := c.t1.Peek(key); ok {
c.t1.Remove(key)
@@ -153,7 +153,7 @@ func (c *ARCCache) Add(key, value interface{}) {
// Remove from B2
c.b2.Remove(key)
- // Add the key to the frequntly used list
+ // Add the key to the frequently used list
c.t2.Add(key, value)
return
}
@@ -247,7 +247,7 @@ func (c *ARCCache) Contains(key interface{}) bool {
// Peek is used to inspect the cache value of a key
// without updating recency or frequency.
-func (c *ARCCache) Peek(key interface{}) (interface{}, bool) {
+func (c *ARCCache) Peek(key interface{}) (value interface{}, ok bool) {
c.lock.RLock()
defer c.lock.RUnlock()
if val, ok := c.t1.Peek(key); ok {
diff --git a/vendor/github.com/hashicorp/golang-lru/doc.go b/vendor/github.com/hashicorp/golang-lru/doc.go
new file mode 100644
index 0000000..2547df9
--- /dev/null
+++ b/vendor/github.com/hashicorp/golang-lru/doc.go
@@ -0,0 +1,21 @@
+// Package lru provides three different LRU caches of varying sophistication.
+//
+// Cache is a simple LRU cache. It is based on the
+// LRU implementation in groupcache:
+// https://github.com/golang/groupcache/tree/master/lru
+//
+// TwoQueueCache tracks frequently used and recently used entries separately.
+// This avoids a burst of accesses from taking out frequently used entries,
+// at the cost of about 2x computational overhead and some extra bookkeeping.
+//
+// ARCCache is an adaptive replacement cache. It tracks recent evictions as
+// well as recent usage in both the frequent and recent caches. Its
+// computational overhead is comparable to TwoQueueCache, but the memory
+// overhead is linear with the size of the cache.
+//
+// ARC has been patented by IBM, so do not use it if that is problematic for
+// your program.
+//
+// All caches in this package take locks while operating, and are therefore
+// thread-safe for consumers.
+package lru
diff --git a/vendor/github.com/hashicorp/golang-lru/go.mod b/vendor/github.com/hashicorp/golang-lru/go.mod
new file mode 100644
index 0000000..8ad8826
--- /dev/null
+++ b/vendor/github.com/hashicorp/golang-lru/go.mod
@@ -0,0 +1,3 @@
+module github.com/hashicorp/golang-lru
+
+go 1.12
diff --git a/vendor/github.com/hashicorp/golang-lru/lru.go b/vendor/github.com/hashicorp/golang-lru/lru.go
index a6285f9..4e5e9d8 100644
--- a/vendor/github.com/hashicorp/golang-lru/lru.go
+++ b/vendor/github.com/hashicorp/golang-lru/lru.go
@@ -1,6 +1,3 @@
-// This package provides a simple LRU cache. It is based on the
-// LRU implementation in groupcache:
-// https://github.com/golang/groupcache/tree/master/lru
package lru
import (
@@ -11,11 +8,11 @@ import (
// Cache is a thread-safe fixed size LRU cache.
type Cache struct {
- lru *simplelru.LRU
+ lru simplelru.LRUCache
lock sync.RWMutex
}
-// New creates an LRU of the given size
+// New creates an LRU of the given size.
func New(size int) (*Cache, error) {
return NewWithEvict(size, nil)
}
@@ -33,82 +30,121 @@ func NewWithEvict(size int, onEvicted func(key interface{}, value interface{}))
return c, nil
}
-// Purge is used to completely clear the cache
+// Purge is used to completely clear the cache.
func (c *Cache) Purge() {
c.lock.Lock()
c.lru.Purge()
c.lock.Unlock()
}
-// Add adds a value to the cache. Returns true if an eviction occurred.
-func (c *Cache) Add(key, value interface{}) bool {
+// Add adds a value to the cache. Returns true if an eviction occurred.
+func (c *Cache) Add(key, value interface{}) (evicted bool) {
c.lock.Lock()
- defer c.lock.Unlock()
- return c.lru.Add(key, value)
+ evicted = c.lru.Add(key, value)
+ c.lock.Unlock()
+ return evicted
}
// Get looks up a key's value from the cache.
-func (c *Cache) Get(key interface{}) (interface{}, bool) {
+func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
c.lock.Lock()
- defer c.lock.Unlock()
- return c.lru.Get(key)
+ value, ok = c.lru.Get(key)
+ c.lock.Unlock()
+ return value, ok
}
-// Check if a key is in the cache, without updating the recent-ness
-// or deleting it for being stale.
+// Contains checks if a key is in the cache, without updating the
+// recent-ness or deleting it for being stale.
func (c *Cache) Contains(key interface{}) bool {
c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Contains(key)
+ containKey := c.lru.Contains(key)
+ c.lock.RUnlock()
+ return containKey
}
-// Returns the key value (or undefined if not found) without updating
+// Peek returns the key value (or undefined if not found) without updating
// the "recently used"-ness of the key.
-func (c *Cache) Peek(key interface{}) (interface{}, bool) {
+func (c *Cache) Peek(key interface{}) (value interface{}, ok bool) {
c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Peek(key)
+ value, ok = c.lru.Peek(key)
+ c.lock.RUnlock()
+ return value, ok
}
-// ContainsOrAdd checks if a key is in the cache without updating the
-// recent-ness or deleting it for being stale, and if not, adds the value.
+// ContainsOrAdd checks if a key is in the cache without updating the
+// recent-ness or deleting it for being stale, and if not, adds the value.
// Returns whether found and whether an eviction occurred.
-func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evict bool) {
+func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) {
c.lock.Lock()
defer c.lock.Unlock()
if c.lru.Contains(key) {
return true, false
- } else {
- evict := c.lru.Add(key, value)
- return false, evict
}
+ evicted = c.lru.Add(key, value)
+ return false, evicted
+}
+
+// PeekOrAdd checks if a key is in the cache without updating the
+// recent-ness or deleting it for being stale, and if not, adds the value.
+// Returns whether found and whether an eviction occurred.
+func (c *Cache) PeekOrAdd(key, value interface{}) (previous interface{}, ok, evicted bool) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+
+ previous, ok = c.lru.Peek(key)
+ if ok {
+ return previous, true, false
+ }
+
+ evicted = c.lru.Add(key, value)
+ return nil, false, evicted
}
// Remove removes the provided key from the cache.
-func (c *Cache) Remove(key interface{}) {
+func (c *Cache) Remove(key interface{}) (present bool) {
+ c.lock.Lock()
+ present = c.lru.Remove(key)
+ c.lock.Unlock()
+ return
+}
+
+// Resize changes the cache size.
+func (c *Cache) Resize(size int) (evicted int) {
c.lock.Lock()
- c.lru.Remove(key)
+ evicted = c.lru.Resize(size)
c.lock.Unlock()
+ return evicted
}
// RemoveOldest removes the oldest item from the cache.
-func (c *Cache) RemoveOldest() {
+func (c *Cache) RemoveOldest() (key interface{}, value interface{}, ok bool) {
+ c.lock.Lock()
+ key, value, ok = c.lru.RemoveOldest()
+ c.lock.Unlock()
+ return
+}
+
+// GetOldest returns the oldest entry
+func (c *Cache) GetOldest() (key interface{}, value interface{}, ok bool) {
c.lock.Lock()
- c.lru.RemoveOldest()
+ key, value, ok = c.lru.GetOldest()
c.lock.Unlock()
+ return
}
// Keys returns a slice of the keys in the cache, from oldest to newest.
func (c *Cache) Keys() []interface{} {
c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Keys()
+ keys := c.lru.Keys()
+ c.lock.RUnlock()
+ return keys
}
// Len returns the number of items in the cache.
func (c *Cache) Len() int {
c.lock.RLock()
- defer c.lock.RUnlock()
- return c.lru.Len()
+ length := c.lru.Len()
+ c.lock.RUnlock()
+ return length
}
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
index cb416b3..a86c853 100644
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
+++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
@@ -36,7 +36,7 @@ func NewLRU(size int, onEvict EvictCallback) (*LRU, error) {
return c, nil
}
-// Purge is used to completely clear the cache
+// Purge is used to completely clear the cache.
func (c *LRU) Purge() {
for k, v := range c.items {
if c.onEvict != nil {
@@ -48,7 +48,7 @@ func (c *LRU) Purge() {
}
// Add adds a value to the cache. Returns true if an eviction occurred.
-func (c *LRU) Add(key, value interface{}) bool {
+func (c *LRU) Add(key, value interface{}) (evicted bool) {
// Check for existing item
if ent, ok := c.items[key]; ok {
c.evictList.MoveToFront(ent)
@@ -73,22 +73,26 @@ func (c *LRU) Add(key, value interface{}) bool {
func (c *LRU) Get(key interface{}) (value interface{}, ok bool) {
if ent, ok := c.items[key]; ok {
c.evictList.MoveToFront(ent)
+ if ent.Value.(*entry) == nil {
+ return nil, false
+ }
return ent.Value.(*entry).value, true
}
return
}
-// Check if a key is in the cache, without updating the recent-ness
+// Contains checks if a key is in the cache, without updating the recent-ness
// or deleting it for being stale.
func (c *LRU) Contains(key interface{}) (ok bool) {
_, ok = c.items[key]
return ok
}
-// Returns the key value (or undefined if not found) without updating
+// Peek returns the key value (or undefined if not found) without updating
// the "recently used"-ness of the key.
func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) {
- if ent, ok := c.items[key]; ok {
+ var ent *list.Element
+ if ent, ok = c.items[key]; ok {
return ent.Value.(*entry).value, true
}
return nil, ok
@@ -96,7 +100,7 @@ func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) {
// Remove removes the provided key from the cache, returning if the
// key was contained.
-func (c *LRU) Remove(key interface{}) bool {
+func (c *LRU) Remove(key interface{}) (present bool) {
if ent, ok := c.items[key]; ok {
c.removeElement(ent)
return true
@@ -105,7 +109,7 @@ func (c *LRU) Remove(key interface{}) bool {
}
// RemoveOldest removes the oldest item from the cache.
-func (c *LRU) RemoveOldest() (interface{}, interface{}, bool) {
+func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) {
ent := c.evictList.Back()
if ent != nil {
c.removeElement(ent)
@@ -116,7 +120,7 @@ func (c *LRU) RemoveOldest() (interface{}, interface{}, bool) {
}
// GetOldest returns the oldest entry
-func (c *LRU) GetOldest() (interface{}, interface{}, bool) {
+func (c *LRU) GetOldest() (key interface{}, value interface{}, ok bool) {
ent := c.evictList.Back()
if ent != nil {
kv := ent.Value.(*entry)
@@ -141,6 +145,19 @@ func (c *LRU) Len() int {
return c.evictList.Len()
}
+// Resize changes the cache size.
+func (c *LRU) Resize(size int) (evicted int) {
+ diff := c.Len() - size
+ if diff < 0 {
+ diff = 0
+ }
+ for i := 0; i < diff; i++ {
+ c.removeOldest()
+ }
+ c.size = size
+ return diff
+}
+
// removeOldest removes the oldest item from the cache.
func (c *LRU) removeOldest() {
ent := c.evictList.Back()
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
new file mode 100644
index 0000000..92d7093
--- /dev/null
+++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
@@ -0,0 +1,39 @@
+package simplelru
+
+// LRUCache is the interface for simple LRU cache.
+type LRUCache interface {
+ // Adds a value to the cache, returns true if an eviction occurred and
+ // updates the "recently used"-ness of the key.
+ Add(key, value interface{}) bool
+
+ // Returns key's value from the cache and
+ // updates the "recently used"-ness of the key. #value, isFound
+ Get(key interface{}) (value interface{}, ok bool)
+
+ // Checks if a key exists in cache without updating the recent-ness.
+ Contains(key interface{}) (ok bool)
+
+ // Returns key's value without updating the "recently used"-ness of the key.
+ Peek(key interface{}) (value interface{}, ok bool)
+
+ // Removes a key from the cache.
+ Remove(key interface{}) bool
+
+ // Removes the oldest entry from cache.
+ RemoveOldest() (interface{}, interface{}, bool)
+
+ // Returns the oldest entry from the cache. #key, value, isFound
+ GetOldest() (interface{}, interface{}, bool)
+
+ // Returns a slice of the keys in the cache, from oldest to newest.
+ Keys() []interface{}
+
+ // Returns the number of items in the cache.
+ Len() int
+
+ // Clears all cache entries.
+ Purge()
+
+ // Resizes cache, returning number evicted
+ Resize(int) int
+}
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go
index c7f8c7e..71ad917 100644
--- a/vendor/golang.org/x/crypto/ed25519/ed25519.go
+++ b/vendor/golang.org/x/crypto/ed25519/ed25519.go
@@ -5,6 +5,7 @@
// In Go 1.13, the ed25519 package was promoted to the standard library as
// crypto/ed25519, and this package became a wrapper for the standard library one.
//
+//go:build !go1.13
// +build !go1.13
// Package ed25519 implements the Ed25519 signature algorithm. See
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go b/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go
index d1448d8..b5974dc 100644
--- a/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go
+++ b/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.13
// +build go1.13
// Package ed25519 implements the Ed25519 signature algorithm. See
diff --git a/vendor/golang.org/x/exp/shiny/driver/driver_darwin.go b/vendor/golang.org/x/exp/shiny/driver/driver_darwin.go
index ee59ac6..3eebcf7 100644
--- a/vendor/golang.org/x/exp/shiny/driver/driver_darwin.go
+++ b/vendor/golang.org/x/exp/shiny/driver/driver_darwin.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && !metal
// +build darwin,!metal
package driver
diff --git a/vendor/golang.org/x/exp/shiny/driver/driver_fallback.go b/vendor/golang.org/x/exp/shiny/driver/driver_fallback.go
index 450aef8..e36fbc5 100644
--- a/vendor/golang.org/x/exp/shiny/driver/driver_fallback.go
+++ b/vendor/golang.org/x/exp/shiny/driver/driver_fallback.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !darwin && (!linux || android) && !windows && !dragonfly && !openbsd
// +build !darwin
// +build !linux android
// +build !windows
diff --git a/vendor/golang.org/x/exp/shiny/driver/driver_x11.go b/vendor/golang.org/x/exp/shiny/driver/driver_x11.go
index cd91d38..bc24238 100644
--- a/vendor/golang.org/x/exp/shiny/driver/driver_x11.go
+++ b/vendor/golang.org/x/exp/shiny/driver/driver_x11.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (linux && !android) || dragonfly || openbsd
// +build linux,!android dragonfly openbsd
package driver
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.go b/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.go
index b258bdc..e13ac80 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.go
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.go
@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin
-// +build 386 amd64
-// +build !ios
+//go:build darwin && !ios
+// +build darwin,!ios
package gldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.m b/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.m
index a013764..2c8fd83 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.m
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/cocoa.m
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
// +build darwin
-// +build 386 amd64
// +build !ios
#include "_cgo_export.h"
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/context.go b/vendor/golang.org/x/exp/shiny/driver/gldriver/context.go
index 197be35..274d799 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/context.go
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/context.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !android
// +build !android
package gldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/other.go b/vendor/golang.org/x/exp/shiny/driver/gldriver/other.go
index c1d92ea..0a04425 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/other.go
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/other.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !darwin !386,!amd64 ios !cgo
+//go:build (!darwin || ios || !cgo) && (!linux || android || !cgo) && (!openbsd || !cgo) && !windows
+// +build !darwin ios !cgo
// +build !linux android !cgo
// +build !openbsd !cgo
// +build !windows
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/win32.go b/vendor/golang.org/x/exp/shiny/driver/gldriver/win32.go
index 343fb45..8ece242 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/win32.go
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/win32.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package gldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.c b/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.c
index dff6d2d..e7fb289 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.c
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.c
@@ -6,6 +6,8 @@
#include "_cgo_export.h"
#include <EGL/egl.h>
+#include <X11/Xlib.h> // for Atom, Colormap, Display, Window
+#include <X11/Xutil.h> // for XVisualInfo
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.go b/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.go
index 7aaeaff..4847e85 100644
--- a/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.go
+++ b/vendor/golang.org/x/exp/shiny/driver/gldriver/x11.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (linux && !android) || openbsd
// +build linux,!android openbsd
package gldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/internal/swizzle/swizzle_other.go b/vendor/golang.org/x/exp/shiny/driver/internal/swizzle/swizzle_other.go
index 5f3264d..f1c2726 100644
--- a/vendor/golang.org/x/exp/shiny/driver/internal/swizzle/swizzle_other.go
+++ b/vendor/golang.org/x/exp/shiny/driver/internal/swizzle/swizzle_other.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !amd64
// +build !amd64
package swizzle
diff --git a/vendor/golang.org/x/exp/shiny/driver/internal/win32/key.go b/vendor/golang.org/x/exp/shiny/driver/internal/win32/key.go
index c7b9e38..a5748c3 100644
--- a/vendor/golang.org/x/exp/shiny/driver/internal/win32/key.go
+++ b/vendor/golang.org/x/exp/shiny/driver/internal/win32/key.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package win32
@@ -332,14 +333,14 @@ func sendKeyEvent(hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr) (lRe
Modifiers: keyModifiers(),
}
switch uMsg {
- case _WM_KEYDOWN:
+ case _WM_KEYDOWN, _WM_SYSKEYDOWN:
const prevMask = 1 << 30
if repeat := lParam&prevMask == prevMask; repeat {
e.Direction = key.DirNone
} else {
e.Direction = key.DirPress
}
- case _WM_KEYUP:
+ case _WM_KEYUP, _WM_SYSKEYUP:
e.Direction = key.DirRelease
default:
panic(fmt.Sprintf("win32: unexpected key message: %d", uMsg))
diff --git a/vendor/golang.org/x/exp/shiny/driver/internal/win32/win32.go b/vendor/golang.org/x/exp/shiny/driver/internal/win32/win32.go
index 6925085..22a6013 100644
--- a/vendor/golang.org/x/exp/shiny/driver/internal/win32/win32.go
+++ b/vendor/golang.org/x/exp/shiny/driver/internal/win32/win32.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package win32 implements a partial shiny screen driver using the Win32 API.
@@ -331,9 +332,10 @@ var windowMsgs = map[uint32]func(hwnd syscall.Handle, uMsg uint32, wParam, lPara
_WM_MOUSEMOVE: sendMouseEvent,
_WM_MOUSEWHEEL: sendMouseEvent,
- _WM_KEYDOWN: sendKeyEvent,
- _WM_KEYUP: sendKeyEvent,
- // TODO case _WM_SYSKEYDOWN, _WM_SYSKEYUP:
+ _WM_KEYDOWN: sendKeyEvent,
+ _WM_KEYUP: sendKeyEvent,
+ _WM_SYSKEYDOWN: sendKeyEvent,
+ _WM_SYSKEYUP: sendKeyEvent,
}
func AddWindowMsg(fn func(hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr)) uint32 {
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/buffer.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/buffer.go
index c9a10ed..987d75a 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/buffer.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/buffer.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
package mtldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.go
index f6f6d5d..7140f6f 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
// Package appkit provides access to Apple's AppKit API
@@ -11,7 +12,7 @@
// It's a minimal implementation with scope limited to
// supporting mtldriver.
//
-// It was copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ns.
+// It was copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/appkit.
package appkit
import (
@@ -21,6 +22,7 @@ import (
)
/*
+#include <stdbool.h>
#include "appkit.h"
*/
import "C"
@@ -63,12 +65,5 @@ func (v View) SetLayer(l coreanim.Layer) {
//
// Reference: https://developer.apple.com/documentation/appkit/nsview/1483695-wantslayer.
func (v View) SetWantsLayer(wantsLayer bool) {
- C.View_SetWantsLayer(v.view, toCBool(wantsLayer))
-}
-
-func toCBool(b bool) C.BOOL {
- if b {
- return 1
- }
- return 0
+ C.View_SetWantsLayer(v.view, C.bool(wantsLayer))
}
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.h b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.h
index eb3a92c..3a3e705 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.h
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.h
@@ -4,9 +4,7 @@
// +build darwin
-typedef signed char BOOL;
-
void * Window_ContentView(void * window);
void View_SetLayer(void * view, void * layer);
-void View_SetWantsLayer(void * view, BOOL wantsLayer);
+void View_SetWantsLayer(void * view, bool wantsLayer);
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.m b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.m
index 8bb74e3..4dec9db 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.m
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/appkit/appkit.m
@@ -15,6 +15,6 @@ void View_SetLayer(void * view, void * layer) {
((NSView *)view).layer = (CALayer *)layer;
}
-void View_SetWantsLayer(void * view, BOOL wantsLayer) {
+void View_SetWantsLayer(void * view, bool wantsLayer) {
((NSView *)view).wantsLayer = wantsLayer;
}
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.go
index 857c5e1..257b783 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
// Package coreanim provides access to Apple's Core Animation API
@@ -11,7 +12,7 @@
// It's a minimal implementation with scope limited to
// supporting mtldriver.
//
-// It was copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ca.
+// It was copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/coreanim.
package coreanim
import (
@@ -23,6 +24,7 @@ import (
/*
#cgo LDFLAGS: -framework QuartzCore -framework Foundation
+#include <stdbool.h>
#include "coreanim.h"
*/
import "C"
@@ -99,7 +101,7 @@ func (ml MetalLayer) SetMaximumDrawableCount(count int) {
//
// Reference: https://developer.apple.com/documentation/quartzcore/cametallayer/2887087-displaysyncenabled.
func (ml MetalLayer) SetDisplaySyncEnabled(enabled bool) {
- C.MetalLayer_SetDisplaySyncEnabled(ml.metalLayer, toCBool(enabled))
+ C.MetalLayer_SetDisplaySyncEnabled(ml.metalLayer, C.bool(enabled))
}
// SetDrawableSize sets the size, in pixels, of textures for rendering layer content.
@@ -137,10 +139,3 @@ func (md MetalDrawable) Drawable() unsafe.Pointer { return md.metalDrawable }
func (md MetalDrawable) Texture() mtl.Texture {
return mtl.NewTexture(C.MetalDrawable_Texture(md.metalDrawable))
}
-
-func toCBool(b bool) C.BOOL {
- if b {
- return 1
- }
- return 0
-}
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.h b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.h
index 36cd06c..6e1ee2b 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.h
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.h
@@ -4,7 +4,6 @@
// +build darwin
-typedef signed char BOOL;
typedef unsigned long uint_t;
typedef unsigned short uint16_t;
@@ -14,7 +13,7 @@ uint16_t MetalLayer_PixelFormat(void * metalLayer);
void MetalLayer_SetDevice(void * metalLayer, void * device);
const char * MetalLayer_SetPixelFormat(void * metalLayer, uint16_t pixelFormat);
const char * MetalLayer_SetMaximumDrawableCount(void * metalLayer, uint_t maximumDrawableCount);
-void MetalLayer_SetDisplaySyncEnabled(void * metalLayer, BOOL displaySyncEnabled);
+void MetalLayer_SetDisplaySyncEnabled(void * metalLayer, bool displaySyncEnabled);
void MetalLayer_SetDrawableSize(void * metalLayer, double width, double height);
void * MetalLayer_NextDrawable(void * metalLayer);
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.m b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.m
index 7aecf83..7848a84 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.m
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim/coreanim.m
@@ -41,7 +41,7 @@ const char * MetalLayer_SetMaximumDrawableCount(void * metalLayer, uint_t maximu
return NULL;
}
-void MetalLayer_SetDisplaySyncEnabled(void * metalLayer, BOOL displaySyncEnabled) {
+void MetalLayer_SetDisplaySyncEnabled(void * metalLayer, bool displaySyncEnabled) {
((CAMetalLayer *)metalLayer).displaySyncEnabled = displaySyncEnabled;
}
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/mtldriver.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/mtldriver.go
index 2c0e3c4..a926b92 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/mtldriver.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/mtldriver.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
// Package mtldriver provides a Metal driver for accessing a screen.
@@ -55,6 +56,12 @@ func main(f func(screen.Screen)) error {
}
defer glfw.Terminate()
glfw.WindowHint(glfw.ClientAPI, glfw.NoAPI)
+ {
+ // TODO(dmitshur): Delete this when https://github.com/go-gl/glfw/issues/272 is resolved.
+ // Post an empty event from the main thread before it can happen in a non-main thread,
+ // to work around https://github.com/glfw/glfw/issues/1649.
+ glfw.PostEmptyEvent()
+ }
var (
done = make(chan struct{})
newWindowCh = make(chan newWindowReq, 1)
@@ -67,14 +74,6 @@ func main(f func(screen.Screen)) error {
close(done)
glfw.PostEmptyEvent() // Break main loop out of glfw.WaitEvents so it can receive on done.
}()
- select {
- // TODO(dmitshur): Delete this when https://github.com/go-gl/glfw/issues/262 is resolved.
- // Wait for first window request (or done) before entering main
- // loop to work around https://github.com/glfw/glfw/issues/1543.
- case w := <-newWindowCh:
- newWindowCh <- w
- case <-done:
- }
for {
select {
case <-done:
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/screen.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/screen.go
index 1828a4c..544de7c 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/screen.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/screen.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
package mtldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/texture.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/texture.go
index 6a60dfd..60185ee 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/texture.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/texture.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
package mtldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver/window.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver/window.go
index 55f5a42..7bbb837 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver/window.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver/window.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
package mtldriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/mtldriver_darwin.go b/vendor/golang.org/x/exp/shiny/driver/mtldriver_darwin.go
index d94e633..a30cd27 100644
--- a/vendor/golang.org/x/exp/shiny/driver/mtldriver_darwin.go
+++ b/vendor/golang.org/x/exp/shiny/driver/mtldriver_darwin.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && metal
// +build darwin,metal
package driver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/buffer.go b/vendor/golang.org/x/exp/shiny/driver/windriver/buffer.go
index a55fd38..eeff378 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/buffer.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/buffer.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/other.go b/vendor/golang.org/x/exp/shiny/driver/windriver/other.go
index ebc09a6..2da4c44 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/other.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/other.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !windows
// +build !windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/screen.go b/vendor/golang.org/x/exp/shiny/driver/windriver/screen.go
index 3e84345..148b4ef 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/screen.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/screen.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/texture.go b/vendor/golang.org/x/exp/shiny/driver/windriver/texture.go
index 0155a66..6fbfff5 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/texture.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/texture.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/window.go b/vendor/golang.org/x/exp/shiny/driver/windriver/window.go
index c66cd47..9577f2c 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/window.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/window.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/windraw.go b/vendor/golang.org/x/exp/shiny/driver/windriver/windraw.go
index 363b733..b5e6b15 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/windraw.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/windraw.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/windriver/windriver.go b/vendor/golang.org/x/exp/shiny/driver/windriver/windriver.go
index 9f3bfa3..73a5420 100644
--- a/vendor/golang.org/x/exp/shiny/driver/windriver/windriver.go
+++ b/vendor/golang.org/x/exp/shiny/driver/windriver/windriver.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windriver
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer.go
index c479639..a905928 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer.go
@@ -16,10 +16,13 @@ import (
"github.com/BurntSushi/xgb/render"
"github.com/BurntSushi/xgb/shm"
"github.com/BurntSushi/xgb/xproto"
-
"golang.org/x/exp/shiny/driver/internal/swizzle"
)
+type bufferUploader interface {
+ upload(xd xproto.Drawable, xg xproto.Gcontext, depth uint8, dp image.Point, sr image.Rectangle)
+}
+
type bufferImpl struct {
s *screenImpl
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer_fallback.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer_fallback.go
new file mode 100644
index 0000000..bfdd9c7
--- /dev/null
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/buffer_fallback.go
@@ -0,0 +1,123 @@
+// Copyright 2020 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 x11driver
+
+import (
+ "image"
+ "sync"
+
+ "github.com/BurntSushi/xgb"
+ "github.com/BurntSushi/xgb/xproto"
+ "golang.org/x/exp/shiny/driver/internal/swizzle"
+)
+
+const (
+ xPutImageReqSizeMax = (1 << 16) * 4
+ xPutImageReqSizeFixed = 28
+ xPutImageReqDataSize = xPutImageReqSizeMax - xPutImageReqSizeFixed
+)
+
+type bufferFallbackImpl struct {
+ xc *xgb.Conn
+
+ buf []byte
+ rgba image.RGBA
+ size image.Point
+
+ mu sync.Mutex
+ nUpload uint32
+ released bool
+}
+
+func (b *bufferFallbackImpl) Size() image.Point { return b.size }
+func (b *bufferFallbackImpl) Bounds() image.Rectangle { return image.Rectangle{Max: b.size} }
+func (b *bufferFallbackImpl) RGBA() *image.RGBA { return &b.rgba }
+
+func (b *bufferFallbackImpl) preUpload() {
+ // Check that the program hasn't tried to modify the rgba field via the
+ // pointer returned by the bufferFallbackImpl.RGBA method. This check doesn't catch
+ // 100% of all cases; it simply tries to detect some invalid uses of a
+ // screen.Buffer such as:
+ // *buffer.RGBA() = anotherImageRGBA
+ if len(b.buf) != 0 && len(b.rgba.Pix) != 0 && &b.buf[0] != &b.rgba.Pix[0] {
+ panic("x11driver: invalid Buffer.RGBA modification")
+ }
+
+ b.mu.Lock()
+ defer b.mu.Unlock()
+
+ if b.released {
+ panic("x11driver: Buffer.Upload called after Buffer.Release")
+ }
+ if b.nUpload == 0 {
+ swizzle.BGRA(b.buf)
+ }
+ b.nUpload++
+}
+
+func (b *bufferFallbackImpl) postUpload() {
+ b.mu.Lock()
+ defer b.mu.Unlock()
+
+ b.nUpload--
+ if b.nUpload != 0 {
+ return
+ }
+
+ if !b.released {
+ swizzle.BGRA(b.buf)
+ }
+}
+
+func (b *bufferFallbackImpl) Release() {
+ b.mu.Lock()
+ defer b.mu.Unlock()
+
+ b.released = true
+}
+
+func (b *bufferFallbackImpl) upload(xd xproto.Drawable, xg xproto.Gcontext, depth uint8, dp image.Point, sr image.Rectangle) {
+ originalSRMin := sr.Min
+ sr = sr.Intersect(b.Bounds())
+ if sr.Empty() {
+ return
+ }
+ dp = dp.Add(sr.Min.Sub(originalSRMin))
+ b.preUpload()
+
+ b.putImage(xd, xg, depth, dp, sr)
+
+ b.postUpload()
+}
+
+// putImage issues xproto.PutImage requests in batches.
+func (b *bufferFallbackImpl) putImage(xd xproto.Drawable, xg xproto.Gcontext, depth uint8, dp image.Point, sr image.Rectangle) {
+ widthPerReq := b.size.X
+ rowPerReq := xPutImageReqDataSize / (widthPerReq * 4)
+ dataPerReq := rowPerReq * widthPerReq * 4
+ dstX := dp.X
+ dstY := dp.Y
+ start := 0
+ end := 0
+
+ for end < len(b.buf) {
+ end = start + dataPerReq
+ if end > len(b.buf) {
+ end = len(b.buf)
+ }
+
+ data := b.buf[start:end]
+ heightPerReq := len(data) / (widthPerReq * 4)
+
+ xproto.PutImage(
+ b.xc, xproto.ImageFormatZPixmap, xd, xg,
+ uint16(widthPerReq), uint16(heightPerReq),
+ int16(dstX), int16(dstY),
+ 0, depth, data)
+
+ start = end
+ dstY += rowPerReq
+ }
+}
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/screen.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/screen.go
index 7e0d3bb..0d0374b 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/screen.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/screen.go
@@ -51,6 +51,7 @@ type screenImpl struct {
// opaqueP is a fully opaque, solid fill picture.
opaqueP render.Picture
+ useShm bool
uniformMu sync.Mutex
uniformC render.Color
@@ -64,13 +65,14 @@ type screenImpl struct {
completionKeys []uint16
}
-func newScreenImpl(xc *xgb.Conn) (*screenImpl, error) {
+func newScreenImpl(xc *xgb.Conn, useShm bool) (*screenImpl, error) {
s := &screenImpl{
xc: xc,
xsi: xproto.Setup(xc).DefaultScreen(xc),
buffers: map[shm.Seg]*bufferImpl{},
uploads: map[uint16]chan struct{}{},
windows: map[xproto.Window]*windowImpl{},
+ useShm: useShm,
}
if err := s.initAtoms(); err != nil {
return nil, err
@@ -282,14 +284,28 @@ const (
)
func (s *screenImpl) NewBuffer(size image.Point) (retBuf screen.Buffer, retErr error) {
- // TODO: detect if the X11 server or connection cannot support SHM pixmaps,
- // and fall back to regular pixmaps.
w, h := int64(size.X), int64(size.Y)
if w < 0 || maxShmSide < w || h < 0 || maxShmSide < h || maxShmSize < 4*w*h {
return nil, fmt.Errorf("x11driver: invalid buffer size %v", size)
}
+ // If the X11 server or connection cannot support SHM pixmaps,
+ // fall back to regular pixmaps.
+ if !s.useShm {
+ b := &bufferFallbackImpl{
+ xc: s.xc,
+ size: size,
+ rgba: image.RGBA{
+ Stride: 4 * size.X,
+ Rect: image.Rectangle{Max: size},
+ Pix: make([]uint8, 4*size.X*size.Y),
+ },
+ }
+ b.buf = b.rgba.Pix
+ return b, nil
+ }
+
b := &bufferImpl{
s: s,
rgba: image.RGBA{
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_linux_ipc.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_linux_ipc.go
index 025f3ff..23fe9a4 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_linux_ipc.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_linux_ipc.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (386 || ppc64 || ppc64le || s390x)
// +build linux
// +build 386 ppc64 ppc64le s390x
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_openbsd_syscall.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_openbsd_syscall.go
index 573c78b..d42cb4c 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_openbsd_syscall.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_openbsd_syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build openbsd && (i386 || amd64)
// +build openbsd
// +build i386 amd64
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_other.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_other.go
index d09994f..fa071c3 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_other.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_other.go
@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !linux
-// +build !dragonfly
-// +build !openbsd
+//go:build !linux && !dragonfly && !openbsd
+// +build !linux,!dragonfly,!openbsd
package x11driver
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_shmopen_syscall.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_shmopen_syscall.go
index 23f9026..45d7373 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_shmopen_syscall.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/shm_shmopen_syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (linux || dragonfly) && (amd64 || arm || arm64 || mips64 || mips64le)
// +build linux dragonfly
// +build amd64 arm arm64 mips64 mips64le
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/texture.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/texture.go
index da6fc86..8ca4759 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/texture.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/texture.go
@@ -59,7 +59,7 @@ func (t *textureImpl) Upload(dp image.Point, src screen.Buffer, sr image.Rectang
if t.degenerate() {
return
}
- src.(*bufferImpl).upload(xproto.Drawable(t.xm), t.s.gcontext32, textureDepth, dp, sr)
+ src.(bufferUploader).upload(xproto.Drawable(t.xm), t.s.gcontext32, textureDepth, dp, sr)
}
func (t *textureImpl) Fill(dr image.Rectangle, src color.Color, op draw.Op) {
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/window.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/window.go
index 5ebdbcd..f77b876 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/window.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/window.go
@@ -67,7 +67,7 @@ func (w *windowImpl) Release() {
}
func (w *windowImpl) Upload(dp image.Point, src screen.Buffer, sr image.Rectangle) {
- src.(*bufferImpl).upload(xproto.Drawable(w.xw), w.xg, w.s.xsi.RootDepth, dp, sr)
+ src.(bufferUploader).upload(xproto.Drawable(w.xw), w.xg, w.s.xsi.RootDepth, dp, sr)
}
func (w *windowImpl) Fill(dr image.Rectangle, src color.Color, op draw.Op) {
diff --git a/vendor/golang.org/x/exp/shiny/driver/x11driver/x11driver.go b/vendor/golang.org/x/exp/shiny/driver/x11driver/x11driver.go
index 29d2b0d..1ba227e 100644
--- a/vendor/golang.org/x/exp/shiny/driver/x11driver/x11driver.go
+++ b/vendor/golang.org/x/exp/shiny/driver/x11driver/x11driver.go
@@ -47,11 +47,13 @@ func main(f func(screen.Screen)) (retErr error) {
if err := render.Init(xc); err != nil {
return fmt.Errorf("x11driver: render.Init failed: %v", err)
}
+
+ useShm := true
if err := shm.Init(xc); err != nil {
- return fmt.Errorf("x11driver: shm.Init failed: %v", err)
+ useShm = false
}
- s, err := newScreenImpl(xc)
+ s, err := newScreenImpl(xc, useShm)
if err != nil {
return err
}
diff --git a/vendor/golang.org/x/image/draw/draw_go117.go b/vendor/golang.org/x/image/draw/draw_go117.go
new file mode 100644
index 0000000..fa83648
--- /dev/null
+++ b/vendor/golang.org/x/image/draw/draw_go117.go
@@ -0,0 +1,27 @@
+// 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 go1.17
+// +build go1.17
+
+package draw
+
+import (
+ "image/draw"
+)
+
+// The package documentation, in draw.go, gives the intent of this package:
+//
+// This package is a superset of and a drop-in replacement for the
+// image/draw package in the standard library.
+//
+// "Drop-in replacement" means that we use type aliases in this file.
+//
+// TODO: move the type aliases to draw.go once Go 1.16 is no longer supported.
+
+// RGBA64Image extends both the Image and image.RGBA64Image interfaces with a
+// SetRGBA64 method to change a single pixel. SetRGBA64 is equivalent to
+// calling Set, but it can avoid allocations from converting concrete color
+// types to the color.Color interface type.
+type RGBA64Image = draw.RGBA64Image
diff --git a/vendor/golang.org/x/image/font/sfnt/postscript.go b/vendor/golang.org/x/image/font/sfnt/postscript.go
index b686e60..2a21997 100644
--- a/vendor/golang.org/x/image/font/sfnt/postscript.go
+++ b/vendor/golang.org/x/image/font/sfnt/postscript.go
@@ -795,6 +795,18 @@ func (p *psInterpreter) parseNumber() (hasResult bool, err error) {
}
number, hasResult = int32(u32(p.instructions[1:])), true
p.instructions = p.instructions[5:]
+ // 5177.Type2.pdf section 3.2 "Charstring Number Encoding" says "If the
+ // charstring byte contains the value 255... [this] number is
+ // interpreted as a Fixed; that is, a signed number with 16 bits of
+ // fraction".
+ //
+ // TODO: change the psType2CharstringsData.b.segments and
+ // psInterpreter.argStack data structures to optionally hold fixed
+ // point values, not just integer values. That's a substantial
+ // re-design, though. Until then, just round the 16.16 fixed point
+ // number to the closest integer value. This isn't just "number =
+ // ((number + 0x8000) >> 16)" because of potential overflow.
+ number = (number >> 16) + (1 & (number >> 15))
}
if hasResult {
diff --git a/vendor/golang.org/x/image/font/sfnt/sfnt.go b/vendor/golang.org/x/image/font/sfnt/sfnt.go
index f05b4cd..d693886 100644
--- a/vendor/golang.org/x/image/font/sfnt/sfnt.go
+++ b/vendor/golang.org/x/image/font/sfnt/sfnt.go
@@ -4,8 +4,30 @@
//go:generate go run gen.go
-// Package sfnt implements a decoder for SFNT font file formats, including
-// TrueType and OpenType.
+// Package sfnt implements a decoder for TTF (TrueType Fonts) and OTF (OpenType
+// Fonts). Such fonts are also known as SFNT fonts.
+//
+// This package provides a low-level API and does not depend on vector
+// rasterization packages. Glyphs are represented as vectors, not pixels.
+//
+// The sibling golang.org/x/image/font/opentype package provides a high-level
+// API, including glyph rasterization.
+//
+// This package provides a decoder in that it produces a TTF's glyphs (and
+// other metadata such as advance width and kerning pairs): give me the 'A'
+// from times_new_roman.ttf.
+//
+// Unlike the image.Image decoder functions (gif.Decode, jpeg.Decode and
+// png.Decode) in Go's standard library, an sfnt.Font needs ongoing access to
+// the TTF data (as a []byte or io.ReaderAt) after the sfnt.ParseXxx functions
+// return. If parsing a []byte, its elements are assumed immutable while the
+// sfnt.Font remains in use. If parsing an *os.File, you should not close the
+// file until after you're done with the sfnt.Font.
+//
+// The []byte or io.ReaderAt data given to ParseXxx can be re-written to
+// another io.Writer, copying the underlying TTF file, but this package does
+// not provide an encoder. Specifically, there is no API to build a different
+// TTF file, whether 'from scratch' or by modifying an existing one.
package sfnt // import "golang.org/x/image/font/sfnt"
// This implementation was written primarily to the
@@ -100,6 +122,7 @@ var (
errUnsupportedCFFVersion = errors.New("sfnt: unsupported CFF version")
errUnsupportedClassDefFormat = errors.New("sfnt: unsupported class definition format")
errUnsupportedCmapEncodings = errors.New("sfnt: unsupported cmap encodings")
+ errUnsupportedCollection = errors.New("sfnt: unsupported collection")
errUnsupportedCompoundGlyph = errors.New("sfnt: unsupported compound glyph")
errUnsupportedCoverageFormat = errors.New("sfnt: unsupported coverage format")
errUnsupportedExtensionPosFormat = errors.New("sfnt: unsupported extension positioning format")
@@ -314,6 +337,9 @@ type table struct {
//
// If passed data for a single font, a TTF or OTF instead of a TTC or OTC, it
// will return a collection containing 1 font.
+//
+// The caller should not modify src while the Collection or its Fonts remain in
+// use. See the package documentation for details.
func ParseCollection(src []byte) (*Collection, error) {
c := &Collection{src: source{b: src}}
if err := c.initialize(); err != nil {
@@ -327,6 +353,9 @@ func ParseCollection(src []byte) (*Collection, error) {
//
// If passed data for a single font, a TTF or OTF instead of a TTC or OTC, it
// will return a collection containing 1 font.
+//
+// The caller should not modify or close src while the Collection or its Fonts
+// remain in use. See the package documentation for details.
func ParseCollectionReaderAt(src io.ReaderAt) (*Collection, error) {
c := &Collection{src: source{r: src}}
if err := c.initialize(); err != nil {
@@ -506,6 +535,9 @@ func (c *Collection) Font(i int) (*Font, error) {
// Parse parses an SFNT font, such as TTF or OTF data, from a []byte data
// source.
+//
+// The caller should not modify src while the Font remains in use. See the
+// package documentation for details.
func Parse(src []byte) (*Font, error) {
f := &Font{src: source{b: src}}
if err := f.initialize(0, false); err != nil {
@@ -516,6 +548,9 @@ func Parse(src []byte) (*Font, error) {
// ParseReaderAt parses an SFNT font, such as TTF or OTF data, from an
// io.ReaderAt data source.
+//
+// The caller should not modify or close src while the Font remains in use. See
+// the package documentation for details.
func ParseReaderAt(src io.ReaderAt) (*Font, error) {
f := &Font{src: source{r: src}}
if err := f.initialize(0, false); err != nil {
@@ -555,6 +590,10 @@ func ParseReaderAt(src io.ReaderAt) (*Font, error) {
type Font struct {
src source
+ // initialOffset is the file offset of the start of the font. This may be
+ // non-zero for fonts within a font collection.
+ initialOffset int32
+
// https://www.microsoft.com/typography/otspec/otff.htm#otttables
// "Required Tables".
cmap table
@@ -601,6 +640,7 @@ type Font struct {
cached struct {
ascent int32
capHeight int32
+ finalTableOffset int32
glyphData glyphData
glyphIndex glyphIndexFunc
bounds [4]int16
@@ -630,7 +670,7 @@ func (f *Font) initialize(offset int, isDfont bool) error {
if !f.src.valid() {
return errInvalidSourceData
}
- buf, isPostScript, err := f.initializeTables(offset, isDfont)
+ buf, finalTableOffset, isPostScript, err := f.initializeTables(offset, isDfont)
if err != nil {
return err
}
@@ -686,6 +726,7 @@ func (f *Font) initialize(offset int, isDfont bool) error {
f.cached.ascent = ascent
f.cached.capHeight = capHeight
+ f.cached.finalTableOffset = finalTableOffset
f.cached.glyphData = glyphData
f.cached.glyphIndex = glyphIndex
f.cached.bounds = bounds
@@ -715,21 +756,25 @@ func (f *Font) initialize(offset int, isDfont bool) error {
return nil
}
-func (f *Font) initializeTables(offset int, isDfont bool) (buf1 []byte, isPostScript bool, err error) {
+func (f *Font) initializeTables(offset int, isDfont bool) (buf1 []byte, finalTableOffset int32, isPostScript bool, err error) {
+ f.initialOffset = int32(offset)
+ if int(f.initialOffset) != offset {
+ return nil, 0, false, errUnsupportedTableOffsetLength
+ }
// https://www.microsoft.com/typography/otspec/otff.htm "Organization of an
// OpenType Font" says that "The OpenType font starts with the Offset
// Table", which is 12 bytes.
buf, err := f.src.view(nil, offset, 12)
if err != nil {
- return nil, false, err
+ return nil, 0, false, err
}
// When updating the cases in this switch statement, also update the
// Collection.initialize method.
switch u32(buf) {
default:
- return nil, false, errInvalidFont
+ return nil, 0, false, errInvalidFont
case dfontResourceDataOffset:
- return nil, false, errInvalidSingleFont
+ return nil, 0, false, errInvalidSingleFont
case 0x00010000:
// No-op.
case 0x4f54544f: // "OTTO".
@@ -737,25 +782,25 @@ func (f *Font) initializeTables(offset int, isDfont bool) (buf1 []byte, isPostSc
case 0x74727565: // "true"
// No-op.
case 0x74746366: // "ttcf".
- return nil, false, errInvalidSingleFont
+ return nil, 0, false, errInvalidSingleFont
}
numTables := int(u16(buf[4:]))
if numTables > maxNumTables {
- return nil, false, errUnsupportedNumberOfTables
+ return nil, 0, false, errUnsupportedNumberOfTables
}
// "The Offset Table is followed immediately by the Table Record entries...
// sorted in ascending order by tag", 16 bytes each.
buf, err = f.src.view(buf, offset+12, 16*numTables)
if err != nil {
- return nil, false, err
+ return nil, 0, false, err
}
for b, first, prevTag := buf, true, uint32(0); len(b) > 0; b = b[16:] {
tag := u32(b)
if first {
first = false
} else if tag <= prevTag {
- return nil, false, errInvalidTableTagOrder
+ return nil, 0, false, errInvalidTableTagOrder
}
prevTag = tag
@@ -766,16 +811,19 @@ func (f *Font) initializeTables(offset int, isDfont bool) (buf1 []byte, isPostSc
origO := o
o += uint32(offset)
if o < origO {
- return nil, false, errUnsupportedTableOffsetLength
+ return nil, 0, false, errUnsupportedTableOffsetLength
}
}
if o > maxTableOffset || n > maxTableLength {
- return nil, false, errUnsupportedTableOffsetLength
+ return nil, 0, false, errUnsupportedTableOffsetLength
}
// We ignore the checksums, but "all tables must begin on four byte
// boundries [sic]".
if o&3 != 0 {
- return nil, false, errInvalidTableOffset
+ return nil, 0, false, errInvalidTableOffset
+ }
+ if finalTableOffset < int32(o+n) {
+ finalTableOffset = int32(o + n)
}
// Match the 4-byte tag as a uint32. For example, "OS/2" is 0x4f532f32.
@@ -810,7 +858,11 @@ func (f *Font) initializeTables(offset int, isDfont bool) (buf1 []byte, isPostSc
f.post = table{o, n}
}
}
- return buf, isPostScript, nil
+
+ if (f.src.b != nil) && (int(finalTableOffset) > len(f.src.b)) {
+ return nil, 0, false, errInvalidSourceData
+ }
+ return buf, finalTableOffset, isPostScript, nil
}
func (f *Font) parseCmap(buf []byte) (buf1 []byte, glyphIndex glyphIndexFunc, err error) {
@@ -1358,7 +1410,7 @@ type LoadGlyphOptions struct {
// It returns ErrNotFound if the glyph index is out of range. It returns
// ErrColoredGlyph if the glyph is not a monochrome vector glyph, such as a
// colored (bitmap or vector) emoji glyph.
-func (f *Font) LoadGlyph(b *Buffer, x GlyphIndex, ppem fixed.Int26_6, opts *LoadGlyphOptions) ([]Segment, error) {
+func (f *Font) LoadGlyph(b *Buffer, x GlyphIndex, ppem fixed.Int26_6, opts *LoadGlyphOptions) (Segments, error) {
if b == nil {
b = &Buffer{}
}
@@ -1518,16 +1570,21 @@ func (f *Font) GlyphBounds(b *Buffer, x GlyphIndex, ppem fixed.Int26_6, h font.H
// optimization, the number of records can be less than the number of
// glyphs, in which case the advance width value of the last record applies
// to all remaining glyph IDs."
+ metricIndex := x
if n := GlyphIndex(f.cached.numHMetrics - 1); x > n {
- x = n
+ metricIndex = n
}
- buf, err := b.view(&f.src, int(f.hmtx.offset)+4*int(x), 2)
+ buf, err := b.view(&f.src, int(f.hmtx.offset)+4*int(metricIndex), 2)
if err != nil {
return fixed.Rectangle26_6{}, 0, err
}
advance = fixed.Int26_6(u16(buf))
advance = scale(advance*ppem, f.cached.unitsPerEm)
+ if h == font.HintingFull {
+ // Quantize the fixed.Int26_6 value to the nearest pixel.
+ advance = (advance + 32) &^ 63
+ }
// Ignore the hmtx LSB entries and the glyf bounding boxes. Instead, always
// calculate bounds from the segments. OpenType does contain the bounds for
@@ -1535,51 +1592,13 @@ func (f *Font) GlyphBounds(b *Buffer, x GlyphIndex, ppem fixed.Int26_6, h font.H
// compound glyphs. CFF/PostScript also have no explicit bounds and must be
// obtained from the segments.
- seg, err := f.LoadGlyph(b, x, ppem, &LoadGlyphOptions{
+ segments, err := f.LoadGlyph(b, x, ppem, &LoadGlyphOptions{
// TODO: pass h, the font.Hinting.
})
if err != nil {
return fixed.Rectangle26_6{}, 0, err
}
-
- if len(seg) > 0 {
- bounds.Min.X = fixed.Int26_6(+(1 << 31) - 1)
- bounds.Min.Y = fixed.Int26_6(+(1 << 31) - 1)
- bounds.Max.X = fixed.Int26_6(-(1 << 31) + 0)
- bounds.Max.Y = fixed.Int26_6(-(1 << 31) + 0)
- for _, s := range seg {
- n := 1
- switch s.Op {
- case SegmentOpQuadTo:
- n = 2
- case SegmentOpCubeTo:
- n = 3
- }
- for i := 0; i < n; i++ {
- if bounds.Max.X < s.Args[i].X {
- bounds.Max.X = s.Args[i].X
- }
- if bounds.Min.X > s.Args[i].X {
- bounds.Min.X = s.Args[i].X
- }
- if bounds.Max.Y < s.Args[i].Y {
- bounds.Max.Y = s.Args[i].Y
- }
- if bounds.Min.Y > s.Args[i].Y {
- bounds.Min.Y = s.Args[i].Y
- }
- }
- }
- }
-
- if h == font.HintingFull {
- // Quantize the fixed.Int26_6 value to the nearest pixel.
- advance = (advance + 32) &^ 63
- // TODO: hinting of bounds should be handled by LoadGlyph. See TODO
- // above.
- }
-
- return bounds, advance, nil
+ return segments.Bounds(), advance, nil
}
// GlyphAdvance returns the advance width for the x'th glyph. ppem is the
@@ -1716,6 +1735,63 @@ func (f *Font) Metrics(b *Buffer, ppem fixed.Int26_6, h font.Hinting) (font.Metr
return m, nil
}
+// WriteSourceTo writes the source data (the []byte or io.ReaderAt passed to
+// Parse or ParseReaderAt) to w.
+//
+// It returns the number of bytes written. On success, this is the final offset
+// of the furthest SFNT table in the source. This may be less than the length
+// of the []byte or io.ReaderAt originally passed.
+func (f *Font) WriteSourceTo(b *Buffer, w io.Writer) (int64, error) {
+ if f.initialOffset != 0 {
+ // TODO: when extracting a single font (i.e. TTF) out of a font
+ // collection (i.e. TTC), write only the i'th font and not the (i-1)
+ // previous fonts. Subtly, in the file format, table offsets may be
+ // relative to the start of the resource (for dfont collections) or the
+ // start of the file (otherwise). If we were to extract a single font
+ // here, we might need to dynamically patch the table offsets, bearing
+ // in mind that f.src.b is conceptually a 'read-only' slice of bytes.
+ return 0, errUnsupportedCollection
+ }
+
+ if f.src.b != nil {
+ n, err := w.Write(f.src.b[:f.cached.finalTableOffset])
+ return int64(n), err
+ }
+
+ // We have an io.ReaderAt source, not a []byte. It is tempting to see if
+ // the io.ReaderAt optionally implements the io.WriterTo interface, but we
+ // don't for two reasons:
+ // - We want to write exactly f.cached.finalTableOffset bytes, even if the
+ // underlying 'file' is larger, to be consistent with the []byte flavor.
+ // - We document that "Font methods are safe to call concurrently" and
+ // while io.ReaderAt is stateless (the offset is an argument), the
+ // io.Reader / io.Writer abstractions are stateful (the current position
+ // is a field) and mutable state generally isn't concurrent-safe.
+
+ if b == nil {
+ b = &Buffer{}
+ }
+ finalTableOffset := int(f.cached.finalTableOffset)
+ numBytesWritten := int64(0)
+ for offset := 0; offset < finalTableOffset; {
+ length := finalTableOffset - offset
+ if length > 4096 {
+ length = 4096
+ }
+ view, err := b.view(&f.src, offset, length)
+ if err != nil {
+ return numBytesWritten, err
+ }
+ n, err := w.Write(view)
+ numBytesWritten += int64(n)
+ if err != nil {
+ return numBytesWritten, err
+ }
+ offset += length
+ }
+ return numBytesWritten, nil
+}
+
// Name returns the name value keyed by the given NameID.
//
// It returns ErrNotFound if there is no value for that key.
@@ -1806,7 +1882,7 @@ type Buffer struct {
// buf is a byte buffer for when a Font's source is an io.ReaderAt.
buf []byte
// segments holds glyph vector path segments.
- segments []Segment
+ segments Segments
// compoundStack holds the components of a TrueType compound glyph.
compoundStack [maxCompoundStackSize]struct {
glyphIndex GlyphIndex
@@ -1852,6 +1928,47 @@ const (
SegmentOpCubeTo
)
+// Segments is a slice of Segment.
+type Segments []Segment
+
+// Bounds returns s' bounding box. It returns an empty rectangle if s is empty.
+func (s Segments) Bounds() (bounds fixed.Rectangle26_6) {
+ if len(s) == 0 {
+ return fixed.Rectangle26_6{}
+ }
+
+ bounds.Min.X = fixed.Int26_6(+(1 << 31) - 1)
+ bounds.Min.Y = fixed.Int26_6(+(1 << 31) - 1)
+ bounds.Max.X = fixed.Int26_6(-(1 << 31) + 0)
+ bounds.Max.Y = fixed.Int26_6(-(1 << 31) + 0)
+
+ for _, seg := range s {
+ n := 1
+ switch seg.Op {
+ case SegmentOpQuadTo:
+ n = 2
+ case SegmentOpCubeTo:
+ n = 3
+ }
+ for i := 0; i < n; i++ {
+ if bounds.Max.X < seg.Args[i].X {
+ bounds.Max.X = seg.Args[i].X
+ }
+ if bounds.Min.X > seg.Args[i].X {
+ bounds.Min.X = seg.Args[i].X
+ }
+ if bounds.Max.Y < seg.Args[i].Y {
+ bounds.Max.Y = seg.Args[i].Y
+ }
+ if bounds.Min.Y > seg.Args[i].Y {
+ bounds.Min.Y = seg.Args[i].Y
+ }
+ }
+ }
+
+ return bounds
+}
+
// translateArgs applies a translation to args.
func translateArgs(args *[3]fixed.Point26_6, dx, dy fixed.Int26_6) {
args[0].X += dx
diff --git a/vendor/golang.org/x/image/font/sfnt/truetype.go b/vendor/golang.org/x/image/font/sfnt/truetype.go
index ab27f5b..0d0b309 100644
--- a/vendor/golang.org/x/image/font/sfnt/truetype.go
+++ b/vendor/golang.org/x/image/font/sfnt/truetype.go
@@ -152,9 +152,10 @@ func loadGlyf(f *Font, b *Buffer, x GlyphIndex, stackBottom, recursionDepth uint
xIndex: xIndex,
yIndex: yIndex,
endIndex: glyfHeaderLen,
- // The -1 is because the contour-end index in the file format is
- // inclusive, but Go's slice[:index] semantics are exclusive.
+ // The -1 on prevEnd and finalEnd are because the contour-end index in
+ // the file format is inclusive, but Go's slice[:index] is exclusive.
prevEnd: -1,
+ finalEnd: int32(numPoints - 1),
numContours: int32(numContours),
}
for g.nextContour() {
@@ -304,18 +305,18 @@ func loadCompoundGlyf(f *Font, b *Buffer, data []byte, stackBottom, recursionDep
return err
}
dx, dy := fixed.Int26_6(elem.dx), fixed.Int26_6(elem.dy)
- segs := b.segments[base:]
+ segments := b.segments[base:]
if elem.hasTransform {
txx := elem.transformXX
txy := elem.transformXY
tyx := elem.transformYX
tyy := elem.transformYY
- for j := range segs {
- transformArgs(&segs[j].Args, txx, txy, tyx, tyy, dx, dy)
+ for j := range segments {
+ transformArgs(&segments[j].Args, txx, txy, tyx, tyy, dx, dy)
}
} else {
- for j := range segs {
- translateArgs(&segs[j].Args, dx, dy)
+ for j := range segments {
+ translateArgs(&segments[j].Args, dx, dy)
}
}
}
@@ -334,9 +335,11 @@ type glyfIter struct {
yIndex int32
// endIndex points to the uint16 that is the inclusive point index of the
- // current contour's end. prevEnd is the previous contour's end.
+ // current contour's end. prevEnd is the previous contour's end. finalEnd
+ // should match the final contour's end.
endIndex int32
prevEnd int32
+ finalEnd int32
// c and p count the current contour and point, up to numContours and
// numPoints.
@@ -386,13 +389,16 @@ type glyfIter struct {
func (g *glyfIter) nextContour() (ok bool) {
if g.c == g.numContours {
+ if g.prevEnd != g.finalEnd {
+ g.err = errInvalidGlyphData
+ }
return false
}
g.c++
end := int32(u16(g.data[g.endIndex:]))
g.endIndex += 2
- if end <= g.prevEnd {
+ if (end <= g.prevEnd) || (g.finalEnd < end) {
g.err = errInvalidGlyphData
return false
}
diff --git a/vendor/golang.org/x/mobile/gl/gl.go b/vendor/golang.org/x/mobile/gl/gl.go
index 95f7468..195a309 100644
--- a/vendor/golang.org/x/mobile/gl/gl.go
+++ b/vendor/golang.org/x/mobile/gl/gl.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || linux || openbsd || windows) && !gldebug
// +build darwin linux openbsd windows
// +build !gldebug
@@ -1284,6 +1285,14 @@ func (ctx *context) TexImage2D(target Enum, level int, internalFormat int, width
}
func (ctx *context) TexSubImage2D(target Enum, level int, x, y, width, height int, format, ty Enum, data []byte) {
+ // It is common to pass TexSubImage2D a nil data, indicating that a
+ // bound GL buffer is being used as the source. In that case, it
+ // is not necessary to block.
+ parg := unsafe.Pointer(nil)
+ if len(data) > 0 {
+ parg = unsafe.Pointer(&data[0])
+ }
+
ctx.enqueue(call{
args: fnargs{
fn: glfnTexSubImage2D,
@@ -1297,8 +1306,8 @@ func (ctx *context) TexSubImage2D(target Enum, level int, x, y, width, height in
a6: format.c(),
a7: ty.c(),
},
- parg: unsafe.Pointer(&data[0]),
- blocking: true,
+ parg: parg,
+ blocking: parg != nil,
})
}
diff --git a/vendor/golang.org/x/mobile/gl/gldebug.go b/vendor/golang.org/x/mobile/gl/gldebug.go
index 1639c1b..5a4bf71 100644
--- a/vendor/golang.org/x/mobile/gl/gldebug.go
+++ b/vendor/golang.org/x/mobile/gl/gldebug.go
@@ -5,6 +5,7 @@
// Code generated from gl.go using go generate. DO NOT EDIT.
// See doc.go for details.
+//go:build (darwin || linux || openbsd || windows) && gldebug
// +build darwin linux openbsd windows
// +build gldebug
diff --git a/vendor/golang.org/x/mobile/gl/types_debug.go b/vendor/golang.org/x/mobile/gl/types_debug.go
index 60c0afc..b6dbaaa 100644
--- a/vendor/golang.org/x/mobile/gl/types_debug.go
+++ b/vendor/golang.org/x/mobile/gl/types_debug.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || linux || openbsd || windows) && gldebug
// +build darwin linux openbsd windows
// +build gldebug
diff --git a/vendor/golang.org/x/mobile/gl/types_prod.go b/vendor/golang.org/x/mobile/gl/types_prod.go
index 91c50f8..e1c8b42 100644
--- a/vendor/golang.org/x/mobile/gl/types_prod.go
+++ b/vendor/golang.org/x/mobile/gl/types_prod.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || linux || openbsd || windows) && !gldebug
// +build darwin linux openbsd windows
// +build !gldebug
diff --git a/vendor/golang.org/x/mobile/gl/work.c b/vendor/golang.org/x/mobile/gl/work.c
index 7203acf..605e0ba 100644
--- a/vendor/golang.org/x/mobile/gl/work.c
+++ b/vendor/golang.org/x/mobile/gl/work.c
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin || linux || openbsd
// +build darwin linux openbsd
#include <stdlib.h>
@@ -356,7 +357,7 @@ uintptr_t processFn(struct fnargs* args, char* parg) {
glScissor((GLint)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3);
break;
case glfnShaderSource:
-#if defined(os_ios) || defined(os_osx)
+#if defined(os_ios) || defined(os_macos)
glShaderSource((GLuint)args->a0, (GLsizei)args->a1, (const GLchar *const *)args->a2, NULL);
#else
glShaderSource((GLuint)args->a0, (GLsizei)args->a1, (const GLchar **)args->a2, NULL);
diff --git a/vendor/golang.org/x/mobile/gl/work.go b/vendor/golang.org/x/mobile/gl/work.go
index 9f340c1..65eaf9a 100644
--- a/vendor/golang.org/x/mobile/gl/work.go
+++ b/vendor/golang.org/x/mobile/gl/work.go
@@ -2,28 +2,25 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin || linux || openbsd
// +build darwin linux openbsd
package gl
/*
-#cgo ios LDFLAGS: -framework OpenGLES
-#cgo darwin,amd64,!ios LDFLAGS: -framework OpenGL
-#cgo darwin,arm LDFLAGS: -framework OpenGLES
-#cgo darwin,arm64 LDFLAGS: -framework OpenGLES
-#cgo linux LDFLAGS: -lGLESv2
-#cgo openbsd LDFLAGS: -L/usr/X11R6/lib/ -lGLESv2
-
-#cgo android CFLAGS: -Dos_android
-#cgo ios CFLAGS: -Dos_ios
-#cgo darwin,amd64,!ios CFLAGS: -Dos_osx
-#cgo darwin,arm CFLAGS: -Dos_ios
-#cgo darwin,arm64 CFLAGS: -Dos_ios
-#cgo darwin CFLAGS: -DGL_SILENCE_DEPRECATION
-#cgo linux CFLAGS: -Dos_linux
-#cgo openbsd CFLAGS: -Dos_openbsd
-
-#cgo openbsd CFLAGS: -I/usr/X11R6/include/
+#cgo ios LDFLAGS: -framework OpenGLES
+#cgo darwin,!ios LDFLAGS: -framework OpenGL
+#cgo linux LDFLAGS: -lGLESv2
+#cgo openbsd LDFLAGS: -L/usr/X11R6/lib/ -lGLESv2
+
+#cgo android CFLAGS: -Dos_android
+#cgo ios CFLAGS: -Dos_ios
+#cgo darwin,!ios CFLAGS: -Dos_macos
+#cgo darwin CFLAGS: -DGL_SILENCE_DEPRECATION -DGLES_SILENCE_DEPRECATION
+#cgo linux CFLAGS: -Dos_linux
+#cgo openbsd CFLAGS: -Dos_openbsd
+
+#cgo openbsd CFLAGS: -I/usr/X11R6/include/
#include <stdint.h>
#include "work.h"
diff --git a/vendor/golang.org/x/mobile/gl/work.h b/vendor/golang.org/x/mobile/gl/work.h
index cc2e48c..5bc093b 100644
--- a/vendor/golang.org/x/mobile/gl/work.h
+++ b/vendor/golang.org/x/mobile/gl/work.h
@@ -18,7 +18,7 @@
#include <OpenGLES/ES2/glext.h>
#endif
-#ifdef os_osx
+#ifdef os_macos
#include <OpenGL/gl3.h>
#define GL_ES_VERSION_3_0 1
#endif
diff --git a/vendor/golang.org/x/mobile/gl/work_other.go b/vendor/golang.org/x/mobile/gl/work_other.go
index b0f22fd..b4b48f4 100644
--- a/vendor/golang.org/x/mobile/gl/work_other.go
+++ b/vendor/golang.org/x/mobile/gl/work_other.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (!cgo || (!darwin && !linux && !openbsd)) && !windows
// +build !cgo !darwin,!linux,!openbsd
// +build !windows
diff --git a/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go b/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
new file mode 100644
index 0000000..e07899b
--- /dev/null
+++ b/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
@@ -0,0 +1,30 @@
+// Copyright 2020 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 unsafeheader contains header declarations for the Go runtime's
+// slice and string implementations.
+//
+// This package allows x/sys to use types equivalent to
+// reflect.SliceHeader and reflect.StringHeader without introducing
+// a dependency on the (relatively heavy) "reflect" package.
+package unsafeheader
+
+import (
+ "unsafe"
+)
+
+// Slice is the runtime representation of a slice.
+// It cannot be used safely or portably and its representation may change in a later release.
+type Slice struct {
+ Data unsafe.Pointer
+ Len int
+ Cap int
+}
+
+// String is the runtime representation of a string.
+// It cannot be used safely or portably and its representation may change in a later release.
+type String struct {
+ Data unsafe.Pointer
+ Len int
+}
diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md
index eb2f78a..7d3c060 100644
--- a/vendor/golang.org/x/sys/unix/README.md
+++ b/vendor/golang.org/x/sys/unix/README.md
@@ -76,7 +76,7 @@ arguments can be passed to the kernel. The third is for low-level use by the
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
let it know that a system call is running.
-When porting Go to an new architecture/OS, this file must be implemented for
+When porting Go to a new architecture/OS, this file must be implemented for
each GOOS/GOARCH pair.
### mksysnum
@@ -89,7 +89,7 @@ constants.
Adding new syscall numbers is mostly done by running the build on a sufficiently
new installation of the target OS (or updating the source checkouts for the
-new build system). However, depending on the OS, you make need to update the
+new build system). However, depending on the OS, you may need to update the
parsing in mksysnum.
### mksyscall.go
@@ -107,7 +107,7 @@ prototype can be exported (capitalized) or not.
Adding a new syscall often just requires adding a new `//sys` function prototype
with the desired arguments and a capitalized name so it is exported. However, if
you want the interface to the syscall to be different, often one will make an
-unexported `//sys` prototype, an then write a custom wrapper in
+unexported `//sys` prototype, and then write a custom wrapper in
`syscall_${GOOS}.go`.
### types files
@@ -137,7 +137,7 @@ some `#if/#elif` macros in your include statements.
This script is used to generate the system's various constants. This doesn't
just include the error numbers and error strings, but also the signal numbers
-an a wide variety of miscellaneous constants. The constants come from the list
+and a wide variety of miscellaneous constants. The constants come from the list
of include files in the `includes_${uname}` variable. A regex then picks out
the desired `#define` statements, and generates the corresponding Go constants.
The error numbers and strings are generated from `#include <errno.h>`, and the
@@ -149,10 +149,21 @@ To add a constant, add the header that includes it to the appropriate variable.
Then, edit the regex (if necessary) to match the desired constant. Avoid making
the regex too broad to avoid matching unintended constants.
+### internal/mkmerge
+
+This program is used to extract duplicate const, func, and type declarations
+from the generated architecture-specific files listed below, and merge these
+into a common file for each OS.
+
+The merge is performed in the following steps:
+1. Construct the set of common code that is idential in all architecture-specific files.
+2. Write this common code to the merged file.
+3. Remove the common code from all architecture-specific files.
+
## Generated files
-### `zerror_${GOOS}_${GOARCH}.go`
+### `zerrors_${GOOS}_${GOARCH}.go`
A file containing all of the system's generated error numbers, error strings,
signal numbers, and constants. Generated by `mkerrors.sh` (see above).
diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go
index 951fce4..abc89c1 100644
--- a/vendor/golang.org/x/sys/unix/aliases.go
+++ b/vendor/golang.org/x/sys/unix/aliases.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// +build go1.9
package unix
diff --git a/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s b/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
index 06f84b8..db9171c 100644
--- a/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
+++ b/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_bsd_386.s
index 48bdcd7..e0fcd9b 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_386.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// 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.
-// +build !gccgo
+//go:build (freebsd || netbsd || openbsd) && gc
+// +build freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for 386, NetBSD
-//
+// System call support for 386 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
@@ -22,7 +22,7 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-40
TEXT ·Syscall9(SB),NOSPLIT,$0-52
JMP syscall·Syscall9(SB)
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
JMP syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
index 790ef77..2b99c34 100644
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// 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.
-// +build !gccgo
+//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
+// +build darwin dragonfly freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for AMD64, OpenBSD
-//
+// System call support for AMD64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
index e892857..d702d4a 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
@@ -1,14 +1,14 @@
-// Copyright 2013 The Go Authors. All rights reserved.
+// 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.
-// +build !gccgo
+//go:build (freebsd || netbsd || openbsd) && gc
+// +build freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for ARM, NetBSD
-//
+// System call support for ARM BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
index 2ede05c..fe36a73 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// 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.
-// +build !gccgo
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for AMD64, NetBSD
-//
+// System call support for ARM64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a72783..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
deleted file mode 100644
index 6321421..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 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.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e0174..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 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.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index 603dd57..0000000
--- a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
deleted file mode 100644
index c9a0a26..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 3517247..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c87..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
deleted file mode 100644
index d9318cb..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s
index 448bebb..8fd101d 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
index c6468a9..7ed38e4 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
index cf0f357..8ef1d51 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
index afe6fdf..98ae027 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && arm64 && gc
// +build linux
// +build arm64
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
index ab9d638..21231d2 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (mips64 || mips64le) && gc
// +build linux
// +build mips64 mips64le
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
index 99e5399..6783b26 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (mips || mipsle) && gc
// +build linux
// +build mips mipsle
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
index 88f7125..19d4989 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (ppc64 || ppc64le) && gc
// +build linux
// +build ppc64 ppc64le
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
index 3cfefed..e42eb81 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build riscv64,!gccgo
+//go:build riscv64 && gc
+// +build riscv64
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
index a5a863c..c46aab3 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build s390x
+//go:build linux && s390x && gc
// +build linux
-// +build !gccgo
+// +build s390x
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
deleted file mode 100644
index 6f98ba5..0000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2019 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
deleted file mode 100644
index 469bfa1..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
index 0cedea3..5e7a116 100644
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
+++ b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
#include "textflag.h"
//
-// System call support for arm64, OpenBSD
+// System call support for mips64, OpenBSD
//
// Just jump to package syscall's implementation for all these functions.
diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
index ded8260..f8c5394 100644
--- a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
new file mode 100644
index 0000000..3b54e18
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
@@ -0,0 +1,426 @@
+// Copyright 2020 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 zos && s390x && gc
+// +build zos
+// +build s390x
+// +build gc
+
+#include "textflag.h"
+
+#define PSALAA 1208(R0)
+#define GTAB64(x) 80(x)
+#define LCA64(x) 88(x)
+#define CAA(x) 8(x)
+#define EDCHPXV(x) 1016(x) // in the CAA
+#define SAVSTACK_ASYNC(x) 336(x) // in the LCA
+
+// SS_*, where x=SAVSTACK_ASYNC
+#define SS_LE(x) 0(x)
+#define SS_GO(x) 8(x)
+#define SS_ERRNO(x) 16(x)
+#define SS_ERRNOJR(x) 20(x)
+
+#define LE_CALL BYTE $0x0D; BYTE $0x76; // BL R7, R6
+
+TEXT ·clearErrno(SB),NOSPLIT,$0-0
+ BL addrerrno<>(SB)
+ MOVD $0, 0(R3)
+ RET
+
+// Returns the address of errno in R3.
+TEXT addrerrno<>(SB),NOSPLIT|NOFRAME,$0-0
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get __errno FuncDesc.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ ADD $(0x156*16), R9
+ LMG 0(R9), R5, R6
+
+ // Switch to saved LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Call __errno function.
+ LE_CALL
+ NOPH
+
+ // Switch back to Go stack.
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+ RET
+
+TEXT ·syscall_syscall(SB),NOSPLIT,$0-56
+ BL runtime·entersyscall(SB)
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+32(FP)
+ MOVD R0, r2+40(FP)
+ MOVD R0, err+48(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+48(FP)
+done:
+ BL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·syscall_rawsyscall(SB),NOSPLIT,$0-56
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+32(FP)
+ MOVD R0, r2+40(FP)
+ MOVD R0, err+48(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+48(FP)
+done:
+ RET
+
+TEXT ·syscall_syscall6(SB),NOSPLIT,$0-80
+ BL runtime·entersyscall(SB)
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+56(FP)
+ MOVD R0, r2+64(FP)
+ MOVD R0, err+72(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+72(FP)
+done:
+ BL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·syscall_rawsyscall6(SB),NOSPLIT,$0-80
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+56(FP)
+ MOVD R0, r2+64(FP)
+ MOVD R0, err+72(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL ·rrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+72(FP)
+done:
+ RET
+
+TEXT ·syscall_syscall9(SB),NOSPLIT,$0
+ BL runtime·entersyscall(SB)
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+ MOVD a7+56(FP), R12
+ MOVD R12, (2176+48)(R4)
+ MOVD a8+64(FP), R12
+ MOVD R12, (2176+56)(R4)
+ MOVD a9+72(FP), R12
+ MOVD R12, (2176+64)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+80(FP)
+ MOVD R0, r2+88(FP)
+ MOVD R0, err+96(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+96(FP)
+done:
+ BL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·syscall_rawsyscall9(SB),NOSPLIT,$0
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+ MOVD a7+56(FP), R12
+ MOVD R12, (2176+48)(R4)
+ MOVD a8+64(FP), R12
+ MOVD R12, (2176+56)(R4)
+ MOVD a9+72(FP), R12
+ MOVD R12, (2176+64)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+80(FP)
+ MOVD R0, r2+88(FP)
+ MOVD R0, err+96(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+96(FP)
+done:
+ RET
+
+// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)
+TEXT ·svcCall(SB),NOSPLIT,$0
+ BL runtime·save_g(SB) // Save g and stack pointer
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD R15, 0(R9)
+
+ MOVD argv+8(FP), R1 // Move function arguments into registers
+ MOVD dsa+16(FP), g
+ MOVD fnptr+0(FP), R15
+
+ BYTE $0x0D // Branch to function
+ BYTE $0xEF
+
+ BL runtime·load_g(SB) // Restore g and stack pointer
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R15
+
+ RET
+
+// func svcLoad(name *byte) unsafe.Pointer
+TEXT ·svcLoad(SB),NOSPLIT,$0
+ MOVD R15, R2 // Save go stack pointer
+ MOVD name+0(FP), R0 // Move SVC args into registers
+ MOVD $0x80000000, R1
+ MOVD $0, R15
+ BYTE $0x0A // SVC 08 LOAD
+ BYTE $0x08
+ MOVW R15, R3 // Save return code from SVC
+ MOVD R2, R15 // Restore go stack pointer
+ CMP R3, $0 // Check SVC return code
+ BNE error
+
+ MOVD $-2, R3 // Reset last bit of entry point to zero
+ AND R0, R3
+ MOVD R3, addr+8(FP) // Return entry point returned by SVC
+ CMP R0, R3 // Check if last bit of entry point was set
+ BNE done
+
+ MOVD R15, R2 // Save go stack pointer
+ MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08)
+ BYTE $0x0A // SVC 09 DELETE
+ BYTE $0x09
+ MOVD R2, R15 // Restore go stack pointer
+
+error:
+ MOVD $0, addr+8(FP) // Return 0 on failure
+done:
+ XOR R0, R0 // Reset r0 to 0
+ RET
+
+// func svcUnload(name *byte, fnptr unsafe.Pointer) int64
+TEXT ·svcUnload(SB),NOSPLIT,$0
+ MOVD R15, R2 // Save go stack pointer
+ MOVD name+0(FP), R0 // Move SVC args into registers
+ MOVD addr+8(FP), R15
+ BYTE $0x0A // SVC 09
+ BYTE $0x09
+ XOR R0, R0 // Reset r0 to 0
+ MOVD R15, R1 // Save SVC return code
+ MOVD R2, R15 // Restore go stack pointer
+ MOVD R1, rc+0(FP) // Return SVC return code
+ RET
+
+// func gettid() uint64
+TEXT ·gettid(SB), NOSPLIT, $0
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get CEECAATHDID
+ MOVD CAA(R8), R9
+ MOVD 0x3D0(R9), R9
+ MOVD R9, ret+0(FP)
+
+ RET
diff --git a/vendor/golang.org/x/sys/unix/cap_freebsd.go b/vendor/golang.org/x/sys/unix/cap_freebsd.go
index df52048..0b7c6ad 100644
--- a/vendor/golang.org/x/sys/unix/cap_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/cap_freebsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build freebsd
// +build freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go
index 3a6ac64..394a396 100644
--- a/vendor/golang.org/x/sys/unix/constants.go
+++ b/vendor/golang.org/x/sys/unix/constants.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
index 5e5fb45..65a9985 100644
--- a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc
+//go:build aix && ppc
+// +build aix,ppc
// Functions to access/create device major and minor numbers matching the
// encoding used by AIX.
diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
index 8b40124..8fc08ad 100644
--- a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc64
+//go:build aix && ppc64
+// +build aix,ppc64
// Functions to access/create device major and minor numbers matching the
// encoding used AIX.
diff --git a/vendor/golang.org/x/sys/unix/dev_zos.go b/vendor/golang.org/x/sys/unix/dev_zos.go
new file mode 100644
index 0000000..a388e59
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/dev_zos.go
@@ -0,0 +1,29 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used by z/OS.
+//
+// The information below is extracted and adapted from <sys/stat.h> macros.
+
+package unix
+
+// Major returns the major component of a z/OS device number.
+func Major(dev uint64) uint32 {
+ return uint32((dev >> 16) & 0x0000FFFF)
+}
+
+// Minor returns the minor component of a z/OS device number.
+func Minor(dev uint64) uint32 {
+ return uint32(dev & 0x0000FFFF)
+}
+
+// Mkdev returns a z/OS device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+ return (uint64(major) << 16) | uint64(minor)
+}
diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go
index 304016b..e74e5ea 100644
--- a/vendor/golang.org/x/sys/unix/dirent.go
+++ b/vendor/golang.org/x/sys/unix/dirent.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go
index 5e92690..a520265 100644
--- a/vendor/golang.org/x/sys/unix/endian_big.go
+++ b/vendor/golang.org/x/sys/unix/endian_big.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build ppc64 s390x mips mips64
+//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
+// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go
index bcdb5d3..4362f47 100644
--- a/vendor/golang.org/x/sys/unix/endian_little.go
+++ b/vendor/golang.org/x/sys/unix/endian_little.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
+// +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
package unix
diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go
index 84178b0..29ccc4d 100644
--- a/vendor/golang.org/x/sys/unix/env_unix.go
+++ b/vendor/golang.org/x/sys/unix/env_unix.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Unix environment variables.
diff --git a/vendor/golang.org/x/sys/unix/epoll_zos.go b/vendor/golang.org/x/sys/unix/epoll_zos.go
new file mode 100644
index 0000000..cedaf7e
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/epoll_zos.go
@@ -0,0 +1,221 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "sync"
+)
+
+// This file simulates epoll on z/OS using poll.
+
+// Analogous to epoll_event on Linux.
+// TODO(neeilan): Pad is because the Linux kernel expects a 96-bit struct. We never pass this to the kernel; remove?
+type EpollEvent struct {
+ Events uint32
+ Fd int32
+ Pad int32
+}
+
+const (
+ EPOLLERR = 0x8
+ EPOLLHUP = 0x10
+ EPOLLIN = 0x1
+ EPOLLMSG = 0x400
+ EPOLLOUT = 0x4
+ EPOLLPRI = 0x2
+ EPOLLRDBAND = 0x80
+ EPOLLRDNORM = 0x40
+ EPOLLWRBAND = 0x200
+ EPOLLWRNORM = 0x100
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ // The following constants are part of the epoll API, but represent
+ // currently unsupported functionality on z/OS.
+ // EPOLL_CLOEXEC = 0x80000
+ // EPOLLET = 0x80000000
+ // EPOLLONESHOT = 0x40000000
+ // EPOLLRDHUP = 0x2000 // Typically used with edge-triggered notis
+ // EPOLLEXCLUSIVE = 0x10000000 // Exclusive wake-up mode
+ // EPOLLWAKEUP = 0x20000000 // Relies on Linux's BLOCK_SUSPEND capability
+)
+
+// TODO(neeilan): We can eliminate these epToPoll / pToEpoll calls by using identical mask values for POLL/EPOLL
+// constants where possible The lower 16 bits of epoll events (uint32) can fit any system poll event (int16).
+
+// epToPollEvt converts epoll event field to poll equivalent.
+// In epoll, Events is a 32-bit field, while poll uses 16 bits.
+func epToPollEvt(events uint32) int16 {
+ var ep2p = map[uint32]int16{
+ EPOLLIN: POLLIN,
+ EPOLLOUT: POLLOUT,
+ EPOLLHUP: POLLHUP,
+ EPOLLPRI: POLLPRI,
+ EPOLLERR: POLLERR,
+ }
+
+ var pollEvts int16 = 0
+ for epEvt, pEvt := range ep2p {
+ if (events & epEvt) != 0 {
+ pollEvts |= pEvt
+ }
+ }
+
+ return pollEvts
+}
+
+// pToEpollEvt converts 16 bit poll event bitfields to 32-bit epoll event fields.
+func pToEpollEvt(revents int16) uint32 {
+ var p2ep = map[int16]uint32{
+ POLLIN: EPOLLIN,
+ POLLOUT: EPOLLOUT,
+ POLLHUP: EPOLLHUP,
+ POLLPRI: EPOLLPRI,
+ POLLERR: EPOLLERR,
+ }
+
+ var epollEvts uint32 = 0
+ for pEvt, epEvt := range p2ep {
+ if (revents & pEvt) != 0 {
+ epollEvts |= epEvt
+ }
+ }
+
+ return epollEvts
+}
+
+// Per-process epoll implementation.
+type epollImpl struct {
+ mu sync.Mutex
+ epfd2ep map[int]*eventPoll
+ nextEpfd int
+}
+
+// eventPoll holds a set of file descriptors being watched by the process. A process can have multiple epoll instances.
+// On Linux, this is an in-kernel data structure accessed through a fd.
+type eventPoll struct {
+ mu sync.Mutex
+ fds map[int]*EpollEvent
+}
+
+// epoll impl for this process.
+var impl epollImpl = epollImpl{
+ epfd2ep: make(map[int]*eventPoll),
+ nextEpfd: 0,
+}
+
+func (e *epollImpl) epollcreate(size int) (epfd int, err error) {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ epfd = e.nextEpfd
+ e.nextEpfd++
+
+ e.epfd2ep[epfd] = &eventPoll{
+ fds: make(map[int]*EpollEvent),
+ }
+ return epfd, nil
+}
+
+func (e *epollImpl) epollcreate1(flag int) (fd int, err error) {
+ return e.epollcreate(4)
+}
+
+func (e *epollImpl) epollctl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+
+ ep, ok := e.epfd2ep[epfd]
+ if !ok {
+
+ return EBADF
+ }
+
+ switch op {
+ case EPOLL_CTL_ADD:
+ // TODO(neeilan): When we make epfds and fds disjoint, detect epoll
+ // loops here (instances watching each other) and return ELOOP.
+ if _, ok := ep.fds[fd]; ok {
+ return EEXIST
+ }
+ ep.fds[fd] = event
+ case EPOLL_CTL_MOD:
+ if _, ok := ep.fds[fd]; !ok {
+ return ENOENT
+ }
+ ep.fds[fd] = event
+ case EPOLL_CTL_DEL:
+ if _, ok := ep.fds[fd]; !ok {
+ return ENOENT
+ }
+ delete(ep.fds, fd)
+
+ }
+ return nil
+}
+
+// Must be called while holding ep.mu
+func (ep *eventPoll) getFds() []int {
+ fds := make([]int, len(ep.fds))
+ for fd := range ep.fds {
+ fds = append(fds, fd)
+ }
+ return fds
+}
+
+func (e *epollImpl) epollwait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ e.mu.Lock() // in [rare] case of concurrent epollcreate + epollwait
+ ep, ok := e.epfd2ep[epfd]
+
+ if !ok {
+ e.mu.Unlock()
+ return 0, EBADF
+ }
+
+ pollfds := make([]PollFd, 4)
+ for fd, epollevt := range ep.fds {
+ pollfds = append(pollfds, PollFd{Fd: int32(fd), Events: epToPollEvt(epollevt.Events)})
+ }
+ e.mu.Unlock()
+
+ n, err = Poll(pollfds, msec)
+ if err != nil {
+ return n, err
+ }
+
+ i := 0
+ for _, pFd := range pollfds {
+ if pFd.Revents != 0 {
+ events[i] = EpollEvent{Fd: pFd.Fd, Events: pToEpollEvt(pFd.Revents)}
+ i++
+ }
+
+ if i == n {
+ break
+ }
+ }
+
+ return n, nil
+}
+
+func EpollCreate(size int) (fd int, err error) {
+ return impl.epollcreate(size)
+}
+
+func EpollCreate1(flag int) (fd int, err error) {
+ return impl.epollcreate1(flag)
+}
+
+func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ return impl.epollctl(epfd, op, fd, event)
+}
+
+// Because EpollWait mutates events, the caller is expected to coordinate
+// concurrent access if calling with the same epfd from multiple goroutines.
+func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ return impl.epollwait(epfd, events, msec)
+}
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_386.go b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
index c56bc8b..761db66 100644
--- a/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
@@ -8,6 +8,7 @@
package unix
const (
+ DLT_HHDLC = 0x79
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
@@ -210,13 +211,18 @@ const (
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
+ IPV6_MIN_MEMBERSHIPS = 0x1f
IP_FAITH = 0x16
+ IP_MAX_SOURCE_FILTER = 0x400
+ IP_MIN_MEMBERSHIPS = 0x1f
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
+ RT_CACHING_CONTEXT = 0x1
+ RT_NORTREF = 0x2
SIOCADDRT = 0x8030720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8030720b
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
index 3e97711..070f44b 100644
--- a/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
@@ -8,6 +8,7 @@
package unix
const (
+ DLT_HHDLC = 0x79
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
@@ -210,13 +211,18 @@ const (
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
+ IPV6_MIN_MEMBERSHIPS = 0x1f
IP_FAITH = 0x16
+ IP_MAX_SOURCE_FILTER = 0x400
+ IP_MIN_MEMBERSHIPS = 0x1f
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
+ RT_CACHING_CONTEXT = 0x1
+ RT_NORTREF = 0x2
SIOCADDRT = 0x8040720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8040720b
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
new file mode 100644
index 0000000..946dcf3
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
@@ -0,0 +1,17 @@
+// Copyright 2020 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.
+
+// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
+// them here for backwards compatibility.
+
+package unix
+
+const (
+ DLT_HHDLC = 0x79
+ IPV6_MIN_MEMBERSHIPS = 0x1f
+ IP_MAX_SOURCE_FILTER = 0x400
+ IP_MIN_MEMBERSHIPS = 0x1f
+ RT_CACHING_CONTEXT = 0x1
+ RT_NORTREF = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/fcntl.go b/vendor/golang.org/x/sys/unix/fcntl.go
index 4dc5348..e9b9912 100644
--- a/vendor/golang.org/x/sys/unix/fcntl.go
+++ b/vendor/golang.org/x/sys/unix/fcntl.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build dragonfly || freebsd || linux || netbsd || openbsd
// +build dragonfly freebsd linux netbsd openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/fcntl_darwin.go b/vendor/golang.org/x/sys/unix/fcntl_darwin.go
index 5868a4a..a9911c7 100644
--- a/vendor/golang.org/x/sys/unix/fcntl_darwin.go
+++ b/vendor/golang.org/x/sys/unix/fcntl_darwin.go
@@ -16,3 +16,9 @@ func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
return err
}
+
+// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
+func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
+ _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
+ return err
+}
diff --git a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
index fc0e50e..29d4480 100644
--- a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
+++ b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
@@ -1,9 +1,10 @@
-// +build linux,386 linux,arm linux,mips linux,mipsle
-
// Copyright 2014 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 && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
+// +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc
+
package unix
func init() {
diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go
index b27be0a..a8068f9 100644
--- a/vendor/golang.org/x/sys/unix/fdset.go
+++ b/vendor/golang.org/x/sys/unix/fdset.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/vendor/golang.org/x/sys/unix/fstatfs_zos.go
new file mode 100644
index 0000000..e377cc9
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/fstatfs_zos.go
@@ -0,0 +1,164 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "unsafe"
+)
+
+// This file simulates fstatfs on z/OS using fstatvfs and w_getmntent.
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ var stat_v Statvfs_t
+ err = Fstatvfs(fd, &stat_v)
+ if err == nil {
+ // populate stat
+ stat.Type = 0
+ stat.Bsize = stat_v.Bsize
+ stat.Blocks = stat_v.Blocks
+ stat.Bfree = stat_v.Bfree
+ stat.Bavail = stat_v.Bavail
+ stat.Files = stat_v.Files
+ stat.Ffree = stat_v.Ffree
+ stat.Fsid = stat_v.Fsid
+ stat.Namelen = stat_v.Namemax
+ stat.Frsize = stat_v.Frsize
+ stat.Flags = stat_v.Flag
+ for passn := 0; passn < 5; passn++ {
+ switch passn {
+ case 0:
+ err = tryGetmntent64(stat)
+ break
+ case 1:
+ err = tryGetmntent128(stat)
+ break
+ case 2:
+ err = tryGetmntent256(stat)
+ break
+ case 3:
+ err = tryGetmntent512(stat)
+ break
+ case 4:
+ err = tryGetmntent1024(stat)
+ break
+ default:
+ break
+ }
+ //proceed to return if: err is nil (found), err is nonnil but not ERANGE (another error occurred)
+ if err == nil || err != nil && err != ERANGE {
+ break
+ }
+ }
+ }
+ return err
+}
+
+func tryGetmntent64(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [64]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent128(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [128]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent256(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [256]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent512(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [512]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent1024(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [1024]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
index cd6f5a6..0dee232 100644
--- a/vendor/golang.org/x/sys/unix/gccgo.go
+++ b/vendor/golang.org/x/sys/unix/gccgo.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build gccgo
-// +build !aix
+//go:build gccgo && !aix
+// +build gccgo,!aix
package unix
@@ -12,10 +12,8 @@ import "syscall"
// We can't use the gc-syntax .s files for gccgo. On the plus side
// much of the functionality can be written directly in Go.
-//extern gccgoRealSyscallNoError
func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
-//extern gccgoRealSyscall
func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c
index c44730c..2cb1fef 100644
--- a/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ b/vendor/golang.org/x/sys/unix/gccgo_c.c
@@ -21,6 +21,9 @@ struct ret {
uintptr_t err;
};
+struct ret gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
+ __asm__(GOSYM_PREFIX GOPKGPATH ".realSyscall");
+
struct ret
gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
{
@@ -32,6 +35,9 @@ gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintp
return r;
}
+uintptr_t gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
+ __asm__(GOSYM_PREFIX GOPKGPATH ".realSyscallNoError");
+
uintptr_t
gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
{
diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
index 251a977..e60e49a 100644
--- a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build gccgo && linux && amd64
// +build gccgo,linux,amd64
package unix
diff --git a/vendor/golang.org/x/sys/unix/ifreq_linux.go b/vendor/golang.org/x/sys/unix/ifreq_linux.go
new file mode 100644
index 0000000..934af31
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ifreq_linux.go
@@ -0,0 +1,149 @@
+// 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 (
+ "bytes"
+ "unsafe"
+)
+
+// Helpers for dealing with ifreq since it contains a union and thus requires a
+// lot of unsafe.Pointer casts to use properly.
+
+// An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq
+// contains an interface name and a union of arbitrary data which can be
+// accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq
+// function.
+//
+// Use the Name method to access the stored interface name. The union data
+// fields can be get and set using the following methods:
+// - Uint16/SetUint16: flags
+// - Uint32/SetUint32: ifindex, metric, mtu
+type Ifreq struct{ raw ifreq }
+
+// NewIfreq creates an Ifreq with the input network interface name after
+// validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)
+// bytes.
+func NewIfreq(name string) (*Ifreq, error) {
+ // Leave room for terminating NULL byte.
+ if len(name) >= IFNAMSIZ {
+ return nil, EINVAL
+ }
+
+ var ifr ifreq
+ copy(ifr.Ifrn[:], name)
+
+ return &Ifreq{raw: ifr}, nil
+}
+
+// TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc.
+
+// Name returns the interface name associated with the Ifreq.
+func (ifr *Ifreq) Name() string {
+ // BytePtrToString requires a NULL terminator or the program may crash. If
+ // one is not present, just return the empty string.
+ if !bytes.Contains(ifr.raw.Ifrn[:], []byte{0x00}) {
+ return ""
+ }
+
+ return BytePtrToString(&ifr.raw.Ifrn[0])
+}
+
+// According to netdevice(7), only AF_INET addresses are returned for numerous
+// sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port
+// field and other data is always empty.
+
+// Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C
+// in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not
+// AF_INET, an error is returned.
+func (ifr *Ifreq) Inet4Addr() ([]byte, error) {
+ raw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]))
+ if raw.Family != AF_INET {
+ // Cannot safely interpret raw.Addr bytes as an IPv4 address.
+ return nil, EINVAL
+ }
+
+ return raw.Addr[:], nil
+}
+
+// SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an
+// embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length
+// or an error will be returned.
+func (ifr *Ifreq) SetInet4Addr(v []byte) error {
+ if len(v) != 4 {
+ return EINVAL
+ }
+
+ var addr [4]byte
+ copy(addr[:], v)
+
+ ifr.clear()
+ *(*RawSockaddrInet4)(
+ unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]),
+ ) = RawSockaddrInet4{
+ // Always set IP family as ioctls would require it anyway.
+ Family: AF_INET,
+ Addr: addr,
+ }
+
+ return nil
+}
+
+// Uint16 returns the Ifreq union data as a C short/Go uint16 value.
+func (ifr *Ifreq) Uint16() uint16 {
+ return *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0]))
+}
+
+// SetUint16 sets a C short/Go uint16 value as the Ifreq's union data.
+func (ifr *Ifreq) SetUint16(v uint16) {
+ ifr.clear()
+ *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v
+}
+
+// Uint32 returns the Ifreq union data as a C int/Go uint32 value.
+func (ifr *Ifreq) Uint32() uint32 {
+ return *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0]))
+}
+
+// SetUint32 sets a C int/Go uint32 value as the Ifreq's union data.
+func (ifr *Ifreq) SetUint32(v uint32) {
+ ifr.clear()
+ *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v
+}
+
+// clear zeroes the ifreq's union field to prevent trailing garbage data from
+// being sent to the kernel if an ifreq is reused.
+func (ifr *Ifreq) clear() {
+ for i := range ifr.raw.Ifru {
+ ifr.raw.Ifru[i] = 0
+ }
+}
+
+// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
+// IoctlGetEthtoolDrvinfo which use these APIs under the hood.
+
+// An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData,
+// use the Ifreq.withData method.
+type ifreqData struct {
+ name [IFNAMSIZ]byte
+ // A type separate from ifreq is required in order to comply with the
+ // unsafe.Pointer rules since the "pointer-ness" of data would not be
+ // preserved if it were cast into the byte array of a raw ifreq.
+ data unsafe.Pointer
+ // Pad to the same size as ifreq.
+ _ [len(ifreq{}.Ifru) - SizeofPtr]byte
+}
+
+// withData produces an ifreqData with the pointer p set for ioctls which require
+// arbitrary pointer data.
+func (ifr Ifreq) withData(p unsafe.Pointer) ifreqData {
+ return ifreqData{
+ name: ifr.raw.Ifrn,
+ data: p,
+ }
+}
diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go
index 3559e5d..6c7ad05 100644
--- a/vendor/golang.org/x/sys/unix/ioctl.go
+++ b/vendor/golang.org/x/sys/unix/ioctl.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
@@ -20,6 +21,15 @@ func IoctlSetInt(fd int, req uint, value int) error {
return ioctl(fd, req, uintptr(value))
}
+// IoctlSetPointerInt performs an ioctl operation which sets an
+// integer value on fd, using the specified request number. The ioctl
+// argument is called with a pointer to the integer value, rather than
+// passing the integer value directly.
+func IoctlSetPointerInt(fd int, req uint, value int) error {
+ v := int32(value)
+ return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
+}
+
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
//
// To change fd's window size, the req argument should be TIOCSWINSZ.
diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go
new file mode 100644
index 0000000..1dadead
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go
@@ -0,0 +1,196 @@
+// 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 unix
+
+import (
+ "unsafe"
+)
+
+// IoctlRetInt performs an ioctl operation specified by req on a device
+// associated with opened file descriptor fd, and returns a non-negative
+// integer that is returned by the ioctl syscall.
+func IoctlRetInt(fd int, req uint) (int, error) {
+ ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(ret), nil
+}
+
+func IoctlGetUint32(fd int, req uint) (uint32, error) {
+ var value uint32
+ err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+ return value, err
+}
+
+func IoctlGetRTCTime(fd int) (*RTCTime, error) {
+ var value RTCTime
+ err := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value))
+ return &value, err
+}
+
+func IoctlSetRTCTime(fd int, value *RTCTime) error {
+ return ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value))
+}
+
+func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
+ var value RTCWkAlrm
+ err := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value))
+ return &value, err
+}
+
+func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
+ return ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value))
+}
+
+// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
+// device specified by ifname.
+func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
+ ifr, err := NewIfreq(ifname)
+ if err != nil {
+ return nil, err
+ }
+
+ value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}
+ ifrd := ifr.withData(unsafe.Pointer(&value))
+
+ err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
+ return &value, err
+}
+
+// IoctlGetWatchdogInfo fetches information about a watchdog device from the
+// Linux watchdog API. For more information, see:
+// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
+func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
+ var value WatchdogInfo
+ err := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value))
+ return &value, err
+}
+
+// IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For
+// more information, see:
+// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
+func IoctlWatchdogKeepalive(fd int) error {
+ // arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr.
+ return ioctl(fd, WDIOC_KEEPALIVE, 0)
+}
+
+// IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the
+// range of data conveyed in value to the file associated with the file
+// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
+func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
+ return ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value))
+}
+
+// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
+// associated with the file description srcFd to the file associated with the
+// file descriptor destFd. See the ioctl_ficlone(2) man page for details.
+func IoctlFileClone(destFd, srcFd int) error {
+ return ioctl(destFd, FICLONE, uintptr(srcFd))
+}
+
+type FileDedupeRange struct {
+ Src_offset uint64
+ Src_length uint64
+ Reserved1 uint16
+ Reserved2 uint32
+ Info []FileDedupeRangeInfo
+}
+
+type FileDedupeRangeInfo struct {
+ Dest_fd int64
+ Dest_offset uint64
+ Bytes_deduped uint64
+ Status int32
+ Reserved uint32
+}
+
+// IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the
+// range of data conveyed in value from the file associated with the file
+// descriptor srcFd to the value.Info destinations. See the
+// ioctl_fideduperange(2) man page for details.
+func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
+ buf := make([]byte, SizeofRawFileDedupeRange+
+ len(value.Info)*SizeofRawFileDedupeRangeInfo)
+ rawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0]))
+ rawrange.Src_offset = value.Src_offset
+ rawrange.Src_length = value.Src_length
+ rawrange.Dest_count = uint16(len(value.Info))
+ rawrange.Reserved1 = value.Reserved1
+ rawrange.Reserved2 = value.Reserved2
+
+ for i := range value.Info {
+ rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
+ uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
+ uintptr(i*SizeofRawFileDedupeRangeInfo)))
+ rawinfo.Dest_fd = value.Info[i].Dest_fd
+ rawinfo.Dest_offset = value.Info[i].Dest_offset
+ rawinfo.Bytes_deduped = value.Info[i].Bytes_deduped
+ rawinfo.Status = value.Info[i].Status
+ rawinfo.Reserved = value.Info[i].Reserved
+ }
+
+ err := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0]))
+
+ // Output
+ for i := range value.Info {
+ rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
+ uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
+ uintptr(i*SizeofRawFileDedupeRangeInfo)))
+ value.Info[i].Dest_fd = rawinfo.Dest_fd
+ value.Info[i].Dest_offset = rawinfo.Dest_offset
+ value.Info[i].Bytes_deduped = rawinfo.Bytes_deduped
+ value.Info[i].Status = rawinfo.Status
+ value.Info[i].Reserved = rawinfo.Reserved
+ }
+
+ return err
+}
+
+func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
+ return ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value))
+}
+
+func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
+ var value HIDRawDevInfo
+ err := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value))
+ return &value, err
+}
+
+func IoctlHIDGetRawName(fd int) (string, error) {
+ var value [_HIDIOCGRAWNAME_LEN]byte
+ err := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0]))
+ return ByteSliceToString(value[:]), err
+}
+
+func IoctlHIDGetRawPhys(fd int) (string, error) {
+ var value [_HIDIOCGRAWPHYS_LEN]byte
+ err := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0]))
+ return ByteSliceToString(value[:]), err
+}
+
+func IoctlHIDGetRawUniq(fd int) (string, error) {
+ var value [_HIDIOCGRAWUNIQ_LEN]byte
+ err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))
+ return ByteSliceToString(value[:]), err
+}
+
+// IoctlIfreq performs an ioctl using an Ifreq structure for input and/or
+// output. See the netdevice(7) man page for details.
+func IoctlIfreq(fd int, req uint, value *Ifreq) error {
+ // It is possible we will add more fields to *Ifreq itself later to prevent
+ // misuse, so pass the raw *ifreq directly.
+ return ioctlPtr(fd, req, unsafe.Pointer(&value.raw))
+}
+
+// TODO(mdlayher): export if and when IfreqData is exported.
+
+// ioctlIfreqData performs an ioctl using an ifreqData structure for input
+// and/or output. See the netdevice(7) man page for details.
+func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
+ // The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are
+ // identical so pass *IfreqData directly.
+ return ioctlPtr(fd, req, unsafe.Pointer(value))
+}
diff --git a/vendor/golang.org/x/sys/unix/ioctl_zos.go b/vendor/golang.org/x/sys/unix/ioctl_zos.go
new file mode 100644
index 0000000..5384e7d
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ioctl_zos.go
@@ -0,0 +1,74 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
+//
+// To change fd's window size, the req argument should be TIOCSWINSZ.
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ // TODO: if we get the chance, remove the req parameter and
+ // hardcode TIOCSWINSZ.
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
+}
+
+// IoctlSetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value is expected to be TCSETS, TCSETSW, or TCSETSF
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
+ return ENOSYS
+ }
+ err := Tcsetattr(fd, int(req), value)
+ runtime.KeepAlive(value)
+ return err
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+//
+// A few ioctl requests use the return value as an output parameter;
+// for those, IoctlRetInt should be used instead of this function.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+// IoctlGetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value is expected to be TCGETS
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ if req != TCGETS {
+ return &value, ENOSYS
+ }
+ err := Tcgetattr(fd, &value)
+ return &value, err
+}
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index fa0c69b..ee73623 100644
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
# Use the Docker-based build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
$cmd docker build --tag generate:$GOOS $GOOS
- $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
+ $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
exit
fi
@@ -70,29 +70,13 @@ aix_ppc64)
mksyscall="go run mksyscall_aix_ppc64.go -aix"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="go run mksyscall.go -l32"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- mkasm="go run mkasm_darwin.go"
- ;;
darwin_amd64)
mkerrors="$mkerrors -m64"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- mkasm="go run mkasm_darwin.go"
- ;;
-darwin_arm)
- mkerrors="$mkerrors"
- mksyscall="go run mksyscall.go -l32"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go"
;;
darwin_arm64)
mkerrors="$mkerrors -m64"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go"
;;
@@ -124,7 +108,7 @@ freebsd_arm)
freebsd_arm64)
mkerrors="$mkerrors -m64"
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
netbsd_386)
mkerrors="$mkerrors -m32"
@@ -184,12 +168,27 @@ openbsd_arm64)
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
+openbsd_mips64)
+ mkerrors="$mkerrors -m64"
+ mksyscall="go run mksyscall.go -openbsd"
+ mksysctl="go run mksysctl_openbsd.go"
+ mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
+ # Let the type of C char be signed for making the bare syscall
+ # API consistent across platforms.
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+ ;;
solaris_amd64)
mksyscall="go run mksyscall_solaris.go"
mkerrors="$mkerrors -m64"
mksysnum=
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
+illumos_amd64)
+ mksyscall="go run mksyscall_solaris.go"
+ mkerrors=
+ mksysnum=
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ ;;
*)
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
exit 1
@@ -211,12 +210,15 @@ esac
# aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
elif [ "$GOOS" == "darwin" ]; then
- # pre-1.12, direct syscalls
- echo "$mksyscall -tags $GOOS,$GOARCH,!go1.12 $syscall_goos syscall_darwin_${GOARCH}.1_11.go $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.1_11.go";
# 1.12 and later, syscalls via libSystem
echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
# 1.13 and later, syscalls via libSystem (including syscallPtr)
echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
+ elif [ "$GOOS" == "illumos" ]; then
+ # illumos code generation requires a --illumos switch
+ echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
+ # illumos implies solaris, so solaris code generation is also required
+ echo "$mksyscall -tags solaris,$GOARCH syscall_solaris.go syscall_solaris_$GOARCH.go |gofmt >zsyscall_solaris_$GOARCH.go";
else
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
fi
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 6ffac92..a47b035 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -54,22 +54,28 @@ 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>
#include <sys/attr.h>
+#include <sys/clonefile.h>
+#include <sys/kern_control.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/ptrace.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <sys/sockio.h>
+#include <sys/sys_domain.h>
#include <sys/sysctl.h>
#include <sys/mman.h>
#include <sys/mount.h>
#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>
@@ -77,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='
@@ -93,6 +102,7 @@ includes_DragonFly='
#include <sys/ioctl.h>
#include <net/bpf.h>
#include <net/if.h>
+#include <net/if_clone.h>
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>
@@ -105,9 +115,12 @@ includes_FreeBSD='
#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/types.h>
+#include <sys/disk.h>
#include <sys/event.h>
+#include <sys/sched.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <sys/sockio.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
@@ -186,22 +199,28 @@ struct ltchars {
#include <sys/select.h>
#include <sys/signalfd.h>
#include <sys/socket.h>
+#include <sys/timerfd.h>
#include <sys/uio.h>
#include <sys/xattr.h>
#include <linux/bpf.h>
#include <linux/can.h>
+#include <linux/can/error.h>
+#include <linux/can/raw.h>
#include <linux/capability.h>
#include <linux/cryptouser.h>
#include <linux/devlink.h>
+#include <linux/dm-ioctl.h>
#include <linux/errqueue.h>
+#include <linux/ethtool_netlink.h>
#include <linux/falloc.h>
#include <linux/fanotify.h>
#include <linux/filter.h>
#include <linux/fs.h>
#include <linux/fscrypt.h>
+#include <linux/fsverity.h>
#include <linux/genetlink.h>
#include <linux/hdreg.h>
-#include <linux/icmpv6.h>
+#include <linux/hidraw.h>
#include <linux/if.h>
#include <linux/if_addr.h>
#include <linux/if_alg.h>
@@ -211,17 +230,23 @@ struct ltchars {
#include <linux/if_tun.h>
#include <linux/if_packet.h>
#include <linux/if_xdp.h>
+#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>
#include <linux/memfd.h>
#include <linux/module.h>
+#include <linux/mount.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netlink.h>
#include <linux/net_namespace.h>
+#include <linux/nfc.h>
#include <linux/nsfs.h>
#include <linux/perf_event.h>
+#include <linux/pps.h>
#include <linux/ptrace.h>
#include <linux/random.h>
#include <linux/reboot.h>
@@ -236,8 +261,10 @@ struct ltchars {
#include <linux/vm_sockets.h>
#include <linux/wait.h>
#include <linux/watchdog.h>
+#include <linux/wireguard.h>
#include <mtd/ubi-user.h>
+#include <mtd/mtd-user.h>
#include <net/route.h>
#if defined(__sparc__)
@@ -280,6 +307,22 @@ struct ltchars {
// for the tipc_subscr timeout __u32 field.
#undef TIPC_WAIT_FOREVER
#define TIPC_WAIT_FOREVER 0xffffffff
+
+// Copied from linux/l2tp.h
+// Including linux/l2tp.h here causes conflicts between linux/in.h
+// and netinet/in.h included via net/route.h above.
+#define IPPROTO_L2TP 115
+
+// Copied from linux/hid.h.
+// Keep in sync with the size of the referenced fields.
+#define _HIDIOCGRAWNAME_LEN 128 // sizeof_field(struct hid_device, name)
+#define _HIDIOCGRAWPHYS_LEN 64 // sizeof_field(struct hid_device, phys)
+#define _HIDIOCGRAWUNIQ_LEN 64 // sizeof_field(struct hid_device, uniq)
+
+#define _HIDIOCGRAWNAME HIDIOCGRAWNAME(_HIDIOCGRAWNAME_LEN)
+#define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN)
+#define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN)
+
'
includes_NetBSD='
@@ -289,6 +332,7 @@ includes_NetBSD='
#include <sys/extattr.h>
#include <sys/mman.h>
#include <sys/mount.h>
+#include <sys/sched.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -317,6 +361,7 @@ includes_OpenBSD='
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/select.h>
+#include <sys/sched.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
@@ -357,6 +402,7 @@ includes_SunOS='
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
+#include <sys/stream.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
@@ -366,10 +412,11 @@ includes_SunOS='
#include <net/if_arp.h>
#include <net/if_types.h>
#include <net/route.h>
+#include <netinet/icmp6.h>
#include <netinet/in.h>
-#include <termios.h>
#include <netinet/ip.h>
#include <netinet/ip_mroute.h>
+#include <termios.h>
'
@@ -424,6 +471,7 @@ ccflags="$@"
$2 !~ /^EPROC_/ &&
$2 !~ /^EQUIV_/ &&
$2 !~ /^EXPR_/ &&
+ $2 !~ /^EVIOC/ &&
$2 ~ /^E[A-Z0-9_]+$/ ||
$2 ~ /^B[0-9_]+$/ ||
$2 ~ /^(OLD|NEW)DEV$/ ||
@@ -455,13 +503,17 @@ 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)_/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
+ $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
+ $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
+ $2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
+ $2 ~ /^RAW_PAYLOAD_/ ||
$2 ~ /^TP_STATUS_/ ||
$2 ~ /^FALLOC_/ ||
- $2 == "ICMPV6_FILTER" ||
+ $2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
@@ -470,24 +522,27 @@ ccflags="$@"
$2 ~ /^HW_MACHINE$/ ||
$2 ~ /^SYSCTL_VERS/ ||
$2 !~ "MNT_BITS" &&
- $2 ~ /^(MS|MNT|UMOUNT)_/ ||
+ $2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
$2 ~ /^NS_GET_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
+ $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
$2 ~ /^KEXEC_/ ||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
$2 ~ /^MODULE_INIT_/ ||
$2 !~ "NLA_TYPE_MASK" &&
+ $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
+ $2 ~ /^FIORDCHK$/ ||
$2 ~ /^SIOC/ ||
$2 ~ /^TIOC/ ||
$2 ~ /^TCGET/ ||
$2 ~ /^TCSET/ ||
$2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
$2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
+ $2 ~ /^(IFF|IFT|NET_RT|RTM(GRP)?|RTF|RTV|RTA|RTAX)_/ ||
$2 ~ /^BIOC/ ||
+ $2 ~ /^DIOC/ ||
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
@@ -497,16 +552,23 @@ ccflags="$@"
$2 ~ /^(CLOCK|TIMER)_/ ||
$2 ~ /^CAN_/ ||
$2 ~ /^CAP_/ ||
+ $2 ~ /^CP_/ ||
+ $2 ~ /^CPUSTATES$/ ||
+ $2 ~ /^CTLIOCGINFO$/ ||
$2 ~ /^ALG_/ ||
+ $2 ~ /^FI(CLONE|DEDUPERANGE)/ ||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||
- $2 ~ /^FS_IOC_.*ENCRYPTION/ ||
+ $2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|[GS]ETFLAGS)/ ||
+ $2 ~ /^FS_VERITY_/ ||
$2 ~ /^FSCRYPT_/ ||
+ $2 ~ /^DM_/ ||
$2 ~ /^GRND_/ ||
$2 ~ /^RND/ ||
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
$2 ~ /^KEYCTL_/ ||
- $2 ~ /^PERF_EVENT_IOC_/ ||
+ $2 ~ /^PERF_/ ||
$2 ~ /^SECCOMP_MODE_/ ||
+ $2 ~ /^SEEK_/ ||
$2 ~ /^SPLICE_/ ||
$2 ~ /^SYNC_FILE_RANGE_/ ||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
@@ -524,18 +586,28 @@ ccflags="$@"
$2 ~ /^XATTR_(CREATE|REPLACE|NO(DEFAULT|FOLLOW|SECURITY)|SHOWCOMPRESSION)/ ||
$2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||
$2 ~ /^FSOPT_/ ||
- $2 ~ /^WDIOC_/ ||
+ $2 ~ /^WDIO[CFS]_/ ||
$2 ~ /^NFN/ ||
$2 ~ /^XDP_/ ||
$2 ~ /^RWF_/ ||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
$2 ~ /^CRYPTO_/ ||
$2 ~ /^TIPC_/ ||
+ $2 !~ "DEVLINK_RELOAD_LIMITS_VALID_MASK" &&
$2 ~ /^DEVLINK_/ ||
+ $2 ~ /^ETHTOOL_/ ||
+ $2 ~ /^LWTUNNEL_IP/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
$2 ~/^PPPIOC/ ||
$2 ~ /^FAN_|FANOTIFY_/ ||
+ $2 == "HID_MAX_DESCRIPTOR_SIZE" ||
+ $2 ~ /^_?HIDIOC/ ||
+ $2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
+ $2 ~ /^MTD/ ||
+ $2 ~ /^OTP/ ||
+ $2 ~ /^MEM/ ||
+ $2 ~ /^WG/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@@ -573,6 +645,7 @@ echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
echo '// mkerrors.sh' "$@"
echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
echo
+echo "//go:build ${GOARCH} && ${GOOS}"
echo "// +build ${GOARCH},${GOOS}"
echo
go tool cgo -godefs -- "$@" _const.go >_error.out
diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go
index bc2f362..53f1b4c 100644
--- a/vendor/golang.org/x/sys/unix/pagesize_unix.go
+++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// For Unix, get the pagesize from the runtime.
diff --git a/vendor/golang.org/x/sys/unix/ptrace_darwin.go b/vendor/golang.org/x/sys/unix/ptrace_darwin.go
new file mode 100644
index 0000000..463c3ef
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ptrace_darwin.go
@@ -0,0 +1,12 @@
+// Copyright 2020 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
+
+func ptrace(request int, pid int, addr uintptr, data uintptr) error {
+ return ptrace1(request, pid, addr, data)
+}
diff --git a/vendor/golang.org/x/sys/unix/ptrace_ios.go b/vendor/golang.org/x/sys/unix/ptrace_ios.go
new file mode 100644
index 0000000..ed0509a
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ptrace_ios.go
@@ -0,0 +1,12 @@
+// Copyright 2020 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 ios
+// +build ios
+
+package unix
+
+func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
+ return ENOTSUP
+}
diff --git a/vendor/golang.org/x/sys/unix/race.go b/vendor/golang.org/x/sys/unix/race.go
index 61712b5..6f6c5fe 100644
--- a/vendor/golang.org/x/sys/unix/race.go
+++ b/vendor/golang.org/x/sys/unix/race.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin && race) || (linux && race) || (freebsd && race)
// +build darwin,race linux,race freebsd,race
package unix
diff --git a/vendor/golang.org/x/sys/unix/race0.go b/vendor/golang.org/x/sys/unix/race0.go
index ad02667..706e132 100644
--- a/vendor/golang.org/x/sys/unix/race0.go
+++ b/vendor/golang.org/x/sys/unix/race0.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
+//go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
+// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos
package unix
diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdents.go b/vendor/golang.org/x/sys/unix/readdirent_getdents.go
index 3a90aa6..4d62575 100644
--- a/vendor/golang.org/x/sys/unix/readdirent_getdents.go
+++ b/vendor/golang.org/x/sys/unix/readdirent_getdents.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
// +build aix dragonfly freebsd linux netbsd openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
index 5fdae40..2a4ba47 100644
--- a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
+++ b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
package unix
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
index 8bf4570..5f63147 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
@@ -34,3 +34,52 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
return &ucred, nil
}
+
+// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
+func PktInfo4(info *Inet4Pktinfo) []byte {
+ b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
+ h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+ h.Level = SOL_IP
+ h.Type = IP_PKTINFO
+ h.SetLen(CmsgLen(SizeofInet4Pktinfo))
+ *(*Inet4Pktinfo)(h.data(0)) = *info
+ return b
+}
+
+// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
+func PktInfo6(info *Inet6Pktinfo) []byte {
+ b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
+ h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+ h.Level = SOL_IPV6
+ h.Type = IPV6_PKTINFO
+ h.SetLen(CmsgLen(SizeofInet6Pktinfo))
+ *(*Inet6Pktinfo)(h.data(0)) = *info
+ return b
+}
+
+// ParseOrigDstAddr decodes a socket control message containing the original
+// destination address. To receive such a message the IP_RECVORIGDSTADDR or
+// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
+func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
+ switch {
+ case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.Addr = pp.Addr
+ return sa, nil
+
+ case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ sa.Addr = pp.Addr
+ return sa, nil
+
+ default:
+ return nil, EINVAL
+ }
+}
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 003916e..453a942 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Socket control messages
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
index 7d08dae..0840fe4 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin freebsd linux netbsd openbsd solaris zos
package unix
@@ -20,7 +21,7 @@ func cmsgAlignOf(salen int) int {
case "aix":
// There is no alignment on AIX.
salign = 1
- case "darwin", "illumos", "solaris":
+ case "darwin", "ios", "illumos", "solaris":
// NOTE: It seems like 64-bit Darwin, Illumos and Solaris
// kernels still require 32-bit aligned access to network
// subsystem.
@@ -32,6 +33,14 @@ func cmsgAlignOf(salen int) int {
if runtime.GOARCH == "arm" {
salign = 8
}
+ // NetBSD aarch64 requires 128-bit alignment.
+ if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
+ salign = 16
+ }
+ case "zos":
+ // z/OS socket macros use [32-bit] sizeof(int) alignment,
+ // not pointer width.
+ salign = SizeofInt
}
return (salen + salign - 1) & ^(salign - 1)
diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go
index 17fb698..8ba89ed 100644
--- a/vendor/golang.org/x/sys/unix/str.go
+++ b/vendor/golang.org/x/sys/unix/str.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index fd4ee8e..649fa87 100644
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/syscall.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Package unix contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
@@ -24,7 +25,13 @@
// holds a value of type syscall.Errno.
package unix // import "golang.org/x/sys/unix"
-import "strings"
+import (
+ "bytes"
+ "strings"
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
+)
// ByteSliceFromString returns a NUL-terminated slice of bytes
// containing the text of s. If s contains a NUL byte at any
@@ -49,5 +56,40 @@ func BytePtrFromString(s string) (*byte, error) {
return &a[0], nil
}
+// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any
+// bytes after the NUL removed.
+func ByteSliceToString(s []byte) string {
+ if i := bytes.IndexByte(s, 0); i != -1 {
+ s = s[:i]
+ }
+ return string(s)
+}
+
+// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.
+// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated
+// at a zero byte; if the zero byte is not present, the program may crash.
+func BytePtrToString(p *byte) string {
+ if p == nil {
+ return ""
+ }
+ if *p == 0 {
+ return ""
+ }
+
+ // Find NUL terminator.
+ n := 0
+ for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {
+ ptr = unsafe.Pointer(uintptr(ptr) + 1)
+ }
+
+ var s []byte
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ h.Data = unsafe.Pointer(p)
+ h.Len = n
+ h.Cap = n
+
+ return string(s)
+}
+
// Single-word zero for use when we need a valid pointer to 0 bytes.
var _zero uintptr
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index 9ad8a0d..4f55c8d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix
// +build aix
// Aix system calls.
@@ -19,6 +20,22 @@ import "unsafe"
* Wrapped
*/
+func Access(path string, mode uint32) (err error) {
+ return Faccessat(AT_FDCWD, path, mode, 0)
+}
+
+func Chmod(path string, mode uint32) (err error) {
+ return Fchmodat(AT_FDCWD, path, mode, 0)
+}
+
+func Chown(path string, uid int, gid int) (err error) {
+ return Fchownat(AT_FDCWD, path, uid, gid, 0)
+}
+
+func Creat(path string, mode uint32) (fd int, err error) {
+ return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
+}
+
//sys utimes(path string, times *[2]Timeval) (err error)
func Utimes(path string, tv []Timeval) error {
if len(tv) != 2 {
@@ -53,9 +70,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
}
@@ -68,9 +83,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
@@ -235,7 +248,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
}
}
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil
@@ -244,9 +257,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -255,9 +266,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, EAFNOSUPPORT
@@ -368,6 +377,11 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
+//sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
+func Fsync(fd int) error {
+ return fsyncRange(fd, O_SYNC, 0, 0)
+}
+
/*
* Direct access
*/
@@ -384,7 +398,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Fdatasync(fd int) (err error)
-//sys Fsync(fd int) (err error)
// readdir_r
//sysnb Getpgid(pid int) (pgid int, err error)
@@ -403,8 +416,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64
-//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
+//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64
+//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
@@ -423,8 +436,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sysnb Times(tms *Tms) (ticks uintptr, err error)
//sysnb Umask(mask int) (oldmask int)
//sysnb Uname(buf *Utsname) (err error)
-//sys Unlink(path string) (err error)
-//sys Unlinkat(dirfd int, path string, flags int) (err error)
+//sys Unlink(path string) (err error)
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys readlen(fd int, p *byte, np int) (n int, err error) = read
@@ -498,7 +511,7 @@ func Munmap(b []byte) (err error) {
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
-//sysnb pipe(p *[2]_C_int) (err error)
+//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
@@ -506,8 +519,10 @@ func Pipe(p []int) (err error) {
}
var pp [2]_C_int
err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
index b3c8e33..e92a0be 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc
+//go:build aix && ppc
+// +build aix,ppc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
index 9a6e024..16eed17 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc64
+//go:build aix && ppc64
+// +build aix,ppc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 68605db..0ce4523 100644
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin || dragonfly || freebsd || netbsd || openbsd
// +build darwin dragonfly freebsd netbsd openbsd
// BSD system call wrappers shared by *BSD based systems
@@ -18,6 +19,21 @@ import (
"unsafe"
)
+const ImplementsGetwd = true
+
+func Getwd() (string, error) {
+ var buf [PathMax]byte
+ _, err := Getcwd(buf[0:])
+ if err != nil {
+ return "", err
+ }
+ n := clen(buf[:])
+ if n < 1 {
+ return "", EINVAL
+ }
+ return string(buf[:n]), nil
+}
+
/*
* Wrapped
*/
@@ -147,9 +163,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
}
@@ -163,9 +177,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
}
@@ -194,9 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Nlen = sa.Nlen
sa.raw.Alen = sa.Alen
sa.raw.Slen = sa.Slen
- for i := 0; i < len(sa.raw.Data); i++ {
- sa.raw.Data[i] = sa.Data[i]
- }
+ sa.raw.Data = sa.Data
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
}
@@ -212,9 +222,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Nlen = pp.Nlen
sa.Alen = pp.Alen
sa.Slen = pp.Slen
- for i := 0; i < len(sa.Data); i++ {
- sa.Data[i] = pp.Data[i]
- }
+ sa.Data = pp.Data
return sa, nil
case AF_UNIX:
@@ -246,9 +254,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -257,12 +263,10 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
- return nil, EAFNOSUPPORT
+ return anyToSockaddrGOOS(fd, rsa)
}
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
@@ -272,7 +276,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
if err != nil {
return
}
- if runtime.GOOS == "darwin" && len == 0 {
+ if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && len == 0 {
// Accepted socket has no address.
// This is likely due to a bug in xnu kernels,
// where instead of ECONNABORTED error socket
@@ -303,7 +307,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
return anyToSockaddr(fd, &rsa)
}
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
// GetsockoptString returns the string value of the socket option opt for the
// socket associated with fd at the given socket level.
@@ -317,8 +321,8 @@ func GetsockoptString(fd, level, opt int) (string, error) {
return string(buf[:vallen-1]), nil
}
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
@@ -527,6 +531,23 @@ func SysctlClockinfo(name string) (*Clockinfo, error) {
return &ci, nil
}
+func SysctlTimeval(name string) (*Timeval, error) {
+ mib, err := sysctlmib(name)
+ if err != nil {
+ return nil, err
+ }
+
+ var tv Timeval
+ n := uintptr(unsafe.Sizeof(tv))
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&tv)), &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n != unsafe.Sizeof(tv) {
+ return nil, EIO
+ }
+ return &tv, nil
+}
+
//sys utimes(path string, timeval *[2]Timeval) (err error)
func Utimes(path string, tv []Timeval) error {
@@ -594,7 +615,7 @@ func Futimes(fd int, tv []Timeval) error {
return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+//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 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
index 6a15cba..b009860 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && go1.12 && !go1.13
// +build darwin,go1.12,!go1.13
package unix
@@ -10,6 +11,8 @@ import (
"unsafe"
)
+const _SYS_GETDIRENTRIES64 = 344
+
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// To implement this using libSystem we'd need syscall_syscallPtr for
// fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
@@ -20,7 +23,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
} else {
p = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
+ r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
n = int(r0)
if e1 != 0 {
return n, errnoErr(e1)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
index f911617..1596426 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
@@ -2,17 +2,22 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && go1.13
// +build darwin,go1.13
package unix
-import "unsafe"
+import (
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
+)
//sys closedir(dir uintptr) (err error)
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
func fdopendir(fd int) (dir uintptr, err error) {
- r0, _, e1 := syscall_syscallPtr(funcPC(libc_fdopendir_trampoline), uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
dir = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -20,9 +25,8 @@ func fdopendir(fd int) (dir uintptr, err error) {
return
}
-func libc_fdopendir_trampoline()
+var libc_fdopendir_trampoline_addr uintptr
-//go:linkname libc_fdopendir libc_fdopendir
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
@@ -71,6 +75,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
cnt++
continue
}
+
reclen := int(entry.Reclen)
if reclen > len(buf) {
// Not enough room. Return for now.
@@ -79,13 +84,15 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// restarting is O(n^2) in the length of the directory. Oh well.
break
}
+
// Copy entry into return buffer.
- s := struct {
- ptr unsafe.Pointer
- siz int
- cap int
- }{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen}
- copy(buf, *(*[]byte)(unsafe.Pointer(&s)))
+ var s []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ hdr.Data = unsafe.Pointer(&entry)
+ hdr.Cap = reclen
+ hdr.Len = reclen
+ copy(buf, s)
+
buf = buf[reclen:]
n += reclen
cnt++
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 9a5a6ee..0eaab91 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -13,29 +13,12 @@
package unix
import (
- "errors"
+ "fmt"
+ "runtime"
"syscall"
"unsafe"
)
-const ImplementsGetwd = true
-
-func Getwd() (string, error) {
- buf := make([]byte, 2048)
- attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
- if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
- wd := string(attrs[0])
- // Sanity check that it's an absolute path and ends
- // in a null byte, which we then strip.
- if wd[0] == '/' && wd[len(wd)-1] == 0 {
- return wd[:len(wd)-1], nil
- }
- }
- // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
- // slow algorithm.
- return "", ENOTSUP
-}
-
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct {
Len uint8
@@ -49,6 +32,72 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+// SockaddrCtl implements the Sockaddr interface for AF_SYSTEM type sockets.
+type SockaddrCtl struct {
+ ID uint32
+ Unit uint32
+ raw RawSockaddrCtl
+}
+
+func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Sc_len = SizeofSockaddrCtl
+ sa.raw.Sc_family = AF_SYSTEM
+ sa.raw.Ss_sysaddr = AF_SYS_CONTROL
+ sa.raw.Sc_id = sa.ID
+ sa.raw.Sc_unit = sa.Unit
+ 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:
+ pp := (*RawSockaddrCtl)(unsafe.Pointer(rsa))
+ if pp.Ss_sysaddr == AF_SYS_CONTROL {
+ sa := new(SockaddrCtl)
+ sa.ID = pp.Sc_id
+ 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
+}
+
+// Some external packages rely on SYS___SYSCTL being defined to implement their
+// own sysctl wrappers. Provide it here, even though direct syscalls are no
+// longer supported on darwin.
+const SYS___SYSCTL = SYS_SYSCTL
+
// Translate "kern.hostname" to []_C_int{0,1,2,3}.
func nametomib(name string) (mib []_C_int, err error) {
const siz = unsafe.Sizeof(mib[0])
@@ -92,11 +141,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-const (
- attrBitMapCount = 5
- attrCmnFullpath = 0x08000000
-)
-
type attrList struct {
bitmapCount uint16
_ uint16
@@ -107,61 +151,18 @@ type attrList struct {
Forkattr uint32
}
-func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
- if len(attrBuf) < 4 {
- return nil, errors.New("attrBuf too small")
- }
- attrList.bitmapCount = attrBitMapCount
-
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
-
- if err := getattrlist(_p0, unsafe.Pointer(&attrList), unsafe.Pointer(&attrBuf[0]), uintptr(len(attrBuf)), int(options)); err != nil {
- return nil, err
- }
- size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
-
- // dat is the section of attrBuf that contains valid data,
- // without the 4 byte length header. All attribute offsets
- // are relative to dat.
- dat := attrBuf
- if int(size) < len(attrBuf) {
- dat = dat[:size]
- }
- dat = dat[4:] // remove length prefix
-
- for i := uint32(0); int(i) < len(dat); {
- header := dat[i:]
- if len(header) < 8 {
- return attrs, errors.New("truncated attribute header")
- }
- datOff := *(*int32)(unsafe.Pointer(&header[0]))
- attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
- if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
- return attrs, errors.New("truncated results; attrBuf too small")
- }
- end := uint32(datOff) + attrLen
- attrs = append(attrs, dat[datOff:end])
- i = end
- if r := i % 4; r != 0 {
- i += (4 - r)
- }
- }
- return
-}
-
-//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
-
-//sysnb pipe() (r int, w int, err error)
+//sysnb pipe(p *[2]int32) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
- p[0], p[1], err = pipe()
+ var x [2]int32
+ err = pipe(&x)
+ if err == nil {
+ p[0] = int(x[0])
+ p[1] = int(x[1])
+ }
return
}
@@ -305,7 +306,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
options)
}
-//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
+//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
// Darwin doesn't support SYS_UTIMENSAT
@@ -324,7 +325,36 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
+func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error {
+ err := ioctl(fd, CTLIOCGINFO, uintptr(unsafe.Pointer(ctlInfo)))
+ runtime.KeepAlive(ctlInfo)
+ return err
+}
+
+// IfreqMTU is struct ifreq used to get or set a network device's MTU.
+type IfreqMTU struct {
+ Name [IFNAMSIZ]byte
+ MTU int32
+}
+
+// IoctlGetIfreqMTU performs the SIOCGIFMTU ioctl operation on fd to get the MTU
+// of the network device specified by ifname.
+func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) {
+ var ifreq IfreqMTU
+ copy(ifreq.Name[:], ifname)
+ err := ioctl(fd, SIOCGIFMTU, uintptr(unsafe.Pointer(&ifreq)))
+ return &ifreq, err
+}
+
+// IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU
+// of the network device specified by ifreq.Name.
+func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
+ err := ioctl(fd, SIOCSIFMTU, uintptr(unsafe.Pointer(ifreq)))
+ runtime.KeepAlive(ifreq)
+ return err
+}
+
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
@@ -382,8 +412,82 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return
}
+func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
+ var value IPMreqn
+ vallen := _Socklen(SizeofIPMreqn)
+ errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, errno
+}
+
+func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
+}
+
+// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.
+// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
+func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
+ x := new(Xucred)
+ vallen := _Socklen(SizeofXucred)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)
+ return x, err
+}
+
+func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
+ mib, err := sysctlmib(name, args...)
+ if err != nil {
+ return nil, err
+ }
+
+ var kinfo KinfoProc
+ n := uintptr(SizeofKinfoProc)
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n != SizeofKinfoProc {
+ return nil, EIO
+ }
+ return &kinfo, nil
+}
+
+func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
+ mib, err := sysctlmib(name, args...)
+ if err != nil {
+ return nil, err
+ }
+
+ // Find size.
+ n := uintptr(0)
+ if err := sysctl(mib, nil, &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n == 0 {
+ return nil, nil
+ }
+ if n%SizeofKinfoProc != 0 {
+ return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
+ }
+
+ // Read into buffer of that size.
+ buf := make([]KinfoProc, n/SizeofKinfoProc)
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n%SizeofKinfoProc != 0 {
+ return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
+ }
+
+ // The actual call may return less than the original reported required
+ // size so ensure we deal with that.
+ return buf[:n/SizeofKinfoProc], nil
+}
+
//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
*/
@@ -396,6 +500,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error)
+//sys Clonefile(src string, dst string, flags int) (err error)
+//sys Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error)
//sys Dup(fd int) (nfd int, err error)
//sys Dup2(from int, to int) (err error)
//sys Exchangedata(path1 string, path2 string, options int) (err error)
@@ -407,10 +513,12 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
+//sys Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error)
//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fsync(fd int) (err error)
//sys Ftruncate(fd int, length int64) (err error)
+//sys Getcwd(buf []byte) (n int, err error)
//sys Getdtablesize() (size int)
//sysnb Getegid() (egid int)
//sysnb Geteuid() (uid int)
@@ -423,6 +531,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
//sysnb Getrusage(who int, rusage *Rusage) (err error)
//sysnb Getsid(pid int) (sid int, err error)
+//sysnb Gettimeofday(tp *Timeval) (err error)
//sysnb Getuid() (uid int)
//sysnb Issetugid() (tainted bool)
//sys Kqueue() (fd int, err error)
@@ -471,8 +580,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
+//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
@@ -536,10 +645,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
// Msgget
// Msgsnd
// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
// Shm_open
// Shm_unlink
// Sem_open
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
deleted file mode 100644
index 6b223f9..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2019 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.
-
-// +build darwin,386,!go1.12
-
-package unix
-
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
deleted file mode 100644
index 707ba4f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2009 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.
-
-// +build 386,darwin
-
-package unix
-
-import (
- "syscall"
-)
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-
-func setTimespec(sec, nsec int64) Timespec {
- return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
-}
-
-func setTimeval(sec, usec int64) Timeval {
- return Timeval{Sec: int32(sec), Usec: int32(usec)}
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (msghdr *Msghdr) SetIovlen(length int) {
- msghdr.Iovlen = int32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/386 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
-//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
deleted file mode 100644
index 68ebd6f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2019 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.
-
-// +build darwin,amd64,!go1.12
-
-package unix
-
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
index fdbfb59..b37310c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
@@ -2,15 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && darwin
// +build amd64,darwin
package unix
-import (
- "syscall"
-)
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
+import "syscall"
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
@@ -20,17 +17,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: int32(usec)}
}
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
@@ -55,14 +41,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
deleted file mode 100644
index 0e3f25a..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2019 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.
-
-// +build darwin,arm,!go1.12
-
-package unix
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return 0, ENOSYS
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
deleted file mode 100644
index f8bc4cf..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 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 unix
-
-import (
- "syscall"
-)
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) error {
- return ENOTSUP
-}
-
-func setTimespec(sec, nsec int64) Timespec {
- return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
-}
-
-func setTimeval(sec, usec int64) Timeval {
- return Timeval{Sec: int32(sec), Usec: int32(usec)}
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (msghdr *Msghdr) SetIovlen(length int) {
- msghdr.Iovlen = int32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
deleted file mode 100644
index 01d4504..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2019 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.
-
-// +build darwin,arm64,!go1.12
-
-package unix
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return 0, ENOSYS
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
index 5ede3ac..d51ec99 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
@@ -2,17 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && darwin
// +build arm64,darwin
package unix
-import (
- "syscall"
-)
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) error {
- return ENOTSUP
-}
+import "syscall"
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
@@ -22,17 +17,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: int32(usec)}
}
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
@@ -57,14 +41,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
//sys Lstat(path string, stat *Stat_t) (err error)
+//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
index f34c86c..53c9664 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && go1.12
// +build darwin,go1.12
package unix
-import "unsafe"
+import _ "unsafe"
// Implemented in the runtime package (runtime/sys_darwin.go)
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
@@ -24,10 +25,3 @@ func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
//go:linkname syscall_rawSyscall syscall.rawSyscall
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
//go:linkname syscall_syscallPtr syscall.syscallPtr
-
-// Find the entry point for f. See comments in runtime/proc.go for the
-// function of the same name.
-//go:nosplit
-func funcPC(f func()) uintptr {
- return **(**uintptr)(unsafe.Pointer(&f))
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 8a195ae..2e37c31 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -47,6 +47,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
// Translate "kern.hostname" to []_C_int{0,1,2,3}.
func nametomib(name string) (mib []_C_int, err error) {
const siz = unsafe.Sizeof(mib[0])
@@ -91,16 +95,35 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
-//sysnb pipe() (r int, w int, err error)
+//sysnb pipe() (r int, w int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
- p[0], p[1], err = pipe()
+ r, w, err := pipe()
+ if err == nil {
+ p[0], p[1] = r, w
+ }
return
}
+//sysnb pipe2(p *[2]_C_int, flags int) (r int, w int, err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ // pipe2 on dragonfly takes an fds array as an argument, but still
+ // returns the file descriptors.
+ r, w, err := pipe2(&pp, flags)
+ if err == nil {
+ p[0], p[1] = r, w
+ }
+ return err
+}
+
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
func Pread(fd int, p []byte, offset int64) (n int, err error) {
return extpread(fd, p, 0, offset)
@@ -129,23 +152,8 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
return
}
-const ImplementsGetwd = true
-
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
-func Getwd() (string, error) {
- var buf [PathMax]byte
- _, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
var _p0 unsafe.Pointer
var bufsize uintptr
@@ -168,7 +176,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
err := sysctl(mib, old, oldlen, nil, 0)
@@ -335,8 +343,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
+//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
index a6b4830..4e2d321 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 6b2eca4..2f650ae 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -54,6 +54,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
// Translate "kern.hostname" to []_C_int{0,1,2,3}.
func nametomib(name string) (mib []_C_int, err error) {
const siz = unsafe.Sizeof(mib[0])
@@ -106,8 +110,10 @@ func Pipe2(p []int, flags int) error {
}
var pp [2]_C_int
err := pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return err
}
@@ -122,6 +128,15 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
}
+// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.
+// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
+func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
+ x := new(Xucred)
+ vallen := _Socklen(SizeofXucred)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)
+ return x, err
+}
+
func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
@@ -140,23 +155,8 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
return
}
-const ImplementsGetwd = true
-
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
-func Getwd() (string, error) {
- var buf [PathMax]byte
- _, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
var (
_p0 unsafe.Pointer
@@ -199,9 +199,9 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
return ENOSYS
}
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
@@ -521,10 +521,6 @@ func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
}
-func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
- return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
-}
-
func PtraceGetRegs(pid int, regsout *Reg) (err error) {
return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
}
@@ -680,8 +676,8 @@ func PtraceSingleStep(pid int) (err error) {
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
+//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index 0a5a66f..342fc32 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && freebsd
// +build 386,freebsd
package unix
@@ -55,6 +56,10 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
+ return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+}
+
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 8025b22..a32d5aa 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && freebsd
// +build amd64,freebsd
package unix
@@ -55,6 +56,10 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
+ return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+}
+
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index 4ea45bc..1e36d39 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && freebsd
// +build arm,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
index aa5326d..a09a153 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && freebsd
// +build arm64,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go
new file mode 100644
index 0000000..8d5f294
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -0,0 +1,186 @@
+// 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.
+
+// illumos system calls not present on Solaris.
+
+//go:build amd64 && illumos
+// +build amd64,illumos
+
+package unix
+
+import (
+ "fmt"
+ "runtime"
+ "unsafe"
+)
+
+func bytes2iovec(bs [][]byte) []Iovec {
+ iovecs := make([]Iovec, len(bs))
+ for i, b := range bs {
+ iovecs[i].SetLen(len(b))
+ if len(b) > 0 {
+ // somehow Iovec.Base on illumos is (*int8), not (*byte)
+ iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
+ } else {
+ iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
+ }
+ }
+ return iovecs
+}
+
+//sys readv(fd int, iovs []Iovec) (n int, err error)
+
+func Readv(fd int, iovs [][]byte) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = readv(fd, iovecs)
+ return n, err
+}
+
+//sys preadv(fd int, iovs []Iovec, off int64) (n int, err error)
+
+func Preadv(fd int, iovs [][]byte, off int64) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = preadv(fd, iovecs, off)
+ return n, err
+}
+
+//sys writev(fd int, iovs []Iovec) (n int, err error)
+
+func Writev(fd int, iovs [][]byte) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = writev(fd, iovecs)
+ return n, err
+}
+
+//sys pwritev(fd int, iovs []Iovec, off int64) (n int, err error)
+
+func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = pwritev(fd, iovecs, off)
+ return n, err
+}
+
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = libsocket.accept4
+
+func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ nfd, err = accept4(fd, &rsa, &len, flags)
+ if err != nil {
+ return
+ }
+ if len > SizeofSockaddrAny {
+ panic("RawSockaddrAny too small")
+ }
+ sa, err = anyToSockaddr(fd, &rsa)
+ if err != nil {
+ Close(nfd)
+ nfd = 0
+ }
+ return
+}
+
+//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
+
+func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Len: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Len: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+ return putmsg(fd, clp, datap, flags)
+}
+
+//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
+
+func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Maxlen: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Maxlen: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+
+ if err = getmsg(fd, clp, datap, &flags); err != nil {
+ return nil, nil, 0, err
+ }
+
+ if len(cl) > 0 {
+ retCl = cl[:clp.Len]
+ }
+ if len(data) > 0 {
+ retData = data[:datap.Len]
+ }
+ return retCl, retData, flags, nil
+}
+
+func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
+ return ioctlRet(fd, req, uintptr(arg))
+}
+
+func IoctlSetString(fd int, req uint, val string) error {
+ bs := make([]byte, len(val)+1)
+ copy(bs[:len(bs)-1], val)
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
+ runtime.KeepAlive(&bs[0])
+ return err
+}
+
+// Lifreq Helpers
+
+func (l *Lifreq) SetName(name string) error {
+ if len(name) >= len(l.Name) {
+ return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
+ }
+ for i := range name {
+ l.Name[i] = int8(name[i])
+ }
+ return nil
+}
+
+func (l *Lifreq) SetLifruInt(d int) {
+ *(*int)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+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)))
+}
+
+// Strioctl Helpers
+
+func (s *Strioctl) SetInt(i int) {
+ s.Len = int32(unsafe.Sizeof(i))
+ s.Dp = (*int8)(unsafe.Pointer(&i))
+}
+
+func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
+ return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 0efe45a..f432b06 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -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,48 +72,22 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
return fchmodat(dirfd, path, mode)
}
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
-
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlRetInt performs an ioctl operation specified by req on a device
-// associated with opened file descriptor fd, and returns a non-negative
-// integer that is returned by the ioctl syscall.
-func IoctlRetInt(fd int, req uint) (int, error) {
- ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
- if err != 0 {
- return 0, err
- }
- return int(ret), nil
-}
-
-// IoctlSetPointerInt performs an ioctl operation which sets an
-// integer value on fd, using the specified request number. The ioctl
-// argument is called with a pointer to the integer value, rather than
-// passing the integer value directly.
-func IoctlSetPointerInt(fd int, req uint, value int) error {
- v := int32(value)
- return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
+func InotifyInit() (fd int, err error) {
+ return InotifyInit1(0)
}
-func IoctlSetRTCTime(fd int, value *RTCTime) error {
- err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
- runtime.KeepAlive(value)
- return err
-}
+//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
-func IoctlGetUint32(fd int, req uint) (uint32, error) {
- var value uint32
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetRTCTime(fd int) (*RTCTime, error) {
- var value RTCTime
- err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+// ioctl itself should not be exposed directly, but additional get/set functions
+// for specific types are permissible. These are defined in ioctl.go and
+// ioctl_linux.go.
+//
+// The third argument to ioctl is often a pointer but sometimes an integer.
+// Callers should use ioctlPtr when the third argument is a pointer and ioctl
+// when the third argument is an integer.
+//
+// TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr.
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
@@ -133,6 +113,31 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
return openat(dirfd, path, flags|O_LARGEFILE, mode)
}
+//sys openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error)
+
+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)
+ if err == nil {
+ 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) {
@@ -142,6 +147,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) {
@@ -192,27 +206,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 {
@@ -380,9 +374,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
}
@@ -395,9 +387,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
@@ -446,9 +436,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Hatype = sa.Hatype
sa.raw.Pkttype = sa.Pkttype
sa.raw.Halen = sa.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
}
@@ -591,6 +579,36 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
}
+// SockaddrCANJ1939 implements the Sockaddr interface for AF_CAN using J1939
+// protocol (https://en.wikipedia.org/wiki/SAE_J1939). For more information
+// on the purposes of the fields, check the official linux kernel documentation
+// available here: https://www.kernel.org/doc/Documentation/networking/j1939.rst
+type SockaddrCANJ1939 struct {
+ Ifindex int
+ Name uint64
+ PGN uint32
+ Addr uint8
+ raw RawSockaddrCAN
+}
+
+func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Family = AF_CAN
+ sa.raw.Ifindex = int32(sa.Ifindex)
+ n := (*[8]byte)(unsafe.Pointer(&sa.Name))
+ for i := 0; i < 8; i++ {
+ sa.raw.Addr[i] = n[i]
+ }
+ p := (*[4]byte)(unsafe.Pointer(&sa.PGN))
+ for i := 0; i < 4; i++ {
+ sa.raw.Addr[i+8] = p[i]
+ }
+ sa.raw.Addr[12] = sa.Addr
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
+}
+
// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
// SockaddrALG enables userspace access to the Linux kernel's cryptography
// subsystem. The Type and Name fields specify which type of hash or cipher
@@ -698,16 +716,19 @@ 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
+ CID uint32
+ Port uint32
+ Flags uint8
+ raw RawSockaddrVM
}
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Family = AF_VSOCK
sa.raw.Port = sa.Port
sa.raw.Cid = sa.CID
+ sa.raw.Flags = sa.Flags
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
}
@@ -830,15 +851,116 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Addr == nil {
return nil, 0, EINVAL
}
-
sa.raw.Family = AF_TIPC
sa.raw.Scope = int8(sa.Scope)
sa.raw.Addrtype = sa.Addr.tipcAddrtype()
sa.raw.Addr = sa.Addr.tipcAddr()
-
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
}
+// SockaddrL2TPIP implements the Sockaddr interface for IPPROTO_L2TP/AF_INET sockets.
+type SockaddrL2TPIP struct {
+ Addr [4]byte
+ ConnId uint32
+ raw RawSockaddrL2TPIP
+}
+
+func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_INET
+ sa.raw.Conn_id = sa.ConnId
+ sa.raw.Addr = sa.Addr
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
+}
+
+// SockaddrL2TPIP6 implements the Sockaddr interface for IPPROTO_L2TP/AF_INET6 sockets.
+type SockaddrL2TPIP6 struct {
+ Addr [16]byte
+ ZoneId uint32
+ ConnId uint32
+ raw RawSockaddrL2TPIP6
+}
+
+func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_INET6
+ sa.raw.Conn_id = sa.ConnId
+ sa.raw.Scope_id = sa.ZoneId
+ sa.raw.Addr = sa.Addr
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
+}
+
+// SockaddrIUCV implements the Sockaddr interface for AF_IUCV sockets.
+type SockaddrIUCV struct {
+ UserID string
+ Name string
+ raw RawSockaddrIUCV
+}
+
+func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_IUCV
+ // These are EBCDIC encoded by the kernel, but we still need to pad them
+ // with blanks. Initializing with blanks allows the caller to feed in either
+ // a padded or an unpadded string.
+ for i := 0; i < 8; i++ {
+ sa.raw.Nodeid[i] = ' '
+ sa.raw.User_id[i] = ' '
+ sa.raw.Name[i] = ' '
+ }
+ if len(sa.UserID) > 8 || len(sa.Name) > 8 {
+ return nil, 0, EINVAL
+ }
+ for i, b := range []byte(sa.UserID[:]) {
+ sa.raw.User_id[i] = int8(b)
+ }
+ for i, b := range []byte(sa.Name[:]) {
+ sa.raw.Name[i] = int8(b)
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil
+}
+
+type SockaddrNFC struct {
+ DeviceIdx uint32
+ TargetIdx uint32
+ NFCProtocol uint32
+ raw RawSockaddrNFC
+}
+
+func (sa *SockaddrNFC) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Sa_family = AF_NFC
+ sa.raw.Dev_idx = sa.DeviceIdx
+ sa.raw.Target_idx = sa.TargetIdx
+ sa.raw.Nfc_protocol = sa.NFCProtocol
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrNFC, nil
+}
+
+type SockaddrNFCLLCP struct {
+ DeviceIdx uint32
+ TargetIdx uint32
+ NFCProtocol uint32
+ DestinationSAP uint8
+ SourceSAP uint8
+ ServiceName string
+ raw RawSockaddrNFCLLCP
+}
+
+func (sa *SockaddrNFCLLCP) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Sa_family = AF_NFC
+ sa.raw.Dev_idx = sa.DeviceIdx
+ sa.raw.Target_idx = sa.TargetIdx
+ sa.raw.Nfc_protocol = sa.NFCProtocol
+ sa.raw.Dsap = sa.DestinationSAP
+ sa.raw.Ssap = sa.SourceSAP
+ if len(sa.ServiceName) > len(sa.raw.Service_name) {
+ return nil, 0, EINVAL
+ }
+ copy(sa.raw.Service_name[:], sa.ServiceName)
+ sa.raw.SetServiceNameLen(len(sa.ServiceName))
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrNFCLLCP, nil
+}
+
+var socketProtocol = func(fd int) (int, error) {
+ return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
+}
+
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_NETLINK:
@@ -858,9 +980,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Hatype = pp.Hatype
sa.Pkttype = pp.Pkttype
sa.Halen = pp.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_UNIX:
@@ -889,35 +1009,61 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
return sa, nil
case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ switch proto {
+ case IPPROTO_L2TP:
+ pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
+ sa := new(SockaddrL2TPIP)
+ sa.ConnId = pp.Conn_id
+ sa.Addr = pp.Addr
+ return sa, nil
+ default:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.Addr = pp.Addr
+ return sa, nil
}
- return sa, nil
case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ switch proto {
+ case IPPROTO_L2TP:
+ pp := (*RawSockaddrL2TPIP6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrL2TPIP6)
+ sa.ConnId = pp.Conn_id
+ sa.ZoneId = pp.Scope_id
+ sa.Addr = pp.Addr
+ return sa, nil
+ default:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ sa.Addr = pp.Addr
+ return sa, nil
}
- return sa, nil
case AF_VSOCK:
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
sa := &SockaddrVM{
- CID: pp.Cid,
- Port: pp.Port,
+ CID: pp.Cid,
+ Port: pp.Port,
+ Flags: pp.Flags,
}
return sa, nil
case AF_BLUETOOTH:
- proto, err := GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
+ proto, err := socketProtocol(fd)
if err != nil {
return nil, err
}
@@ -986,6 +1132,92 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
}
return sa, nil
+ case AF_IUCV:
+ pp := (*RawSockaddrIUCV)(unsafe.Pointer(rsa))
+
+ var user [8]byte
+ var name [8]byte
+
+ for i := 0; i < 8; i++ {
+ user[i] = byte(pp.User_id[i])
+ name[i] = byte(pp.Name[i])
+ }
+
+ sa := &SockaddrIUCV{
+ UserID: string(user[:]),
+ Name: string(name[:]),
+ }
+ return sa, nil
+
+ case AF_CAN:
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ pp := (*RawSockaddrCAN)(unsafe.Pointer(rsa))
+
+ switch proto {
+ case CAN_J1939:
+ sa := &SockaddrCANJ1939{
+ Ifindex: int(pp.Ifindex),
+ }
+ name := (*[8]byte)(unsafe.Pointer(&sa.Name))
+ for i := 0; i < 8; i++ {
+ name[i] = pp.Addr[i]
+ }
+ pgn := (*[4]byte)(unsafe.Pointer(&sa.PGN))
+ for i := 0; i < 4; i++ {
+ pgn[i] = pp.Addr[i+8]
+ }
+ addr := (*[1]byte)(unsafe.Pointer(&sa.Addr))
+ addr[0] = pp.Addr[12]
+ return sa, nil
+ default:
+ sa := &SockaddrCAN{
+ Ifindex: int(pp.Ifindex),
+ }
+ rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
+ for i := 0; i < 4; i++ {
+ rx[i] = pp.Addr[i]
+ }
+ tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
+ for i := 0; i < 4; i++ {
+ tx[i] = pp.Addr[i+4]
+ }
+ return sa, nil
+ }
+ case AF_NFC:
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+ switch proto {
+ case NFC_SOCKPROTO_RAW:
+ pp := (*RawSockaddrNFC)(unsafe.Pointer(rsa))
+ sa := &SockaddrNFC{
+ DeviceIdx: pp.Dev_idx,
+ TargetIdx: pp.Target_idx,
+ NFCProtocol: pp.Nfc_protocol,
+ }
+ return sa, nil
+ case NFC_SOCKPROTO_LLCP:
+ pp := (*RawSockaddrNFCLLCP)(unsafe.Pointer(rsa))
+ if uint64(pp.Service_name_len) > uint64(len(pp.Service_name)) {
+ return nil, EINVAL
+ }
+ sa := &SockaddrNFCLLCP{
+ DeviceIdx: pp.Dev_idx,
+ TargetIdx: pp.Target_idx,
+ NFCProtocol: pp.Nfc_protocol,
+ DestinationSAP: pp.Dsap,
+ SourceSAP: pp.Ssap,
+ ServiceName: string(pp.Service_name[:pp.Service_name_len]),
+ }
+ return sa, nil
+ default:
+ return nil, EINVAL
+ }
}
return nil, EAFNOSUPPORT
}
@@ -993,7 +1225,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
- nfd, err = accept(fd, &rsa, &len)
+ nfd, err = accept4(fd, &rsa, &len, 0)
if err != nil {
return
}
@@ -1115,6 +1347,13 @@ func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
}
+func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
+ if len(o) == 0 {
+ return EINVAL
+ }
+ return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
+}
+
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
// KeyctlInt calls keyctl commands in which each argument is an int.
@@ -1247,8 +1486,8 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
return keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction)
}
-//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
-//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
+//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
+//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
@@ -1538,6 +1777,16 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
return mount(source, target, fstype, flags, datap)
}
+//sys mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
+
+// MountSetattr is a wrapper for mount_setattr(2).
+// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
+//
+// Requires kernel >= 5.12.
+func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
+ return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
+}
+
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
@@ -1555,17 +1804,23 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Acct(path string) (err error)
//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
//sys Adjtimex(buf *Timex) (state int, err error)
-//sys Capget(hdr *CapUserHeader, data *CapUserData) (err error)
-//sys Capset(hdr *CapUserHeader, data *CapUserData) (err error)
+//sysnb Capget(hdr *CapUserHeader, data *CapUserData) (err error)
+//sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error)
//sys Chdir(path string) (err error)
//sys Chroot(path string) (err error)
//sys ClockGetres(clockid int32, res *Timespec) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
//sys Close(fd int) (err error)
+//sys CloseRange(first uint, last uint, flags uint) (err error)
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys DeleteModule(name string, flags int) (err error)
//sys Dup(oldfd int) (fd int, err error)
+
+func Dup2(oldfd, newfd int) error {
+ return Dup3(oldfd, newfd, 0)
+}
+
//sys Dup3(oldfd int, newfd int, flags int) (err error)
//sysnb EpollCreate1(flag int) (fd int, err error)
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
@@ -1616,8 +1871,8 @@ func Getpgrp() (pid int) {
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
-//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
+//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
+//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
//sys read(fd int, p []byte) (n int, err error)
//sys Removexattr(path string, attr string) (err error)
@@ -1690,6 +1945,9 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
//sys Syncfs(fd int) (err error)
//sysnb Sysinfo(info *Sysinfo_t) (err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
+//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error)
+//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error)
+//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error)
//sysnb Umask(mask int) (oldmask int)
@@ -1859,11 +2117,30 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
return int(n), nil
}
+func isGroupMember(gid int) bool {
+ groups, err := Getgroups()
+ if err != nil {
+ return false
+ }
+
+ for _, g := range groups {
+ if g == gid {
+ return true
+ }
+ }
+ return false
+}
+
//sys faccessat(dirfd int, path string, mode uint32) (err error)
+//sys Faccessat2(dirfd int, path string, mode uint32, flags int) (err error)
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {
- return EINVAL
+ if flags == 0 {
+ return faccessat(dirfd, path, mode)
+ }
+
+ if err := Faccessat2(dirfd, path, mode, flags); err != ENOSYS && err != EPERM {
+ return err
}
// The Linux kernel faccessat system call does not take any flags.
@@ -1872,8 +2149,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
// Because people naturally expect syscall.Faccessat to act
// like C faccessat, we do the same.
- if flags == 0 {
- return faccessat(dirfd, path, mode)
+ if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {
+ return EINVAL
}
var st Stat_t
@@ -1916,7 +2193,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
gid = Getgid()
}
- if uint32(gid) == st.Gid {
+ if uint32(gid) == st.Gid || isGroupMember(gid) {
fmode = (st.Mode >> 3) & 7
} else {
fmode = st.Mode & 7
@@ -1930,8 +2207,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
return EACCES
}
-//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
-//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
+//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
+//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
// fileHandle is the argument to nameToHandleAt and openByHandleAt. We
// originally tried to generate it via unix/linux/types.go with "type
@@ -2017,6 +2294,26 @@ func Klogset(typ int, arg int) (err error) {
return nil
}
+// RemoteIovec is Iovec with the pointer replaced with an integer.
+// It is used for ProcessVMReadv and ProcessVMWritev, where the pointer
+// refers to a location in a different process' address space, which
+// would confuse the Go garbage collector.
+type RemoteIovec struct {
+ Base uintptr
+ Len int
+}
+
+//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
*/
@@ -2098,10 +2395,6 @@ func Klogset(typ int, arg int) (err error) {
// SetRobustList
// SetThreadArea
// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
// Sigaltstack
// Swapoff
// Swapon
@@ -2111,7 +2404,6 @@ func Klogset(typ int, arg int) (err error) {
// TimerGetoverrun
// TimerGettime
// TimerSettime
-// Timerfd
// Tkill (obsolete)
// Tuxcall
// Umount2
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index a8374b6..5f757e8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
+//go:build 386 && linux
// +build 386,linux
package unix
@@ -21,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
@@ -61,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
@@ -101,13 +70,13 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0)
func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
+ err = Prlimit(0, resource, nil, rlim)
if err != ENOSYS {
return err
}
@@ -132,10 +101,10 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
+ err = Prlimit(0, resource, rlim, nil)
if err != ENOSYS {
return err
}
@@ -380,11 +349,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 8ed1d54..4299125 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && linux
// +build amd64,linux
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)
@@ -20,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)
@@ -125,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 }
@@ -171,13 +133,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
}
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
index 21a4946..8b0f0f3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64,linux
-// +build !gccgo
+//go:build amd64 && linux && gc
+// +build amd64,linux,gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index 99ae613..79edeb9 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && linux
// +build arm,linux
package unix
import (
- "syscall"
"unsafe"
)
@@ -19,40 +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
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
newoffset, errno := seek(fd, offset, whence)
if errno != 0 {
@@ -80,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
@@ -90,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
@@ -134,8 +97,8 @@ func Utime(path string, buf *Utimbuf) error {
//sys utimes(path string, times *[2]Timeval) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
@@ -182,13 +145,13 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0)
func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
+ err = Prlimit(0, resource, nil, rlim)
if err != ENOSYS {
return err
}
@@ -213,10 +176,10 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
+ err = Prlimit(0, resource, rlim, nil)
if err != ENOSYS {
return err
}
@@ -260,13 +223,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint32(length)
}
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 807a0b2..862890d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -2,19 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && linux
// +build arm64,linux
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)
@@ -25,7 +19,7 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb Getegid() (egid int)
//sysnb Geteuid() (euid int)
//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
@@ -47,7 +41,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
@@ -144,28 +138,22 @@ 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
+// Getrlimit prefers the prlimit64 system call. See issue 38604.
+func Getrlimit(resource int, rlim *Rlimit) error {
+ err := Prlimit(0, resource, nil, rlim)
+ if err != ENOSYS {
+ return err
}
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
+ return getrlimit(resource, rlim)
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
+// Setrlimit prefers the prlimit64 system call. See issue 38604.
+func Setrlimit(resource int, rlim *Rlimit) error {
+ err := Prlimit(0, resource, rlim, nil)
+ if err != ENOSYS {
+ return err
}
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
+ return setrlimit(resource, rlim)
}
func (r *PtraceRegs) PC() uint64 { return r.Pc }
@@ -188,12 +176,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
-func Dup2(oldfd int, newfd int) (err error) {
- return Dup3(oldfd, newfd, 0)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
}
func Pause() error {
@@ -201,18 +185,6 @@ func Pause() error {
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 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
index c26e6ec..2b1168d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,!gccgo
+//go:build linux && gc
+// +build linux,gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
index 070bd38..9843fb4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,!gccgo,386
+//go:build linux && gc && 386
+// +build linux,gc,386
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
new file mode 100644
index 0000000..a6008fc
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
@@ -0,0 +1,14 @@
+// Copyright 2009 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 arm && gc && linux
+// +build arm,gc,linux
+
+package unix
+
+import "syscall"
+
+// Underlying system call writes to newoffset via pointer.
+// Implemented in assembly to avoid allocation.
+func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
index 308eb7a..7740af2 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && gccgo && 386
// +build linux,gccgo,386
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
index aa7fc9e..e16a122 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && gccgo && arm
// +build linux,gccgo,arm
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index e9d2f1d..8932e34 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (mips64 || mips64le)
// +build linux
// +build mips64 mips64le
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)
@@ -93,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
}
@@ -216,11 +191,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index e286c6b..7821c25 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (mips || mipsle)
// +build linux
// +build mips mipsle
@@ -14,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)
@@ -59,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)
@@ -112,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) {
@@ -153,10 +128,10 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
+ err = Prlimit(0, resource, nil, rlim)
if err != ENOSYS {
return err
}
@@ -181,10 +156,10 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
+ err = Prlimit(0, resource, rlim, nil)
if err != ENOSYS {
return err
}
@@ -228,11 +203,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
new file mode 100644
index 0000000..c5053a0
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -0,0 +1,237 @@
+// 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 && ppc
+// +build linux,ppc
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+//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
+//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
+//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getuid() (uid int)
+//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 Listen(s int, n int) (err error)
+//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
+//sys setfsgid(gid int) (prev int, err error)
+//sys setfsuid(uid int) (prev int, err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
+//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
+//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
+//sys Ustat(dev int, ubuf *Ustat_t) (err error)
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+
+//sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
+//sysnb Gettimeofday(tv *Timeval) (err error)
+//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys Utime(path string, buf *Utimbuf) (err error)
+//sys utimes(path string, times *[2]Timeval) (err error)
+
+func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+ _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
+ var newoffset int64
+ offsetLow := uint32(offset & 0xffffffff)
+ offsetHigh := uint32((offset >> 32) & 0xffffffff)
+ _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
+ return newoffset, err
+}
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+ newoffset, errno := seek(fd, offset, whence)
+ if errno != 0 {
+ return 0, errno
+ }
+ return newoffset, nil
+}
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
+ if e != 0 {
+ err = e
+ }
+ return
+}
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ pathp, err := BytePtrFromString(path)
+ if err != nil {
+ return err
+ }
+ _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
+ if e != 0 {
+ err = e
+ }
+ 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) {
+ page := uintptr(offset / 4096)
+ if offset != int64(page)*4096 {
+ return 0, EINVAL
+ }
+ return mmap2(addr, length, prot, flags, fd, page)
+}
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: int32(sec), Usec: int32(usec)}
+}
+
+type rlimit32 struct {
+ Cur uint32
+ Max uint32
+}
+
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
+
+const rlimInf32 = ^uint32(0)
+const rlimInf64 = ^uint64(0)
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ err = Prlimit(0, resource, nil, rlim)
+ if err != ENOSYS {
+ return err
+ }
+
+ rl := rlimit32{}
+ err = getrlimit(resource, &rl)
+ if err != nil {
+ return
+ }
+
+ if rl.Cur == rlimInf32 {
+ rlim.Cur = rlimInf64
+ } else {
+ rlim.Cur = uint64(rl.Cur)
+ }
+
+ if rl.Max == rlimInf32 {
+ rlim.Max = rlimInf64
+ } else {
+ rlim.Max = uint64(rl.Max)
+ }
+ return
+}
+
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ err = Prlimit(0, resource, rlim, nil)
+ if err != ENOSYS {
+ return err
+ }
+
+ rl := rlimit32{}
+ if rlim.Cur == rlimInf64 {
+ rl.Cur = rlimInf32
+ } else if rlim.Cur < uint64(rlimInf32) {
+ rl.Cur = uint32(rlim.Cur)
+ } else {
+ return EINVAL
+ }
+ if rlim.Max == rlimInf64 {
+ rl.Max = rlimInf32
+ } else if rlim.Max < uint64(rlimInf32) {
+ rl.Max = uint32(rlim.Max)
+ } else {
+ return EINVAL
+ }
+
+ return setrlimit(resource, &rl)
+}
+
+func (r *PtraceRegs) PC() uint32 { return r.Nip }
+
+func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint32(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint32(length)
+}
+
+//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 {
+ // The sync_file_range and sync_file_range2 syscalls differ only in the
+ // order of their arguments.
+ return syncFileRange2(fd, flags, off, n)
+}
+
+//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 {
+ cmdlineLen := len(cmdline)
+ if cmdlineLen > 0 {
+ // Account for the additional NULL byte added by
+ // BytePtrFromString in kexecFileLoad. The kexec_file_load
+ // syscall expects a NULL-terminated string.
+ cmdlineLen++
+ }
+ return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index ca0345a..25786c4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (ppc64 || ppc64le)
// +build linux
// +build ppc64 ppc64le
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,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)
@@ -99,39 +97,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
}
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index abdabba..6f9f710 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -2,19 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build riscv64 && linux
// +build riscv64,linux
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)
@@ -143,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 }
@@ -187,12 +157,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
-func Dup2(oldfd int, newfd int) (err error) {
- return Dup3(oldfd, newfd, 0)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
}
func Pause() error {
@@ -200,18 +166,6 @@ func Pause() error {
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)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 533e930..6aa59cb 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build s390x && linux
// +build s390x,linux
package unix
@@ -10,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)
@@ -24,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)
@@ -76,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
}
@@ -128,6 +102,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
+}
+
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@@ -249,7 +227,7 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
}
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
- args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
+ args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen}
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
if err != 0 {
return err
@@ -319,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 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index d890a22..bbe8d17 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build sparc64 && linux
// +build sparc64,linux
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
@@ -19,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)
@@ -115,37 +114,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.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)
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 45b50a6..696fed4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -31,6 +31,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
@@ -106,16 +110,27 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
-//sysnb pipe() (fd1 int, fd2 int, err error)
func Pipe(p []int) (err 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
}
- p[0], p[1], err = pipe()
- return
+ var pp [2]_C_int
+ err := pipe2(&pp, flags)
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
+ return err
}
-//sys Getdents(fd int, buf []byte) (n int, err error)
+//sys Getdents(fd int, buf []byte) (n int, err error)
+
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
n, err = Getdents(fd, buf)
if err != nil || basep == nil {
@@ -141,23 +156,8 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
return
}
-const ImplementsGetwd = true
-
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
-func Getwd() (string, error) {
- var buf [PathMax]byte
- _, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
// TODO
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
return -1, ENOSYS
@@ -170,7 +170,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
var value Ptmget
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
index 24da8b5..5199d28 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && netbsd
// +build 386,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
index 25a0ac8..70a9c52 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && netbsd
// +build amd64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
index 21591ec..3eb5942 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && netbsd
// +build arm,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
index 8047496..fc6ccfd 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && netbsd
// +build arm64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index a266e92..11b1d41 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -31,6 +31,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func nametomib(name string) (mib []_C_int, err error) {
@@ -83,12 +87,14 @@ func Pipe2(p []int, flags int) error {
}
var pp [2]_C_int
err := pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return err
}
-//sys Getdents(fd int, buf []byte) (n int, err error)
+//sys Getdents(fd int, buf []byte) (n int, err error)
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
n, err = Getdents(fd, buf)
if err != nil || basep == nil {
@@ -114,23 +120,8 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
return
}
-const ImplementsGetwd = true
-
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
-func Getwd() (string, error) {
- var buf [PathMax]byte
- _, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
@@ -165,7 +156,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
index 42b5a0e..6baabcd 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
index 6ea4b48..bab2536 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
index 1c3d26f..8eed3c4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
index a8c458c..483dde9 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
new file mode 100644
index 0000000..30f2853
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
@@ -0,0 +1,35 @@
+// Copyright 2019 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 unix
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+ k.Ident = uint64(fd)
+ k.Filter = int16(mode)
+ k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
+// of OpenBSD the syscall is called sysctl instead of __sysctl.
+const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 0e2a696..5c81392 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -13,6 +13,10 @@
package unix
import (
+ "fmt"
+ "os"
+ "runtime"
+ "sync"
"syscall"
"unsafe"
)
@@ -62,11 +66,28 @@ func Pipe(p []int) (err error) {
if n != 0 {
return err
}
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return nil
}
+//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)
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
+ return err
+}
+
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Port < 0 || sa.Port > 0xFFFF {
return nil, 0, EINVAL
@@ -75,9 +96,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
}
@@ -90,9 +109,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
@@ -400,9 +417,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -411,9 +426,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, EAFNOSUPPORT
@@ -551,10 +564,17 @@ func Minor(dev uint64) uint32 {
* Expose the ioctl function
*/
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
+//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
-func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, err = ioctlRet(fd, req, arg)
+ return err
+}
+
+func IoctlSetTermio(fd int, req uint, value *Termio) error {
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
}
func IoctlGetTermio(fd int, req uint) (*Termio, error) {
@@ -563,7 +583,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
return &value, err
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+//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 {
@@ -666,6 +686,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Statvfs(path string, vfsstat *Statvfs_t) (err error)
//sys Symlink(path string, link string) (err error)
//sys Sync() (err error)
+//sys Sysconf(which int) (n int64, err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error)
//sys Truncate(path string, length int64) (err error)
//sys Fsync(fd int) (err error)
@@ -722,3 +743,240 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
func Munmap(b []byte) (err error) {
return mapper.Munmap(b)
}
+
+// Event Ports
+
+type fileObjCookie struct {
+ fobj *fileObj
+ cookie interface{}
+}
+
+// EventPort provides a safe abstraction on top of Solaris/illumos Event Ports.
+type EventPort struct {
+ port int
+ mu sync.Mutex
+ fds map[uintptr]interface{}
+ paths map[string]*fileObjCookie
+}
+
+// PortEvent is an abstraction of the port_event C struct.
+// Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD
+// to see if Path or Fd was the event source. The other will be
+// uninitialized.
+type PortEvent struct {
+ Cookie interface{}
+ Events int32
+ Fd uintptr
+ Path string
+ Source uint16
+ fobj *fileObj
+}
+
+// NewEventPort creates a new EventPort including the
+// underlying call to port_create(3c).
+func NewEventPort() (*EventPort, error) {
+ port, err := port_create()
+ if err != nil {
+ return nil, err
+ }
+ e := &EventPort{
+ port: port,
+ fds: make(map[uintptr]interface{}),
+ paths: make(map[string]*fileObjCookie),
+ }
+ return e, nil
+}
+
+//sys port_create() (n int, err error)
+//sys port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error)
+//sys port_dissociate(port int, source int, object uintptr) (n int, err error)
+//sys port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error)
+//sys port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error)
+
+// Close closes the event port.
+func (e *EventPort) Close() error {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ e.fds = nil
+ e.paths = nil
+ return Close(e.port)
+}
+
+// PathIsWatched checks to see if path is associated with this EventPort.
+func (e *EventPort) PathIsWatched(path string) bool {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ _, found := e.paths[path]
+ return found
+}
+
+// FdIsWatched checks to see if fd is associated with this EventPort.
+func (e *EventPort) FdIsWatched(fd uintptr) bool {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ _, found := e.fds[fd]
+ return found
+}
+
+// AssociatePath wraps port_associate(3c) for a filesystem path including
+// creating the necessary file_obj from the provided stat information.
+func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ if _, found := e.paths[path]; found {
+ return fmt.Errorf("%v is already associated with this Event Port", path)
+ }
+ fobj, err := createFileObj(path, stat)
+ if err != nil {
+ return err
+ }
+ fCookie := &fileObjCookie{fobj, cookie}
+ _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
+ if err != nil {
+ return err
+ }
+ e.paths[path] = fCookie
+ return nil
+}
+
+// DissociatePath wraps port_dissociate(3c) for a filesystem path.
+func (e *EventPort) DissociatePath(path string) error {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ f, ok := e.paths[path]
+ if !ok {
+ return fmt.Errorf("%v is not associated with this Event Port", path)
+ }
+ _, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
+ if err != nil {
+ return err
+ }
+ delete(e.paths, path)
+ return nil
+}
+
+// AssociateFd wraps calls to port_associate(3c) on file descriptors.
+func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ if _, found := e.fds[fd]; found {
+ return fmt.Errorf("%v is already associated with this Event Port", fd)
+ }
+ pcookie := &cookie
+ _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
+ if err != nil {
+ return err
+ }
+ e.fds[fd] = pcookie
+ return nil
+}
+
+// DissociateFd wraps calls to port_dissociate(3c) on file descriptors.
+func (e *EventPort) DissociateFd(fd uintptr) error {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ _, ok := e.fds[fd]
+ if !ok {
+ return fmt.Errorf("%v is not associated with this Event Port", fd)
+ }
+ _, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
+ if err != nil {
+ return err
+ }
+ delete(e.fds, fd)
+ return nil
+}
+
+func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
+ fobj := new(fileObj)
+ bs, err := ByteSliceFromString(name)
+ if err != nil {
+ return nil, err
+ }
+ fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
+ s := stat.Sys().(*syscall.Stat_t)
+ fobj.Atim.Sec = s.Atim.Sec
+ fobj.Atim.Nsec = s.Atim.Nsec
+ fobj.Mtim.Sec = s.Mtim.Sec
+ fobj.Mtim.Nsec = s.Mtim.Nsec
+ fobj.Ctim.Sec = s.Ctim.Sec
+ fobj.Ctim.Nsec = s.Ctim.Nsec
+ return fobj, nil
+}
+
+// GetOne wraps port_get(3c) and returns a single PortEvent.
+func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
+ pe := new(portEvent)
+ _, err := port_get(e.port, pe, t)
+ if err != nil {
+ return nil, err
+ }
+ p := new(PortEvent)
+ p.Events = pe.Events
+ p.Source = pe.Source
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ switch pe.Source {
+ case PORT_SOURCE_FD:
+ p.Fd = uintptr(pe.Object)
+ cookie := (*interface{})(unsafe.Pointer(pe.User))
+ p.Cookie = *cookie
+ delete(e.fds, p.Fd)
+ case PORT_SOURCE_FILE:
+ p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
+ p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
+ cookie := (*interface{})(unsafe.Pointer(pe.User))
+ p.Cookie = *cookie
+ delete(e.paths, p.Path)
+ }
+ return p, nil
+}
+
+// Pending wraps port_getn(3c) and returns how many events are pending.
+func (e *EventPort) Pending() (int, error) {
+ var n uint32 = 0
+ _, err := port_getn(e.port, nil, 0, &n, nil)
+ return int(n), err
+}
+
+// Get wraps port_getn(3c) and fills a slice of PortEvent.
+// It will block until either min events have been received
+// or the timeout has been exceeded. It will return how many
+// events were actually received along with any error information.
+func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) {
+ if min == 0 {
+ return 0, fmt.Errorf("need to request at least one event or use Pending() instead")
+ }
+ if len(s) < min {
+ return 0, fmt.Errorf("len(s) (%d) is less than min events requested (%d)", len(s), min)
+ }
+ got := uint32(min)
+ max := uint32(len(s))
+ var err error
+ ps := make([]portEvent, max, max)
+ _, err = port_getn(e.port, &ps[0], max, &got, timeout)
+ // got will be trustworthy with ETIME, but not any other error.
+ if err != nil && err != ETIME {
+ return 0, err
+ }
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ for i := 0; i < int(got); i++ {
+ s[i].Events = ps[i].Events
+ s[i].Source = ps[i].Source
+ switch ps[i].Source {
+ case PORT_SOURCE_FD:
+ s[i].Fd = uintptr(ps[i].Object)
+ cookie := (*interface{})(unsafe.Pointer(ps[i].User))
+ s[i].Cookie = *cookie
+ delete(e.fds, s[i].Fd)
+ case PORT_SOURCE_FILE:
+ s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
+ s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
+ cookie := (*interface{})(unsafe.Pointer(ps[i].User))
+ s[i].Cookie = *cookie
+ delete(e.paths, s[i].Path)
+ }
+ }
+ return int(got), err
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
index b22a34d..0bd25ef 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && solaris
// +build amd64,solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 3de3756..cf296a2 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
@@ -12,6 +13,8 @@ import (
"sync"
"syscall"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
var (
@@ -76,7 +79,7 @@ func SignalName(s syscall.Signal) string {
// The signal name should start with "SIG".
func SignalNum(s string) syscall.Signal {
signalNameMapOnce.Do(func() {
- signalNameMap = make(map[string]syscall.Signal)
+ signalNameMap = make(map[string]syscall.Signal, len(signalList))
for _, signal := range signalList {
signalNameMap[signal.name] = signal.num
}
@@ -113,15 +116,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
return nil, errno
}
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafe to turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
+ // Use unsafe to convert addr into a []byte.
+ var b []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
+ hdr.Data = unsafe.Pointer(addr)
+ hdr.Cap = length
+ hdr.Len = length
// Register mapping in m and return it.
p := &b[cap(b)-1]
@@ -313,6 +313,10 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
return
}
+func Send(s int, buf []byte, flags int) (err error) {
+ return sendto(s, buf, flags, nil, 0)
+}
+
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
ptr, n, err := to.sockaddr()
if err != nil {
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
index 1c70d1b..5898e9a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-// +build !gccgo,!ppc64le,!ppc64
+// +build gc
+// +build !ppc64le
+// +build !ppc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
index 86dc765..f6f707a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (ppc64le || ppc64) && gc
// +build linux
// +build ppc64le ppc64
-// +build !gccgo
+// +build gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
new file mode 100644
index 0000000..f8616f4
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -0,0 +1,1823 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "bytes"
+ "runtime"
+ "sort"
+ "sync"
+ "syscall"
+ "unsafe"
+)
+
+const (
+ O_CLOEXEC = 0 // Dummy value (not supported).
+ AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX
+)
+
+func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawsyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawsyscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
+
+func copyStat(stat *Stat_t, statLE *Stat_LE_t) {
+ stat.Dev = uint64(statLE.Dev)
+ stat.Ino = uint64(statLE.Ino)
+ stat.Nlink = uint64(statLE.Nlink)
+ stat.Mode = uint32(statLE.Mode)
+ stat.Uid = uint32(statLE.Uid)
+ stat.Gid = uint32(statLE.Gid)
+ stat.Rdev = uint64(statLE.Rdev)
+ stat.Size = statLE.Size
+ stat.Atim.Sec = int64(statLE.Atim)
+ stat.Atim.Nsec = 0 //zos doesn't return nanoseconds
+ stat.Mtim.Sec = int64(statLE.Mtim)
+ stat.Mtim.Nsec = 0 //zos doesn't return nanoseconds
+ stat.Ctim.Sec = int64(statLE.Ctim)
+ stat.Ctim.Nsec = 0 //zos doesn't return nanoseconds
+ stat.Blksize = int64(statLE.Blksize)
+ stat.Blocks = statLE.Blocks
+}
+
+func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)
+func svcLoad(name *byte) unsafe.Pointer
+func svcUnload(name *byte, fnptr unsafe.Pointer) int64
+
+func (d *Dirent) NameString() string {
+ if d == nil {
+ return ""
+ }
+ return string(d.Name[:d.Namlen])
+}
+
+func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Port < 0 || sa.Port > 0xFFFF {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Len = SizeofSockaddrInet4
+ sa.raw.Family = AF_INET
+ p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+ p[0] = byte(sa.Port >> 8)
+ p[1] = byte(sa.Port)
+ sa.raw.Addr = sa.Addr
+ return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
+}
+
+func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Port < 0 || sa.Port > 0xFFFF {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Len = SizeofSockaddrInet6
+ sa.raw.Family = AF_INET6
+ p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+ p[0] = byte(sa.Port >> 8)
+ p[1] = byte(sa.Port)
+ sa.raw.Scope_id = sa.ZoneId
+ sa.raw.Addr = sa.Addr
+ return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
+}
+
+func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ name := sa.Name
+ n := len(name)
+ if n >= len(sa.raw.Path) || n == 0 {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
+ sa.raw.Family = AF_UNIX
+ for i := 0; i < n; i++ {
+ sa.raw.Path[i] = int8(name[i])
+ }
+ return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
+}
+
+func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ // TODO(neeilan): Implement use of first param (fd)
+ switch rsa.Addr.Family {
+ case AF_UNIX:
+ pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
+ sa := new(SockaddrUnix)
+ // For z/OS, only replace NUL with @ when the
+ // length is not zero.
+ if pp.Len != 0 && pp.Path[0] == 0 {
+ // "Abstract" Unix domain socket.
+ // Rewrite leading NUL as @ for textual display.
+ // (This is the standard convention.)
+ // Not friendly to overwrite in place,
+ // but the callers below don't care.
+ pp.Path[0] = '@'
+ }
+
+ // Assume path ends at NUL.
+ //
+ // For z/OS, the length of the name is a field
+ // in the structure. To be on the safe side, we
+ // will still scan the name for a NUL but only
+ // to the length provided in the structure.
+ //
+ // This is not technically the Linux semantics for
+ // abstract Unix domain sockets--they are supposed
+ // to be uninterpreted fixed-size binary blobs--but
+ // everyone uses this convention.
+ n := 0
+ for n < int(pp.Len) && pp.Path[n] != 0 {
+ n++
+ }
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ sa.Name = string(bytes)
+ return sa, nil
+
+ case AF_INET:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.Addr = pp.Addr
+ return sa, nil
+
+ case AF_INET6:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ sa.Addr = pp.Addr
+ return sa, nil
+ }
+ return nil, EAFNOSUPPORT
+}
+
+func Accept(fd int) (nfd int, sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ nfd, err = accept(fd, &rsa, &len)
+ if err != nil {
+ return
+ }
+ // TODO(neeilan): Remove 0 in call
+ sa, err = anyToSockaddr(0, &rsa)
+ if err != nil {
+ Close(nfd)
+ nfd = 0
+ }
+ return
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = int32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = int32(length)
+}
+
+//sys fcntl(fd int, cmd int, arg int) (val int, err error)
+//sys read(fd int, p []byte) (n int, err error)
+//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
+//sys write(fd int, p []byte) (n int, err error)
+
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETPEERNAME_A
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP
+//sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP
+//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
+
+//sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A
+//sys Chdir(path string) (err error) = SYS___CHDIR_A
+//sys Chown(path string, uid int, gid int) (err error) = SYS___CHOWN_A
+//sys Chmod(path string, mode uint32) (err error) = SYS___CHMOD_A
+//sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A
+//sys Dup(oldfd int) (fd int, err error)
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys Errno2() (er2 int) = SYS___ERRNO2
+//sys Err2ad() (eadd *int) = SYS___ERR2AD
+//sys Exit(code int)
+//sys Fchdir(fd int) (err error)
+//sys Fchmod(fd int, mode uint32) (err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL
+//sys fstat(fd int, stat *Stat_LE_t) (err error)
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ var statLE Stat_LE_t
+ err = fstat(fd, &statLE)
+ copyStat(stat, &statLE)
+ return
+}
+
+//sys Fstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS
+//sys Fsync(fd int) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sys Getpagesize() (pgsize int) = SYS_GETPAGESIZE
+//sys Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT
+//sys Msync(b []byte, flags int) (err error) = SYS_MSYNC
+//sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL
+//sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES
+//sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT
+//sys W_Getmntent_A(buff *byte, size int) (lastsys int, err error) = SYS___W_GETMNTENT_A
+
+//sys mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A
+//sys unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A
+//sys Chroot(path string) (err error) = SYS___CHROOT_A
+//sys Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) = SYS_SELECT
+//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A
+
+func Ptsname(fd int) (name string, err error) {
+ r0, _, e1 := syscall_syscall(SYS___PTSNAME_A, uintptr(fd), 0, 0)
+ name = u2s(unsafe.Pointer(r0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func u2s(cstr unsafe.Pointer) string {
+ str := (*[1024]uint8)(cstr)
+ i := 0
+ for str[i] != 0 {
+ i++
+ }
+ return string(str[:i])
+}
+
+func Close(fd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ for i := 0; e1 == EAGAIN && i < 10; i++ {
+ _, _, _ = syscall_syscall(SYS_USLEEP, uintptr(10), 0, 0)
+ _, _, e1 = syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ }
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var mapper = &mmapper{
+ active: make(map[*byte][]byte),
+ mmap: mmap,
+ munmap: munmap,
+}
+
+// Dummy function: there are no semantics for Madvise on z/OS
+func Madvise(b []byte, advice int) (err error) {
+ return
+}
+
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+ return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+ return mapper.Munmap(b)
+}
+
+//sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (uid int)
+//sysnb Getgid() (gid int)
+//sysnb Getpid() (pid int)
+//sysnb Getpgid(pid int) (pgid int, err error) = SYS_GETPGID
+
+func Getpgrp() (pid int) {
+ pid, _ = Getpgid(0)
+ return
+}
+
+//sysnb Getppid() (pid int)
+//sys Getpriority(which int, who int) (prio int, err error)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_GETRLIMIT
+
+//sysnb getrusage(who int, rusage *rusage_zos) (err error) = SYS_GETRUSAGE
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ var ruz rusage_zos
+ err = getrusage(who, &ruz)
+ //Only the first two fields of Rusage are set
+ rusage.Utime.Sec = ruz.Utime.Sec
+ rusage.Utime.Usec = int64(ruz.Utime.Usec)
+ rusage.Stime.Sec = ruz.Stime.Sec
+ rusage.Stime.Usec = int64(ruz.Stime.Usec)
+ return
+}
+
+//sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID
+//sysnb Getuid() (uid int)
+//sysnb Kill(pid int, sig Signal) (err error)
+//sys Lchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A
+//sys Link(path string, link string) (err error) = SYS___LINK_A
+//sys Listen(s int, n int) (err error)
+//sys lstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var statLE Stat_LE_t
+ err = lstat(path, &statLE)
+ copyStat(stat, &statLE)
+ return
+}
+
+//sys Mkdir(path string, mode uint32) (err error) = SYS___MKDIR_A
+//sys Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A
+//sys Mknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A
+//sys Pread(fd int, p []byte, offset int64) (n int, err error)
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys Readlink(path string, buf []byte) (n int, err error) = SYS___READLINK_A
+//sys Rename(from string, to string) (err error) = SYS___RENAME_A
+//sys Rmdir(path string) (err error) = SYS___RMDIR_A
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+//sys Setpriority(which int, who int, prio int) (err error)
+//sysnb Setpgid(pid int, pgid int) (err error) = SYS_SETPGID
+//sysnb Setrlimit(resource int, lim *Rlimit) (err error)
+//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID
+//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID
+//sysnb Setsid() (pid int, err error) = SYS_SETSID
+//sys Setuid(uid int) (err error) = SYS_SETUID
+//sys Setgid(uid int) (err error) = SYS_SETGID
+//sys Shutdown(fd int, how int) (err error)
+//sys stat(path string, statLE *Stat_LE_t) (err error) = SYS___STAT_A
+
+func Stat(path string, sta *Stat_t) (err error) {
+ var statLE Stat_LE_t
+ err = stat(path, &statLE)
+ copyStat(sta, &statLE)
+ return
+}
+
+//sys Symlink(path string, link string) (err error) = SYS___SYMLINK_A
+//sys Sync() = SYS_SYNC
+//sys Truncate(path string, length int64) (err error) = SYS___TRUNCATE_A
+//sys Tcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR
+//sys Tcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR
+//sys Umask(mask int) (oldmask int)
+//sys Unlink(path string) (err error) = SYS___UNLINK_A
+//sys Utime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A
+
+//sys open(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ return open(path, mode, perm)
+}
+
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ wd, err := Getwd()
+ if err != nil {
+ return err
+ }
+
+ if err := Fchdir(dirfd); err != nil {
+ return err
+ }
+ defer Chdir(wd)
+
+ return Mkfifo(path, mode)
+}
+
+//sys remove(path string) (err error)
+
+func Remove(path string) error {
+ return remove(path)
+}
+
+const ImplementsGetwd = true
+
+func Getcwd(buf []byte) (n int, err error) {
+ var p unsafe.Pointer
+ if len(buf) > 0 {
+ p = unsafe.Pointer(&buf[0])
+ } else {
+ p = unsafe.Pointer(&_zero)
+ }
+ _, _, e := syscall_syscall(SYS___GETCWD_A, uintptr(p), uintptr(len(buf)), 0)
+ n = clen(buf) + 1
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return
+}
+
+func Getwd() (wd string, err error) {
+ var buf [PathMax]byte
+ n, err := Getcwd(buf[0:])
+ if err != nil {
+ return "", err
+ }
+ // Getcwd returns the number of bytes written to buf, including the NUL.
+ if n < 1 || n > len(buf) || buf[n-1] != 0 {
+ return "", EINVAL
+ }
+ return string(buf[0 : n-1]), nil
+}
+
+func Getgroups() (gids []int, err error) {
+ n, err := getgroups(0, nil)
+ if err != nil {
+ return nil, err
+ }
+ if n == 0 {
+ return nil, nil
+ }
+
+ // Sanity check group count. Max is 1<<16 on Linux.
+ if n < 0 || n > 1<<20 {
+ return nil, EINVAL
+ }
+
+ a := make([]_Gid_t, n)
+ n, err = getgroups(n, &a[0])
+ if err != nil {
+ return nil, err
+ }
+ gids = make([]int, n)
+ for i, v := range a[0:n] {
+ gids[i] = int(v)
+ }
+ return
+}
+
+func Setgroups(gids []int) (err error) {
+ if len(gids) == 0 {
+ return setgroups(0, nil)
+ }
+
+ a := make([]_Gid_t, len(gids))
+ for i, v := range gids {
+ a[i] = _Gid_t(v)
+ }
+ return setgroups(len(a), &a[0])
+}
+
+func gettid() uint64
+
+func Gettid() (tid int) {
+ return int(gettid())
+}
+
+type WaitStatus uint32
+
+// Wait status is 7 bits at bottom, either 0 (exited),
+// 0x7F (stopped), or a signal number that caused an exit.
+// The 0x80 bit is whether there was a core dump.
+// An extra number (exit code, signal causing a stop)
+// is in the high bits. At least that's the idea.
+// There are various irregularities. For example, the
+// "continued" status is 0xFFFF, distinguishing itself
+// from stopped via the core dump bit.
+
+const (
+ mask = 0x7F
+ core = 0x80
+ exited = 0x00
+ stopped = 0x7F
+ shift = 8
+)
+
+func (w WaitStatus) Exited() bool { return w&mask == exited }
+
+func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
+
+func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
+
+func (w WaitStatus) Continued() bool { return w == 0xFFFF }
+
+func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
+
+func (w WaitStatus) ExitStatus() int {
+ if !w.Exited() {
+ return -1
+ }
+ return int(w>>shift) & 0xFF
+}
+
+func (w WaitStatus) Signal() Signal {
+ if !w.Signaled() {
+ return -1
+ }
+ return Signal(w & mask)
+}
+
+func (w WaitStatus) StopSignal() Signal {
+ if !w.Stopped() {
+ return -1
+ }
+ return Signal(w>>shift) & 0xFF
+}
+
+func (w WaitStatus) TrapCause() int { return -1 }
+
+//sys waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error)
+
+func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
+ // TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want.
+ // At the moment rusage will not be touched.
+ var status _C_int
+ wpid, err = waitpid(pid, &status, options)
+ if wstatus != nil {
+ *wstatus = WaitStatus(status)
+ }
+ return
+}
+
+//sysnb gettimeofday(tv *timeval_zos) (err error)
+
+func Gettimeofday(tv *Timeval) (err error) {
+ var tvz timeval_zos
+ err = gettimeofday(&tvz)
+ tv.Sec = tvz.Sec
+ tv.Usec = int64(tvz.Usec)
+ return
+}
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ var tv Timeval
+ err = Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval { //fix
+ 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)
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
+ return
+}
+
+//sys utimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A
+
+func Utimes(path string, tv []Timeval) (err error) {
+ if len(tv) != 2 {
+ return EINVAL
+ }
+ return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+func UtimesNano(path string, ts []Timespec) error {
+ if len(ts) != 2 {
+ return EINVAL
+ }
+ // Not as efficient as it could be because Timespec and
+ // Timeval have different types in the different OSes
+ tv := [2]Timeval{
+ NsecToTimeval(TimespecToNsec(ts[0])),
+ NsecToTimeval(TimespecToNsec(ts[1])),
+ }
+ return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+func Getsockname(fd int) (sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if err = getsockname(fd, &rsa, &len); err != nil {
+ return
+ }
+ // TODO(neeilan) : Remove this 0 ( added to get sys/unix compiling on z/OS )
+ return anyToSockaddr(0, &rsa)
+}
+
+const (
+ // identifier constants
+ nwmHeaderIdentifier = 0xd5e6d4c8
+ nwmFilterIdentifier = 0xd5e6d4c6
+ nwmTCPConnIdentifier = 0xd5e6d4c3
+ nwmRecHeaderIdentifier = 0xd5e6d4d9
+ nwmIPStatsIdentifier = 0xd5e6d4c9d7e2e340
+ nwmIPGStatsIdentifier = 0xd5e6d4c9d7c7e2e3
+ nwmTCPStatsIdentifier = 0xd5e6d4e3c3d7e2e3
+ nwmUDPStatsIdentifier = 0xd5e6d4e4c4d7e2e3
+ nwmICMPGStatsEntry = 0xd5e6d4c9c3d4d7c7
+ nwmICMPTStatsEntry = 0xd5e6d4c9c3d4d7e3
+
+ // nwmHeader constants
+ nwmVersion1 = 1
+ nwmVersion2 = 2
+ nwmCurrentVer = 2
+
+ nwmTCPConnType = 1
+ nwmGlobalStatsType = 14
+
+ // nwmFilter constants
+ nwmFilterLclAddrMask = 0x20000000 // Local address
+ nwmFilterSrcAddrMask = 0x20000000 // Source address
+ nwmFilterLclPortMask = 0x10000000 // Local port
+ nwmFilterSrcPortMask = 0x10000000 // Source port
+
+ // nwmConnEntry constants
+ nwmTCPStateClosed = 1
+ nwmTCPStateListen = 2
+ nwmTCPStateSynSent = 3
+ nwmTCPStateSynRcvd = 4
+ nwmTCPStateEstab = 5
+ nwmTCPStateFinWait1 = 6
+ nwmTCPStateFinWait2 = 7
+ nwmTCPStateClosWait = 8
+ nwmTCPStateLastAck = 9
+ nwmTCPStateClosing = 10
+ nwmTCPStateTimeWait = 11
+ nwmTCPStateDeletTCB = 12
+
+ // Existing constants on linux
+ BPF_TCP_CLOSE = 1
+ BPF_TCP_LISTEN = 2
+ BPF_TCP_SYN_SENT = 3
+ BPF_TCP_SYN_RECV = 4
+ BPF_TCP_ESTABLISHED = 5
+ BPF_TCP_FIN_WAIT1 = 6
+ BPF_TCP_FIN_WAIT2 = 7
+ BPF_TCP_CLOSE_WAIT = 8
+ BPF_TCP_LAST_ACK = 9
+ BPF_TCP_CLOSING = 10
+ BPF_TCP_TIME_WAIT = 11
+ BPF_TCP_NEW_SYN_RECV = -1
+ BPF_TCP_MAX_STATES = -2
+)
+
+type nwmTriplet struct {
+ offset uint32
+ length uint32
+ number uint32
+}
+
+type nwmQuadruplet struct {
+ offset uint32
+ length uint32
+ number uint32
+ match uint32
+}
+
+type nwmHeader struct {
+ ident uint32
+ length uint32
+ version uint16
+ nwmType uint16
+ bytesNeeded uint32
+ options uint32
+ _ [16]byte
+ inputDesc nwmTriplet
+ outputDesc nwmQuadruplet
+}
+
+type nwmFilter struct {
+ ident uint32
+ flags uint32
+ resourceName [8]byte
+ resourceId uint32
+ listenerId uint32
+ local [28]byte // union of sockaddr4 and sockaddr6
+ remote [28]byte // union of sockaddr4 and sockaddr6
+ _ uint16
+ _ uint16
+ asid uint16
+ _ [2]byte
+ tnLuName [8]byte
+ tnMonGrp uint32
+ tnAppl [8]byte
+ applData [40]byte
+ nInterface [16]byte
+ dVipa [16]byte
+ dVipaPfx uint16
+ dVipaPort uint16
+ dVipaFamily byte
+ _ [3]byte
+ destXCF [16]byte
+ destXCFPfx uint16
+ destXCFFamily byte
+ _ [1]byte
+ targIP [16]byte
+ targIPPfx uint16
+ targIPFamily byte
+ _ [1]byte
+ _ [20]byte
+}
+
+type nwmRecHeader struct {
+ ident uint32
+ length uint32
+ number byte
+ _ [3]byte
+}
+
+type nwmTCPStatsEntry struct {
+ ident uint64
+ currEstab uint32
+ activeOpened uint32
+ passiveOpened uint32
+ connClosed uint32
+ estabResets uint32
+ attemptFails uint32
+ passiveDrops uint32
+ timeWaitReused uint32
+ inSegs uint64
+ predictAck uint32
+ predictData uint32
+ inDupAck uint32
+ inBadSum uint32
+ inBadLen uint32
+ inShort uint32
+ inDiscOldTime uint32
+ inAllBeforeWin uint32
+ inSomeBeforeWin uint32
+ inAllAfterWin uint32
+ inSomeAfterWin uint32
+ inOutOfOrder uint32
+ inAfterClose uint32
+ inWinProbes uint32
+ inWinUpdates uint32
+ outWinUpdates uint32
+ outSegs uint64
+ outDelayAcks uint32
+ outRsts uint32
+ retransSegs uint32
+ retransTimeouts uint32
+ retransDrops uint32
+ pmtuRetrans uint32
+ pmtuErrors uint32
+ outWinProbes uint32
+ probeDrops uint32
+ keepAliveProbes uint32
+ keepAliveDrops uint32
+ finwait2Drops uint32
+ acceptCount uint64
+ inBulkQSegs uint64
+ inDiscards uint64
+ connFloods uint32
+ connStalls uint32
+ cfgEphemDef uint16
+ ephemInUse uint16
+ ephemHiWater uint16
+ flags byte
+ _ [1]byte
+ ephemExhaust uint32
+ smcRCurrEstabLnks uint32
+ smcRLnkActTimeOut uint32
+ smcRActLnkOpened uint32
+ smcRPasLnkOpened uint32
+ smcRLnksClosed uint32
+ smcRCurrEstab uint32
+ smcRActiveOpened uint32
+ smcRPassiveOpened uint32
+ smcRConnClosed uint32
+ smcRInSegs uint64
+ smcROutSegs uint64
+ smcRInRsts uint32
+ smcROutRsts uint32
+ smcDCurrEstabLnks uint32
+ smcDActLnkOpened uint32
+ smcDPasLnkOpened uint32
+ smcDLnksClosed uint32
+ smcDCurrEstab uint32
+ smcDActiveOpened uint32
+ smcDPassiveOpened uint32
+ smcDConnClosed uint32
+ smcDInSegs uint64
+ smcDOutSegs uint64
+ smcDInRsts uint32
+ smcDOutRsts uint32
+}
+
+type nwmConnEntry struct {
+ ident uint32
+ local [28]byte // union of sockaddr4 and sockaddr6
+ remote [28]byte // union of sockaddr4 and sockaddr6
+ startTime [8]byte // uint64, changed to prevent padding from being inserted
+ lastActivity [8]byte // uint64
+ bytesIn [8]byte // uint64
+ bytesOut [8]byte // uint64
+ inSegs [8]byte // uint64
+ outSegs [8]byte // uint64
+ state uint16
+ activeOpen byte
+ flag01 byte
+ outBuffered uint32
+ inBuffered uint32
+ maxSndWnd uint32
+ reXmtCount uint32
+ congestionWnd uint32
+ ssThresh uint32
+ roundTripTime uint32
+ roundTripVar uint32
+ sendMSS uint32
+ sndWnd uint32
+ rcvBufSize uint32
+ sndBufSize uint32
+ outOfOrderCount uint32
+ lcl0WindowCount uint32
+ rmt0WindowCount uint32
+ dupacks uint32
+ flag02 byte
+ sockOpt6Cont byte
+ asid uint16
+ resourceName [8]byte
+ resourceId uint32
+ subtask uint32
+ sockOpt byte
+ sockOpt6 byte
+ clusterConnFlag byte
+ proto byte
+ targetAppl [8]byte
+ luName [8]byte
+ clientUserId [8]byte
+ logMode [8]byte
+ timeStamp uint32
+ timeStampAge uint32
+ serverResourceId uint32
+ intfName [16]byte
+ ttlsStatPol byte
+ ttlsStatConn byte
+ ttlsSSLProt uint16
+ ttlsNegCiph [2]byte
+ ttlsSecType byte
+ ttlsFIPS140Mode byte
+ ttlsUserID [8]byte
+ applData [40]byte
+ inOldestTime [8]byte // uint64
+ outOldestTime [8]byte // uint64
+ tcpTrustedPartner byte
+ _ [3]byte
+ bulkDataIntfName [16]byte
+ ttlsNegCiph4 [4]byte
+ smcReason uint32
+ lclSMCLinkId uint32
+ rmtSMCLinkId uint32
+ smcStatus byte
+ smcFlags byte
+ _ [2]byte
+ rcvWnd uint32
+ lclSMCBufSz uint32
+ rmtSMCBufSz uint32
+ ttlsSessID [32]byte
+ ttlsSessIDLen int16
+ _ [1]byte
+ smcDStatus byte
+ smcDReason uint32
+}
+
+var svcNameTable [][]byte = [][]byte{
+ []byte("\xc5\xe9\xc2\xd5\xd4\xc9\xc6\xf4"), // svc_EZBNMIF4
+}
+
+const (
+ svc_EZBNMIF4 = 0
+)
+
+func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
+ jobname := []byte("\x5c\x40\x40\x40\x40\x40\x40\x40") // "*"
+ responseBuffer := [4096]byte{0}
+ var bufferAlet, reasonCode uint32 = 0, 0
+ var bufferLen, returnValue, returnCode int32 = 4096, 0, 0
+
+ dsa := [18]uint64{0}
+ var argv [7]unsafe.Pointer
+ argv[0] = unsafe.Pointer(&jobname[0])
+ argv[1] = unsafe.Pointer(&responseBuffer[0])
+ argv[2] = unsafe.Pointer(&bufferAlet)
+ argv[3] = unsafe.Pointer(&bufferLen)
+ argv[4] = unsafe.Pointer(&returnValue)
+ argv[5] = unsafe.Pointer(&returnCode)
+ argv[6] = unsafe.Pointer(&reasonCode)
+
+ request := (*struct {
+ header nwmHeader
+ filter nwmFilter
+ })(unsafe.Pointer(&responseBuffer[0]))
+
+ EZBNMIF4 := svcLoad(&svcNameTable[svc_EZBNMIF4][0])
+ if EZBNMIF4 == nil {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // GetGlobalStats EZBNMIF4 call
+ request.header.ident = nwmHeaderIdentifier
+ request.header.length = uint32(unsafe.Sizeof(request.header))
+ request.header.version = nwmCurrentVer
+ request.header.nwmType = nwmGlobalStatsType
+ request.header.options = 0x80000000
+
+ svcCall(EZBNMIF4, &argv[0], &dsa[0])
+
+ // outputDesc field is filled by EZBNMIF4 on success
+ if returnCode != 0 || request.header.outputDesc.offset == 0 {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Check that EZBNMIF4 returned a nwmRecHeader
+ recHeader := (*nwmRecHeader)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset]))
+ if recHeader.ident != nwmRecHeaderIdentifier {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Parse nwmTriplets to get offsets of returned entries
+ var sections []*uint64
+ var sectionDesc *nwmTriplet = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[0]))
+ for i := uint32(0); i < uint32(recHeader.number); i++ {
+ offset := request.header.outputDesc.offset + uint32(unsafe.Sizeof(*recHeader)) + i*uint32(unsafe.Sizeof(*sectionDesc))
+ sectionDesc = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[offset]))
+ for j := uint32(0); j < sectionDesc.number; j++ {
+ offset = request.header.outputDesc.offset + sectionDesc.offset + j*sectionDesc.length
+ sections = append(sections, (*uint64)(unsafe.Pointer(&responseBuffer[offset])))
+ }
+ }
+
+ // Find nwmTCPStatsEntry in returned entries
+ var tcpStats *nwmTCPStatsEntry = nil
+ for _, ptr := range sections {
+ switch *ptr {
+ case nwmTCPStatsIdentifier:
+ if tcpStats != nil {
+ return nil, errnoErr(EINVAL)
+ }
+ tcpStats = (*nwmTCPStatsEntry)(unsafe.Pointer(ptr))
+ case nwmIPStatsIdentifier:
+ case nwmIPGStatsIdentifier:
+ case nwmUDPStatsIdentifier:
+ case nwmICMPGStatsEntry:
+ case nwmICMPTStatsEntry:
+ default:
+ return nil, errnoErr(EINVAL)
+ }
+ }
+ if tcpStats == nil {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // GetConnectionDetail EZBNMIF4 call
+ responseBuffer = [4096]byte{0}
+ dsa = [18]uint64{0}
+ bufferAlet, reasonCode = 0, 0
+ bufferLen, returnValue, returnCode = 4096, 0, 0
+ nameptr := (*uint32)(unsafe.Pointer(uintptr(0x21c))) // Get jobname of current process
+ nameptr = (*uint32)(unsafe.Pointer(uintptr(*nameptr + 12)))
+ argv[0] = unsafe.Pointer(uintptr(*nameptr))
+
+ request.header.ident = nwmHeaderIdentifier
+ request.header.length = uint32(unsafe.Sizeof(request.header))
+ request.header.version = nwmCurrentVer
+ request.header.nwmType = nwmTCPConnType
+ request.header.options = 0x80000000
+
+ request.filter.ident = nwmFilterIdentifier
+
+ var localSockaddr RawSockaddrAny
+ socklen := _Socklen(SizeofSockaddrAny)
+ err := getsockname(fd, &localSockaddr, &socklen)
+ if err != nil {
+ return nil, errnoErr(EINVAL)
+ }
+ if localSockaddr.Addr.Family == AF_INET {
+ localSockaddr := (*RawSockaddrInet4)(unsafe.Pointer(&localSockaddr.Addr))
+ localSockFilter := (*RawSockaddrInet4)(unsafe.Pointer(&request.filter.local[0]))
+ localSockFilter.Family = AF_INET
+ var i int
+ for i = 0; i < 4; i++ {
+ if localSockaddr.Addr[i] != 0 {
+ break
+ }
+ }
+ if i != 4 {
+ request.filter.flags |= nwmFilterLclAddrMask
+ for i = 0; i < 4; i++ {
+ localSockFilter.Addr[i] = localSockaddr.Addr[i]
+ }
+ }
+ if localSockaddr.Port != 0 {
+ request.filter.flags |= nwmFilterLclPortMask
+ localSockFilter.Port = localSockaddr.Port
+ }
+ } else if localSockaddr.Addr.Family == AF_INET6 {
+ localSockaddr := (*RawSockaddrInet6)(unsafe.Pointer(&localSockaddr.Addr))
+ localSockFilter := (*RawSockaddrInet6)(unsafe.Pointer(&request.filter.local[0]))
+ localSockFilter.Family = AF_INET6
+ var i int
+ for i = 0; i < 16; i++ {
+ if localSockaddr.Addr[i] != 0 {
+ break
+ }
+ }
+ if i != 16 {
+ request.filter.flags |= nwmFilterLclAddrMask
+ for i = 0; i < 16; i++ {
+ localSockFilter.Addr[i] = localSockaddr.Addr[i]
+ }
+ }
+ if localSockaddr.Port != 0 {
+ request.filter.flags |= nwmFilterLclPortMask
+ localSockFilter.Port = localSockaddr.Port
+ }
+ }
+
+ svcCall(EZBNMIF4, &argv[0], &dsa[0])
+
+ // outputDesc field is filled by EZBNMIF4 on success
+ if returnCode != 0 || request.header.outputDesc.offset == 0 {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Check that EZBNMIF4 returned a nwmConnEntry
+ conn := (*nwmConnEntry)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset]))
+ if conn.ident != nwmTCPConnIdentifier {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Copy data from the returned data structures into tcpInfo
+ // Stats from nwmConnEntry are specific to that connection.
+ // Stats from nwmTCPStatsEntry are global (to the interface?)
+ // Fields may not be an exact match. Some fields have no equivalent.
+ var tcpinfo TCPInfo
+ tcpinfo.State = uint8(conn.state)
+ tcpinfo.Ca_state = 0 // dummy
+ tcpinfo.Retransmits = uint8(tcpStats.retransSegs)
+ tcpinfo.Probes = uint8(tcpStats.outWinProbes)
+ tcpinfo.Backoff = 0 // dummy
+ tcpinfo.Options = 0 // dummy
+ tcpinfo.Rto = tcpStats.retransTimeouts
+ tcpinfo.Ato = tcpStats.outDelayAcks
+ tcpinfo.Snd_mss = conn.sendMSS
+ tcpinfo.Rcv_mss = conn.sendMSS // dummy
+ tcpinfo.Unacked = 0 // dummy
+ tcpinfo.Sacked = 0 // dummy
+ tcpinfo.Lost = 0 // dummy
+ tcpinfo.Retrans = conn.reXmtCount
+ tcpinfo.Fackets = 0 // dummy
+ tcpinfo.Last_data_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.lastActivity[0])))
+ tcpinfo.Last_ack_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.outOldestTime[0])))
+ tcpinfo.Last_data_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0])))
+ tcpinfo.Last_ack_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0])))
+ tcpinfo.Pmtu = conn.sendMSS // dummy, NWMIfRouteMtu is a candidate
+ tcpinfo.Rcv_ssthresh = conn.ssThresh
+ tcpinfo.Rtt = conn.roundTripTime
+ tcpinfo.Rttvar = conn.roundTripVar
+ tcpinfo.Snd_ssthresh = conn.ssThresh // dummy
+ tcpinfo.Snd_cwnd = conn.congestionWnd
+ tcpinfo.Advmss = conn.sendMSS // dummy
+ tcpinfo.Reordering = 0 // dummy
+ tcpinfo.Rcv_rtt = conn.roundTripTime // dummy
+ tcpinfo.Rcv_space = conn.sendMSS // dummy
+ tcpinfo.Total_retrans = conn.reXmtCount
+
+ svcUnload(&svcNameTable[svc_EZBNMIF4][0], EZBNMIF4)
+
+ return &tcpinfo, nil
+}
+
+// GetsockoptString returns the string value of the socket option opt for the
+// socket associated with fd at the given socket level.
+func GetsockoptString(fd, level, opt int) (string, error) {
+ buf := make([]byte, 256)
+ vallen := _Socklen(len(buf))
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
+ if err != nil {
+ return "", err
+ }
+
+ return string(buf[:vallen-1]), nil
+}
+
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+ var msg Msghdr
+ var rsa RawSockaddrAny
+ msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Namelen = SizeofSockaddrAny
+ var iov Iovec
+ if len(p) > 0 {
+ iov.Base = (*byte)(unsafe.Pointer(&p[0]))
+ iov.SetLen(len(p))
+ }
+ var dummy byte
+ if len(oob) > 0 {
+ // receive at least one normal byte
+ if len(p) == 0 {
+ iov.Base = &dummy
+ iov.SetLen(1)
+ }
+ msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ msg.SetControllen(len(oob))
+ }
+ msg.Iov = &iov
+ msg.Iovlen = 1
+ if n, err = recvmsg(fd, &msg, flags); err != nil {
+ return
+ }
+ oobn = int(msg.Controllen)
+ recvflags = int(msg.Flags)
+ // source address is only specified if the socket is unconnected
+ if rsa.Addr.Family != AF_UNSPEC {
+ // TODO(neeilan): Remove 0 arg added to get this compiling on z/OS
+ from, err = anyToSockaddr(0, &rsa)
+ }
+ return
+}
+
+func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
+ _, err = SendmsgN(fd, p, oob, to, flags)
+ return
+}
+
+func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+ var ptr unsafe.Pointer
+ var salen _Socklen
+ if to != nil {
+ var err error
+ ptr, salen, err = to.sockaddr()
+ if err != nil {
+ return 0, err
+ }
+ }
+ var msg Msghdr
+ msg.Name = (*byte)(unsafe.Pointer(ptr))
+ msg.Namelen = int32(salen)
+ var iov Iovec
+ if len(p) > 0 {
+ iov.Base = (*byte)(unsafe.Pointer(&p[0]))
+ iov.SetLen(len(p))
+ }
+ var dummy byte
+ if len(oob) > 0 {
+ // send at least one normal byte
+ if len(p) == 0 {
+ iov.Base = &dummy
+ iov.SetLen(1)
+ }
+ msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ msg.SetControllen(len(oob))
+ }
+ msg.Iov = &iov
+ msg.Iovlen = 1
+ if n, err = sendmsg(fd, &msg, flags); err != nil {
+ return 0, err
+ }
+ if len(oob) > 0 && len(p) == 0 {
+ n = 0
+ }
+ return n, nil
+}
+
+func Opendir(name string) (uintptr, error) {
+ p, err := BytePtrFromString(name)
+ if err != nil {
+ return 0, err
+ }
+ dir, _, e := syscall_syscall(SYS___OPENDIR_A, uintptr(unsafe.Pointer(p)), 0, 0)
+ runtime.KeepAlive(unsafe.Pointer(p))
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return dir, err
+}
+
+// clearsyscall.Errno resets the errno value to 0.
+func clearErrno()
+
+func Readdir(dir uintptr) (*Dirent, error) {
+ var ent Dirent
+ var res uintptr
+ // __readdir_r_a returns errno at the end of the directory stream, rather than 0.
+ // Therefore to avoid false positives we clear errno before calling it.
+
+ // TODO(neeilan): Commented this out to get sys/unix compiling on z/OS. Uncomment and fix. Error: "undefined: clearsyscall"
+ //clearsyscall.Errno() // TODO(mundaym): check pre-emption rules.
+
+ e, _, _ := syscall_syscall(SYS___READDIR_R_A, dir, uintptr(unsafe.Pointer(&ent)), uintptr(unsafe.Pointer(&res)))
+ var err error
+ if e != 0 {
+ err = errnoErr(Errno(e))
+ }
+ if res == 0 {
+ return nil, err
+ }
+ return &ent, err
+}
+
+func Closedir(dir uintptr) error {
+ _, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
+ if e != 0 {
+ return errnoErr(e)
+ }
+ return nil
+}
+
+func Seekdir(dir uintptr, pos int) {
+ _, _, _ = syscall_syscall(SYS_SEEKDIR, dir, uintptr(pos), 0)
+}
+
+func Telldir(dir uintptr) (int, error) {
+ p, _, e := syscall_syscall(SYS_TELLDIR, dir, 0, 0)
+ pos := int(p)
+ if pos == -1 {
+ return pos, errnoErr(e)
+ }
+ return pos, nil
+}
+
+// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
+func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
+ // struct flock is packed on z/OS. We can't emulate that in Go so
+ // instead we pack it here.
+ var flock [24]byte
+ *(*int16)(unsafe.Pointer(&flock[0])) = lk.Type
+ *(*int16)(unsafe.Pointer(&flock[2])) = lk.Whence
+ *(*int64)(unsafe.Pointer(&flock[4])) = lk.Start
+ *(*int64)(unsafe.Pointer(&flock[12])) = lk.Len
+ *(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid
+ _, _, errno := syscall_syscall(SYS_FCNTL, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock)))
+ lk.Type = *(*int16)(unsafe.Pointer(&flock[0]))
+ lk.Whence = *(*int16)(unsafe.Pointer(&flock[2]))
+ lk.Start = *(*int64)(unsafe.Pointer(&flock[4]))
+ lk.Len = *(*int64)(unsafe.Pointer(&flock[12]))
+ lk.Pid = *(*int32)(unsafe.Pointer(&flock[20]))
+ if errno == 0 {
+ return nil
+ }
+ return errno
+}
+
+func Flock(fd int, how int) error {
+
+ var flock_type int16
+ var fcntl_cmd int
+
+ switch how {
+ case LOCK_SH | LOCK_NB:
+ flock_type = F_RDLCK
+ fcntl_cmd = F_SETLK
+ case LOCK_EX | LOCK_NB:
+ flock_type = F_WRLCK
+ fcntl_cmd = F_SETLK
+ case LOCK_EX:
+ flock_type = F_WRLCK
+ fcntl_cmd = F_SETLKW
+ case LOCK_UN:
+ flock_type = F_UNLCK
+ fcntl_cmd = F_SETLKW
+ default:
+ }
+
+ flock := Flock_t{
+ Type: int16(flock_type),
+ Whence: int16(0),
+ Start: int64(0),
+ Len: int64(0),
+ Pid: int32(Getppid()),
+ }
+
+ err := FcntlFlock(uintptr(fd), fcntl_cmd, &flock)
+ return err
+}
+
+func Mlock(b []byte) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Mlock2(b []byte, flags int) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Munlock(b []byte) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Munlockall() (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ClockGettime(clockid int32, ts *Timespec) error {
+
+ var ticks_per_sec uint32 = 100 //TODO(kenan): value is currently hardcoded; need sysconf() call otherwise
+ var nsec_per_sec int64 = 1000000000
+
+ if ts == nil {
+ return EFAULT
+ }
+ if clockid == CLOCK_REALTIME || clockid == CLOCK_MONOTONIC {
+ var nanotime int64 = runtime.Nanotime1()
+ ts.Sec = nanotime / nsec_per_sec
+ ts.Nsec = nanotime % nsec_per_sec
+ } else if clockid == CLOCK_PROCESS_CPUTIME_ID || clockid == CLOCK_THREAD_CPUTIME_ID {
+ var tm Tms
+ _, err := Times(&tm)
+ if err != nil {
+ return EFAULT
+ }
+ ts.Sec = int64(tm.Utime / ticks_per_sec)
+ ts.Nsec = int64(tm.Utime) * nsec_per_sec / int64(ticks_per_sec)
+ } else {
+ return EINVAL
+ }
+ return nil
+}
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ fd, err := open(path, O_RDONLY, 0)
+ defer Close(fd)
+ if err != nil {
+ return err
+ }
+ return Fstatfs(fd, stat)
+}
+
+var (
+ Stdin = 0
+ Stdout = 1
+ Stderr = 2
+)
+
+// Do the interface allocations only once for common
+// Errno values.
+var (
+ errEAGAIN error = syscall.EAGAIN
+ errEINVAL error = syscall.EINVAL
+ errENOENT error = syscall.ENOENT
+)
+
+var (
+ signalNameMapOnce sync.Once
+ signalNameMap map[string]syscall.Signal
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e Errno) error {
+ switch e {
+ case 0:
+ return nil
+ case EAGAIN:
+ return errEAGAIN
+ case EINVAL:
+ return errEINVAL
+ case ENOENT:
+ return errENOENT
+ }
+ return e
+}
+
+// ErrnoName returns the error name for error number e.
+func ErrnoName(e Errno) string {
+ i := sort.Search(len(errorList), func(i int) bool {
+ return errorList[i].num >= e
+ })
+ if i < len(errorList) && errorList[i].num == e {
+ return errorList[i].name
+ }
+ return ""
+}
+
+// SignalName returns the signal name for signal number s.
+func SignalName(s syscall.Signal) string {
+ i := sort.Search(len(signalList), func(i int) bool {
+ return signalList[i].num >= s
+ })
+ if i < len(signalList) && signalList[i].num == s {
+ return signalList[i].name
+ }
+ return ""
+}
+
+// SignalNum returns the syscall.Signal for signal named s,
+// or 0 if a signal with such name is not found.
+// The signal name should start with "SIG".
+func SignalNum(s string) syscall.Signal {
+ signalNameMapOnce.Do(func() {
+ signalNameMap = make(map[string]syscall.Signal, len(signalList))
+ for _, signal := range signalList {
+ signalNameMap[signal.name] = signal.num
+ }
+ })
+ return signalNameMap[s]
+}
+
+// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
+func clen(n []byte) int {
+ i := bytes.IndexByte(n, 0)
+ if i == -1 {
+ i = len(n)
+ }
+ return i
+}
+
+// Mmap manager, for use by operating system-specific implementations.
+
+type mmapper struct {
+ sync.Mutex
+ active map[*byte][]byte // active mappings; key is last byte in mapping
+ mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
+ munmap func(addr uintptr, length uintptr) error
+}
+
+func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+ if length <= 0 {
+ return nil, EINVAL
+ }
+
+ // Map the requested memory.
+ addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
+ if errno != nil {
+ return nil, errno
+ }
+
+ // Slice memory layout
+ var sl = struct {
+ addr uintptr
+ len int
+ cap int
+ }{addr, length, length}
+
+ // Use unsafe to turn sl into a []byte.
+ b := *(*[]byte)(unsafe.Pointer(&sl))
+
+ // Register mapping in m and return it.
+ p := &b[cap(b)-1]
+ m.Lock()
+ defer m.Unlock()
+ m.active[p] = b
+ return b, nil
+}
+
+func (m *mmapper) Munmap(data []byte) (err error) {
+ if len(data) == 0 || len(data) != cap(data) {
+ return EINVAL
+ }
+
+ // Find the base of the mapping.
+ p := &data[cap(data)-1]
+ m.Lock()
+ defer m.Unlock()
+ b := m.active[p]
+ if b == nil || &b[0] != &data[0] {
+ return EINVAL
+ }
+
+ // Unmap the memory and update m.
+ if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
+ return errno
+ }
+ delete(m.active, p)
+ return nil
+}
+
+func Read(fd int, p []byte) (n int, err error) {
+ n, err = read(fd, p)
+ if raceenabled {
+ if n > 0 {
+ raceWriteRange(unsafe.Pointer(&p[0]), n)
+ }
+ if err == nil {
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+ }
+ return
+}
+
+func Write(fd int, p []byte) (n int, err error) {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ n, err = write(fd, p)
+ if raceenabled && n > 0 {
+ raceReadRange(unsafe.Pointer(&p[0]), n)
+ }
+ return
+}
+
+// For testing: clients can set this flag to force
+// creation of IPv6 sockets to return EAFNOSUPPORT.
+var SocketDisableIPv6 bool
+
+// Sockaddr represents a socket address.
+type Sockaddr interface {
+ sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
+}
+
+// SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets.
+type SockaddrInet4 struct {
+ Port int
+ Addr [4]byte
+ raw RawSockaddrInet4
+}
+
+// SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets.
+type SockaddrInet6 struct {
+ Port int
+ ZoneId uint32
+ Addr [16]byte
+ raw RawSockaddrInet6
+}
+
+// SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets.
+type SockaddrUnix struct {
+ Name string
+ raw RawSockaddrUnix
+}
+
+func Bind(fd int, sa Sockaddr) (err error) {
+ ptr, n, err := sa.sockaddr()
+ if err != nil {
+ return err
+ }
+ return bind(fd, ptr, n)
+}
+
+func Connect(fd int, sa Sockaddr) (err error) {
+ ptr, n, err := sa.sockaddr()
+ if err != nil {
+ return err
+ }
+ return connect(fd, ptr, n)
+}
+
+func Getpeername(fd int) (sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if err = getpeername(fd, &rsa, &len); err != nil {
+ return
+ }
+ return anyToSockaddr(fd, &rsa)
+}
+
+func GetsockoptByte(fd, level, opt int) (value byte, err error) {
+ var n byte
+ vallen := _Socklen(1)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
+ return n, err
+}
+
+func GetsockoptInt(fd, level, opt int) (value int, err error) {
+ var n int32
+ vallen := _Socklen(4)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
+ return int(n), err
+}
+
+func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
+ vallen := _Socklen(4)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
+ return value, err
+}
+
+func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
+ var value IPMreq
+ vallen := _Socklen(SizeofIPMreq)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
+ var value IPv6Mreq
+ vallen := _Socklen(SizeofIPv6Mreq)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
+ var value IPv6MTUInfo
+ vallen := _Socklen(SizeofIPv6MTUInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
+ var value ICMPv6Filter
+ vallen := _Socklen(SizeofICMPv6Filter)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptLinger(fd, level, opt int) (*Linger, error) {
+ var linger Linger
+ vallen := _Socklen(SizeofLinger)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen)
+ return &linger, err
+}
+
+func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {
+ var tv Timeval
+ vallen := _Socklen(unsafe.Sizeof(tv))
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen)
+ return &tv, err
+}
+
+func GetsockoptUint64(fd, level, opt int) (value uint64, err error) {
+ var n uint64
+ vallen := _Socklen(8)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
+ return n, err
+}
+
+func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
+ return
+ }
+ if rsa.Addr.Family != AF_UNSPEC {
+ from, err = anyToSockaddr(fd, &rsa)
+ }
+ return
+}
+
+func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
+ ptr, n, err := to.sockaddr()
+ if err != nil {
+ return err
+ }
+ return sendto(fd, p, flags, ptr, n)
+}
+
+func SetsockoptByte(fd, level, opt int, value byte) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
+}
+
+func SetsockoptInt(fd, level, opt int, value int) (err error) {
+ var n = int32(value)
+ return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
+}
+
+func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
+}
+
+func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
+}
+
+func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
+}
+
+func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
+ return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
+}
+
+func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
+}
+
+func SetsockoptString(fd, level, opt int, s string) (err error) {
+ var p unsafe.Pointer
+ if len(s) > 0 {
+ p = unsafe.Pointer(&[]byte(s)[0])
+ }
+ return setsockopt(fd, level, opt, p, uintptr(len(s)))
+}
+
+func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
+}
+
+func SetsockoptUint64(fd, level, opt int, value uint64) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)
+}
+
+func Socket(domain, typ, proto int) (fd int, err error) {
+ if domain == AF_INET6 && SocketDisableIPv6 {
+ return -1, EAFNOSUPPORT
+ }
+ fd, err = socket(domain, typ, proto)
+ return
+}
+
+func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
+ var fdx [2]int32
+ err = socketpair(domain, typ, proto, &fdx)
+ if err == nil {
+ fd[0] = int(fdx[0])
+ fd[1] = int(fdx[1])
+ }
+ return
+}
+
+var ioSync int64
+
+func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
+
+func SetNonblock(fd int, nonblocking bool) (err error) {
+ flag, err := fcntl(fd, F_GETFL, 0)
+ if err != nil {
+ return err
+ }
+ if nonblocking {
+ flag |= O_NONBLOCK
+ } else {
+ flag &= ^O_NONBLOCK
+ }
+ _, err = fcntl(fd, F_SETFL, flag)
+ return err
+}
+
+// Exec calls execve(2), which replaces the calling executable in the process
+// tree. argv0 should be the full path to an executable ("/bin/ls") and the
+// executable name should also be the first argument in argv (["ls", "-l"]).
+// envv are the environment variables that should be passed to the new
+// process (["USER=go", "PWD=/tmp"]).
+func Exec(argv0 string, argv []string, envv []string) error {
+ return syscall.Exec(argv0, argv, envv)
+}
+
+func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
+ if needspace := 8 - len(fstype); needspace <= 0 {
+ fstype = fstype[:8]
+ } else {
+ fstype += " "[:needspace]
+ }
+ return mount_LE(target, source, fstype, uint32(flags), int32(len(data)), data)
+}
+
+func Unmount(name string, mtm int) (err error) {
+ // mountpoint is always a full path and starts with a '/'
+ // check if input string is not a mountpoint but a filesystem name
+ if name[0] != '/' {
+ return unmount(name, mtm)
+ }
+ // treat name as mountpoint
+ b2s := func(arr []byte) string {
+ nulli := bytes.IndexByte(arr, 0)
+ if nulli == -1 {
+ return string(arr)
+ } else {
+ return string(arr[:nulli])
+ }
+ }
+ var buffer struct {
+ header W_Mnth
+ fsinfo [64]W_Mntent
+ }
+ fsCount, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer)))
+ if err != nil {
+ return err
+ }
+ if fsCount == 0 {
+ return EINVAL
+ }
+ for i := 0; i < fsCount; i++ {
+ if b2s(buffer.fsinfo[i].Mountpoint[:]) == name {
+ err = unmount(b2s(buffer.fsinfo[i].Fsname[:]), mtm)
+ break
+ }
+ }
+ return err
+}
diff --git a/vendor/golang.org/x/sys/unix/sysvshm_linux.go b/vendor/golang.org/x/sys/unix/sysvshm_linux.go
new file mode 100644
index 0000000..2c3a443
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sysvshm_linux.go
@@ -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/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/vendor/golang.org/x/sys/unix/sysvshm_unix.go
new file mode 100644
index 0000000..0bb4c8d
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sysvshm_unix.go
@@ -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/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
new file mode 100644
index 0000000..71bddef
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
@@ -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)
+}
diff --git a/vendor/golang.org/x/sys/unix/timestruct.go b/vendor/golang.org/x/sys/unix/timestruct.go
index 4a672f5..3d89304 100644
--- a/vendor/golang.org/x/sys/unix/timestruct.go
+++ b/vendor/golang.org/x/sys/unix/timestruct.go
@@ -2,18 +2,17 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
import "time"
-// TimespecToNsec converts a Timespec value into a number of
-// nanoseconds since the Unix epoch.
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+// TimespecToNSec returns the time stored in ts as nanoseconds.
+func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
-// NsecToTimespec takes a number of nanoseconds since the Unix epoch
-// and returns the corresponding Timespec value.
+// NsecToTimespec converts a number of nanoseconds into a Timespec.
func NsecToTimespec(nsec int64) Timespec {
sec := nsec / 1e9
nsec = nsec % 1e9
@@ -42,12 +41,10 @@ func TimeToTimespec(t time.Time) (Timespec, error) {
return ts, nil
}
-// TimevalToNsec converts a Timeval value into a number of nanoseconds
-// since the Unix epoch.
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
+// TimevalToNsec returns the time stored in tv as nanoseconds.
+func TimevalToNsec(tv Timeval) int64 { return tv.Nano() }
-// NsecToTimeval takes a number of nanoseconds since the Unix epoch
-// and returns the corresponding Timeval value.
+// NsecToTimeval converts a number of nanoseconds into a Timeval.
func NsecToTimeval(nsec int64) Timeval {
nsec += 999 // round up to microsecond
usec := nsec % 1e9 / 1e3
@@ -59,24 +56,22 @@ func NsecToTimeval(nsec int64) Timeval {
return setTimeval(sec, usec)
}
-// Unix returns ts as the number of seconds and nanoseconds elapsed since the
-// Unix epoch.
+// Unix returns the time stored in ts as seconds plus nanoseconds.
func (ts *Timespec) Unix() (sec int64, nsec int64) {
return int64(ts.Sec), int64(ts.Nsec)
}
-// Unix returns tv as the number of seconds and nanoseconds elapsed since the
-// Unix epoch.
+// Unix returns the time stored in tv as seconds plus nanoseconds.
func (tv *Timeval) Unix() (sec int64, nsec int64) {
return int64(tv.Sec), int64(tv.Usec) * 1000
}
-// Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.
+// Nano returns the time stored in ts as nanoseconds.
func (ts *Timespec) Nano() int64 {
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
}
-// Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.
+// Nano returns the time stored in tv as nanoseconds.
func (tv *Timeval) Nano() int64 {
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
}
diff --git a/vendor/golang.org/x/sys/unix/xattr_bsd.go b/vendor/golang.org/x/sys/unix/xattr_bsd.go
index 30c1d71..25df1e3 100644
--- a/vendor/golang.org/x/sys/unix/xattr_bsd.go
+++ b/vendor/golang.org/x/sys/unix/xattr_bsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build freebsd || netbsd
// +build freebsd netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
index 104994b..ca9799b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
@@ -1,6 +1,7 @@
// mkerrors.sh -maix32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc && aix
// +build ppc,aix
// Created by cgo -godefs - DO NOT EDIT
diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
index 4fc8d30..200c8c2 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -maix64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && aix
// +build ppc64,aix
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index e3ff2ee..476a1c7 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && darwin
// +build amd64,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -11,1475 +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 = 0x28
- 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_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- 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 = 0x41c7ff00
- 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
- 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
- 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 = 0xf5
- 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_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 = 0xf
- EVFILT_THREADMARKER = 0xf
- 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
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_RETURN = 0x61
- 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_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- 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_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_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_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x300
- 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_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_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- 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_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_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
- 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_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
- 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_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_ROOTFS = 0x4000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0x17f0f5ff
- 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_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_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- 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_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_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_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- 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
- 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
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- 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
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- 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_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
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
deleted file mode 100644
index 3e41757..0000000
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ /dev/null
@@ -1,1784 +0,0 @@
-// mkerrors.sh
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build arm,darwin
-
-// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- _const.go
-
-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 = 0x28
- 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_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- 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 = 0x41c7ff00
- 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
- 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
- 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 = 0xf5
- 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_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 = 0xf
- EVFILT_THREADMARKER = 0xf
- 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
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_RETURN = 0x61
- 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_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- 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_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_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_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x300
- 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_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_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- 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_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_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
- 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_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
- 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_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_ROOTFS = 0x4000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0x17f0f5ff
- 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_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_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- 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_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_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_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- 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
- 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
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- 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
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- 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_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
-)
-
-// Errors
-const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
- EADDRINUSE = syscall.Errno(0x30)
- EADDRNOTAVAIL = syscall.Errno(0x31)
- EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0x23)
- EALREADY = syscall.Errno(0x25)
- EAUTH = syscall.Errno(0x50)
- EBADARCH = syscall.Errno(0x56)
- EBADEXEC = syscall.Errno(0x55)
- EBADF = syscall.Errno(0x9)
- EBADMACHO = syscall.Errno(0x58)
- EBADMSG = syscall.Errno(0x5e)
- EBADRPC = syscall.Errno(0x48)
- EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x59)
- ECHILD = syscall.Errno(0xa)
- ECONNABORTED = syscall.Errno(0x35)
- ECONNREFUSED = syscall.Errno(0x3d)
- ECONNRESET = syscall.Errno(0x36)
- EDEADLK = syscall.Errno(0xb)
- EDESTADDRREQ = syscall.Errno(0x27)
- EDEVERR = syscall.Errno(0x53)
- EDOM = syscall.Errno(0x21)
- EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
- EFTYPE = syscall.Errno(0x4f)
- EHOSTDOWN = syscall.Errno(0x40)
- EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x5a)
- EILSEQ = syscall.Errno(0x5c)
- EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
- EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x6a)
- ELOOP = syscall.Errno(0x3e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
- EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5f)
- ENAMETOOLONG = syscall.Errno(0x3f)
- ENEEDAUTH = syscall.Errno(0x51)
- ENETDOWN = syscall.Errno(0x32)
- ENETRESET = syscall.Errno(0x34)
- ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
- ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x60)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
- ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x61)
- ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5b)
- ENOPOLICY = syscall.Errno(0x67)
- ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x62)
- ENOSTR = syscall.Errno(0x63)
- ENOSYS = syscall.Errno(0x4e)
- ENOTBLK = syscall.Errno(0xf)
- ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
- ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x68)
- ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
- ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x66)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x69)
- EPERM = syscall.Errno(0x1)
- EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
- EPROCLIM = syscall.Errno(0x43)
- EPROCUNAVAIL = syscall.Errno(0x4c)
- EPROGMISMATCH = syscall.Errno(0x4b)
- EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x64)
- EPROTONOSUPPORT = syscall.Errno(0x2b)
- EPROTOTYPE = syscall.Errno(0x29)
- EPWROFF = syscall.Errno(0x52)
- EQFULL = syscall.Errno(0x6a)
- ERANGE = syscall.Errno(0x22)
- EREMOTE = syscall.Errno(0x47)
- EROFS = syscall.Errno(0x1e)
- ERPCMISMATCH = syscall.Errno(0x49)
- ESHLIBVERS = syscall.Errno(0x57)
- ESHUTDOWN = syscall.Errno(0x3a)
- ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
- ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x65)
- ETIMEDOUT = syscall.Errno(0x3c)
- ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
- EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0x23)
- EXDEV = syscall.Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
- SIGBUS = syscall.Signal(0xa)
- SIGCHLD = syscall.Signal(0x14)
- SIGCONT = syscall.Signal(0x13)
- SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINFO = syscall.Signal(0x1d)
- SIGINT = syscall.Signal(0x2)
- SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
- SIGPROF = syscall.Signal(0x1b)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
- SIGSTOP = syscall.Signal(0x11)
- SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
- SIGTSTP = syscall.Signal(0x12)
- SIGTTIN = syscall.Signal(0x15)
- SIGTTOU = syscall.Signal(0x16)
- SIGURG = syscall.Signal(0x10)
- SIGUSR1 = syscall.Signal(0x1e)
- SIGUSR2 = syscall.Signal(0x1f)
- SIGVTALRM = syscall.Signal(0x1a)
- SIGWINCH = syscall.Signal(0x1c)
- SIGXCPU = syscall.Signal(0x18)
- SIGXFSZ = syscall.Signal(0x19)
-)
-
-// Error table
-var errorList = [...]struct {
- num syscall.Errno
- name string
- desc string
-}{
- {1, "EPERM", "operation not permitted"},
- {2, "ENOENT", "no such file or directory"},
- {3, "ESRCH", "no such process"},
- {4, "EINTR", "interrupted system call"},
- {5, "EIO", "input/output error"},
- {6, "ENXIO", "device not configured"},
- {7, "E2BIG", "argument list too long"},
- {8, "ENOEXEC", "exec format error"},
- {9, "EBADF", "bad file descriptor"},
- {10, "ECHILD", "no child processes"},
- {11, "EDEADLK", "resource deadlock avoided"},
- {12, "ENOMEM", "cannot allocate memory"},
- {13, "EACCES", "permission denied"},
- {14, "EFAULT", "bad address"},
- {15, "ENOTBLK", "block device required"},
- {16, "EBUSY", "resource busy"},
- {17, "EEXIST", "file exists"},
- {18, "EXDEV", "cross-device link"},
- {19, "ENODEV", "operation not supported by device"},
- {20, "ENOTDIR", "not a directory"},
- {21, "EISDIR", "is a directory"},
- {22, "EINVAL", "invalid argument"},
- {23, "ENFILE", "too many open files in system"},
- {24, "EMFILE", "too many open files"},
- {25, "ENOTTY", "inappropriate ioctl for device"},
- {26, "ETXTBSY", "text file busy"},
- {27, "EFBIG", "file too large"},
- {28, "ENOSPC", "no space left on device"},
- {29, "ESPIPE", "illegal seek"},
- {30, "EROFS", "read-only file system"},
- {31, "EMLINK", "too many links"},
- {32, "EPIPE", "broken pipe"},
- {33, "EDOM", "numerical argument out of domain"},
- {34, "ERANGE", "result too large"},
- {35, "EAGAIN", "resource temporarily unavailable"},
- {36, "EINPROGRESS", "operation now in progress"},
- {37, "EALREADY", "operation already in progress"},
- {38, "ENOTSOCK", "socket operation on non-socket"},
- {39, "EDESTADDRREQ", "destination address required"},
- {40, "EMSGSIZE", "message too long"},
- {41, "EPROTOTYPE", "protocol wrong type for socket"},
- {42, "ENOPROTOOPT", "protocol not available"},
- {43, "EPROTONOSUPPORT", "protocol not supported"},
- {44, "ESOCKTNOSUPPORT", "socket type not supported"},
- {45, "ENOTSUP", "operation not supported"},
- {46, "EPFNOSUPPORT", "protocol family not supported"},
- {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
- {48, "EADDRINUSE", "address already in use"},
- {49, "EADDRNOTAVAIL", "can't assign requested address"},
- {50, "ENETDOWN", "network is down"},
- {51, "ENETUNREACH", "network is unreachable"},
- {52, "ENETRESET", "network dropped connection on reset"},
- {53, "ECONNABORTED", "software caused connection abort"},
- {54, "ECONNRESET", "connection reset by peer"},
- {55, "ENOBUFS", "no buffer space available"},
- {56, "EISCONN", "socket is already connected"},
- {57, "ENOTCONN", "socket is not connected"},
- {58, "ESHUTDOWN", "can't send after socket shutdown"},
- {59, "ETOOMANYREFS", "too many references: can't splice"},
- {60, "ETIMEDOUT", "operation timed out"},
- {61, "ECONNREFUSED", "connection refused"},
- {62, "ELOOP", "too many levels of symbolic links"},
- {63, "ENAMETOOLONG", "file name too long"},
- {64, "EHOSTDOWN", "host is down"},
- {65, "EHOSTUNREACH", "no route to host"},
- {66, "ENOTEMPTY", "directory not empty"},
- {67, "EPROCLIM", "too many processes"},
- {68, "EUSERS", "too many users"},
- {69, "EDQUOT", "disc quota exceeded"},
- {70, "ESTALE", "stale NFS file handle"},
- {71, "EREMOTE", "too many levels of remote in path"},
- {72, "EBADRPC", "RPC struct is bad"},
- {73, "ERPCMISMATCH", "RPC version wrong"},
- {74, "EPROGUNAVAIL", "RPC prog. not avail"},
- {75, "EPROGMISMATCH", "program version wrong"},
- {76, "EPROCUNAVAIL", "bad procedure for program"},
- {77, "ENOLCK", "no locks available"},
- {78, "ENOSYS", "function not implemented"},
- {79, "EFTYPE", "inappropriate file type or format"},
- {80, "EAUTH", "authentication error"},
- {81, "ENEEDAUTH", "need authenticator"},
- {82, "EPWROFF", "device power is off"},
- {83, "EDEVERR", "device error"},
- {84, "EOVERFLOW", "value too large to be stored in data type"},
- {85, "EBADEXEC", "bad executable (or shared library)"},
- {86, "EBADARCH", "bad CPU type in executable"},
- {87, "ESHLIBVERS", "shared library version mismatch"},
- {88, "EBADMACHO", "malformed Mach-o file"},
- {89, "ECANCELED", "operation canceled"},
- {90, "EIDRM", "identifier removed"},
- {91, "ENOMSG", "no message of desired type"},
- {92, "EILSEQ", "illegal byte sequence"},
- {93, "ENOATTR", "attribute not found"},
- {94, "EBADMSG", "bad message"},
- {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
- {96, "ENODATA", "no message available on STREAM"},
- {97, "ENOLINK", "ENOLINK (Reserved)"},
- {98, "ENOSR", "no STREAM resources"},
- {99, "ENOSTR", "not a STREAM"},
- {100, "EPROTO", "protocol error"},
- {101, "ETIME", "STREAM ioctl timeout"},
- {102, "EOPNOTSUPP", "operation not supported on socket"},
- {103, "ENOPOLICY", "policy not found"},
- {104, "ENOTRECOVERABLE", "state not recoverable"},
- {105, "EOWNERDEAD", "previous owner died"},
- {106, "EQFULL", "interface output queue is full"},
-}
-
-// Signal table
-var signalList = [...]struct {
- num syscall.Signal
- name string
- desc string
-}{
- {1, "SIGHUP", "hangup"},
- {2, "SIGINT", "interrupt"},
- {3, "SIGQUIT", "quit"},
- {4, "SIGILL", "illegal instruction"},
- {5, "SIGTRAP", "trace/BPT trap"},
- {6, "SIGABRT", "abort trap"},
- {7, "SIGEMT", "EMT trap"},
- {8, "SIGFPE", "floating point exception"},
- {9, "SIGKILL", "killed"},
- {10, "SIGBUS", "bus error"},
- {11, "SIGSEGV", "segmentation fault"},
- {12, "SIGSYS", "bad system call"},
- {13, "SIGPIPE", "broken pipe"},
- {14, "SIGALRM", "alarm clock"},
- {15, "SIGTERM", "terminated"},
- {16, "SIGURG", "urgent I/O condition"},
- {17, "SIGSTOP", "suspended (signal)"},
- {18, "SIGTSTP", "suspended"},
- {19, "SIGCONT", "continued"},
- {20, "SIGCHLD", "child exited"},
- {21, "SIGTTIN", "stopped (tty input)"},
- {22, "SIGTTOU", "stopped (tty output)"},
- {23, "SIGIO", "I/O possible"},
- {24, "SIGXCPU", "cputime limit exceeded"},
- {25, "SIGXFSZ", "filesize limit exceeded"},
- {26, "SIGVTALRM", "virtual timer expired"},
- {27, "SIGPROF", "profiling timer expired"},
- {28, "SIGWINCH", "window size changes"},
- {29, "SIGINFO", "information request"},
- {30, "SIGUSR1", "user defined signal 1"},
- {31, "SIGUSR2", "user defined signal 2"},
-}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index cbd8ed1..e36f517 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && darwin
// +build arm64,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -11,1475 +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 = 0x28
- 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_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- 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 = 0x41c7ff00
- 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
- 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
- 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 = 0xf5
- 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_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 = 0xf
- EVFILT_THREADMARKER = 0xf
- 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
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_RETURN = 0x61
- 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_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- 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_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_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_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x300
- 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_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_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- 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_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_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
- 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_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
- 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_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_ROOTFS = 0x4000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0x17f0f5ff
- 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_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_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- 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_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_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_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- 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
- 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
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- 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
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- 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_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
diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
index 6130471..17bba0e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -62,6 +63,7 @@ const (
B28800 = 0x7080
B300 = 0x12c
B38400 = 0x9600
+ B460800 = 0x70800
B4800 = 0x12c0
B50 = 0x32
B57600 = 0xe100
@@ -69,12 +71,15 @@ const (
B7200 = 0x1c20
B75 = 0x4b
B76800 = 0x12c00
+ B921600 = 0xe1000
B9600 = 0x2580
+ BIOCFEEDBACK = 0x8004427d
BIOCFLUSH = 0x20004268
BIOCGBLEN = 0x40044266
BIOCGDLT = 0x4004426a
BIOCGDLTLIST = 0xc0104279
BIOCGETIF = 0x4020426b
+ BIOCGFEEDBACK = 0x4004427c
BIOCGHDRCMPLT = 0x40044274
BIOCGRSIG = 0x40044272
BIOCGRTIMEOUT = 0x4010426e
@@ -88,6 +93,7 @@ const (
BIOCSETF = 0x80104267
BIOCSETIF = 0x8020426c
BIOCSETWF = 0x8010427b
+ BIOCSFEEDBACK = 0x8004427d
BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044273
BIOCSRTIMEOUT = 0x8010426d
@@ -125,6 +131,7 @@ const (
BPF_MINBUFSIZE = 0x20
BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7
+ BPF_MOD = 0x90
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
@@ -139,6 +146,7 @@ const (
BPF_TXA = 0x80
BPF_W = 0x0
BPF_X = 0x8
+ BPF_XOR = 0xa0
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
@@ -156,6 +164,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -175,6 +189,7 @@ const (
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
@@ -184,22 +199,33 @@ const (
DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5
+ DLT_BLUETOOTH_BREDR_BB = 0xff
DLT_BLUETOOTH_HCI_H4 = 0xbb
DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
+ DLT_BLUETOOTH_LE_LL = 0xfb
+ DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100
+ DLT_BLUETOOTH_LINUX_MONITOR = 0xfe
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_EPON = 0x103
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
@@ -209,6 +235,8 @@ const (
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
@@ -218,18 +246,28 @@ const (
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_INFINIBAND = 0xf7
DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7
DLT_IPMB_LINUX = 0xd1
+ DLT_IPMI_HPM_2 = 0x104
+ DLT_IPNET = 0xe2
+ DLT_IPOIB = 0xf2
+ DLT_IPV4 = 0xe4
+ DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
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
@@ -242,25 +280,40 @@ const (
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_SLL = 0x71
DLT_LOOP = 0x6c
DLT_LTALK = 0x72
+ DLT_MATCHING_MAX = 0x109
+ 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_NETLINK = 0xfd
+ DLT_NFC_LLCP = 0xf5
+ DLT_NFLOG = 0xef
+ DLT_NG40 = 0xf4
DLT_NULL = 0x0
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x12
+ DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
DLT_PPP_BSDOS = 0x10
@@ -269,22 +322,51 @@ const (
DLT_PPP_SERIAL = 0x32
DLT_PPP_WITH_DIR = 0xcc
DLT_PRISM_HEADER = 0x77
+ DLT_PROFIBUS_DL = 0x101
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
+ DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
+ DLT_SCTP = 0xf8
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_USBPCAP = 0xf9
+ DLT_USB_FREEBSD = 0xba
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_WATTSTOPPER_DLM = 0x107
+ DLT_WIHART = 0xdf
+ DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DBF = 0xf
@@ -323,10 +405,11 @@ const (
EV_EOF = 0x8000
EV_ERROR = 0x4000
EV_FLAG1 = 0x2000
+ EV_HUP = 0x800
EV_NODATA = 0x1000
EV_ONESHOT = 0x10
EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
+ EV_SYSFLAGS = 0xf800
EXTA = 0x4b00
EXTB = 0x9600
EXTEXIT_LWP = 0x10000
@@ -365,8 +448,9 @@ const (
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x118e72
+ IFF_CANTCHANGE = 0x318e72
IFF_DEBUG = 0x4
+ IFF_IDIRECT = 0x200000
IFF_LINK0 = 0x1000
IFF_LINK1 = 0x2000
IFF_LINK2 = 0x4000
@@ -441,7 +525,6 @@ const (
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
@@ -614,6 +697,7 @@ const (
IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c
IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_MASK = 0xfffffffe
IPPROTO_3PC = 0x22
IPPROTO_ADFS = 0x44
IPPROTO_AH = 0x33
@@ -735,7 +819,6 @@ const (
IPV6_DEFHLIM = 0x40
IPV6_DONTFRAG = 0x3e
IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FRAGTTL = 0x78
@@ -747,7 +830,6 @@ const (
IPV6_HLIMDEC = 0x1
IPV6_HOPLIMIT = 0x2f
IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
IPV6_MAXHLIM = 0xff
@@ -795,16 +877,22 @@ const (
IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
IP_FW_ADD = 0x32
IP_FW_DEL = 0x33
IP_FW_FLUSH = 0x34
IP_FW_GET = 0x36
IP_FW_RESETLOG = 0x37
+ IP_FW_TBL_ADD = 0x2a
+ IP_FW_TBL_CREATE = 0x28
+ IP_FW_TBL_DEL = 0x2b
+ IP_FW_TBL_DESTROY = 0x29
+ IP_FW_TBL_EXPIRE = 0x2f
+ IP_FW_TBL_FLUSH = 0x2c
+ IP_FW_TBL_GET = 0x2d
+ IP_FW_TBL_ZERO = 0x2e
IP_FW_X = 0x31
IP_FW_ZERO = 0x35
IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000
@@ -1080,12 +1168,10 @@ const (
RTM_MISS = 0x7
RTM_NEWADDR = 0xc
RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x6
+ RTM_VERSION = 0x7
RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2
RTV_IWCAPSEGS = 0x400
@@ -1106,13 +1192,13 @@ const (
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8040720a
SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8040720b
SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc028697b
@@ -1120,6 +1206,7 @@ const (
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921
+ SIOCGIFALIAS = 0xc0406929
SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f
SIOCGIFCONF = 0xc0106924
@@ -1128,6 +1215,7 @@ const (
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
SIOCGIFINDEX = 0xc0206920
SIOCGIFMEDIA = 0xc0306938
SIOCGIFMETRIC = 0xc0206917
@@ -1194,6 +1282,7 @@ const (
SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006
+ SO_RERROR = 0x2000
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_SNDBUF = 0x1001
@@ -1233,6 +1322,9 @@ const (
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB3 = 0x4
+ TABDLY = 0x4
TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3
@@ -1259,6 +1351,8 @@ const (
TCP_NOPUSH = 0x4
TCP_SIGNATURE_ENABLE = 0x10
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1272,7 +1366,6 @@ const (
TIOCGETD = 0x4004741a
TIOCGPGRP = 0x40047477
TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
TIOCGWINSZ = 0x40087468
TIOCISPTMASTER = 0x20007455
TIOCMBIC = 0x8004746b
@@ -1317,7 +1410,6 @@ const (
TIOCSETD = 0x8004741b
TIOCSIG = 0x2000745f
TIOCSPGRP = 0x80047476
- TIOCSSIZE = 0x80087467
TIOCSTART = 0x2000746e
TIOCSTAT = 0x20007465
TIOCSTI = 0x80017472
@@ -1326,6 +1418,8 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VCHECKPT = 0x13
VDISCARD = 0xf
VDSUSP = 0xb
@@ -1350,9 +1444,12 @@ const (
VWERASE = 0x4
WCONTINUED = 0x4
WCOREFLAG = 0x80
+ WEXITED = 0x10
WLINUXCLONE = 0x80000000
WNOHANG = 0x1
- WSTOPPED = 0x7f
+ WNOWAIT = 0x8
+ WSTOPPED = 0x2
+ WTRAPPED = 0x20
WUNTRACED = 0x2
)
@@ -1452,11 +1549,6 @@ const (
ETIMEDOUT = syscall.Errno(0x3c)
ETOOMANYREFS = syscall.Errno(0x3b)
ETXTBSY = syscall.Errno(0x1a)
- EUNUSED94 = syscall.Errno(0x5e)
- EUNUSED95 = syscall.Errno(0x5f)
- EUNUSED96 = syscall.Errno(0x60)
- EUNUSED97 = syscall.Errno(0x61)
- EUNUSED98 = syscall.Errno(0x62)
EUSERS = syscall.Errno(0x44)
EWOULDBLOCK = syscall.Errno(0x23)
EXDEV = syscall.Errno(0x12)
@@ -1600,12 +1692,7 @@ var errorList = [...]struct {
{91, "ENOLINK", "link has been severed"},
{92, "EPROTO", "protocol error"},
{93, "ENOMEDIUM", "no medium found"},
- {94, "EUNUSED94", "unknown error: 94"},
- {95, "EUNUSED95", "unknown error: 95"},
- {96, "EUNUSED96", "unknown error: 96"},
- {97, "EUNUSED97", "unknown error: 97"},
- {98, "EUNUSED98", "unknown error: 98"},
- {99, "ELAST", "unknown error: 99"},
+ {99, "EASYNC", "unknown error: 99"},
}
// Signal table
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
index b72544f..4409001 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && freebsd
// +build 386,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc144648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x804c6490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc06c648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -379,11 +402,14 @@ const (
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
+ DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
+ DLT_DISPLAYPORT_AUX = 0x113
DLT_DOCSIS = 0x8f
+ DLT_DOCSIS31_XRA31 = 0x111
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
@@ -393,6 +419,7 @@ const (
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_ETHERNET_MPACKET = 0x112
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
@@ -406,7 +433,6 @@ const (
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
@@ -429,6 +455,7 @@ const (
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
@@ -461,8 +488,9 @@ const (
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
+ DLT_LORATAP = 0x10e
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x104
+ DLT_MATCHING_MAX = 0x113
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -478,14 +506,16 @@ const (
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
+ DLT_NORDIC_BLE = 0x110
DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
+ DLT_PPP_BSDOS = 0xe
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32
@@ -496,19 +526,25 @@ const (
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
+ DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
+ DLT_SDLC = 0x10c
DLT_SITA = 0xc4
DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
+ DLT_SLIP_BSDOS = 0xd
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TI_LLN_SNIFFER = 0x10d
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -527,10 +563,14 @@ const (
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
+ DLT_VSOCK = 0x10f
+ DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -548,6 +588,7 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
+ EVFILT_EMPTY = -0xd
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
@@ -555,11 +596,12 @@ const (
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
+ EVFILT_SYSCOUNT = 0xd
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVNAMEMAP_NAME_SIZE = 0x40
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
@@ -576,6 +618,7 @@ const (
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
+ EXTATTR_MAXNAMELEN = 0xff
EXTATTR_NAMESPACE_EMPTY = 0x0
EXTATTR_NAMESPACE_SYSTEM = 0x2
EXTATTR_NAMESPACE_USER = 0x1
@@ -617,6 +660,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
+ IFCAP_WOL_MAGIC = 0x2000
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
@@ -633,6 +677,7 @@ const (
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
+ IFF_NOGROUP = 0x800000
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
@@ -807,6 +852,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_LEN = 0x14
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
@@ -827,13 +873,13 @@ const (
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_ORIGDSTADDR = 0x48
IPV6_PATHMTU = 0x2c
IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
@@ -845,6 +891,7 @@ const (
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVORIGDSTADDR = 0x48
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
@@ -905,10 +952,8 @@ const (
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
IP_MSFILTER = 0x4a
IP_MSS = 0x240
IP_MULTICAST_IF = 0x9
@@ -918,6 +963,7 @@ const (
IP_OFFMASK = 0x1fff
IP_ONESBCAST = 0x17
IP_OPTIONS = 0x1
+ IP_ORIGDSTADDR = 0x1b
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
@@ -926,6 +972,7 @@ const (
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
+ IP_RECVORIGDSTADDR = 0x1b
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
@@ -951,6 +998,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -975,6 +1027,7 @@ const (
MAP_EXCL = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
+ MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NOSYNC = 0x800
@@ -986,6 +1039,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ 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_ACLS = 0x8000000
@@ -1026,10 +1088,12 @@ const (
MNT_SUSPEND = 0x4
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
+ MNT_UNTRUSTED = 0x800000000
MNT_UPDATE = 0x10000
- MNT_UPDATEMASK = 0x2d8d0807e
+ MNT_UPDATEMASK = 0xad8d0807e
MNT_USER = 0x8000
- MNT_VISFLAGMASK = 0x3fef0ffff
+ MNT_VERIFIED = 0x400000000
+ MNT_VISFLAGMASK = 0xffef0ffff
MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x40000
MSG_COMPAT = 0x8000
@@ -1058,6 +1122,7 @@ const (
NFDBITS = 0x20
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
+ NOTE_ABSTIME = 0x10
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
@@ -1212,7 +1277,6 @@ const (
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
- RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
@@ -1222,15 +1286,22 @@ const (
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
- RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
+ SCM_MONOTONIC = 0x6
+ SCM_REALTIME = 0x5
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SCM_TIME_INFO = 0x7
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x3
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x4
+ SEEK_SET = 0x0
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1246,6 +1317,7 @@ const (
SIOCGETSGCNT = 0xc0147210
SIOCGETVIFCNT = 0xc014720f
SIOCGHIWAT = 0x40047301
+ SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
@@ -1267,8 +1339,11 @@ const (
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
+ SIOCGIFRSSHASH = 0xc0186997
+ SIOCGIFRSSKEY = 0xc0946996
SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc028698b
+ SIOCGLANPCP = 0xc0206998
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
@@ -1299,6 +1374,7 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
+ SIOCSLANPCP = 0x80206999
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
@@ -1310,6 +1386,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
@@ -1317,6 +1394,7 @@ const (
SO_BINTIME = 0x2000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1019
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
@@ -1325,6 +1403,7 @@ const (
SO_LISTENINCQLEN = 0x1013
SO_LISTENQLEN = 0x1012
SO_LISTENQLIMIT = 0x1011
+ SO_MAX_PACING_RATE = 0x1018
SO_NOSIGPIPE = 0x800
SO_NO_DDP = 0x8000
SO_NO_OFFLOAD = 0x4000
@@ -1337,11 +1416,19 @@ const (
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
+ SO_REUSEPORT_LB = 0x10000
SO_SETFIB = 0x1014
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMP = 0x400
+ SO_TS_BINTIME = 0x1
+ SO_TS_CLOCK = 0x1017
+ SO_TS_CLOCK_MAX = 0x3
+ SO_TS_DEFAULT = 0x0
+ SO_TS_MONOTONIC = 0x3
+ SO_TS_REALTIME = 0x2
+ SO_TS_REALTIME_MICRO = 0x0
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
@@ -1385,10 +1472,45 @@ const (
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
+ TCP_BBR_ACK_COMP_ALG = 0x448
+ TCP_BBR_DRAIN_INC_EXTRA = 0x43c
+ TCP_BBR_DRAIN_PG = 0x42e
+ TCP_BBR_EXTRA_GAIN = 0x449
+ TCP_BBR_IWINTSO = 0x42b
+ TCP_BBR_LOWGAIN_FD = 0x436
+ TCP_BBR_LOWGAIN_HALF = 0x435
+ TCP_BBR_LOWGAIN_THRESH = 0x434
+ TCP_BBR_MAX_RTO = 0x439
+ TCP_BBR_MIN_RTO = 0x438
+ TCP_BBR_ONE_RETRAN = 0x431
+ TCP_BBR_PACE_CROSS = 0x442
+ TCP_BBR_PACE_DEL_TAR = 0x43f
+ TCP_BBR_PACE_PER_SEC = 0x43e
+ TCP_BBR_PACE_SEG_MAX = 0x440
+ TCP_BBR_PACE_SEG_MIN = 0x441
+ TCP_BBR_PROBE_RTT_GAIN = 0x44d
+ TCP_BBR_PROBE_RTT_INT = 0x430
+ TCP_BBR_PROBE_RTT_LEN = 0x44e
+ TCP_BBR_RACK_RTT_USE = 0x44a
+ TCP_BBR_RECFORCE = 0x42c
+ TCP_BBR_REC_OVER_HPTS = 0x43a
+ TCP_BBR_RETRAN_WTSO = 0x44b
+ TCP_BBR_RWND_IS_APP = 0x42f
+ TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
+ TCP_BBR_STARTUP_LOSS_EXIT = 0x432
+ TCP_BBR_STARTUP_PG = 0x42d
+ TCP_BBR_UNLIMITED = 0x43b
+ TCP_BBR_USEDEL_RATE = 0x437
+ TCP_BBR_USE_LOWGAIN = 0x433
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
+ TCP_DATA_AFTER_CLOSE = 0x44c
+ TCP_DELACK = 0x48
TCP_FASTOPEN = 0x401
+ TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
+ TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
+ TCP_FASTOPEN_PSK_LEN = 0x10
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
@@ -1396,6 +1518,12 @@ const (
TCP_KEEPIDLE = 0x100
TCP_KEEPINIT = 0x80
TCP_KEEPINTVL = 0x200
+ TCP_LOG = 0x22
+ TCP_LOGBUF = 0x23
+ TCP_LOGDUMP = 0x25
+ TCP_LOGDUMPID = 0x26
+ TCP_LOGID = 0x24
+ TCP_LOG_ID_LEN = 0x40
TCP_MAXBURST = 0x4
TCP_MAXHLEN = 0x3c
TCP_MAXOLEN = 0x28
@@ -1411,8 +1539,30 @@ const (
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
+ TCP_RACK_EARLY_RECOV = 0x423
+ TCP_RACK_EARLY_SEG = 0x424
+ TCP_RACK_IDLE_REDUCE_HIGH = 0x444
+ TCP_RACK_MIN_PACE = 0x445
+ TCP_RACK_MIN_PACE_SEG = 0x446
+ TCP_RACK_MIN_TO = 0x422
+ TCP_RACK_PACE_ALWAYS = 0x41f
+ TCP_RACK_PACE_MAX_SEG = 0x41e
+ TCP_RACK_PACE_REDUCE = 0x41d
+ TCP_RACK_PKT_DELAY = 0x428
+ TCP_RACK_PROP = 0x41b
+ TCP_RACK_PROP_RATE = 0x420
+ TCP_RACK_PRR_SENDALOT = 0x421
+ TCP_RACK_REORD_FADE = 0x426
+ TCP_RACK_REORD_THRESH = 0x425
+ TCP_RACK_SESS_CWV = 0x42a
+ TCP_RACK_TLP_INC_VAR = 0x429
+ TCP_RACK_TLP_REDUCE = 0x41c
+ TCP_RACK_TLP_THRESH = 0x427
+ TCP_RACK_TLP_USE = 0x447
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1476,6 +1626,8 @@ const (
TIOCTIMESTAMP = 0x40087459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
@@ -1487,6 +1639,8 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
+ VM_BCACHE_SIZE_MAX = 0x70e0000
+ VM_SWZONE_SIZE_MAX = 0x2280000
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
index 9f38267..64520d3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && freebsd
// +build amd64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc148648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x80506490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc080648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -379,11 +402,14 @@ const (
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
+ DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
+ DLT_DISPLAYPORT_AUX = 0x113
DLT_DOCSIS = 0x8f
+ DLT_DOCSIS31_XRA31 = 0x111
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
@@ -393,6 +419,7 @@ const (
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_ETHERNET_MPACKET = 0x112
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
@@ -406,7 +433,6 @@ const (
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
@@ -429,6 +455,7 @@ const (
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
@@ -461,8 +488,9 @@ const (
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
+ DLT_LORATAP = 0x10e
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x104
+ DLT_MATCHING_MAX = 0x113
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -478,14 +506,16 @@ const (
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
+ DLT_NORDIC_BLE = 0x110
DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
+ DLT_PPP_BSDOS = 0xe
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32
@@ -496,19 +526,25 @@ const (
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
+ DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
+ DLT_SDLC = 0x10c
DLT_SITA = 0xc4
DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
+ DLT_SLIP_BSDOS = 0xd
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TI_LLN_SNIFFER = 0x10d
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -527,10 +563,14 @@ const (
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
+ DLT_VSOCK = 0x10f
+ DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -548,6 +588,7 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
+ EVFILT_EMPTY = -0xd
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
@@ -555,11 +596,12 @@ const (
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
+ EVFILT_SYSCOUNT = 0xd
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVNAMEMAP_NAME_SIZE = 0x40
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
@@ -576,6 +618,7 @@ const (
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
+ EXTATTR_MAXNAMELEN = 0xff
EXTATTR_NAMESPACE_EMPTY = 0x0
EXTATTR_NAMESPACE_SYSTEM = 0x2
EXTATTR_NAMESPACE_USER = 0x1
@@ -617,6 +660,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
+ IFCAP_WOL_MAGIC = 0x2000
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
@@ -633,6 +677,7 @@ const (
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
+ IFF_NOGROUP = 0x800000
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
@@ -807,6 +852,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_LEN = 0x14
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
@@ -827,13 +873,13 @@ const (
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_ORIGDSTADDR = 0x48
IPV6_PATHMTU = 0x2c
IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
@@ -845,6 +891,7 @@ const (
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVORIGDSTADDR = 0x48
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
@@ -905,10 +952,8 @@ const (
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
IP_MSFILTER = 0x4a
IP_MSS = 0x240
IP_MULTICAST_IF = 0x9
@@ -918,6 +963,7 @@ const (
IP_OFFMASK = 0x1fff
IP_ONESBCAST = 0x17
IP_OPTIONS = 0x1
+ IP_ORIGDSTADDR = 0x1b
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
@@ -926,6 +972,7 @@ const (
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
+ IP_RECVORIGDSTADDR = 0x1b
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
@@ -951,6 +998,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -976,6 +1028,7 @@ const (
MAP_EXCL = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
+ MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NOSYNC = 0x800
@@ -987,6 +1040,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ 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_ACLS = 0x8000000
@@ -1027,10 +1089,12 @@ const (
MNT_SUSPEND = 0x4
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
+ MNT_UNTRUSTED = 0x800000000
MNT_UPDATE = 0x10000
- MNT_UPDATEMASK = 0x2d8d0807e
+ MNT_UPDATEMASK = 0xad8d0807e
MNT_USER = 0x8000
- MNT_VISFLAGMASK = 0x3fef0ffff
+ MNT_VERIFIED = 0x400000000
+ MNT_VISFLAGMASK = 0xffef0ffff
MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x40000
MSG_COMPAT = 0x8000
@@ -1059,6 +1123,7 @@ const (
NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
+ NOTE_ABSTIME = 0x10
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
@@ -1213,7 +1278,6 @@ const (
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
- RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
@@ -1223,15 +1287,22 @@ const (
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
- RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
+ SCM_MONOTONIC = 0x6
+ SCM_REALTIME = 0x5
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SCM_TIME_INFO = 0x7
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x3
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x4
+ SEEK_SET = 0x0
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1247,6 +1318,7 @@ const (
SIOCGETSGCNT = 0xc0207210
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
+ SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
@@ -1268,8 +1340,11 @@ const (
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
+ SIOCGIFRSSHASH = 0xc0186997
+ SIOCGIFRSSKEY = 0xc0946996
SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc030698b
+ SIOCGLANPCP = 0xc0206998
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
@@ -1300,6 +1375,7 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
+ SIOCSLANPCP = 0x80206999
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
@@ -1311,6 +1387,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
@@ -1318,6 +1395,7 @@ const (
SO_BINTIME = 0x2000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1019
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
@@ -1326,6 +1404,7 @@ const (
SO_LISTENINCQLEN = 0x1013
SO_LISTENQLEN = 0x1012
SO_LISTENQLIMIT = 0x1011
+ SO_MAX_PACING_RATE = 0x1018
SO_NOSIGPIPE = 0x800
SO_NO_DDP = 0x8000
SO_NO_OFFLOAD = 0x4000
@@ -1338,11 +1417,19 @@ const (
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
+ SO_REUSEPORT_LB = 0x10000
SO_SETFIB = 0x1014
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMP = 0x400
+ SO_TS_BINTIME = 0x1
+ SO_TS_CLOCK = 0x1017
+ SO_TS_CLOCK_MAX = 0x3
+ SO_TS_DEFAULT = 0x0
+ SO_TS_MONOTONIC = 0x3
+ SO_TS_REALTIME = 0x2
+ SO_TS_REALTIME_MICRO = 0x0
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
@@ -1386,10 +1473,45 @@ const (
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
+ TCP_BBR_ACK_COMP_ALG = 0x448
+ TCP_BBR_DRAIN_INC_EXTRA = 0x43c
+ TCP_BBR_DRAIN_PG = 0x42e
+ TCP_BBR_EXTRA_GAIN = 0x449
+ TCP_BBR_IWINTSO = 0x42b
+ TCP_BBR_LOWGAIN_FD = 0x436
+ TCP_BBR_LOWGAIN_HALF = 0x435
+ TCP_BBR_LOWGAIN_THRESH = 0x434
+ TCP_BBR_MAX_RTO = 0x439
+ TCP_BBR_MIN_RTO = 0x438
+ TCP_BBR_ONE_RETRAN = 0x431
+ TCP_BBR_PACE_CROSS = 0x442
+ TCP_BBR_PACE_DEL_TAR = 0x43f
+ TCP_BBR_PACE_PER_SEC = 0x43e
+ TCP_BBR_PACE_SEG_MAX = 0x440
+ TCP_BBR_PACE_SEG_MIN = 0x441
+ TCP_BBR_PROBE_RTT_GAIN = 0x44d
+ TCP_BBR_PROBE_RTT_INT = 0x430
+ TCP_BBR_PROBE_RTT_LEN = 0x44e
+ TCP_BBR_RACK_RTT_USE = 0x44a
+ TCP_BBR_RECFORCE = 0x42c
+ TCP_BBR_REC_OVER_HPTS = 0x43a
+ TCP_BBR_RETRAN_WTSO = 0x44b
+ TCP_BBR_RWND_IS_APP = 0x42f
+ TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
+ TCP_BBR_STARTUP_LOSS_EXIT = 0x432
+ TCP_BBR_STARTUP_PG = 0x42d
+ TCP_BBR_UNLIMITED = 0x43b
+ TCP_BBR_USEDEL_RATE = 0x437
+ TCP_BBR_USE_LOWGAIN = 0x433
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
+ TCP_DATA_AFTER_CLOSE = 0x44c
+ TCP_DELACK = 0x48
TCP_FASTOPEN = 0x401
+ TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
+ TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
+ TCP_FASTOPEN_PSK_LEN = 0x10
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
@@ -1397,6 +1519,12 @@ const (
TCP_KEEPIDLE = 0x100
TCP_KEEPINIT = 0x80
TCP_KEEPINTVL = 0x200
+ TCP_LOG = 0x22
+ TCP_LOGBUF = 0x23
+ TCP_LOGDUMP = 0x25
+ TCP_LOGDUMPID = 0x26
+ TCP_LOGID = 0x24
+ TCP_LOG_ID_LEN = 0x40
TCP_MAXBURST = 0x4
TCP_MAXHLEN = 0x3c
TCP_MAXOLEN = 0x28
@@ -1412,8 +1540,30 @@ const (
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
+ TCP_RACK_EARLY_RECOV = 0x423
+ TCP_RACK_EARLY_SEG = 0x424
+ TCP_RACK_IDLE_REDUCE_HIGH = 0x444
+ TCP_RACK_MIN_PACE = 0x445
+ TCP_RACK_MIN_PACE_SEG = 0x446
+ TCP_RACK_MIN_TO = 0x422
+ TCP_RACK_PACE_ALWAYS = 0x41f
+ TCP_RACK_PACE_MAX_SEG = 0x41e
+ TCP_RACK_PACE_REDUCE = 0x41d
+ TCP_RACK_PKT_DELAY = 0x428
+ TCP_RACK_PROP = 0x41b
+ TCP_RACK_PROP_RATE = 0x420
+ TCP_RACK_PRR_SENDALOT = 0x421
+ TCP_RACK_REORD_FADE = 0x426
+ TCP_RACK_REORD_THRESH = 0x425
+ TCP_RACK_SESS_CWV = 0x42a
+ TCP_RACK_TLP_INC_VAR = 0x429
+ TCP_RACK_TLP_REDUCE = 0x41c
+ TCP_RACK_TLP_THRESH = 0x427
+ TCP_RACK_TLP_USE = 0x447
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1477,6 +1627,8 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
index 16db56a..99e9a0e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && freebsd
// +build arm,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc144648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x804c6490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc06c648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -958,6 +981,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -994,6 +1022,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ 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_ACLS = 0x8000000
@@ -1239,6 +1276,11 @@ const (
SCM_CREDS = 0x3
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x3
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x4
+ SEEK_SET = 0x0
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1319,6 +1361,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
index 1a1de34..4c83771 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && freebsd
// +build arm64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc148648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x80506490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc080648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -379,11 +402,14 @@ const (
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
+ DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
+ DLT_DISPLAYPORT_AUX = 0x113
DLT_DOCSIS = 0x8f
+ DLT_DOCSIS31_XRA31 = 0x111
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
@@ -393,6 +419,7 @@ const (
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_ETHERNET_MPACKET = 0x112
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
@@ -406,7 +433,6 @@ const (
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
@@ -429,6 +455,7 @@ const (
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
@@ -461,8 +488,9 @@ const (
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
+ DLT_LORATAP = 0x10e
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x104
+ DLT_MATCHING_MAX = 0x113
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -478,14 +506,16 @@ const (
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
+ DLT_NORDIC_BLE = 0x110
DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
+ DLT_PPP_BSDOS = 0xe
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32
@@ -496,19 +526,25 @@ const (
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
+ DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
+ DLT_SDLC = 0x10c
DLT_SITA = 0xc4
DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
+ DLT_SLIP_BSDOS = 0xd
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TI_LLN_SNIFFER = 0x10d
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -527,10 +563,14 @@ const (
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
+ DLT_VSOCK = 0x10f
+ DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -548,6 +588,7 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
+ EVFILT_EMPTY = -0xd
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
@@ -555,11 +596,12 @@ const (
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
+ EVFILT_SYSCOUNT = 0xd
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVNAMEMAP_NAME_SIZE = 0x40
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
@@ -576,6 +618,7 @@ const (
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
+ EXTATTR_MAXNAMELEN = 0xff
EXTATTR_NAMESPACE_EMPTY = 0x0
EXTATTR_NAMESPACE_SYSTEM = 0x2
EXTATTR_NAMESPACE_USER = 0x1
@@ -617,6 +660,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
+ IFCAP_WOL_MAGIC = 0x2000
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
@@ -633,6 +677,7 @@ const (
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
+ IFF_NOGROUP = 0x800000
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
@@ -807,6 +852,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_LEN = 0x14
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
@@ -827,13 +873,13 @@ const (
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_ORIGDSTADDR = 0x48
IPV6_PATHMTU = 0x2c
IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
@@ -845,6 +891,7 @@ const (
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVORIGDSTADDR = 0x48
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
@@ -905,10 +952,8 @@ const (
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
IP_MSFILTER = 0x4a
IP_MSS = 0x240
IP_MULTICAST_IF = 0x9
@@ -918,6 +963,7 @@ const (
IP_OFFMASK = 0x1fff
IP_ONESBCAST = 0x17
IP_OPTIONS = 0x1
+ IP_ORIGDSTADDR = 0x1b
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
@@ -926,6 +972,7 @@ const (
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
+ IP_RECVORIGDSTADDR = 0x1b
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
@@ -951,6 +998,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -976,6 +1028,7 @@ const (
MAP_EXCL = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
+ MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NOSYNC = 0x800
@@ -987,6 +1040,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ 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_ACLS = 0x8000000
@@ -1027,10 +1089,12 @@ const (
MNT_SUSPEND = 0x4
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
+ MNT_UNTRUSTED = 0x800000000
MNT_UPDATE = 0x10000
- MNT_UPDATEMASK = 0x2d8d0807e
+ MNT_UPDATEMASK = 0xad8d0807e
MNT_USER = 0x8000
- MNT_VISFLAGMASK = 0x3fef0ffff
+ MNT_VERIFIED = 0x400000000
+ MNT_VISFLAGMASK = 0xffef0ffff
MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x40000
MSG_COMPAT = 0x8000
@@ -1059,6 +1123,7 @@ const (
NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
+ NOTE_ABSTIME = 0x10
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
@@ -1213,7 +1278,6 @@ const (
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
- RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
@@ -1223,15 +1287,22 @@ const (
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
- RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
+ SCM_MONOTONIC = 0x6
+ SCM_REALTIME = 0x5
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SCM_TIME_INFO = 0x7
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x3
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x4
+ SEEK_SET = 0x0
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1247,6 +1318,7 @@ const (
SIOCGETSGCNT = 0xc0207210
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
+ SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
@@ -1268,8 +1340,11 @@ const (
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
+ SIOCGIFRSSHASH = 0xc0186997
+ SIOCGIFRSSKEY = 0xc0946996
SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc030698b
+ SIOCGLANPCP = 0xc0206998
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
@@ -1300,6 +1375,7 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
+ SIOCSLANPCP = 0x80206999
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
@@ -1311,6 +1387,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
@@ -1318,6 +1395,7 @@ const (
SO_BINTIME = 0x2000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1019
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
@@ -1326,6 +1404,7 @@ const (
SO_LISTENINCQLEN = 0x1013
SO_LISTENQLEN = 0x1012
SO_LISTENQLIMIT = 0x1011
+ SO_MAX_PACING_RATE = 0x1018
SO_NOSIGPIPE = 0x800
SO_NO_DDP = 0x8000
SO_NO_OFFLOAD = 0x4000
@@ -1338,11 +1417,19 @@ const (
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
+ SO_REUSEPORT_LB = 0x10000
SO_SETFIB = 0x1014
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMP = 0x400
+ SO_TS_BINTIME = 0x1
+ SO_TS_CLOCK = 0x1017
+ SO_TS_CLOCK_MAX = 0x3
+ SO_TS_DEFAULT = 0x0
+ SO_TS_MONOTONIC = 0x3
+ SO_TS_REALTIME = 0x2
+ SO_TS_REALTIME_MICRO = 0x0
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
@@ -1386,10 +1473,45 @@ const (
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
+ TCP_BBR_ACK_COMP_ALG = 0x448
+ TCP_BBR_DRAIN_INC_EXTRA = 0x43c
+ TCP_BBR_DRAIN_PG = 0x42e
+ TCP_BBR_EXTRA_GAIN = 0x449
+ TCP_BBR_IWINTSO = 0x42b
+ TCP_BBR_LOWGAIN_FD = 0x436
+ TCP_BBR_LOWGAIN_HALF = 0x435
+ TCP_BBR_LOWGAIN_THRESH = 0x434
+ TCP_BBR_MAX_RTO = 0x439
+ TCP_BBR_MIN_RTO = 0x438
+ TCP_BBR_ONE_RETRAN = 0x431
+ TCP_BBR_PACE_CROSS = 0x442
+ TCP_BBR_PACE_DEL_TAR = 0x43f
+ TCP_BBR_PACE_PER_SEC = 0x43e
+ TCP_BBR_PACE_SEG_MAX = 0x440
+ TCP_BBR_PACE_SEG_MIN = 0x441
+ TCP_BBR_PROBE_RTT_GAIN = 0x44d
+ TCP_BBR_PROBE_RTT_INT = 0x430
+ TCP_BBR_PROBE_RTT_LEN = 0x44e
+ TCP_BBR_RACK_RTT_USE = 0x44a
+ TCP_BBR_RECFORCE = 0x42c
+ TCP_BBR_REC_OVER_HPTS = 0x43a
+ TCP_BBR_RETRAN_WTSO = 0x44b
+ TCP_BBR_RWND_IS_APP = 0x42f
+ TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
+ TCP_BBR_STARTUP_LOSS_EXIT = 0x432
+ TCP_BBR_STARTUP_PG = 0x42d
+ TCP_BBR_UNLIMITED = 0x43b
+ TCP_BBR_USEDEL_RATE = 0x437
+ TCP_BBR_USE_LOWGAIN = 0x433
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
+ TCP_DATA_AFTER_CLOSE = 0x44c
+ TCP_DELACK = 0x48
TCP_FASTOPEN = 0x401
+ TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
+ TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
+ TCP_FASTOPEN_PSK_LEN = 0x10
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
@@ -1397,6 +1519,12 @@ const (
TCP_KEEPIDLE = 0x100
TCP_KEEPINIT = 0x80
TCP_KEEPINTVL = 0x200
+ TCP_LOG = 0x22
+ TCP_LOGBUF = 0x23
+ TCP_LOGDUMP = 0x25
+ TCP_LOGDUMPID = 0x26
+ TCP_LOGID = 0x24
+ TCP_LOG_ID_LEN = 0x40
TCP_MAXBURST = 0x4
TCP_MAXHLEN = 0x3c
TCP_MAXOLEN = 0x28
@@ -1412,8 +1540,30 @@ const (
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
+ TCP_RACK_EARLY_RECOV = 0x423
+ TCP_RACK_EARLY_SEG = 0x424
+ TCP_RACK_IDLE_REDUCE_HIGH = 0x444
+ TCP_RACK_MIN_PACE = 0x445
+ TCP_RACK_MIN_PACE_SEG = 0x446
+ TCP_RACK_MIN_TO = 0x422
+ TCP_RACK_PACE_ALWAYS = 0x41f
+ TCP_RACK_PACE_MAX_SEG = 0x41e
+ TCP_RACK_PACE_REDUCE = 0x41d
+ TCP_RACK_PKT_DELAY = 0x428
+ TCP_RACK_PROP = 0x41b
+ TCP_RACK_PROP_RATE = 0x420
+ TCP_RACK_PRR_SENDALOT = 0x421
+ TCP_RACK_REORD_FADE = 0x426
+ TCP_RACK_REORD_THRESH = 0x425
+ TCP_RACK_SESS_CWV = 0x42a
+ TCP_RACK_TLP_INC_VAR = 0x429
+ TCP_RACK_TLP_REDUCE = 0x41c
+ TCP_RACK_TLP_THRESH = 0x427
+ TCP_RACK_TLP_USE = 0x447
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1477,6 +1627,8 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
@@ -1488,6 +1640,7 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
+ VM_BCACHE_SIZE_MAX = 0x19000000
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
new file mode 100644
index 0000000..bcc45d1
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -0,0 +1,3014 @@
+// Code generated by mkmerge; DO NOT EDIT.
+
+//go:build linux
+// +build linux
+
+package unix
+
+import "syscall"
+
+const (
+ AAFS_MAGIC = 0x5a3c69f0
+ ADFS_SUPER_MAGIC = 0xadf5
+ AFFS_SUPER_MAGIC = 0xadff
+ AFS_FS_MAGIC = 0x6b414653
+ AFS_SUPER_MAGIC = 0x5346414f
+ AF_ALG = 0x26
+ AF_APPLETALK = 0x5
+ AF_ASH = 0x12
+ AF_ATMPVC = 0x8
+ AF_ATMSVC = 0x14
+ AF_AX25 = 0x3
+ AF_BLUETOOTH = 0x1f
+ AF_BRIDGE = 0x7
+ AF_CAIF = 0x25
+ AF_CAN = 0x1d
+ AF_DECnet = 0xc
+ AF_ECONET = 0x13
+ AF_FILE = 0x1
+ AF_IB = 0x1b
+ AF_IEEE802154 = 0x24
+ AF_INET = 0x2
+ AF_INET6 = 0xa
+ AF_IPX = 0x4
+ AF_IRDA = 0x17
+ AF_ISDN = 0x22
+ AF_IUCV = 0x20
+ AF_KCM = 0x29
+ AF_KEY = 0xf
+ AF_LLC = 0x1a
+ AF_LOCAL = 0x1
+ AF_MAX = 0x2d
+ AF_MPLS = 0x1c
+ AF_NETBEUI = 0xd
+ AF_NETLINK = 0x10
+ AF_NETROM = 0x6
+ AF_NFC = 0x27
+ AF_PACKET = 0x11
+ AF_PHONET = 0x23
+ AF_PPPOX = 0x18
+ AF_QIPCRTR = 0x2a
+ AF_RDS = 0x15
+ AF_ROSE = 0xb
+ AF_ROUTE = 0x10
+ AF_RXRPC = 0x21
+ AF_SECURITY = 0xe
+ AF_SMC = 0x2b
+ AF_SNA = 0x16
+ AF_TIPC = 0x1e
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_VSOCK = 0x28
+ AF_WANPIPE = 0x19
+ AF_X25 = 0x9
+ AF_XDP = 0x2c
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_DRBG_ENTROPY = 0x6
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
+ ANON_INODE_FS_MAGIC = 0x9041934
+ ARPHRD_6LOWPAN = 0x339
+ ARPHRD_ADAPT = 0x108
+ ARPHRD_APPLETLK = 0x8
+ ARPHRD_ARCNET = 0x7
+ ARPHRD_ASH = 0x30d
+ ARPHRD_ATM = 0x13
+ ARPHRD_AX25 = 0x3
+ ARPHRD_BIF = 0x307
+ ARPHRD_CAIF = 0x336
+ ARPHRD_CAN = 0x118
+ ARPHRD_CHAOS = 0x5
+ ARPHRD_CISCO = 0x201
+ ARPHRD_CSLIP = 0x101
+ ARPHRD_CSLIP6 = 0x103
+ ARPHRD_DDCMP = 0x205
+ ARPHRD_DLCI = 0xf
+ ARPHRD_ECONET = 0x30e
+ ARPHRD_EETHER = 0x2
+ ARPHRD_ETHER = 0x1
+ ARPHRD_EUI64 = 0x1b
+ ARPHRD_FCAL = 0x311
+ ARPHRD_FCFABRIC = 0x313
+ ARPHRD_FCPL = 0x312
+ ARPHRD_FCPP = 0x310
+ ARPHRD_FDDI = 0x306
+ ARPHRD_FRAD = 0x302
+ ARPHRD_HDLC = 0x201
+ ARPHRD_HIPPI = 0x30c
+ ARPHRD_HWX25 = 0x110
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ ARPHRD_IEEE80211 = 0x321
+ ARPHRD_IEEE80211_PRISM = 0x322
+ ARPHRD_IEEE80211_RADIOTAP = 0x323
+ ARPHRD_IEEE802154 = 0x324
+ ARPHRD_IEEE802154_MONITOR = 0x325
+ ARPHRD_IEEE802_TR = 0x320
+ ARPHRD_INFINIBAND = 0x20
+ ARPHRD_IP6GRE = 0x337
+ ARPHRD_IPDDP = 0x309
+ ARPHRD_IPGRE = 0x30a
+ ARPHRD_IRDA = 0x30f
+ ARPHRD_LAPB = 0x204
+ ARPHRD_LOCALTLK = 0x305
+ ARPHRD_LOOPBACK = 0x304
+ ARPHRD_MCTP = 0x122
+ ARPHRD_METRICOM = 0x17
+ ARPHRD_NETLINK = 0x338
+ ARPHRD_NETROM = 0x0
+ ARPHRD_NONE = 0xfffe
+ ARPHRD_PHONET = 0x334
+ ARPHRD_PHONET_PIPE = 0x335
+ ARPHRD_PIMREG = 0x30b
+ ARPHRD_PPP = 0x200
+ ARPHRD_PRONET = 0x4
+ ARPHRD_RAWHDLC = 0x206
+ ARPHRD_RAWIP = 0x207
+ ARPHRD_ROSE = 0x10e
+ ARPHRD_RSRVD = 0x104
+ ARPHRD_SIT = 0x308
+ ARPHRD_SKIP = 0x303
+ ARPHRD_SLIP = 0x100
+ ARPHRD_SLIP6 = 0x102
+ ARPHRD_TUNNEL = 0x300
+ ARPHRD_TUNNEL6 = 0x301
+ ARPHRD_VOID = 0xffff
+ ARPHRD_VSOCKMON = 0x33a
+ ARPHRD_X25 = 0x10f
+ AUTOFS_SUPER_MAGIC = 0x187
+ B0 = 0x0
+ B110 = 0x3
+ B1200 = 0x9
+ B134 = 0x4
+ B150 = 0x5
+ B1800 = 0xa
+ B19200 = 0xe
+ B200 = 0x6
+ B2400 = 0xb
+ B300 = 0x7
+ B38400 = 0xf
+ B4800 = 0xc
+ B50 = 0x1
+ B600 = 0x8
+ B75 = 0x2
+ B9600 = 0xd
+ BALLOON_KVM_MAGIC = 0x13661366
+ BDEVFS_MAGIC = 0x62646576
+ BINDERFS_SUPER_MAGIC = 0x6c6f6f70
+ BINFMTFS_MAGIC = 0x42494e4d
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALU = 0x4
+ BPF_ALU64 = 0x7
+ BPF_AND = 0x50
+ BPF_ARSH = 0xc0
+ BPF_ATOMIC = 0xc0
+ BPF_B = 0x10
+ BPF_BUILD_ID_SIZE = 0x14
+ BPF_CALL = 0x80
+ BPF_CMPXCHG = 0xf1
+ BPF_DIV = 0x30
+ BPF_DW = 0x18
+ BPF_END = 0xd0
+ BPF_EXIT = 0x90
+ BPF_FETCH = 0x1
+ BPF_FROM_BE = 0x8
+ BPF_FROM_LE = 0x0
+ BPF_FS_MAGIC = 0xcafe4a11
+ BPF_F_ALLOW_MULTI = 0x2
+ BPF_F_ALLOW_OVERRIDE = 0x1
+ BPF_F_ANY_ALIGNMENT = 0x2
+ BPF_F_QUERY_EFFECTIVE = 0x1
+ BPF_F_REPLACE = 0x4
+ BPF_F_SLEEPABLE = 0x10
+ BPF_F_STRICT_ALIGNMENT = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
+ BPF_F_TEST_RUN_ON_CPU = 0x1
+ BPF_F_TEST_STATE_FREQ = 0x8
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JLE = 0xb0
+ BPF_JLT = 0xa0
+ BPF_JMP = 0x5
+ BPF_JMP32 = 0x6
+ BPF_JNE = 0x50
+ BPF_JSET = 0x40
+ BPF_JSGE = 0x70
+ BPF_JSGT = 0x60
+ BPF_JSLE = 0xd0
+ BPF_JSLT = 0xc0
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LL_OFF = -0x200000
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXINSNS = 0x1000
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MOD = 0x90
+ BPF_MOV = 0xb0
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_NET_OFF = -0x100000
+ BPF_OBJ_NAME_LEN = 0x10
+ BPF_OR = 0x40
+ BPF_PSEUDO_BTF_ID = 0x3
+ BPF_PSEUDO_CALL = 0x1
+ BPF_PSEUDO_FUNC = 0x4
+ BPF_PSEUDO_KFUNC_CALL = 0x2
+ BPF_PSEUDO_MAP_FD = 0x1
+ BPF_PSEUDO_MAP_IDX = 0x5
+ BPF_PSEUDO_MAP_IDX_VALUE = 0x6
+ BPF_PSEUDO_MAP_VALUE = 0x2
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAG_SIZE = 0x8
+ BPF_TAX = 0x0
+ BPF_TO_BE = 0x8
+ BPF_TO_LE = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BPF_XADD = 0xc0
+ BPF_XCHG = 0xe1
+ BPF_XOR = 0xa0
+ BRKINT = 0x2
+ BS0 = 0x0
+ BTRFS_SUPER_MAGIC = 0x9123683e
+ BTRFS_TEST_MAGIC = 0x73727279
+ BUS_BLUETOOTH = 0x5
+ BUS_HIL = 0x4
+ BUS_USB = 0x3
+ BUS_VIRTUAL = 0x6
+ CAN_BCM = 0x2
+ CAN_EFF_FLAG = 0x80000000
+ CAN_EFF_ID_BITS = 0x1d
+ CAN_EFF_MASK = 0x1fffffff
+ CAN_ERR_ACK = 0x20
+ CAN_ERR_BUSERROR = 0x80
+ CAN_ERR_BUSOFF = 0x40
+ CAN_ERR_CRTL = 0x4
+ CAN_ERR_CRTL_ACTIVE = 0x40
+ CAN_ERR_CRTL_RX_OVERFLOW = 0x1
+ CAN_ERR_CRTL_RX_PASSIVE = 0x10
+ CAN_ERR_CRTL_RX_WARNING = 0x4
+ CAN_ERR_CRTL_TX_OVERFLOW = 0x2
+ CAN_ERR_CRTL_TX_PASSIVE = 0x20
+ CAN_ERR_CRTL_TX_WARNING = 0x8
+ CAN_ERR_CRTL_UNSPEC = 0x0
+ CAN_ERR_DLC = 0x8
+ CAN_ERR_FLAG = 0x20000000
+ CAN_ERR_LOSTARB = 0x2
+ CAN_ERR_LOSTARB_UNSPEC = 0x0
+ CAN_ERR_MASK = 0x1fffffff
+ CAN_ERR_PROT = 0x8
+ CAN_ERR_PROT_ACTIVE = 0x40
+ CAN_ERR_PROT_BIT = 0x1
+ CAN_ERR_PROT_BIT0 = 0x8
+ CAN_ERR_PROT_BIT1 = 0x10
+ CAN_ERR_PROT_FORM = 0x2
+ CAN_ERR_PROT_LOC_ACK = 0x19
+ CAN_ERR_PROT_LOC_ACK_DEL = 0x1b
+ CAN_ERR_PROT_LOC_CRC_DEL = 0x18
+ CAN_ERR_PROT_LOC_CRC_SEQ = 0x8
+ CAN_ERR_PROT_LOC_DATA = 0xa
+ CAN_ERR_PROT_LOC_DLC = 0xb
+ CAN_ERR_PROT_LOC_EOF = 0x1a
+ CAN_ERR_PROT_LOC_ID04_00 = 0xe
+ CAN_ERR_PROT_LOC_ID12_05 = 0xf
+ CAN_ERR_PROT_LOC_ID17_13 = 0x7
+ CAN_ERR_PROT_LOC_ID20_18 = 0x6
+ CAN_ERR_PROT_LOC_ID28_21 = 0x2
+ CAN_ERR_PROT_LOC_IDE = 0x5
+ CAN_ERR_PROT_LOC_INTERM = 0x12
+ CAN_ERR_PROT_LOC_RES0 = 0x9
+ CAN_ERR_PROT_LOC_RES1 = 0xd
+ CAN_ERR_PROT_LOC_RTR = 0xc
+ CAN_ERR_PROT_LOC_SOF = 0x3
+ CAN_ERR_PROT_LOC_SRTR = 0x4
+ CAN_ERR_PROT_LOC_UNSPEC = 0x0
+ CAN_ERR_PROT_OVERLOAD = 0x20
+ CAN_ERR_PROT_STUFF = 0x4
+ CAN_ERR_PROT_TX = 0x80
+ CAN_ERR_PROT_UNSPEC = 0x0
+ CAN_ERR_RESTARTED = 0x100
+ CAN_ERR_TRX = 0x10
+ CAN_ERR_TRX_CANH_NO_WIRE = 0x4
+ CAN_ERR_TRX_CANH_SHORT_TO_BAT = 0x5
+ CAN_ERR_TRX_CANH_SHORT_TO_GND = 0x7
+ CAN_ERR_TRX_CANH_SHORT_TO_VCC = 0x6
+ CAN_ERR_TRX_CANL_NO_WIRE = 0x40
+ CAN_ERR_TRX_CANL_SHORT_TO_BAT = 0x50
+ CAN_ERR_TRX_CANL_SHORT_TO_CANH = 0x80
+ CAN_ERR_TRX_CANL_SHORT_TO_GND = 0x70
+ CAN_ERR_TRX_CANL_SHORT_TO_VCC = 0x60
+ CAN_ERR_TRX_UNSPEC = 0x0
+ CAN_ERR_TX_TIMEOUT = 0x1
+ CAN_INV_FILTER = 0x20000000
+ CAN_ISOTP = 0x6
+ CAN_J1939 = 0x7
+ CAN_MAX_DLC = 0x8
+ CAN_MAX_DLEN = 0x8
+ CAN_MAX_RAW_DLC = 0xf
+ CAN_MCNET = 0x5
+ CAN_MTU = 0x10
+ CAN_NPROTO = 0x8
+ CAN_RAW = 0x1
+ CAN_RAW_FILTER_MAX = 0x200
+ CAN_RTR_FLAG = 0x40000000
+ CAN_SFF_ID_BITS = 0xb
+ CAN_SFF_MASK = 0x7ff
+ CAN_TP16 = 0x3
+ CAN_TP20 = 0x4
+ CAP_AUDIT_CONTROL = 0x1e
+ CAP_AUDIT_READ = 0x25
+ CAP_AUDIT_WRITE = 0x1d
+ CAP_BLOCK_SUSPEND = 0x24
+ CAP_BPF = 0x27
+ CAP_CHECKPOINT_RESTORE = 0x28
+ CAP_CHOWN = 0x0
+ CAP_DAC_OVERRIDE = 0x1
+ CAP_DAC_READ_SEARCH = 0x2
+ CAP_FOWNER = 0x3
+ CAP_FSETID = 0x4
+ CAP_IPC_LOCK = 0xe
+ CAP_IPC_OWNER = 0xf
+ CAP_KILL = 0x5
+ CAP_LAST_CAP = 0x28
+ CAP_LEASE = 0x1c
+ CAP_LINUX_IMMUTABLE = 0x9
+ CAP_MAC_ADMIN = 0x21
+ CAP_MAC_OVERRIDE = 0x20
+ CAP_MKNOD = 0x1b
+ CAP_NET_ADMIN = 0xc
+ CAP_NET_BIND_SERVICE = 0xa
+ CAP_NET_BROADCAST = 0xb
+ CAP_NET_RAW = 0xd
+ CAP_PERFMON = 0x26
+ CAP_SETFCAP = 0x1f
+ CAP_SETGID = 0x6
+ CAP_SETPCAP = 0x8
+ CAP_SETUID = 0x7
+ CAP_SYSLOG = 0x22
+ CAP_SYS_ADMIN = 0x15
+ CAP_SYS_BOOT = 0x16
+ CAP_SYS_CHROOT = 0x12
+ CAP_SYS_MODULE = 0x10
+ CAP_SYS_NICE = 0x17
+ CAP_SYS_PACCT = 0x14
+ CAP_SYS_PTRACE = 0x13
+ CAP_SYS_RAWIO = 0x11
+ CAP_SYS_RESOURCE = 0x18
+ CAP_SYS_TIME = 0x19
+ CAP_SYS_TTY_CONFIG = 0x1a
+ CAP_WAKE_ALARM = 0x23
+ CFLUSH = 0xf
+ CGROUP2_SUPER_MAGIC = 0x63677270
+ CGROUP_SUPER_MAGIC = 0x27e0eb
+ CLOCK_BOOTTIME = 0x7
+ CLOCK_BOOTTIME_ALARM = 0x9
+ CLOCK_DEFAULT = 0x0
+ CLOCK_EXT = 0x1
+ CLOCK_INT = 0x2
+ CLOCK_MONOTONIC = 0x1
+ CLOCK_MONOTONIC_COARSE = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_REALTIME_ALARM = 0x8
+ CLOCK_REALTIME_COARSE = 0x5
+ CLOCK_TAI = 0xb
+ CLOCK_THREAD_CPUTIME_ID = 0x3
+ CLOCK_TXFROMRX = 0x4
+ CLOCK_TXINT = 0x3
+ CLONE_ARGS_SIZE_VER0 = 0x40
+ CLONE_ARGS_SIZE_VER1 = 0x50
+ CLONE_ARGS_SIZE_VER2 = 0x58
+ CLONE_CHILD_CLEARTID = 0x200000
+ CLONE_CHILD_SETTID = 0x1000000
+ CLONE_CLEAR_SIGHAND = 0x100000000
+ CLONE_DETACHED = 0x400000
+ CLONE_FILES = 0x400
+ CLONE_FS = 0x200
+ CLONE_INTO_CGROUP = 0x200000000
+ CLONE_IO = 0x80000000
+ CLONE_NEWCGROUP = 0x2000000
+ CLONE_NEWIPC = 0x8000000
+ CLONE_NEWNET = 0x40000000
+ CLONE_NEWNS = 0x20000
+ CLONE_NEWPID = 0x20000000
+ CLONE_NEWTIME = 0x80
+ CLONE_NEWUSER = 0x10000000
+ CLONE_NEWUTS = 0x4000000
+ CLONE_PARENT = 0x8000
+ CLONE_PARENT_SETTID = 0x100000
+ CLONE_PIDFD = 0x1000
+ CLONE_PTRACE = 0x2000
+ CLONE_SETTLS = 0x80000
+ CLONE_SIGHAND = 0x800
+ CLONE_SYSVSEM = 0x40000
+ CLONE_THREAD = 0x10000
+ CLONE_UNTRACED = 0x800000
+ CLONE_VFORK = 0x4000
+ CLONE_VM = 0x100
+ CMSPAR = 0x40000000
+ CODA_SUPER_MAGIC = 0x73757245
+ CR0 = 0x0
+ CRAMFS_MAGIC = 0x28cd3d45
+ CRTSCTS = 0x80000000
+ CRYPTO_MAX_NAME = 0x40
+ CRYPTO_MSG_MAX = 0x15
+ CRYPTO_NR_MSGTYPES = 0x6
+ CRYPTO_REPORT_MAXSIZE = 0x160
+ CS5 = 0x0
+ CSIGNAL = 0xff
+ CSTART = 0x11
+ CSTATUS = 0x0
+ CSTOP = 0x13
+ CSUSP = 0x1a
+ DAXFS_MAGIC = 0x64646178
+ DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_FLASH_OVERWRITE_IDENTIFIERS = 0x2
+ DEVLINK_FLASH_OVERWRITE_SETTINGS = 0x1
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
+ DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3
+ DEVMEM_MAGIC = 0x454d444d
+ DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
+ DM_ACTIVE_PRESENT_FLAG = 0x20
+ DM_BUFFER_FULL_FLAG = 0x100
+ DM_CONTROL_NODE = "control"
+ DM_DATA_OUT_FLAG = 0x10000
+ DM_DEFERRED_REMOVE = 0x20000
+ DM_DEV_ARM_POLL = 0xc138fd10
+ DM_DEV_CREATE = 0xc138fd03
+ DM_DEV_REMOVE = 0xc138fd04
+ DM_DEV_RENAME = 0xc138fd05
+ DM_DEV_SET_GEOMETRY = 0xc138fd0f
+ DM_DEV_STATUS = 0xc138fd07
+ DM_DEV_SUSPEND = 0xc138fd06
+ DM_DEV_WAIT = 0xc138fd08
+ DM_DIR = "mapper"
+ DM_GET_TARGET_VERSION = 0xc138fd11
+ DM_IMA_MEASUREMENT_FLAG = 0x80000
+ DM_INACTIVE_PRESENT_FLAG = 0x40
+ DM_INTERNAL_SUSPEND_FLAG = 0x40000
+ DM_IOCTL = 0xfd
+ DM_LIST_DEVICES = 0xc138fd02
+ DM_LIST_VERSIONS = 0xc138fd0d
+ DM_MAX_TYPE_NAME = 0x10
+ DM_NAME_LEN = 0x80
+ DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID = 0x2
+ DM_NAME_LIST_FLAG_HAS_UUID = 0x1
+ DM_NOFLUSH_FLAG = 0x800
+ DM_PERSISTENT_DEV_FLAG = 0x8
+ DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
+ DM_READONLY_FLAG = 0x1
+ DM_REMOVE_ALL = 0xc138fd01
+ DM_SECURE_DATA_FLAG = 0x8000
+ DM_SKIP_BDGET_FLAG = 0x200
+ DM_SKIP_LOCKFS_FLAG = 0x400
+ DM_STATUS_TABLE_FLAG = 0x10
+ DM_SUSPEND_FLAG = 0x2
+ DM_TABLE_CLEAR = 0xc138fd0a
+ DM_TABLE_DEPS = 0xc138fd0b
+ DM_TABLE_LOAD = 0xc138fd09
+ DM_TABLE_STATUS = 0xc138fd0c
+ DM_TARGET_MSG = 0xc138fd0e
+ DM_UEVENT_GENERATED_FLAG = 0x2000
+ DM_UUID_FLAG = 0x4000
+ DM_UUID_LEN = 0x81
+ DM_VERSION = 0xc138fd00
+ DM_VERSION_EXTRA = "-ioctl (2021-03-22)"
+ DM_VERSION_MAJOR = 0x4
+ DM_VERSION_MINOR = 0x2d
+ DM_VERSION_PATCHLEVEL = 0x0
+ 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
+ ECRYPTFS_SUPER_MAGIC = 0xf15f
+ EFD_SEMAPHORE = 0x1
+ EFIVARFS_MAGIC = 0xde5e81e4
+ EFS_SUPER_MAGIC = 0x414a53
+ ENCODING_DEFAULT = 0x0
+ ENCODING_FM_MARK = 0x3
+ ENCODING_FM_SPACE = 0x4
+ ENCODING_MANCHESTER = 0x5
+ ENCODING_NRZ = 0x1
+ ENCODING_NRZI = 0x2
+ EPOLLERR = 0x8
+ EPOLLET = 0x80000000
+ EPOLLEXCLUSIVE = 0x10000000
+ EPOLLHUP = 0x10
+ EPOLLIN = 0x1
+ EPOLLMSG = 0x400
+ EPOLLONESHOT = 0x40000000
+ EPOLLOUT = 0x4
+ EPOLLPRI = 0x2
+ EPOLLRDBAND = 0x80
+ EPOLLRDHUP = 0x2000
+ EPOLLRDNORM = 0x40
+ EPOLLWAKEUP = 0x20000000
+ EPOLLWRBAND = 0x200
+ EPOLLWRNORM = 0x100
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
+ ESP_V4_FLOW = 0xa
+ ESP_V6_FLOW = 0xc
+ ETHER_FLOW = 0x12
+ ETHTOOL_BUSINFO_LEN = 0x20
+ ETHTOOL_EROMVERS_LEN = 0x20
+ ETHTOOL_FEC_AUTO = 0x2
+ ETHTOOL_FEC_BASER = 0x10
+ ETHTOOL_FEC_LLRS = 0x20
+ ETHTOOL_FEC_NONE = 0x1
+ ETHTOOL_FEC_OFF = 0x4
+ ETHTOOL_FEC_RS = 0x8
+ ETHTOOL_FLAG_ALL = 0x7
+ ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
+ ETHTOOL_FLAG_OMIT_REPLY = 0x2
+ ETHTOOL_FLAG_STATS = 0x4
+ ETHTOOL_FLASHDEV = 0x33
+ ETHTOOL_FLASH_MAX_FILENAME = 0x80
+ ETHTOOL_FWVERS_LEN = 0x20
+ ETHTOOL_F_COMPAT = 0x4
+ ETHTOOL_F_UNSUPPORTED = 0x1
+ ETHTOOL_F_WISH = 0x2
+ ETHTOOL_GCHANNELS = 0x3c
+ ETHTOOL_GCOALESCE = 0xe
+ ETHTOOL_GDRVINFO = 0x3
+ ETHTOOL_GEEE = 0x44
+ ETHTOOL_GEEPROM = 0xb
+ ETHTOOL_GENL_NAME = "ethtool"
+ ETHTOOL_GENL_VERSION = 0x1
+ ETHTOOL_GET_DUMP_DATA = 0x40
+ ETHTOOL_GET_DUMP_FLAG = 0x3f
+ ETHTOOL_GET_TS_INFO = 0x41
+ ETHTOOL_GFEATURES = 0x3a
+ ETHTOOL_GFECPARAM = 0x50
+ ETHTOOL_GFLAGS = 0x25
+ ETHTOOL_GGRO = 0x2b
+ ETHTOOL_GGSO = 0x23
+ ETHTOOL_GLINK = 0xa
+ ETHTOOL_GLINKSETTINGS = 0x4c
+ ETHTOOL_GMODULEEEPROM = 0x43
+ ETHTOOL_GMODULEINFO = 0x42
+ ETHTOOL_GMSGLVL = 0x7
+ ETHTOOL_GPAUSEPARAM = 0x12
+ ETHTOOL_GPERMADDR = 0x20
+ ETHTOOL_GPFLAGS = 0x27
+ ETHTOOL_GPHYSTATS = 0x4a
+ ETHTOOL_GREGS = 0x4
+ ETHTOOL_GRINGPARAM = 0x10
+ ETHTOOL_GRSSH = 0x46
+ ETHTOOL_GRXCLSRLALL = 0x30
+ ETHTOOL_GRXCLSRLCNT = 0x2e
+ ETHTOOL_GRXCLSRULE = 0x2f
+ ETHTOOL_GRXCSUM = 0x14
+ ETHTOOL_GRXFH = 0x29
+ ETHTOOL_GRXFHINDIR = 0x38
+ ETHTOOL_GRXNTUPLE = 0x36
+ ETHTOOL_GRXRINGS = 0x2d
+ ETHTOOL_GSET = 0x1
+ ETHTOOL_GSG = 0x18
+ ETHTOOL_GSSET_INFO = 0x37
+ ETHTOOL_GSTATS = 0x1d
+ ETHTOOL_GSTRINGS = 0x1b
+ ETHTOOL_GTSO = 0x1e
+ ETHTOOL_GTUNABLE = 0x48
+ ETHTOOL_GTXCSUM = 0x16
+ ETHTOOL_GUFO = 0x21
+ ETHTOOL_GWOL = 0x5
+ ETHTOOL_MCGRP_MONITOR_NAME = "monitor"
+ ETHTOOL_NWAY_RST = 0x9
+ ETHTOOL_PERQUEUE = 0x4b
+ ETHTOOL_PHYS_ID = 0x1c
+ ETHTOOL_PHY_EDPD_DFLT_TX_MSECS = 0xffff
+ ETHTOOL_PHY_EDPD_DISABLE = 0x0
+ ETHTOOL_PHY_EDPD_NO_TX = 0xfffe
+ ETHTOOL_PHY_FAST_LINK_DOWN_OFF = 0xff
+ ETHTOOL_PHY_FAST_LINK_DOWN_ON = 0x0
+ ETHTOOL_PHY_GTUNABLE = 0x4e
+ ETHTOOL_PHY_STUNABLE = 0x4f
+ ETHTOOL_RESET = 0x34
+ ETHTOOL_RXNTUPLE_ACTION_CLEAR = -0x2
+ ETHTOOL_RXNTUPLE_ACTION_DROP = -0x1
+ ETHTOOL_RX_FLOW_SPEC_RING = 0xffffffff
+ ETHTOOL_RX_FLOW_SPEC_RING_VF = 0xff00000000
+ ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF = 0x20
+ ETHTOOL_SCHANNELS = 0x3d
+ ETHTOOL_SCOALESCE = 0xf
+ ETHTOOL_SEEE = 0x45
+ ETHTOOL_SEEPROM = 0xc
+ ETHTOOL_SET_DUMP = 0x3e
+ ETHTOOL_SFEATURES = 0x3b
+ ETHTOOL_SFECPARAM = 0x51
+ ETHTOOL_SFLAGS = 0x26
+ ETHTOOL_SGRO = 0x2c
+ ETHTOOL_SGSO = 0x24
+ ETHTOOL_SLINKSETTINGS = 0x4d
+ ETHTOOL_SMSGLVL = 0x8
+ ETHTOOL_SPAUSEPARAM = 0x13
+ ETHTOOL_SPFLAGS = 0x28
+ ETHTOOL_SRINGPARAM = 0x11
+ ETHTOOL_SRSSH = 0x47
+ ETHTOOL_SRXCLSRLDEL = 0x31
+ ETHTOOL_SRXCLSRLINS = 0x32
+ ETHTOOL_SRXCSUM = 0x15
+ ETHTOOL_SRXFH = 0x2a
+ ETHTOOL_SRXFHINDIR = 0x39
+ ETHTOOL_SRXNTUPLE = 0x35
+ ETHTOOL_SSET = 0x2
+ ETHTOOL_SSG = 0x19
+ ETHTOOL_STSO = 0x1f
+ ETHTOOL_STUNABLE = 0x49
+ ETHTOOL_STXCSUM = 0x17
+ ETHTOOL_SUFO = 0x22
+ ETHTOOL_SWOL = 0x6
+ ETHTOOL_TEST = 0x1a
+ ETH_P_1588 = 0x88f7
+ ETH_P_8021AD = 0x88a8
+ ETH_P_8021AH = 0x88e7
+ ETH_P_8021Q = 0x8100
+ ETH_P_80221 = 0x8917
+ ETH_P_802_2 = 0x4
+ ETH_P_802_3 = 0x1
+ ETH_P_802_3_MIN = 0x600
+ ETH_P_802_EX1 = 0x88b5
+ ETH_P_AARP = 0x80f3
+ ETH_P_AF_IUCV = 0xfbfb
+ ETH_P_ALL = 0x3
+ ETH_P_AOE = 0x88a2
+ ETH_P_ARCNET = 0x1a
+ ETH_P_ARP = 0x806
+ ETH_P_ATALK = 0x809b
+ ETH_P_ATMFATE = 0x8884
+ ETH_P_ATMMPOA = 0x884c
+ ETH_P_AX25 = 0x2
+ ETH_P_BATMAN = 0x4305
+ ETH_P_BPQ = 0x8ff
+ ETH_P_CAIF = 0xf7
+ ETH_P_CAN = 0xc
+ ETH_P_CANFD = 0xd
+ ETH_P_CFM = 0x8902
+ ETH_P_CONTROL = 0x16
+ ETH_P_CUST = 0x6006
+ ETH_P_DDCMP = 0x6
+ ETH_P_DEC = 0x6000
+ ETH_P_DIAG = 0x6005
+ ETH_P_DNA_DL = 0x6001
+ ETH_P_DNA_RC = 0x6002
+ ETH_P_DNA_RT = 0x6003
+ ETH_P_DSA = 0x1b
+ ETH_P_DSA_8021Q = 0xdadb
+ ETH_P_ECONET = 0x18
+ ETH_P_EDSA = 0xdada
+ ETH_P_ERSPAN = 0x88be
+ ETH_P_ERSPAN2 = 0x22eb
+ ETH_P_FCOE = 0x8906
+ ETH_P_FIP = 0x8914
+ ETH_P_HDLC = 0x19
+ ETH_P_HSR = 0x892f
+ ETH_P_IBOE = 0x8915
+ ETH_P_IEEE802154 = 0xf6
+ ETH_P_IEEEPUP = 0xa00
+ ETH_P_IEEEPUPAT = 0xa01
+ ETH_P_IFE = 0xed3e
+ ETH_P_IP = 0x800
+ ETH_P_IPV6 = 0x86dd
+ ETH_P_IPX = 0x8137
+ ETH_P_IRDA = 0x17
+ ETH_P_LAT = 0x6004
+ ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
+ ETH_P_LOCALTALK = 0x9
+ ETH_P_LOOP = 0x60
+ ETH_P_LOOPBACK = 0x9000
+ ETH_P_MACSEC = 0x88e5
+ ETH_P_MAP = 0xf9
+ ETH_P_MCTP = 0xfa
+ ETH_P_MOBITEX = 0x15
+ ETH_P_MPLS_MC = 0x8848
+ ETH_P_MPLS_UC = 0x8847
+ ETH_P_MRP = 0x88e3
+ ETH_P_MVRP = 0x88f5
+ ETH_P_NCSI = 0x88f8
+ ETH_P_NSH = 0x894f
+ ETH_P_PAE = 0x888e
+ ETH_P_PAUSE = 0x8808
+ ETH_P_PHONET = 0xf5
+ ETH_P_PPPTALK = 0x10
+ ETH_P_PPP_DISC = 0x8863
+ ETH_P_PPP_MP = 0x8
+ ETH_P_PPP_SES = 0x8864
+ ETH_P_PREAUTH = 0x88c7
+ ETH_P_PRP = 0x88fb
+ ETH_P_PUP = 0x200
+ ETH_P_PUPAT = 0x201
+ ETH_P_QINQ1 = 0x9100
+ ETH_P_QINQ2 = 0x9200
+ ETH_P_QINQ3 = 0x9300
+ ETH_P_RARP = 0x8035
+ ETH_P_SCA = 0x6007
+ ETH_P_SLOW = 0x8809
+ ETH_P_SNAP = 0x5
+ ETH_P_TDLS = 0x890d
+ ETH_P_TEB = 0x6558
+ ETH_P_TIPC = 0x88ca
+ ETH_P_TRAILER = 0x1c
+ ETH_P_TR_802_2 = 0x11
+ ETH_P_TSN = 0x22f0
+ ETH_P_WAN_PPP = 0x7
+ ETH_P_WCCP = 0x883e
+ ETH_P_X25 = 0x805
+ ETH_P_XDSA = 0xf8
+ EV_ABS = 0x3
+ EV_CNT = 0x20
+ EV_FF = 0x15
+ EV_FF_STATUS = 0x17
+ EV_KEY = 0x1
+ EV_LED = 0x11
+ EV_MAX = 0x1f
+ EV_MSC = 0x4
+ EV_PWR = 0x16
+ EV_REL = 0x2
+ EV_REP = 0x14
+ EV_SND = 0x12
+ EV_SW = 0x5
+ EV_SYN = 0x0
+ EV_VERSION = 0x10001
+ EXABYTE_ENABLE_NEST = 0xf0
+ EXT2_SUPER_MAGIC = 0xef53
+ EXT3_SUPER_MAGIC = 0xef53
+ EXT4_SUPER_MAGIC = 0xef53
+ EXTA = 0xe
+ EXTB = 0xf
+ F2FS_SUPER_MAGIC = 0xf2f52010
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_UNSHARE_RANGE = 0x40
+ FALLOC_FL_ZERO_RANGE = 0x10
+ FANOTIFY_METADATA_VERSION = 0x3
+ FAN_ACCESS = 0x1
+ FAN_ACCESS_PERM = 0x20000
+ FAN_ALLOW = 0x1
+ FAN_ALL_CLASS_BITS = 0xc
+ FAN_ALL_EVENTS = 0x3b
+ FAN_ALL_INIT_FLAGS = 0x3f
+ FAN_ALL_MARK_FLAGS = 0xff
+ FAN_ALL_OUTGOING_EVENTS = 0x3403b
+ FAN_ALL_PERM_EVENTS = 0x30000
+ FAN_ATTRIB = 0x4
+ FAN_AUDIT = 0x10
+ FAN_CLASS_CONTENT = 0x4
+ FAN_CLASS_NOTIF = 0x0
+ FAN_CLASS_PRE_CONTENT = 0x8
+ FAN_CLOEXEC = 0x1
+ FAN_CLOSE = 0x18
+ FAN_CLOSE_NOWRITE = 0x10
+ FAN_CLOSE_WRITE = 0x8
+ FAN_CREATE = 0x100
+ FAN_DELETE = 0x200
+ FAN_DELETE_SELF = 0x400
+ FAN_DENY = 0x2
+ FAN_ENABLE_AUDIT = 0x40
+ FAN_EPIDFD = -0x2
+ FAN_EVENT_INFO_TYPE_DFID = 0x3
+ FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
+ FAN_EVENT_INFO_TYPE_FID = 0x1
+ FAN_EVENT_INFO_TYPE_PIDFD = 0x4
+ FAN_EVENT_METADATA_LEN = 0x18
+ FAN_EVENT_ON_CHILD = 0x8000000
+ FAN_MARK_ADD = 0x1
+ FAN_MARK_DONT_FOLLOW = 0x4
+ FAN_MARK_FILESYSTEM = 0x100
+ FAN_MARK_FLUSH = 0x80
+ FAN_MARK_IGNORED_MASK = 0x20
+ FAN_MARK_IGNORED_SURV_MODIFY = 0x40
+ FAN_MARK_INODE = 0x0
+ FAN_MARK_MOUNT = 0x10
+ FAN_MARK_ONLYDIR = 0x8
+ FAN_MARK_REMOVE = 0x2
+ FAN_MODIFY = 0x2
+ FAN_MOVE = 0xc0
+ FAN_MOVED_FROM = 0x40
+ FAN_MOVED_TO = 0x80
+ FAN_MOVE_SELF = 0x800
+ FAN_NOFD = -0x1
+ FAN_NONBLOCK = 0x2
+ FAN_NOPIDFD = -0x1
+ FAN_ONDIR = 0x40000000
+ FAN_OPEN = 0x20
+ FAN_OPEN_EXEC = 0x1000
+ FAN_OPEN_EXEC_PERM = 0x40000
+ FAN_OPEN_PERM = 0x10000
+ FAN_Q_OVERFLOW = 0x4000
+ FAN_REPORT_DFID_NAME = 0xc00
+ FAN_REPORT_DIR_FID = 0x400
+ FAN_REPORT_FID = 0x200
+ FAN_REPORT_NAME = 0x800
+ FAN_REPORT_PIDFD = 0x80
+ FAN_REPORT_TID = 0x100
+ FAN_UNLIMITED_MARKS = 0x20
+ FAN_UNLIMITED_QUEUE = 0x10
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FIDEDUPERANGE = 0xc0189436
+ FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
+ FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
+ FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
+ FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
+ FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
+ FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
+ FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
+ FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
+ FSCRYPT_KEY_STATUS_ABSENT = 0x1
+ FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
+ FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
+ FSCRYPT_KEY_STATUS_PRESENT = 0x2
+ FSCRYPT_MAX_KEY_SIZE = 0x40
+ FSCRYPT_MODE_ADIANTUM = 0x9
+ FSCRYPT_MODE_AES_128_CBC = 0x5
+ FSCRYPT_MODE_AES_128_CTS = 0x6
+ FSCRYPT_MODE_AES_256_CTS = 0x4
+ FSCRYPT_MODE_AES_256_XTS = 0x1
+ FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
+ FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
+ FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
+ FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
+ FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
+ FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
+ FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 = 0x10
+ FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
+ FSCRYPT_POLICY_V1 = 0x0
+ FSCRYPT_POLICY_V2 = 0x2
+ FS_ENCRYPTION_MODE_ADIANTUM = 0x9
+ FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
+ FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
+ FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
+ FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
+ FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
+ FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
+ FS_ENCRYPTION_MODE_INVALID = 0x0
+ FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
+ FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
+ FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
+ FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
+ FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
+ FS_IOC_MEASURE_VERITY = 0xc0046686
+ FS_IOC_READ_VERITY_METADATA = 0xc0286687
+ FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
+ FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
+ FS_KEY_DESCRIPTOR_SIZE = 0x8
+ FS_KEY_DESC_PREFIX = "fscrypt:"
+ FS_KEY_DESC_PREFIX_SIZE = 0x8
+ FS_MAX_KEY_SIZE = 0x40
+ FS_POLICY_FLAGS_PAD_16 = 0x2
+ FS_POLICY_FLAGS_PAD_32 = 0x3
+ FS_POLICY_FLAGS_PAD_4 = 0x0
+ FS_POLICY_FLAGS_PAD_8 = 0x1
+ FS_POLICY_FLAGS_PAD_MASK = 0x3
+ FS_POLICY_FLAGS_VALID = 0x7
+ FS_VERITY_FL = 0x100000
+ FS_VERITY_HASH_ALG_SHA256 = 0x1
+ FS_VERITY_HASH_ALG_SHA512 = 0x2
+ FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2
+ FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1
+ FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3
+ FUTEXFS_SUPER_MAGIC = 0xbad1dea
+ F_ADD_SEALS = 0x409
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x406
+ F_EXLCK = 0x4
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLEASE = 0x401
+ F_GETOWN_EX = 0x10
+ F_GETPIPE_SZ = 0x408
+ F_GETSIG = 0xb
+ F_GET_FILE_RW_HINT = 0x40d
+ F_GET_RW_HINT = 0x40b
+ F_GET_SEALS = 0x40a
+ F_LOCK = 0x1
+ F_NOTIFY = 0x402
+ F_OFD_GETLK = 0x24
+ F_OFD_SETLK = 0x25
+ F_OFD_SETLKW = 0x26
+ F_OK = 0x0
+ F_SEAL_FUTURE_WRITE = 0x10
+ F_SEAL_GROW = 0x4
+ F_SEAL_SEAL = 0x1
+ F_SEAL_SHRINK = 0x2
+ F_SEAL_WRITE = 0x8
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLEASE = 0x400
+ F_SETOWN_EX = 0xf
+ F_SETPIPE_SZ = 0x407
+ F_SETSIG = 0xa
+ F_SET_FILE_RW_HINT = 0x40e
+ F_SET_RW_HINT = 0x40c
+ F_SHLCK = 0x8
+ F_TEST = 0x3
+ F_TLOCK = 0x2
+ F_ULOCK = 0x0
+ GENL_ADMIN_PERM = 0x1
+ GENL_CMD_CAP_DO = 0x2
+ GENL_CMD_CAP_DUMP = 0x4
+ GENL_CMD_CAP_HASPOL = 0x8
+ GENL_HDRLEN = 0x4
+ GENL_ID_CTRL = 0x10
+ GENL_ID_PMCRAID = 0x12
+ GENL_ID_VFS_DQUOT = 0x11
+ GENL_MAX_ID = 0x3ff
+ GENL_MIN_ID = 0x10
+ GENL_NAMSIZ = 0x10
+ GENL_START_ALLOC = 0x13
+ GENL_UNS_ADMIN_PERM = 0x10
+ GRND_INSECURE = 0x4
+ GRND_NONBLOCK = 0x1
+ GRND_RANDOM = 0x2
+ HDIO_DRIVE_CMD = 0x31f
+ HDIO_DRIVE_CMD_AEB = 0x31e
+ HDIO_DRIVE_CMD_HDR_SIZE = 0x4
+ HDIO_DRIVE_HOB_HDR_SIZE = 0x8
+ HDIO_DRIVE_RESET = 0x31c
+ HDIO_DRIVE_TASK = 0x31e
+ HDIO_DRIVE_TASKFILE = 0x31d
+ HDIO_DRIVE_TASK_HDR_SIZE = 0x8
+ HDIO_GETGEO = 0x301
+ HDIO_GET_32BIT = 0x309
+ HDIO_GET_ACOUSTIC = 0x30f
+ HDIO_GET_ADDRESS = 0x310
+ HDIO_GET_BUSSTATE = 0x31a
+ HDIO_GET_DMA = 0x30b
+ HDIO_GET_IDENTITY = 0x30d
+ HDIO_GET_KEEPSETTINGS = 0x308
+ HDIO_GET_MULTCOUNT = 0x304
+ HDIO_GET_NICE = 0x30c
+ HDIO_GET_NOWERR = 0x30a
+ HDIO_GET_QDMA = 0x305
+ HDIO_GET_UNMASKINTR = 0x302
+ HDIO_GET_WCACHE = 0x30e
+ HDIO_OBSOLETE_IDENTITY = 0x307
+ HDIO_SCAN_HWIF = 0x328
+ HDIO_SET_32BIT = 0x324
+ HDIO_SET_ACOUSTIC = 0x32c
+ HDIO_SET_ADDRESS = 0x32f
+ HDIO_SET_BUSSTATE = 0x32d
+ HDIO_SET_DMA = 0x326
+ HDIO_SET_KEEPSETTINGS = 0x323
+ HDIO_SET_MULTCOUNT = 0x321
+ HDIO_SET_NICE = 0x329
+ HDIO_SET_NOWERR = 0x325
+ HDIO_SET_PIO_MODE = 0x327
+ HDIO_SET_QDMA = 0x32e
+ HDIO_SET_UNMASKINTR = 0x322
+ HDIO_SET_WCACHE = 0x32b
+ HDIO_SET_XFER = 0x306
+ HDIO_TRISTATE_HWIF = 0x31b
+ HDIO_UNREGISTER_HWIF = 0x32a
+ HID_MAX_DESCRIPTOR_SIZE = 0x1000
+ HOSTFS_SUPER_MAGIC = 0xc0ffee
+ HPFS_SUPER_MAGIC = 0xf995e849
+ HUGETLBFS_MAGIC = 0x958458f6
+ IBSHIFT = 0x10
+ ICRNL = 0x100
+ IFA_F_DADFAILED = 0x8
+ IFA_F_DEPRECATED = 0x20
+ IFA_F_HOMEADDRESS = 0x10
+ IFA_F_MANAGETEMPADDR = 0x100
+ IFA_F_MCAUTOJOIN = 0x400
+ IFA_F_NODAD = 0x2
+ IFA_F_NOPREFIXROUTE = 0x200
+ IFA_F_OPTIMISTIC = 0x4
+ IFA_F_PERMANENT = 0x80
+ IFA_F_SECONDARY = 0x1
+ IFA_F_STABLE_PRIVACY = 0x800
+ IFA_F_TEMPORARY = 0x1
+ IFA_F_TENTATIVE = 0x40
+ IFA_MAX = 0xa
+ IFF_ALLMULTI = 0x200
+ IFF_ATTACH_QUEUE = 0x200
+ IFF_AUTOMEDIA = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_DETACH_QUEUE = 0x400
+ IFF_DORMANT = 0x20000
+ IFF_DYNAMIC = 0x8000
+ IFF_ECHO = 0x40000
+ IFF_LOOPBACK = 0x8
+ IFF_LOWER_UP = 0x10000
+ IFF_MASTER = 0x400
+ IFF_MULTICAST = 0x1000
+ IFF_MULTI_QUEUE = 0x100
+ IFF_NAPI = 0x10
+ IFF_NAPI_FRAGS = 0x20
+ IFF_NOARP = 0x80
+ IFF_NOFILTER = 0x1000
+ IFF_NOTRAILERS = 0x20
+ IFF_NO_PI = 0x1000
+ IFF_ONE_QUEUE = 0x2000
+ IFF_PERSIST = 0x800
+ IFF_POINTOPOINT = 0x10
+ IFF_PORTSEL = 0x2000
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SLAVE = 0x800
+ IFF_TAP = 0x2
+ IFF_TUN = 0x1
+ IFF_TUN_EXCL = 0x8000
+ IFF_UP = 0x1
+ IFF_VNET_HDR = 0x4000
+ IFF_VOLATILE = 0x70c5a
+ IFNAMSIZ = 0x10
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_ACCESS = 0x1
+ IN_ALL_EVENTS = 0xfff
+ IN_ATTRIB = 0x4
+ 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_CLOSE = 0x18
+ IN_CLOSE_NOWRITE = 0x10
+ IN_CLOSE_WRITE = 0x8
+ IN_CREATE = 0x100
+ IN_DELETE = 0x200
+ IN_DELETE_SELF = 0x400
+ IN_DONT_FOLLOW = 0x2000000
+ IN_EXCL_UNLINK = 0x4000000
+ IN_IGNORED = 0x8000
+ IN_ISDIR = 0x40000000
+ IN_LOOPBACKNET = 0x7f
+ IN_MASK_ADD = 0x20000000
+ IN_MASK_CREATE = 0x10000000
+ IN_MODIFY = 0x2
+ IN_MOVE = 0xc0
+ IN_MOVED_FROM = 0x40
+ IN_MOVED_TO = 0x80
+ IN_MOVE_SELF = 0x800
+ IN_ONESHOT = 0x80000000
+ IN_ONLYDIR = 0x1000000
+ IN_OPEN = 0x20
+ IN_Q_OVERFLOW = 0x4000
+ IN_UNMOUNT = 0x2000
+ IPPROTO_AH = 0x33
+ IPPROTO_BEETPH = 0x5e
+ IPPROTO_COMP = 0x6c
+ IPPROTO_DCCP = 0x21
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERNET = 0x8f
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_L2TP = 0x73
+ IPPROTO_MH = 0x87
+ IPPROTO_MPLS = 0x89
+ IPPROTO_MPTCP = 0x106
+ IPPROTO_MTP = 0x5c
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_2292DSTOPTS = 0x4
+ IPV6_2292HOPLIMIT = 0x8
+ IPV6_2292HOPOPTS = 0x3
+ IPV6_2292PKTINFO = 0x2
+ IPV6_2292PKTOPTIONS = 0x6
+ IPV6_2292RTHDR = 0x5
+ IPV6_ADDRFORM = 0x1
+ IPV6_ADDR_PREFERENCES = 0x48
+ IPV6_ADD_MEMBERSHIP = 0x14
+ IPV6_AUTHHDR = 0xa
+ IPV6_AUTOFLOWLABEL = 0x46
+ IPV6_CHECKSUM = 0x7
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DROP_MEMBERSHIP = 0x15
+ IPV6_DSTOPTS = 0x3b
+ IPV6_FLOW = 0x11
+ IPV6_FREEBIND = 0x4e
+ IPV6_HDRINCL = 0x24
+ IPV6_HOPLIMIT = 0x34
+ IPV6_HOPOPTS = 0x36
+ IPV6_IPSEC_POLICY = 0x22
+ IPV6_JOIN_ANYCAST = 0x1b
+ IPV6_JOIN_GROUP = 0x14
+ IPV6_LEAVE_ANYCAST = 0x1c
+ IPV6_LEAVE_GROUP = 0x15
+ IPV6_MINHOPCOUNT = 0x49
+ IPV6_MTU = 0x18
+ IPV6_MTU_DISCOVER = 0x17
+ IPV6_MULTICAST_ALL = 0x1d
+ IPV6_MULTICAST_HOPS = 0x12
+ IPV6_MULTICAST_IF = 0x11
+ IPV6_MULTICAST_LOOP = 0x13
+ IPV6_NEXTHOP = 0x9
+ IPV6_ORIGDSTADDR = 0x4a
+ IPV6_PATHMTU = 0x3d
+ IPV6_PKTINFO = 0x32
+ IPV6_PMTUDISC_DO = 0x2
+ IPV6_PMTUDISC_DONT = 0x0
+ IPV6_PMTUDISC_INTERFACE = 0x4
+ IPV6_PMTUDISC_OMIT = 0x5
+ IPV6_PMTUDISC_PROBE = 0x3
+ IPV6_PMTUDISC_WANT = 0x1
+ IPV6_RECVDSTOPTS = 0x3a
+ IPV6_RECVERR = 0x19
+ IPV6_RECVERR_RFC4884 = 0x1f
+ IPV6_RECVFRAGSIZE = 0x4d
+ IPV6_RECVHOPLIMIT = 0x33
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVORIGDSTADDR = 0x4a
+ IPV6_RECVPATHMTU = 0x3c
+ IPV6_RECVPKTINFO = 0x31
+ IPV6_RECVRTHDR = 0x38
+ IPV6_RECVTCLASS = 0x42
+ IPV6_ROUTER_ALERT = 0x16
+ IPV6_ROUTER_ALERT_ISOLATE = 0x1e
+ IPV6_RTHDR = 0x39
+ IPV6_RTHDRDSTOPTS = 0x37
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_RXDSTOPTS = 0x3b
+ IPV6_RXHOPOPTS = 0x36
+ IPV6_TCLASS = 0x43
+ IPV6_TRANSPARENT = 0x4b
+ IPV6_UNICAST_HOPS = 0x10
+ IPV6_UNICAST_IF = 0x4c
+ IPV6_USER_FLOW = 0xe
+ IPV6_V6ONLY = 0x1a
+ IPV6_XFRM_POLICY = 0x23
+ IP_ADD_MEMBERSHIP = 0x23
+ IP_ADD_SOURCE_MEMBERSHIP = 0x27
+ IP_BIND_ADDRESS_NO_PORT = 0x18
+ IP_BLOCK_SOURCE = 0x26
+ IP_CHECKSUM = 0x17
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0x24
+ IP_DROP_SOURCE_MEMBERSHIP = 0x28
+ IP_FREEBIND = 0xf
+ IP_HDRINCL = 0x3
+ IP_IPSEC_POLICY = 0x10
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0x14
+ IP_MF = 0x2000
+ IP_MINTTL = 0x15
+ IP_MSFILTER = 0x29
+ IP_MSS = 0x240
+ IP_MTU = 0xe
+ IP_MTU_DISCOVER = 0xa
+ IP_MULTICAST_ALL = 0x31
+ IP_MULTICAST_IF = 0x20
+ IP_MULTICAST_LOOP = 0x22
+ IP_MULTICAST_TTL = 0x21
+ IP_NODEFRAG = 0x16
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x4
+ IP_ORIGDSTADDR = 0x14
+ IP_PASSSEC = 0x12
+ IP_PKTINFO = 0x8
+ IP_PKTOPTIONS = 0x9
+ IP_PMTUDISC = 0xa
+ IP_PMTUDISC_DO = 0x2
+ IP_PMTUDISC_DONT = 0x0
+ IP_PMTUDISC_INTERFACE = 0x4
+ IP_PMTUDISC_OMIT = 0x5
+ IP_PMTUDISC_PROBE = 0x3
+ IP_PMTUDISC_WANT = 0x1
+ IP_RECVERR = 0xb
+ IP_RECVERR_RFC4884 = 0x1a
+ IP_RECVFRAGSIZE = 0x19
+ IP_RECVOPTS = 0x6
+ IP_RECVORIGDSTADDR = 0x14
+ IP_RECVRETOPTS = 0x7
+ IP_RECVTOS = 0xd
+ IP_RECVTTL = 0xc
+ IP_RETOPTS = 0x7
+ IP_RF = 0x8000
+ IP_ROUTER_ALERT = 0x5
+ IP_TOS = 0x1
+ IP_TRANSPARENT = 0x13
+ IP_TTL = 0x2
+ IP_UNBLOCK_SOURCE = 0x25
+ IP_UNICAST_IF = 0x32
+ IP_USER_FLOW = 0xd
+ IP_XFRM_POLICY = 0x11
+ ISOFS_SUPER_MAGIC = 0x9660
+ ISTRIP = 0x20
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ JFFS2_SUPER_MAGIC = 0x72b6
+ KEXEC_ARCH_386 = 0x30000
+ KEXEC_ARCH_68K = 0x40000
+ KEXEC_ARCH_AARCH64 = 0xb70000
+ KEXEC_ARCH_ARM = 0x280000
+ KEXEC_ARCH_DEFAULT = 0x0
+ KEXEC_ARCH_IA_64 = 0x320000
+ KEXEC_ARCH_MASK = 0xffff0000
+ KEXEC_ARCH_MIPS = 0x80000
+ KEXEC_ARCH_MIPS_LE = 0xa0000
+ KEXEC_ARCH_PARISC = 0xf0000
+ KEXEC_ARCH_PPC = 0x140000
+ KEXEC_ARCH_PPC64 = 0x150000
+ KEXEC_ARCH_RISCV = 0xf30000
+ KEXEC_ARCH_S390 = 0x160000
+ KEXEC_ARCH_SH = 0x2a0000
+ KEXEC_ARCH_X86_64 = 0x3e0000
+ KEXEC_FILE_NO_INITRAMFS = 0x4
+ KEXEC_FILE_ON_CRASH = 0x2
+ KEXEC_FILE_UNLOAD = 0x1
+ KEXEC_ON_CRASH = 0x1
+ KEXEC_PRESERVE_CONTEXT = 0x2
+ KEXEC_SEGMENT_MAX = 0x10
+ KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NOTIFICATIONS = 0x4
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
+ KEYCTL_CHOWN = 0x4
+ KEYCTL_CLEAR = 0x7
+ KEYCTL_DESCRIBE = 0x6
+ KEYCTL_DH_COMPUTE = 0x17
+ KEYCTL_GET_KEYRING_ID = 0x0
+ KEYCTL_GET_PERSISTENT = 0x16
+ KEYCTL_GET_SECURITY = 0x11
+ KEYCTL_INSTANTIATE = 0xc
+ KEYCTL_INSTANTIATE_IOV = 0x14
+ KEYCTL_INVALIDATE = 0x15
+ KEYCTL_JOIN_SESSION_KEYRING = 0x1
+ KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
+ KEYCTL_NEGATE = 0xd
+ KEYCTL_PKEY_DECRYPT = 0x1a
+ KEYCTL_PKEY_ENCRYPT = 0x19
+ KEYCTL_PKEY_QUERY = 0x18
+ KEYCTL_PKEY_SIGN = 0x1b
+ KEYCTL_PKEY_VERIFY = 0x1c
+ KEYCTL_READ = 0xb
+ KEYCTL_REJECT = 0x13
+ KEYCTL_RESTRICT_KEYRING = 0x1d
+ KEYCTL_REVOKE = 0x3
+ KEYCTL_SEARCH = 0xa
+ KEYCTL_SESSION_TO_PARENT = 0x12
+ KEYCTL_SETPERM = 0x5
+ KEYCTL_SET_REQKEY_KEYRING = 0xe
+ KEYCTL_SET_TIMEOUT = 0xf
+ KEYCTL_SUPPORTS_DECRYPT = 0x2
+ KEYCTL_SUPPORTS_ENCRYPT = 0x1
+ KEYCTL_SUPPORTS_SIGN = 0x4
+ KEYCTL_SUPPORTS_VERIFY = 0x8
+ KEYCTL_UNLINK = 0x9
+ KEYCTL_UPDATE = 0x2
+ KEYCTL_WATCH_KEY = 0x20
+ KEY_REQKEY_DEFL_DEFAULT = 0x0
+ KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
+ KEY_REQKEY_DEFL_NO_CHANGE = -0x1
+ KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
+ KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
+ KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
+ KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
+ KEY_REQKEY_DEFL_USER_KEYRING = 0x4
+ KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
+ KEY_SPEC_GROUP_KEYRING = -0x6
+ KEY_SPEC_PROCESS_KEYRING = -0x2
+ KEY_SPEC_REQKEY_AUTH_KEY = -0x7
+ KEY_SPEC_REQUESTOR_KEYRING = -0x8
+ KEY_SPEC_SESSION_KEYRING = -0x3
+ 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
+ LINUX_REBOOT_CMD_KEXEC = 0x45584543
+ LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
+ LINUX_REBOOT_CMD_RESTART = 0x1234567
+ LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
+ LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
+ LINUX_REBOOT_MAGIC1 = 0xfee1dead
+ LINUX_REBOOT_MAGIC2 = 0x28121969
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ LOOP_CLR_FD = 0x4c01
+ LOOP_CTL_ADD = 0x4c80
+ LOOP_CTL_GET_FREE = 0x4c82
+ LOOP_CTL_REMOVE = 0x4c81
+ LOOP_GET_STATUS = 0x4c03
+ LOOP_GET_STATUS64 = 0x4c05
+ LOOP_SET_BLOCK_SIZE = 0x4c09
+ LOOP_SET_CAPACITY = 0x4c07
+ LOOP_SET_DIRECT_IO = 0x4c08
+ LOOP_SET_FD = 0x4c00
+ LOOP_SET_STATUS = 0x4c02
+ LOOP_SET_STATUS64 = 0x4c04
+ LOOP_SET_STATUS_CLEARABLE_FLAGS = 0x4
+ LOOP_SET_STATUS_SETTABLE_FLAGS = 0xc
+ LO_KEY_SIZE = 0x20
+ LO_NAME_SIZE = 0x40
+ LWTUNNEL_IP6_MAX = 0x8
+ LWTUNNEL_IP_MAX = 0x8
+ LWTUNNEL_IP_OPTS_MAX = 0x3
+ LWTUNNEL_IP_OPT_ERSPAN_MAX = 0x4
+ LWTUNNEL_IP_OPT_GENEVE_MAX = 0x3
+ LWTUNNEL_IP_OPT_VXLAN_MAX = 0x1
+ MADV_COLD = 0x14
+ MADV_DODUMP = 0x11
+ MADV_DOFORK = 0xb
+ MADV_DONTDUMP = 0x10
+ MADV_DONTFORK = 0xa
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x8
+ MADV_HUGEPAGE = 0xe
+ MADV_HWPOISON = 0x64
+ MADV_KEEPONFORK = 0x13
+ MADV_MERGEABLE = 0xc
+ 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
+ MADV_UNMERGEABLE = 0xd
+ MADV_WILLNEED = 0x3
+ MADV_WIPEONFORK = 0x12
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FIXED_NOREPLACE = 0x100000
+ MAP_HUGE_MASK = 0x3f
+ MAP_HUGE_SHIFT = 0x1a
+ MAP_PRIVATE = 0x2
+ MAP_SHARED = 0x1
+ MAP_SHARED_VALIDATE = 0x3
+ MAP_TYPE = 0xf
+ MCAST_BLOCK_SOURCE = 0x2b
+ MCAST_EXCLUDE = 0x0
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x2a
+ MCAST_JOIN_SOURCE_GROUP = 0x2e
+ MCAST_LEAVE_GROUP = 0x2d
+ MCAST_LEAVE_SOURCE_GROUP = 0x2f
+ MCAST_MSFILTER = 0x30
+ MCAST_UNBLOCK_SOURCE = 0x2c
+ MEMGETREGIONINFO = 0xc0104d08
+ MEMREADOOB64 = 0xc0184d16
+ MEMWRITE = 0xc0304d18
+ MEMWRITEOOB64 = 0xc0184d15
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_32MB = 0x64000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_512MB = 0x74000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
+ MINIX2_SUPER_MAGIC = 0x2468
+ MINIX2_SUPER_MAGIC2 = 0x2478
+ MINIX3_SUPER_MAGIC = 0x4d5a
+ MINIX_SUPER_MAGIC = 0x137f
+ MINIX_SUPER_MAGIC2 = 0x138f
+ MNT_DETACH = 0x2
+ MNT_EXPIRE = 0x4
+ MNT_FORCE = 0x1
+ MODULE_INIT_IGNORE_MODVERSIONS = 0x1
+ MODULE_INIT_IGNORE_VERMAGIC = 0x2
+ MOUNT_ATTR_IDMAP = 0x100000
+ MOUNT_ATTR_NOATIME = 0x10
+ MOUNT_ATTR_NODEV = 0x4
+ MOUNT_ATTR_NODIRATIME = 0x80
+ MOUNT_ATTR_NOEXEC = 0x8
+ MOUNT_ATTR_NOSUID = 0x2
+ MOUNT_ATTR_NOSYMFOLLOW = 0x200000
+ MOUNT_ATTR_RDONLY = 0x1
+ MOUNT_ATTR_RELATIME = 0x0
+ MOUNT_ATTR_SIZE_VER0 = 0x20
+ MOUNT_ATTR_STRICTATIME = 0x20
+ MOUNT_ATTR__ATIME = 0x70
+ MSDOS_SUPER_MAGIC = 0x4d44
+ MSG_BATCH = 0x40000
+ MSG_CMSG_CLOEXEC = 0x40000000
+ MSG_CONFIRM = 0x800
+ MSG_CTRUNC = 0x8
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x40
+ MSG_EOR = 0x80
+ MSG_ERRQUEUE = 0x2000
+ MSG_FASTOPEN = 0x20000000
+ MSG_FIN = 0x200
+ MSG_MORE = 0x8000
+ MSG_NOSIGNAL = 0x4000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_PROXY = 0x10
+ MSG_RST = 0x1000
+ MSG_SYN = 0x400
+ MSG_TRUNC = 0x20
+ MSG_TRYHARD = 0x4
+ MSG_WAITALL = 0x100
+ MSG_WAITFORONE = 0x10000
+ MSG_ZEROCOPY = 0x4000000
+ MS_ACTIVE = 0x40000000
+ MS_ASYNC = 0x1
+ MS_BIND = 0x1000
+ MS_BORN = 0x20000000
+ MS_DIRSYNC = 0x80
+ MS_INVALIDATE = 0x2
+ MS_I_VERSION = 0x800000
+ MS_KERNMOUNT = 0x400000
+ MS_LAZYTIME = 0x2000000
+ MS_MANDLOCK = 0x40
+ MS_MGC_MSK = 0xffff0000
+ MS_MGC_VAL = 0xc0ed0000
+ MS_MOVE = 0x2000
+ MS_NOATIME = 0x400
+ MS_NODEV = 0x4
+ MS_NODIRATIME = 0x800
+ MS_NOEXEC = 0x8
+ MS_NOREMOTELOCK = 0x8000000
+ MS_NOSEC = 0x10000000
+ MS_NOSUID = 0x2
+ MS_NOSYMFOLLOW = 0x100
+ MS_NOUSER = -0x80000000
+ MS_POSIXACL = 0x10000
+ MS_PRIVATE = 0x40000
+ MS_RDONLY = 0x1
+ MS_REC = 0x4000
+ MS_RELATIME = 0x200000
+ MS_REMOUNT = 0x20
+ MS_RMT_MASK = 0x2800051
+ MS_SHARED = 0x100000
+ MS_SILENT = 0x8000
+ MS_SLAVE = 0x80000
+ MS_STRICTATIME = 0x1000000
+ MS_SUBMOUNT = 0x4000000
+ MS_SYNC = 0x4
+ MS_SYNCHRONOUS = 0x10
+ MS_UNBINDABLE = 0x20000
+ MS_VERBOSE = 0x8000
+ MTD_ABSENT = 0x0
+ MTD_BIT_WRITEABLE = 0x800
+ MTD_CAP_NANDFLASH = 0x400
+ MTD_CAP_NORFLASH = 0xc00
+ MTD_CAP_NVRAM = 0x1c00
+ MTD_CAP_RAM = 0x1c00
+ MTD_CAP_ROM = 0x0
+ MTD_DATAFLASH = 0x6
+ MTD_INODE_FS_MAGIC = 0x11307854
+ MTD_MAX_ECCPOS_ENTRIES = 0x40
+ MTD_MAX_OOBFREE_ENTRIES = 0x8
+ MTD_MLCNANDFLASH = 0x8
+ MTD_NANDECC_AUTOPLACE = 0x2
+ MTD_NANDECC_AUTOPL_USR = 0x4
+ MTD_NANDECC_OFF = 0x0
+ MTD_NANDECC_PLACE = 0x1
+ MTD_NANDECC_PLACEONLY = 0x3
+ MTD_NANDFLASH = 0x4
+ MTD_NORFLASH = 0x3
+ MTD_NO_ERASE = 0x1000
+ MTD_OTP_FACTORY = 0x1
+ MTD_OTP_OFF = 0x0
+ MTD_OTP_USER = 0x2
+ MTD_POWERUP_LOCK = 0x2000
+ MTD_RAM = 0x1
+ MTD_ROM = 0x2
+ MTD_SLC_ON_MLC_EMULATION = 0x4000
+ MTD_UBIVOLUME = 0x7
+ MTD_WRITEABLE = 0x400
+ NAME_MAX = 0xff
+ NCP_SUPER_MAGIC = 0x564c
+ NETLINK_ADD_MEMBERSHIP = 0x1
+ NETLINK_AUDIT = 0x9
+ NETLINK_BROADCAST_ERROR = 0x4
+ NETLINK_CAP_ACK = 0xa
+ NETLINK_CONNECTOR = 0xb
+ NETLINK_CRYPTO = 0x15
+ NETLINK_DNRTMSG = 0xe
+ NETLINK_DROP_MEMBERSHIP = 0x2
+ NETLINK_ECRYPTFS = 0x13
+ NETLINK_EXT_ACK = 0xb
+ NETLINK_FIB_LOOKUP = 0xa
+ NETLINK_FIREWALL = 0x3
+ NETLINK_GENERIC = 0x10
+ NETLINK_GET_STRICT_CHK = 0xc
+ NETLINK_INET_DIAG = 0x4
+ NETLINK_IP6_FW = 0xd
+ NETLINK_ISCSI = 0x8
+ NETLINK_KOBJECT_UEVENT = 0xf
+ NETLINK_LISTEN_ALL_NSID = 0x8
+ NETLINK_LIST_MEMBERSHIPS = 0x9
+ NETLINK_NETFILTER = 0xc
+ NETLINK_NFLOG = 0x5
+ NETLINK_NO_ENOBUFS = 0x5
+ NETLINK_PKTINFO = 0x3
+ NETLINK_RDMA = 0x14
+ NETLINK_ROUTE = 0x0
+ NETLINK_RX_RING = 0x6
+ NETLINK_SCSITRANSPORT = 0x12
+ NETLINK_SELINUX = 0x7
+ NETLINK_SMC = 0x16
+ NETLINK_SOCK_DIAG = 0x4
+ NETLINK_TX_RING = 0x7
+ NETLINK_UNUSED = 0x1
+ NETLINK_USERSOCK = 0x2
+ NETLINK_XFRM = 0x6
+ NETNSA_MAX = 0x5
+ NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFC_ATR_REQ_GB_MAXSIZE = 0x30
+ NFC_ATR_REQ_MAXSIZE = 0x40
+ NFC_ATR_RES_GB_MAXSIZE = 0x2f
+ NFC_ATR_RES_MAXSIZE = 0x40
+ NFC_COMM_ACTIVE = 0x0
+ NFC_COMM_PASSIVE = 0x1
+ NFC_DEVICE_NAME_MAXSIZE = 0x8
+ NFC_DIRECTION_RX = 0x0
+ NFC_DIRECTION_TX = 0x1
+ NFC_FIRMWARE_NAME_MAXSIZE = 0x20
+ NFC_GB_MAXSIZE = 0x30
+ NFC_GENL_MCAST_EVENT_NAME = "events"
+ NFC_GENL_NAME = "nfc"
+ NFC_GENL_VERSION = 0x1
+ NFC_HEADER_SIZE = 0x1
+ NFC_ISO15693_UID_MAXSIZE = 0x8
+ NFC_LLCP_MAX_SERVICE_NAME = 0x3f
+ NFC_LLCP_MIUX = 0x1
+ NFC_LLCP_REMOTE_LTO = 0x3
+ NFC_LLCP_REMOTE_MIU = 0x2
+ NFC_LLCP_REMOTE_RW = 0x4
+ NFC_LLCP_RW = 0x0
+ NFC_NFCID1_MAXSIZE = 0xa
+ NFC_NFCID2_MAXSIZE = 0x8
+ NFC_NFCID3_MAXSIZE = 0xa
+ NFC_PROTO_FELICA = 0x3
+ NFC_PROTO_FELICA_MASK = 0x8
+ NFC_PROTO_ISO14443 = 0x4
+ NFC_PROTO_ISO14443_B = 0x6
+ NFC_PROTO_ISO14443_B_MASK = 0x40
+ NFC_PROTO_ISO14443_MASK = 0x10
+ NFC_PROTO_ISO15693 = 0x7
+ NFC_PROTO_ISO15693_MASK = 0x80
+ NFC_PROTO_JEWEL = 0x1
+ NFC_PROTO_JEWEL_MASK = 0x2
+ NFC_PROTO_MAX = 0x8
+ NFC_PROTO_MIFARE = 0x2
+ NFC_PROTO_MIFARE_MASK = 0x4
+ NFC_PROTO_NFC_DEP = 0x5
+ NFC_PROTO_NFC_DEP_MASK = 0x20
+ NFC_RAW_HEADER_SIZE = 0x2
+ NFC_RF_INITIATOR = 0x0
+ NFC_RF_NONE = 0x2
+ NFC_RF_TARGET = 0x1
+ NFC_SENSB_RES_MAXSIZE = 0xc
+ NFC_SENSF_RES_MAXSIZE = 0x12
+ NFC_SE_DISABLED = 0x0
+ NFC_SE_EMBEDDED = 0x2
+ NFC_SE_ENABLED = 0x1
+ NFC_SE_UICC = 0x1
+ NFC_SOCKPROTO_LLCP = 0x1
+ NFC_SOCKPROTO_MAX = 0x2
+ NFC_SOCKPROTO_RAW = 0x0
+ NFNETLINK_V0 = 0x0
+ NFNLGRP_ACCT_QUOTA = 0x8
+ NFNLGRP_CONNTRACK_DESTROY = 0x3
+ NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
+ NFNLGRP_CONNTRACK_EXP_NEW = 0x4
+ NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
+ NFNLGRP_CONNTRACK_NEW = 0x1
+ NFNLGRP_CONNTRACK_UPDATE = 0x2
+ NFNLGRP_MAX = 0x9
+ NFNLGRP_NFTABLES = 0x7
+ NFNLGRP_NFTRACE = 0x9
+ NFNLGRP_NONE = 0x0
+ NFNL_BATCH_MAX = 0x1
+ NFNL_MSG_BATCH_BEGIN = 0x10
+ NFNL_MSG_BATCH_END = 0x11
+ NFNL_NFA_NEST = 0x8000
+ NFNL_SUBSYS_ACCT = 0x7
+ NFNL_SUBSYS_COUNT = 0xd
+ NFNL_SUBSYS_CTHELPER = 0x9
+ NFNL_SUBSYS_CTNETLINK = 0x1
+ NFNL_SUBSYS_CTNETLINK_EXP = 0x2
+ NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
+ NFNL_SUBSYS_HOOK = 0xc
+ NFNL_SUBSYS_IPSET = 0x6
+ NFNL_SUBSYS_NFTABLES = 0xa
+ NFNL_SUBSYS_NFT_COMPAT = 0xb
+ NFNL_SUBSYS_NONE = 0x0
+ NFNL_SUBSYS_OSF = 0x5
+ NFNL_SUBSYS_QUEUE = 0x3
+ NFNL_SUBSYS_ULOG = 0x4
+ NFS_SUPER_MAGIC = 0x6969
+ NILFS_SUPER_MAGIC = 0x3434
+ NL0 = 0x0
+ NL1 = 0x100
+ NLA_ALIGNTO = 0x4
+ NLA_F_NESTED = 0x8000
+ NLA_F_NET_BYTEORDER = 0x4000
+ NLA_HDRLEN = 0x4
+ NLMSG_ALIGNTO = 0x4
+ NLMSG_DONE = 0x3
+ NLMSG_ERROR = 0x2
+ NLMSG_HDRLEN = 0x10
+ NLMSG_MIN_TYPE = 0x10
+ NLMSG_NOOP = 0x1
+ NLMSG_OVERRUN = 0x4
+ NLM_F_ACK = 0x4
+ NLM_F_ACK_TLVS = 0x200
+ NLM_F_APPEND = 0x800
+ NLM_F_ATOMIC = 0x400
+ NLM_F_CAPPED = 0x100
+ NLM_F_CREATE = 0x400
+ NLM_F_DUMP = 0x300
+ NLM_F_DUMP_FILTERED = 0x20
+ NLM_F_DUMP_INTR = 0x10
+ NLM_F_ECHO = 0x8
+ NLM_F_EXCL = 0x200
+ NLM_F_MATCH = 0x200
+ NLM_F_MULTI = 0x2
+ NLM_F_NONREC = 0x100
+ NLM_F_REPLACE = 0x100
+ NLM_F_REQUEST = 0x1
+ NLM_F_ROOT = 0x100
+ NSFS_MAGIC = 0x6e736673
+ OCFS2_SUPER_MAGIC = 0x7461636f
+ OCRNL = 0x8
+ OFDEL = 0x80
+ OFILL = 0x40
+ ONLRET = 0x20
+ ONOCR = 0x10
+ OPENPROM_SUPER_MAGIC = 0x9fa1
+ OPOST = 0x1
+ OVERLAYFS_SUPER_MAGIC = 0x794c7630
+ O_ACCMODE = 0x3
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_WRONLY = 0x1
+ PACKET_ADD_MEMBERSHIP = 0x1
+ PACKET_AUXDATA = 0x8
+ PACKET_BROADCAST = 0x1
+ PACKET_COPY_THRESH = 0x7
+ PACKET_DROP_MEMBERSHIP = 0x2
+ PACKET_FANOUT = 0x12
+ PACKET_FANOUT_CBPF = 0x6
+ PACKET_FANOUT_CPU = 0x2
+ PACKET_FANOUT_DATA = 0x16
+ PACKET_FANOUT_EBPF = 0x7
+ PACKET_FANOUT_FLAG_DEFRAG = 0x8000
+ PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
+ PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
+ PACKET_FANOUT_HASH = 0x0
+ PACKET_FANOUT_LB = 0x1
+ PACKET_FANOUT_QM = 0x5
+ PACKET_FANOUT_RND = 0x4
+ PACKET_FANOUT_ROLLOVER = 0x3
+ PACKET_FASTROUTE = 0x6
+ PACKET_HDRLEN = 0xb
+ PACKET_HOST = 0x0
+ PACKET_IGNORE_OUTGOING = 0x17
+ PACKET_KERNEL = 0x7
+ PACKET_LOOPBACK = 0x5
+ PACKET_LOSS = 0xe
+ PACKET_MR_ALLMULTI = 0x2
+ PACKET_MR_MULTICAST = 0x0
+ PACKET_MR_PROMISC = 0x1
+ PACKET_MR_UNICAST = 0x3
+ PACKET_MULTICAST = 0x2
+ PACKET_ORIGDEV = 0x9
+ PACKET_OTHERHOST = 0x3
+ PACKET_OUTGOING = 0x4
+ PACKET_QDISC_BYPASS = 0x14
+ PACKET_RECV_OUTPUT = 0x3
+ PACKET_RESERVE = 0xc
+ PACKET_ROLLOVER_STATS = 0x15
+ PACKET_RX_RING = 0x5
+ PACKET_STATISTICS = 0x6
+ PACKET_TIMESTAMP = 0x11
+ PACKET_TX_HAS_OFF = 0x13
+ PACKET_TX_RING = 0xd
+ PACKET_TX_TIMESTAMP = 0x10
+ PACKET_USER = 0x6
+ PACKET_VERSION = 0xa
+ PACKET_VNET_HDR = 0xf
+ PARITY_CRC16_PR0 = 0x2
+ PARITY_CRC16_PR0_CCITT = 0x4
+ PARITY_CRC16_PR1 = 0x3
+ PARITY_CRC16_PR1_CCITT = 0x5
+ PARITY_CRC32_PR0_CCITT = 0x6
+ PARITY_CRC32_PR1_CCITT = 0x7
+ PARITY_DEFAULT = 0x0
+ PARITY_NONE = 0x1
+ PARMRK = 0x8
+ PERF_ATTR_SIZE_VER0 = 0x40
+ PERF_ATTR_SIZE_VER1 = 0x48
+ PERF_ATTR_SIZE_VER2 = 0x50
+ PERF_ATTR_SIZE_VER3 = 0x60
+ PERF_ATTR_SIZE_VER4 = 0x68
+ PERF_ATTR_SIZE_VER5 = 0x70
+ PERF_ATTR_SIZE_VER6 = 0x78
+ PERF_ATTR_SIZE_VER7 = 0x80
+ PERF_AUX_FLAG_COLLISION = 0x8
+ PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
+ PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
+ PERF_AUX_FLAG_OVERWRITE = 0x2
+ PERF_AUX_FLAG_PARTIAL = 0x4
+ PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
+ PERF_AUX_FLAG_TRUNCATED = 0x1
+ PERF_FLAG_FD_CLOEXEC = 0x8
+ PERF_FLAG_FD_NO_GROUP = 0x1
+ PERF_FLAG_FD_OUTPUT = 0x2
+ PERF_FLAG_PID_CGROUP = 0x4
+ PERF_HW_EVENT_MASK = 0xffffffff
+ PERF_MAX_CONTEXTS_PER_STACK = 0x8
+ PERF_MAX_STACK_DEPTH = 0x7f
+ PERF_MEM_BLK_ADDR = 0x4
+ PERF_MEM_BLK_DATA = 0x2
+ PERF_MEM_BLK_NA = 0x1
+ PERF_MEM_BLK_SHIFT = 0x28
+ PERF_MEM_LOCK_LOCKED = 0x2
+ PERF_MEM_LOCK_NA = 0x1
+ PERF_MEM_LOCK_SHIFT = 0x18
+ PERF_MEM_LVLNUM_ANY_CACHE = 0xb
+ PERF_MEM_LVLNUM_L1 = 0x1
+ PERF_MEM_LVLNUM_L2 = 0x2
+ PERF_MEM_LVLNUM_L3 = 0x3
+ PERF_MEM_LVLNUM_L4 = 0x4
+ PERF_MEM_LVLNUM_LFB = 0xc
+ PERF_MEM_LVLNUM_NA = 0xf
+ PERF_MEM_LVLNUM_PMEM = 0xe
+ PERF_MEM_LVLNUM_RAM = 0xd
+ PERF_MEM_LVLNUM_SHIFT = 0x21
+ PERF_MEM_LVL_HIT = 0x2
+ PERF_MEM_LVL_IO = 0x1000
+ PERF_MEM_LVL_L1 = 0x8
+ PERF_MEM_LVL_L2 = 0x20
+ PERF_MEM_LVL_L3 = 0x40
+ PERF_MEM_LVL_LFB = 0x10
+ PERF_MEM_LVL_LOC_RAM = 0x80
+ PERF_MEM_LVL_MISS = 0x4
+ PERF_MEM_LVL_NA = 0x1
+ PERF_MEM_LVL_REM_CCE1 = 0x400
+ PERF_MEM_LVL_REM_CCE2 = 0x800
+ PERF_MEM_LVL_REM_RAM1 = 0x100
+ PERF_MEM_LVL_REM_RAM2 = 0x200
+ PERF_MEM_LVL_SHIFT = 0x5
+ PERF_MEM_LVL_UNC = 0x2000
+ PERF_MEM_OP_EXEC = 0x10
+ PERF_MEM_OP_LOAD = 0x2
+ PERF_MEM_OP_NA = 0x1
+ PERF_MEM_OP_PFETCH = 0x8
+ PERF_MEM_OP_SHIFT = 0x0
+ PERF_MEM_OP_STORE = 0x4
+ PERF_MEM_REMOTE_REMOTE = 0x1
+ PERF_MEM_REMOTE_SHIFT = 0x25
+ PERF_MEM_SNOOPX_FWD = 0x1
+ PERF_MEM_SNOOPX_SHIFT = 0x26
+ PERF_MEM_SNOOP_HIT = 0x4
+ PERF_MEM_SNOOP_HITM = 0x10
+ PERF_MEM_SNOOP_MISS = 0x8
+ PERF_MEM_SNOOP_NA = 0x1
+ PERF_MEM_SNOOP_NONE = 0x2
+ PERF_MEM_SNOOP_SHIFT = 0x13
+ PERF_MEM_TLB_HIT = 0x2
+ PERF_MEM_TLB_L1 = 0x8
+ PERF_MEM_TLB_L2 = 0x10
+ PERF_MEM_TLB_MISS = 0x4
+ PERF_MEM_TLB_NA = 0x1
+ PERF_MEM_TLB_OS = 0x40
+ PERF_MEM_TLB_SHIFT = 0x1a
+ PERF_MEM_TLB_WK = 0x20
+ PERF_PMU_TYPE_SHIFT = 0x20
+ PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
+ PERF_RECORD_MISC_COMM_EXEC = 0x2000
+ PERF_RECORD_MISC_CPUMODE_MASK = 0x7
+ PERF_RECORD_MISC_CPUMODE_UNKNOWN = 0x0
+ PERF_RECORD_MISC_EXACT_IP = 0x4000
+ PERF_RECORD_MISC_EXT_RESERVED = 0x8000
+ PERF_RECORD_MISC_FORK_EXEC = 0x2000
+ PERF_RECORD_MISC_GUEST_KERNEL = 0x4
+ PERF_RECORD_MISC_GUEST_USER = 0x5
+ PERF_RECORD_MISC_HYPERVISOR = 0x3
+ PERF_RECORD_MISC_KERNEL = 0x1
+ PERF_RECORD_MISC_MMAP_BUILD_ID = 0x4000
+ PERF_RECORD_MISC_MMAP_DATA = 0x2000
+ PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT = 0x1000
+ PERF_RECORD_MISC_SWITCH_OUT = 0x2000
+ PERF_RECORD_MISC_SWITCH_OUT_PREEMPT = 0x4000
+ PERF_RECORD_MISC_USER = 0x2
+ PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
+ PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
+ PIPEFS_MAGIC = 0x50495045
+ PPC_CMM_MAGIC = 0xc7571590
+ PPPIOCGNPMODE = 0xc008744c
+ PPPIOCNEWUNIT = 0xc004743e
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROC_SUPER_MAGIC = 0x9fa0
+ PROT_EXEC = 0x4
+ PROT_GROWSDOWN = 0x1000000
+ PROT_GROWSUP = 0x2000000
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PR_CAPBSET_DROP = 0x18
+ PR_CAPBSET_READ = 0x17
+ PR_CAP_AMBIENT = 0x2f
+ PR_CAP_AMBIENT_CLEAR_ALL = 0x4
+ PR_CAP_AMBIENT_IS_SET = 0x1
+ PR_CAP_AMBIENT_LOWER = 0x3
+ PR_CAP_AMBIENT_RAISE = 0x2
+ PR_ENDIAN_BIG = 0x0
+ PR_ENDIAN_LITTLE = 0x1
+ PR_ENDIAN_PPC_LITTLE = 0x2
+ PR_FPEMU_NOPRINT = 0x1
+ PR_FPEMU_SIGFPE = 0x2
+ PR_FP_EXC_ASYNC = 0x2
+ PR_FP_EXC_DISABLED = 0x0
+ PR_FP_EXC_DIV = 0x10000
+ PR_FP_EXC_INV = 0x100000
+ PR_FP_EXC_NONRECOV = 0x1
+ PR_FP_EXC_OVF = 0x20000
+ PR_FP_EXC_PRECISE = 0x3
+ PR_FP_EXC_RES = 0x80000
+ PR_FP_EXC_SW_ENABLE = 0x80
+ PR_FP_EXC_UND = 0x40000
+ PR_FP_MODE_FR = 0x1
+ PR_FP_MODE_FRE = 0x2
+ PR_GET_CHILD_SUBREAPER = 0x25
+ PR_GET_DUMPABLE = 0x3
+ PR_GET_ENDIAN = 0x13
+ PR_GET_FPEMU = 0x9
+ PR_GET_FPEXC = 0xb
+ PR_GET_FP_MODE = 0x2e
+ PR_GET_IO_FLUSHER = 0x3a
+ PR_GET_KEEPCAPS = 0x7
+ PR_GET_NAME = 0x10
+ PR_GET_NO_NEW_PRIVS = 0x27
+ PR_GET_PDEATHSIG = 0x2
+ PR_GET_SECCOMP = 0x15
+ PR_GET_SECUREBITS = 0x1b
+ PR_GET_SPECULATION_CTRL = 0x34
+ PR_GET_TAGGED_ADDR_CTRL = 0x38
+ PR_GET_THP_DISABLE = 0x2a
+ PR_GET_TID_ADDRESS = 0x28
+ PR_GET_TIMERSLACK = 0x1e
+ PR_GET_TIMING = 0xd
+ PR_GET_TSC = 0x19
+ PR_GET_UNALIGN = 0x5
+ PR_MCE_KILL = 0x21
+ PR_MCE_KILL_CLEAR = 0x0
+ PR_MCE_KILL_DEFAULT = 0x2
+ PR_MCE_KILL_EARLY = 0x1
+ PR_MCE_KILL_GET = 0x22
+ PR_MCE_KILL_LATE = 0x0
+ PR_MCE_KILL_SET = 0x1
+ PR_MPX_DISABLE_MANAGEMENT = 0x2c
+ PR_MPX_ENABLE_MANAGEMENT = 0x2b
+ PR_MTE_TAG_MASK = 0x7fff8
+ PR_MTE_TAG_SHIFT = 0x3
+ PR_MTE_TCF_ASYNC = 0x4
+ PR_MTE_TCF_MASK = 0x6
+ PR_MTE_TCF_NONE = 0x0
+ PR_MTE_TCF_SHIFT = 0x1
+ PR_MTE_TCF_SYNC = 0x2
+ PR_PAC_APDAKEY = 0x4
+ PR_PAC_APDBKEY = 0x8
+ PR_PAC_APGAKEY = 0x10
+ PR_PAC_APIAKEY = 0x1
+ PR_PAC_APIBKEY = 0x2
+ PR_PAC_GET_ENABLED_KEYS = 0x3d
+ PR_PAC_RESET_KEYS = 0x36
+ PR_PAC_SET_ENABLED_KEYS = 0x3c
+ PR_SCHED_CORE = 0x3e
+ PR_SCHED_CORE_CREATE = 0x1
+ PR_SCHED_CORE_GET = 0x0
+ PR_SCHED_CORE_MAX = 0x4
+ PR_SCHED_CORE_SHARE_FROM = 0x3
+ PR_SCHED_CORE_SHARE_TO = 0x2
+ PR_SET_CHILD_SUBREAPER = 0x24
+ PR_SET_DUMPABLE = 0x4
+ PR_SET_ENDIAN = 0x14
+ PR_SET_FPEMU = 0xa
+ PR_SET_FPEXC = 0xc
+ PR_SET_FP_MODE = 0x2d
+ PR_SET_IO_FLUSHER = 0x39
+ PR_SET_KEEPCAPS = 0x8
+ PR_SET_MM = 0x23
+ PR_SET_MM_ARG_END = 0x9
+ PR_SET_MM_ARG_START = 0x8
+ PR_SET_MM_AUXV = 0xc
+ PR_SET_MM_BRK = 0x7
+ PR_SET_MM_END_CODE = 0x2
+ PR_SET_MM_END_DATA = 0x4
+ PR_SET_MM_ENV_END = 0xb
+ PR_SET_MM_ENV_START = 0xa
+ PR_SET_MM_EXE_FILE = 0xd
+ PR_SET_MM_MAP = 0xe
+ PR_SET_MM_MAP_SIZE = 0xf
+ PR_SET_MM_START_BRK = 0x6
+ PR_SET_MM_START_CODE = 0x1
+ PR_SET_MM_START_DATA = 0x3
+ PR_SET_MM_START_STACK = 0x5
+ PR_SET_NAME = 0xf
+ PR_SET_NO_NEW_PRIVS = 0x26
+ PR_SET_PDEATHSIG = 0x1
+ PR_SET_PTRACER = 0x59616d61
+ PR_SET_SECCOMP = 0x16
+ PR_SET_SECUREBITS = 0x1c
+ PR_SET_SPECULATION_CTRL = 0x35
+ PR_SET_SYSCALL_USER_DISPATCH = 0x3b
+ PR_SET_TAGGED_ADDR_CTRL = 0x37
+ PR_SET_THP_DISABLE = 0x29
+ PR_SET_TIMERSLACK = 0x1d
+ PR_SET_TIMING = 0xe
+ PR_SET_TSC = 0x1a
+ PR_SET_UNALIGN = 0x6
+ PR_SPEC_DISABLE = 0x4
+ PR_SPEC_DISABLE_NOEXEC = 0x10
+ PR_SPEC_ENABLE = 0x2
+ PR_SPEC_FORCE_DISABLE = 0x8
+ PR_SPEC_INDIRECT_BRANCH = 0x1
+ PR_SPEC_L1D_FLUSH = 0x2
+ PR_SPEC_NOT_AFFECTED = 0x0
+ PR_SPEC_PRCTL = 0x1
+ PR_SPEC_STORE_BYPASS = 0x0
+ PR_SVE_GET_VL = 0x33
+ PR_SVE_SET_VL = 0x32
+ PR_SVE_SET_VL_ONEXEC = 0x40000
+ PR_SVE_VL_INHERIT = 0x20000
+ PR_SVE_VL_LEN_MASK = 0xffff
+ PR_SYS_DISPATCH_OFF = 0x0
+ PR_SYS_DISPATCH_ON = 0x1
+ PR_TAGGED_ADDR_ENABLE = 0x1
+ PR_TASK_PERF_EVENTS_DISABLE = 0x1f
+ PR_TASK_PERF_EVENTS_ENABLE = 0x20
+ PR_TIMING_STATISTICAL = 0x0
+ PR_TIMING_TIMESTAMP = 0x1
+ PR_TSC_ENABLE = 0x1
+ PR_TSC_SIGSEGV = 0x2
+ PR_UNALIGN_NOPRINT = 0x1
+ PR_UNALIGN_SIGBUS = 0x2
+ PSTOREFS_MAGIC = 0x6165676c
+ PTRACE_ATTACH = 0x10
+ PTRACE_CONT = 0x7
+ PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
+ PTRACE_EVENT_CLONE = 0x3
+ PTRACE_EVENT_EXEC = 0x4
+ PTRACE_EVENT_EXIT = 0x6
+ PTRACE_EVENT_FORK = 0x1
+ PTRACE_EVENT_SECCOMP = 0x7
+ PTRACE_EVENT_STOP = 0x80
+ PTRACE_EVENT_VFORK = 0x2
+ PTRACE_EVENT_VFORK_DONE = 0x5
+ PTRACE_GETEVENTMSG = 0x4201
+ PTRACE_GETREGS = 0xc
+ PTRACE_GETREGSET = 0x4204
+ PTRACE_GETSIGINFO = 0x4202
+ PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
+ PTRACE_GET_SYSCALL_INFO = 0x420e
+ PTRACE_INTERRUPT = 0x4207
+ PTRACE_KILL = 0x8
+ PTRACE_LISTEN = 0x4208
+ PTRACE_O_EXITKILL = 0x100000
+ PTRACE_O_MASK = 0x3000ff
+ PTRACE_O_SUSPEND_SECCOMP = 0x200000
+ PTRACE_O_TRACECLONE = 0x8
+ PTRACE_O_TRACEEXEC = 0x10
+ PTRACE_O_TRACEEXIT = 0x40
+ PTRACE_O_TRACEFORK = 0x2
+ PTRACE_O_TRACESECCOMP = 0x80
+ PTRACE_O_TRACESYSGOOD = 0x1
+ PTRACE_O_TRACEVFORK = 0x4
+ PTRACE_O_TRACEVFORKDONE = 0x20
+ PTRACE_PEEKDATA = 0x2
+ PTRACE_PEEKSIGINFO = 0x4209
+ PTRACE_PEEKSIGINFO_SHARED = 0x1
+ PTRACE_PEEKTEXT = 0x1
+ PTRACE_PEEKUSR = 0x3
+ PTRACE_POKEDATA = 0x5
+ PTRACE_POKETEXT = 0x4
+ PTRACE_POKEUSR = 0x6
+ PTRACE_SECCOMP_GET_FILTER = 0x420c
+ PTRACE_SECCOMP_GET_METADATA = 0x420d
+ PTRACE_SEIZE = 0x4206
+ PTRACE_SETOPTIONS = 0x4200
+ PTRACE_SETREGS = 0xd
+ PTRACE_SETREGSET = 0x4205
+ PTRACE_SETSIGINFO = 0x4203
+ PTRACE_SETSIGMASK = 0x420b
+ PTRACE_SINGLESTEP = 0x9
+ PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
+ PTRACE_TRACEME = 0x0
+ QNX4_SUPER_MAGIC = 0x2f
+ QNX6_SUPER_MAGIC = 0x68191122
+ RAMFS_MAGIC = 0x858458f6
+ RAW_PAYLOAD_DIGITAL = 0x3
+ RAW_PAYLOAD_HCI = 0x2
+ RAW_PAYLOAD_LLCP = 0x0
+ RAW_PAYLOAD_NCI = 0x1
+ RAW_PAYLOAD_PROPRIETARY = 0x4
+ RDTGROUP_SUPER_MAGIC = 0x7655821
+ REISERFS_SUPER_MAGIC = 0x52654973
+ RENAME_EXCHANGE = 0x2
+ RENAME_NOREPLACE = 0x1
+ RENAME_WHITEOUT = 0x4
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_LOCKS = 0xa
+ RLIMIT_MSGQUEUE = 0xc
+ RLIMIT_NICE = 0xd
+ RLIMIT_RTPRIO = 0xe
+ RLIMIT_RTTIME = 0xf
+ RLIMIT_SIGPENDING = 0xb
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0xffffffffffffffff
+ RTAX_ADVMSS = 0x8
+ RTAX_CC_ALGO = 0x10
+ RTAX_CWND = 0x7
+ RTAX_FASTOPEN_NO_COOKIE = 0x11
+ RTAX_FEATURES = 0xc
+ RTAX_FEATURE_ALLFRAG = 0x8
+ RTAX_FEATURE_ECN = 0x1
+ RTAX_FEATURE_MASK = 0xf
+ RTAX_FEATURE_SACK = 0x2
+ RTAX_FEATURE_TIMESTAMP = 0x4
+ RTAX_HOPLIMIT = 0xa
+ RTAX_INITCWND = 0xb
+ RTAX_INITRWND = 0xe
+ RTAX_LOCK = 0x1
+ RTAX_MAX = 0x11
+ RTAX_MTU = 0x2
+ RTAX_QUICKACK = 0xf
+ RTAX_REORDERING = 0x9
+ RTAX_RTO_MIN = 0xd
+ RTAX_RTT = 0x4
+ RTAX_RTTVAR = 0x5
+ RTAX_SSTHRESH = 0x6
+ RTAX_UNSPEC = 0x0
+ RTAX_WINDOW = 0x3
+ RTA_ALIGNTO = 0x4
+ RTA_MAX = 0x1e
+ RTCF_DIRECTSRC = 0x4000000
+ RTCF_DOREDIRECT = 0x1000000
+ RTCF_LOG = 0x2000000
+ RTCF_MASQ = 0x400000
+ RTCF_NAT = 0x800000
+ RTCF_VALVE = 0x200000
+ RTC_AF = 0x20
+ RTC_FEATURE_ALARM = 0x0
+ RTC_FEATURE_ALARM_RES_MINUTE = 0x1
+ RTC_FEATURE_CNT = 0x3
+ RTC_FEATURE_NEED_WEEK_DAY = 0x2
+ RTC_IRQF = 0x80
+ RTC_MAX_FREQ = 0x2000
+ RTC_PF = 0x40
+ RTC_UF = 0x10
+ RTF_ADDRCLASSMASK = 0xf8000000
+ RTF_ADDRCONF = 0x40000
+ RTF_ALLONLINK = 0x20000
+ RTF_BROADCAST = 0x10000000
+ RTF_CACHE = 0x1000000
+ RTF_DEFAULT = 0x10000
+ RTF_DYNAMIC = 0x10
+ RTF_FLOW = 0x2000000
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_INTERFACE = 0x40000000
+ RTF_IRTT = 0x100
+ RTF_LINKRT = 0x100000
+ RTF_LOCAL = 0x80000000
+ RTF_MODIFIED = 0x20
+ RTF_MSS = 0x40
+ RTF_MTU = 0x40
+ RTF_MULTICAST = 0x20000000
+ RTF_NAT = 0x8000000
+ RTF_NOFORWARD = 0x1000
+ RTF_NONEXTHOP = 0x200000
+ RTF_NOPMTUDISC = 0x4000
+ RTF_POLICY = 0x4000000
+ RTF_REINSTATE = 0x8
+ RTF_REJECT = 0x200
+ RTF_STATIC = 0x400
+ RTF_THROW = 0x2000
+ RTF_UP = 0x1
+ RTF_WINDOW = 0x80
+ RTF_XRESOLVE = 0x800
+ RTMGRP_DECnet_IFADDR = 0x1000
+ RTMGRP_DECnet_ROUTE = 0x4000
+ RTMGRP_IPV4_IFADDR = 0x10
+ RTMGRP_IPV4_MROUTE = 0x20
+ RTMGRP_IPV4_ROUTE = 0x40
+ RTMGRP_IPV4_RULE = 0x80
+ RTMGRP_IPV6_IFADDR = 0x100
+ RTMGRP_IPV6_IFINFO = 0x800
+ RTMGRP_IPV6_MROUTE = 0x200
+ RTMGRP_IPV6_PREFIX = 0x20000
+ RTMGRP_IPV6_ROUTE = 0x400
+ RTMGRP_LINK = 0x1
+ RTMGRP_NEIGH = 0x4
+ RTMGRP_NOTIFY = 0x2
+ RTMGRP_TC = 0x8
+ RTM_BASE = 0x10
+ RTM_DELACTION = 0x31
+ RTM_DELADDR = 0x15
+ RTM_DELADDRLABEL = 0x49
+ RTM_DELCHAIN = 0x65
+ RTM_DELLINK = 0x11
+ RTM_DELLINKPROP = 0x6d
+ RTM_DELMDB = 0x55
+ RTM_DELNEIGH = 0x1d
+ RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
+ RTM_DELNEXTHOPBUCKET = 0x75
+ RTM_DELNSID = 0x59
+ RTM_DELQDISC = 0x25
+ RTM_DELROUTE = 0x19
+ RTM_DELRULE = 0x21
+ RTM_DELTCLASS = 0x29
+ RTM_DELTFILTER = 0x2d
+ RTM_DELVLAN = 0x71
+ RTM_F_CLONED = 0x200
+ RTM_F_EQUALIZE = 0x400
+ RTM_F_FIB_MATCH = 0x2000
+ RTM_F_LOOKUP_TABLE = 0x1000
+ RTM_F_NOTIFY = 0x100
+ RTM_F_OFFLOAD = 0x4000
+ RTM_F_OFFLOAD_FAILED = 0x20000000
+ RTM_F_PREFIX = 0x800
+ RTM_F_TRAP = 0x8000
+ RTM_GETACTION = 0x32
+ RTM_GETADDR = 0x16
+ RTM_GETADDRLABEL = 0x4a
+ RTM_GETANYCAST = 0x3e
+ RTM_GETCHAIN = 0x66
+ RTM_GETDCB = 0x4e
+ RTM_GETLINK = 0x12
+ RTM_GETLINKPROP = 0x6e
+ RTM_GETMDB = 0x56
+ RTM_GETMULTICAST = 0x3a
+ RTM_GETNEIGH = 0x1e
+ RTM_GETNEIGHTBL = 0x42
+ RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
+ RTM_GETNEXTHOPBUCKET = 0x76
+ RTM_GETNSID = 0x5a
+ RTM_GETQDISC = 0x26
+ RTM_GETROUTE = 0x1a
+ RTM_GETRULE = 0x22
+ RTM_GETSTATS = 0x5e
+ RTM_GETTCLASS = 0x2a
+ RTM_GETTFILTER = 0x2e
+ RTM_GETVLAN = 0x72
+ RTM_MAX = 0x77
+ RTM_NEWACTION = 0x30
+ RTM_NEWADDR = 0x14
+ RTM_NEWADDRLABEL = 0x48
+ RTM_NEWCACHEREPORT = 0x60
+ RTM_NEWCHAIN = 0x64
+ RTM_NEWLINK = 0x10
+ RTM_NEWLINKPROP = 0x6c
+ RTM_NEWMDB = 0x54
+ RTM_NEWNDUSEROPT = 0x44
+ RTM_NEWNEIGH = 0x1c
+ RTM_NEWNEIGHTBL = 0x40
+ RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
+ RTM_NEWNEXTHOPBUCKET = 0x74
+ RTM_NEWNSID = 0x58
+ RTM_NEWNVLAN = 0x70
+ RTM_NEWPREFIX = 0x34
+ RTM_NEWQDISC = 0x24
+ RTM_NEWROUTE = 0x18
+ RTM_NEWRULE = 0x20
+ RTM_NEWSTATS = 0x5c
+ RTM_NEWTCLASS = 0x28
+ RTM_NEWTFILTER = 0x2c
+ RTM_NR_FAMILIES = 0x1a
+ RTM_NR_MSGTYPES = 0x68
+ RTM_SETDCB = 0x4f
+ RTM_SETLINK = 0x13
+ RTM_SETNEIGHTBL = 0x43
+ RTNH_ALIGNTO = 0x4
+ RTNH_COMPARE_MASK = 0x59
+ RTNH_F_DEAD = 0x1
+ RTNH_F_LINKDOWN = 0x10
+ RTNH_F_OFFLOAD = 0x8
+ RTNH_F_ONLINK = 0x4
+ RTNH_F_PERVASIVE = 0x2
+ RTNH_F_TRAP = 0x40
+ RTNH_F_UNRESOLVED = 0x20
+ RTN_MAX = 0xb
+ RTPROT_BABEL = 0x2a
+ RTPROT_BGP = 0xba
+ RTPROT_BIRD = 0xc
+ RTPROT_BOOT = 0x3
+ RTPROT_DHCP = 0x10
+ RTPROT_DNROUTED = 0xd
+ RTPROT_EIGRP = 0xc0
+ RTPROT_GATED = 0x8
+ RTPROT_ISIS = 0xbb
+ RTPROT_KEEPALIVED = 0x12
+ RTPROT_KERNEL = 0x2
+ RTPROT_MROUTED = 0x11
+ RTPROT_MRT = 0xa
+ RTPROT_NTK = 0xf
+ RTPROT_OPENR = 0x63
+ RTPROT_OSPF = 0xbc
+ RTPROT_RA = 0x9
+ RTPROT_REDIRECT = 0x1
+ RTPROT_RIP = 0xbd
+ RTPROT_STATIC = 0x4
+ RTPROT_UNSPEC = 0x0
+ RTPROT_XORP = 0xe
+ RTPROT_ZEBRA = 0xb
+ RT_CLASS_DEFAULT = 0xfd
+ RT_CLASS_LOCAL = 0xff
+ RT_CLASS_MAIN = 0xfe
+ RT_CLASS_MAX = 0xff
+ RT_CLASS_UNSPEC = 0x0
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ RWF_APPEND = 0x10
+ RWF_DSYNC = 0x2
+ RWF_HIPRI = 0x1
+ RWF_NOWAIT = 0x8
+ RWF_SUPPORTED = 0x1f
+ RWF_SYNC = 0x4
+ RWF_WRITE_LIFE_NOT_SET = 0x0
+ SCM_CREDENTIALS = 0x2
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x1d
+ SC_LOG_FLUSH = 0x100000
+ SECCOMP_MODE_DISABLED = 0x0
+ SECCOMP_MODE_FILTER = 0x2
+ SECCOMP_MODE_STRICT = 0x1
+ SECRETMEM_MAGIC = 0x5345434d
+ SECURITYFS_MAGIC = 0x73636673
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x3
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x4
+ SEEK_MAX = 0x4
+ SEEK_SET = 0x0
+ SELINUX_MAGIC = 0xf97cff8c
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDDLCI = 0x8980
+ SIOCADDMULTI = 0x8931
+ SIOCADDRT = 0x890b
+ SIOCBONDCHANGEACTIVE = 0x8995
+ SIOCBONDENSLAVE = 0x8990
+ SIOCBONDINFOQUERY = 0x8994
+ SIOCBONDRELEASE = 0x8991
+ SIOCBONDSETHWADDR = 0x8992
+ SIOCBONDSLAVEINFOQUERY = 0x8993
+ SIOCBRADDBR = 0x89a0
+ SIOCBRADDIF = 0x89a2
+ SIOCBRDELBR = 0x89a1
+ SIOCBRDELIF = 0x89a3
+ SIOCDARP = 0x8953
+ SIOCDELDLCI = 0x8981
+ SIOCDELMULTI = 0x8932
+ SIOCDELRT = 0x890c
+ SIOCDEVPRIVATE = 0x89f0
+ SIOCDIFADDR = 0x8936
+ SIOCDRARP = 0x8960
+ SIOCETHTOOL = 0x8946
+ SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
+ SIOCGHWTSTAMP = 0x89b1
+ SIOCGIFADDR = 0x8915
+ SIOCGIFBR = 0x8940
+ SIOCGIFBRDADDR = 0x8919
+ SIOCGIFCONF = 0x8912
+ SIOCGIFCOUNT = 0x8938
+ SIOCGIFDSTADDR = 0x8917
+ SIOCGIFENCAP = 0x8925
+ SIOCGIFFLAGS = 0x8913
+ SIOCGIFHWADDR = 0x8927
+ SIOCGIFINDEX = 0x8933
+ SIOCGIFMAP = 0x8970
+ SIOCGIFMEM = 0x891f
+ SIOCGIFMETRIC = 0x891d
+ SIOCGIFMTU = 0x8921
+ SIOCGIFNAME = 0x8910
+ SIOCGIFNETMASK = 0x891b
+ SIOCGIFPFLAGS = 0x8935
+ SIOCGIFSLAVE = 0x8929
+ SIOCGIFTXQLEN = 0x8942
+ SIOCGIFVLAN = 0x8982
+ SIOCGMIIPHY = 0x8947
+ SIOCGMIIREG = 0x8948
+ SIOCGPPPCSTATS = 0x89f2
+ SIOCGPPPSTATS = 0x89f0
+ SIOCGPPPVER = 0x89f1
+ SIOCGRARP = 0x8961
+ SIOCGSKNS = 0x894c
+ SIOCGSTAMP = 0x8906
+ SIOCGSTAMPNS = 0x8907
+ SIOCGSTAMPNS_OLD = 0x8907
+ SIOCGSTAMP_OLD = 0x8906
+ SIOCOUTQNSD = 0x894b
+ SIOCPROTOPRIVATE = 0x89e0
+ SIOCRTMSG = 0x890d
+ SIOCSARP = 0x8955
+ SIOCSHWTSTAMP = 0x89b0
+ SIOCSIFADDR = 0x8916
+ SIOCSIFBR = 0x8941
+ SIOCSIFBRDADDR = 0x891a
+ SIOCSIFDSTADDR = 0x8918
+ SIOCSIFENCAP = 0x8926
+ SIOCSIFFLAGS = 0x8914
+ SIOCSIFHWADDR = 0x8924
+ SIOCSIFHWBROADCAST = 0x8937
+ SIOCSIFLINK = 0x8911
+ SIOCSIFMAP = 0x8971
+ SIOCSIFMEM = 0x8920
+ SIOCSIFMETRIC = 0x891e
+ SIOCSIFMTU = 0x8922
+ SIOCSIFNAME = 0x8923
+ SIOCSIFNETMASK = 0x891c
+ SIOCSIFPFLAGS = 0x8934
+ SIOCSIFSLAVE = 0x8930
+ SIOCSIFTXQLEN = 0x8943
+ SIOCSIFVLAN = 0x8983
+ SIOCSMIIREG = 0x8949
+ SIOCSRARP = 0x8962
+ SIOCWANDEV = 0x894a
+ SMACK_MAGIC = 0x43415d53
+ SMART_AUTOSAVE = 0xd2
+ SMART_AUTO_OFFLINE = 0xdb
+ SMART_DISABLE = 0xd9
+ SMART_ENABLE = 0xd8
+ SMART_HCYL_PASS = 0xc2
+ SMART_IMMEDIATE_OFFLINE = 0xd4
+ SMART_LCYL_PASS = 0x4f
+ SMART_READ_LOG_SECTOR = 0xd5
+ SMART_READ_THRESHOLDS = 0xd1
+ SMART_READ_VALUES = 0xd0
+ SMART_SAVE = 0xd3
+ SMART_STATUS = 0xda
+ SMART_WRITE_LOG_SECTOR = 0xd6
+ SMART_WRITE_THRESHOLDS = 0xd7
+ SMB_SUPER_MAGIC = 0x517b
+ SOCKFS_MAGIC = 0x534f434b
+ SOCK_BUF_LOCK_MASK = 0x3
+ SOCK_DCCP = 0x6
+ SOCK_IOC_TYPE = 0x89
+ SOCK_PACKET = 0xa
+ SOCK_RAW = 0x3
+ SOCK_RCVBUF_LOCK = 0x2
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_SNDBUF_LOCK = 0x1
+ SOL_AAL = 0x109
+ SOL_ALG = 0x117
+ SOL_ATM = 0x108
+ SOL_CAIF = 0x116
+ SOL_CAN_BASE = 0x64
+ SOL_CAN_RAW = 0x65
+ SOL_DCCP = 0x10d
+ SOL_DECNET = 0x105
+ SOL_ICMPV6 = 0x3a
+ SOL_IP = 0x0
+ SOL_IPV6 = 0x29
+ SOL_IRDA = 0x10a
+ SOL_IUCV = 0x115
+ SOL_KCM = 0x119
+ SOL_LLC = 0x10c
+ SOL_NETBEUI = 0x10b
+ SOL_NETLINK = 0x10e
+ SOL_NFC = 0x118
+ SOL_PACKET = 0x107
+ SOL_PNPIPE = 0x113
+ SOL_PPPOL2TP = 0x111
+ SOL_RAW = 0xff
+ SOL_RDS = 0x114
+ SOL_RXRPC = 0x110
+ SOL_TCP = 0x6
+ SOL_TIPC = 0x10f
+ SOL_TLS = 0x11a
+ SOL_X25 = 0x106
+ SOL_XDP = 0x11b
+ SOMAXCONN = 0x1000
+ SO_ATTACH_FILTER = 0x1a
+ SO_DEBUG = 0x1
+ SO_DETACH_BPF = 0x1b
+ SO_DETACH_FILTER = 0x1b
+ SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
+ SO_EE_CODE_TXTIME_MISSED = 0x2
+ SO_EE_CODE_ZEROCOPY_COPIED = 0x1
+ SO_EE_ORIGIN_ICMP = 0x2
+ SO_EE_ORIGIN_ICMP6 = 0x3
+ SO_EE_ORIGIN_LOCAL = 0x1
+ SO_EE_ORIGIN_NONE = 0x0
+ SO_EE_ORIGIN_TIMESTAMPING = 0x4
+ SO_EE_ORIGIN_TXSTATUS = 0x4
+ SO_EE_ORIGIN_TXTIME = 0x6
+ SO_EE_ORIGIN_ZEROCOPY = 0x5
+ SO_EE_RFC4884_FLAG_INVALID = 0x1
+ SO_GET_FILTER = 0x1a
+ SO_NO_CHECK = 0xb
+ SO_PEERNAME = 0x1c
+ SO_PRIORITY = 0xc
+ SO_TIMESTAMP = 0x1d
+ SO_TIMESTAMP_OLD = 0x1d
+ SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
+ SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
+ SO_VM_SOCKETS_BUFFER_SIZE = 0x0
+ SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
+ SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
+ SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
+ SO_VM_SOCKETS_TRUSTED = 0x5
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
+ SQUASHFS_MAGIC = 0x73717368
+ STACK_END_MAGIC = 0x57ac6e9d
+ STATX_ALL = 0xfff
+ STATX_ATIME = 0x20
+ STATX_ATTR_APPEND = 0x20
+ STATX_ATTR_AUTOMOUNT = 0x1000
+ STATX_ATTR_COMPRESSED = 0x4
+ STATX_ATTR_DAX = 0x200000
+ STATX_ATTR_ENCRYPTED = 0x800
+ STATX_ATTR_IMMUTABLE = 0x10
+ STATX_ATTR_MOUNT_ROOT = 0x2000
+ STATX_ATTR_NODUMP = 0x40
+ STATX_ATTR_VERITY = 0x100000
+ STATX_BASIC_STATS = 0x7ff
+ STATX_BLOCKS = 0x400
+ STATX_BTIME = 0x800
+ STATX_CTIME = 0x80
+ STATX_GID = 0x10
+ STATX_INO = 0x100
+ STATX_MNT_ID = 0x1000
+ STATX_MODE = 0x2
+ STATX_MTIME = 0x40
+ STATX_NLINK = 0x4
+ STATX_SIZE = 0x200
+ STATX_TYPE = 0x1
+ STATX_UID = 0x8
+ STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
+ SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
+ SYSFS_MAGIC = 0x62656572
+ S_BLKSIZE = 0x200
+ 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_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ 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
+ TASKSTATS_CMD_ATTR_MAX = 0x4
+ TASKSTATS_CMD_MAX = 0x2
+ TASKSTATS_GENL_NAME = "TASKSTATS"
+ TASKSTATS_GENL_VERSION = 0x1
+ TASKSTATS_TYPE_MAX = 0x6
+ TASKSTATS_VERSION = 0xa
+ TCIFLUSH = 0x0
+ TCIOFF = 0x2
+ TCIOFLUSH = 0x2
+ TCION = 0x3
+ TCOFLUSH = 0x1
+ TCOOFF = 0x0
+ TCOON = 0x1
+ TCPOPT_EOL = 0x0
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_CC_INFO = 0x1a
+ TCP_CM_INQ = 0x24
+ TCP_CONGESTION = 0xd
+ TCP_COOKIE_IN_ALWAYS = 0x1
+ TCP_COOKIE_MAX = 0x10
+ TCP_COOKIE_MIN = 0x8
+ TCP_COOKIE_OUT_NEVER = 0x2
+ TCP_COOKIE_PAIR_SIZE = 0x20
+ TCP_COOKIE_TRANSACTIONS = 0xf
+ TCP_CORK = 0x3
+ TCP_DEFER_ACCEPT = 0x9
+ TCP_FASTOPEN = 0x17
+ TCP_FASTOPEN_CONNECT = 0x1e
+ TCP_FASTOPEN_KEY = 0x21
+ TCP_FASTOPEN_NO_COOKIE = 0x22
+ TCP_INFO = 0xb
+ TCP_INQ = 0x24
+ TCP_KEEPCNT = 0x6
+ TCP_KEEPIDLE = 0x4
+ TCP_KEEPINTVL = 0x5
+ TCP_LINGER2 = 0x8
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0xe
+ TCP_MD5SIG_EXT = 0x20
+ TCP_MD5SIG_FLAG_PREFIX = 0x1
+ TCP_MD5SIG_MAXKEYLEN = 0x50
+ TCP_MSS = 0x200
+ TCP_MSS_DEFAULT = 0x218
+ TCP_MSS_DESIRED = 0x4c4
+ TCP_NODELAY = 0x1
+ TCP_NOTSENT_LOWAT = 0x19
+ TCP_QUEUE_SEQ = 0x15
+ TCP_QUICKACK = 0xc
+ TCP_REPAIR = 0x13
+ TCP_REPAIR_OFF = 0x0
+ TCP_REPAIR_OFF_NO_WP = -0x1
+ TCP_REPAIR_ON = 0x1
+ TCP_REPAIR_OPTIONS = 0x16
+ TCP_REPAIR_QUEUE = 0x14
+ TCP_REPAIR_WINDOW = 0x1d
+ TCP_SAVED_SYN = 0x1c
+ TCP_SAVE_SYN = 0x1b
+ TCP_SYNCNT = 0x7
+ TCP_S_DATA_IN = 0x4
+ TCP_S_DATA_OUT = 0x8
+ TCP_THIN_DUPACK = 0x11
+ TCP_THIN_LINEAR_TIMEOUTS = 0x10
+ TCP_TIMESTAMP = 0x18
+ TCP_TX_DELAY = 0x25
+ TCP_ULP = 0x1f
+ TCP_USER_TIMEOUT = 0x12
+ TCP_V4_FLOW = 0x1
+ TCP_V6_FLOW = 0x5
+ TCP_WINDOW_CLAMP = 0xa
+ TCP_ZEROCOPY_RECEIVE = 0x23
+ TFD_TIMER_ABSTIME = 0x1
+ TFD_TIMER_CANCEL_ON_SET = 0x2
+ TIMER_ABSTIME = 0x1
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RTS = 0x4
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_AEAD_ALG_NAME = 0x20
+ TIPC_AEAD_KEYLEN_MAX = 0x24
+ TIPC_AEAD_KEYLEN_MIN = 0x14
+ TIPC_AEAD_KEY_SIZE_MAX = 0x48
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODELAY = 0x8a
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_REKEYING_NOW = 0xffffffff
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
+ TMPFS_MAGIC = 0x1021994
+ TPACKET_ALIGNMENT = 0x10
+ TPACKET_HDRLEN = 0x34
+ TP_STATUS_AVAILABLE = 0x0
+ TP_STATUS_BLK_TMO = 0x20
+ TP_STATUS_COPY = 0x2
+ TP_STATUS_CSUMNOTREADY = 0x8
+ TP_STATUS_CSUM_VALID = 0x80
+ TP_STATUS_KERNEL = 0x0
+ TP_STATUS_LOSING = 0x4
+ TP_STATUS_SENDING = 0x2
+ TP_STATUS_SEND_REQUEST = 0x1
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
+ TP_STATUS_TS_SOFTWARE = 0x20000000
+ TP_STATUS_TS_SYS_HARDWARE = 0x40000000
+ TP_STATUS_USER = 0x1
+ TP_STATUS_VLAN_TPID_VALID = 0x40
+ TP_STATUS_VLAN_VALID = 0x10
+ TP_STATUS_WRONG_FORMAT = 0x4
+ TRACEFS_MAGIC = 0x74726163
+ TS_COMM_LEN = 0x20
+ UDF_SUPER_MAGIC = 0x15013346
+ UMOUNT_NOFOLLOW = 0x8
+ USBDEVICE_SUPER_MAGIC = 0x9fa2
+ UTIME_NOW = 0x3fffffff
+ UTIME_OMIT = 0x3ffffffe
+ V9FS_MAGIC = 0x1021997
+ VERASE = 0x2
+ VINTR = 0x0
+ VKILL = 0x3
+ VLNEXT = 0xf
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_LOCAL = 0x1
+ VMADDR_FLAG_TO_HOST = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VM_SOCKETS_INVALID_VERSION = 0xffffffff
+ VQUIT = 0x1
+ VT0 = 0x0
+ WAKE_MAGIC = 0x20
+ WALL = 0x40000000
+ WCLONE = 0x80000000
+ WCONTINUED = 0x8
+ WDIOC_SETPRETIMEOUT = 0xc0045708
+ WDIOC_SETTIMEOUT = 0xc0045706
+ WDIOF_ALARMONLY = 0x400
+ WDIOF_CARDRESET = 0x20
+ WDIOF_EXTERN1 = 0x4
+ WDIOF_EXTERN2 = 0x8
+ WDIOF_FANFAULT = 0x2
+ WDIOF_KEEPALIVEPING = 0x8000
+ WDIOF_MAGICCLOSE = 0x100
+ WDIOF_OVERHEAT = 0x1
+ WDIOF_POWEROVER = 0x40
+ WDIOF_POWERUNDER = 0x10
+ WDIOF_PRETIMEOUT = 0x200
+ WDIOF_SETTIMEOUT = 0x80
+ WDIOF_UNKNOWN = -0x1
+ WDIOS_DISABLECARD = 0x1
+ WDIOS_ENABLECARD = 0x2
+ WDIOS_TEMPPANIC = 0x4
+ WDIOS_UNKNOWN = -0x1
+ WEXITED = 0x4
+ WGALLOWEDIP_A_MAX = 0x3
+ WGDEVICE_A_MAX = 0x8
+ WGPEER_A_MAX = 0xa
+ WG_CMD_MAX = 0x1
+ WG_GENL_NAME = "wireguard"
+ WG_GENL_VERSION = 0x1
+ WG_KEY_LEN = 0x20
+ WIN_ACKMEDIACHANGE = 0xdb
+ WIN_CHECKPOWERMODE1 = 0xe5
+ WIN_CHECKPOWERMODE2 = 0x98
+ WIN_DEVICE_RESET = 0x8
+ WIN_DIAGNOSE = 0x90
+ WIN_DOORLOCK = 0xde
+ WIN_DOORUNLOCK = 0xdf
+ WIN_DOWNLOAD_MICROCODE = 0x92
+ WIN_FLUSH_CACHE = 0xe7
+ WIN_FLUSH_CACHE_EXT = 0xea
+ WIN_FORMAT = 0x50
+ WIN_GETMEDIASTATUS = 0xda
+ WIN_IDENTIFY = 0xec
+ WIN_IDENTIFY_DMA = 0xee
+ WIN_IDLEIMMEDIATE = 0xe1
+ WIN_INIT = 0x60
+ WIN_MEDIAEJECT = 0xed
+ WIN_MULTREAD = 0xc4
+ WIN_MULTREAD_EXT = 0x29
+ WIN_MULTWRITE = 0xc5
+ WIN_MULTWRITE_EXT = 0x39
+ WIN_NOP = 0x0
+ WIN_PACKETCMD = 0xa0
+ WIN_PIDENTIFY = 0xa1
+ WIN_POSTBOOT = 0xdc
+ WIN_PREBOOT = 0xdd
+ WIN_QUEUED_SERVICE = 0xa2
+ WIN_READ = 0x20
+ WIN_READDMA = 0xc8
+ WIN_READDMA_EXT = 0x25
+ WIN_READDMA_ONCE = 0xc9
+ WIN_READDMA_QUEUED = 0xc7
+ WIN_READDMA_QUEUED_EXT = 0x26
+ WIN_READ_BUFFER = 0xe4
+ WIN_READ_EXT = 0x24
+ WIN_READ_LONG = 0x22
+ WIN_READ_LONG_ONCE = 0x23
+ WIN_READ_NATIVE_MAX = 0xf8
+ WIN_READ_NATIVE_MAX_EXT = 0x27
+ WIN_READ_ONCE = 0x21
+ WIN_RECAL = 0x10
+ WIN_RESTORE = 0x10
+ WIN_SECURITY_DISABLE = 0xf6
+ WIN_SECURITY_ERASE_PREPARE = 0xf3
+ WIN_SECURITY_ERASE_UNIT = 0xf4
+ WIN_SECURITY_FREEZE_LOCK = 0xf5
+ WIN_SECURITY_SET_PASS = 0xf1
+ WIN_SECURITY_UNLOCK = 0xf2
+ WIN_SEEK = 0x70
+ WIN_SETFEATURES = 0xef
+ WIN_SETIDLE1 = 0xe3
+ WIN_SETIDLE2 = 0x97
+ WIN_SETMULT = 0xc6
+ WIN_SET_MAX = 0xf9
+ WIN_SET_MAX_EXT = 0x37
+ WIN_SLEEPNOW1 = 0xe6
+ WIN_SLEEPNOW2 = 0x99
+ WIN_SMART = 0xb0
+ WIN_SPECIFY = 0x91
+ WIN_SRST = 0x8
+ WIN_STANDBY = 0xe2
+ WIN_STANDBY2 = 0x96
+ WIN_STANDBYNOW1 = 0xe0
+ WIN_STANDBYNOW2 = 0x94
+ WIN_VERIFY = 0x40
+ WIN_VERIFY_EXT = 0x42
+ WIN_VERIFY_ONCE = 0x41
+ WIN_WRITE = 0x30
+ WIN_WRITEDMA = 0xca
+ WIN_WRITEDMA_EXT = 0x35
+ WIN_WRITEDMA_ONCE = 0xcb
+ WIN_WRITEDMA_QUEUED = 0xcc
+ WIN_WRITEDMA_QUEUED_EXT = 0x36
+ WIN_WRITE_BUFFER = 0xe8
+ WIN_WRITE_EXT = 0x34
+ WIN_WRITE_LONG = 0x32
+ WIN_WRITE_LONG_ONCE = 0x33
+ WIN_WRITE_ONCE = 0x31
+ WIN_WRITE_SAME = 0xe9
+ WIN_WRITE_VERIFY = 0x3c
+ WNOHANG = 0x1
+ WNOTHREAD = 0x20000000
+ WNOWAIT = 0x1000000
+ WSTOPPED = 0x2
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x1
+ XATTR_REPLACE = 0x2
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0x1f
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_REPLACE = 0x10
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
+ XDP_PACKET_HEADROOM = 0x100
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RING_NEED_WAKEUP = 0x1
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
+ XDP_USE_NEED_WAKEUP = 0x8
+ XDP_ZEROCOPY = 0x4
+ XENFS_SUPER_MAGIC = 0xabba1974
+ XFS_SUPER_MAGIC = 0x58465342
+ Z3FOLD_MAGIC = 0x33
+ ZONEFS_MAGIC = 0x5a4f4653
+ ZSMALLOC_MAGIC = 0x58295829
+ _HIDIOCGRAWNAME_LEN = 0x80
+ _HIDIOCGRAWPHYS_LEN = 0x40
+ _HIDIOCGRAWUNIQ_LEN = 0x40
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EAGAIN = syscall.Errno(0xb)
+ EBADF = syscall.Errno(0x9)
+ EBUSY = syscall.Errno(0x10)
+ ECHILD = syscall.Errno(0xa)
+ EDOM = syscall.Errno(0x21)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EISDIR = syscall.Errno(0x15)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ ENFILE = syscall.Errno(0x17)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOMEM = syscall.Errno(0xc)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EPERM = syscall.Errno(0x1)
+ EPIPE = syscall.Errno(0x20)
+ ERANGE = syscall.Errno(0x22)
+ EROFS = syscall.Errno(0x1e)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ETXTBSY = syscall.Errno(0x1a)
+ EWOULDBLOCK = syscall.Errno(0xb)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINT = syscall.Signal(0x2)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTRAP = syscall.Signal(0x5)
+)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 62f110f..3ca40ca 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -1,2854 +1,536 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && linux
// +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80041270
- BLKBSZSET = 0x40041271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80041272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FP_XSTATE_MAGIC2 = 0x46505845
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x8000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8008743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40087446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x400c744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40087447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8004700d
- RTC_EPOCH_SET = 0x4004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8004700b
- RTC_IRQP_SET = 0x4004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x801c7011
- RTC_PLL_SET = 0x401c7012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- 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 = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x800854db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- X86_FXSR_MAGIC = 0x0
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80041270
+ BLKBSZSET = 0x40041271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80041272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FP_XSTATE_MAGIC2 = 0x46505845
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0xc
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0xd
+ F_SETLK64 = 0xd
+ F_SETLKW = 0xe
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_32BIT = 0x40
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc00c4d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc00c4d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x8000
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8008743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40087446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x400c744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40087447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPXREGS = 0x12
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPXREGS = 0x13
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SINGLEBLOCK = 0x21
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8004700d
+ RTC_EPOCH_SET = 0x4004700e
+ RTC_IRQP_READ = 0x8004700b
+ RTC_IRQP_SET = 0x4004700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x801c7011
+ RTC_PLL_SET = 0x401c7012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x400854d5
+ TUNDETACHFILTER = 0x400854d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x800854db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x20
+ X86_FXSR_MAGIC = 0x0
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2857,23 +539,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2890,8 +564,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2899,99 +571,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 865154d..ead3320 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -1,2854 +1,536 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && linux
// +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FP_XSTATE_MAGIC2 = 0x46505845
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ARCH_PRCTL = 0x1e
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- 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 = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FP_XSTATE_MAGIC2 = 0x46505845
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_32BIT = 0x40
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_ARCH_PRCTL = 0x1e
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPXREGS = 0x12
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPXREGS = 0x13
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SINGLEBLOCK = 0x21
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2857,23 +539,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2890,8 +564,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2899,99 +571,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 386beb4..39bdc94 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -1,2860 +1,542 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && linux
// +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80041270
- BLKBSZSET = 0x40041271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80041272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x20000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8008743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40087446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x400c744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40087447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETCRUNCHREGS = 0x19
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFDPIC = 0x1f
- PTRACE_GETFDPIC_EXEC = 0x0
- PTRACE_GETFDPIC_INTERP = 0x1
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETHBPREGS = 0x1d
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVFPREGS = 0x1b
- PTRACE_GETWMMXREGS = 0x12
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x16
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETCRUNCHREGS = 0x1a
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETHBPREGS = 0x1e
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVFPREGS = 0x1c
- PTRACE_SETWMMXREGS = 0x13
- PTRACE_SET_SYSCALL = 0x17
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- PT_DATA_ADDR = 0x10004
- PT_TEXT_ADDR = 0x10000
- PT_TEXT_END_ADDR = 0x10008
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8004700d
- RTC_EPOCH_SET = 0x4004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8004700b
- RTC_IRQP_SET = 0x4004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x801c7011
- RTC_PLL_SET = 0x401c7012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- 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 = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x800854db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80041270
+ BLKBSZSET = 0x40041271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80041272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0xc
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0xd
+ F_SETLK64 = 0xd
+ F_SETLKW = 0xe
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc00c4d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc00c4d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x10000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x20000
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8008743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40087446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x400c744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40087447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETCRUNCHREGS = 0x19
+ PTRACE_GETFDPIC = 0x1f
+ PTRACE_GETFDPIC_EXEC = 0x0
+ PTRACE_GETFDPIC_INTERP = 0x1
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETHBPREGS = 0x1d
+ PTRACE_GETVFPREGS = 0x1b
+ PTRACE_GETWMMXREGS = 0x12
+ PTRACE_GET_THREAD_AREA = 0x16
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_SETCRUNCHREGS = 0x1a
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETHBPREGS = 0x1e
+ PTRACE_SETVFPREGS = 0x1c
+ PTRACE_SETWMMXREGS = 0x13
+ PTRACE_SET_SYSCALL = 0x17
+ PT_DATA_ADDR = 0x10004
+ PT_TEXT_ADDR = 0x10000
+ PT_TEXT_END_ADDR = 0x10008
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8004700d
+ RTC_EPOCH_SET = 0x4004700e
+ RTC_IRQP_READ = 0x8004700b
+ RTC_IRQP_SET = 0x4004700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x801c7011
+ RTC_PLL_SET = 0x401c7012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x400854d5
+ TUNDETACHFILTER = 0x400854d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x800854db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x20
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2863,23 +545,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2896,8 +570,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2905,99 +577,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 09e11cc..9aec987 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -1,2847 +1,533 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && linux
// +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ESR_MAGIC = 0x45535201
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- EXTRA_MAGIC = 0x45585401
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FPSIMD_MAGIC = 0x46508001
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SVE_MAGIC = 0x53564501
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- 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 = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ ESR_MAGIC = 0x45535201
+ EXTPROC = 0x10000
+ EXTRA_MAGIC = 0x45585401
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FPSIMD_MAGIC = 0x46508001
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x10000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PROT_BTI = 0x10
+ PROT_MTE = 0x20
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_PEEKMTETAGS = 0x21
+ PTRACE_POKEMTETAGS = 0x22
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ SVE_MAGIC = 0x53564501
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2850,23 +536,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2883,8 +561,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2892,99 +568,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index e3910aa..a8bba94 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -1,2856 +1,538 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips && linux
// +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40041270
- BLKBSZSET = 0x80041271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40041272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x21
- F_GETLK64 = 0x21
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x22
- F_SETLK64 = 0x22
- F_SETLKW = 0x23
- F_SETLKW64 = 0x23
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x2000
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4008743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80087446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x800c744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80087447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4004700d
- RTC_EPOCH_SET = 0x8004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4004700b
- RTC_IRQP_SET = 0x8004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x401c7011
- RTC_PLL_SET = 0x801c7012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x800854d5
- TUNDETACHFILTER = 0x800854d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x400854db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40041270
+ BLKBSZSET = 0x80041271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40041272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x21
+ F_GETLK64 = 0x21
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x22
+ F_SETLK64 = 0x22
+ F_SETLKW = 0x23
+ F_SETLKW64 = 0x23
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc00c4d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc00c4d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x2000
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4008743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80087446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x800c744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80087447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4004700d
+ RTC_EPOCH_SET = 0x8004700e
+ RTC_IRQP_READ = 0x4004700b
+ RTC_IRQP_SET = 0x8004700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x401c7011
+ RTC_PLL_SET = 0x801c7012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x800854d5
+ TUNDETACHFILTER = 0x800854d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x400854db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x20
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2859,12 +541,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2872,11 +550,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2893,8 +567,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2902,100 +574,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 9877b7c..ee9e7e2 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -1,2856 +1,538 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64 && linux
// +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x0
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0xe
+ F_GETLK64 = 0xe
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2859,12 +541,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2872,11 +550,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2893,8 +567,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2902,100 +574,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index b77dd84..ba4b288 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -1,2856 +1,538 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64le && linux
// +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x0
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0xe
+ F_GETLK64 = 0xe
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2859,12 +541,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2872,11 +550,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2893,8 +567,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2902,100 +574,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 966d025..bc93afc 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -1,2856 +1,538 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mipsle && linux
// +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40041270
- BLKBSZSET = 0x80041271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40041272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x21
- F_GETLK64 = 0x21
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x22
- F_SETLK64 = 0x22
- F_SETLKW = 0x23
- F_SETLKW64 = 0x23
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x2000
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4008743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80087446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x800c744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80087447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4004700d
- RTC_EPOCH_SET = 0x8004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4004700b
- RTC_IRQP_SET = 0x8004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x401c7011
- RTC_PLL_SET = 0x801c7012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x800854d5
- TUNDETACHFILTER = 0x800854d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x400854db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40041270
+ BLKBSZSET = 0x80041271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40041272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x21
+ F_GETLK64 = 0x21
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x22
+ F_SETLK64 = 0x22
+ F_SETLKW = 0x23
+ F_SETLKW64 = 0x23
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc00c4d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc00c4d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x2000
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4008743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80087446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x800c744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80087447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4004700d
+ RTC_EPOCH_SET = 0x8004700e
+ RTC_IRQP_READ = 0x4004700b
+ RTC_IRQP_SET = 0x8004700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x401c7011
+ RTC_PLL_SET = 0x801c7012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x800854d5
+ TUNDETACHFILTER = 0x800854d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x400854db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x20
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2859,12 +541,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2872,11 +550,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2893,8 +567,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2902,100 +574,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
new file mode 100644
index 0000000..9295e69
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -0,0 +1,882 @@
+// mkerrors.sh -Wall -Werror -static -I/tmp/include
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc && linux
+// +build ppc,linux
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+
+package unix
+
+import "syscall"
+
+const (
+ B1000000 = 0x17
+ B115200 = 0x11
+ B1152000 = 0x18
+ B1500000 = 0x19
+ B2000000 = 0x1a
+ B230400 = 0x12
+ B2500000 = 0x1b
+ B3000000 = 0x1c
+ B3500000 = 0x1d
+ B4000000 = 0x1e
+ B460800 = 0x13
+ B500000 = 0x14
+ B57600 = 0x10
+ B576000 = 0x15
+ B921600 = 0x16
+ BLKBSZGET = 0x40041270
+ BLKBSZSET = 0x80041271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40041272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1f
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CBAUD = 0xff
+ CBAUDEX = 0x0
+ CIBAUD = 0xff0000
+ CLOCAL = 0x8000
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTOPB = 0x400
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000000
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x800000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0xc
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0xd
+ F_SETLK64 = 0xd
+ F_SETLKW = 0xe
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x4000
+ ICANON = 0x100
+ IEXTEN = 0x400
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x80
+ IUCLC = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x80
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc00c4d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc00c4d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x20
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x4
+ ONLCR = 0x2
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x20000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x10000
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x1000
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4008743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80087446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x800c744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80087447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PROT_SAO = 0x10
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETEVRREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETVRREGS = 0x12
+ PTRACE_GETVSRREGS = 0x1b
+ PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_SETEVRREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETVRREGS = 0x13
+ PTRACE_SETVSRREGS = 0x1c
+ PTRACE_SET_DEBUGREG = 0x1a
+ PTRACE_SINGLEBLOCK = 0x100
+ PTRACE_SYSEMU = 0x1d
+ PTRACE_SYSEMU_SINGLESTEP = 0x1e
+ PT_CCR = 0x26
+ PT_CTR = 0x23
+ PT_DAR = 0x29
+ PT_DSCR = 0x2c
+ PT_DSISR = 0x2a
+ PT_FPR0 = 0x30
+ PT_FPR31 = 0x6e
+ PT_FPSCR = 0x71
+ PT_LNK = 0x24
+ PT_MQ = 0x27
+ PT_MSR = 0x21
+ PT_NIP = 0x20
+ PT_ORIG_R3 = 0x22
+ PT_R0 = 0x0
+ PT_R1 = 0x1
+ PT_R10 = 0xa
+ PT_R11 = 0xb
+ PT_R12 = 0xc
+ PT_R13 = 0xd
+ PT_R14 = 0xe
+ PT_R15 = 0xf
+ PT_R16 = 0x10
+ PT_R17 = 0x11
+ PT_R18 = 0x12
+ PT_R19 = 0x13
+ PT_R2 = 0x2
+ PT_R20 = 0x14
+ PT_R21 = 0x15
+ PT_R22 = 0x16
+ PT_R23 = 0x17
+ PT_R24 = 0x18
+ PT_R25 = 0x19
+ PT_R26 = 0x1a
+ PT_R27 = 0x1b
+ PT_R28 = 0x1c
+ PT_R29 = 0x1d
+ PT_R3 = 0x3
+ PT_R30 = 0x1e
+ PT_R31 = 0x1f
+ PT_R4 = 0x4
+ PT_R5 = 0x5
+ PT_R6 = 0x6
+ PT_R7 = 0x7
+ PT_R8 = 0x8
+ PT_R9 = 0x9
+ PT_REGS_COUNT = 0x2c
+ PT_RESULT = 0x2b
+ PT_TRAP = 0x28
+ PT_XER = 0x25
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4004700d
+ RTC_EPOCH_SET = 0x8004700e
+ RTC_IRQP_READ = 0x4004700b
+ RTC_IRQP_SET = 0x8004700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x401c7011
+ RTC_PLL_SET = 0x801c7012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x14
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x15
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x10
+ SO_RCVTIMEO = 0x12
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x12
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x11
+ SO_SNDTIMEO = 0x13
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x13
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x2000741f
+ TCGETA = 0x40147417
+ TCGETS = 0x402c7413
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x2000741d
+ TCSBRKP = 0x5425
+ TCSETA = 0x80147418
+ TCSETAF = 0x8014741c
+ TCSETAW = 0x80147419
+ TCSETS = 0x802c7414
+ TCSETSF = 0x802c7416
+ TCSETSW = 0x802c7415
+ TCXONC = 0x2000741e
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x40045432
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x5424
+ TIOCGETP = 0x40067408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x5423
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x5412
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x400000
+ TUNATTACHFILTER = 0x800854d5
+ TUNDETACHFILTER = 0x800854d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x400854db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0x10
+ VEOF = 0x4
+ VEOL = 0x6
+ VEOL2 = 0x8
+ VMIN = 0x5
+ VREPRINT = 0xb
+ VSTART = 0xd
+ VSTOP = 0xe
+ VSUSP = 0xc
+ VSWTC = 0x9
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x7
+ VWERASE = 0xa
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x20
+ XCASE = 0x4000
+ XTABS = 0xc00
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
+)
+
+// Errors
+const (
+ EADDRINUSE = syscall.Errno(0x62)
+ EADDRNOTAVAIL = syscall.Errno(0x63)
+ EADV = syscall.Errno(0x44)
+ EAFNOSUPPORT = syscall.Errno(0x61)
+ EALREADY = syscall.Errno(0x72)
+ EBADE = syscall.Errno(0x34)
+ EBADFD = syscall.Errno(0x4d)
+ EBADMSG = syscall.Errno(0x4a)
+ EBADR = syscall.Errno(0x35)
+ EBADRQC = syscall.Errno(0x38)
+ EBADSLT = syscall.Errno(0x39)
+ EBFONT = syscall.Errno(0x3b)
+ ECANCELED = syscall.Errno(0x7d)
+ ECHRNG = syscall.Errno(0x2c)
+ ECOMM = syscall.Errno(0x46)
+ ECONNABORTED = syscall.Errno(0x67)
+ ECONNREFUSED = syscall.Errno(0x6f)
+ ECONNRESET = syscall.Errno(0x68)
+ EDEADLK = syscall.Errno(0x23)
+ EDEADLOCK = syscall.Errno(0x3a)
+ EDESTADDRREQ = syscall.Errno(0x59)
+ EDOTDOT = syscall.Errno(0x49)
+ EDQUOT = syscall.Errno(0x7a)
+ EHOSTDOWN = syscall.Errno(0x70)
+ EHOSTUNREACH = syscall.Errno(0x71)
+ EHWPOISON = syscall.Errno(0x85)
+ EIDRM = syscall.Errno(0x2b)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x73)
+ EISCONN = syscall.Errno(0x6a)
+ EISNAM = syscall.Errno(0x78)
+ EKEYEXPIRED = syscall.Errno(0x7f)
+ EKEYREJECTED = syscall.Errno(0x81)
+ EKEYREVOKED = syscall.Errno(0x80)
+ EL2HLT = syscall.Errno(0x33)
+ EL2NSYNC = syscall.Errno(0x2d)
+ EL3HLT = syscall.Errno(0x2e)
+ EL3RST = syscall.Errno(0x2f)
+ ELIBACC = syscall.Errno(0x4f)
+ ELIBBAD = syscall.Errno(0x50)
+ ELIBEXEC = syscall.Errno(0x53)
+ ELIBMAX = syscall.Errno(0x52)
+ ELIBSCN = syscall.Errno(0x51)
+ ELNRNG = syscall.Errno(0x30)
+ ELOOP = syscall.Errno(0x28)
+ EMEDIUMTYPE = syscall.Errno(0x7c)
+ EMSGSIZE = syscall.Errno(0x5a)
+ EMULTIHOP = syscall.Errno(0x48)
+ ENAMETOOLONG = syscall.Errno(0x24)
+ ENAVAIL = syscall.Errno(0x77)
+ ENETDOWN = syscall.Errno(0x64)
+ ENETRESET = syscall.Errno(0x66)
+ ENETUNREACH = syscall.Errno(0x65)
+ ENOANO = syscall.Errno(0x37)
+ ENOBUFS = syscall.Errno(0x69)
+ ENOCSI = syscall.Errno(0x32)
+ ENODATA = syscall.Errno(0x3d)
+ ENOKEY = syscall.Errno(0x7e)
+ ENOLCK = syscall.Errno(0x25)
+ ENOLINK = syscall.Errno(0x43)
+ ENOMEDIUM = syscall.Errno(0x7b)
+ ENOMSG = syscall.Errno(0x2a)
+ ENONET = syscall.Errno(0x40)
+ ENOPKG = syscall.Errno(0x41)
+ ENOPROTOOPT = syscall.Errno(0x5c)
+ ENOSR = syscall.Errno(0x3f)
+ ENOSTR = syscall.Errno(0x3c)
+ ENOSYS = syscall.Errno(0x26)
+ ENOTCONN = syscall.Errno(0x6b)
+ ENOTEMPTY = syscall.Errno(0x27)
+ ENOTNAM = syscall.Errno(0x76)
+ ENOTRECOVERABLE = syscall.Errno(0x83)
+ ENOTSOCK = syscall.Errno(0x58)
+ ENOTSUP = syscall.Errno(0x5f)
+ ENOTUNIQ = syscall.Errno(0x4c)
+ EOPNOTSUPP = syscall.Errno(0x5f)
+ EOVERFLOW = syscall.Errno(0x4b)
+ EOWNERDEAD = syscall.Errno(0x82)
+ EPFNOSUPPORT = syscall.Errno(0x60)
+ EPROTO = syscall.Errno(0x47)
+ EPROTONOSUPPORT = syscall.Errno(0x5d)
+ EPROTOTYPE = syscall.Errno(0x5b)
+ EREMCHG = syscall.Errno(0x4e)
+ EREMOTE = syscall.Errno(0x42)
+ EREMOTEIO = syscall.Errno(0x79)
+ ERESTART = syscall.Errno(0x55)
+ ERFKILL = syscall.Errno(0x84)
+ ESHUTDOWN = syscall.Errno(0x6c)
+ ESOCKTNOSUPPORT = syscall.Errno(0x5e)
+ ESRMNT = syscall.Errno(0x45)
+ ESTALE = syscall.Errno(0x74)
+ ESTRPIPE = syscall.Errno(0x56)
+ ETIME = syscall.Errno(0x3e)
+ ETIMEDOUT = syscall.Errno(0x6e)
+ ETOOMANYREFS = syscall.Errno(0x6d)
+ EUCLEAN = syscall.Errno(0x75)
+ EUNATCH = syscall.Errno(0x31)
+ EUSERS = syscall.Errno(0x57)
+ EXFULL = syscall.Errno(0x36)
+)
+
+// Signals
+const (
+ SIGBUS = syscall.Signal(0x7)
+ SIGCHLD = syscall.Signal(0x11)
+ SIGCLD = syscall.Signal(0x11)
+ SIGCONT = syscall.Signal(0x12)
+ SIGIO = syscall.Signal(0x1d)
+ SIGPOLL = syscall.Signal(0x1d)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGPWR = syscall.Signal(0x1e)
+ SIGSTKFLT = syscall.Signal(0x10)
+ SIGSTOP = syscall.Signal(0x13)
+ SIGSYS = syscall.Signal(0x1f)
+ SIGTSTP = syscall.Signal(0x14)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x17)
+ SIGUSR1 = syscall.Signal(0xa)
+ SIGUSR2 = syscall.Signal(0xc)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "no such device or address"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EAGAIN", "resource temporarily unavailable"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device or resource busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "invalid cross-device link"},
+ {19, "ENODEV", "no such device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "numerical result out of range"},
+ {35, "EDEADLK", "resource deadlock avoided"},
+ {36, "ENAMETOOLONG", "file name too long"},
+ {37, "ENOLCK", "no locks available"},
+ {38, "ENOSYS", "function not implemented"},
+ {39, "ENOTEMPTY", "directory not empty"},
+ {40, "ELOOP", "too many levels of symbolic links"},
+ {42, "ENOMSG", "no message of desired type"},
+ {43, "EIDRM", "identifier removed"},
+ {44, "ECHRNG", "channel number out of range"},
+ {45, "EL2NSYNC", "level 2 not synchronized"},
+ {46, "EL3HLT", "level 3 halted"},
+ {47, "EL3RST", "level 3 reset"},
+ {48, "ELNRNG", "link number out of range"},
+ {49, "EUNATCH", "protocol driver not attached"},
+ {50, "ENOCSI", "no CSI structure available"},
+ {51, "EL2HLT", "level 2 halted"},
+ {52, "EBADE", "invalid exchange"},
+ {53, "EBADR", "invalid request descriptor"},
+ {54, "EXFULL", "exchange full"},
+ {55, "ENOANO", "no anode"},
+ {56, "EBADRQC", "invalid request code"},
+ {57, "EBADSLT", "invalid slot"},
+ {58, "EDEADLOCK", "file locking deadlock error"},
+ {59, "EBFONT", "bad font file format"},
+ {60, "ENOSTR", "device not a stream"},
+ {61, "ENODATA", "no data available"},
+ {62, "ETIME", "timer expired"},
+ {63, "ENOSR", "out of streams resources"},
+ {64, "ENONET", "machine is not on the network"},
+ {65, "ENOPKG", "package not installed"},
+ {66, "EREMOTE", "object is remote"},
+ {67, "ENOLINK", "link has been severed"},
+ {68, "EADV", "advertise error"},
+ {69, "ESRMNT", "srmount error"},
+ {70, "ECOMM", "communication error on send"},
+ {71, "EPROTO", "protocol error"},
+ {72, "EMULTIHOP", "multihop attempted"},
+ {73, "EDOTDOT", "RFS specific error"},
+ {74, "EBADMSG", "bad message"},
+ {75, "EOVERFLOW", "value too large for defined data type"},
+ {76, "ENOTUNIQ", "name not unique on network"},
+ {77, "EBADFD", "file descriptor in bad state"},
+ {78, "EREMCHG", "remote address changed"},
+ {79, "ELIBACC", "can not access a needed shared library"},
+ {80, "ELIBBAD", "accessing a corrupted shared library"},
+ {81, "ELIBSCN", ".lib section in a.out corrupted"},
+ {82, "ELIBMAX", "attempting to link in too many shared libraries"},
+ {83, "ELIBEXEC", "cannot exec a shared library directly"},
+ {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
+ {85, "ERESTART", "interrupted system call should be restarted"},
+ {86, "ESTRPIPE", "streams pipe error"},
+ {87, "EUSERS", "too many users"},
+ {88, "ENOTSOCK", "socket operation on non-socket"},
+ {89, "EDESTADDRREQ", "destination address required"},
+ {90, "EMSGSIZE", "message too long"},
+ {91, "EPROTOTYPE", "protocol wrong type for socket"},
+ {92, "ENOPROTOOPT", "protocol not available"},
+ {93, "EPROTONOSUPPORT", "protocol not supported"},
+ {94, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {95, "ENOTSUP", "operation not supported"},
+ {96, "EPFNOSUPPORT", "protocol family not supported"},
+ {97, "EAFNOSUPPORT", "address family not supported by protocol"},
+ {98, "EADDRINUSE", "address already in use"},
+ {99, "EADDRNOTAVAIL", "cannot assign requested address"},
+ {100, "ENETDOWN", "network is down"},
+ {101, "ENETUNREACH", "network is unreachable"},
+ {102, "ENETRESET", "network dropped connection on reset"},
+ {103, "ECONNABORTED", "software caused connection abort"},
+ {104, "ECONNRESET", "connection reset by peer"},
+ {105, "ENOBUFS", "no buffer space available"},
+ {106, "EISCONN", "transport endpoint is already connected"},
+ {107, "ENOTCONN", "transport endpoint is not connected"},
+ {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
+ {109, "ETOOMANYREFS", "too many references: cannot splice"},
+ {110, "ETIMEDOUT", "connection timed out"},
+ {111, "ECONNREFUSED", "connection refused"},
+ {112, "EHOSTDOWN", "host is down"},
+ {113, "EHOSTUNREACH", "no route to host"},
+ {114, "EALREADY", "operation already in progress"},
+ {115, "EINPROGRESS", "operation now in progress"},
+ {116, "ESTALE", "stale file handle"},
+ {117, "EUCLEAN", "structure needs cleaning"},
+ {118, "ENOTNAM", "not a XENIX named type file"},
+ {119, "ENAVAIL", "no XENIX semaphores available"},
+ {120, "EISNAM", "is a named type file"},
+ {121, "EREMOTEIO", "remote I/O error"},
+ {122, "EDQUOT", "disk quota exceeded"},
+ {123, "ENOMEDIUM", "no medium found"},
+ {124, "EMEDIUMTYPE", "wrong medium type"},
+ {125, "ECANCELED", "operation canceled"},
+ {126, "ENOKEY", "required key not available"},
+ {127, "EKEYEXPIRED", "key has expired"},
+ {128, "EKEYREVOKED", "key has been revoked"},
+ {129, "EKEYREJECTED", "key was rejected by service"},
+ {130, "EOWNERDEAD", "owner died"},
+ {131, "ENOTRECOVERABLE", "state not recoverable"},
+ {132, "ERFKILL", "operation not possible due to RF-kill"},
+ {133, "EHWPOISON", "memory page has hardware error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/breakpoint trap"},
+ {6, "SIGABRT", "aborted"},
+ {7, "SIGBUS", "bus error"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGUSR1", "user defined signal 1"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGUSR2", "user defined signal 2"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGSTKFLT", "stack fault"},
+ {17, "SIGCHLD", "child exited"},
+ {18, "SIGCONT", "continued"},
+ {19, "SIGSTOP", "stopped (signal)"},
+ {20, "SIGTSTP", "stopped"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGURG", "urgent I/O condition"},
+ {24, "SIGXCPU", "CPU time limit exceeded"},
+ {25, "SIGXFSZ", "file size limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window changed"},
+ {29, "SIGIO", "I/O possible"},
+ {30, "SIGPWR", "power failure"},
+ {31, "SIGSYS", "bad system call"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 3baadbe..1fa081c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -1,2915 +1,598 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && linux
// +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x17
- B110 = 0x3
- B115200 = 0x11
- B1152000 = 0x18
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x19
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x1a
- B230400 = 0x12
- B2400 = 0xb
- B2500000 = 0x1b
- B300 = 0x7
- B3000000 = 0x1c
- B3500000 = 0x1d
- B38400 = 0xf
- B4000000 = 0x1e
- B460800 = 0x13
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x14
- B57600 = 0x10
- B576000 = 0x15
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x16
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0xff
- CBAUDEX = 0x0
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0xff0000
- CLOCAL = 0x8000
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIGNAL = 0xff
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0xd
- F_SETLKW = 0x7
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x4000
- IBSHIFT = 0x10
- ICANON = 0x100
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x400
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x80
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x1000
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x80
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x300
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80000000
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x4
- ONLCR = 0x2
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x20000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x1000
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_SAO = 0x10
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETEVRREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVRREGS = 0x12
- PTRACE_GETVSRREGS = 0x1b
- PTRACE_GET_DEBUGREG = 0x19
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETEVRREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVRREGS = 0x13
- PTRACE_SETVSRREGS = 0x1c
- PTRACE_SET_DEBUGREG = 0x1a
- PTRACE_SINGLEBLOCK = 0x100
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1d
- PTRACE_SYSEMU_SINGLESTEP = 0x1e
- PTRACE_TRACEME = 0x0
- PT_CCR = 0x26
- PT_CTR = 0x23
- PT_DAR = 0x29
- PT_DSCR = 0x2c
- PT_DSISR = 0x2a
- PT_FPR0 = 0x30
- PT_FPSCR = 0x50
- PT_LNK = 0x24
- PT_MSR = 0x21
- PT_NIP = 0x20
- PT_ORIG_R3 = 0x22
- PT_R0 = 0x0
- PT_R1 = 0x1
- PT_R10 = 0xa
- PT_R11 = 0xb
- PT_R12 = 0xc
- PT_R13 = 0xd
- PT_R14 = 0xe
- PT_R15 = 0xf
- PT_R16 = 0x10
- PT_R17 = 0x11
- PT_R18 = 0x12
- PT_R19 = 0x13
- PT_R2 = 0x2
- PT_R20 = 0x14
- PT_R21 = 0x15
- PT_R22 = 0x16
- PT_R23 = 0x17
- PT_R24 = 0x18
- PT_R25 = 0x19
- PT_R26 = 0x1a
- PT_R27 = 0x1b
- PT_R28 = 0x1c
- PT_R29 = 0x1d
- PT_R3 = 0x3
- PT_R30 = 0x1e
- PT_R31 = 0x1f
- PT_R4 = 0x4
- PT_R5 = 0x5
- PT_R6 = 0x6
- PT_R7 = 0x7
- PT_R8 = 0x8
- PT_R9 = 0x9
- PT_REGS_COUNT = 0x2c
- PT_RESULT = 0x2b
- PT_SOFTE = 0x27
- PT_TRAP = 0x28
- PT_VR0 = 0x52
- PT_VRSAVE = 0x94
- PT_VSCR = 0x93
- PT_VSR0 = 0x96
- PT_VSR31 = 0xd4
- PT_XER = 0x25
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x14
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x15
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x10
- SO_RCVTIMEO = 0x12
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x12
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x11
- SO_SNDTIMEO = 0x13
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x13
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0xc00
- TABDLY = 0xc00
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x2000741f
- TCGETA = 0x40147417
- TCGETS = 0x402c7413
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x2000741d
- TCSBRKP = 0x5425
- TCSETA = 0x80147418
- TCSETAF = 0x8014741c
- TCSETAW = 0x80147419
- TCSETS = 0x802c7414
- TCSETSF = 0x802c7416
- TCSETSW = 0x802c7415
- TCXONC = 0x2000741e
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x40045432
- TIOCGETC = 0x40067412
- TIOCGETD = 0x5424
- TIOCGETP = 0x40067408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGLTC = 0x40067474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETC = 0x80067411
- TIOCSETD = 0x5423
- TIOCSETN = 0x8006740a
- TIOCSETP = 0x80067409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSLTC = 0x80067475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x5412
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x400000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0x10
- VEOF = 0x4
- VEOL = 0x6
- VEOL2 = 0x8
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x5
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xb
- VSTART = 0xd
- VSTOP = 0xe
- VSUSP = 0xc
- VSWTC = 0x9
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x7
- VWERASE = 0xa
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4000
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0xc00
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x17
+ B115200 = 0x11
+ B1152000 = 0x18
+ B1500000 = 0x19
+ B2000000 = 0x1a
+ B230400 = 0x12
+ B2500000 = 0x1b
+ B3000000 = 0x1c
+ B3500000 = 0x1d
+ B4000000 = 0x1e
+ B460800 = 0x13
+ B500000 = 0x14
+ B57600 = 0x10
+ B576000 = 0x15
+ B921600 = 0x16
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1f
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CBAUD = 0xff
+ CBAUDEX = 0x0
+ CIBAUD = 0xff0000
+ CLOCAL = 0x8000
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTOPB = 0x400
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000000
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x800000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0xd
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x4000
+ ICANON = 0x100
+ IEXTEN = 0x400
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x80
+ IUCLC = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x80
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x40
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x4
+ ONLCR = 0x2
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x20000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x1000
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PROT_SAO = 0x10
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETEVRREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETVRREGS = 0x12
+ PTRACE_GETVSRREGS = 0x1b
+ PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_SETEVRREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETVRREGS = 0x13
+ PTRACE_SETVSRREGS = 0x1c
+ PTRACE_SET_DEBUGREG = 0x1a
+ PTRACE_SINGLEBLOCK = 0x100
+ PTRACE_SYSEMU = 0x1d
+ PTRACE_SYSEMU_SINGLESTEP = 0x1e
+ PT_CCR = 0x26
+ PT_CTR = 0x23
+ PT_DAR = 0x29
+ PT_DSCR = 0x2c
+ PT_DSISR = 0x2a
+ PT_FPR0 = 0x30
+ PT_FPSCR = 0x50
+ PT_LNK = 0x24
+ PT_MSR = 0x21
+ PT_NIP = 0x20
+ PT_ORIG_R3 = 0x22
+ PT_R0 = 0x0
+ PT_R1 = 0x1
+ PT_R10 = 0xa
+ PT_R11 = 0xb
+ PT_R12 = 0xc
+ PT_R13 = 0xd
+ PT_R14 = 0xe
+ PT_R15 = 0xf
+ PT_R16 = 0x10
+ PT_R17 = 0x11
+ PT_R18 = 0x12
+ PT_R19 = 0x13
+ PT_R2 = 0x2
+ PT_R20 = 0x14
+ PT_R21 = 0x15
+ PT_R22 = 0x16
+ PT_R23 = 0x17
+ PT_R24 = 0x18
+ PT_R25 = 0x19
+ PT_R26 = 0x1a
+ PT_R27 = 0x1b
+ PT_R28 = 0x1c
+ PT_R29 = 0x1d
+ PT_R3 = 0x3
+ PT_R30 = 0x1e
+ PT_R31 = 0x1f
+ PT_R4 = 0x4
+ PT_R5 = 0x5
+ PT_R6 = 0x6
+ PT_R7 = 0x7
+ PT_R8 = 0x8
+ PT_R9 = 0x9
+ PT_REGS_COUNT = 0x2c
+ PT_RESULT = 0x2b
+ PT_SOFTE = 0x27
+ PT_TRAP = 0x28
+ PT_VR0 = 0x52
+ PT_VRSAVE = 0x94
+ PT_VSCR = 0x93
+ PT_VSR0 = 0x96
+ PT_VSR31 = 0xd4
+ PT_XER = 0x25
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x14
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x15
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x10
+ SO_RCVTIMEO = 0x12
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x12
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x11
+ SO_SNDTIMEO = 0x13
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x13
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x2000741f
+ TCGETA = 0x40147417
+ TCGETS = 0x402c7413
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x2000741d
+ TCSBRKP = 0x5425
+ TCSETA = 0x80147418
+ TCSETAF = 0x8014741c
+ TCSETAW = 0x80147419
+ TCSETS = 0x802c7414
+ TCSETSF = 0x802c7416
+ TCSETSW = 0x802c7415
+ TCXONC = 0x2000741e
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x40045432
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x5424
+ TIOCGETP = 0x40067408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x5423
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x5412
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x400000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0x10
+ VEOF = 0x4
+ VEOL = 0x6
+ VEOL2 = 0x8
+ VMIN = 0x5
+ VREPRINT = 0xb
+ VSTART = 0xd
+ VSTOP = 0xe
+ VSUSP = 0xc
+ VSWTC = 0x9
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x7
+ VWERASE = 0xa
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4000
+ XTABS = 0xc00
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2918,23 +601,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x3a)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2951,8 +626,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2960,99 +633,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index b0bc487..74b3211 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -1,2915 +1,598 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64le && linux
// +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x17
- B110 = 0x3
- B115200 = 0x11
- B1152000 = 0x18
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x19
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x1a
- B230400 = 0x12
- B2400 = 0xb
- B2500000 = 0x1b
- B300 = 0x7
- B3000000 = 0x1c
- B3500000 = 0x1d
- B38400 = 0xf
- B4000000 = 0x1e
- B460800 = 0x13
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x14
- B57600 = 0x10
- B576000 = 0x15
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x16
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0xff
- CBAUDEX = 0x0
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0xff0000
- CLOCAL = 0x8000
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIGNAL = 0xff
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0xd
- F_SETLKW = 0x7
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x4000
- IBSHIFT = 0x10
- ICANON = 0x100
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x400
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x80
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x1000
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x80
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x300
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80000000
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x4
- ONLCR = 0x2
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x20000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x1000
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_SAO = 0x10
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETEVRREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVRREGS = 0x12
- PTRACE_GETVSRREGS = 0x1b
- PTRACE_GET_DEBUGREG = 0x19
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETEVRREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVRREGS = 0x13
- PTRACE_SETVSRREGS = 0x1c
- PTRACE_SET_DEBUGREG = 0x1a
- PTRACE_SINGLEBLOCK = 0x100
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1d
- PTRACE_SYSEMU_SINGLESTEP = 0x1e
- PTRACE_TRACEME = 0x0
- PT_CCR = 0x26
- PT_CTR = 0x23
- PT_DAR = 0x29
- PT_DSCR = 0x2c
- PT_DSISR = 0x2a
- PT_FPR0 = 0x30
- PT_FPSCR = 0x50
- PT_LNK = 0x24
- PT_MSR = 0x21
- PT_NIP = 0x20
- PT_ORIG_R3 = 0x22
- PT_R0 = 0x0
- PT_R1 = 0x1
- PT_R10 = 0xa
- PT_R11 = 0xb
- PT_R12 = 0xc
- PT_R13 = 0xd
- PT_R14 = 0xe
- PT_R15 = 0xf
- PT_R16 = 0x10
- PT_R17 = 0x11
- PT_R18 = 0x12
- PT_R19 = 0x13
- PT_R2 = 0x2
- PT_R20 = 0x14
- PT_R21 = 0x15
- PT_R22 = 0x16
- PT_R23 = 0x17
- PT_R24 = 0x18
- PT_R25 = 0x19
- PT_R26 = 0x1a
- PT_R27 = 0x1b
- PT_R28 = 0x1c
- PT_R29 = 0x1d
- PT_R3 = 0x3
- PT_R30 = 0x1e
- PT_R31 = 0x1f
- PT_R4 = 0x4
- PT_R5 = 0x5
- PT_R6 = 0x6
- PT_R7 = 0x7
- PT_R8 = 0x8
- PT_R9 = 0x9
- PT_REGS_COUNT = 0x2c
- PT_RESULT = 0x2b
- PT_SOFTE = 0x27
- PT_TRAP = 0x28
- PT_VR0 = 0x52
- PT_VRSAVE = 0x94
- PT_VSCR = 0x93
- PT_VSR0 = 0x96
- PT_VSR31 = 0xd4
- PT_XER = 0x25
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x14
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x15
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x10
- SO_RCVTIMEO = 0x12
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x12
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x11
- SO_SNDTIMEO = 0x13
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x13
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0xc00
- TABDLY = 0xc00
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x2000741f
- TCGETA = 0x40147417
- TCGETS = 0x402c7413
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x2000741d
- TCSBRKP = 0x5425
- TCSETA = 0x80147418
- TCSETAF = 0x8014741c
- TCSETAW = 0x80147419
- TCSETS = 0x802c7414
- TCSETSF = 0x802c7416
- TCSETSW = 0x802c7415
- TCXONC = 0x2000741e
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x40045432
- TIOCGETC = 0x40067412
- TIOCGETD = 0x5424
- TIOCGETP = 0x40067408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGLTC = 0x40067474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETC = 0x80067411
- TIOCSETD = 0x5423
- TIOCSETN = 0x8006740a
- TIOCSETP = 0x80067409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSLTC = 0x80067475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x5412
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x400000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0x10
- VEOF = 0x4
- VEOL = 0x6
- VEOL2 = 0x8
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x5
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xb
- VSTART = 0xd
- VSTOP = 0xe
- VSUSP = 0xc
- VSWTC = 0x9
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x7
- VWERASE = 0xa
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4000
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0xc00
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x17
+ B115200 = 0x11
+ B1152000 = 0x18
+ B1500000 = 0x19
+ B2000000 = 0x1a
+ B230400 = 0x12
+ B2500000 = 0x1b
+ B3000000 = 0x1c
+ B3500000 = 0x1d
+ B4000000 = 0x1e
+ B460800 = 0x13
+ B500000 = 0x14
+ B57600 = 0x10
+ B576000 = 0x15
+ B921600 = 0x16
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1f
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CBAUD = 0xff
+ CBAUDEX = 0x0
+ CIBAUD = 0xff0000
+ CLOCAL = 0x8000
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTOPB = 0x400
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000000
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x800000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0xd
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x4000
+ ICANON = 0x100
+ IEXTEN = 0x400
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x80
+ IUCLC = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x80
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x40
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x4
+ ONLCR = 0x2
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x20000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x1000
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PROT_SAO = 0x10
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETEVRREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETVRREGS = 0x12
+ PTRACE_GETVSRREGS = 0x1b
+ PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_SETEVRREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETVRREGS = 0x13
+ PTRACE_SETVSRREGS = 0x1c
+ PTRACE_SET_DEBUGREG = 0x1a
+ PTRACE_SINGLEBLOCK = 0x100
+ PTRACE_SYSEMU = 0x1d
+ PTRACE_SYSEMU_SINGLESTEP = 0x1e
+ PT_CCR = 0x26
+ PT_CTR = 0x23
+ PT_DAR = 0x29
+ PT_DSCR = 0x2c
+ PT_DSISR = 0x2a
+ PT_FPR0 = 0x30
+ PT_FPSCR = 0x50
+ PT_LNK = 0x24
+ PT_MSR = 0x21
+ PT_NIP = 0x20
+ PT_ORIG_R3 = 0x22
+ PT_R0 = 0x0
+ PT_R1 = 0x1
+ PT_R10 = 0xa
+ PT_R11 = 0xb
+ PT_R12 = 0xc
+ PT_R13 = 0xd
+ PT_R14 = 0xe
+ PT_R15 = 0xf
+ PT_R16 = 0x10
+ PT_R17 = 0x11
+ PT_R18 = 0x12
+ PT_R19 = 0x13
+ PT_R2 = 0x2
+ PT_R20 = 0x14
+ PT_R21 = 0x15
+ PT_R22 = 0x16
+ PT_R23 = 0x17
+ PT_R24 = 0x18
+ PT_R25 = 0x19
+ PT_R26 = 0x1a
+ PT_R27 = 0x1b
+ PT_R28 = 0x1c
+ PT_R29 = 0x1d
+ PT_R3 = 0x3
+ PT_R30 = 0x1e
+ PT_R31 = 0x1f
+ PT_R4 = 0x4
+ PT_R5 = 0x5
+ PT_R6 = 0x6
+ PT_R7 = 0x7
+ PT_R8 = 0x8
+ PT_R9 = 0x9
+ PT_REGS_COUNT = 0x2c
+ PT_RESULT = 0x2b
+ PT_SOFTE = 0x27
+ PT_TRAP = 0x28
+ PT_VR0 = 0x52
+ PT_VRSAVE = 0x94
+ PT_VSCR = 0x93
+ PT_VSR0 = 0x96
+ PT_VSR31 = 0xd4
+ PT_XER = 0x25
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x14
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x15
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x10
+ SO_RCVTIMEO = 0x12
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x12
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x11
+ SO_SNDTIMEO = 0x13
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x13
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x2000741f
+ TCGETA = 0x40147417
+ TCGETS = 0x402c7413
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x2000741d
+ TCSBRKP = 0x5425
+ TCSETA = 0x80147418
+ TCSETAF = 0x8014741c
+ TCSETAW = 0x80147419
+ TCSETS = 0x802c7414
+ TCSETSF = 0x802c7416
+ TCSETSW = 0x802c7415
+ TCXONC = 0x2000741e
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x40045432
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x5424
+ TIOCGETP = 0x40067408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x5423
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x5412
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x400000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0x10
+ VEOF = 0x4
+ VEOL = 0x6
+ VEOL2 = 0x8
+ VMIN = 0x5
+ VREPRINT = 0xb
+ VSTART = 0xd
+ VSTOP = 0xe
+ VSUSP = 0xc
+ VSWTC = 0x9
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x7
+ VWERASE = 0xa
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4000
+ XTABS = 0xc00
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2918,23 +601,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x3a)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2951,8 +626,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2960,99 +633,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 86976e4..c91c8ac 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -1,2841 +1,523 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build riscv64 && linux
// +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- 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 = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2844,23 +526,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2877,8 +551,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2886,99 +558,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index cd6a046..b66bf22 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -1,2914 +1,598 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build s390x && linux
// +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_DISABLE_TE = 0x5010
- PTRACE_ENABLE_TE = 0x5009
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_LAST_BREAK = 0x5006
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_AREA = 0x5003
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_AREA = 0x5002
- PTRACE_PEEKUSR = 0x3
- PTRACE_PEEKUSR_AREA = 0x5000
- PTRACE_PEEK_SYSTEM_CALL = 0x5007
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_AREA = 0x5005
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_AREA = 0x5004
- PTRACE_POKEUSR = 0x6
- PTRACE_POKEUSR_AREA = 0x5001
- PTRACE_POKE_SYSTEM_CALL = 0x5008
- PTRACE_PROT = 0x15
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLEBLOCK = 0xc
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TE_ABORT_RAND = 0x5011
- PTRACE_TRACEME = 0x0
- PT_ACR0 = 0x90
- PT_ACR1 = 0x94
- PT_ACR10 = 0xb8
- PT_ACR11 = 0xbc
- PT_ACR12 = 0xc0
- PT_ACR13 = 0xc4
- PT_ACR14 = 0xc8
- PT_ACR15 = 0xcc
- PT_ACR2 = 0x98
- PT_ACR3 = 0x9c
- PT_ACR4 = 0xa0
- PT_ACR5 = 0xa4
- PT_ACR6 = 0xa8
- PT_ACR7 = 0xac
- PT_ACR8 = 0xb0
- PT_ACR9 = 0xb4
- PT_CR_10 = 0x168
- PT_CR_11 = 0x170
- PT_CR_9 = 0x160
- PT_ENDREGS = 0x1af
- PT_FPC = 0xd8
- PT_FPR0 = 0xe0
- PT_FPR1 = 0xe8
- PT_FPR10 = 0x130
- PT_FPR11 = 0x138
- PT_FPR12 = 0x140
- PT_FPR13 = 0x148
- PT_FPR14 = 0x150
- PT_FPR15 = 0x158
- PT_FPR2 = 0xf0
- PT_FPR3 = 0xf8
- PT_FPR4 = 0x100
- PT_FPR5 = 0x108
- PT_FPR6 = 0x110
- PT_FPR7 = 0x118
- PT_FPR8 = 0x120
- PT_FPR9 = 0x128
- PT_GPR0 = 0x10
- PT_GPR1 = 0x18
- PT_GPR10 = 0x60
- PT_GPR11 = 0x68
- PT_GPR12 = 0x70
- PT_GPR13 = 0x78
- PT_GPR14 = 0x80
- PT_GPR15 = 0x88
- PT_GPR2 = 0x20
- PT_GPR3 = 0x28
- PT_GPR4 = 0x30
- PT_GPR5 = 0x38
- PT_GPR6 = 0x40
- PT_GPR7 = 0x48
- PT_GPR8 = 0x50
- PT_GPR9 = 0x58
- PT_IEEE_IP = 0x1a8
- PT_LASTOFF = 0x1a8
- PT_ORIGGPR2 = 0xd0
- PT_PSWADDR = 0x8
- PT_PSWMASK = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- 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 = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_DISABLE_TE = 0x5010
+ PTRACE_ENABLE_TE = 0x5009
+ PTRACE_GET_LAST_BREAK = 0x5006
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_AREA = 0x5003
+ PTRACE_PEEKTEXT_AREA = 0x5002
+ PTRACE_PEEKUSR_AREA = 0x5000
+ PTRACE_PEEK_SYSTEM_CALL = 0x5007
+ PTRACE_POKEDATA_AREA = 0x5005
+ PTRACE_POKETEXT_AREA = 0x5004
+ PTRACE_POKEUSR_AREA = 0x5001
+ PTRACE_POKE_SYSTEM_CALL = 0x5008
+ PTRACE_PROT = 0x15
+ PTRACE_SINGLEBLOCK = 0xc
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ PTRACE_TE_ABORT_RAND = 0x5011
+ PT_ACR0 = 0x90
+ PT_ACR1 = 0x94
+ PT_ACR10 = 0xb8
+ PT_ACR11 = 0xbc
+ PT_ACR12 = 0xc0
+ PT_ACR13 = 0xc4
+ PT_ACR14 = 0xc8
+ PT_ACR15 = 0xcc
+ PT_ACR2 = 0x98
+ PT_ACR3 = 0x9c
+ PT_ACR4 = 0xa0
+ PT_ACR5 = 0xa4
+ PT_ACR6 = 0xa8
+ PT_ACR7 = 0xac
+ PT_ACR8 = 0xb0
+ PT_ACR9 = 0xb4
+ PT_CR_10 = 0x168
+ PT_CR_11 = 0x170
+ PT_CR_9 = 0x160
+ PT_ENDREGS = 0x1af
+ PT_FPC = 0xd8
+ PT_FPR0 = 0xe0
+ PT_FPR1 = 0xe8
+ PT_FPR10 = 0x130
+ PT_FPR11 = 0x138
+ PT_FPR12 = 0x140
+ PT_FPR13 = 0x148
+ PT_FPR14 = 0x150
+ PT_FPR15 = 0x158
+ PT_FPR2 = 0xf0
+ PT_FPR3 = 0xf8
+ PT_FPR4 = 0x100
+ PT_FPR5 = 0x108
+ PT_FPR6 = 0x110
+ PT_FPR7 = 0x118
+ PT_FPR8 = 0x120
+ PT_FPR9 = 0x128
+ PT_GPR0 = 0x10
+ PT_GPR1 = 0x18
+ PT_GPR10 = 0x60
+ PT_GPR11 = 0x68
+ PT_GPR12 = 0x70
+ PT_GPR13 = 0x78
+ PT_GPR14 = 0x80
+ PT_GPR15 = 0x88
+ PT_GPR2 = 0x20
+ PT_GPR3 = 0x28
+ PT_GPR4 = 0x30
+ PT_GPR5 = 0x38
+ PT_GPR6 = 0x40
+ PT_GPR7 = 0x48
+ PT_GPR8 = 0x50
+ PT_GPR9 = 0x58
+ PT_IEEE_IP = 0x1a8
+ PT_LASTOFF = 0x1a8
+ PT_ORIGGPR2 = 0xd0
+ PT_PSWADDR = 0x8
+ PT_PSWMASK = 0x0
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2917,23 +601,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2950,8 +626,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2959,99 +633,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 89da22b..f7fb149 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -1,2904 +1,587 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build sparc64 && linux
// +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- ASI_LEON_DFLUSH = 0x11
- ASI_LEON_IFLUSH = 0x10
- ASI_LEON_MMUFLUSH = 0x18
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- 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 = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x400000
- EFD_NONBLOCK = 0x4000
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- EMT_TAGOVF = 0x1
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x400000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0x7
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0x7
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x7
- F_GETLK64 = 0x7
- F_GETOWN = 0x5
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x8
- F_SETLK64 = 0x8
- F_SETLKW = 0x9
- F_SETLKW64 = 0x9
- F_SETOWN = 0x6
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x3
- F_WRLCK = 0x2
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- 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_CLOEXEC = 0x400000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x4000
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x200
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x100
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x100000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x2000
- O_EXCL = 0x800
- O_FSYNC = 0x802000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x4004
- O_NOATIME = 0x200000
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x4000
- O_PATH = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x802000
- O_SYNC = 0x802000
- O_TMPFILE = 0x2010000
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPAREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPREGS64 = 0x19
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_READDATA = 0x10
- PTRACE_READTEXT = 0x12
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPAREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPREGS64 = 0x1a
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SPARC_DETACH = 0xb
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- PTRACE_WRITEDATA = 0x11
- PTRACE_WRITETEXT = 0x13
- PT_FP = 0x48
- PT_G0 = 0x10
- PT_G1 = 0x14
- PT_G2 = 0x18
- PT_G3 = 0x1c
- PT_G4 = 0x20
- PT_G5 = 0x24
- PT_G6 = 0x28
- PT_G7 = 0x2c
- PT_I0 = 0x30
- PT_I1 = 0x34
- PT_I2 = 0x38
- PT_I3 = 0x3c
- PT_I4 = 0x40
- PT_I5 = 0x44
- PT_I6 = 0x48
- PT_I7 = 0x4c
- PT_NPC = 0x8
- PT_PC = 0x4
- PT_PSR = 0x0
- PT_REGS_MAGIC = 0x57ac6c00
- PT_TNPC = 0x90
- PT_TPC = 0x88
- PT_TSTATE = 0x80
- PT_V9_FP = 0x70
- PT_V9_G0 = 0x0
- PT_V9_G1 = 0x8
- PT_V9_G2 = 0x10
- PT_V9_G3 = 0x18
- PT_V9_G4 = 0x20
- PT_V9_G5 = 0x28
- PT_V9_G6 = 0x30
- PT_V9_G7 = 0x38
- PT_V9_I0 = 0x40
- PT_V9_I1 = 0x48
- PT_V9_I2 = 0x50
- PT_V9_I3 = 0x58
- PT_V9_I4 = 0x60
- PT_V9_I5 = 0x68
- PT_V9_I6 = 0x70
- PT_V9_I7 = 0x78
- PT_V9_MAGIC = 0x9c
- PT_V9_TNPC = 0x90
- PT_V9_TPC = 0x88
- PT_V9_TSTATE = 0x80
- PT_V9_Y = 0x98
- PT_WIM = 0x10
- PT_Y = 0xc
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x6
- RLIMIT_NPROC = 0x7
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6b
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x17
- RTM_NR_MSGTYPES = 0x5c
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x23
- SCM_TIMESTAMPING_OPT_STATS = 0x38
- SCM_TIMESTAMPING_PKTINFO = 0x3c
- SCM_TIMESTAMPNS = 0x21
- SCM_TXTIME = 0x3f
- SCM_WIFI_STATUS = 0x25
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x400000
- SFD_NONBLOCK = 0x4000
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x400000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x4000
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x8000
- SO_ATTACH_BPF = 0x34
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x35
- SO_ATTACH_REUSEPORT_EBPF = 0x36
- SO_BINDTODEVICE = 0xd
- SO_BINDTOIFINDEX = 0x41
- SO_BPF_EXTENSIONS = 0x32
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0x400
- SO_BUSY_POLL = 0x30
- SO_CNX_ADVICE = 0x37
- SO_COOKIE = 0x3b
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x47
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x33
- SO_INCOMING_NAPI_ID = 0x3a
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x28
- SO_MARK = 0x22
- SO_MAX_PACING_RATE = 0x31
- SO_MEMINFO = 0x39
- SO_NOFCS = 0x27
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x2
- SO_PASSSEC = 0x1f
- SO_PEEK_OFF = 0x26
- SO_PEERCRED = 0x40
- SO_PEERGROUPS = 0x3d
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x100b
- SO_RCVLOWAT = 0x800
- SO_RCVTIMEO = 0x2000
- SO_RCVTIMEO_NEW = 0x44
- SO_RCVTIMEO_OLD = 0x2000
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x24
- SO_SECURITY_AUTHENTICATION = 0x5001
- SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
- SO_SELECT_ERR_QUEUE = 0x29
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x100a
- SO_SNDLOWAT = 0x1000
- SO_SNDTIMEO = 0x4000
- SO_SNDTIMEO_NEW = 0x45
- SO_SNDTIMEO_OLD = 0x4000
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x23
- SO_TIMESTAMPING_NEW = 0x43
- SO_TIMESTAMPING_OLD = 0x23
- SO_TIMESTAMPNS = 0x21
- SO_TIMESTAMPNS_NEW = 0x42
- SO_TIMESTAMPNS_OLD = 0x21
- SO_TIMESTAMP_NEW = 0x46
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3f
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x25
- SO_ZEROCOPY = 0x3e
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- 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_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- 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 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x20005407
- TCGETA = 0x40125401
- TCGETS = 0x40245408
- TCGETS2 = 0x402c540c
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x20005405
- TCSBRKP = 0x5425
- TCSETA = 0x80125402
- TCSETAF = 0x80125404
- TCSETAW = 0x80125403
- TCSETS = 0x80245409
- TCSETS2 = 0x802c540d
- TCSETSF = 0x8024540b
- TCSETSF2 = 0x802c540f
- TCSETSW = 0x8024540a
- TCSETSW2 = 0x802c540e
- TCXONC = 0x20005406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x2000747a
- TIOCCONS = 0x20007424
- TIOCEXCL = 0x2000740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x40047400
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x40285443
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x40047483
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40047486
- TIOCGPTPEER = 0x20007489
- TIOCGRS485 = 0x40205441
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x40047485
- TIOCGSOFTCAR = 0x40047464
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMIWAIT = 0x545c
- 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
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007484
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSETD = 0x80047401
- TIOCSIG = 0x80047488
- TIOCSISO7816 = 0xc0285444
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x80047482
- TIOCSPTLCK = 0x80047487
- TIOCSRS485 = 0xc0205442
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x80047465
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x20005437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
- __TIOCFLUSH = 0x80047410
+ ASI_LEON_DFLUSH = 0x11
+ ASI_LEON_IFLUSH = 0x10
+ ASI_LEON_MMUFLUSH = 0x18
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x41484d11
+ ECCGETSTATS = 0x40104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x400000
+ EFD_NONBLOCK = 0x4000
+ EMT_TAGOVF = 0x1
+ EPOLL_CLOEXEC = 0x400000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x7
+ F_GETLK64 = 0x7
+ F_GETOWN = 0x5
+ F_RDLCK = 0x1
+ F_SETLK = 0x8
+ F_SETLK64 = 0x8
+ F_SETLKW = 0x9
+ F_SETLKW64 = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x3
+ F_WRLCK = 0x2
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x400000
+ IN_NONBLOCK = 0x4000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x200
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x100
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_RENAME = 0x20
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ MEMERASE = 0x80084d02
+ MEMERASE64 = 0x80104d14
+ MEMGETBADBLOCK = 0x80084d0b
+ MEMGETINFO = 0x40204d01
+ MEMGETOOBSEL = 0x40c84d0a
+ MEMGETREGIONCOUNT = 0x40044d07
+ MEMISLOCKED = 0x40084d17
+ MEMLOCK = 0x80084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x80084d0c
+ MEMUNLOCK = 0x80084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x20004d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x800c4d19
+ OTPGETREGIONCOUNT = 0x80044d0e
+ OTPGETREGIONINFO = 0x800c4d0f
+ OTPLOCK = 0x400c4d10
+ OTPSELECT = 0x40044d0d
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x400000
+ O_CREAT = 0x200
+ O_DIRECT = 0x100000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x2000
+ O_EXCL = 0x800
+ O_FSYNC = 0x802000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x4004
+ O_NOATIME = 0x200000
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x4000
+ O_PATH = 0x1000000
+ O_RSYNC = 0x802000
+ O_SYNC = 0x802000
+ O_TMPFILE = 0x2010000
+ O_TRUNC = 0x400
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFPAREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPREGS64 = 0x19
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_READDATA = 0x10
+ PTRACE_READTEXT = 0x12
+ PTRACE_SETFPAREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPREGS64 = 0x1a
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SPARC_DETACH = 0xb
+ PTRACE_WRITEDATA = 0x11
+ PTRACE_WRITETEXT = 0x13
+ PT_FP = 0x48
+ PT_G0 = 0x10
+ PT_G1 = 0x14
+ PT_G2 = 0x18
+ PT_G3 = 0x1c
+ PT_G4 = 0x20
+ PT_G5 = 0x24
+ PT_G6 = 0x28
+ PT_G7 = 0x2c
+ PT_I0 = 0x30
+ PT_I1 = 0x34
+ PT_I2 = 0x38
+ PT_I3 = 0x3c
+ PT_I4 = 0x40
+ PT_I5 = 0x44
+ PT_I6 = 0x48
+ PT_I7 = 0x4c
+ PT_NPC = 0x8
+ PT_PC = 0x4
+ PT_PSR = 0x0
+ PT_REGS_MAGIC = 0x57ac6c00
+ PT_TNPC = 0x90
+ PT_TPC = 0x88
+ PT_TSTATE = 0x80
+ PT_V9_FP = 0x70
+ PT_V9_G0 = 0x0
+ PT_V9_G1 = 0x8
+ PT_V9_G2 = 0x10
+ PT_V9_G3 = 0x18
+ PT_V9_G4 = 0x20
+ PT_V9_G5 = 0x28
+ PT_V9_G6 = 0x30
+ PT_V9_G7 = 0x38
+ PT_V9_I0 = 0x40
+ PT_V9_I1 = 0x48
+ PT_V9_I2 = 0x50
+ PT_V9_I3 = 0x58
+ PT_V9_I4 = 0x60
+ PT_V9_I5 = 0x68
+ PT_V9_I6 = 0x70
+ PT_V9_I7 = 0x78
+ PT_V9_MAGIC = 0x9c
+ PT_V9_TNPC = 0x90
+ PT_V9_TPC = 0x88
+ PT_V9_TSTATE = 0x80
+ PT_V9_Y = 0x98
+ PT_WIM = 0x10
+ PT_Y = 0xc
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x6
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x23
+ SCM_TIMESTAMPING_OPT_STATS = 0x38
+ SCM_TIMESTAMPING_PKTINFO = 0x3c
+ SCM_TIMESTAMPNS = 0x21
+ SCM_TXTIME = 0x3f
+ SCM_WIFI_STATUS = 0x25
+ SFD_CLOEXEC = 0x400000
+ SFD_NONBLOCK = 0x4000
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x400000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x4000
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x8000
+ SO_ATTACH_BPF = 0x34
+ SO_ATTACH_REUSEPORT_CBPF = 0x35
+ SO_ATTACH_REUSEPORT_EBPF = 0x36
+ SO_BINDTODEVICE = 0xd
+ SO_BINDTOIFINDEX = 0x41
+ SO_BPF_EXTENSIONS = 0x32
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0x400
+ SO_BUF_LOCK = 0x51
+ SO_BUSY_POLL = 0x30
+ SO_BUSY_POLL_BUDGET = 0x49
+ SO_CNX_ADVICE = 0x37
+ SO_COOKIE = 0x3b
+ SO_DETACH_REUSEPORT_BPF = 0x47
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x33
+ SO_INCOMING_NAPI_ID = 0x3a
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x28
+ SO_MARK = 0x22
+ SO_MAX_PACING_RATE = 0x31
+ SO_MEMINFO = 0x39
+ SO_NETNS_COOKIE = 0x50
+ SO_NOFCS = 0x27
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x2
+ SO_PASSSEC = 0x1f
+ SO_PEEK_OFF = 0x26
+ SO_PEERCRED = 0x40
+ SO_PEERGROUPS = 0x3d
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x48
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x100b
+ SO_RCVLOWAT = 0x800
+ SO_RCVTIMEO = 0x2000
+ SO_RCVTIMEO_NEW = 0x44
+ SO_RCVTIMEO_OLD = 0x2000
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x24
+ SO_SECURITY_AUTHENTICATION = 0x5001
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
+ SO_SELECT_ERR_QUEUE = 0x29
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x100a
+ SO_SNDLOWAT = 0x1000
+ SO_SNDTIMEO = 0x4000
+ SO_SNDTIMEO_NEW = 0x45
+ SO_SNDTIMEO_OLD = 0x4000
+ SO_TIMESTAMPING = 0x23
+ SO_TIMESTAMPING_NEW = 0x43
+ SO_TIMESTAMPING_OLD = 0x23
+ SO_TIMESTAMPNS = 0x21
+ SO_TIMESTAMPNS_NEW = 0x42
+ SO_TIMESTAMPNS_OLD = 0x21
+ SO_TIMESTAMP_NEW = 0x46
+ SO_TXTIME = 0x3f
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x25
+ SO_ZEROCOPY = 0x3e
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x20005407
+ TCGETA = 0x40125401
+ TCGETS = 0x40245408
+ TCGETS2 = 0x402c540c
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x20005405
+ TCSBRKP = 0x5425
+ TCSETA = 0x80125402
+ TCSETAF = 0x80125404
+ TCSETAW = 0x80125403
+ TCSETS = 0x80245409
+ TCSETS2 = 0x802c540d
+ TCSETSF = 0x8024540b
+ TCSETSF2 = 0x802c540f
+ TCSETSW = 0x8024540a
+ TCSETSW2 = 0x802c540e
+ TCXONC = 0x20005406
+ TFD_CLOEXEC = 0x400000
+ TFD_NONBLOCK = 0x4000
+ TIOCCBRK = 0x2000747a
+ TIOCCONS = 0x20007424
+ TIOCEXCL = 0x2000740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x40047400
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285443
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x40047483
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40047486
+ TIOCGPTPEER = 0x20007489
+ TIOCGRS485 = 0x40205441
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x40047485
+ TIOCGSOFTCAR = 0x40047464
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007484
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSETD = 0x80047401
+ TIOCSIG = 0x80047488
+ TIOCSISO7816 = 0xc0285444
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x80047482
+ TIOCSPTLCK = 0x80047487
+ TIOCSRS485 = 0xc0205442
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x80047465
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x20005437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
+ __TIOCFLUSH = 0x80047410
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x30)
EADDRNOTAVAIL = syscall.Errno(0x31)
EADV = syscall.Errno(0x53)
EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x25)
EBADE = syscall.Errno(0x66)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x5d)
EBADMSG = syscall.Errno(0x4c)
EBADR = syscall.Errno(0x67)
EBADRQC = syscall.Errno(0x6a)
EBADSLT = syscall.Errno(0x6b)
EBFONT = syscall.Errno(0x6d)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7f)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x5e)
ECOMM = syscall.Errno(0x55)
ECONNABORTED = syscall.Errno(0x35)
@@ -2907,23 +590,15 @@ const (
EDEADLK = syscall.Errno(0x4e)
EDEADLOCK = syscall.Errno(0x6c)
EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x58)
EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x40)
EHOSTUNREACH = syscall.Errno(0x41)
EHWPOISON = syscall.Errno(0x87)
EIDRM = syscall.Errno(0x4d)
EILSEQ = syscall.Errno(0x7a)
EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x81)
EKEYREJECTED = syscall.Errno(0x83)
@@ -2940,8 +615,6 @@ const (
ELNRNG = syscall.Errno(0x62)
ELOOP = syscall.Errno(0x3e)
EMEDIUMTYPE = syscall.Errno(0x7e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x28)
EMULTIHOP = syscall.Errno(0x57)
ENAMETOOLONG = syscall.Errno(0x3f)
@@ -2949,102 +622,70 @@ const (
ENETDOWN = syscall.Errno(0x32)
ENETRESET = syscall.Errno(0x34)
ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x69)
ENOBUFS = syscall.Errno(0x37)
ENOCSI = syscall.Errno(0x64)
ENODATA = syscall.Errno(0x6f)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x80)
ENOLCK = syscall.Errno(0x4f)
ENOLINK = syscall.Errno(0x52)
ENOMEDIUM = syscall.Errno(0x7d)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x4b)
ENONET = syscall.Errno(0x50)
ENOPKG = syscall.Errno(0x71)
ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x4a)
ENOSTR = syscall.Errno(0x48)
ENOSYS = syscall.Errno(0x5a)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x42)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x85)
ENOTSOCK = syscall.Errno(0x26)
ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x73)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x2d)
EOVERFLOW = syscall.Errno(0x5c)
EOWNERDEAD = syscall.Errno(0x84)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
EPROCLIM = syscall.Errno(0x43)
EPROTO = syscall.Errno(0x56)
EPROTONOSUPPORT = syscall.Errno(0x2b)
EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x59)
EREMOTE = syscall.Errno(0x47)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x74)
ERFKILL = syscall.Errno(0x86)
- EROFS = syscall.Errno(0x1e)
ERREMOTE = syscall.Errno(0x51)
ESHUTDOWN = syscall.Errno(0x3a)
ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x54)
ESTALE = syscall.Errno(0x46)
ESTRPIPE = syscall.Errno(0x5b)
ETIME = syscall.Errno(0x49)
ETIMEDOUT = syscall.Errno(0x3c)
ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x63)
EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x68)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x14)
SIGCLD = syscall.Signal(0x14)
SIGCONT = syscall.Signal(0x13)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
SIGLOST = syscall.Signal(0x1d)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x17)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1d)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x11)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x12)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
index 96b9b8a..72f7420 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && netbsd
// +build 386,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -158,6 +159,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
index ed522a8..8d4eb0c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && netbsd
// +build amd64,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -158,6 +159,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
index c8d36fe..9eef974 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh -marm
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && netbsd
// +build arm,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -150,6 +151,12 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
index f1c146a..3b62ba1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && netbsd
// +build arm64,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -158,6 +159,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
index 5402bd5..6d56edc 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -146,6 +147,13 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
@@ -1012,7 +1020,10 @@ const (
RLIMIT_CPU = 0x0
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
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
index ffaf2d2..25cb609 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -153,6 +154,13 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x4
CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
index 7aa796a..aef6c08 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -146,6 +147,13 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
@@ -1012,7 +1020,10 @@ const (
RLIMIT_CPU = 0x0
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
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
index 1792d3f..90de7df 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -156,6 +157,13 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x4
CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
index 6217cdb..f1154ff 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
@@ -1,10 +1,11 @@
-// mkerrors.sh -m32
+// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build 386,darwin
+//go:build mips64 && openbsd
+// +build mips64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -m32 _const.go
+// cgo -godefs -- -m64 _const.go
package unix
@@ -12,6 +13,7 @@ import "syscall"
const (
AF_APPLETALK = 0x10
+ AF_BLUETOOTH = 0x20
AF_CCITT = 0xa
AF_CHAOS = 0x5
AF_CNT = 0x15
@@ -19,116 +21,36 @@ const (
AF_DATAKIT = 0x9
AF_DECnet = 0xc
AF_DLI = 0xd
- AF_E164 = 0x1c
+ AF_E164 = 0x1a
AF_ECMA = 0x8
+ AF_ENCAP = 0x1c
AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
AF_IMPLINK = 0x3
AF_INET = 0x2
- AF_INET6 = 0x1e
+ AF_INET6 = 0x18
AF_IPX = 0x17
- AF_ISDN = 0x1c
+ AF_ISDN = 0x1a
AF_ISO = 0x7
+ AF_KEY = 0x1e
AF_LAT = 0xe
AF_LINK = 0x12
AF_LOCAL = 0x1
- AF_MAX = 0x28
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
+ AF_MAX = 0x24
+ AF_MPLS = 0x21
+ AF_NATM = 0x1b
AF_NS = 0x6
AF_OSI = 0x7
- AF_PPP = 0x22
AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
AF_ROUTE = 0x11
- AF_SIP = 0x18
+ AF_SIP = 0x1d
AF_SNA = 0xb
- AF_SYSTEM = 0x20
AF_UNIX = 0x1
AF_UNSPEC = 0x0
- AF_UTUN = 0x26
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 = 0x41c7ff00
- 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
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FRELAY = 0xf
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@@ -154,25 +76,28 @@ const (
B9600 = 0x2580
BIOCFLUSH = 0x20004268
BIOCGBLEN = 0x40044266
+ BIOCGDIRFILT = 0x4004427c
BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
+ BIOCGDLTLIST = 0xc010427b
BIOCGETIF = 0x4020426b
+ BIOCGFILDROP = 0x40044278
BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
+ BIOCGRSIG = 0x40044273
+ BIOCGRTIMEOUT = 0x4010426e
BIOCGSTATS = 0x4008426f
BIOCIMMEDIATE = 0x80044270
+ BIOCLOCK = 0x20004276
BIOCPROMISC = 0x20004269
BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80084267
- BIOCSETFNR = 0x8008427e
+ BIOCSDIRFILT = 0x8004427d
+ BIOCSDLT = 0x8004427a
+ BIOCSETF = 0x80104267
BIOCSETIF = 0x8020426c
+ BIOCSETWF = 0x80104277
+ BIOCSFILDROP = 0x80044279
BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
+ BIOCSRSIG = 0x80044272
+ BIOCSRTIMEOUT = 0x8010426d
BIOCVERSION = 0x40044271
BPF_A = 0x10
BPF_ABS = 0x20
@@ -181,7 +106,12 @@ const (
BPF_ALU = 0x4
BPF_AND = 0x50
BPF_B = 0x10
+ BPF_DIRECTION_IN = 0x1
+ BPF_DIRECTION_OUT = 0x2
BPF_DIV = 0x30
+ BPF_FILDROP_CAPTURE = 0x1
+ BPF_FILDROP_DROP = 0x2
+ BPF_FILDROP_PASS = 0x0
BPF_H = 0x8
BPF_IMM = 0x0
BPF_IND = 0x40
@@ -197,7 +127,7 @@ const (
BPF_LEN = 0x80
BPF_LSH = 0x60
BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
+ BPF_MAXBUFSIZE = 0x200000
BPF_MAXINSNS = 0x200
BPF_MEM = 0x60
BPF_MEMWORDS = 0x10
@@ -219,33 +149,30 @@ const (
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_BOOTTIME = 0x6
+ CLOCK_MONOTONIC = 0x3
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
CLOCK_REALTIME = 0x0
- CLOCK_THREAD_CPUTIME_ID = 0x10
- CLOCK_UPTIME_RAW = 0x8
- CLOCK_UPTIME_RAW_APPROX = 0x9
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
+ CLOCK_THREAD_CPUTIME_ID = 0x4
+ CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
- CRTSCTS = 0x30000
+ CRTSCTS = 0x10000
CS5 = 0x0
CS6 = 0x100
CS7 = 0x200
CS8 = 0x300
CSIZE = 0x300
CSTART = 0x11
- CSTATUS = 0x14
+ CSTATUS = 0xff
CSTOP = 0x13
CSTOPB = 0x400
CSUSP = 0x1a
@@ -253,149 +180,92 @@ const (
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
+ DIOCADDQUEUE = 0xc110445d
+ DIOCADDRULE = 0xcd604404
+ DIOCADDSTATE = 0xc1084425
+ DIOCCHANGERULE = 0xcd60441a
+ DIOCCLRIFFLAG = 0xc028445a
+ DIOCCLRSRCNODES = 0x20004455
+ DIOCCLRSTATES = 0xc0e04412
+ DIOCCLRSTATUS = 0xc0284416
+ DIOCGETLIMIT = 0xc0084427
+ DIOCGETQSTATS = 0xc1204460
+ DIOCGETQUEUE = 0xc110445f
+ DIOCGETQUEUES = 0xc110445e
+ DIOCGETRULE = 0xcd604407
+ DIOCGETRULES = 0xcd604406
+ DIOCGETRULESET = 0xc444443b
+ DIOCGETRULESETS = 0xc444443a
+ DIOCGETSRCNODES = 0xc0104454
+ DIOCGETSTATE = 0xc1084413
+ DIOCGETSTATES = 0xc0104419
+ DIOCGETSTATUS = 0xc1e84415
+ DIOCGETSYNFLWATS = 0xc0084463
+ DIOCGETTIMEOUT = 0xc008441e
+ DIOCIGETIFACES = 0xc0284457
+ DIOCKILLSRCNODES = 0xc080445b
+ DIOCKILLSTATES = 0xc0e04429
+ DIOCNATLOOK = 0xc0504417
+ DIOCOSFPADD = 0xc088444f
+ DIOCOSFPFLUSH = 0x2000444e
+ DIOCOSFPGET = 0xc0884450
+ DIOCRADDADDRS = 0xc4504443
+ DIOCRADDTABLES = 0xc450443d
+ DIOCRCLRADDRS = 0xc4504442
+ DIOCRCLRASTATS = 0xc4504448
+ DIOCRCLRTABLES = 0xc450443c
+ DIOCRCLRTSTATS = 0xc4504441
+ DIOCRDELADDRS = 0xc4504444
+ DIOCRDELTABLES = 0xc450443e
+ DIOCRGETADDRS = 0xc4504446
+ DIOCRGETASTATS = 0xc4504447
+ DIOCRGETTABLES = 0xc450443f
+ DIOCRGETTSTATS = 0xc4504440
+ DIOCRINADEFINE = 0xc450444d
+ DIOCRSETADDRS = 0xc4504445
+ DIOCRSETTFLAGS = 0xc450444a
+ DIOCRTSTADDRS = 0xc4504449
+ DIOCSETDEBUG = 0xc0044418
+ DIOCSETHOSTID = 0xc0044456
+ DIOCSETIFFLAG = 0xc0284459
+ DIOCSETLIMIT = 0xc0084428
+ DIOCSETREASS = 0xc004445c
+ DIOCSETSTATUSIF = 0xc0284414
+ DIOCSETSYNCOOKIES = 0xc0014462
+ DIOCSETSYNFLWATS = 0xc0084461
+ DIOCSETTIMEOUT = 0xc008441d
+ DIOCSTART = 0x20004401
+ DIOCSTOP = 0x20004402
+ DIOCXBEGIN = 0xc0104451
+ DIOCXCOMMIT = 0xc0104452
+ DIOCXROLLBACK = 0xc0104453
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_ENC = 0xd
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 = 0xf5
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
+ DLT_LOOP = 0xc
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_OPENFLOW = 0x10b
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_RAW = 0xe
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_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
+ DLT_USBPCAP = 0xf9
DLT_USER0 = 0x93
DLT_USER1 = 0x94
DLT_USER10 = 0x9d
@@ -412,9 +282,6 @@ const (
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
@@ -423,7 +290,6 @@ const (
DT_REG = 0x8
DT_SOCK = 0xc
DT_UNKNOWN = 0x0
- DT_WHT = 0xe
ECHO = 0x8
ECHOCTL = 0x40
ECHOE = 0x2
@@ -431,107 +297,260 @@ const (
ECHOKE = 0x1
ECHONL = 0x10
ECHOPRT = 0x20
+ EMT_TAGOVF = 0x1
+ EMUL_ENABLED = 0x1
+ EMUL_NATIVE = 0x2
+ ENDRUNDISC = 0x9
+ ETHERMIN = 0x2e
+ ETHERMTU = 0x5dc
+ ETHERTYPE_8023 = 0x4
+ ETHERTYPE_AARP = 0x80f3
+ ETHERTYPE_ACCTON = 0x8390
+ ETHERTYPE_AEONIC = 0x8036
+ ETHERTYPE_ALPHA = 0x814a
+ ETHERTYPE_AMBER = 0x6008
+ ETHERTYPE_AMOEBA = 0x8145
+ ETHERTYPE_AOE = 0x88a2
+ ETHERTYPE_APOLLO = 0x80f7
+ ETHERTYPE_APOLLODOMAIN = 0x8019
+ ETHERTYPE_APPLETALK = 0x809b
+ ETHERTYPE_APPLITEK = 0x80c7
+ ETHERTYPE_ARGONAUT = 0x803a
+ ETHERTYPE_ARP = 0x806
+ ETHERTYPE_AT = 0x809b
+ ETHERTYPE_ATALK = 0x809b
+ ETHERTYPE_ATOMIC = 0x86df
+ ETHERTYPE_ATT = 0x8069
+ ETHERTYPE_ATTSTANFORD = 0x8008
+ ETHERTYPE_AUTOPHON = 0x806a
+ ETHERTYPE_AXIS = 0x8856
+ ETHERTYPE_BCLOOP = 0x9003
+ ETHERTYPE_BOFL = 0x8102
+ ETHERTYPE_CABLETRON = 0x7034
+ ETHERTYPE_CHAOS = 0x804
+ ETHERTYPE_COMDESIGN = 0x806c
+ ETHERTYPE_COMPUGRAPHIC = 0x806d
+ ETHERTYPE_COUNTERPOINT = 0x8062
+ ETHERTYPE_CRONUS = 0x8004
+ ETHERTYPE_CRONUSVLN = 0x8003
+ ETHERTYPE_DCA = 0x1234
+ ETHERTYPE_DDE = 0x807b
+ ETHERTYPE_DEBNI = 0xaaaa
+ ETHERTYPE_DECAM = 0x8048
+ ETHERTYPE_DECCUST = 0x6006
+ ETHERTYPE_DECDIAG = 0x6005
+ ETHERTYPE_DECDNS = 0x803c
+ ETHERTYPE_DECDTS = 0x803e
+ ETHERTYPE_DECEXPER = 0x6000
+ ETHERTYPE_DECLAST = 0x8041
+ ETHERTYPE_DECLTM = 0x803f
+ ETHERTYPE_DECMUMPS = 0x6009
+ ETHERTYPE_DECNETBIOS = 0x8040
+ ETHERTYPE_DELTACON = 0x86de
+ ETHERTYPE_DIDDLE = 0x4321
+ ETHERTYPE_DLOG1 = 0x660
+ ETHERTYPE_DLOG2 = 0x661
+ ETHERTYPE_DN = 0x6003
+ ETHERTYPE_DOGFIGHT = 0x1989
+ ETHERTYPE_DSMD = 0x8039
+ ETHERTYPE_ECMA = 0x803
+ ETHERTYPE_ENCRYPT = 0x803d
+ ETHERTYPE_ES = 0x805d
+ ETHERTYPE_EXCELAN = 0x8010
+ ETHERTYPE_EXPERDATA = 0x8049
+ ETHERTYPE_FLIP = 0x8146
+ ETHERTYPE_FLOWCONTROL = 0x8808
+ ETHERTYPE_FRARP = 0x808
+ ETHERTYPE_GENDYN = 0x8068
+ ETHERTYPE_HAYES = 0x8130
+ ETHERTYPE_HIPPI_FP = 0x8180
+ ETHERTYPE_HITACHI = 0x8820
+ ETHERTYPE_HP = 0x8005
+ ETHERTYPE_IEEEPUP = 0xa00
+ ETHERTYPE_IEEEPUPAT = 0xa01
+ ETHERTYPE_IMLBL = 0x4c42
+ ETHERTYPE_IMLBLDIAG = 0x424c
+ ETHERTYPE_IP = 0x800
+ ETHERTYPE_IPAS = 0x876c
+ ETHERTYPE_IPV6 = 0x86dd
+ ETHERTYPE_IPX = 0x8137
+ ETHERTYPE_IPXNEW = 0x8037
+ ETHERTYPE_KALPANA = 0x8582
+ ETHERTYPE_LANBRIDGE = 0x8038
+ ETHERTYPE_LANPROBE = 0x8888
+ ETHERTYPE_LAT = 0x6004
+ ETHERTYPE_LBACK = 0x9000
+ ETHERTYPE_LITTLE = 0x8060
+ ETHERTYPE_LLDP = 0x88cc
+ ETHERTYPE_LOGICRAFT = 0x8148
+ ETHERTYPE_LOOPBACK = 0x9000
+ ETHERTYPE_MACSEC = 0x88e5
+ ETHERTYPE_MATRA = 0x807a
+ ETHERTYPE_MAX = 0xffff
+ ETHERTYPE_MERIT = 0x807c
+ ETHERTYPE_MICP = 0x873a
+ ETHERTYPE_MOPDL = 0x6001
+ ETHERTYPE_MOPRC = 0x6002
+ ETHERTYPE_MOTOROLA = 0x818d
+ ETHERTYPE_MPLS = 0x8847
+ ETHERTYPE_MPLS_MCAST = 0x8848
+ ETHERTYPE_MUMPS = 0x813f
+ ETHERTYPE_NBPCC = 0x3c04
+ ETHERTYPE_NBPCLAIM = 0x3c09
+ ETHERTYPE_NBPCLREQ = 0x3c05
+ ETHERTYPE_NBPCLRSP = 0x3c06
+ ETHERTYPE_NBPCREQ = 0x3c02
+ ETHERTYPE_NBPCRSP = 0x3c03
+ ETHERTYPE_NBPDG = 0x3c07
+ ETHERTYPE_NBPDGB = 0x3c08
+ ETHERTYPE_NBPDLTE = 0x3c0a
+ ETHERTYPE_NBPRAR = 0x3c0c
+ ETHERTYPE_NBPRAS = 0x3c0b
+ ETHERTYPE_NBPRST = 0x3c0d
+ ETHERTYPE_NBPSCD = 0x3c01
+ ETHERTYPE_NBPVCD = 0x3c00
+ ETHERTYPE_NBS = 0x802
+ ETHERTYPE_NCD = 0x8149
+ ETHERTYPE_NESTAR = 0x8006
+ ETHERTYPE_NETBEUI = 0x8191
+ ETHERTYPE_NOVELL = 0x8138
+ ETHERTYPE_NS = 0x600
+ ETHERTYPE_NSAT = 0x601
+ ETHERTYPE_NSCOMPAT = 0x807
+ ETHERTYPE_NTRAILER = 0x10
+ ETHERTYPE_OS9 = 0x7007
+ ETHERTYPE_OS9NET = 0x7009
+ ETHERTYPE_PACER = 0x80c6
+ ETHERTYPE_PAE = 0x888e
+ ETHERTYPE_PBB = 0x88e7
+ ETHERTYPE_PCS = 0x4242
+ ETHERTYPE_PLANNING = 0x8044
+ ETHERTYPE_PPP = 0x880b
+ ETHERTYPE_PPPOE = 0x8864
+ ETHERTYPE_PPPOEDISC = 0x8863
+ ETHERTYPE_PRIMENTS = 0x7031
+ ETHERTYPE_PUP = 0x200
+ ETHERTYPE_PUPAT = 0x200
+ ETHERTYPE_QINQ = 0x88a8
+ ETHERTYPE_RACAL = 0x7030
+ ETHERTYPE_RATIONAL = 0x8150
+ ETHERTYPE_RAWFR = 0x6559
+ ETHERTYPE_RCL = 0x1995
+ ETHERTYPE_RDP = 0x8739
+ ETHERTYPE_RETIX = 0x80f2
+ ETHERTYPE_REVARP = 0x8035
+ ETHERTYPE_SCA = 0x6007
+ ETHERTYPE_SECTRA = 0x86db
+ ETHERTYPE_SECUREDATA = 0x876d
+ ETHERTYPE_SGITW = 0x817e
+ ETHERTYPE_SG_BOUNCE = 0x8016
+ ETHERTYPE_SG_DIAG = 0x8013
+ ETHERTYPE_SG_NETGAMES = 0x8014
+ ETHERTYPE_SG_RESV = 0x8015
+ ETHERTYPE_SIMNET = 0x5208
+ ETHERTYPE_SLOW = 0x8809
+ ETHERTYPE_SNA = 0x80d5
+ ETHERTYPE_SNMP = 0x814c
+ ETHERTYPE_SONIX = 0xfaf5
+ ETHERTYPE_SPIDER = 0x809f
+ ETHERTYPE_SPRITE = 0x500
+ ETHERTYPE_STP = 0x8181
+ ETHERTYPE_TALARIS = 0x812b
+ ETHERTYPE_TALARISMC = 0x852b
+ ETHERTYPE_TCPCOMP = 0x876b
+ ETHERTYPE_TCPSM = 0x9002
+ ETHERTYPE_TEC = 0x814f
+ ETHERTYPE_TIGAN = 0x802f
+ ETHERTYPE_TRAIL = 0x1000
+ ETHERTYPE_TRANSETHER = 0x6558
+ ETHERTYPE_TYMSHARE = 0x802e
+ ETHERTYPE_UBBST = 0x7005
+ ETHERTYPE_UBDEBUG = 0x900
+ ETHERTYPE_UBDIAGLOOP = 0x7002
+ ETHERTYPE_UBDL = 0x7000
+ ETHERTYPE_UBNIU = 0x7001
+ ETHERTYPE_UBNMC = 0x7003
+ ETHERTYPE_VALID = 0x1600
+ ETHERTYPE_VARIAN = 0x80dd
+ ETHERTYPE_VAXELN = 0x803b
+ ETHERTYPE_VEECO = 0x8067
+ ETHERTYPE_VEXP = 0x805b
+ ETHERTYPE_VGLAB = 0x8131
+ ETHERTYPE_VINES = 0xbad
+ ETHERTYPE_VINESECHO = 0xbaf
+ ETHERTYPE_VINESLOOP = 0xbae
+ ETHERTYPE_VITAL = 0xff00
+ ETHERTYPE_VLAN = 0x8100
+ ETHERTYPE_VLTLMAN = 0x8080
+ ETHERTYPE_VPROD = 0x805c
+ ETHERTYPE_VURESERVED = 0x8147
+ ETHERTYPE_WATERLOO = 0x8130
+ ETHERTYPE_WELLFLEET = 0x8103
+ ETHERTYPE_X25 = 0x805
+ ETHERTYPE_X75 = 0x801
+ ETHERTYPE_XNSSM = 0x9001
+ ETHERTYPE_XTP = 0x817d
+ ETHER_ADDR_LEN = 0x6
+ ETHER_ALIGN = 0x2
+ ETHER_CRC_LEN = 0x4
+ ETHER_CRC_POLY_BE = 0x4c11db6
+ ETHER_CRC_POLY_LE = 0xedb88320
+ ETHER_HDR_LEN = 0xe
+ ETHER_MAX_DIX_LEN = 0x600
+ ETHER_MAX_HARDMTU_LEN = 0xff9b
+ ETHER_MAX_LEN = 0x5ee
+ ETHER_MIN_LEN = 0x40
+ ETHER_TYPE_LEN = 0x2
+ ETHER_VLAN_ENCAP_LEN = 0x4
EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0xf
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
+ EVFILT_DEVICE = -0x8
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xf
- EVFILT_THREADMARKER = 0xf
+ EVFILT_SYSCOUNT = 0x8
EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVL_ENCAPLEN = 0x4
+ EVL_PRIO_BITS = 0xd
+ EVL_PRIO_MAX = 0x7
+ EVL_VLID_MASK = 0xfff
+ EVL_VLID_MAX = 0xffe
+ EVL_VLID_MIN = 0x1
+ EVL_VLID_NULL = 0x0
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
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_RETURN = 0x61
- 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_DUPFD_CLOEXEC = 0xa
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_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
+ F_ISATTY = 0xb
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_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
@@ -539,9 +558,11 @@ const (
ICMP6_FILTER = 0x12
ICRNL = 0x100
IEXTEN = 0x400
+ IFAN_ARRIVAL = 0x0
+ IFAN_DEPARTURE = 0x1
IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x8e52
IFF_DEBUG = 0x4
IFF_LINK0 = 0x1000
IFF_LINK1 = 0x2000
@@ -549,80 +570,236 @@ const (
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_STATICARP = 0x20
IFF_UP = 0x1
IFNAMSIZ = 0x10
IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BLUETOOTH = 0xf8
IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
+ IFT_BSC = 0x53
+ IFT_CARP = 0xf7
+ IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DUMMY = 0xf1
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ECONET = 0xce
IFT_ENC = 0xf4
IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
IFT_ETHER = 0x6
- IFT_FAITH = 0x38
+ IFT_FAITH = 0xf3
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INFINIBAND = 0xc7
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
IFT_L2VLAN = 0x87
+ IFT_L3IPVLAN = 0x88
+ IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LINEGROUP = 0xd2
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
+ IFT_MBIM = 0xfa
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
- IFT_PDP = 0xff
IFT_PFLOG = 0xf5
+ IFT_PFLOW = 0xf9
IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
+ IFT_PLC = 0xae
+ IFT_PON155 = 0xcf
+ IFT_PON622 = 0xd0
+ IFT_POS = 0xab
IFT_PPP = 0x17
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPATM = 0xc5
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPVIRTUAL = 0x35
+ IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf2
+ IFT_Q2931 = 0xc9
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
+ IFT_SIPSIG = 0xcc
+ IFT_SIPTG = 0xcb
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
- IFT_STF = 0x39
IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TELINK = 0xc8
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VIRTUALTG = 0xca
+ IFT_VOICEDID = 0xd5
+ IFT_VOICEEM = 0x64
+ IFT_VOICEEMFGD = 0xd3
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFGDEANA = 0xd4
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERCABLE = 0xc6
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IGNBRK = 0x1
@@ -645,239 +822,155 @@ const (
IN_CLASSD_HOST = 0xfffffff
IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
+ IN_RFC3021_HOST = 0x1
+ IN_RFC3021_NET = 0xfffffffe
+ IN_RFC3021_NSHIFT = 0x1f
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_CARP = 0x70
+ IPPROTO_DIVERT = 0x102
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_MAXID = 0x103
+ IPPROTO_MOBILE = 0x37
+ IPPROTO_MPLS = 0x89
IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
+ IPPROTO_PFSYNC = 0xf0
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_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
+ IPPROTO_UDPLITE = 0x88
+ IPV6_AUTH_LEVEL = 0x35
+ IPV6_AUTOFLOWLABEL = 0x3b
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_ESP_NETWORK_LEVEL = 0x37
+ IPV6_ESP_TRANS_LEVEL = 0x36
IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x300
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
+ IPV6_FRAGTTL = 0x78
IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPCOMP_LEVEL = 0x3c
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_MINHOPCOUNT = 0x41
IPV6_MMTU = 0x500
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_OPTIONS = 0x1
+ IPV6_PATHMTU = 0x2c
+ IPV6_PIPEX = 0x3f
+ IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
IPV6_PORTRANGE_DEFAULT = 0x0
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x24
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x39
+ IPV6_RTABLE = 0x1021
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x23
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
+ IPV6_TCLASS = 0x3d
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_AUTH_LEVEL = 0x14
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
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_ESP_NETWORK_LEVEL = 0x16
+ IP_ESP_TRANS_LEVEL = 0x15
IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
+ IP_IPCOMP_LEVEL = 0x1d
+ IP_IPDEFTTL = 0x25
+ IP_IPSECFLOWINFO = 0x24
+ IP_IPSEC_LOCAL_AUTH = 0x1b
+ IP_IPSEC_LOCAL_CRED = 0x19
+ IP_IPSEC_LOCAL_ID = 0x17
+ IP_IPSEC_REMOTE_AUTH = 0x1c
+ IP_IPSEC_REMOTE_CRED = 0x1a
+ IP_IPSEC_REMOTE_ID = 0x18
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_MINTTL = 0x20
+ IP_MIN_MEMBERSHIPS = 0xf
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_PIPEX = 0x22
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
IP_PORTRANGE_LOW = 0x2
IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
+ IP_RECVDSTPORT = 0x21
+ IP_RECVIF = 0x1e
IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x1b
- IP_RECVTTL = 0x18
+ IP_RECVRTABLE = 0x23
+ IP_RECVTTL = 0x1f
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_RTABLE = 0x1021
+ IP_SENDSRCADDR = 0x7
IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
ISIG = 0x80
ISTRIP = 0x20
- IUTF8 = 0x4000
+ IUCLC = 0x1000
IXANY = 0x800
IXOFF = 0x400
IXON = 0x200
@@ -885,188 +978,140 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LCNT_OVERLOAD_FLUSH = 0x6
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_FREE = 0x6
MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
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_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
+ MAP_INHERIT_COPY = 0x1
+ MAP_INHERIT_NONE = 0x2
+ MAP_INHERIT_SHARE = 0x0
+ MAP_INHERIT_ZERO = 0x3
+ MAP_NOEXTEND = 0x0
+ MAP_NORESERVE = 0x0
MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESILIENT_CODESIGN = 0x2000
- MAP_RESILIENT_MEDIA = 0x4000
+ MAP_RENAME = 0x0
MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 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_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
MNT_FORCE = 0x80000
- MNT_IGNORE_OWNERSHIP = 0x200000
- MNT_JOURNALED = 0x800000
+ MNT_LAZY = 0x3
MNT_LOCAL = 0x1000
- MNT_MULTILABEL = 0x4000000
- MNT_NOATIME = 0x10000000
- MNT_NOBLOCK = 0x20000
+ MNT_NOATIME = 0x8000
MNT_NODEV = 0x10
MNT_NOEXEC = 0x4
+ MNT_NOPERM = 0x20
MNT_NOSUID = 0x8
- MNT_NOUSERXATTR = 0x1000000
MNT_NOWAIT = 0x2
- MNT_QUARANTINE = 0x400
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_STALLED = 0x100000
+ MNT_SWAPPABLE = 0x200000
MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0x17f0f5ff
+ MNT_VISFLAGMASK = 0x400ffff
MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
+ MSG_BCAST = 0x100
+ MSG_CMSG_CLOEXEC = 0x800
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_MCAST = 0x200
+ MSG_NOSIGNAL = 0x400
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
+ MS_INVALIDATE = 0x4
+ MS_SYNC = 0x2
NAME_MAX = 0xff
NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
+ NET_RT_IFNAMES = 0x6
+ NET_RT_MAXID = 0x7
+ NET_RT_STATS = 0x4
+ NET_RT_TABLE = 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_CHANGE = 0x1
NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
NOTE_DELETE = 0x1
+ NOTE_EOF = 0x2
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_MACH_CONTINUOUS_TIME = 0x80
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = -0x100000
+ NOTE_PCTRLMASK = 0xf0000000
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_TRUNCATE = 0x80
NOTE_WRITE = 0x2
OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
+ OLCUC = 0x20
ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
+ ONLRET = 0x80
+ ONOCR = 0x40
ONOEOT = 0x8
OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3
- O_ALERT = 0x20000000
O_APPEND = 0x8
O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
+ O_CLOEXEC = 0x10000
O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DP_GETRAWUNENCRYPTED = 0x2
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
+ O_DIRECTORY = 0x20000
+ O_DSYNC = 0x80
O_EXCL = 0x800
O_EXLOCK = 0x20
O_FSYNC = 0x80
O_NDELAY = 0x4
- O_NOCTTY = 0x20000
+ O_NOCTTY = 0x8000
O_NOFOLLOW = 0x100
O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
O_RDONLY = 0x0
O_RDWR = 0x2
+ O_RSYNC = 0x80
O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
O_SYNC = 0x80
O_TRUNC = 0x400
O_WRONLY = 0x1
@@ -1074,6 +1119,7 @@ const (
PARMRK = 0x8
PARODD = 0x2000
PENDIN = 0x20000000
+ PF_FLUSH = 0x1
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@@ -1081,28 +1127,8 @@ const (
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
@@ -1112,67 +1138,80 @@ const (
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
+ RTAX_BFD = 0xb
RTAX_BRD = 0x7
+ RTAX_DNS = 0xc
RTAX_DST = 0x0
RTAX_GATEWAY = 0x1
RTAX_GENMASK = 0x3
RTAX_IFA = 0x5
RTAX_IFP = 0x4
- RTAX_MAX = 0x8
+ RTAX_LABEL = 0xa
+ RTAX_MAX = 0xf
RTAX_NETMASK = 0x2
+ RTAX_SEARCH = 0xe
+ RTAX_SRC = 0x8
+ RTAX_SRCMASK = 0x9
+ RTAX_STATIC = 0xd
RTA_AUTHOR = 0x40
+ RTA_BFD = 0x800
RTA_BRD = 0x80
+ RTA_DNS = 0x1000
RTA_DST = 0x1
RTA_GATEWAY = 0x2
RTA_GENMASK = 0x8
RTA_IFA = 0x20
RTA_IFP = 0x10
+ RTA_LABEL = 0x400
RTA_NETMASK = 0x4
+ RTA_SEARCH = 0x4000
+ RTA_SRC = 0x100
+ RTA_SRCMASK = 0x200
+ RTA_STATIC = 0x2000
+ RTF_ANNOUNCE = 0x4000
+ RTF_BFD = 0x1000000
RTF_BLACKHOLE = 0x1000
RTF_BROADCAST = 0x400000
+ RTF_CACHED = 0x20000
+ RTF_CLONED = 0x10000
RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
+ RTF_CONNECTED = 0x800000
RTF_DONE = 0x40
RTF_DYNAMIC = 0x10
+ RTF_FMASK = 0x110fc08
RTF_GATEWAY = 0x2
RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
RTF_LLINFO = 0x400
RTF_LOCAL = 0x200000
RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
+ RTF_MPATH = 0x40000
+ RTF_MPLS = 0x100000
+ RTF_MULTICAST = 0x200
+ RTF_PERMANENT_ARP = 0x2000
RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
+ RTF_PROTO3 = 0x2000
RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
RTF_STATIC = 0x800
RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
+ RTF_USETRAILERS = 0x8000
+ RTM_80211INFO = 0x15
RTM_ADD = 0x1
+ RTM_BFD = 0x12
RTM_CHANGE = 0x3
+ RTM_CHGADDRATTR = 0x14
RTM_DELADDR = 0xd
RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
+ RTM_DESYNC = 0x10
RTM_GET = 0x4
- RTM_GET2 = 0x14
+ RTM_IFANNOUNCE = 0xf
RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
+ RTM_INVALIDATE = 0x11
RTM_LOSING = 0x5
+ RTM_MAXSIZE = 0x800
RTM_MISS = 0x7
RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
+ RTM_PROPOSAL = 0x13
RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240
@@ -1185,83 +1224,169 @@ const (
RTV_RTTVAR = 0x80
RTV_SPIPE = 0x10
RTV_SSTHRESH = 0x20
+ RT_TABLEID_BITS = 0x8
+ RT_TABLEID_MASK = 0xff
+ RT_TABLEID_MAX = 0xff
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
+ RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
+ SCM_TIMESTAMP = 0x4
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931
SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
+ SIOCAIFGROUP = 0x80286987
SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
+ SIOCBRDGADD = 0x8060693c
+ SIOCBRDGADDL = 0x80606949
+ SIOCBRDGADDS = 0x80606941
+ SIOCBRDGARL = 0x808c694d
+ SIOCBRDGDADDR = 0x81286947
+ SIOCBRDGDEL = 0x8060693d
+ SIOCBRDGDELS = 0x80606942
+ SIOCBRDGFLUSH = 0x80606948
+ SIOCBRDGFRL = 0x808c694e
+ SIOCBRDGGCACHE = 0xc0186941
+ SIOCBRDGGFD = 0xc0186952
+ SIOCBRDGGHT = 0xc0186951
+ SIOCBRDGGIFFLGS = 0xc060693e
+ SIOCBRDGGMA = 0xc0186953
+ SIOCBRDGGPARAM = 0xc0406958
+ SIOCBRDGGPRI = 0xc0186950
+ SIOCBRDGGRL = 0xc030694f
+ SIOCBRDGGTO = 0xc0186946
+ SIOCBRDGIFS = 0xc0606942
+ SIOCBRDGRTS = 0xc0206943
+ SIOCBRDGSADDR = 0xc1286944
+ SIOCBRDGSCACHE = 0x80186940
+ SIOCBRDGSFD = 0x80186952
+ SIOCBRDGSHT = 0x80186951
+ SIOCBRDGSIFCOST = 0x80606955
+ SIOCBRDGSIFFLGS = 0x8060693f
+ SIOCBRDGSIFPRIO = 0x80606954
+ SIOCBRDGSIFPROT = 0x8060694a
+ SIOCBRDGSMA = 0x80186953
+ SIOCBRDGSPRI = 0x80186950
+ SIOCBRDGSPROTO = 0x8018695a
+ SIOCBRDGSTO = 0x80186945
+ SIOCBRDGSTXHC = 0x80186959
+ SIOCDELLABEL = 0x80206997
SIOCDELMULTI = 0x80206932
SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
+ SIOCDIFGROUP = 0x80286989
+ SIOCDIFPARENT = 0x802069b4
+ SIOCDIFPHYADDR = 0x80206949
+ SIOCDPWE3NEIGHBOR = 0x802069de
+ SIOCDVNETID = 0x802069af
+ SIOCGETKALIVE = 0xc01869a4
+ SIOCGETLABEL = 0x8020699a
+ SIOCGETMPWCFG = 0xc02069ae
+ SIOCGETPFLOW = 0xc02069fe
+ SIOCGETPFSYNC = 0xc02069f8
+ SIOCGETSGCNT = 0xc0207534
+ SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDEVMTU = 0xc0206944
+ SIOCGIFCONF = 0xc0106924
+ SIOCGIFDATA = 0xc020691b
+ SIOCGIFDESCR = 0xc0206981
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFGATTR = 0xc028698b
SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc0286938
+ SIOCGIFGLIST = 0xc028698d
+ SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
+ SIOCGIFLLPRIO = 0xc02069b6
+ SIOCGIFMEDIA = 0xc0406938
SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
+ SIOCGIFMTU = 0xc020697e
SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLOWAT = 0x40047303
+ SIOCGIFPAIR = 0xc02069b1
+ SIOCGIFPARENT = 0xc02069b3
+ SIOCGIFPRIORITY = 0xc020699c
+ SIOCGIFRDOMAIN = 0xc02069a0
+ SIOCGIFRTLABEL = 0xc0206983
+ SIOCGIFRXR = 0x802069aa
+ SIOCGIFSFFPAGE = 0xc1126939
+ SIOCGIFXFLAGS = 0xc020699e
+ SIOCGLIFPHYADDR = 0xc218694b
+ SIOCGLIFPHYDF = 0xc02069c2
+ SIOCGLIFPHYECN = 0xc02069c8
+ SIOCGLIFPHYRTABLE = 0xc02069a2
+ SIOCGLIFPHYTTL = 0xc02069a9
SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
+ SIOCGPWE3 = 0xc0206998
+ SIOCGPWE3CTRLWORD = 0xc02069dc
+ SIOCGPWE3FAT = 0xc02069dd
+ SIOCGPWE3NEIGHBOR = 0xc21869de
+ SIOCGRXHPRIO = 0xc02069db
+ SIOCGSPPPPARAMS = 0xc0206994
+ SIOCGTXHPRIO = 0xc02069c6
+ SIOCGUMBINFO = 0xc02069be
+ SIOCGUMBPARAM = 0xc02069c0
+ SIOCGVH = 0xc02069f6
+ SIOCGVNETFLOWID = 0xc02069c4
+ SIOCGVNETID = 0xc02069a7
+ SIOCIFAFATTACH = 0x801169ab
+ SIOCIFAFDETACH = 0x801169ac
+ SIOCIFCREATE = 0x8020697a
SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6981
- SIOCRSLVMULTI = 0xc008693b
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
+ SIOCIFGCLONERS = 0xc0106978
+ SIOCSETKALIVE = 0x801869a3
+ SIOCSETLABEL = 0x80206999
+ SIOCSETMPWCFG = 0x802069ad
+ SIOCSETPFLOW = 0x802069fd
+ SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
+ SIOCSIFDESCR = 0x80206980
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGATTR = 0x8028698c
SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
+ SIOCSIFLLADDR = 0x8020691f
+ SIOCSIFLLPRIO = 0x802069b5
SIOCSIFMEDIA = 0xc0206937
SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
+ SIOCSIFMTU = 0x8020697f
SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
+ SIOCSIFPAIR = 0x802069b0
+ SIOCSIFPARENT = 0x802069b2
+ SIOCSIFPRIORITY = 0x8020699b
+ SIOCSIFRDOMAIN = 0x8020699f
+ SIOCSIFRTLABEL = 0x80206982
+ SIOCSIFXFLAGS = 0x8020699d
+ SIOCSLIFPHYADDR = 0x8218694a
+ SIOCSLIFPHYDF = 0x802069c1
+ SIOCSLIFPHYECN = 0x802069c7
+ SIOCSLIFPHYRTABLE = 0x802069a1
+ SIOCSLIFPHYTTL = 0x802069a8
SIOCSPGRP = 0x80047308
+ SIOCSPWE3CTRLWORD = 0x802069dc
+ SIOCSPWE3FAT = 0x802069dd
+ SIOCSPWE3NEIGHBOR = 0x821869de
+ SIOCSRXHPRIO = 0x802069db
+ SIOCSSPPPPARAMS = 0x80206993
+ SIOCSTXHPRIO = 0x802069c5
+ SIOCSUMBPARAM = 0x802069bf
+ SIOCSVH = 0xc02069f5
+ SIOCSVNETFLOWID = 0x802069c3
+ SIOCSVNETID = 0x802069a6
+ SIOCSWGDPID = 0xc018695b
+ SIOCSWGMAXFLOW = 0xc0186960
+ SIOCSWGMAXGROUP = 0xc018695d
+ SIOCSWSDPID = 0x8018695c
+ SIOCSWSPORTNO = 0xc060695f
+ SOCK_CLOEXEC = 0x8000
SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
+ SOCK_DNS = 0x1000
+ SOCK_NONBLOCK = 0x4000
SOCK_RAW = 0x3
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
@@ -1269,44 +1394,33 @@ const (
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
+ SO_BINDANY = 0x1000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1024
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_NETPROC = 0x1020
SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
+ SO_PEERCRED = 0x1022
+ SO_PROTOCOL = 0x1025
SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
+ SO_RTABLE = 0x1021
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
+ SO_SPLICE = 0x1023
+ SO_TIMESTAMP = 0x800
SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
+ SO_ZEROIZE = 0x2000
+ S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
S_IFCHR = 0x2000
@@ -1316,7 +1430,6 @@ const (
S_IFMT = 0xf000
S_IFREG = 0x8000
S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
S_IREAD = 0x100
S_IRGRP = 0x20
S_IROTH = 0x4
@@ -1335,11 +1448,6 @@ const (
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
@@ -1347,52 +1455,46 @@ const (
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_MAXBURST = 0x4
TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
+ TCP_MAX_SACK = 0x3
TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
+ TCP_MD5SIG = 0x4
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
+ TCP_NOPUSH = 0x10
+ TCP_SACKHOLE_LIMIT = 0x80
+ TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
+ TIOCCHKVERAUTH = 0x2000741e
+ TIOCCLRVERAUTH = 0x2000741d
TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40087458
TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
TIOCEXCL = 0x2000740d
TIOCEXT = 0x80047460
+ TIOCFLAG_CLOCAL = 0x2
+ TIOCFLAG_CRTSCTS = 0x4
+ TIOCFLAG_MDMBUF = 0x8
+ TIOCFLAG_PPS = 0x10
+ TIOCFLAG_SOFTCAR = 0x1
TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
TIOCGETA = 0x402c7413
TIOCGETD = 0x4004741a
+ TIOCGFLAGS = 0x4004745d
TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047463
+ TIOCGTSTAMP = 0x4010745b
TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
TIOCMBIC = 0x8004746b
TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
+ TIOCMODG = 0x4004746a
+ TIOCMODS = 0x8004746d
TIOCMSET = 0x8004746d
TIOCM_CAR = 0x40
TIOCM_CD = 0x40
@@ -1417,29 +1519,29 @@ const (
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 = 0x802c7414
TIOCSETAF = 0x802c7416
TIOCSETAW = 0x802c7415
TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
+ TIOCSETVERAUTH = 0x8004741c
+ TIOCSFLAGS = 0x8004745c
+ TIOCSIG = 0x8004745f
TIOCSPGRP = 0x80047476
TIOCSTART = 0x2000746e
TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
TIOCSTOP = 0x2000746f
+ TIOCSTSTAMP = 0x8008745a
TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
TIOCUCNTL = 0x80047466
+ TIOCUCNTL_CBRK = 0x7a
+ TIOCUCNTL_SBRK = 0x7b
TOSTOP = 0x400000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x1
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
@@ -1450,36 +1552,33 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
+ VM_ANONMIN = 0x7
VM_LOADAVG = 0x2
- VM_MACHFACTOR = 0x4
- VM_MAXID = 0x6
+ VM_MALLOC_CONF = 0xc
+ VM_MAXID = 0xd
+ VM_MAXSLP = 0xa
VM_METER = 0x1
- VM_SWAPUSAGE = 0x5
+ VM_NKMEMPAGES = 0x6
+ VM_PSSTRINGS = 0x3
+ VM_SWAPENCRYPT = 0x5
+ VM_USPACE = 0xb
+ VM_UVMEXP = 0x4
+ VM_VNODEMIN = 0x9
+ VM_VTEXTMIN = 0x8
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc
VSTATUS = 0x12
VSTOP = 0xd
VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
VTIME = 0x11
VWERASE = 0x4
- WCONTINUED = 0x10
+ WALTSIG = 0x4
+ WCONTINUED = 0x8
WCOREFLAG = 0x80
- WEXITED = 0x4
WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x20
- WSTOPPED = 0x8
WUNTRACED = 0x2
- XATTR_CREATE = 0x2
- XATTR_NODEFAULT = 0x10
- XATTR_NOFOLLOW = 0x1
- XATTR_NOSECURITY = 0x8
- XATTR_REPLACE = 0x4
- XATTR_SHOWCOMPRESSION = 0x20
+ XCASE = 0x1000000
)
// Errors
@@ -1492,21 +1591,17 @@ const (
EAGAIN = syscall.Errno(0x23)
EALREADY = syscall.Errno(0x25)
EAUTH = syscall.Errno(0x50)
- EBADARCH = syscall.Errno(0x56)
- EBADEXEC = syscall.Errno(0x55)
EBADF = syscall.Errno(0x9)
- EBADMACHO = syscall.Errno(0x58)
- EBADMSG = syscall.Errno(0x5e)
+ EBADMSG = syscall.Errno(0x5c)
EBADRPC = syscall.Errno(0x48)
EBUSY = syscall.Errno(0x10)
- ECANCELED = syscall.Errno(0x59)
+ ECANCELED = syscall.Errno(0x58)
ECHILD = syscall.Errno(0xa)
ECONNABORTED = syscall.Errno(0x35)
ECONNREFUSED = syscall.Errno(0x3d)
ECONNRESET = syscall.Errno(0x36)
EDEADLK = syscall.Errno(0xb)
EDESTADDRREQ = syscall.Errno(0x27)
- EDEVERR = syscall.Errno(0x53)
EDOM = syscall.Errno(0x21)
EDQUOT = syscall.Errno(0x45)
EEXIST = syscall.Errno(0x11)
@@ -1515,54 +1610,51 @@ const (
EFTYPE = syscall.Errno(0x4f)
EHOSTDOWN = syscall.Errno(0x40)
EHOSTUNREACH = syscall.Errno(0x41)
- EIDRM = syscall.Errno(0x5a)
- EILSEQ = syscall.Errno(0x5c)
+ EIDRM = syscall.Errno(0x59)
+ EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x24)
EINTR = syscall.Errno(0x4)
EINVAL = syscall.Errno(0x16)
EIO = syscall.Errno(0x5)
+ EIPSEC = syscall.Errno(0x52)
EISCONN = syscall.Errno(0x38)
EISDIR = syscall.Errno(0x15)
- ELAST = syscall.Errno(0x6a)
+ ELAST = syscall.Errno(0x5f)
ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x56)
EMFILE = syscall.Errno(0x18)
EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x28)
- EMULTIHOP = syscall.Errno(0x5f)
ENAMETOOLONG = syscall.Errno(0x3f)
ENEEDAUTH = syscall.Errno(0x51)
ENETDOWN = syscall.Errno(0x32)
ENETRESET = syscall.Errno(0x34)
ENETUNREACH = syscall.Errno(0x33)
ENFILE = syscall.Errno(0x17)
- ENOATTR = syscall.Errno(0x5d)
+ ENOATTR = syscall.Errno(0x53)
ENOBUFS = syscall.Errno(0x37)
- ENODATA = syscall.Errno(0x60)
ENODEV = syscall.Errno(0x13)
ENOENT = syscall.Errno(0x2)
ENOEXEC = syscall.Errno(0x8)
ENOLCK = syscall.Errno(0x4d)
- ENOLINK = syscall.Errno(0x61)
+ ENOMEDIUM = syscall.Errno(0x55)
ENOMEM = syscall.Errno(0xc)
- ENOMSG = syscall.Errno(0x5b)
- ENOPOLICY = syscall.Errno(0x67)
+ ENOMSG = syscall.Errno(0x5a)
ENOPROTOOPT = syscall.Errno(0x2a)
ENOSPC = syscall.Errno(0x1c)
- ENOSR = syscall.Errno(0x62)
- ENOSTR = syscall.Errno(0x63)
ENOSYS = syscall.Errno(0x4e)
ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x39)
ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x42)
- ENOTRECOVERABLE = syscall.Errno(0x68)
+ ENOTRECOVERABLE = syscall.Errno(0x5d)
ENOTSOCK = syscall.Errno(0x26)
- ENOTSUP = syscall.Errno(0x2d)
+ ENOTSUP = syscall.Errno(0x5b)
ENOTTY = syscall.Errno(0x19)
ENXIO = syscall.Errno(0x6)
- EOPNOTSUPP = syscall.Errno(0x66)
- EOVERFLOW = syscall.Errno(0x54)
- EOWNERDEAD = syscall.Errno(0x69)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x57)
+ EOWNERDEAD = syscall.Errno(0x5e)
EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x2e)
EPIPE = syscall.Errno(0x20)
@@ -1570,22 +1662,18 @@ const (
EPROCUNAVAIL = syscall.Errno(0x4c)
EPROGMISMATCH = syscall.Errno(0x4b)
EPROGUNAVAIL = syscall.Errno(0x4a)
- EPROTO = syscall.Errno(0x64)
+ EPROTO = syscall.Errno(0x5f)
EPROTONOSUPPORT = syscall.Errno(0x2b)
EPROTOTYPE = syscall.Errno(0x29)
- EPWROFF = syscall.Errno(0x52)
- EQFULL = syscall.Errno(0x6a)
ERANGE = syscall.Errno(0x22)
EREMOTE = syscall.Errno(0x47)
EROFS = syscall.Errno(0x1e)
ERPCMISMATCH = syscall.Errno(0x49)
- ESHLIBVERS = syscall.Errno(0x57)
ESHUTDOWN = syscall.Errno(0x3a)
ESOCKTNOSUPPORT = syscall.Errno(0x2c)
ESPIPE = syscall.Errno(0x1d)
ESRCH = syscall.Errno(0x3)
ESTALE = syscall.Errno(0x46)
- ETIME = syscall.Errno(0x65)
ETIMEDOUT = syscall.Errno(0x3c)
ETOOMANYREFS = syscall.Errno(0x3b)
ETXTBSY = syscall.Errno(0x1a)
@@ -1617,6 +1705,7 @@ const (
SIGSTOP = syscall.Signal(0x11)
SIGSYS = syscall.Signal(0xc)
SIGTERM = syscall.Signal(0xf)
+ SIGTHR = syscall.Signal(0x20)
SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x12)
SIGTTIN = syscall.Signal(0x15)
@@ -1651,7 +1740,7 @@ var errorList = [...]struct {
{13, "EACCES", "permission denied"},
{14, "EFAULT", "bad address"},
{15, "ENOTBLK", "block device required"},
- {16, "EBUSY", "resource busy"},
+ {16, "EBUSY", "device busy"},
{17, "EEXIST", "file exists"},
{18, "EXDEV", "cross-device link"},
{19, "ENODEV", "operation not supported by device"},
@@ -1680,7 +1769,7 @@ var errorList = [...]struct {
{42, "ENOPROTOOPT", "protocol not available"},
{43, "EPROTONOSUPPORT", "protocol not supported"},
{44, "ESOCKTNOSUPPORT", "socket type not supported"},
- {45, "ENOTSUP", "operation not supported"},
+ {45, "EOPNOTSUPP", "operation not supported"},
{46, "EPFNOSUPPORT", "protocol family not supported"},
{47, "EAFNOSUPPORT", "address family not supported by protocol family"},
{48, "EADDRINUSE", "address already in use"},
@@ -1704,12 +1793,12 @@ var errorList = [...]struct {
{66, "ENOTEMPTY", "directory not empty"},
{67, "EPROCLIM", "too many processes"},
{68, "EUSERS", "too many users"},
- {69, "EDQUOT", "disc quota exceeded"},
+ {69, "EDQUOT", "disk quota exceeded"},
{70, "ESTALE", "stale NFS file handle"},
{71, "EREMOTE", "too many levels of remote in path"},
{72, "EBADRPC", "RPC struct is bad"},
{73, "ERPCMISMATCH", "RPC version wrong"},
- {74, "EPROGUNAVAIL", "RPC prog. not avail"},
+ {74, "EPROGUNAVAIL", "RPC program not available"},
{75, "EPROGMISMATCH", "program version wrong"},
{76, "EPROCUNAVAIL", "bad procedure for program"},
{77, "ENOLCK", "no locks available"},
@@ -1717,31 +1806,20 @@ var errorList = [...]struct {
{79, "EFTYPE", "inappropriate file type or format"},
{80, "EAUTH", "authentication error"},
{81, "ENEEDAUTH", "need authenticator"},
- {82, "EPWROFF", "device power is off"},
- {83, "EDEVERR", "device error"},
- {84, "EOVERFLOW", "value too large to be stored in data type"},
- {85, "EBADEXEC", "bad executable (or shared library)"},
- {86, "EBADARCH", "bad CPU type in executable"},
- {87, "ESHLIBVERS", "shared library version mismatch"},
- {88, "EBADMACHO", "malformed Mach-o file"},
- {89, "ECANCELED", "operation canceled"},
- {90, "EIDRM", "identifier removed"},
- {91, "ENOMSG", "no message of desired type"},
- {92, "EILSEQ", "illegal byte sequence"},
- {93, "ENOATTR", "attribute not found"},
- {94, "EBADMSG", "bad message"},
- {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
- {96, "ENODATA", "no message available on STREAM"},
- {97, "ENOLINK", "ENOLINK (Reserved)"},
- {98, "ENOSR", "no STREAM resources"},
- {99, "ENOSTR", "not a STREAM"},
- {100, "EPROTO", "protocol error"},
- {101, "ETIME", "STREAM ioctl timeout"},
- {102, "EOPNOTSUPP", "operation not supported on socket"},
- {103, "ENOPOLICY", "policy not found"},
- {104, "ENOTRECOVERABLE", "state not recoverable"},
- {105, "EOWNERDEAD", "previous owner died"},
- {106, "EQFULL", "interface output queue is full"},
+ {82, "EIPSEC", "IPsec processing failure"},
+ {83, "ENOATTR", "attribute not found"},
+ {84, "EILSEQ", "illegal byte sequence"},
+ {85, "ENOMEDIUM", "no medium found"},
+ {86, "EMEDIUMTYPE", "wrong medium type"},
+ {87, "EOVERFLOW", "value too large to be stored in data type"},
+ {88, "ECANCELED", "operation canceled"},
+ {89, "EIDRM", "identifier removed"},
+ {90, "ENOMSG", "no message of desired type"},
+ {91, "ENOTSUP", "not supported"},
+ {92, "EBADMSG", "bad message"},
+ {93, "ENOTRECOVERABLE", "state not recoverable"},
+ {94, "EOWNERDEAD", "previous owner died"},
+ {95, "ELAST", "protocol error"},
}
// Signal table
@@ -1781,4 +1859,5 @@ var signalList = [...]struct {
{29, "SIGINFO", "information request"},
{30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGTHR", "thread AST"},
}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
index 46e054c..1afee6a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && solaris
// +build amd64,solaris
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -192,6 +193,12 @@ const (
CSTOPB = 0x40
CSUSP = 0x1a
CSWTCH = 0x1a
+ DIOC = 0x6400
+ DIOCGETB = 0x6402
+ DIOCGETC = 0x6401
+ DIOCGETP = 0x6408
+ DIOCSETE = 0x6403
+ DIOCSETP = 0x6409
DLT_AIRONET_HEADER = 0x78
DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
DLT_ARCNET = 0x7
@@ -290,6 +297,7 @@ const (
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
+ FIORDCHK = 0x6603
FLUSHALL = 0x1
FLUSHDATA = 0x0
FLUSHO = 0x2000
@@ -358,6 +366,7 @@ const (
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
+ ICMP6_FILTER = 0x1
ICRNL = 0x100
IEXTEN = 0x8000
IFF_ADDRCONF = 0x80000
@@ -604,6 +613,7 @@ const (
IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
IP_RECVSLLA = 0xa
+ IP_RECVTOS = 0xc
IP_RECVTTL = 0xb
IP_RETOPTS = 0x8
IP_REUSEADDR = 0x104
@@ -645,6 +655,14 @@ const (
MAP_SHARED = 0x1
MAP_TEXT = 0x400
MAP_TYPE = 0xf
+ MCAST_BLOCK_SOURCE = 0x2b
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x29
+ MCAST_JOIN_SOURCE_GROUP = 0x2d
+ MCAST_LEAVE_GROUP = 0x2a
+ MCAST_LEAVE_SOURCE_GROUP = 0x2e
+ MCAST_UNBLOCK_SOURCE = 0x2c
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MSG_CTRUNC = 0x10
@@ -653,6 +671,7 @@ const (
MSG_DUPCTRL = 0x800
MSG_EOR = 0x8
MSG_MAXIOVLEN = 0x10
+ MSG_NOSIGNAL = 0x200
MSG_NOTIFICATION = 0x100
MSG_OOB = 0x1
MSG_PEEK = 0x2
@@ -687,6 +706,8 @@ const (
O_APPEND = 0x8
O_CLOEXEC = 0x800000
O_CREAT = 0x100
+ O_DIRECT = 0x2000000
+ O_DIRECTORY = 0x1000000
O_DSYNC = 0x40
O_EXCL = 0x400
O_EXEC = 0x400000
@@ -725,7 +746,7 @@ const (
RLIMIT_FSIZE = 0x1
RLIMIT_NOFILE = 0x5
RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x3
+ RLIM_INFINITY = 0xfffffffffffffffd
RTAX_AUTHOR = 0x6
RTAX_BRD = 0x7
RTAX_DST = 0x0
@@ -1047,6 +1068,7 @@ const (
TCOON = 0x1
TCP_ABORT_THRESHOLD = 0x11
TCP_ANONPRIVBIND = 0x20
+ TCP_CONGESTION = 0x25
TCP_CONN_ABORT_THRESHOLD = 0x13
TCP_CONN_NOTIFY_THRESHOLD = 0x12
TCP_CORK = 0x18
@@ -1076,6 +1098,8 @@ const (
TCSETSF = 0x5410
TCSETSW = 0x540f
TCXONC = 0x5406
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOC = 0x5400
TIOCCBRK = 0x747a
TIOCCDTR = 0x7478
diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
new file mode 100644
index 0000000..fc7d050
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
@@ -0,0 +1,860 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+// Hand edited based on zerrors_linux_s390x.go
+// TODO: auto-generate.
+
+package unix
+
+const (
+ BRKINT = 0x0001
+ CLOCK_MONOTONIC = 0x1
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x3
+ CS8 = 0x0030
+ CSIZE = 0x0030
+ ECHO = 0x00000008
+ ECHONL = 0x00000001
+ FD_CLOEXEC = 0x01
+ FD_CLOFORK = 0x02
+ FNDELAY = 0x04
+ F_CLOSFD = 9
+ F_CONTROL_CVT = 13
+ F_DUPFD = 0
+ F_DUPFD2 = 8
+ F_GETFD = 1
+ F_GETFL = 259
+ F_GETLK = 5
+ F_GETOWN = 10
+ F_OK = 0x0
+ F_RDLCK = 1
+ F_SETFD = 2
+ F_SETFL = 4
+ F_SETLK = 6
+ F_SETLKW = 7
+ F_SETOWN = 11
+ F_SETTAG = 12
+ F_UNLCK = 3
+ F_WRLCK = 2
+ FSTYPE_ZFS = 0xe9 //"Z"
+ FSTYPE_HFS = 0xc8 //"H"
+ FSTYPE_NFS = 0xd5 //"N"
+ FSTYPE_TFS = 0xe3 //"T"
+ FSTYPE_AUTOMOUNT = 0xc1 //"A"
+ IP6F_MORE_FRAG = 0x0001
+ IP6F_OFF_MASK = 0xfff8
+ IP6F_RESERVED_MASK = 0x0006
+ IP6OPT_JUMBO = 0xc2
+ IP6OPT_JUMBO_LEN = 6
+ IP6OPT_MUTABLE = 0x20
+ IP6OPT_NSAP_ADDR = 0xc3
+ IP6OPT_PAD1 = 0x00
+ IP6OPT_PADN = 0x01
+ IP6OPT_ROUTER_ALERT = 0x05
+ IP6OPT_TUNNEL_LIMIT = 0x04
+ IP6OPT_TYPE_DISCARD = 0x40
+ IP6OPT_TYPE_FORCEICMP = 0x80
+ IP6OPT_TYPE_ICMP = 0xc0
+ IP6OPT_TYPE_SKIP = 0x00
+ IP6_ALERT_AN = 0x0002
+ IP6_ALERT_MLD = 0x0000
+ IP6_ALERT_RSVP = 0x0001
+ IPPORT_RESERVED = 1024
+ IPPORT_USERRESERVED = 5000
+ IPPROTO_AH = 51
+ SOL_AH = 51
+ IPPROTO_DSTOPTS = 60
+ SOL_DSTOPTS = 60
+ IPPROTO_EGP = 8
+ SOL_EGP = 8
+ IPPROTO_ESP = 50
+ SOL_ESP = 50
+ IPPROTO_FRAGMENT = 44
+ SOL_FRAGMENT = 44
+ IPPROTO_GGP = 2
+ SOL_GGP = 2
+ IPPROTO_HOPOPTS = 0
+ SOL_HOPOPTS = 0
+ IPPROTO_ICMP = 1
+ SOL_ICMP = 1
+ IPPROTO_ICMPV6 = 58
+ SOL_ICMPV6 = 58
+ IPPROTO_IDP = 22
+ SOL_IDP = 22
+ IPPROTO_IP = 0
+ SOL_IP = 0
+ IPPROTO_IPV6 = 41
+ SOL_IPV6 = 41
+ IPPROTO_MAX = 256
+ SOL_MAX = 256
+ IPPROTO_NONE = 59
+ SOL_NONE = 59
+ IPPROTO_PUP = 12
+ SOL_PUP = 12
+ IPPROTO_RAW = 255
+ SOL_RAW = 255
+ IPPROTO_ROUTING = 43
+ SOL_ROUTING = 43
+ IPPROTO_TCP = 6
+ SOL_TCP = 6
+ IPPROTO_UDP = 17
+ SOL_UDP = 17
+ IPV6_ADDR_PREFERENCES = 32
+ IPV6_CHECKSUM = 19
+ IPV6_DONTFRAG = 29
+ IPV6_DSTOPTS = 23
+ IPV6_HOPLIMIT = 11
+ IPV6_HOPOPTS = 22
+ IPV6_JOIN_GROUP = 5
+ IPV6_LEAVE_GROUP = 6
+ IPV6_MULTICAST_HOPS = 9
+ IPV6_MULTICAST_IF = 7
+ IPV6_MULTICAST_LOOP = 4
+ IPV6_NEXTHOP = 20
+ IPV6_PATHMTU = 12
+ IPV6_PKTINFO = 13
+ IPV6_PREFER_SRC_CGA = 0x10
+ IPV6_PREFER_SRC_COA = 0x02
+ IPV6_PREFER_SRC_HOME = 0x01
+ IPV6_PREFER_SRC_NONCGA = 0x20
+ IPV6_PREFER_SRC_PUBLIC = 0x08
+ IPV6_PREFER_SRC_TMP = 0x04
+ IPV6_RECVDSTOPTS = 28
+ IPV6_RECVHOPLIMIT = 14
+ IPV6_RECVHOPOPTS = 26
+ IPV6_RECVPATHMTU = 16
+ IPV6_RECVPKTINFO = 15
+ IPV6_RECVRTHDR = 25
+ IPV6_RECVTCLASS = 31
+ IPV6_RTHDR = 21
+ IPV6_RTHDRDSTOPTS = 24
+ IPV6_RTHDR_TYPE_0 = 0
+ IPV6_TCLASS = 30
+ IPV6_UNICAST_HOPS = 3
+ IPV6_USE_MIN_MTU = 18
+ IPV6_V6ONLY = 10
+ IP_ADD_MEMBERSHIP = 5
+ IP_ADD_SOURCE_MEMBERSHIP = 12
+ IP_BLOCK_SOURCE = 10
+ IP_DEFAULT_MULTICAST_LOOP = 1
+ IP_DEFAULT_MULTICAST_TTL = 1
+ IP_DROP_MEMBERSHIP = 6
+ IP_DROP_SOURCE_MEMBERSHIP = 13
+ IP_MAX_MEMBERSHIPS = 20
+ IP_MULTICAST_IF = 7
+ IP_MULTICAST_LOOP = 4
+ IP_MULTICAST_TTL = 3
+ IP_OPTIONS = 1
+ IP_PKTINFO = 101
+ IP_RECVPKTINFO = 102
+ IP_TOS = 2
+ IP_TTL = 3
+ IP_UNBLOCK_SOURCE = 11
+ ICANON = 0x0010
+ ICMP6_FILTER = 0x26
+ ICRNL = 0x0002
+ IEXTEN = 0x0020
+ IGNBRK = 0x0004
+ IGNCR = 0x0008
+ INLCR = 0x0020
+ ISIG = 0x0040
+ ISTRIP = 0x0080
+ IXON = 0x0200
+ IXOFF = 0x0100
+ LOCK_SH = 0x1 // Not exist on zOS
+ LOCK_EX = 0x2 // Not exist on zOS
+ LOCK_NB = 0x4 // Not exist on zOS
+ LOCK_UN = 0x8 // Not exist on zOS
+ POLLIN = 0x0003
+ POLLOUT = 0x0004
+ POLLPRI = 0x0010
+ POLLERR = 0x0020
+ POLLHUP = 0x0040
+ POLLNVAL = 0x0080
+ PROT_READ = 0x1 // mmap - page can be read
+ PROT_WRITE = 0x2 // page can be written
+ PROT_NONE = 0x4 // can't be accessed
+ PROT_EXEC = 0x8 // can be executed
+ MAP_PRIVATE = 0x1 // changes are private
+ MAP_SHARED = 0x2 // changes are shared
+ MAP_FIXED = 0x4 // place exactly
+ MCAST_JOIN_GROUP = 40
+ MCAST_LEAVE_GROUP = 41
+ MCAST_JOIN_SOURCE_GROUP = 42
+ MCAST_LEAVE_SOURCE_GROUP = 43
+ MCAST_BLOCK_SOURCE = 44
+ MCAST_UNBLOCK_SOURCE = 45
+ MS_SYNC = 0x1 // msync - synchronous writes
+ MS_ASYNC = 0x2 // asynchronous writes
+ MS_INVALIDATE = 0x4 // invalidate mappings
+ MTM_RDONLY = 0x80000000
+ MTM_RDWR = 0x40000000
+ MTM_UMOUNT = 0x10000000
+ MTM_IMMED = 0x08000000
+ MTM_FORCE = 0x04000000
+ MTM_DRAIN = 0x02000000
+ MTM_RESET = 0x01000000
+ MTM_SAMEMODE = 0x00100000
+ MTM_UNQSEFORCE = 0x00040000
+ MTM_NOSUID = 0x00000400
+ MTM_SYNCHONLY = 0x00000200
+ MTM_REMOUNT = 0x00000100
+ MTM_NOSECURITY = 0x00000080
+ NFDBITS = 0x20
+ O_ACCMODE = 0x03
+ O_APPEND = 0x08
+ O_ASYNCSIG = 0x0200
+ O_CREAT = 0x80
+ O_EXCL = 0x40
+ O_GETFL = 0x0F
+ O_LARGEFILE = 0x0400
+ O_NONBLOCK = 0x04
+ O_RDONLY = 0x02
+ O_RDWR = 0x03
+ O_SYNC = 0x0100
+ O_TRUNC = 0x10
+ O_WRONLY = 0x01
+ O_NOCTTY = 0x20
+ OPOST = 0x0001
+ ONLCR = 0x0004
+ PARENB = 0x0200
+ PARMRK = 0x0400
+ QUERYCVT = 3
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0 // RUSAGE_THREAD unsupported on z/OS
+ SEEK_CUR = 1
+ SEEK_END = 2
+ SEEK_SET = 0
+ SETAUTOCVTALL = 5
+ SETAUTOCVTON = 2
+ SETCVTALL = 4
+ SETCVTOFF = 0
+ SETCVTON = 1
+ AF_APPLETALK = 16
+ AF_CCITT = 10
+ AF_CHAOS = 5
+ AF_DATAKIT = 9
+ AF_DLI = 13
+ AF_ECMA = 8
+ AF_HYLINK = 15
+ AF_IMPLINK = 3
+ AF_INET = 2
+ AF_INET6 = 19
+ AF_INTF = 20
+ AF_IUCV = 17
+ AF_LAT = 14
+ AF_LINK = 18
+ AF_MAX = 30
+ AF_NBS = 7
+ AF_NDD = 23
+ AF_NETWARE = 22
+ AF_NS = 6
+ AF_PUP = 4
+ AF_RIF = 21
+ AF_ROUTE = 20
+ AF_SNA = 11
+ AF_UNIX = 1
+ AF_UNSPEC = 0
+ IBMTCP_IMAGE = 1
+ MSG_ACK_EXPECTED = 0x10
+ MSG_ACK_GEN = 0x40
+ MSG_ACK_TIMEOUT = 0x20
+ MSG_CONNTERM = 0x80
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_EOF = 0x8000
+ MSG_EOR = 0x8
+ MSG_MAXIOVLEN = 16
+ MSG_NONBLOCK = 0x4000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ PRIO_PROCESS = 1
+ PRIO_PGRP = 2
+ PRIO_USER = 3
+ RLIMIT_CPU = 0
+ RLIMIT_FSIZE = 1
+ RLIMIT_DATA = 2
+ RLIMIT_STACK = 3
+ RLIMIT_CORE = 4
+ RLIMIT_AS = 5
+ RLIMIT_NOFILE = 6
+ RLIMIT_MEMLIMIT = 7
+ RLIM_INFINITY = 2147483647
+ SCM_RIGHTS = 0x01
+ SF_CLOSE = 0x00000002
+ SF_REUSE = 0x00000001
+ SHUT_RD = 0
+ SHUT_RDWR = 2
+ SHUT_WR = 1
+ SOCK_CONN_DGRAM = 6
+ SOCK_DGRAM = 2
+ SOCK_RAW = 3
+ SOCK_RDM = 4
+ SOCK_SEQPACKET = 5
+ SOCK_STREAM = 1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 10
+ SO_ACCEPTCONN = 0x0002
+ SO_ACCEPTECONNABORTED = 0x0006
+ SO_ACKNOW = 0x7700
+ SO_BROADCAST = 0x0020
+ SO_BULKMODE = 0x8000
+ SO_CKSUMRECV = 0x0800
+ SO_CLOSE = 0x01
+ SO_CLUSTERCONNTYPE = 0x00004001
+ SO_CLUSTERCONNTYPE_INTERNAL = 8
+ SO_CLUSTERCONNTYPE_NOCONN = 0
+ SO_CLUSTERCONNTYPE_NONE = 1
+ SO_CLUSTERCONNTYPE_SAME_CLUSTER = 2
+ SO_CLUSTERCONNTYPE_SAME_IMAGE = 4
+ SO_DEBUG = 0x0001
+ SO_DONTROUTE = 0x0010
+ SO_ERROR = 0x1007
+ SO_IGNOREINCOMINGPUSH = 0x1
+ SO_IGNORESOURCEVIPA = 0x0002
+ SO_KEEPALIVE = 0x0008
+ SO_LINGER = 0x0080
+ SO_NONBLOCKLOCAL = 0x8001
+ SO_NOREUSEADDR = 0x1000
+ SO_OOBINLINE = 0x0100
+ SO_OPTACK = 0x8004
+ SO_OPTMSS = 0x8003
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x0004
+ SO_REUSEPORT = 0x0200
+ SO_SECINFO = 0x00004002
+ SO_SET = 0x0200
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TYPE = 0x1008
+ SO_UNSET = 0x0400
+ SO_USELOOPBACK = 0x0040
+ SO_USE_IFBUFS = 0x0400
+ S_ISUID = 0x0800
+ S_ISGID = 0x0400
+ S_ISVTX = 0x0200
+ S_IRUSR = 0x0100
+ S_IWUSR = 0x0080
+ S_IXUSR = 0x0040
+ S_IRWXU = 0x01C0
+ S_IRGRP = 0x0020
+ S_IWGRP = 0x0010
+ S_IXGRP = 0x0008
+ S_IRWXG = 0x0038
+ S_IROTH = 0x0004
+ S_IWOTH = 0x0002
+ S_IXOTH = 0x0001
+ S_IRWXO = 0x0007
+ S_IREAD = S_IRUSR
+ S_IWRITE = S_IWUSR
+ S_IEXEC = S_IXUSR
+ S_IFDIR = 0x01000000
+ S_IFCHR = 0x02000000
+ S_IFREG = 0x03000000
+ S_IFFIFO = 0x04000000
+ S_IFIFO = 0x04000000
+ S_IFLNK = 0x05000000
+ S_IFBLK = 0x06000000
+ S_IFSOCK = 0x07000000
+ S_IFVMEXTL = 0xFE000000
+ S_IFVMEXTL_EXEC = 0x00010000
+ S_IFVMEXTL_DATA = 0x00020000
+ S_IFVMEXTL_MEL = 0x00030000
+ S_IFEXTL = 0x00000001
+ S_IFPROGCTL = 0x00000002
+ S_IFAPFCTL = 0x00000004
+ S_IFNOSHARE = 0x00000008
+ S_IFSHARELIB = 0x00000010
+ S_IFMT = 0xFF000000
+ S_IFMST = 0x00FF0000
+ TCP_KEEPALIVE = 0x8
+ TCP_NODELAY = 0x1
+ TCP_INFO = 0xb
+ TCP_USER_TIMEOUT = 0x1
+ TIOCGWINSZ = 0x4008a368
+ TIOCSWINSZ = 0x8008a367
+ TIOCSBRK = 0x2000a77b
+ TIOCCBRK = 0x2000a77a
+ TIOCSTI = 0x8001a772
+ TIOCGPGRP = 0x4004a777 // _IOR(167, 119, int)
+ TCSANOW = 0
+ TCSETS = 0 // equivalent to TCSANOW for tcsetattr
+ TCSADRAIN = 1
+ TCSETSW = 1 // equivalent to TCSADRAIN for tcsetattr
+ TCSAFLUSH = 2
+ TCSETSF = 2 // equivalent to TCSAFLUSH for tcsetattr
+ TCGETS = 3 // not defined in ioctl.h -- zos golang only
+ TCIFLUSH = 0
+ TCOFLUSH = 1
+ TCIOFLUSH = 2
+ TCOOFF = 0
+ TCOON = 1
+ TCIOFF = 2
+ TCION = 3
+ TIOCSPGRP = 0x8004a776
+ TIOCNOTTY = 0x2000a771
+ TIOCEXCL = 0x2000a70d
+ TIOCNXCL = 0x2000a70e
+ TIOCGETD = 0x4004a700
+ TIOCSETD = 0x8004a701
+ TIOCPKT = 0x8004a770
+ TIOCSTOP = 0x2000a76f
+ TIOCSTART = 0x2000a76e
+ TIOCUCNTL = 0x8004a766
+ TIOCREMOTE = 0x8004a769
+ TIOCMGET = 0x4004a76a
+ TIOCMSET = 0x8004a76d
+ TIOCMBIC = 0x8004a76b
+ TIOCMBIS = 0x8004a76c
+ VINTR = 0
+ VQUIT = 1
+ VERASE = 2
+ VKILL = 3
+ VEOF = 4
+ VEOL = 5
+ VMIN = 6
+ VSTART = 7
+ VSTOP = 8
+ VSUSP = 9
+ VTIME = 10
+ WCONTINUED = 0x4
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ _BPX_SWAP = 1
+ _BPX_NONSWAP = 2
+ MCL_CURRENT = 1 // for Linux compatibility -- no zos semantics
+ MCL_FUTURE = 2 // for Linux compatibility -- no zos semantics
+ MCL_ONFAULT = 3 // for Linux compatibility -- no zos semantics
+ MADV_NORMAL = 0 // for Linux compatibility -- no zos semantics
+ MADV_RANDOM = 1 // for Linux compatibility -- no zos semantics
+ MADV_SEQUENTIAL = 2 // for Linux compatibility -- no zos semantics
+ MADV_WILLNEED = 3 // for Linux compatibility -- no zos semantics
+ MADV_REMOVE = 4 // for Linux compatibility -- no zos semantics
+ MADV_DONTFORK = 5 // for Linux compatibility -- no zos semantics
+ MADV_DOFORK = 6 // for Linux compatibility -- no zos semantics
+ MADV_HWPOISON = 7 // for Linux compatibility -- no zos semantics
+ MADV_MERGEABLE = 8 // for Linux compatibility -- no zos semantics
+ MADV_UNMERGEABLE = 9 // for Linux compatibility -- no zos semantics
+ MADV_SOFT_OFFLINE = 10 // for Linux compatibility -- no zos semantics
+ MADV_HUGEPAGE = 11 // for Linux compatibility -- no zos semantics
+ MADV_NOHUGEPAGE = 12 // for Linux compatibility -- no zos semantics
+ MADV_DONTDUMP = 13 // for Linux compatibility -- no zos semantics
+ MADV_DODUMP = 14 // for Linux compatibility -- no zos semantics
+ MADV_FREE = 15 // for Linux compatibility -- no zos semantics
+ MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics
+ MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics
+ AT_SYMLINK_NOFOLLOW = 1 // for Unix compatibility -- no zos semantics
+ AT_FDCWD = 2 // for Unix compatibility -- no zos semantics
+)
+
+const (
+ EDOM = Errno(1)
+ ERANGE = Errno(2)
+ EACCES = Errno(111)
+ EAGAIN = Errno(112)
+ EBADF = Errno(113)
+ EBUSY = Errno(114)
+ ECHILD = Errno(115)
+ EDEADLK = Errno(116)
+ EEXIST = Errno(117)
+ EFAULT = Errno(118)
+ EFBIG = Errno(119)
+ EINTR = Errno(120)
+ EINVAL = Errno(121)
+ EIO = Errno(122)
+ EISDIR = Errno(123)
+ EMFILE = Errno(124)
+ EMLINK = Errno(125)
+ ENAMETOOLONG = Errno(126)
+ ENFILE = Errno(127)
+ ENODEV = Errno(128)
+ ENOENT = Errno(129)
+ ENOEXEC = Errno(130)
+ ENOLCK = Errno(131)
+ ENOMEM = Errno(132)
+ ENOSPC = Errno(133)
+ ENOSYS = Errno(134)
+ ENOTDIR = Errno(135)
+ ENOTEMPTY = Errno(136)
+ ENOTTY = Errno(137)
+ ENXIO = Errno(138)
+ EPERM = Errno(139)
+ EPIPE = Errno(140)
+ EROFS = Errno(141)
+ ESPIPE = Errno(142)
+ ESRCH = Errno(143)
+ EXDEV = Errno(144)
+ E2BIG = Errno(145)
+ ELOOP = Errno(146)
+ EILSEQ = Errno(147)
+ ENODATA = Errno(148)
+ EOVERFLOW = Errno(149)
+ EMVSNOTUP = Errno(150)
+ ECMSSTORAGE = Errno(151)
+ EMVSDYNALC = Errno(151)
+ EMVSCVAF = Errno(152)
+ EMVSCATLG = Errno(153)
+ ECMSINITIAL = Errno(156)
+ EMVSINITIAL = Errno(156)
+ ECMSERR = Errno(157)
+ EMVSERR = Errno(157)
+ EMVSPARM = Errno(158)
+ ECMSPFSFILE = Errno(159)
+ EMVSPFSFILE = Errno(159)
+ EMVSBADCHAR = Errno(160)
+ ECMSPFSPERM = Errno(162)
+ EMVSPFSPERM = Errno(162)
+ EMVSSAFEXTRERR = Errno(163)
+ EMVSSAF2ERR = Errno(164)
+ EMVSTODNOTSET = Errno(165)
+ EMVSPATHOPTS = Errno(166)
+ EMVSNORTL = Errno(167)
+ EMVSEXPIRE = Errno(168)
+ EMVSPASSWORD = Errno(169)
+ EMVSWLMERROR = Errno(170)
+ EMVSCPLERROR = Errno(171)
+ EMVSARMERROR = Errno(172)
+ ELENOFORK = Errno(200)
+ ELEMSGERR = Errno(201)
+ EFPMASKINV = Errno(202)
+ EFPMODEINV = Errno(203)
+ EBUFLEN = Errno(227)
+ EEXTLINK = Errno(228)
+ ENODD = Errno(229)
+ ECMSESMERR = Errno(230)
+ ECPERR = Errno(231)
+ ELEMULTITHREAD = Errno(232)
+ ELEFENCE = Errno(244)
+ EBADDATA = Errno(245)
+ EUNKNOWN = Errno(246)
+ ENOTSUP = Errno(247)
+ EBADNAME = Errno(248)
+ ENOTSAFE = Errno(249)
+ ELEMULTITHREADFORK = Errno(257)
+ ECUNNOENV = Errno(258)
+ ECUNNOCONV = Errno(259)
+ ECUNNOTALIGNED = Errno(260)
+ ECUNERR = Errno(262)
+ EIBMBADCALL = Errno(1000)
+ EIBMBADPARM = Errno(1001)
+ EIBMSOCKOUTOFRANGE = Errno(1002)
+ EIBMSOCKINUSE = Errno(1003)
+ EIBMIUCVERR = Errno(1004)
+ EOFFLOADboxERROR = Errno(1005)
+ EOFFLOADboxRESTART = Errno(1006)
+ EOFFLOADboxDOWN = Errno(1007)
+ EIBMCONFLICT = Errno(1008)
+ EIBMCANCELLED = Errno(1009)
+ EIBMBADTCPNAME = Errno(1011)
+ ENOTBLK = Errno(1100)
+ ETXTBSY = Errno(1101)
+ EWOULDBLOCK = Errno(1102)
+ EINPROGRESS = Errno(1103)
+ EALREADY = Errno(1104)
+ ENOTSOCK = Errno(1105)
+ EDESTADDRREQ = Errno(1106)
+ EMSGSIZE = Errno(1107)
+ EPROTOTYPE = Errno(1108)
+ ENOPROTOOPT = Errno(1109)
+ EPROTONOSUPPORT = Errno(1110)
+ ESOCKTNOSUPPORT = Errno(1111)
+ EOPNOTSUPP = Errno(1112)
+ EPFNOSUPPORT = Errno(1113)
+ EAFNOSUPPORT = Errno(1114)
+ EADDRINUSE = Errno(1115)
+ EADDRNOTAVAIL = Errno(1116)
+ ENETDOWN = Errno(1117)
+ ENETUNREACH = Errno(1118)
+ ENETRESET = Errno(1119)
+ ECONNABORTED = Errno(1120)
+ ECONNRESET = Errno(1121)
+ ENOBUFS = Errno(1122)
+ EISCONN = Errno(1123)
+ ENOTCONN = Errno(1124)
+ ESHUTDOWN = Errno(1125)
+ ETOOMANYREFS = Errno(1126)
+ ETIMEDOUT = Errno(1127)
+ ECONNREFUSED = Errno(1128)
+ EHOSTDOWN = Errno(1129)
+ EHOSTUNREACH = Errno(1130)
+ EPROCLIM = Errno(1131)
+ EUSERS = Errno(1132)
+ EDQUOT = Errno(1133)
+ ESTALE = Errno(1134)
+ EREMOTE = Errno(1135)
+ ENOSTR = Errno(1136)
+ ETIME = Errno(1137)
+ ENOSR = Errno(1138)
+ ENOMSG = Errno(1139)
+ EBADMSG = Errno(1140)
+ EIDRM = Errno(1141)
+ ENONET = Errno(1142)
+ ERREMOTE = Errno(1143)
+ ENOLINK = Errno(1144)
+ EADV = Errno(1145)
+ ESRMNT = Errno(1146)
+ ECOMM = Errno(1147)
+ EPROTO = Errno(1148)
+ EMULTIHOP = Errno(1149)
+ EDOTDOT = Errno(1150)
+ EREMCHG = Errno(1151)
+ ECANCELED = Errno(1152)
+ EINTRNODATA = Errno(1159)
+ ENOREUSE = Errno(1160)
+ ENOMOVE = Errno(1161)
+)
+
+// Signals
+const (
+ SIGHUP = Signal(1)
+ SIGINT = Signal(2)
+ SIGABRT = Signal(3)
+ SIGILL = Signal(4)
+ SIGPOLL = Signal(5)
+ SIGURG = Signal(6)
+ SIGSTOP = Signal(7)
+ SIGFPE = Signal(8)
+ SIGKILL = Signal(9)
+ SIGBUS = Signal(10)
+ SIGSEGV = Signal(11)
+ SIGSYS = Signal(12)
+ SIGPIPE = Signal(13)
+ SIGALRM = Signal(14)
+ SIGTERM = Signal(15)
+ SIGUSR1 = Signal(16)
+ SIGUSR2 = Signal(17)
+ SIGABND = Signal(18)
+ SIGCONT = Signal(19)
+ SIGCHLD = Signal(20)
+ SIGTTIN = Signal(21)
+ SIGTTOU = Signal(22)
+ SIGIO = Signal(23)
+ SIGQUIT = Signal(24)
+ SIGTSTP = Signal(25)
+ SIGTRAP = Signal(26)
+ SIGIOERR = Signal(27)
+ SIGWINCH = Signal(28)
+ SIGXCPU = Signal(29)
+ SIGXFSZ = Signal(30)
+ SIGVTALRM = Signal(31)
+ SIGPROF = Signal(32)
+ SIGDANGER = Signal(33)
+ SIGTHSTOP = Signal(34)
+ SIGTHCONT = Signal(35)
+ SIGTRACE = Signal(37)
+ SIGDCE = Signal(38)
+ SIGDUMP = Signal(39)
+)
+
+// Error table
+var errorList = [...]struct {
+ num Errno
+ name string
+ desc string
+}{
+ {1, "EDC5001I", "A domain error occurred."},
+ {2, "EDC5002I", "A range error occurred."},
+ {111, "EDC5111I", "Permission denied."},
+ {112, "EDC5112I", "Resource temporarily unavailable."},
+ {113, "EDC5113I", "Bad file descriptor."},
+ {114, "EDC5114I", "Resource busy."},
+ {115, "EDC5115I", "No child processes."},
+ {116, "EDC5116I", "Resource deadlock avoided."},
+ {117, "EDC5117I", "File exists."},
+ {118, "EDC5118I", "Incorrect address."},
+ {119, "EDC5119I", "File too large."},
+ {120, "EDC5120I", "Interrupted function call."},
+ {121, "EDC5121I", "Invalid argument."},
+ {122, "EDC5122I", "Input/output error."},
+ {123, "EDC5123I", "Is a directory."},
+ {124, "EDC5124I", "Too many open files."},
+ {125, "EDC5125I", "Too many links."},
+ {126, "EDC5126I", "Filename too long."},
+ {127, "EDC5127I", "Too many open files in system."},
+ {128, "EDC5128I", "No such device."},
+ {129, "EDC5129I", "No such file or directory."},
+ {130, "EDC5130I", "Exec format error."},
+ {131, "EDC5131I", "No locks available."},
+ {132, "EDC5132I", "Not enough memory."},
+ {133, "EDC5133I", "No space left on device."},
+ {134, "EDC5134I", "Function not implemented."},
+ {135, "EDC5135I", "Not a directory."},
+ {136, "EDC5136I", "Directory not empty."},
+ {137, "EDC5137I", "Inappropriate I/O control operation."},
+ {138, "EDC5138I", "No such device or address."},
+ {139, "EDC5139I", "Operation not permitted."},
+ {140, "EDC5140I", "Broken pipe."},
+ {141, "EDC5141I", "Read-only file system."},
+ {142, "EDC5142I", "Invalid seek."},
+ {143, "EDC5143I", "No such process."},
+ {144, "EDC5144I", "Improper link."},
+ {145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."},
+ {146, "EDC5146I", "Too many levels of symbolic links."},
+ {147, "EDC5147I", "Illegal byte sequence."},
+ {148, "", ""},
+ {149, "EDC5149I", "Value Overflow Error."},
+ {150, "EDC5150I", "UNIX System Services is not active."},
+ {151, "EDC5151I", "Dynamic allocation error."},
+ {152, "EDC5152I", "Common VTOC access facility (CVAF) error."},
+ {153, "EDC5153I", "Catalog obtain error."},
+ {156, "EDC5156I", "Process initialization error."},
+ {157, "EDC5157I", "An internal error has occurred."},
+ {158, "EDC5158I", "Bad parameters were passed to the service."},
+ {159, "EDC5159I", "The Physical File System encountered a permanent file error."},
+ {160, "EDC5160I", "Bad character in environment variable name."},
+ {162, "EDC5162I", "The Physical File System encountered a system error."},
+ {163, "EDC5163I", "SAF/RACF extract error."},
+ {164, "EDC5164I", "SAF/RACF error."},
+ {165, "EDC5165I", "System TOD clock not set."},
+ {166, "EDC5166I", "Access mode argument on function call conflicts with PATHOPTS parameter on JCL DD statement."},
+ {167, "EDC5167I", "Access to the UNIX System Services version of the C RTL is denied."},
+ {168, "EDC5168I", "Password has expired."},
+ {169, "EDC5169I", "Password is invalid."},
+ {170, "EDC5170I", "An error was encountered with WLM."},
+ {171, "EDC5171I", "An error was encountered with CPL."},
+ {172, "EDC5172I", "An error was encountered with Application Response Measurement (ARM) component."},
+ {200, "EDC5200I", "The application contains a Language Environment member language that cannot tolerate a fork()."},
+ {201, "EDC5201I", "The Language Environment message file was not found in the hierarchical file system."},
+ {202, "EDC5202E", "DLL facilities are not supported under SPC environment."},
+ {203, "EDC5203E", "DLL facilities are not supported under POSIX environment."},
+ {227, "EDC5227I", "Buffer is not long enough to contain a path definition"},
+ {228, "EDC5228I", "The file referred to is an external link"},
+ {229, "EDC5229I", "No path definition for ddname in effect"},
+ {230, "EDC5230I", "ESM error."},
+ {231, "EDC5231I", "CP or the external security manager had an error"},
+ {232, "EDC5232I", "The function failed because it was invoked from a multithread environment."},
+ {244, "EDC5244I", "The program, module or DLL is not supported in this environment."},
+ {245, "EDC5245I", "Data is not valid."},
+ {246, "EDC5246I", "Unknown system state."},
+ {247, "EDC5247I", "Operation not supported."},
+ {248, "EDC5248I", "The object name specified is not correct."},
+ {249, "EDC5249I", "The function is not allowed."},
+ {257, "EDC5257I", "Function cannot be called in the child process of a fork() from a multithreaded process until exec() is called."},
+ {258, "EDC5258I", "A CUN_RS_NO_UNI_ENV error was issued by Unicode Services."},
+ {259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."},
+ {260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."},
+ {262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."},
+ {1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."},
+ {1001, "EDC8001I", "An error was found in the IUCV header."},
+ {1002, "EDC8002I", "A socket descriptor is out of range."},
+ {1003, "EDC8003I", "A socket descriptor is in use."},
+ {1004, "EDC8004I", "Request failed because of an IUCV error."},
+ {1005, "EDC8005I", "Offload box error."},
+ {1006, "EDC8006I", "Offload box restarted."},
+ {1007, "EDC8007I", "Offload box down."},
+ {1008, "EDC8008I", "Already a conflicting call outstanding on socket."},
+ {1009, "EDC8009I", "Request cancelled using a SOCKcallCANCEL request."},
+ {1011, "EDC8011I", "A name of a PFS was specified that either is not configured or is not a Sockets PFS."},
+ {1100, "EDC8100I", "Block device required."},
+ {1101, "EDC8101I", "Text file busy."},
+ {1102, "EDC8102I", "Operation would block."},
+ {1103, "EDC8103I", "Operation now in progress."},
+ {1104, "EDC8104I", "Connection already in progress."},
+ {1105, "EDC8105I", "Socket operation on non-socket."},
+ {1106, "EDC8106I", "Destination address required."},
+ {1107, "EDC8107I", "Message too long."},
+ {1108, "EDC8108I", "Protocol wrong type for socket."},
+ {1109, "EDC8109I", "Protocol not available."},
+ {1110, "EDC8110I", "Protocol not supported."},
+ {1111, "EDC8111I", "Socket type not supported."},
+ {1112, "EDC8112I", "Operation not supported on socket."},
+ {1113, "EDC8113I", "Protocol family not supported."},
+ {1114, "EDC8114I", "Address family not supported."},
+ {1115, "EDC8115I", "Address already in use."},
+ {1116, "EDC8116I", "Address not available."},
+ {1117, "EDC8117I", "Network is down."},
+ {1118, "EDC8118I", "Network is unreachable."},
+ {1119, "EDC8119I", "Network dropped connection on reset."},
+ {1120, "EDC8120I", "Connection ended abnormally."},
+ {1121, "EDC8121I", "Connection reset."},
+ {1122, "EDC8122I", "No buffer space available."},
+ {1123, "EDC8123I", "Socket already connected."},
+ {1124, "EDC8124I", "Socket not connected."},
+ {1125, "EDC8125I", "Can't send after socket shutdown."},
+ {1126, "EDC8126I", "Too many references; can't splice."},
+ {1127, "EDC8127I", "Connection timed out."},
+ {1128, "EDC8128I", "Connection refused."},
+ {1129, "EDC8129I", "Host is not available."},
+ {1130, "EDC8130I", "Host cannot be reached."},
+ {1131, "EDC8131I", "Too many processes."},
+ {1132, "EDC8132I", "Too many users."},
+ {1133, "EDC8133I", "Disk quota exceeded."},
+ {1134, "EDC8134I", "Stale file handle."},
+ {1135, "", ""},
+ {1136, "EDC8136I", "File is not a STREAM."},
+ {1137, "EDC8137I", "STREAMS ioctl() timeout."},
+ {1138, "EDC8138I", "No STREAMS resources."},
+ {1139, "EDC8139I", "The message identified by set_id and msg_id is not in the message catalog."},
+ {1140, "EDC8140I", "Bad message."},
+ {1141, "EDC8141I", "Identifier removed."},
+ {1142, "", ""},
+ {1143, "", ""},
+ {1144, "EDC8144I", "The link has been severed."},
+ {1145, "", ""},
+ {1146, "", ""},
+ {1147, "", ""},
+ {1148, "EDC8148I", "Protocol error."},
+ {1149, "EDC8149I", "Multihop not allowed."},
+ {1150, "", ""},
+ {1151, "", ""},
+ {1152, "EDC8152I", "The asynchronous I/O request has been canceled."},
+ {1159, "EDC8159I", "Function call was interrupted before any data was received."},
+ {1160, "EDC8160I", "Socket reuse is not supported."},
+ {1161, "EDC8161I", "The file system cannot currently be moved."},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGABT", "aborted"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGPOLL", "pollable event"},
+ {6, "SIGURG", "urgent I/O condition"},
+ {7, "SIGSTOP", "stop process"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad argument to routine"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGUSR1", "user defined signal 1"},
+ {17, "SIGUSR2", "user defined signal 2"},
+ {18, "SIGABND", "abend"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGQUIT", "quit"},
+ {25, "SIGTSTP", "stopped"},
+ {26, "SIGTRAP", "trace/breakpoint trap"},
+ {27, "SIGIOER", "I/O error"},
+ {28, "SIGWINCH", "window changed"},
+ {29, "SIGXCPU", "CPU time limit exceeded"},
+ {30, "SIGXFSZ", "file size limit exceeded"},
+ {31, "SIGVTALRM", "virtual timer expired"},
+ {32, "SIGPROF", "profiling timer expired"},
+ {33, "SIGDANGER", "danger"},
+ {34, "SIGTHSTOP", "stop thread"},
+ {35, "SIGTHCONT", "continue thread"},
+ {37, "SIGTRACE", "trace"},
+ {38, "", "DCE"},
+ {39, "SIGDUMP", "dump"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
index 89c5920..bd001a6 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
+//go:build linux && (arm || arm64)
// +build linux
// +build arm arm64
diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
index 24b841e..c34d063 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT.
+//go:build linux && (mips || mips64)
// +build linux
// +build mips mips64
diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
index 47b0489..3ccf0c0 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT.
+//go:build linux && (mipsle || mips64le)
// +build linux
// +build mipsle mips64le
diff --git a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
index ea5d9cb..7d65857 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT.
+//go:build linux && (386 || amd64)
// +build linux
// +build 386 amd64
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index ed657ff..85e0cc3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -1,6 +1,7 @@
// go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build aix && ppc
// +build aix,ppc
package unix
@@ -16,6 +17,7 @@ int getdirent(int, uintptr_t, size_t);
int wait4(int, uintptr_t, int, uintptr_t);
int ioctl(int, int, uintptr_t);
int fcntl(uintptr_t, int, uintptr_t);
+int fsync_range(int, int, long long, long long);
int acct(uintptr_t);
int chdir(uintptr_t);
int chroot(uintptr_t);
@@ -28,7 +30,6 @@ int fchmod(int, unsigned int);
int fchmodat(int, uintptr_t, unsigned int, int);
int fchownat(int, uintptr_t, int, int, int);
int fdatasync(int);
-int fsync(int);
int getpgid(int);
int getpgrp();
int getpid();
@@ -254,6 +255,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
+ r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Acct(path string) (err error) {
_p0 := uintptr(unsafe.Pointer(C.CString(path)))
r0, er := C.acct(C.uintptr_t(_p0))
@@ -378,16 +389,6 @@ func Fdatasync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- r0, er := C.fsync(C.int(fd))
- if r0 == -1 && er != nil {
- err = er
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Getpgid(pid int) (pgid int, err error) {
r0, er := C.getpgid(C.int(pid))
pgid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index 664b293..f1d4a73 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -1,6 +1,7 @@
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build aix && ppc64
// +build aix,ppc64
package unix
@@ -134,6 +135,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
+ _, e1 := callfsync_range(fd, how, start, length)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Acct(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -282,16 +293,6 @@ func Fdatasync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- _, e1 := callfsync(fd)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Getpgid(pid int) (pgid int, err error) {
r0, e1 := callgetpgid(pid)
pgid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
index 4b3a8ad..2caa5ad 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
@@ -1,8 +1,8 @@
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build aix,ppc64
-// +build !gccgo
+//go:build aix && ppc64 && gc
+// +build aix,ppc64,gc
package unix
@@ -18,6 +18,7 @@ import (
//go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
+//go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
@@ -30,7 +31,6 @@ import (
//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
-//go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
@@ -136,6 +136,7 @@ import (
//go:linkname libc_wait4 libc_wait4
//go:linkname libc_ioctl libc_ioctl
//go:linkname libc_fcntl libc_fcntl
+//go:linkname libc_fsync_range libc_fsync_range
//go:linkname libc_acct libc_acct
//go:linkname libc_chdir libc_chdir
//go:linkname libc_chroot libc_chroot
@@ -148,7 +149,6 @@ import (
//go:linkname libc_fchmodat libc_fchmodat
//go:linkname libc_fchownat libc_fchownat
//go:linkname libc_fdatasync libc_fdatasync
-//go:linkname libc_fsync libc_fsync
//go:linkname libc_getpgid libc_getpgid
//go:linkname libc_getpgrp libc_getpgrp
//go:linkname libc_getpid libc_getpid
@@ -257,6 +257,7 @@ var (
libc_wait4,
libc_ioctl,
libc_fcntl,
+ libc_fsync_range,
libc_acct,
libc_chdir,
libc_chroot,
@@ -269,7 +270,6 @@ var (
libc_fchmodat,
libc_fchownat,
libc_fdatasync,
- libc_fsync,
libc_getpgid,
libc_getpgrp,
libc_getpid,
@@ -430,6 +430,13 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
+ r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
return
@@ -514,13 +521,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
- r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
return
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
index cde4dbc..944a714 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
@@ -1,8 +1,8 @@
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build aix,ppc64
-// +build gccgo
+//go:build aix && ppc64 && gccgo
+// +build aix,ppc64,gccgo
package unix
@@ -16,6 +16,7 @@ int getdirent(int, uintptr_t, size_t);
int wait4(int, uintptr_t, int, uintptr_t);
int ioctl(int, int, uintptr_t);
int fcntl(uintptr_t, int, uintptr_t);
+int fsync_range(int, int, long long, long long);
int acct(uintptr_t);
int chdir(uintptr_t);
int chroot(uintptr_t);
@@ -28,7 +29,6 @@ int fchmod(int, unsigned int);
int fchmodat(int, uintptr_t, unsigned int, int);
int fchownat(int, uintptr_t, int, int, int);
int fdatasync(int);
-int fsync(int);
int getpgid(int);
int getpgrp();
int getpid();
@@ -199,6 +199,14 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
+ r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
+ e1 = syscall.GetErrno()
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.acct(C.uintptr_t(_p0)))
e1 = syscall.GetErrno()
@@ -295,14 +303,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
- r1 = uintptr(C.fsync(C.int(fd)))
- e1 = syscall.GetErrno()
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.getpgid(C.int(pid)))
e1 = syscall.GetErrno()
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
deleted file mode 100644
index c1cc0a4..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
+++ /dev/null
@@ -1,1811 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,386,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.1_11.go syscall_darwin_386.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,386,!go1.12
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(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 utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 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 Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// 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)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 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 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 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)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
deleted file mode 100644
index e263fbd..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,386,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_closedir_trampoline()
-
-//go:linkname libc_closedir libc_closedir
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-func libc_readdir_r_trampoline()
-
-//go:linkname libc_readdir_r libc_readdir_r
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s
deleted file mode 100644
index 00da1eb..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s
+++ /dev/null
@@ -1,12 +0,0 @@
-// go run mkasm_darwin.go 386
-// Code generated by the command above; DO NOT EDIT.
-
-// +build go1.13
-
-#include "textflag.h"
-TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
deleted file mode 100644
index a3fc490..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ /dev/null
@@ -1,2499 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,386,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,386,go1.12
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getgroups_trampoline()
-
-//go:linkname libc_getgroups libc_getgroups
-//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setgroups_trampoline()
-
-//go:linkname libc_setgroups libc_setgroups
-//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_wait4_trampoline()
-
-//go:linkname libc_wait4 libc_wait4
-//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
-
-// 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_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_accept_trampoline()
-
-//go:linkname libc_accept libc_accept
-//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_bind_trampoline()
-
-//go:linkname libc_bind libc_bind
-//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_connect_trampoline()
-
-//go:linkname libc_connect libc_connect
-//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_socket_trampoline()
-
-//go:linkname libc_socket libc_socket
-//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getsockopt_trampoline()
-
-//go:linkname libc_getsockopt libc_getsockopt
-//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setsockopt_trampoline()
-
-//go:linkname libc_setsockopt libc_setsockopt
-//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getpeername_trampoline()
-
-//go:linkname libc_getpeername libc_getpeername
-//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getsockname_trampoline()
-
-//go:linkname libc_getsockname libc_getsockname
-//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_shutdown_trampoline()
-
-//go:linkname libc_shutdown libc_shutdown
-//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_socketpair_trampoline()
-
-//go:linkname libc_socketpair libc_socketpair
-//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_recvfrom_trampoline()
-
-//go:linkname libc_recvfrom libc_recvfrom
-//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sendto_trampoline()
-
-//go:linkname libc_sendto libc_sendto
-//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_recvmsg_trampoline()
-
-//go:linkname libc_recvmsg libc_recvmsg
-//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sendmsg_trampoline()
-
-//go:linkname libc_sendmsg libc_sendmsg
-//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_kevent_trampoline()
-
-//go:linkname libc_kevent libc_kevent
-//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_utimes_trampoline()
-
-//go:linkname libc_utimes libc_utimes
-//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_futimes_trampoline()
-
-//go:linkname libc_futimes libc_futimes
-//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
-
-// 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_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_poll_trampoline()
-
-//go:linkname libc_poll libc_poll
-//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_madvise_trampoline()
-
-//go:linkname libc_madvise libc_madvise
-//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mlock_trampoline()
-
-//go:linkname libc_mlock libc_mlock
-//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mlockall_trampoline()
-
-//go:linkname libc_mlockall libc_mlockall
-//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mprotect_trampoline()
-
-//go:linkname libc_mprotect libc_mprotect
-//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_msync_trampoline()
-
-//go:linkname libc_msync libc_msync
-//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_munlock_trampoline()
-
-//go:linkname libc_munlock libc_munlock
-//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_munlockall_trampoline()
-
-//go:linkname libc_munlockall libc_munlockall
-//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getattrlist_trampoline()
-
-//go:linkname libc_getattrlist libc_getattrlist
-//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pipe_trampoline()
-
-//go:linkname libc_pipe libc_pipe
-//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getxattr_trampoline()
-
-//go:linkname libc_getxattr libc_getxattr
-//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fgetxattr_trampoline()
-
-//go:linkname libc_fgetxattr libc_fgetxattr
-//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setxattr_trampoline()
-
-//go:linkname libc_setxattr libc_setxattr
-//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fsetxattr_trampoline()
-
-//go:linkname libc_fsetxattr libc_fsetxattr
-//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_removexattr_trampoline()
-
-//go:linkname libc_removexattr libc_removexattr
-//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fremovexattr_trampoline()
-
-//go:linkname libc_fremovexattr libc_fremovexattr
-//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_listxattr_trampoline()
-
-//go:linkname libc_listxattr libc_listxattr
-//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_flistxattr_trampoline()
-
-//go:linkname libc_flistxattr libc_flistxattr
-//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setattrlist_trampoline()
-
-//go:linkname libc_setattrlist libc_setattrlist
-//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fcntl_trampoline()
-
-//go:linkname libc_fcntl libc_fcntl
-//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_kill_trampoline()
-
-//go:linkname libc_kill libc_kill
-//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ioctl_trampoline()
-
-//go:linkname libc_ioctl libc_ioctl
-//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sysctl_trampoline()
-
-//go:linkname libc_sysctl libc_sysctl
-//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sendfile_trampoline()
-
-//go:linkname libc_sendfile libc_sendfile
-//go:cgo_import_dynamic libc_sendfile sendfile "/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)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_access_trampoline()
-
-//go:linkname libc_access libc_access
-//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_adjtime_trampoline()
-
-//go:linkname libc_adjtime libc_adjtime
-//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chdir_trampoline()
-
-//go:linkname libc_chdir libc_chdir
-//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chflags_trampoline()
-
-//go:linkname libc_chflags libc_chflags
-//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chmod_trampoline()
-
-//go:linkname libc_chmod libc_chmod
-//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chown_trampoline()
-
-//go:linkname libc_chown libc_chown
-//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chroot_trampoline()
-
-//go:linkname libc_chroot libc_chroot
-//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_clock_gettime_trampoline()
-
-//go:linkname libc_clock_gettime libc_clock_gettime
-//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_close_trampoline()
-
-//go:linkname libc_close libc_close
-//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_dup_trampoline()
-
-//go:linkname libc_dup libc_dup
-//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_dup2_trampoline()
-
-//go:linkname libc_dup2 libc_dup2
-//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_exchangedata_trampoline()
-
-//go:linkname libc_exchangedata libc_exchangedata
-//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
- return
-}
-
-func libc_exit_trampoline()
-
-//go:linkname libc_exit libc_exit
-//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_faccessat_trampoline()
-
-//go:linkname libc_faccessat libc_faccessat
-//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchdir_trampoline()
-
-//go:linkname libc_fchdir libc_fchdir
-//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchflags_trampoline()
-
-//go:linkname libc_fchflags libc_fchflags
-//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchmod_trampoline()
-
-//go:linkname libc_fchmod libc_fchmod
-//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchmodat_trampoline()
-
-//go:linkname libc_fchmodat libc_fchmodat
-//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
-
-// 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_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchown_trampoline()
-
-//go:linkname libc_fchown libc_fchown
-//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchownat_trampoline()
-
-//go:linkname libc_fchownat libc_fchownat
-//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_flock_trampoline()
-
-//go:linkname libc_flock libc_flock
-//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fpathconf_trampoline()
-
-//go:linkname libc_fpathconf libc_fpathconf
-//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fsync_trampoline()
-
-//go:linkname libc_fsync libc_fsync
-//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ftruncate_trampoline()
-
-//go:linkname libc_ftruncate libc_ftruncate
-//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
- size = int(r0)
- return
-}
-
-func libc_getdtablesize_trampoline()
-
-//go:linkname libc_getdtablesize libc_getdtablesize
-//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
- egid = int(r0)
- return
-}
-
-func libc_getegid_trampoline()
-
-//go:linkname libc_getegid libc_getegid
-//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
- uid = int(r0)
- return
-}
-
-func libc_geteuid_trampoline()
-
-//go:linkname libc_geteuid libc_geteuid
-//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
- gid = int(r0)
- return
-}
-
-func libc_getgid_trampoline()
-
-//go:linkname libc_getgid libc_getgid
-//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getpgid_trampoline()
-
-//go:linkname libc_getpgid libc_getpgid
-//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-func libc_getpgrp_trampoline()
-
-//go:linkname libc_getpgrp libc_getpgrp
-//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
- pid = int(r0)
- return
-}
-
-func libc_getpid_trampoline()
-
-//go:linkname libc_getpid libc_getpid
-//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-func libc_getppid_trampoline()
-
-//go:linkname libc_getppid libc_getppid
-//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getpriority_trampoline()
-
-//go:linkname libc_getpriority libc_getpriority
-//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getrlimit_trampoline()
-
-//go:linkname libc_getrlimit libc_getrlimit
-//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getrusage_trampoline()
-
-//go:linkname libc_getrusage libc_getrusage
-//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getsid_trampoline()
-
-//go:linkname libc_getsid libc_getsid
-//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
- uid = int(r0)
- return
-}
-
-func libc_getuid_trampoline()
-
-//go:linkname libc_getuid libc_getuid
-//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-func libc_issetugid_trampoline()
-
-//go:linkname libc_issetugid libc_issetugid
-//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_kqueue_trampoline()
-
-//go:linkname libc_kqueue libc_kqueue
-//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
-
-// 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)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_lchown_trampoline()
-
-//go:linkname libc_lchown libc_lchown
-//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_link_trampoline()
-
-//go:linkname libc_link libc_link
-//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_linkat_trampoline()
-
-//go:linkname libc_linkat libc_linkat
-//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_listen_trampoline()
-
-//go:linkname libc_listen libc_listen
-//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mkdir_trampoline()
-
-//go:linkname libc_mkdir libc_mkdir
-//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mkdirat_trampoline()
-
-//go:linkname libc_mkdirat libc_mkdirat
-//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mkfifo_trampoline()
-
-//go:linkname libc_mkfifo libc_mkfifo
-//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mknod_trampoline()
-
-//go:linkname libc_mknod libc_mknod
-//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_open_trampoline()
-
-//go:linkname libc_open libc_open
-//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_openat_trampoline()
-
-//go:linkname libc_openat libc_openat
-//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pathconf_trampoline()
-
-//go:linkname libc_pathconf libc_pathconf
-//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pread_trampoline()
-
-//go:linkname libc_pread libc_pread
-//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pwrite_trampoline()
-
-//go:linkname libc_pwrite libc_pwrite
-//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_read_trampoline()
-
-//go:linkname libc_read libc_read
-//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_readlink_trampoline()
-
-//go:linkname libc_readlink libc_readlink
-//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_readlinkat_trampoline()
-
-//go:linkname libc_readlinkat libc_readlinkat
-//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_rename_trampoline()
-
-//go:linkname libc_rename libc_rename
-//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_renameat_trampoline()
-
-//go:linkname libc_renameat libc_renameat
-//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_revoke_trampoline()
-
-//go:linkname libc_revoke libc_revoke
-//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_rmdir_trampoline()
-
-//go:linkname libc_rmdir libc_rmdir
-//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := syscall_syscall6(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_lseek_trampoline()
-
-//go:linkname libc_lseek libc_lseek
-//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_select_trampoline()
-
-//go:linkname libc_select libc_select
-//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setegid_trampoline()
-
-//go:linkname libc_setegid libc_setegid
-//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_seteuid_trampoline()
-
-//go:linkname libc_seteuid libc_seteuid
-//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setgid_trampoline()
-
-//go:linkname libc_setgid libc_setgid
-//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setlogin_trampoline()
-
-//go:linkname libc_setlogin libc_setlogin
-//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setpgid_trampoline()
-
-//go:linkname libc_setpgid libc_setpgid
-//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setpriority_trampoline()
-
-//go:linkname libc_setpriority libc_setpriority
-//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setprivexec_trampoline()
-
-//go:linkname libc_setprivexec libc_setprivexec
-//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setregid_trampoline()
-
-//go:linkname libc_setregid libc_setregid
-//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setreuid_trampoline()
-
-//go:linkname libc_setreuid libc_setreuid
-//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setrlimit_trampoline()
-
-//go:linkname libc_setrlimit libc_setrlimit
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setsid_trampoline()
-
-//go:linkname libc_setsid libc_setsid
-//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_settimeofday_trampoline()
-
-//go:linkname libc_settimeofday libc_settimeofday
-//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setuid_trampoline()
-
-//go:linkname libc_setuid libc_setuid
-//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_symlink_trampoline()
-
-//go:linkname libc_symlink libc_symlink
-//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_symlinkat_trampoline()
-
-//go:linkname libc_symlinkat libc_symlinkat
-//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sync_trampoline()
-
-//go:linkname libc_sync libc_sync
-//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_truncate_trampoline()
-
-//go:linkname libc_truncate libc_truncate
-//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-func libc_umask_trampoline()
-
-//go:linkname libc_umask libc_umask
-//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_undelete_trampoline()
-
-//go:linkname libc_undelete libc_undelete
-//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_unlink_trampoline()
-
-//go:linkname libc_unlink libc_unlink
-//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_unlinkat_trampoline()
-
-//go:linkname libc_unlinkat libc_unlinkat
-//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_unmount_trampoline()
-
-//go:linkname libc_unmount libc_unmount
-//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_write_trampoline()
-
-//go:linkname libc_write libc_write
-//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := syscall_syscall9(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mmap_trampoline()
-
-//go:linkname libc_mmap libc_mmap
-//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_munmap_trampoline()
-
-//go:linkname libc_munmap libc_munmap
-//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ptrace_trampoline()
-
-//go:linkname libc_ptrace libc_ptrace
-//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fstat64_trampoline()
-
-//go:linkname libc_fstat64 libc_fstat64
-//go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fstatat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fstatat64_trampoline()
-
-//go:linkname libc_fstatat64 libc_fstatat64
-//go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstatfs64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fstatfs64_trampoline()
-
-//go:linkname libc_fstatfs64 libc_fstatfs64
-//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getfsstat64_trampoline()
-
-//go:linkname libc_getfsstat64 libc_getfsstat64
-//go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_lstat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_lstat64_trampoline()
-
-//go:linkname libc_lstat64 libc_lstat64
-//go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_stat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_stat64_trampoline()
-
-//go:linkname libc_stat64 libc_stat64
-//go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_statfs64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_statfs64_trampoline()
-
-//go:linkname libc_statfs64 libc_statfs64
-//go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
deleted file mode 100644
index 6836a41..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
+++ /dev/null
@@ -1,284 +0,0 @@
-// go run mkasm_darwin.go 386
-// Code generated by the command above; DO NOT EDIT.
-
-// +build go1.12
-
-#include "textflag.h"
-TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getgroups(SB)
-TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setgroups(SB)
-TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
- JMP libc_wait4(SB)
-TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
- JMP libc_accept(SB)
-TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
- JMP libc_bind(SB)
-TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
- JMP libc_connect(SB)
-TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
- JMP libc_socket(SB)
-TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getsockopt(SB)
-TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setsockopt(SB)
-TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpeername(SB)
-TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getsockname(SB)
-TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_shutdown(SB)
-TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
- JMP libc_socketpair(SB)
-TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
- JMP libc_recvfrom(SB)
-TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sendto(SB)
-TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
- JMP libc_recvmsg(SB)
-TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sendmsg(SB)
-TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
- JMP libc_kevent(SB)
-TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
- JMP libc_utimes(SB)
-TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
- JMP libc_futimes(SB)
-TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
- JMP libc_poll(SB)
-TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
- JMP libc_madvise(SB)
-TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mlock(SB)
-TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mlockall(SB)
-TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mprotect(SB)
-TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
- JMP libc_msync(SB)
-TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
- JMP libc_munlock(SB)
-TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
- JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
-TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pipe(SB)
-TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getxattr(SB)
-TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fgetxattr(SB)
-TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setxattr(SB)
-TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fsetxattr(SB)
-TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_removexattr(SB)
-TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fremovexattr(SB)
-TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_listxattr(SB)
-TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_flistxattr(SB)
-TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setattrlist(SB)
-TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fcntl(SB)
-TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
- JMP libc_kill(SB)
-TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ioctl(SB)
-TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sysctl(SB)
-TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sendfile(SB)
-TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
- JMP libc_access(SB)
-TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
- JMP libc_adjtime(SB)
-TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chdir(SB)
-TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chflags(SB)
-TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chmod(SB)
-TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chown(SB)
-TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chroot(SB)
-TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
- JMP libc_clock_gettime(SB)
-TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
- JMP libc_close(SB)
-TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
- JMP libc_dup(SB)
-TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
- JMP libc_dup2(SB)
-TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
- JMP libc_exchangedata(SB)
-TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
- JMP libc_exit(SB)
-TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_faccessat(SB)
-TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchdir(SB)
-TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchflags(SB)
-TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchmod(SB)
-TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchmodat(SB)
-TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchown(SB)
-TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchownat(SB)
-TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
- JMP libc_flock(SB)
-TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fpathconf(SB)
-TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fsync(SB)
-TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ftruncate(SB)
-TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getdtablesize(SB)
-TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getegid(SB)
-TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_geteuid(SB)
-TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getgid(SB)
-TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpgid(SB)
-TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpgrp(SB)
-TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpid(SB)
-TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getppid(SB)
-TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpriority(SB)
-TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getrlimit(SB)
-TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getrusage(SB)
-TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getsid(SB)
-TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getuid(SB)
-TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_issetugid(SB)
-TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
- JMP libc_kqueue(SB)
-TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_lchown(SB)
-TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
- JMP libc_link(SB)
-TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_linkat(SB)
-TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
- JMP libc_listen(SB)
-TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mkdir(SB)
-TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mkdirat(SB)
-TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mkfifo(SB)
-TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mknod(SB)
-TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
- JMP libc_open(SB)
-TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_openat(SB)
-TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pathconf(SB)
-TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pread(SB)
-TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pwrite(SB)
-TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
- JMP libc_read(SB)
-TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
- JMP libc_readlink(SB)
-TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_readlinkat(SB)
-TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
- JMP libc_rename(SB)
-TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_renameat(SB)
-TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
- JMP libc_revoke(SB)
-TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_rmdir(SB)
-TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
- JMP libc_lseek(SB)
-TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
- JMP libc_select(SB)
-TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setegid(SB)
-TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_seteuid(SB)
-TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setgid(SB)
-TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setlogin(SB)
-TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setpgid(SB)
-TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setpriority(SB)
-TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setprivexec(SB)
-TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setregid(SB)
-TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setreuid(SB)
-TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setsid(SB)
-TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_settimeofday(SB)
-TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setuid(SB)
-TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
- JMP libc_symlink(SB)
-TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_symlinkat(SB)
-TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sync(SB)
-TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
- JMP libc_truncate(SB)
-TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
- JMP libc_umask(SB)
-TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
- JMP libc_undelete(SB)
-TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
- JMP libc_unlink(SB)
-TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_unlinkat(SB)
-TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
- JMP libc_unmount(SB)
-TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
- JMP libc_write(SB)
-TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mmap(SB)
-TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
- JMP libc_munmap(SB)
-TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ptrace(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
-TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fstat64(SB)
-TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fstatat64(SB)
-TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fstatfs64(SB)
-TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getfsstat64(SB)
-TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_lstat64(SB)
-TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_stat64(SB)
-TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
- JMP libc_statfs64(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
index 314042a..a06eb09 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && amd64 && go1.13
// +build darwin,amd64,go1.13
package unix
@@ -15,27 +16,25 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_closedir_trampoline()
+var libc_closedir_trampoline_addr uintptr
-//go:linkname libc_closedir libc_closedir
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
res = Errno(r0)
return
}
-func libc_readdir_r_trampoline()
+var libc_readdir_r_trampoline_addr uintptr
-//go:linkname libc_readdir_r libc_readdir_r
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
index d671e83..d6c3e25 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
@@ -1,12 +1,25 @@
// go run mkasm_darwin.go amd64
// Code generated by the command above; DO NOT EDIT.
+//go:build go1.13
// +build go1.13
#include "textflag.h"
-TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
+
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fdopendir(SB)
-TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_closedir(SB)
-TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 50d6437..0ae0ed4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && amd64 && go1.12
// +build darwin,amd64,go1.12
package unix
@@ -15,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -23,30 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
-func libc_getgroups_trampoline()
+var libc_getgroups_trampoline_addr uintptr
-//go:linkname libc_getgroups libc_getgroups
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setgroups_trampoline()
+var libc_setgroups_trampoline_addr uintptr
-//go:linkname libc_setgroups libc_setgroups
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -54,15 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
-func libc_wait4_trampoline()
+var libc_wait4_trampoline_addr uintptr
-//go:linkname libc_wait4 libc_wait4
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
// 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_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -70,45 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
-func libc_accept_trampoline()
+var libc_accept_trampoline_addr uintptr
-//go:linkname libc_accept libc_accept
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_bind_trampoline()
+var libc_bind_trampoline_addr uintptr
-//go:linkname libc_bind libc_bind
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_connect_trampoline()
+var libc_connect_trampoline_addr uintptr
-//go:linkname libc_connect libc_connect
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -116,99 +111,92 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
-func libc_socket_trampoline()
+var libc_socket_trampoline_addr uintptr
-//go:linkname libc_socket libc_socket
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getsockopt_trampoline()
+var libc_getsockopt_trampoline_addr uintptr
-//go:linkname libc_getsockopt libc_getsockopt
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setsockopt_trampoline()
+var libc_setsockopt_trampoline_addr uintptr
-//go:linkname libc_setsockopt libc_setsockopt
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getpeername_trampoline()
+var libc_getpeername_trampoline_addr uintptr
-//go:linkname libc_getpeername libc_getpeername
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getsockname_trampoline()
+var libc_getsockname_trampoline_addr uintptr
-//go:linkname libc_getsockname libc_getsockname
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_shutdown_trampoline()
+var libc_shutdown_trampoline_addr uintptr
-//go:linkname libc_shutdown libc_shutdown
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_socketpair_trampoline()
+var libc_socketpair_trampoline_addr uintptr
-//go:linkname libc_socketpair libc_socketpair
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -220,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -228,9 +216,8 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
-func libc_recvfrom_trampoline()
+var libc_recvfrom_trampoline_addr uintptr
-//go:linkname libc_recvfrom libc_recvfrom
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -242,22 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sendto_trampoline()
+var libc_sendto_trampoline_addr uintptr
-//go:linkname libc_sendto libc_sendto
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -265,15 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
-func libc_recvmsg_trampoline()
+var libc_recvmsg_trampoline_addr uintptr
-//go:linkname libc_recvmsg libc_recvmsg
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -281,15 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
-func libc_sendmsg_trampoline()
+var libc_sendmsg_trampoline_addr uintptr
-//go:linkname libc_sendmsg libc_sendmsg
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -297,9 +281,8 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
-func libc_kevent_trampoline()
+var libc_kevent_trampoline_addr uintptr
-//go:linkname libc_kevent libc_kevent
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -310,37 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_utimes_trampoline()
+var libc_utimes_trampoline_addr uintptr
-//go:linkname libc_utimes libc_utimes
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_futimes_trampoline()
+var libc_futimes_trampoline_addr uintptr
-//go:linkname libc_futimes libc_futimes
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
// 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_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -348,9 +329,8 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
-func libc_poll_trampoline()
+var libc_poll_trampoline_addr uintptr
-//go:linkname libc_poll libc_poll
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -362,16 +342,15 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_madvise_trampoline()
+var libc_madvise_trampoline_addr uintptr
-//go:linkname libc_madvise libc_madvise
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -383,31 +362,29 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mlock_trampoline()
+var libc_mlock_trampoline_addr uintptr
-//go:linkname libc_mlock libc_mlock
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mlockall_trampoline()
+var libc_mlockall_trampoline_addr uintptr
-//go:linkname libc_mlockall libc_mlockall
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -419,16 +396,15 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mprotect_trampoline()
+var libc_mprotect_trampoline_addr uintptr
-//go:linkname libc_mprotect libc_mprotect
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -440,16 +416,15 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_msync_trampoline()
+var libc_msync_trampoline_addr uintptr
-//go:linkname libc_msync libc_msync
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -461,63 +436,43 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_munlock_trampoline()
+var libc_munlock_trampoline_addr uintptr
-//go:linkname libc_munlock libc_munlock
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_munlockall_trampoline()
+var libc_munlockall_trampoline_addr uintptr
-//go:linkname libc_munlockall libc_munlockall
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func pipe(p *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getattrlist_trampoline()
+var libc_pipe_trampoline_addr uintptr
-//go:linkname libc_getattrlist libc_getattrlist
-//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pipe_trampoline()
-
-//go:linkname libc_pipe libc_pipe
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -533,7 +488,7 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
+ r0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -541,9 +496,8 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
return
}
-func libc_getxattr_trampoline()
+var libc_getxattr_trampoline_addr uintptr
-//go:linkname libc_getxattr libc_getxattr
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -554,7 +508,7 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
+ r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -562,9 +516,8 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
return
}
-func libc_fgetxattr_trampoline()
+var libc_fgetxattr_trampoline_addr uintptr
-//go:linkname libc_fgetxattr libc_fgetxattr
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -580,16 +533,15 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setxattr_trampoline()
+var libc_setxattr_trampoline_addr uintptr
-//go:linkname libc_setxattr libc_setxattr
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -600,16 +552,15 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fsetxattr_trampoline()
+var libc_fsetxattr_trampoline_addr uintptr
-//go:linkname libc_fsetxattr libc_fsetxattr
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -625,16 +576,15 @@ func removexattr(path string, attr string, options int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+ _, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_removexattr_trampoline()
+var libc_removexattr_trampoline_addr uintptr
-//go:linkname libc_removexattr libc_removexattr
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -645,16 +595,15 @@ func fremovexattr(fd int, attr string, options int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
+ _, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fremovexattr_trampoline()
+var libc_fremovexattr_trampoline_addr uintptr
-//go:linkname libc_fremovexattr libc_fremovexattr
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -665,7 +614,7 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -673,15 +622,14 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
return
}
-func libc_listxattr_trampoline()
+var libc_listxattr_trampoline_addr uintptr
-//go:linkname libc_listxattr libc_listxattr
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -689,30 +637,28 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
return
}
-func libc_flistxattr_trampoline()
+var libc_flistxattr_trampoline_addr uintptr
-//go:linkname libc_flistxattr libc_flistxattr
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+ _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setattrlist_trampoline()
+var libc_setattrlist_trampoline_addr uintptr
-//go:linkname libc_setattrlist libc_setattrlist
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -720,39 +666,36 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
return
}
-func libc_fcntl_trampoline()
+var libc_fcntl_trampoline_addr uintptr
-//go:linkname libc_fcntl libc_fcntl
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_kill_trampoline()
+var libc_kill_trampoline_addr uintptr
-//go:linkname libc_kill libc_kill
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_ioctl_trampoline()
+var libc_ioctl_trampoline_addr uintptr
-//go:linkname libc_ioctl libc_ioctl
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -764,66 +707,121 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sysctl_trampoline()
+var libc_sysctl_trampoline_addr uintptr
-//go:linkname libc_sysctl libc_sysctl
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
+ _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sendfile_trampoline()
+var libc_sendfile_trampoline_addr uintptr
-//go:linkname libc_sendfile libc_sendfile
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
// 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)
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_access_trampoline()
+var libc_access_trampoline_addr uintptr
-//go:linkname libc_access libc_access
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_adjtime_trampoline()
+var libc_adjtime_trampoline_addr uintptr
-//go:linkname libc_adjtime libc_adjtime
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -834,16 +832,15 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chdir_trampoline()
+var libc_chdir_trampoline_addr uintptr
-//go:linkname libc_chdir libc_chdir
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -854,16 +851,15 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chflags_trampoline()
+var libc_chflags_trampoline_addr uintptr
-//go:linkname libc_chflags libc_chflags
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -874,16 +870,15 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chmod_trampoline()
+var libc_chmod_trampoline_addr uintptr
-//go:linkname libc_chmod libc_chmod
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -894,16 +889,15 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chown_trampoline()
+var libc_chown_trampoline_addr uintptr
-//go:linkname libc_chown libc_chown
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -914,52 +908,97 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chroot_trampoline()
+var libc_chroot_trampoline_addr uintptr
-//go:linkname libc_chroot libc_chroot
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_clock_gettime_trampoline()
+var libc_clock_gettime_trampoline_addr uintptr
-//go:linkname libc_clock_gettime libc_clock_gettime
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_close_trampoline()
+var libc_close_trampoline_addr uintptr
-//go:linkname libc_close libc_close
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Clonefile(src string, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_clonefile_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_clonefileat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -967,24 +1006,22 @@ func Dup(fd int) (nfd int, err error) {
return
}
-func libc_dup_trampoline()
+var libc_dup_trampoline_addr uintptr
-//go:linkname libc_dup libc_dup
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_dup2_trampoline()
+var libc_dup2_trampoline_addr uintptr
-//go:linkname libc_dup2 libc_dup2
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1000,28 +1037,26 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+ _, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_exchangedata_trampoline()
+var libc_exchangedata_trampoline_addr uintptr
-//go:linkname libc_exchangedata libc_exchangedata
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
-func libc_exit_trampoline()
+var libc_exit_trampoline_addr uintptr
-//go:linkname libc_exit libc_exit
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1032,61 +1067,57 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_faccessat_trampoline()
+var libc_faccessat_trampoline_addr uintptr
-//go:linkname libc_faccessat libc_faccessat
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchdir_trampoline()
+var libc_fchdir_trampoline_addr uintptr
-//go:linkname libc_fchdir libc_fchdir
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchflags_trampoline()
+var libc_fchflags_trampoline_addr uintptr
-//go:linkname libc_fchflags libc_fchflags
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchmod_trampoline()
+var libc_fchmod_trampoline_addr uintptr
-//go:linkname libc_fchmod libc_fchmod
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1097,31 +1128,29 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchmodat_trampoline()
+var libc_fchmodat_trampoline_addr uintptr
-//go:linkname libc_fchmodat libc_fchmodat
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
// 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_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchown_trampoline()
+var libc_fchown_trampoline_addr uintptr
-//go:linkname libc_fchown libc_fchown
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1132,37 +1161,54 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchownat_trampoline()
+var libc_fchownat_trampoline_addr uintptr
-//go:linkname libc_fchownat libc_fchownat
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fclonefileat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Flock(fd int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_flock_trampoline()
+var libc_flock_trampoline_addr uintptr
-//go:linkname libc_flock libc_flock
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1170,97 +1216,111 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
-func libc_fpathconf_trampoline()
+var libc_fpathconf_trampoline_addr uintptr
-//go:linkname libc_fpathconf libc_fpathconf
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fsync_trampoline()
+var libc_fsync_trampoline_addr uintptr
-//go:linkname libc_fsync libc_fsync
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_ftruncate_trampoline()
+var libc_ftruncate_trampoline_addr uintptr
-//go:linkname libc_ftruncate libc_ftruncate
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdtablesize() (size int) {
- r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0)
size = int(r0)
return
}
-func libc_getdtablesize_trampoline()
+var libc_getdtablesize_trampoline_addr uintptr
-//go:linkname libc_getdtablesize libc_getdtablesize
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
-func libc_getegid_trampoline()
+var libc_getegid_trampoline_addr uintptr
-//go:linkname libc_getegid libc_getegid
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
-func libc_geteuid_trampoline()
+var libc_geteuid_trampoline_addr uintptr
-//go:linkname libc_geteuid libc_geteuid
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
-func libc_getgid_trampoline()
+var libc_getgid_trampoline_addr uintptr
-//go:linkname libc_getgid libc_getgid
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1268,54 +1328,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
-func libc_getpgid_trampoline()
+var libc_getpgid_trampoline_addr uintptr
-//go:linkname libc_getpgid libc_getpgid
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
-func libc_getpgrp_trampoline()
+var libc_getpgrp_trampoline_addr uintptr
-//go:linkname libc_getpgrp libc_getpgrp
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
-func libc_getpid_trampoline()
+var libc_getpid_trampoline_addr uintptr
-//go:linkname libc_getpid libc_getpid
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
-func libc_getppid_trampoline()
+var libc_getppid_trampoline_addr uintptr
-//go:linkname libc_getppid libc_getppid
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1323,45 +1379,42 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
-func libc_getpriority_trampoline()
+var libc_getpriority_trampoline_addr uintptr
-//go:linkname libc_getpriority libc_getpriority
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getrlimit_trampoline()
+var libc_getrlimit_trampoline_addr uintptr
-//go:linkname libc_getrlimit libc_getrlimit
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getrusage_trampoline()
+var libc_getrusage_trampoline_addr uintptr
-//go:linkname libc_getrusage libc_getrusage
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1369,41 +1422,52 @@ func Getsid(pid int) (sid int, err error) {
return
}
-func libc_getsid_trampoline()
+var libc_getsid_trampoline_addr uintptr
-//go:linkname libc_getsid libc_getsid
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
-func libc_getuid_trampoline()
+var libc_getuid_trampoline_addr uintptr
-//go:linkname libc_getuid libc_getuid
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
-func libc_issetugid_trampoline()
+var libc_issetugid_trampoline_addr uintptr
-//go:linkname libc_issetugid libc_issetugid
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1411,9 +1475,8 @@ func Kqueue() (fd int, err error) {
return
}
-func libc_kqueue_trampoline()
+var libc_kqueue_trampoline_addr uintptr
-//go:linkname libc_kqueue libc_kqueue
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1424,16 +1487,15 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_lchown_trampoline()
+var libc_lchown_trampoline_addr uintptr
-//go:linkname libc_lchown libc_lchown
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1449,16 +1511,15 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_link_trampoline()
+var libc_link_trampoline_addr uintptr
-//go:linkname libc_link libc_link
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1474,31 +1535,29 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_linkat_trampoline()
+var libc_linkat_trampoline_addr uintptr
-//go:linkname libc_linkat libc_linkat
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_listen_trampoline()
+var libc_listen_trampoline_addr uintptr
-//go:linkname libc_listen libc_listen
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1509,16 +1568,15 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mkdir_trampoline()
+var libc_mkdir_trampoline_addr uintptr
-//go:linkname libc_mkdir libc_mkdir
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1529,16 +1587,15 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mkdirat_trampoline()
+var libc_mkdirat_trampoline_addr uintptr
-//go:linkname libc_mkdirat libc_mkdirat
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1549,16 +1606,15 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mkfifo_trampoline()
+var libc_mkfifo_trampoline_addr uintptr
-//go:linkname libc_mkfifo libc_mkfifo
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1569,16 +1625,15 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mknod_trampoline()
+var libc_mknod_trampoline_addr uintptr
-//go:linkname libc_mknod libc_mknod
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1589,7 +1644,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1597,9 +1652,8 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
-func libc_open_trampoline()
+var libc_open_trampoline_addr uintptr
-//go:linkname libc_open libc_open
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1610,7 +1664,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1618,9 +1672,8 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
-func libc_openat_trampoline()
+var libc_openat_trampoline_addr uintptr
-//go:linkname libc_openat libc_openat
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1631,7 +1684,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1639,9 +1692,8 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
-func libc_pathconf_trampoline()
+var libc_pathconf_trampoline_addr uintptr
-//go:linkname libc_pathconf libc_pathconf
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1653,7 +1705,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1661,9 +1713,8 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
-func libc_pread_trampoline()
+var libc_pread_trampoline_addr uintptr
-//go:linkname libc_pread libc_pread
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1675,7 +1726,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1683,9 +1734,8 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
-func libc_pwrite_trampoline()
+var libc_pwrite_trampoline_addr uintptr
-//go:linkname libc_pwrite libc_pwrite
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1697,7 +1747,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1705,9 +1755,8 @@ func read(fd int, p []byte) (n int, err error) {
return
}
-func libc_read_trampoline()
+var libc_read_trampoline_addr uintptr
-//go:linkname libc_read libc_read
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1724,7 +1773,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1732,9 +1781,8 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
-func libc_readlink_trampoline()
+var libc_readlink_trampoline_addr uintptr
-//go:linkname libc_readlink libc_readlink
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1751,7 +1799,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1759,9 +1807,8 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
-func libc_readlinkat_trampoline()
+var libc_readlinkat_trampoline_addr uintptr
-//go:linkname libc_readlinkat libc_readlinkat
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1777,16 +1824,15 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_rename_trampoline()
+var libc_rename_trampoline_addr uintptr
-//go:linkname libc_rename libc_rename
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1802,16 +1848,15 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_renameat_trampoline()
+var libc_renameat_trampoline_addr uintptr
-//go:linkname libc_renameat libc_renameat
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1822,16 +1867,15 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_revoke_trampoline()
+var libc_revoke_trampoline_addr uintptr
-//go:linkname libc_revoke libc_revoke
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1842,22 +1886,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_rmdir_trampoline()
+var libc_rmdir_trampoline_addr uintptr
-//go:linkname libc_rmdir libc_rmdir
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1865,15 +1908,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
-func libc_lseek_trampoline()
+var libc_lseek_trampoline_addr uintptr
-//go:linkname libc_lseek libc_lseek
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1881,54 +1923,50 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
-func libc_select_trampoline()
+var libc_select_trampoline_addr uintptr
-//go:linkname libc_select libc_select
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setegid_trampoline()
+var libc_setegid_trampoline_addr uintptr
-//go:linkname libc_setegid libc_setegid
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_seteuid_trampoline()
+var libc_seteuid_trampoline_addr uintptr
-//go:linkname libc_seteuid libc_seteuid
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setgid_trampoline()
+var libc_setgid_trampoline_addr uintptr
-//go:linkname libc_setgid libc_setgid
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1939,112 +1977,105 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setlogin_trampoline()
+var libc_setlogin_trampoline_addr uintptr
-//go:linkname libc_setlogin libc_setlogin
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setpgid_trampoline()
+var libc_setpgid_trampoline_addr uintptr
-//go:linkname libc_setpgid libc_setpgid
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setpriority_trampoline()
+var libc_setpriority_trampoline_addr uintptr
-//go:linkname libc_setpriority libc_setpriority
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setprivexec(flag int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setprivexec_trampoline()
+var libc_setprivexec_trampoline_addr uintptr
-//go:linkname libc_setprivexec libc_setprivexec
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setregid_trampoline()
+var libc_setregid_trampoline_addr uintptr
-//go:linkname libc_setregid libc_setregid
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setreuid_trampoline()
+var libc_setreuid_trampoline_addr uintptr
-//go:linkname libc_setreuid libc_setreuid
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setrlimit_trampoline()
+var libc_setrlimit_trampoline_addr uintptr
-//go:linkname libc_setrlimit libc_setrlimit
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2052,39 +2083,36 @@ func Setsid() (pid int, err error) {
return
}
-func libc_setsid_trampoline()
+var libc_setsid_trampoline_addr uintptr
-//go:linkname libc_setsid libc_setsid
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_settimeofday_trampoline()
+var libc_settimeofday_trampoline_addr uintptr
-//go:linkname libc_settimeofday libc_settimeofday
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setuid_trampoline()
+var libc_setuid_trampoline_addr uintptr
-//go:linkname libc_setuid libc_setuid
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2100,16 +2128,15 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_symlink_trampoline()
+var libc_symlink_trampoline_addr uintptr
-//go:linkname libc_symlink libc_symlink
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2125,31 +2152,29 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_symlinkat_trampoline()
+var libc_symlinkat_trampoline_addr uintptr
-//go:linkname libc_symlinkat libc_symlinkat
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sync_trampoline()
+var libc_sync_trampoline_addr uintptr
-//go:linkname libc_sync libc_sync
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2160,29 +2185,27 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_truncate_trampoline()
+var libc_truncate_trampoline_addr uintptr
-//go:linkname libc_truncate libc_truncate
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
-func libc_umask_trampoline()
+var libc_umask_trampoline_addr uintptr
-//go:linkname libc_umask libc_umask
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2193,16 +2216,15 @@ func Undelete(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_undelete_trampoline()
+var libc_undelete_trampoline_addr uintptr
-//go:linkname libc_undelete libc_undelete
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2213,16 +2235,15 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_unlink_trampoline()
+var libc_unlink_trampoline_addr uintptr
-//go:linkname libc_unlink libc_unlink
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2233,16 +2254,15 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_unlinkat_trampoline()
+var libc_unlinkat_trampoline_addr uintptr
-//go:linkname libc_unlinkat libc_unlinkat
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2253,16 +2273,15 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_unmount_trampoline()
+var libc_unmount_trampoline_addr uintptr
-//go:linkname libc_unmount libc_unmount
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2274,7 +2293,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2282,15 +2301,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
-func libc_write_trampoline()
+var libc_write_trampoline_addr uintptr
-//go:linkname libc_write libc_write
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2298,30 +2316,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
-func libc_mmap_trampoline()
+var libc_mmap_trampoline_addr uintptr
-//go:linkname libc_mmap libc_mmap
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_munmap_trampoline()
+var libc_munmap_trampoline_addr uintptr
-//go:linkname libc_munmap libc_munmap
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2332,7 +2348,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2342,49 +2358,16 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ptrace_trampoline()
-
-//go:linkname libc_ptrace libc_ptrace
-//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fstat64_trampoline()
+var libc_fstat64_trampoline_addr uintptr
-//go:linkname libc_fstat64 libc_fstat64
//go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2395,37 +2378,35 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fstatat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fstatat64_trampoline()
+var libc_fstatat64_trampoline_addr uintptr
-//go:linkname libc_fstatat64 libc_fstatat64
//go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstatfs64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fstatfs64_trampoline()
+var libc_fstatfs64_trampoline_addr uintptr
-//go:linkname libc_fstatfs64 libc_fstatfs64
//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_getfsstat64_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2433,9 +2414,8 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
return
}
-func libc_getfsstat64_trampoline()
+var libc_getfsstat64_trampoline_addr uintptr
-//go:linkname libc_getfsstat64 libc_getfsstat64
//go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2446,36 +2426,48 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_lstat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_lstat64_trampoline()
+var libc_lstat64_trampoline_addr uintptr
-//go:linkname libc_lstat64 libc_lstat64
//go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ptrace_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_stat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_stat64_trampoline()
+var libc_stat64_trampoline_addr uintptr
-//go:linkname libc_stat64 libc_stat64
//go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2486,14 +2478,13 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_statfs64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_statfs64_trampoline()
+var libc_statfs64_trampoline_addr uintptr
-//go:linkname libc_statfs64 libc_statfs64
//go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index a3fdf09..eac6ca8 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -1,284 +1,883 @@
// go run mkasm_darwin.go amd64
// Code generated by the command above; DO NOT EDIT.
+//go:build go1.12
// +build go1.12
#include "textflag.h"
-TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
-TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgroups(SB)
-TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_wait4(SB)
-TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_accept(SB)
-TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_bind(SB)
-TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_connect(SB)
-TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socket(SB)
-TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockopt(SB)
-TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsockopt(SB)
-TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpeername(SB)
-TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockname(SB)
-TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shutdown(SB)
-TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socketpair(SB)
-TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvfrom(SB)
-TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendto(SB)
-TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvmsg(SB)
-TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
-TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
-TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_futimes(SB)
-TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_poll(SB)
-TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_madvise(SB)
-TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlock(SB)
-TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlockall(SB)
-TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mprotect(SB)
-TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_msync(SB)
-TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
-TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
-TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
-TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pipe_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB)
+
+TEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getxattr(SB)
-TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB)
+
+TEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fgetxattr(SB)
-TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fgetxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB)
+
+TEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setxattr(SB)
-TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB)
+
+TEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsetxattr(SB)
-TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fsetxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB)
+
+TEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_removexattr(SB)
-TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_removexattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB)
+
+TEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fremovexattr(SB)
-TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fremovexattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB)
+
+TEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listxattr(SB)
-TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_listxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB)
+
+TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flistxattr(SB)
-TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
+
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setattrlist(SB)
-TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
-TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
-TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
-TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sysctl(SB)
-TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
-TEXT ·libc_access_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)
-TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_adjtime(SB)
-TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chdir(SB)
-TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chflags(SB)
-TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chmod(SB)
-TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chown(SB)
-TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chroot(SB)
-TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
-TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_close(SB)
-TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_clonefile(SB)
+
+GLOBL ·libc_clonefile_trampoline_addr(SB), RODATA, $8
+DATA ·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB)
+
+TEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_clonefileat(SB)
+
+GLOBL ·libc_clonefileat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
-TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup2(SB)
-TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exchangedata(SB)
-TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_exchangedata_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exit(SB)
-TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_faccessat(SB)
-TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchdir(SB)
-TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchflags(SB)
-TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmod(SB)
-TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmodat(SB)
-TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
-TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
-TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fclonefileat(SB)
+
+GLOBL ·libc_fclonefileat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
-TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fpathconf(SB)
-TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
-TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
-TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
-TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getdtablesize_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getegid(SB)
-TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_geteuid(SB)
-TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgid(SB)
-TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgid(SB)
-TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgrp(SB)
-TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpid(SB)
-TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getppid(SB)
-TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpriority(SB)
-TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrlimit(SB)
-TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
-TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
-TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
-TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_issetugid(SB)
-TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kqueue(SB)
-TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lchown(SB)
-TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_link(SB)
-TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_linkat(SB)
-TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listen(SB)
-TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdir(SB)
-TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdirat(SB)
-TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkfifo(SB)
-TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mknod(SB)
-TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)
-TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_openat(SB)
-TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pathconf(SB)
-TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pread(SB)
-TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pwrite(SB)
-TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
-TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlink(SB)
-TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlinkat(SB)
-TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rename(SB)
-TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_renameat(SB)
-TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_revoke(SB)
-TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rmdir(SB)
-TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lseek(SB)
-TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_select(SB)
-TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setegid(SB)
-TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_seteuid(SB)
-TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgid(SB)
-TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setlogin(SB)
-TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpgid(SB)
-TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpriority(SB)
-TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setprivexec(SB)
-TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setprivexec_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setregid(SB)
-TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setreuid(SB)
-TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrlimit(SB)
-TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsid(SB)
-TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_settimeofday(SB)
-TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setuid(SB)
-TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlink(SB)
-TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlinkat(SB)
-TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sync(SB)
-TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_truncate(SB)
-TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_umask(SB)
-TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_undelete(SB)
-TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_undelete_trampoline_addr(SB), RODATA, $8
+DATA ·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlink(SB)
-TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlinkat(SB)
-TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unmount(SB)
-TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_write(SB)
-TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
-TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ptrace(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
-TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_fstat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstat64(SB)
-TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fstat64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat64_trampoline_addr(SB)/8, $libc_fstat64_trampoline<>(SB)
+
+TEXT libc_fstatat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatat64(SB)
-TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fstatat64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat64_trampoline_addr(SB)/8, $libc_fstatat64_trampoline<>(SB)
+
+TEXT libc_fstatfs64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatfs64(SB)
-TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fstatfs64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs64_trampoline_addr(SB)/8, $libc_fstatfs64_trampoline<>(SB)
+
+TEXT libc_getfsstat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getfsstat64(SB)
-TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getfsstat64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat64_trampoline_addr(SB)/8, $libc_getfsstat64_trampoline<>(SB)
+
+TEXT libc_lstat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lstat64(SB)
-TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_lstat64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat64_trampoline_addr(SB)/8, $libc_lstat64_trampoline<>(SB)
+
+TEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ptrace(SB)
+
+GLOBL ·libc_ptrace_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB)
+
+TEXT libc_stat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_stat64(SB)
-TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_stat64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat64_trampoline_addr(SB)/8, $libc_stat64_trampoline<>(SB)
+
+TEXT libc_statfs64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_statfs64(SB)
+
+GLOBL ·libc_statfs64_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs64_trampoline_addr(SB)/8, $libc_statfs64_trampoline<>(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
deleted file mode 100644
index cea04e0..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
+++ /dev/null
@@ -1,1784 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,arm,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.1_11.go syscall_darwin_arm.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,arm,!go1.12
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(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 utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 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 Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// 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)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 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 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 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)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
deleted file mode 100644
index f519ce9..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,arm,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_closedir_trampoline()
-
-//go:linkname libc_closedir libc_closedir
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-func libc_readdir_r_trampoline()
-
-//go:linkname libc_readdir_r libc_readdir_r
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s
deleted file mode 100644
index 488e557..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s
+++ /dev/null
@@ -1,12 +0,0 @@
-// go run mkasm_darwin.go arm
-// Code generated by the command above; DO NOT EDIT.
-
-// +build go1.13
-
-#include "textflag.h"
-TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
deleted file mode 100644
index 6310395..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ /dev/null
@@ -1,2484 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,arm,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,arm,go1.12
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getgroups_trampoline()
-
-//go:linkname libc_getgroups libc_getgroups
-//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setgroups_trampoline()
-
-//go:linkname libc_setgroups libc_setgroups
-//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_wait4_trampoline()
-
-//go:linkname libc_wait4 libc_wait4
-//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
-
-// 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_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_accept_trampoline()
-
-//go:linkname libc_accept libc_accept
-//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_bind_trampoline()
-
-//go:linkname libc_bind libc_bind
-//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_connect_trampoline()
-
-//go:linkname libc_connect libc_connect
-//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_socket_trampoline()
-
-//go:linkname libc_socket libc_socket
-//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getsockopt_trampoline()
-
-//go:linkname libc_getsockopt libc_getsockopt
-//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setsockopt_trampoline()
-
-//go:linkname libc_setsockopt libc_setsockopt
-//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getpeername_trampoline()
-
-//go:linkname libc_getpeername libc_getpeername
-//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getsockname_trampoline()
-
-//go:linkname libc_getsockname libc_getsockname
-//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_shutdown_trampoline()
-
-//go:linkname libc_shutdown libc_shutdown
-//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_socketpair_trampoline()
-
-//go:linkname libc_socketpair libc_socketpair
-//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_recvfrom_trampoline()
-
-//go:linkname libc_recvfrom libc_recvfrom
-//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sendto_trampoline()
-
-//go:linkname libc_sendto libc_sendto
-//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_recvmsg_trampoline()
-
-//go:linkname libc_recvmsg libc_recvmsg
-//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sendmsg_trampoline()
-
-//go:linkname libc_sendmsg libc_sendmsg
-//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_kevent_trampoline()
-
-//go:linkname libc_kevent libc_kevent
-//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_utimes_trampoline()
-
-//go:linkname libc_utimes libc_utimes
-//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_futimes_trampoline()
-
-//go:linkname libc_futimes libc_futimes
-//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
-
-// 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_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_poll_trampoline()
-
-//go:linkname libc_poll libc_poll
-//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_madvise_trampoline()
-
-//go:linkname libc_madvise libc_madvise
-//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mlock_trampoline()
-
-//go:linkname libc_mlock libc_mlock
-//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mlockall_trampoline()
-
-//go:linkname libc_mlockall libc_mlockall
-//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mprotect_trampoline()
-
-//go:linkname libc_mprotect libc_mprotect
-//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_msync_trampoline()
-
-//go:linkname libc_msync libc_msync
-//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_munlock_trampoline()
-
-//go:linkname libc_munlock libc_munlock
-//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_munlockall_trampoline()
-
-//go:linkname libc_munlockall libc_munlockall
-//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getattrlist_trampoline()
-
-//go:linkname libc_getattrlist libc_getattrlist
-//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pipe_trampoline()
-
-//go:linkname libc_pipe libc_pipe
-//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getxattr_trampoline()
-
-//go:linkname libc_getxattr libc_getxattr
-//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fgetxattr_trampoline()
-
-//go:linkname libc_fgetxattr libc_fgetxattr
-//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setxattr_trampoline()
-
-//go:linkname libc_setxattr libc_setxattr
-//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fsetxattr_trampoline()
-
-//go:linkname libc_fsetxattr libc_fsetxattr
-//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_removexattr_trampoline()
-
-//go:linkname libc_removexattr libc_removexattr
-//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fremovexattr_trampoline()
-
-//go:linkname libc_fremovexattr libc_fremovexattr
-//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_listxattr_trampoline()
-
-//go:linkname libc_listxattr libc_listxattr
-//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_flistxattr_trampoline()
-
-//go:linkname libc_flistxattr libc_flistxattr
-//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setattrlist_trampoline()
-
-//go:linkname libc_setattrlist libc_setattrlist
-//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fcntl_trampoline()
-
-//go:linkname libc_fcntl libc_fcntl
-//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_kill_trampoline()
-
-//go:linkname libc_kill libc_kill
-//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ioctl_trampoline()
-
-//go:linkname libc_ioctl libc_ioctl
-//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sysctl_trampoline()
-
-//go:linkname libc_sysctl libc_sysctl
-//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sendfile_trampoline()
-
-//go:linkname libc_sendfile libc_sendfile
-//go:cgo_import_dynamic libc_sendfile sendfile "/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)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_access_trampoline()
-
-//go:linkname libc_access libc_access
-//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_adjtime_trampoline()
-
-//go:linkname libc_adjtime libc_adjtime
-//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chdir_trampoline()
-
-//go:linkname libc_chdir libc_chdir
-//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chflags_trampoline()
-
-//go:linkname libc_chflags libc_chflags
-//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chmod_trampoline()
-
-//go:linkname libc_chmod libc_chmod
-//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chown_trampoline()
-
-//go:linkname libc_chown libc_chown
-//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_chroot_trampoline()
-
-//go:linkname libc_chroot libc_chroot
-//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_clock_gettime_trampoline()
-
-//go:linkname libc_clock_gettime libc_clock_gettime
-//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_close_trampoline()
-
-//go:linkname libc_close libc_close
-//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_dup_trampoline()
-
-//go:linkname libc_dup libc_dup
-//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_dup2_trampoline()
-
-//go:linkname libc_dup2 libc_dup2
-//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_exchangedata_trampoline()
-
-//go:linkname libc_exchangedata libc_exchangedata
-//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
- return
-}
-
-func libc_exit_trampoline()
-
-//go:linkname libc_exit libc_exit
-//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_faccessat_trampoline()
-
-//go:linkname libc_faccessat libc_faccessat
-//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchdir_trampoline()
-
-//go:linkname libc_fchdir libc_fchdir
-//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchflags_trampoline()
-
-//go:linkname libc_fchflags libc_fchflags
-//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchmod_trampoline()
-
-//go:linkname libc_fchmod libc_fchmod
-//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchmodat_trampoline()
-
-//go:linkname libc_fchmodat libc_fchmodat
-//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
-
-// 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_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchown_trampoline()
-
-//go:linkname libc_fchown libc_fchown
-//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fchownat_trampoline()
-
-//go:linkname libc_fchownat libc_fchownat
-//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_flock_trampoline()
-
-//go:linkname libc_flock libc_flock
-//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fpathconf_trampoline()
-
-//go:linkname libc_fpathconf libc_fpathconf
-//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fsync_trampoline()
-
-//go:linkname libc_fsync libc_fsync
-//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ftruncate_trampoline()
-
-//go:linkname libc_ftruncate libc_ftruncate
-//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
- size = int(r0)
- return
-}
-
-func libc_getdtablesize_trampoline()
-
-//go:linkname libc_getdtablesize libc_getdtablesize
-//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
- egid = int(r0)
- return
-}
-
-func libc_getegid_trampoline()
-
-//go:linkname libc_getegid libc_getegid
-//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
- uid = int(r0)
- return
-}
-
-func libc_geteuid_trampoline()
-
-//go:linkname libc_geteuid libc_geteuid
-//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
- gid = int(r0)
- return
-}
-
-func libc_getgid_trampoline()
-
-//go:linkname libc_getgid libc_getgid
-//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getpgid_trampoline()
-
-//go:linkname libc_getpgid libc_getpgid
-//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-func libc_getpgrp_trampoline()
-
-//go:linkname libc_getpgrp libc_getpgrp
-//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
- pid = int(r0)
- return
-}
-
-func libc_getpid_trampoline()
-
-//go:linkname libc_getpid libc_getpid
-//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-func libc_getppid_trampoline()
-
-//go:linkname libc_getppid libc_getppid
-//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getpriority_trampoline()
-
-//go:linkname libc_getpriority libc_getpriority
-//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getrlimit_trampoline()
-
-//go:linkname libc_getrlimit libc_getrlimit
-//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getrusage_trampoline()
-
-//go:linkname libc_getrusage libc_getrusage
-//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getsid_trampoline()
-
-//go:linkname libc_getsid libc_getsid
-//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
- uid = int(r0)
- return
-}
-
-func libc_getuid_trampoline()
-
-//go:linkname libc_getuid libc_getuid
-//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-func libc_issetugid_trampoline()
-
-//go:linkname libc_issetugid libc_issetugid
-//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_kqueue_trampoline()
-
-//go:linkname libc_kqueue libc_kqueue
-//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
-
-// 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)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_lchown_trampoline()
-
-//go:linkname libc_lchown libc_lchown
-//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_link_trampoline()
-
-//go:linkname libc_link libc_link
-//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_linkat_trampoline()
-
-//go:linkname libc_linkat libc_linkat
-//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_listen_trampoline()
-
-//go:linkname libc_listen libc_listen
-//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mkdir_trampoline()
-
-//go:linkname libc_mkdir libc_mkdir
-//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mkdirat_trampoline()
-
-//go:linkname libc_mkdirat libc_mkdirat
-//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mkfifo_trampoline()
-
-//go:linkname libc_mkfifo libc_mkfifo
-//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mknod_trampoline()
-
-//go:linkname libc_mknod libc_mknod
-//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_open_trampoline()
-
-//go:linkname libc_open libc_open
-//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_openat_trampoline()
-
-//go:linkname libc_openat libc_openat
-//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pathconf_trampoline()
-
-//go:linkname libc_pathconf libc_pathconf
-//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pread_trampoline()
-
-//go:linkname libc_pread libc_pread
-//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pwrite_trampoline()
-
-//go:linkname libc_pwrite libc_pwrite
-//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_read_trampoline()
-
-//go:linkname libc_read libc_read
-//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_readlink_trampoline()
-
-//go:linkname libc_readlink libc_readlink
-//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_readlinkat_trampoline()
-
-//go:linkname libc_readlinkat libc_readlinkat
-//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_rename_trampoline()
-
-//go:linkname libc_rename libc_rename
-//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_renameat_trampoline()
-
-//go:linkname libc_renameat libc_renameat
-//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_revoke_trampoline()
-
-//go:linkname libc_revoke libc_revoke
-//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_rmdir_trampoline()
-
-//go:linkname libc_rmdir libc_rmdir
-//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := syscall_syscall6(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_lseek_trampoline()
-
-//go:linkname libc_lseek libc_lseek
-//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_select_trampoline()
-
-//go:linkname libc_select libc_select
-//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setegid_trampoline()
-
-//go:linkname libc_setegid libc_setegid
-//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_seteuid_trampoline()
-
-//go:linkname libc_seteuid libc_seteuid
-//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setgid_trampoline()
-
-//go:linkname libc_setgid libc_setgid
-//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setlogin_trampoline()
-
-//go:linkname libc_setlogin libc_setlogin
-//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setpgid_trampoline()
-
-//go:linkname libc_setpgid libc_setpgid
-//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setpriority_trampoline()
-
-//go:linkname libc_setpriority libc_setpriority
-//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setprivexec_trampoline()
-
-//go:linkname libc_setprivexec libc_setprivexec
-//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setregid_trampoline()
-
-//go:linkname libc_setregid libc_setregid
-//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setreuid_trampoline()
-
-//go:linkname libc_setreuid libc_setreuid
-//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setrlimit_trampoline()
-
-//go:linkname libc_setrlimit libc_setrlimit
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setsid_trampoline()
-
-//go:linkname libc_setsid libc_setsid
-//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_settimeofday_trampoline()
-
-//go:linkname libc_settimeofday libc_settimeofday
-//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_setuid_trampoline()
-
-//go:linkname libc_setuid libc_setuid
-//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_symlink_trampoline()
-
-//go:linkname libc_symlink libc_symlink
-//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_symlinkat_trampoline()
-
-//go:linkname libc_symlinkat libc_symlinkat
-//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_sync_trampoline()
-
-//go:linkname libc_sync libc_sync
-//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_truncate_trampoline()
-
-//go:linkname libc_truncate libc_truncate
-//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-func libc_umask_trampoline()
-
-//go:linkname libc_umask libc_umask
-//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_undelete_trampoline()
-
-//go:linkname libc_undelete libc_undelete
-//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_unlink_trampoline()
-
-//go:linkname libc_unlink libc_unlink
-//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_unlinkat_trampoline()
-
-//go:linkname libc_unlinkat libc_unlinkat
-//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_unmount_trampoline()
-
-//go:linkname libc_unmount libc_unmount
-//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_write_trampoline()
-
-//go:linkname libc_write libc_write
-//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := syscall_syscall9(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_mmap_trampoline()
-
-//go:linkname libc_mmap libc_mmap
-//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_munmap_trampoline()
-
-//go:linkname libc_munmap libc_munmap
-//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fstat_trampoline()
-
-//go:linkname libc_fstat libc_fstat
-//go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall6(funcPC(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fstatat_trampoline()
-
-//go:linkname libc_fstatat libc_fstatat
-//go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_fstatfs_trampoline()
-
-//go:linkname libc_fstatfs libc_fstatfs
-//go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_getfsstat_trampoline()
-
-//go:linkname libc_getfsstat libc_getfsstat
-//go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_lstat_trampoline()
-
-//go:linkname libc_lstat libc_lstat
-//go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_stat_trampoline()
-
-//go:linkname libc_stat libc_stat
-//go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := syscall_syscall(funcPC(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_statfs_trampoline()
-
-//go:linkname libc_statfs libc_statfs
-//go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
deleted file mode 100644
index b67f518..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
+++ /dev/null
@@ -1,282 +0,0 @@
-// go run mkasm_darwin.go arm
-// Code generated by the command above; DO NOT EDIT.
-
-// +build go1.12
-
-#include "textflag.h"
-TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getgroups(SB)
-TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setgroups(SB)
-TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
- JMP libc_wait4(SB)
-TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
- JMP libc_accept(SB)
-TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
- JMP libc_bind(SB)
-TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
- JMP libc_connect(SB)
-TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
- JMP libc_socket(SB)
-TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getsockopt(SB)
-TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setsockopt(SB)
-TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpeername(SB)
-TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getsockname(SB)
-TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_shutdown(SB)
-TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
- JMP libc_socketpair(SB)
-TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
- JMP libc_recvfrom(SB)
-TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sendto(SB)
-TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
- JMP libc_recvmsg(SB)
-TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sendmsg(SB)
-TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
- JMP libc_kevent(SB)
-TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
- JMP libc_utimes(SB)
-TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
- JMP libc_futimes(SB)
-TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
- JMP libc_poll(SB)
-TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
- JMP libc_madvise(SB)
-TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mlock(SB)
-TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mlockall(SB)
-TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mprotect(SB)
-TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
- JMP libc_msync(SB)
-TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
- JMP libc_munlock(SB)
-TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
- JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
-TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pipe(SB)
-TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getxattr(SB)
-TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fgetxattr(SB)
-TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setxattr(SB)
-TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fsetxattr(SB)
-TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_removexattr(SB)
-TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fremovexattr(SB)
-TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_listxattr(SB)
-TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
- JMP libc_flistxattr(SB)
-TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setattrlist(SB)
-TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fcntl(SB)
-TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
- JMP libc_kill(SB)
-TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ioctl(SB)
-TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sysctl(SB)
-TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sendfile(SB)
-TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
- JMP libc_access(SB)
-TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
- JMP libc_adjtime(SB)
-TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chdir(SB)
-TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chflags(SB)
-TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chmod(SB)
-TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chown(SB)
-TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
- JMP libc_chroot(SB)
-TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
- JMP libc_clock_gettime(SB)
-TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
- JMP libc_close(SB)
-TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
- JMP libc_dup(SB)
-TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
- JMP libc_dup2(SB)
-TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
- JMP libc_exchangedata(SB)
-TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
- JMP libc_exit(SB)
-TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_faccessat(SB)
-TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchdir(SB)
-TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchflags(SB)
-TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchmod(SB)
-TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchmodat(SB)
-TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchown(SB)
-TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fchownat(SB)
-TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
- JMP libc_flock(SB)
-TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fpathconf(SB)
-TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fsync(SB)
-TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ftruncate(SB)
-TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getdtablesize(SB)
-TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getegid(SB)
-TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_geteuid(SB)
-TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getgid(SB)
-TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpgid(SB)
-TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpgrp(SB)
-TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpid(SB)
-TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getppid(SB)
-TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getpriority(SB)
-TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getrlimit(SB)
-TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getrusage(SB)
-TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getsid(SB)
-TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getuid(SB)
-TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_issetugid(SB)
-TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
- JMP libc_kqueue(SB)
-TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
- JMP libc_lchown(SB)
-TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
- JMP libc_link(SB)
-TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_linkat(SB)
-TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
- JMP libc_listen(SB)
-TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mkdir(SB)
-TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mkdirat(SB)
-TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mkfifo(SB)
-TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mknod(SB)
-TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
- JMP libc_open(SB)
-TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_openat(SB)
-TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pathconf(SB)
-TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pread(SB)
-TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
- JMP libc_pwrite(SB)
-TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
- JMP libc_read(SB)
-TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
- JMP libc_readlink(SB)
-TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_readlinkat(SB)
-TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
- JMP libc_rename(SB)
-TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_renameat(SB)
-TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
- JMP libc_revoke(SB)
-TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
- JMP libc_rmdir(SB)
-TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
- JMP libc_lseek(SB)
-TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
- JMP libc_select(SB)
-TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setegid(SB)
-TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_seteuid(SB)
-TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setgid(SB)
-TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setlogin(SB)
-TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setpgid(SB)
-TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setpriority(SB)
-TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setprivexec(SB)
-TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setregid(SB)
-TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setreuid(SB)
-TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setsid(SB)
-TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_settimeofday(SB)
-TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
- JMP libc_setuid(SB)
-TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
- JMP libc_symlink(SB)
-TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_symlinkat(SB)
-TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
- JMP libc_sync(SB)
-TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
- JMP libc_truncate(SB)
-TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
- JMP libc_umask(SB)
-TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
- JMP libc_undelete(SB)
-TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
- JMP libc_unlink(SB)
-TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_unlinkat(SB)
-TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
- JMP libc_unmount(SB)
-TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
- JMP libc_write(SB)
-TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
- JMP libc_mmap(SB)
-TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
- JMP libc_munmap(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
-TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fstat(SB)
-TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fstatat(SB)
-TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
- JMP libc_fstatfs(SB)
-TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getfsstat(SB)
-TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_lstat(SB)
-TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
- JMP libc_stat(SB)
-TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
- JMP libc_statfs(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
index d64e6c8..cec595d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && arm64 && go1.13
// +build darwin,arm64,go1.13
package unix
@@ -15,27 +16,25 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_closedir_trampoline()
+var libc_closedir_trampoline_addr uintptr
-//go:linkname libc_closedir libc_closedir
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
res = Errno(r0)
return
}
-func libc_readdir_r_trampoline()
+var libc_readdir_r_trampoline_addr uintptr
-//go:linkname libc_readdir_r libc_readdir_r
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
index b29dabb..3579897 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
@@ -1,12 +1,25 @@
// go run mkasm_darwin.go arm64
// Code generated by the command above; DO NOT EDIT.
+//go:build go1.13
// +build go1.13
#include "textflag.h"
-TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
+
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fdopendir(SB)
-TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_closedir(SB)
-TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index a8709f7..cf71be3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && arm64 && go1.12
// +build darwin,arm64,go1.12
package unix
@@ -15,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -23,30 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
-func libc_getgroups_trampoline()
+var libc_getgroups_trampoline_addr uintptr
-//go:linkname libc_getgroups libc_getgroups
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setgroups_trampoline()
+var libc_setgroups_trampoline_addr uintptr
-//go:linkname libc_setgroups libc_setgroups
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -54,15 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
-func libc_wait4_trampoline()
+var libc_wait4_trampoline_addr uintptr
-//go:linkname libc_wait4 libc_wait4
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
// 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_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -70,45 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
-func libc_accept_trampoline()
+var libc_accept_trampoline_addr uintptr
-//go:linkname libc_accept libc_accept
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_bind_trampoline()
+var libc_bind_trampoline_addr uintptr
-//go:linkname libc_bind libc_bind
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_connect_trampoline()
+var libc_connect_trampoline_addr uintptr
-//go:linkname libc_connect libc_connect
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -116,99 +111,92 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
-func libc_socket_trampoline()
+var libc_socket_trampoline_addr uintptr
-//go:linkname libc_socket libc_socket
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getsockopt_trampoline()
+var libc_getsockopt_trampoline_addr uintptr
-//go:linkname libc_getsockopt libc_getsockopt
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setsockopt_trampoline()
+var libc_setsockopt_trampoline_addr uintptr
-//go:linkname libc_setsockopt libc_setsockopt
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getpeername_trampoline()
+var libc_getpeername_trampoline_addr uintptr
-//go:linkname libc_getpeername libc_getpeername
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getsockname_trampoline()
+var libc_getsockname_trampoline_addr uintptr
-//go:linkname libc_getsockname libc_getsockname
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_shutdown_trampoline()
+var libc_shutdown_trampoline_addr uintptr
-//go:linkname libc_shutdown libc_shutdown
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_socketpair_trampoline()
+var libc_socketpair_trampoline_addr uintptr
-//go:linkname libc_socketpair libc_socketpair
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -220,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -228,9 +216,8 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
-func libc_recvfrom_trampoline()
+var libc_recvfrom_trampoline_addr uintptr
-//go:linkname libc_recvfrom libc_recvfrom
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -242,22 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sendto_trampoline()
+var libc_sendto_trampoline_addr uintptr
-//go:linkname libc_sendto libc_sendto
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -265,15 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
-func libc_recvmsg_trampoline()
+var libc_recvmsg_trampoline_addr uintptr
-//go:linkname libc_recvmsg libc_recvmsg
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -281,15 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
-func libc_sendmsg_trampoline()
+var libc_sendmsg_trampoline_addr uintptr
-//go:linkname libc_sendmsg libc_sendmsg
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -297,9 +281,8 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
-func libc_kevent_trampoline()
+var libc_kevent_trampoline_addr uintptr
-//go:linkname libc_kevent libc_kevent
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -310,37 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_utimes_trampoline()
+var libc_utimes_trampoline_addr uintptr
-//go:linkname libc_utimes libc_utimes
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_futimes_trampoline()
+var libc_futimes_trampoline_addr uintptr
-//go:linkname libc_futimes libc_futimes
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
// 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_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -348,9 +329,8 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
-func libc_poll_trampoline()
+var libc_poll_trampoline_addr uintptr
-//go:linkname libc_poll libc_poll
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -362,16 +342,15 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_madvise_trampoline()
+var libc_madvise_trampoline_addr uintptr
-//go:linkname libc_madvise libc_madvise
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -383,31 +362,29 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mlock_trampoline()
+var libc_mlock_trampoline_addr uintptr
-//go:linkname libc_mlock libc_mlock
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mlockall_trampoline()
+var libc_mlockall_trampoline_addr uintptr
-//go:linkname libc_mlockall libc_mlockall
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -419,16 +396,15 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mprotect_trampoline()
+var libc_mprotect_trampoline_addr uintptr
-//go:linkname libc_mprotect libc_mprotect
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -440,16 +416,15 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_msync_trampoline()
+var libc_msync_trampoline_addr uintptr
-//go:linkname libc_msync libc_msync
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -461,63 +436,43 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_munlock_trampoline()
+var libc_munlock_trampoline_addr uintptr
-//go:linkname libc_munlock libc_munlock
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_munlockall_trampoline()
+var libc_munlockall_trampoline_addr uintptr
-//go:linkname libc_munlockall libc_munlockall
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func pipe(p *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getattrlist_trampoline()
+var libc_pipe_trampoline_addr uintptr
-//go:linkname libc_getattrlist libc_getattrlist
-//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_pipe_trampoline()
-
-//go:linkname libc_pipe libc_pipe
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -533,7 +488,7 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
+ r0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -541,9 +496,8 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
return
}
-func libc_getxattr_trampoline()
+var libc_getxattr_trampoline_addr uintptr
-//go:linkname libc_getxattr libc_getxattr
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -554,7 +508,7 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
+ r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -562,9 +516,8 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
return
}
-func libc_fgetxattr_trampoline()
+var libc_fgetxattr_trampoline_addr uintptr
-//go:linkname libc_fgetxattr libc_fgetxattr
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -580,16 +533,15 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setxattr_trampoline()
+var libc_setxattr_trampoline_addr uintptr
-//go:linkname libc_setxattr libc_setxattr
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -600,16 +552,15 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fsetxattr_trampoline()
+var libc_fsetxattr_trampoline_addr uintptr
-//go:linkname libc_fsetxattr libc_fsetxattr
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -625,16 +576,15 @@ func removexattr(path string, attr string, options int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+ _, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_removexattr_trampoline()
+var libc_removexattr_trampoline_addr uintptr
-//go:linkname libc_removexattr libc_removexattr
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -645,16 +595,15 @@ func fremovexattr(fd int, attr string, options int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
+ _, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fremovexattr_trampoline()
+var libc_fremovexattr_trampoline_addr uintptr
-//go:linkname libc_fremovexattr libc_fremovexattr
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -665,7 +614,7 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -673,15 +622,14 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
return
}
-func libc_listxattr_trampoline()
+var libc_listxattr_trampoline_addr uintptr
-//go:linkname libc_listxattr libc_listxattr
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -689,30 +637,28 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
return
}
-func libc_flistxattr_trampoline()
+var libc_flistxattr_trampoline_addr uintptr
-//go:linkname libc_flistxattr libc_flistxattr
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+ _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setattrlist_trampoline()
+var libc_setattrlist_trampoline_addr uintptr
-//go:linkname libc_setattrlist libc_setattrlist
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -720,39 +666,36 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
return
}
-func libc_fcntl_trampoline()
+var libc_fcntl_trampoline_addr uintptr
-//go:linkname libc_fcntl libc_fcntl
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_kill_trampoline()
+var libc_kill_trampoline_addr uintptr
-//go:linkname libc_kill libc_kill
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_ioctl_trampoline()
+var libc_ioctl_trampoline_addr uintptr
-//go:linkname libc_ioctl libc_ioctl
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -764,66 +707,121 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sysctl_trampoline()
+var libc_sysctl_trampoline_addr uintptr
-//go:linkname libc_sysctl libc_sysctl
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
+ _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sendfile_trampoline()
+var libc_sendfile_trampoline_addr uintptr
-//go:linkname libc_sendfile libc_sendfile
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
// 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)
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_access_trampoline()
+var libc_access_trampoline_addr uintptr
-//go:linkname libc_access libc_access
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_adjtime_trampoline()
+var libc_adjtime_trampoline_addr uintptr
-//go:linkname libc_adjtime libc_adjtime
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -834,16 +832,15 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chdir_trampoline()
+var libc_chdir_trampoline_addr uintptr
-//go:linkname libc_chdir libc_chdir
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -854,16 +851,15 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chflags_trampoline()
+var libc_chflags_trampoline_addr uintptr
-//go:linkname libc_chflags libc_chflags
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -874,16 +870,15 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chmod_trampoline()
+var libc_chmod_trampoline_addr uintptr
-//go:linkname libc_chmod libc_chmod
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -894,16 +889,15 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chown_trampoline()
+var libc_chown_trampoline_addr uintptr
-//go:linkname libc_chown libc_chown
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -914,52 +908,97 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_chroot_trampoline()
+var libc_chroot_trampoline_addr uintptr
-//go:linkname libc_chroot libc_chroot
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_clock_gettime_trampoline()
+var libc_clock_gettime_trampoline_addr uintptr
-//go:linkname libc_clock_gettime libc_clock_gettime
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_close_trampoline()
+var libc_close_trampoline_addr uintptr
-//go:linkname libc_close libc_close
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Clonefile(src string, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_clonefile_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_clonefileat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -967,24 +1006,22 @@ func Dup(fd int) (nfd int, err error) {
return
}
-func libc_dup_trampoline()
+var libc_dup_trampoline_addr uintptr
-//go:linkname libc_dup libc_dup
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_dup2_trampoline()
+var libc_dup2_trampoline_addr uintptr
-//go:linkname libc_dup2 libc_dup2
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1000,28 +1037,26 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+ _, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_exchangedata_trampoline()
+var libc_exchangedata_trampoline_addr uintptr
-//go:linkname libc_exchangedata libc_exchangedata
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
-func libc_exit_trampoline()
+var libc_exit_trampoline_addr uintptr
-//go:linkname libc_exit libc_exit
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1032,61 +1067,57 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_faccessat_trampoline()
+var libc_faccessat_trampoline_addr uintptr
-//go:linkname libc_faccessat libc_faccessat
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchdir_trampoline()
+var libc_fchdir_trampoline_addr uintptr
-//go:linkname libc_fchdir libc_fchdir
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchflags_trampoline()
+var libc_fchflags_trampoline_addr uintptr
-//go:linkname libc_fchflags libc_fchflags
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchmod_trampoline()
+var libc_fchmod_trampoline_addr uintptr
-//go:linkname libc_fchmod libc_fchmod
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1097,31 +1128,29 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchmodat_trampoline()
+var libc_fchmodat_trampoline_addr uintptr
-//go:linkname libc_fchmodat libc_fchmodat
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
// 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_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchown_trampoline()
+var libc_fchown_trampoline_addr uintptr
-//go:linkname libc_fchown libc_fchown
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1132,37 +1161,54 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fchownat_trampoline()
+var libc_fchownat_trampoline_addr uintptr
-//go:linkname libc_fchownat libc_fchownat
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fclonefileat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Flock(fd int, how int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_flock_trampoline()
+var libc_flock_trampoline_addr uintptr
-//go:linkname libc_flock libc_flock
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1170,97 +1216,111 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
-func libc_fpathconf_trampoline()
+var libc_fpathconf_trampoline_addr uintptr
-//go:linkname libc_fpathconf libc_fpathconf
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fsync_trampoline()
+var libc_fsync_trampoline_addr uintptr
-//go:linkname libc_fsync libc_fsync
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_ftruncate_trampoline()
+var libc_ftruncate_trampoline_addr uintptr
-//go:linkname libc_ftruncate libc_ftruncate
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdtablesize() (size int) {
- r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0)
size = int(r0)
return
}
-func libc_getdtablesize_trampoline()
+var libc_getdtablesize_trampoline_addr uintptr
-//go:linkname libc_getdtablesize libc_getdtablesize
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
-func libc_getegid_trampoline()
+var libc_getegid_trampoline_addr uintptr
-//go:linkname libc_getegid libc_getegid
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
-func libc_geteuid_trampoline()
+var libc_geteuid_trampoline_addr uintptr
-//go:linkname libc_geteuid libc_geteuid
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
-func libc_getgid_trampoline()
+var libc_getgid_trampoline_addr uintptr
-//go:linkname libc_getgid libc_getgid
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1268,54 +1328,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
-func libc_getpgid_trampoline()
+var libc_getpgid_trampoline_addr uintptr
-//go:linkname libc_getpgid libc_getpgid
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
-func libc_getpgrp_trampoline()
+var libc_getpgrp_trampoline_addr uintptr
-//go:linkname libc_getpgrp libc_getpgrp
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
-func libc_getpid_trampoline()
+var libc_getpid_trampoline_addr uintptr
-//go:linkname libc_getpid libc_getpid
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
-func libc_getppid_trampoline()
+var libc_getppid_trampoline_addr uintptr
-//go:linkname libc_getppid libc_getppid
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1323,45 +1379,42 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
-func libc_getpriority_trampoline()
+var libc_getpriority_trampoline_addr uintptr
-//go:linkname libc_getpriority libc_getpriority
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getrlimit_trampoline()
+var libc_getrlimit_trampoline_addr uintptr
-//go:linkname libc_getrlimit libc_getrlimit
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_getrusage_trampoline()
+var libc_getrusage_trampoline_addr uintptr
-//go:linkname libc_getrusage libc_getrusage
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1369,41 +1422,52 @@ func Getsid(pid int) (sid int, err error) {
return
}
-func libc_getsid_trampoline()
+var libc_getsid_trampoline_addr uintptr
-//go:linkname libc_getsid libc_getsid
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
-func libc_getuid_trampoline()
+var libc_getuid_trampoline_addr uintptr
-//go:linkname libc_getuid libc_getuid
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
-func libc_issetugid_trampoline()
+var libc_issetugid_trampoline_addr uintptr
-//go:linkname libc_issetugid libc_issetugid
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1411,9 +1475,8 @@ func Kqueue() (fd int, err error) {
return
}
-func libc_kqueue_trampoline()
+var libc_kqueue_trampoline_addr uintptr
-//go:linkname libc_kqueue libc_kqueue
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1424,16 +1487,15 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_lchown_trampoline()
+var libc_lchown_trampoline_addr uintptr
-//go:linkname libc_lchown libc_lchown
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1449,16 +1511,15 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_link_trampoline()
+var libc_link_trampoline_addr uintptr
-//go:linkname libc_link libc_link
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1474,31 +1535,29 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_linkat_trampoline()
+var libc_linkat_trampoline_addr uintptr
-//go:linkname libc_linkat libc_linkat
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_listen_trampoline()
+var libc_listen_trampoline_addr uintptr
-//go:linkname libc_listen libc_listen
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1509,16 +1568,15 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mkdir_trampoline()
+var libc_mkdir_trampoline_addr uintptr
-//go:linkname libc_mkdir libc_mkdir
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1529,16 +1587,15 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mkdirat_trampoline()
+var libc_mkdirat_trampoline_addr uintptr
-//go:linkname libc_mkdirat libc_mkdirat
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1549,16 +1606,15 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mkfifo_trampoline()
+var libc_mkfifo_trampoline_addr uintptr
-//go:linkname libc_mkfifo libc_mkfifo
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1569,16 +1625,15 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_mknod_trampoline()
+var libc_mknod_trampoline_addr uintptr
-//go:linkname libc_mknod libc_mknod
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1589,7 +1644,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1597,9 +1652,8 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
-func libc_open_trampoline()
+var libc_open_trampoline_addr uintptr
-//go:linkname libc_open libc_open
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1610,7 +1664,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1618,9 +1672,8 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
-func libc_openat_trampoline()
+var libc_openat_trampoline_addr uintptr
-//go:linkname libc_openat libc_openat
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1631,7 +1684,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1639,9 +1692,8 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
-func libc_pathconf_trampoline()
+var libc_pathconf_trampoline_addr uintptr
-//go:linkname libc_pathconf libc_pathconf
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1653,7 +1705,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1661,9 +1713,8 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
-func libc_pread_trampoline()
+var libc_pread_trampoline_addr uintptr
-//go:linkname libc_pread libc_pread
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1675,7 +1726,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1683,9 +1734,8 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
-func libc_pwrite_trampoline()
+var libc_pwrite_trampoline_addr uintptr
-//go:linkname libc_pwrite libc_pwrite
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1697,7 +1747,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1705,9 +1755,8 @@ func read(fd int, p []byte) (n int, err error) {
return
}
-func libc_read_trampoline()
+var libc_read_trampoline_addr uintptr
-//go:linkname libc_read libc_read
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1724,7 +1773,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1732,9 +1781,8 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
-func libc_readlink_trampoline()
+var libc_readlink_trampoline_addr uintptr
-//go:linkname libc_readlink libc_readlink
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1751,7 +1799,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1759,9 +1807,8 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
-func libc_readlinkat_trampoline()
+var libc_readlinkat_trampoline_addr uintptr
-//go:linkname libc_readlinkat libc_readlinkat
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1777,16 +1824,15 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_rename_trampoline()
+var libc_rename_trampoline_addr uintptr
-//go:linkname libc_rename libc_rename
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1802,16 +1848,15 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_renameat_trampoline()
+var libc_renameat_trampoline_addr uintptr
-//go:linkname libc_renameat libc_renameat
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1822,16 +1867,15 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_revoke_trampoline()
+var libc_revoke_trampoline_addr uintptr
-//go:linkname libc_revoke libc_revoke
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1842,22 +1886,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_rmdir_trampoline()
+var libc_rmdir_trampoline_addr uintptr
-//go:linkname libc_rmdir libc_rmdir
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1865,15 +1908,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
-func libc_lseek_trampoline()
+var libc_lseek_trampoline_addr uintptr
-//go:linkname libc_lseek libc_lseek
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1881,54 +1923,50 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
-func libc_select_trampoline()
+var libc_select_trampoline_addr uintptr
-//go:linkname libc_select libc_select
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setegid_trampoline()
+var libc_setegid_trampoline_addr uintptr
-//go:linkname libc_setegid libc_setegid
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_seteuid_trampoline()
+var libc_seteuid_trampoline_addr uintptr
-//go:linkname libc_seteuid libc_seteuid
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setgid_trampoline()
+var libc_setgid_trampoline_addr uintptr
-//go:linkname libc_setgid libc_setgid
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1939,112 +1977,105 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setlogin_trampoline()
+var libc_setlogin_trampoline_addr uintptr
-//go:linkname libc_setlogin libc_setlogin
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setpgid_trampoline()
+var libc_setpgid_trampoline_addr uintptr
-//go:linkname libc_setpgid libc_setpgid
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setpriority_trampoline()
+var libc_setpriority_trampoline_addr uintptr
-//go:linkname libc_setpriority libc_setpriority
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setprivexec(flag int) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setprivexec_trampoline()
+var libc_setprivexec_trampoline_addr uintptr
-//go:linkname libc_setprivexec libc_setprivexec
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setregid_trampoline()
+var libc_setregid_trampoline_addr uintptr
-//go:linkname libc_setregid libc_setregid
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setreuid_trampoline()
+var libc_setreuid_trampoline_addr uintptr
-//go:linkname libc_setreuid libc_setreuid
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setrlimit_trampoline()
+var libc_setrlimit_trampoline_addr uintptr
-//go:linkname libc_setrlimit libc_setrlimit
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2052,39 +2083,36 @@ func Setsid() (pid int, err error) {
return
}
-func libc_setsid_trampoline()
+var libc_setsid_trampoline_addr uintptr
-//go:linkname libc_setsid libc_setsid
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_settimeofday_trampoline()
+var libc_settimeofday_trampoline_addr uintptr
-//go:linkname libc_settimeofday libc_settimeofday
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_setuid_trampoline()
+var libc_setuid_trampoline_addr uintptr
-//go:linkname libc_setuid libc_setuid
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2100,16 +2128,15 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_symlink_trampoline()
+var libc_symlink_trampoline_addr uintptr
-//go:linkname libc_symlink libc_symlink
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2125,31 +2152,29 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_symlinkat_trampoline()
+var libc_symlinkat_trampoline_addr uintptr
-//go:linkname libc_symlinkat libc_symlinkat
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_sync_trampoline()
+var libc_sync_trampoline_addr uintptr
-//go:linkname libc_sync libc_sync
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2160,29 +2185,27 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_truncate_trampoline()
+var libc_truncate_trampoline_addr uintptr
-//go:linkname libc_truncate libc_truncate
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
-func libc_umask_trampoline()
+var libc_umask_trampoline_addr uintptr
-//go:linkname libc_umask libc_umask
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2193,16 +2216,15 @@ func Undelete(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_undelete_trampoline()
+var libc_undelete_trampoline_addr uintptr
-//go:linkname libc_undelete libc_undelete
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2213,16 +2235,15 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_unlink_trampoline()
+var libc_unlink_trampoline_addr uintptr
-//go:linkname libc_unlink libc_unlink
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2233,16 +2254,15 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_unlinkat_trampoline()
+var libc_unlinkat_trampoline_addr uintptr
-//go:linkname libc_unlinkat libc_unlinkat
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2253,16 +2273,15 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_unmount_trampoline()
+var libc_unmount_trampoline_addr uintptr
-//go:linkname libc_unmount libc_unmount
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2274,7 +2293,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2282,15 +2301,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
-func libc_write_trampoline()
+var libc_write_trampoline_addr uintptr
-//go:linkname libc_write libc_write
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := syscall_syscall6(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2298,30 +2316,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
-func libc_mmap_trampoline()
+var libc_mmap_trampoline_addr uintptr
-//go:linkname libc_mmap libc_mmap
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_munmap_trampoline()
+var libc_munmap_trampoline_addr uintptr
-//go:linkname libc_munmap libc_munmap
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2332,7 +2348,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2342,34 +2358,16 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fstat_trampoline()
+var libc_fstat_trampoline_addr uintptr
-//go:linkname libc_fstat libc_fstat
//go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2380,37 +2378,35 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall6(funcPC(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fstatat_trampoline()
+var libc_fstatat_trampoline_addr uintptr
-//go:linkname libc_fstatat libc_fstatat
//go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := syscall_syscall(funcPC(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_fstatfs_trampoline()
+var libc_fstatfs_trampoline_addr uintptr
-//go:linkname libc_fstatfs libc_fstatfs
//go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2418,9 +2414,8 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
return
}
-func libc_getfsstat_trampoline()
+var libc_getfsstat_trampoline_addr uintptr
-//go:linkname libc_getfsstat libc_getfsstat
//go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2431,36 +2426,48 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_lstat_trampoline()
+var libc_lstat_trampoline_addr uintptr
-//go:linkname libc_lstat libc_lstat
//go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ptrace_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_stat_trampoline()
+var libc_stat_trampoline_addr uintptr
-//go:linkname libc_stat libc_stat
//go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2471,14 +2478,13 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := syscall_syscall(funcPC(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-func libc_statfs_trampoline()
+var libc_statfs_trampoline_addr uintptr
-//go:linkname libc_statfs libc_statfs
//go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 40cce1b..4ebcf21 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -1,282 +1,883 @@
// go run mkasm_darwin.go arm64
// Code generated by the command above; DO NOT EDIT.
+//go:build go1.12
// +build go1.12
#include "textflag.h"
-TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
-TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgroups(SB)
-TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_wait4(SB)
-TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_accept(SB)
-TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_bind(SB)
-TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_connect(SB)
-TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socket(SB)
-TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockopt(SB)
-TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsockopt(SB)
-TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpeername(SB)
-TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockname(SB)
-TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shutdown(SB)
-TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socketpair(SB)
-TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvfrom(SB)
-TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendto(SB)
-TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvmsg(SB)
-TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
-TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
-TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_futimes(SB)
-TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_poll(SB)
-TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_madvise(SB)
-TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlock(SB)
-TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlockall(SB)
-TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mprotect(SB)
-TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_msync(SB)
-TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
-TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
-TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
-TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pipe_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB)
+
+TEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getxattr(SB)
-TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB)
+
+TEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fgetxattr(SB)
-TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fgetxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB)
+
+TEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setxattr(SB)
-TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB)
+
+TEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsetxattr(SB)
-TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fsetxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB)
+
+TEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_removexattr(SB)
-TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_removexattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB)
+
+TEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fremovexattr(SB)
-TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fremovexattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB)
+
+TEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listxattr(SB)
-TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_listxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB)
+
+TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flistxattr(SB)
-TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
+
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setattrlist(SB)
-TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
-TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
-TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
-TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sysctl(SB)
-TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
-TEXT ·libc_access_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)
-TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_adjtime(SB)
-TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chdir(SB)
-TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chflags(SB)
-TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chmod(SB)
-TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chown(SB)
-TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chroot(SB)
-TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
-TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_close(SB)
-TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_clonefile(SB)
+
+GLOBL ·libc_clonefile_trampoline_addr(SB), RODATA, $8
+DATA ·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB)
+
+TEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_clonefileat(SB)
+
+GLOBL ·libc_clonefileat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
-TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup2(SB)
-TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exchangedata(SB)
-TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_exchangedata_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exit(SB)
-TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_faccessat(SB)
-TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchdir(SB)
-TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchflags(SB)
-TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmod(SB)
-TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmodat(SB)
-TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
-TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
-TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fclonefileat(SB)
+
+GLOBL ·libc_fclonefileat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
-TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fpathconf(SB)
-TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
-TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
-TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
-TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getdtablesize_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getegid(SB)
-TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_geteuid(SB)
-TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgid(SB)
-TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgid(SB)
-TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgrp(SB)
-TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpid(SB)
-TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getppid(SB)
-TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpriority(SB)
-TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrlimit(SB)
-TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
-TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
-TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
-TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_issetugid(SB)
-TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kqueue(SB)
-TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lchown(SB)
-TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_link(SB)
-TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_linkat(SB)
-TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listen(SB)
-TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdir(SB)
-TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdirat(SB)
-TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkfifo(SB)
-TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mknod(SB)
-TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)
-TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_openat(SB)
-TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pathconf(SB)
-TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pread(SB)
-TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pwrite(SB)
-TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
-TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlink(SB)
-TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlinkat(SB)
-TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rename(SB)
-TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_renameat(SB)
-TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_revoke(SB)
-TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rmdir(SB)
-TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lseek(SB)
-TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_select(SB)
-TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setegid(SB)
-TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_seteuid(SB)
-TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgid(SB)
-TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setlogin(SB)
-TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpgid(SB)
-TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpriority(SB)
-TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setprivexec(SB)
-TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setprivexec_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setregid(SB)
-TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setreuid(SB)
-TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrlimit(SB)
-TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsid(SB)
-TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_settimeofday(SB)
-TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setuid(SB)
-TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlink(SB)
-TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlinkat(SB)
-TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sync(SB)
-TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_truncate(SB)
-TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_umask(SB)
-TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_undelete(SB)
-TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_undelete_trampoline_addr(SB), RODATA, $8
+DATA ·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlink(SB)
-TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlinkat(SB)
-TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unmount(SB)
-TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_write(SB)
-TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
-TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
-TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstat(SB)
-TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatat(SB)
-TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatfs(SB)
-TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getfsstat(SB)
-TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lstat(SB)
-TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ptrace(SB)
+
+GLOBL ·libc_ptrace_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_stat(SB)
-TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index fe1fdd7..1b6eedf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build dragonfly && amd64
// +build dragonfly,amd64
package unix
@@ -214,22 +215,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -378,6 +363,18 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (r int, w int, err error) {
+ r0, r1, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ r = int(r0)
+ w = int(r1)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
@@ -439,6 +436,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// 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)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index c9058f3..3e9bddb 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && 386
// +build freebsd,386
package unix
@@ -214,22 +215,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -376,8 +361,15 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data int) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -386,15 +378,24 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getcwd(buf []byte) (n int, err error) {
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -403,8 +404,8 @@ func Getcwd(buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+func ptrace(request int, pid int, addr uintptr, data int) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1352,7 +1353,7 @@ func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index 49b20c2..c72a462 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && amd64
// +build freebsd,amd64
package unix
@@ -350,22 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// 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 {
@@ -403,6 +388,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index 31d2c46..530d5df 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && arm
// +build freebsd,arm
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index abab3d7..71e7df9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -1,6 +1,7 @@
-// go run mksyscall.go -tags freebsd,arm64 -- syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go
+// go run mksyscall.go -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && arm64
// +build freebsd,arm64
package unix
@@ -350,22 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// 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 {
@@ -403,6 +388,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
new file mode 100644
index 0000000..af5cb06
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
@@ -0,0 +1,128 @@
+// go run mksyscall_solaris.go -illumos -tags illumos,amd64 syscall_illumos.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build illumos && amd64
+// +build illumos,amd64
+
+package unix
+
+import (
+ "unsafe"
+)
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
+//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
+//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
+
+//go:linkname procreadv libc_readv
+//go:linkname procpreadv libc_preadv
+//go:linkname procwritev libc_writev
+//go:linkname procpwritev libc_pwritev
+//go:linkname procaccept4 libc_accept4
+//go:linkname procputmsg libc_putmsg
+//go:linkname procgetmsg libc_getmsg
+
+var (
+ procreadv,
+ procpreadv,
+ procwritev,
+ procpwritev,
+ procaccept4,
+ procputmsg,
+ procgetmsg syscallFunc
+)
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readv(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovs []Iovec, off int64) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovs []Iovec, off int64) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index f8e5c37..93edda4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1,7 +1,7 @@
-// go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.1_11.go syscall_darwin_amd64.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
-// +build darwin,amd64,!go1.12
+//go:build linux
+// +build linux
package unix
@@ -10,13 +10,11 @@ import (
"unsafe"
)
-var _ syscall.Errno
-
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -25,19 +23,13 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
+func fchmodat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
+ _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -46,9 +38,8 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// 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)
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -57,8 +48,8 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -67,29 +58,18 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
+func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -98,18 +78,14 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
+func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -118,18 +94,14 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
+func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -138,8 +110,8 @@ func Shutdown(s int, how int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+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)
}
@@ -148,14 +120,8 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+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)
if e1 != 0 {
err = errnoErr(e1)
@@ -165,24 +131,19 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
+ _p1 = unsafe.Pointer(&buf[0])
} else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
+ _p1 = unsafe.Pointer(&_zero)
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -192,9 +153,18 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -203,9 +173,13 @@ 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 kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -214,13 +188,13 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func utimes(path string, timeval *[2]Timeval) (err error) {
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -229,8 +203,15 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -239,9 +220,9 @@ func futimes(fd int, timeval *[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)
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -250,14 +231,9 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -266,14 +242,15 @@ func Madvise(b []byte, behav int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mlock(b []byte) (err error) {
+func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -282,8 +259,14 @@ func Mlock(b []byte) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg2)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -292,14 +275,19 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
+func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg3)
+ if err != nil {
+ return
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ var _p1 *byte
+ _p1, err = BytePtrFromString(arg4)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -308,14 +296,14 @@ func Mprotect(b []byte, prot int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Msync(b []byte, flags int) (err error) {
+func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
+ if len(payload) > 0 {
+ _p0 = unsafe.Pointer(&payload[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -324,14 +312,15 @@ func Msync(b []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Munlock(b []byte) (err error) {
+func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -340,8 +329,18 @@ func Munlock(b []byte) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -350,8 +349,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -360,10 +359,8 @@ func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -372,19 +369,13 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
+func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(arg)
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
+ _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -393,34 +384,23 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
+func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(source)
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(target)
if err != nil {
return
}
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
+ var _p2 *byte
+ _p2, err = BytePtrFromString(fstype)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -429,13 +409,13 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
+func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(pathname)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -444,18 +424,13 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func removexattr(path string, attr string, options int) (err error) {
+func Acct(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+ _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -464,13 +439,25 @@ func removexattr(path string, attr string, options int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fremovexattr(fd int, attr string, options int) (err error) {
+func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(description)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
+ var _p2 unsafe.Pointer
+ if len(payload) > 0 {
+ _p2 = unsafe.Pointer(&payload[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
+ id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -479,14 +466,9 @@ func fremovexattr(fd int, attr string, options int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
+func Adjtimex(buf *Timex) (state int, err error) {
+ r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
+ state = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -495,9 +477,8 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
+func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
+ _, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -506,8 +487,8 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
+ _, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -516,9 +497,13 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -527,8 +512,13 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -537,8 +527,8 @@ func kill(pid int, signum int, posix int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -547,14 +537,8 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -563,8 +547,8 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
+func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
+ _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -573,13 +557,8 @@ func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer
// 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)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+func Close(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -588,8 +567,8 @@ func Access(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+func CloseRange(first uint, last uint, flags uint) (err error) {
+ _, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -598,13 +577,9 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -613,13 +588,13 @@ func Chdir(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chflags(path string, flags int) (err error) {
+func DeleteModule(name string, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(name)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -628,13 +603,9 @@ func Chflags(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+func Dup(oldfd int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -643,13 +614,8 @@ func Chmod(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+func Dup3(oldfd int, newfd int, flags int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -658,13 +624,9 @@ func Chown(path string, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func EpollCreate1(flag int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -673,8 +635,8 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -683,9 +645,9 @@ func Close(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
+func Eventfd(initval uint, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -694,28 +656,15 @@ func Dup(fd int) (nfd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
+func Exit(code int) {
+ SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+func Fchdir(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -724,20 +673,23 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -746,8 +698,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+func Fdatasync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -756,8 +708,20 @@ func Fchdir(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -766,8 +730,13 @@ func Fchflags(fd int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+func FinitModule(fd int, params string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(params)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -776,13 +745,15 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+ var _p0 unsafe.Pointer
+ if len(dest) > 0 {
+ _p0 = unsafe.Pointer(&dest[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -791,8 +762,8 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
// 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))
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -801,13 +772,13 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+func Fremovexattr(fd int, attr string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(attr)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -816,8 +787,19 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -826,9 +808,8 @@ func Flock(fd int, how int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
+func Fsync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -837,8 +818,15 @@ func Fpathconf(fd int, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -847,8 +835,9 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -857,41 +846,52 @@ func Ftruncate(fd int, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
+func Getpid() (pid int) {
+ r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
+ pid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
+func Getppid() (ppid int) {
+ r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
+ ppid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
+func Getrandom(buf []byte, flags int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -900,33 +900,65 @@ func Getpgid(pid int) (pgid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
+func Gettid() (tid int) {
+ r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
+ tid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
+func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
+func InitModule(moduleImage []byte, params string) (err error) {
+ var _p0 unsafe.Pointer
+ if len(moduleImage) > 0 {
+ _p0 = unsafe.Pointer(&moduleImage[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(params)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -935,8 +967,14 @@ func Getpriority(which int, who int) (prio int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathname)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
+ watchdesc = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -945,8 +983,9 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+func InotifyInit1(flags int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -955,9 +994,9 @@ func Getrusage(who int, rusage *Rusage) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
+func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
+ success = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -966,25 +1005,52 @@ func Getsid(pid int) (sid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
+func Kill(pid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
+func Klogctl(typ int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
+func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -993,13 +1059,20 @@ func Kqueue() (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Lchown(path string, uid int, gid int) (err error) {
+func Listxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1008,18 +1081,20 @@ func Lchown(path string, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Link(path string, link string) (err error) {
+func Llistxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1028,18 +1103,18 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+func Lremovexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(link)
+ _p1, err = BytePtrFromString(attr)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1048,8 +1123,24 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1058,13 +1149,14 @@ func Listen(s int, backlog int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mkdir(path string, mode uint32) (err error) {
+func MemfdCreate(name string, flags int) (fd int, err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(name)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1088,13 +1180,13 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mkfifo(path string, mode uint32) (err error) {
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1103,13 +1195,8 @@ func Mkfifo(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1118,13 +1205,8 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1134,14 +1216,18 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
+func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(newroot)
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
- fd = int(r0)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(putold)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1150,14 +1236,8 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
+func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
+ _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1166,15 +1246,8 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
+func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1183,14 +1256,8 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1217,42 +1284,18 @@ func read(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Readlink(path string, buf []byte) (n int, err error) {
+func Removexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
if err != nil {
return
}
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
+ _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1261,18 +1304,18 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Rename(from string, to string) (err error) {
+func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(from)
+ _p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(to)
+ _p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1281,18 +1324,24 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(from)
+ _p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(to)
+ _p1, err = BytePtrFromString(description)
+ if err != nil {
+ return
+ }
+ var _p2 *byte
+ _p2, err = BytePtrFromString(callback)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
+ id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1301,13 +1350,14 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Setdomainname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1316,13 +1366,14 @@ func Revoke(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Sethostname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1331,9 +1382,8 @@ func Rmdir(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1342,9 +1392,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
+func Setsid() (pid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1353,8 +1403,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
+func Settimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1363,8 +1413,8 @@ func Setegid(egid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+func Setns(fd int, nstype int) (err error) {
+ _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1373,8 +1423,8 @@ func Seteuid(euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1383,13 +1433,24 @@ func Setgid(gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setlogin(name string) (err error) {
+func Setxattr(path string, attr string, data []byte, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(name)
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1398,8 +1459,9 @@ func Setlogin(name string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
+ r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
+ newfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1408,8 +1470,13 @@ func Setpgid(pid int, pgid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1418,8 +1485,15 @@ func Setpriority(which int, who int, prio int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
+func Sync() {
+ SyscallNoError(SYS_SYNC, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Syncfs(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1428,8 +1502,8 @@ func Setprivexec(flag int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+func Sysinfo(info *Sysinfo_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1438,8 +1512,9 @@ func Setregid(rgid int, egid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+func TimerfdCreate(clockid int, flags int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1448,8 +1523,8 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
+ _, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1458,9 +1533,8 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
+func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
+ _, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1469,8 +1543,8 @@ func Setsid() (pid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1479,8 +1553,9 @@ func Settimeofday(tp *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
+ ticks = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1489,18 +1564,16 @@ func Setuid(uid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+func Umask(mask int) (oldmask int) {
+ r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1509,18 +1582,13 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Unmount(target string, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
+ _p0, err = BytePtrFromString(target)
if err != nil {
return
}
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1529,8 +1597,8 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+func Unshare(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1539,13 +1607,15 @@ func Sync() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1554,21 +1624,19 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
+func exitThread(code int) (err error) {
+ _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func readlen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1577,13 +1645,9 @@ func Undelete(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func writelen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1592,13 +1656,15 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func readv(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1607,13 +1673,15 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func writev(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1622,14 +1690,14 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func write(fd int, p []byte) (n int, err error) {
+func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1639,9 +1707,15 @@ func write(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
+func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1650,8 +1724,15 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1660,8 +1741,14 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1671,9 +1758,8 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1682,15 +1768,14 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+func Madvise(b []byte, advice int) (err error) {
var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
+ _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1699,8 +1784,14 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1709,10 +1800,14 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1721,8 +1816,8 @@ func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+func Mlockall(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1731,13 +1826,14 @@ func Fstat(fd int, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1746,8 +1842,14 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1756,9 +1858,8 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
+func Munlockall() (err error) {
+ _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1767,13 +1868,13 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Lstat(path string, stat *Stat_t) (err error) {
+func faccessat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1782,13 +1883,13 @@ func Lstat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Stat(path string, stat *Stat_t) (err error) {
+func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1797,13 +1898,135 @@ func Stat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Statfs(path string, stat *Statfs_t) (err error) {
+func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(pathname)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(localIov) > 0 {
+ _p0 = unsafe.Pointer(&localIov[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ var _p1 unsafe.Pointer
+ if len(remoteIov) > 0 {
+ _p1 = unsafe.Pointer(&remoteIov[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(localIov) > 0 {
+ _p0 = unsafe.Pointer(&localIov[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ var _p1 unsafe.Pointer
+ if len(remoteIov) > 0 {
+ _p1 = unsafe.Pointer(&remoteIov[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+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)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 0e68c14..ff90c81 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && 386
// +build linux,386
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r1)<<32 | int64(r0))
@@ -1484,413 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 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 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 {
@@ -1995,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 {
@@ -2380,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
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index c038e52..fa7d3db 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && amd64
// +build linux,amd64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -1995,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 {
@@ -2515,37 +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 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 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)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 333683d..654f915 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && arm
// +build linux,arm
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r1)<<32 | int64(r0))
@@ -1484,392 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 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 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)
@@ -2049,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 {
@@ -2154,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)
@@ -2495,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 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index 838bbdb..e893f98 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && arm64
// +build linux,arm64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,372 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -1956,7 +152,7 @@ func Getgid() (gid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
+func getrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2112,7 +308,7 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
+func setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2393,16 +589,6 @@ func Gettimeofday(tv *Timeval) (err error) {
// 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 kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 7da49ae..6d15528 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mips
// +build linux,mips
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r0)<<32 | int64(r1))
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -2348,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 {
@@ -2510,28 +674,6 @@ func Pause() (err error) {
// 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 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)
@@ -2560,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
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index f22f83f..1e20d72 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mips64
// +build linux,mips64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -2469,16 +644,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// 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 fstat(fd int, st *stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
if e1 != 0 {
@@ -2531,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
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index 307c430..82b5e2d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mips64le
// +build linux,mips64le
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -2469,16 +644,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// 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 fstat(fd int, st *stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
if e1 != 0 {
@@ -2531,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
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 0997b6e..a0440c1 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mipsle
// +build linux,mipsle
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r1)<<32 | int64(r0))
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -2348,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 {
@@ -2510,28 +674,6 @@ func Pause() (err error) {
// 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 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)
@@ -2560,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
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
new file mode 100644
index 0000000..5864b9c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -0,0 +1,709 @@
+// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build linux && ppc
+// +build linux,ppc
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+ _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
+ n = int64(int64(r0)<<32 | int64(r1))
+ 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 {
+ _p0 = unsafe.Pointer(&events[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
+ n = int(r0)
+ 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 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ 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 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Iopl(level int) (err error) {
+ _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
+ 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)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pause() (err error) {
+ _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
+ written = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setfsgid(gid int) (prev int, err error) {
+ r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
+ prev = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setfsuid(uid int) (prev int, err error) {
+ r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
+ prev = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length>>32), uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 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)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
+ tt = Time_t(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, buf *Utimbuf) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, times *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
+ 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)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getrlimit(resource int, rlim *rlimit32) (err error) {
+ _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setrlimit(resource int, rlim *rlimit32) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ 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 {
+ 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)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index a601e72..beeb49e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && ppc64
// +build linux,ppc64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -1995,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 {
@@ -2567,37 +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 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 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 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index 6e4cb19..53139b8 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && ppc64le
// +build linux,ppc64le
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -1995,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 {
@@ -2567,37 +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 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 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 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index e690f19..63b393b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && riscv64
// +build linux,riscv64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,372 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -2373,16 +569,6 @@ func Gettimeofday(tv *Timeval) (err error) {
// 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 kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index f4cd086..202add3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && s390x
// +build linux,s390x
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,393 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 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 {
@@ -1995,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)
@@ -2357,27 +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 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 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)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 2447f2a..2ab268c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && sparc64
// +build linux,sparc64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 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 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)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), 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 Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), 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 PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,372 +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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -1877,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 {
@@ -1984,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)
@@ -2522,34 +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 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 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
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index 3bbd9e3..51d0c07 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && 386
// +build netbsd,386
package unix
@@ -350,10 +351,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
+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)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index d8cf501..df2efb6 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && amd64
// +build netbsd,amd64
package unix
@@ -350,10 +351,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
+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)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index 1153fe6..c8536c2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && arm
// +build netbsd,arm
package unix
@@ -350,10 +351,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
+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)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index 24b4ebb..8b981bf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && arm64
// +build netbsd,arm64
package unix
@@ -350,10 +351,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
+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)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index b44b31a..8f80f4a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && 386
// +build openbsd,386
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 67f93ee..3a47aca 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && amd64
// +build openbsd,amd64
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index d7c878b..883a9b4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && arm
// +build openbsd,arm
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 8facd69..aac7fdc 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && arm64
// +build openbsd,arm64
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index 8c3bb3a..8776187 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1,7 +1,8 @@
-// go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.1_11.go syscall_darwin_arm64.go
+// go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build darwin,arm64,!go1.12
+//go:build openbsd && mips64
+// +build openbsd,mips64
package unix
@@ -350,8 +351,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+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)
}
@@ -360,154 +361,15 @@ func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+ r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -516,19 +378,15 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
+ r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -554,7 +412,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -563,8 +421,9 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
+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)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -704,18 +563,8 @@ func Dup2(from int, to int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+func Dup3(from int, to int, flags int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -837,8 +686,8 @@ func Fpathconf(fd int, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -847,8 +696,13 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -857,9 +711,31 @@ func Ftruncate(fd int, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
@@ -945,6 +821,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Getrtable() (rtable int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ rtable = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
@@ -966,6 +853,16 @@ func Getsid(pid int) (sid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
uid = int(r0)
@@ -975,13 +872,23 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Kill(pid int, signum syscall.Signal) (err error) {
+ _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Kqueue() (fd int, err error) {
r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
fd = int(r0)
@@ -1058,6 +965,21 @@ func Listen(s int, backlog int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdir(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1103,6 +1025,21 @@ func Mkfifo(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mknod(path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1118,6 +1055,31 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1173,7 +1135,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1190,7 +1152,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1332,7 +1294,7 @@ func Rmdir(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1354,7 +1316,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1418,8 +1380,8 @@ func Setpriority(which int, who int, prio int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1428,8 +1390,8 @@ func Setprivexec(flag int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1438,8 +1400,18 @@ func Setregid(rgid int, egid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1458,6 +1430,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Setrtable(rtable int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
@@ -1489,6 +1471,36 @@ func Setuid(uid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Symlink(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1545,7 +1557,7 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1562,21 +1574,6 @@ func Umask(newmask int) (oldmask int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Unlink(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1640,7 +1637,7 @@ func write(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1682,101 +1679,13 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index a96165d..b5f926c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall_solaris.go -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build solaris && amd64
// +build solaris,amd64
package unix
@@ -11,6 +12,7 @@ import (
)
//go:cgo_import_dynamic libc_pipe pipe "libc.so"
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
@@ -114,6 +116,7 @@ import (
//go:cgo_import_dynamic libc_statvfs statvfs "libc.so"
//go:cgo_import_dynamic libc_symlink symlink "libc.so"
//go:cgo_import_dynamic libc_sync sync "libc.so"
+//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
//go:cgo_import_dynamic libc_times times "libc.so"
//go:cgo_import_dynamic libc_truncate truncate "libc.so"
//go:cgo_import_dynamic libc_fsync fsync "libc.so"
@@ -138,8 +141,14 @@ import (
//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
+//go:cgo_import_dynamic libc_port_create port_create "libc.so"
+//go:cgo_import_dynamic libc_port_associate port_associate "libc.so"
+//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
+//go:cgo_import_dynamic libc_port_get port_get "libc.so"
+//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
//go:linkname procpipe libc_pipe
+//go:linkname procpipe2 libc_pipe2
//go:linkname procgetsockname libc_getsockname
//go:linkname procGetcwd libc_getcwd
//go:linkname procgetgroups libc_getgroups
@@ -243,6 +252,7 @@ import (
//go:linkname procStatvfs libc_statvfs
//go:linkname procSymlink libc_symlink
//go:linkname procSync libc_sync
+//go:linkname procSysconf libc_sysconf
//go:linkname procTimes libc_times
//go:linkname procTruncate libc_truncate
//go:linkname procFsync libc_fsync
@@ -267,9 +277,15 @@ import (
//go:linkname procgetpeername libc_getpeername
//go:linkname procsetsockopt libc_setsockopt
//go:linkname procrecvfrom libc_recvfrom
+//go:linkname procport_create libc_port_create
+//go:linkname procport_associate libc_port_associate
+//go:linkname procport_dissociate libc_port_dissociate
+//go:linkname procport_get libc_port_get
+//go:linkname procport_getn libc_port_getn
var (
procpipe,
+ procpipe2,
procgetsockname,
procGetcwd,
procgetgroups,
@@ -373,6 +389,7 @@ var (
procStatvfs,
procSymlink,
procSync,
+ procSysconf,
procTimes,
procTruncate,
procFsync,
@@ -396,7 +413,12 @@ var (
proc__xnet_getsockopt,
procgetpeername,
procsetsockopt,
- procrecvfrom syscallFunc
+ procrecvfrom,
+ procport_create,
+ procport_associate,
+ procport_dissociate,
+ procport_get,
+ procport_getn syscallFunc
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -412,6 +434,16 @@ func pipe(p *[2]_C_int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
if e1 != 0 {
@@ -602,8 +634,9 @@ func __minor(version int, dev uint64) (val uint) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+ ret = int(r0)
if e1 != 0 {
err = e1
}
@@ -1674,6 +1707,17 @@ func Sync() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Sysconf(which int) (n int64, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSysconf)), 1, uintptr(which), 0, 0, 0, 0, 0)
+ n = int64(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Times(tms *Tms) (ticks uintptr, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
ticks = uintptr(r0)
@@ -1952,3 +1996,58 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func port_create() (n int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_associate)), 5, uintptr(port), uintptr(source), uintptr(object), uintptr(events), uintptr(unsafe.Pointer(user)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func port_dissociate(port int, source int, object uintptr) (n int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_dissociate)), 3, uintptr(port), uintptr(source), uintptr(object), 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_get)), 3, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(unsafe.Pointer(timeout)), 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_getn)), 5, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(max), uintptr(unsafe.Pointer(nget)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
new file mode 100644
index 0000000..f207945
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
@@ -0,0 +1,1255 @@
+// go run mksyscall.go -tags zos,s390x syscall_zos_s390x.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "unsafe"
+)
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntl(fd int, cmd int, arg int) (val int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ 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_syscall(SYS___ACCEPT_A, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(SYS___BIND_A, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(SYS___CONNECT_A, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := syscall_syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := syscall_rawsyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS___GETPEERNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS___GETSOCKNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(SYS___RECVFROM_A, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(SYS___SENDTO_A, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(SYS___RECVMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(SYS___SENDMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := syscall_syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// 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)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___ACCESS_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHMOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Creat(path string, mode uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(SYS___CREAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Dup(oldfd int) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_DUP, uintptr(oldfd), 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 Dup2(oldfd int, newfd int) (err error) {
+ _, _, e1 := syscall_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 Errno2() (er2 int) {
+ uer2, _, _ := syscall_syscall(SYS___ERRNO2, 0, 0, 0)
+ er2 = int(uer2)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Err2ad() (eadd *int) {
+ ueadd, _, _ := syscall_syscall(SYS___ERR2AD, 0, 0, 0)
+ eadd = (*int)(unsafe.Pointer(ueadd))
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ syscall_syscall(SYS_EXIT, uintptr(code), 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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_syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
+ retval = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fstat(fd int, stat *Stat_LE_t) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatvfs(fd int, stat *Statvfs_t) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FSTATVFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpagesize() (pgsize int) {
+ r0, _, _ := syscall_syscall(SYS_GETPAGESIZE, 0, 0, 0)
+ pgsize = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(fds) > 0 {
+ _p0 = unsafe.Pointer(&fds[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS_POLL, uintptr(_p0), uintptr(len(fds)), 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 Times(tms *Tms) (ticks uintptr, err error) {
+ r0, _, e1 := syscall_syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
+ ticks = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func W_Getmntent(buff *byte, size int) (lastsys int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_W_GETMNTENT, uintptr(unsafe.Pointer(buff)), uintptr(size), 0)
+ lastsys = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func W_Getmntent_A(buff *byte, size int) (lastsys int, err error) {
+ r0, _, e1 := syscall_syscall(SYS___W_GETMNTENT_A, uintptr(unsafe.Pointer(buff)), uintptr(size), 0)
+ lastsys = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(filesystem)
+ if err != nil {
+ return
+ }
+ var _p2 *byte
+ _p2, err = BytePtrFromString(fstype)
+ if err != nil {
+ return
+ }
+ var _p3 *byte
+ _p3, err = BytePtrFromString(parm)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(SYS___MOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unmount(filesystem string, mtm int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(filesystem)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UMOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mtm), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHROOT_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS___UNAME_A, uintptr(unsafe.Pointer(buf)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gethostname(buf []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(SYS___GETHOSTNAME_A, uintptr(_p0), uintptr(len(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETEUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETPID, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (pid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETPPID, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getrusage(who int, rusage *rusage_zos) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, sig Signal) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
+ 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)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___LCHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___LINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func lstat(path string, stat *Stat_LE_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___LSTAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___MKDIR_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___MKFIFO_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___MKNOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS___READLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___RENAME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___RMDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, _, e1 := syscall_syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ off = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(resource int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_SETSID, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SETUID, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(uid int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SETGID, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func stat(path string, statLE *Stat_LE_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___STAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___SYMLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() {
+ syscall_syscall(SYS_SYNC, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___TRUNCATE_A, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tcgetattr(fildes int, termptr *Termios) (err error) {
+ _, _, e1 := syscall_syscall(SYS_TCGETATTR, uintptr(fildes), uintptr(unsafe.Pointer(termptr)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tcsetattr(fildes int, when int, termptr *Termios) (err error) {
+ _, _, e1 := syscall_syscall(SYS_TCSETATTR, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(mask int) (oldmask int) {
+ r0, _, _ := syscall_syscall(SYS_UMASK, uintptr(mask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UNLINK_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, utim *Utimbuf) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UTIME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func open(path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(SYS___OPEN_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func remove(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_WAITPID, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options))
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func gettimeofday(tv *timeval_zos) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe(p *[2]_C_int) (err error) {
+ _, _, e1 := syscall_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 utimes(path string, timeval *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UTIMES_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) {
+ r0, _, e1 := syscall_syscall6(SYS_SELECT, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ ret = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
index 37dcc74..9e9d0b2 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
@@ -1,6 +1,7 @@
-// mksysctl_openbsd.pl
+// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
@@ -30,6 +31,7 @@ var sysctlMib = []mibentry{
{"hw.model", []_C_int{6, 2}},
{"hw.ncpu", []_C_int{6, 3}},
{"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
{"hw.pagesize", []_C_int{6, 7}},
{"hw.physmem", []_C_int{6, 19}},
{"hw.product", []_C_int{6, 15}},
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
index fe6caa6..adecd09 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
@@ -31,6 +32,7 @@ var sysctlMib = []mibentry{
{"hw.model", []_C_int{6, 2}},
{"hw.ncpu", []_C_int{6, 3}},
{"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
{"hw.pagesize", []_C_int{6, 7}},
{"hw.perfpolicy", []_C_int{6, 23}},
{"hw.physmem", []_C_int{6, 19}},
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
index 6eb8c0b..8ea52a4 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
@@ -30,6 +31,7 @@ var sysctlMib = []mibentry{
{"hw.model", []_C_int{6, 2}},
{"hw.ncpu", []_C_int{6, 3}},
{"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
{"hw.pagesize", []_C_int{6, 7}},
{"hw.physmem", []_C_int{6, 19}},
{"hw.product", []_C_int{6, 15}},
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
index ba4304f..154b57a 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
new file mode 100644
index 0000000..d96bb2b
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
@@ -0,0 +1,280 @@
+// go run mksysctl_openbsd.go
+// Code generated by the command above; DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+package unix
+
+type mibentry struct {
+ ctlname string
+ ctloid []_C_int
+}
+
+var sysctlMib = []mibentry{
+ {"ddb.console", []_C_int{9, 6}},
+ {"ddb.log", []_C_int{9, 7}},
+ {"ddb.max_line", []_C_int{9, 3}},
+ {"ddb.max_width", []_C_int{9, 2}},
+ {"ddb.panic", []_C_int{9, 5}},
+ {"ddb.profile", []_C_int{9, 9}},
+ {"ddb.radix", []_C_int{9, 1}},
+ {"ddb.tab_stop_width", []_C_int{9, 4}},
+ {"ddb.trigger", []_C_int{9, 8}},
+ {"fs.posix.setuid", []_C_int{3, 1, 1}},
+ {"hw.allowpowerdown", []_C_int{6, 22}},
+ {"hw.byteorder", []_C_int{6, 4}},
+ {"hw.cpuspeed", []_C_int{6, 12}},
+ {"hw.diskcount", []_C_int{6, 10}},
+ {"hw.disknames", []_C_int{6, 8}},
+ {"hw.diskstats", []_C_int{6, 9}},
+ {"hw.machine", []_C_int{6, 1}},
+ {"hw.model", []_C_int{6, 2}},
+ {"hw.ncpu", []_C_int{6, 3}},
+ {"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
+ {"hw.pagesize", []_C_int{6, 7}},
+ {"hw.perfpolicy", []_C_int{6, 23}},
+ {"hw.physmem", []_C_int{6, 19}},
+ {"hw.product", []_C_int{6, 15}},
+ {"hw.serialno", []_C_int{6, 17}},
+ {"hw.setperf", []_C_int{6, 13}},
+ {"hw.smt", []_C_int{6, 24}},
+ {"hw.usermem", []_C_int{6, 20}},
+ {"hw.uuid", []_C_int{6, 18}},
+ {"hw.vendor", []_C_int{6, 14}},
+ {"hw.version", []_C_int{6, 16}},
+ {"kern.allowdt", []_C_int{1, 65}},
+ {"kern.allowkmem", []_C_int{1, 52}},
+ {"kern.argmax", []_C_int{1, 8}},
+ {"kern.audio", []_C_int{1, 84}},
+ {"kern.boottime", []_C_int{1, 21}},
+ {"kern.bufcachepercent", []_C_int{1, 72}},
+ {"kern.ccpu", []_C_int{1, 45}},
+ {"kern.clockrate", []_C_int{1, 12}},
+ {"kern.consbuf", []_C_int{1, 83}},
+ {"kern.consbufsize", []_C_int{1, 82}},
+ {"kern.consdev", []_C_int{1, 75}},
+ {"kern.cp_time", []_C_int{1, 40}},
+ {"kern.cp_time2", []_C_int{1, 71}},
+ {"kern.cpustats", []_C_int{1, 85}},
+ {"kern.domainname", []_C_int{1, 22}},
+ {"kern.file", []_C_int{1, 73}},
+ {"kern.forkstat", []_C_int{1, 42}},
+ {"kern.fscale", []_C_int{1, 46}},
+ {"kern.fsync", []_C_int{1, 33}},
+ {"kern.global_ptrace", []_C_int{1, 81}},
+ {"kern.hostid", []_C_int{1, 11}},
+ {"kern.hostname", []_C_int{1, 10}},
+ {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
+ {"kern.job_control", []_C_int{1, 19}},
+ {"kern.malloc.buckets", []_C_int{1, 39, 1}},
+ {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
+ {"kern.maxclusters", []_C_int{1, 67}},
+ {"kern.maxfiles", []_C_int{1, 7}},
+ {"kern.maxlocksperuid", []_C_int{1, 70}},
+ {"kern.maxpartitions", []_C_int{1, 23}},
+ {"kern.maxproc", []_C_int{1, 6}},
+ {"kern.maxthread", []_C_int{1, 25}},
+ {"kern.maxvnodes", []_C_int{1, 5}},
+ {"kern.mbstat", []_C_int{1, 59}},
+ {"kern.msgbuf", []_C_int{1, 48}},
+ {"kern.msgbufsize", []_C_int{1, 38}},
+ {"kern.nchstats", []_C_int{1, 41}},
+ {"kern.netlivelocks", []_C_int{1, 76}},
+ {"kern.nfiles", []_C_int{1, 56}},
+ {"kern.ngroups", []_C_int{1, 18}},
+ {"kern.nosuidcoredump", []_C_int{1, 32}},
+ {"kern.nprocs", []_C_int{1, 47}},
+ {"kern.nselcoll", []_C_int{1, 43}},
+ {"kern.nthreads", []_C_int{1, 26}},
+ {"kern.numvnodes", []_C_int{1, 58}},
+ {"kern.osrelease", []_C_int{1, 2}},
+ {"kern.osrevision", []_C_int{1, 3}},
+ {"kern.ostype", []_C_int{1, 1}},
+ {"kern.osversion", []_C_int{1, 27}},
+ {"kern.pfstatus", []_C_int{1, 86}},
+ {"kern.pool_debug", []_C_int{1, 77}},
+ {"kern.posix1version", []_C_int{1, 17}},
+ {"kern.proc", []_C_int{1, 66}},
+ {"kern.rawpartition", []_C_int{1, 24}},
+ {"kern.saved_ids", []_C_int{1, 20}},
+ {"kern.securelevel", []_C_int{1, 9}},
+ {"kern.seminfo", []_C_int{1, 61}},
+ {"kern.shminfo", []_C_int{1, 62}},
+ {"kern.somaxconn", []_C_int{1, 28}},
+ {"kern.sominconn", []_C_int{1, 29}},
+ {"kern.splassert", []_C_int{1, 54}},
+ {"kern.stackgap_random", []_C_int{1, 50}},
+ {"kern.sysvipc_info", []_C_int{1, 51}},
+ {"kern.sysvmsg", []_C_int{1, 34}},
+ {"kern.sysvsem", []_C_int{1, 35}},
+ {"kern.sysvshm", []_C_int{1, 36}},
+ {"kern.timecounter.choice", []_C_int{1, 69, 4}},
+ {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
+ {"kern.timecounter.tick", []_C_int{1, 69, 1}},
+ {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
+ {"kern.timeout_stats", []_C_int{1, 87}},
+ {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
+ {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
+ {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
+ {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
+ {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
+ {"kern.ttycount", []_C_int{1, 57}},
+ {"kern.utc_offset", []_C_int{1, 88}},
+ {"kern.version", []_C_int{1, 4}},
+ {"kern.watchdog.auto", []_C_int{1, 64, 2}},
+ {"kern.watchdog.period", []_C_int{1, 64, 1}},
+ {"kern.witnesswatch", []_C_int{1, 53}},
+ {"kern.wxabort", []_C_int{1, 74}},
+ {"net.bpf.bufsize", []_C_int{4, 31, 1}},
+ {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
+ {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
+ {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
+ {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
+ {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
+ {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
+ {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
+ {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
+ {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
+ {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
+ {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
+ {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
+ {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
+ {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
+ {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
+ {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
+ {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
+ {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
+ {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
+ {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
+ {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
+ {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
+ {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
+ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
+ {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
+ {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
+ {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
+ {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
+ {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
+ {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
+ {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
+ {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
+ {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
+ {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
+ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
+ {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
+ {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
+ {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
+ {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
+ {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
+ {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
+ {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
+ {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
+ {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
+ {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
+ {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
+ {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
+ {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
+ {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
+ {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
+ {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
+ {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
+ {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
+ {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
+ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
+ {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
+ {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
+ {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
+ {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
+ {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
+ {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
+ {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
+ {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
+ {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
+ {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
+ {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
+ {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
+ {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
+ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
+ {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
+ {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
+ {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
+ {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
+ {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
+ {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
+ {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
+ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
+ {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
+ {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
+ {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
+ {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
+ {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
+ {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
+ {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
+ {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
+ {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
+ {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
+ {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
+ {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
+ {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
+ {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
+ {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
+ {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
+ {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
+ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
+ {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
+ {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
+ {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
+ {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
+ {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
+ {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
+ {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
+ {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
+ {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
+ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
+ {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
+ {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
+ {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
+ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
+ {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
+ {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
+ {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
+ {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
+ {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
+ {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
+ {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
+ {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
+ {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
+ {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
+ {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
+ {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
+ {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
+ {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
+ {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
+ {"net.key.sadb_dump", []_C_int{4, 30, 1}},
+ {"net.key.spd_dump", []_C_int{4, 30, 2}},
+ {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
+ {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
+ {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
+ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
+ {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
+ {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
+ {"net.mpls.ttl", []_C_int{4, 33, 2}},
+ {"net.pflow.stats", []_C_int{4, 34, 1}},
+ {"net.pipex.enable", []_C_int{4, 35, 1}},
+ {"vm.anonmin", []_C_int{2, 7}},
+ {"vm.loadavg", []_C_int{2, 2}},
+ {"vm.malloc_conf", []_C_int{2, 12}},
+ {"vm.maxslp", []_C_int{2, 10}},
+ {"vm.nkmempages", []_C_int{2, 6}},
+ {"vm.psstrings", []_C_int{2, 3}},
+ {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
+ {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
+ {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
+ {"vm.uspace", []_C_int{2, 11}},
+ {"vm.uvmexp", []_C_int{2, 4}},
+ {"vm.vmmeter", []_C_int{2, 1}},
+ {"vm.vnodemin", []_C_int{2, 9}},
+ {"vm.vtextmin", []_C_int{2, 8}},
+}
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
deleted file mode 100644
index f336145..0000000
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
+++ /dev/null
@@ -1,436 +0,0 @@
-// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build 386,darwin
-
-package unix
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_CSOPS_AUDITTOKEN = 170
- SYS_WAITID = 173
- SYS_KDEBUG_TYPEFILTER = 177
- SYS_KDEBUG_TRACE_STRING = 178
- SYS_KDEBUG_TRACE64 = 179
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_THREAD_SELFCOUNTS = 186
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS_SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_OPEN_DPROTECTED_NP = 216
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SYSCTLBYNAME = 274
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS_LEDGER = 373
- SYS_KEVENT_QOS = 374
- SYS_KEVENT_ID = 375
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS_PSELECT = 394
- SYS_PSELECT_NOCANCEL = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_KAS_INFO = 439
- SYS_MEMORYSTATUS_CONTROL = 440
- SYS_GUARDED_OPEN_NP = 441
- SYS_GUARDED_CLOSE_NP = 442
- SYS_GUARDED_KQUEUE_NP = 443
- SYS_CHANGE_FDGUARD_NP = 444
- SYS_USRCTL = 445
- SYS_PROC_RLIMIT_CONTROL = 446
- SYS_CONNECTX = 447
- SYS_DISCONNECTX = 448
- SYS_PEELOFF = 449
- SYS_SOCKET_DELEGATE = 450
- SYS_TELEMETRY = 451
- SYS_PROC_UUID_POLICY = 452
- SYS_MEMORYSTATUS_GET_LEVEL = 453
- SYS_SYSTEM_OVERRIDE = 454
- SYS_VFS_PURGE = 455
- SYS_SFI_CTL = 456
- SYS_SFI_PIDCTL = 457
- SYS_COALITION = 458
- SYS_COALITION_INFO = 459
- SYS_NECP_MATCH_POLICY = 460
- SYS_GETATTRLISTBULK = 461
- SYS_CLONEFILEAT = 462
- SYS_OPENAT = 463
- SYS_OPENAT_NOCANCEL = 464
- SYS_RENAMEAT = 465
- SYS_FACCESSAT = 466
- SYS_FCHMODAT = 467
- SYS_FCHOWNAT = 468
- SYS_FSTATAT = 469
- SYS_FSTATAT64 = 470
- SYS_LINKAT = 471
- SYS_UNLINKAT = 472
- SYS_READLINKAT = 473
- SYS_SYMLINKAT = 474
- SYS_MKDIRAT = 475
- SYS_GETATTRLISTAT = 476
- SYS_PROC_TRACE_LOG = 477
- SYS_BSDTHREAD_CTL = 478
- SYS_OPENBYID_NP = 479
- SYS_RECVMSG_X = 480
- SYS_SENDMSG_X = 481
- SYS_THREAD_SELFUSAGE = 482
- SYS_CSRCTL = 483
- SYS_GUARDED_OPEN_DPROTECTED_NP = 484
- SYS_GUARDED_WRITE_NP = 485
- SYS_GUARDED_PWRITE_NP = 486
- SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAMEATX_NP = 488
- SYS_MREMAP_ENCRYPTED = 489
- SYS_NETAGENT_TRIGGER = 490
- SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
- SYS_MICROSTACKSHOT = 492
- SYS_GRAB_PGO_DATA = 493
- SYS_PERSONA = 494
- SYS_WORK_INTERVAL_CTL = 499
- SYS_GETENTROPY = 500
- SYS_NECP_OPEN = 501
- SYS_NECP_CLIENT_ACTION = 502
- SYS___NEXUS_OPEN = 503
- SYS___NEXUS_REGISTER = 504
- SYS___NEXUS_DEREGISTER = 505
- SYS___NEXUS_CREATE = 506
- SYS___NEXUS_DESTROY = 507
- SYS___NEXUS_GET_OPT = 508
- SYS___NEXUS_SET_OPT = 509
- SYS___CHANNEL_OPEN = 510
- SYS___CHANNEL_GET_INFO = 511
- SYS___CHANNEL_SYNC = 512
- SYS___CHANNEL_GET_OPT = 513
- SYS___CHANNEL_SET_OPT = 514
- SYS_ULOCK_WAIT = 515
- SYS_ULOCK_WAKE = 516
- SYS_FCLONEFILEAT = 517
- SYS_FS_SNAPSHOT = 518
- SYS_TERMINATE_WITH_PAYLOAD = 520
- SYS_ABORT_WITH_PAYLOAD = 521
- SYS_NECP_SESSION_OPEN = 522
- SYS_NECP_SESSION_ACTION = 523
- SYS_SETATTRLISTAT = 524
- SYS_NET_QOS_GUIDELINE = 525
- SYS_FMOUNT = 526
- SYS_NTP_ADJTIME = 527
- SYS_NTP_GETTIME = 528
- SYS_OS_FAULT_WITH_PAYLOAD = 529
- SYS_MAXSYSCALL = 530
- SYS_INVALID = 63
-)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
index 654dd3d..f8298ff 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
@@ -1,10 +1,12 @@
// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && darwin
// +build amd64,darwin
package unix
+// Deprecated: Use libSystem wrappers instead of direct syscalls.
const (
SYS_SYSCALL = 0
SYS_EXIT = 1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
deleted file mode 100644
index 103a72e..0000000
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
+++ /dev/null
@@ -1,436 +0,0 @@
-// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build arm,darwin
-
-package unix
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_CSOPS_AUDITTOKEN = 170
- SYS_WAITID = 173
- SYS_KDEBUG_TYPEFILTER = 177
- SYS_KDEBUG_TRACE_STRING = 178
- SYS_KDEBUG_TRACE64 = 179
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_THREAD_SELFCOUNTS = 186
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS_SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_OPEN_DPROTECTED_NP = 216
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SYSCTLBYNAME = 274
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS_LEDGER = 373
- SYS_KEVENT_QOS = 374
- SYS_KEVENT_ID = 375
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS_PSELECT = 394
- SYS_PSELECT_NOCANCEL = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_KAS_INFO = 439
- SYS_MEMORYSTATUS_CONTROL = 440
- SYS_GUARDED_OPEN_NP = 441
- SYS_GUARDED_CLOSE_NP = 442
- SYS_GUARDED_KQUEUE_NP = 443
- SYS_CHANGE_FDGUARD_NP = 444
- SYS_USRCTL = 445
- SYS_PROC_RLIMIT_CONTROL = 446
- SYS_CONNECTX = 447
- SYS_DISCONNECTX = 448
- SYS_PEELOFF = 449
- SYS_SOCKET_DELEGATE = 450
- SYS_TELEMETRY = 451
- SYS_PROC_UUID_POLICY = 452
- SYS_MEMORYSTATUS_GET_LEVEL = 453
- SYS_SYSTEM_OVERRIDE = 454
- SYS_VFS_PURGE = 455
- SYS_SFI_CTL = 456
- SYS_SFI_PIDCTL = 457
- SYS_COALITION = 458
- SYS_COALITION_INFO = 459
- SYS_NECP_MATCH_POLICY = 460
- SYS_GETATTRLISTBULK = 461
- SYS_CLONEFILEAT = 462
- SYS_OPENAT = 463
- SYS_OPENAT_NOCANCEL = 464
- SYS_RENAMEAT = 465
- SYS_FACCESSAT = 466
- SYS_FCHMODAT = 467
- SYS_FCHOWNAT = 468
- SYS_FSTATAT = 469
- SYS_FSTATAT64 = 470
- SYS_LINKAT = 471
- SYS_UNLINKAT = 472
- SYS_READLINKAT = 473
- SYS_SYMLINKAT = 474
- SYS_MKDIRAT = 475
- SYS_GETATTRLISTAT = 476
- SYS_PROC_TRACE_LOG = 477
- SYS_BSDTHREAD_CTL = 478
- SYS_OPENBYID_NP = 479
- SYS_RECVMSG_X = 480
- SYS_SENDMSG_X = 481
- SYS_THREAD_SELFUSAGE = 482
- SYS_CSRCTL = 483
- SYS_GUARDED_OPEN_DPROTECTED_NP = 484
- SYS_GUARDED_WRITE_NP = 485
- SYS_GUARDED_PWRITE_NP = 486
- SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAMEATX_NP = 488
- SYS_MREMAP_ENCRYPTED = 489
- SYS_NETAGENT_TRIGGER = 490
- SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
- SYS_MICROSTACKSHOT = 492
- SYS_GRAB_PGO_DATA = 493
- SYS_PERSONA = 494
- SYS_WORK_INTERVAL_CTL = 499
- SYS_GETENTROPY = 500
- SYS_NECP_OPEN = 501
- SYS_NECP_CLIENT_ACTION = 502
- SYS___NEXUS_OPEN = 503
- SYS___NEXUS_REGISTER = 504
- SYS___NEXUS_DEREGISTER = 505
- SYS___NEXUS_CREATE = 506
- SYS___NEXUS_DESTROY = 507
- SYS___NEXUS_GET_OPT = 508
- SYS___NEXUS_SET_OPT = 509
- SYS___CHANNEL_OPEN = 510
- SYS___CHANNEL_GET_INFO = 511
- SYS___CHANNEL_SYNC = 512
- SYS___CHANNEL_GET_OPT = 513
- SYS___CHANNEL_SET_OPT = 514
- SYS_ULOCK_WAIT = 515
- SYS_ULOCK_WAKE = 516
- SYS_FCLONEFILEAT = 517
- SYS_FS_SNAPSHOT = 518
- SYS_TERMINATE_WITH_PAYLOAD = 520
- SYS_ABORT_WITH_PAYLOAD = 521
- SYS_NECP_SESSION_OPEN = 522
- SYS_NECP_SESSION_ACTION = 523
- SYS_SETATTRLISTAT = 524
- SYS_NET_QOS_GUIDELINE = 525
- SYS_FMOUNT = 526
- SYS_NTP_ADJTIME = 527
- SYS_NTP_GETTIME = 528
- SYS_OS_FAULT_WITH_PAYLOAD = 529
- SYS_MAXSYSCALL = 530
- SYS_INVALID = 63
-)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
index 7ab2130..5eb433b 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
@@ -1,10 +1,12 @@
// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && darwin
// +build arm64,darwin
package unix
+// Deprecated: Use libSystem wrappers instead of direct syscalls.
const (
SYS_SYSCALL = 0
SYS_EXIT = 1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
index 464c9a9..703675c 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
@@ -1,134 +1,131 @@
// go run mksysnum.go https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
package unix
const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void exit(int rval); }
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
- SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); }
- SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
- SYS_ACCESS = 33 // { int access(char *path, int flags); }
- SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
- SYS_VFORK = 66 // { pid_t vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(int from, int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
- SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
- SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
- SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
- SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
- SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
- SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
- SYS_UNAME = 164 // { int uname(struct utsname *name); }
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
- SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
- SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
- SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
- // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
+ SYS_EXIT = 1 // { void exit(int rval); }
+ SYS_FORK = 2 // { int fork(void); }
+ SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
+ SYS_CLOSE = 6 // { int close(int fd); }
+ SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int
+ // SYS_NOSYS = 8; // { int nosys(void); } __nosys nosys_args int
+ SYS_LINK = 9 // { int link(char *path, char *link); }
+ SYS_UNLINK = 10 // { int unlink(char *path); }
+ SYS_CHDIR = 12 // { int chdir(char *path); }
+ SYS_FCHDIR = 13 // { int fchdir(int fd); }
+ SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
+ SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
+ SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
+ SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
+ SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
+ SYS_GETPID = 20 // { pid_t getpid(void); }
+ SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
+ SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
+ SYS_SETUID = 23 // { int setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t getuid(void); }
+ SYS_GETEUID = 25 // { uid_t geteuid(void); }
+ SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
+ SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
+ SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
+ SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
+ SYS_ACCESS = 33 // { int access(char *path, int flags); }
+ SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
+ SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
+ SYS_SYNC = 36 // { int sync(void); }
+ SYS_KILL = 37 // { int kill(int pid, int signum); }
+ SYS_GETPPID = 39 // { pid_t getppid(void); }
+ SYS_DUP = 41 // { int dup(int fd); }
+ SYS_PIPE = 42 // { int pipe(void); }
+ SYS_GETEGID = 43 // { gid_t getegid(void); }
+ SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
+ SYS_GETGID = 47 // { gid_t getgid(void); }
+ SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, size_t namelen); }
+ SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
+ SYS_ACCT = 51 // { int acct(char *path); }
+ SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
+ SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
+ SYS_REBOOT = 55 // { int reboot(int opt); }
+ SYS_REVOKE = 56 // { int revoke(char *path); }
+ SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
+ SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
+ SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
+ SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
+ SYS_CHROOT = 61 // { int chroot(char *path); }
+ SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
+ SYS_VFORK = 66 // { pid_t vfork(void); }
+ SYS_SBRK = 69 // { caddr_t sbrk(size_t incr); }
+ SYS_SSTK = 70 // { int sstk(size_t incr); }
+ SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
+ SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
+ SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int getpgrp(void); }
+ SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
+ SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
+ SYS_SWAPON = 85 // { int swapon(char *name); }
+ SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
+ SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
+ SYS_DUP2 = 90 // { int dup2(int from, int to); }
+ SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
+ SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_FSYNC = 95 // { int fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
+ SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
+ SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
+ SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
+ SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
+ SYS_LISTEN = 106 // { int listen(int s, int backlog); }
+ SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
+ SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
+ SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
+ SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
+ SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
+ SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
+ SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
+ SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
+ SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
+ SYS_RENAME = 128 // { int rename(char *from, char *to); }
+ SYS_FLOCK = 131 // { int flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
+ SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
+ SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
+ SYS_RMDIR = 137 // { int rmdir(char *path); }
+ SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
+ SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
+ SYS_SETSID = 147 // { int setsid(void); }
+ SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
+ SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
+ SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
+ SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
+ SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
+ SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
+ SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
+ SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
+ SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
+ SYS_SETGID = 181 // { int setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
+ SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
+ SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
+ SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
+ SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); }
SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
@@ -161,8 +158,8 @@ const (
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
- SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, u_int iovcnt, int flags, off_t offset); }
- SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,u_int iovcnt, int flags, off_t offset); }
+ SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); }
+ SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); }
SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
SYS_MODNEXT = 300 // { int modnext(int modid); }
@@ -225,7 +222,7 @@ const (
SYS_KQUEUE = 362 // { int kqueue(void); }
SYS_KEVENT = 363 // { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
- SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
+ SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long flags); }
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
@@ -302,7 +299,7 @@ const (
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
SYS_PROCCTL = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); }
- SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, int flags, int atflags);}
+ SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, u_long flags, int atflags);}
SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); }
SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); }
@@ -312,4 +309,9 @@ const (
SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }
SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }
SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }
+ SYS_GETCPUCLOCKID = 547 // { int getcpuclockid(pid_t pid, lwpid_t lwp_id, clockid_t *clock_id); }
+ SYS_WAIT6 = 548 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }
+ SYS_LWP_GETNAME = 549 // { int lwp_getname(lwpid_t tid, char *name, size_t len); }
+ SYS_GETRANDOM = 550 // { ssize_t getrandom(void *buf, size_t len, unsigned flags); }
+ SYS___REALPATH = 551 // { ssize_t __realpath(const char *path, char *buf, size_t len); }
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
index 9474974..59d5dfc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && freebsd
// +build 386,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
index 48a7bea..342d471 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && freebsd
// +build amd64,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
index 4a6dfd4..e2e3d72 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && freebsd
// +build arm,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
index 3e51af8..61ad5ca 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && freebsd
// +build arm64,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index 7aae554..31847d2 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && linux
// +build 386,linux
package unix
@@ -431,4 +432,17 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_MEMFD_SECRET = 447
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 7968439..3503cbb 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -1,356 +1,370 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && linux
// +build amd64,linux
package unix
const (
- SYS_READ = 0
- SYS_WRITE = 1
- SYS_OPEN = 2
- SYS_CLOSE = 3
- SYS_STAT = 4
- SYS_FSTAT = 5
- SYS_LSTAT = 6
- SYS_POLL = 7
- SYS_LSEEK = 8
- SYS_MMAP = 9
- SYS_MPROTECT = 10
- SYS_MUNMAP = 11
- SYS_BRK = 12
- SYS_RT_SIGACTION = 13
- SYS_RT_SIGPROCMASK = 14
- SYS_RT_SIGRETURN = 15
- SYS_IOCTL = 16
- SYS_PREAD64 = 17
- SYS_PWRITE64 = 18
- SYS_READV = 19
- SYS_WRITEV = 20
- SYS_ACCESS = 21
- SYS_PIPE = 22
- SYS_SELECT = 23
- SYS_SCHED_YIELD = 24
- SYS_MREMAP = 25
- SYS_MSYNC = 26
- SYS_MINCORE = 27
- SYS_MADVISE = 28
- SYS_SHMGET = 29
- SYS_SHMAT = 30
- SYS_SHMCTL = 31
- SYS_DUP = 32
- SYS_DUP2 = 33
- SYS_PAUSE = 34
- SYS_NANOSLEEP = 35
- SYS_GETITIMER = 36
- SYS_ALARM = 37
- SYS_SETITIMER = 38
- SYS_GETPID = 39
- SYS_SENDFILE = 40
- SYS_SOCKET = 41
- SYS_CONNECT = 42
- SYS_ACCEPT = 43
- SYS_SENDTO = 44
- SYS_RECVFROM = 45
- SYS_SENDMSG = 46
- SYS_RECVMSG = 47
- SYS_SHUTDOWN = 48
- SYS_BIND = 49
- SYS_LISTEN = 50
- SYS_GETSOCKNAME = 51
- SYS_GETPEERNAME = 52
- SYS_SOCKETPAIR = 53
- SYS_SETSOCKOPT = 54
- SYS_GETSOCKOPT = 55
- SYS_CLONE = 56
- SYS_FORK = 57
- SYS_VFORK = 58
- SYS_EXECVE = 59
- SYS_EXIT = 60
- SYS_WAIT4 = 61
- SYS_KILL = 62
- SYS_UNAME = 63
- SYS_SEMGET = 64
- SYS_SEMOP = 65
- SYS_SEMCTL = 66
- SYS_SHMDT = 67
- SYS_MSGGET = 68
- SYS_MSGSND = 69
- SYS_MSGRCV = 70
- SYS_MSGCTL = 71
- SYS_FCNTL = 72
- SYS_FLOCK = 73
- SYS_FSYNC = 74
- SYS_FDATASYNC = 75
- SYS_TRUNCATE = 76
- SYS_FTRUNCATE = 77
- SYS_GETDENTS = 78
- SYS_GETCWD = 79
- SYS_CHDIR = 80
- SYS_FCHDIR = 81
- SYS_RENAME = 82
- SYS_MKDIR = 83
- SYS_RMDIR = 84
- SYS_CREAT = 85
- SYS_LINK = 86
- SYS_UNLINK = 87
- SYS_SYMLINK = 88
- SYS_READLINK = 89
- SYS_CHMOD = 90
- SYS_FCHMOD = 91
- SYS_CHOWN = 92
- SYS_FCHOWN = 93
- SYS_LCHOWN = 94
- SYS_UMASK = 95
- SYS_GETTIMEOFDAY = 96
- SYS_GETRLIMIT = 97
- SYS_GETRUSAGE = 98
- SYS_SYSINFO = 99
- SYS_TIMES = 100
- SYS_PTRACE = 101
- SYS_GETUID = 102
- SYS_SYSLOG = 103
- SYS_GETGID = 104
- SYS_SETUID = 105
- SYS_SETGID = 106
- SYS_GETEUID = 107
- SYS_GETEGID = 108
- SYS_SETPGID = 109
- SYS_GETPPID = 110
- SYS_GETPGRP = 111
- SYS_SETSID = 112
- SYS_SETREUID = 113
- SYS_SETREGID = 114
- SYS_GETGROUPS = 115
- SYS_SETGROUPS = 116
- SYS_SETRESUID = 117
- SYS_GETRESUID = 118
- SYS_SETRESGID = 119
- SYS_GETRESGID = 120
- SYS_GETPGID = 121
- SYS_SETFSUID = 122
- SYS_SETFSGID = 123
- SYS_GETSID = 124
- SYS_CAPGET = 125
- SYS_CAPSET = 126
- SYS_RT_SIGPENDING = 127
- SYS_RT_SIGTIMEDWAIT = 128
- SYS_RT_SIGQUEUEINFO = 129
- SYS_RT_SIGSUSPEND = 130
- SYS_SIGALTSTACK = 131
- SYS_UTIME = 132
- SYS_MKNOD = 133
- SYS_USELIB = 134
- SYS_PERSONALITY = 135
- SYS_USTAT = 136
- SYS_STATFS = 137
- SYS_FSTATFS = 138
- SYS_SYSFS = 139
- SYS_GETPRIORITY = 140
- SYS_SETPRIORITY = 141
- SYS_SCHED_SETPARAM = 142
- SYS_SCHED_GETPARAM = 143
- SYS_SCHED_SETSCHEDULER = 144
- SYS_SCHED_GETSCHEDULER = 145
- SYS_SCHED_GET_PRIORITY_MAX = 146
- SYS_SCHED_GET_PRIORITY_MIN = 147
- SYS_SCHED_RR_GET_INTERVAL = 148
- SYS_MLOCK = 149
- SYS_MUNLOCK = 150
- SYS_MLOCKALL = 151
- SYS_MUNLOCKALL = 152
- SYS_VHANGUP = 153
- SYS_MODIFY_LDT = 154
- SYS_PIVOT_ROOT = 155
- SYS__SYSCTL = 156
- SYS_PRCTL = 157
- SYS_ARCH_PRCTL = 158
- SYS_ADJTIMEX = 159
- SYS_SETRLIMIT = 160
- SYS_CHROOT = 161
- SYS_SYNC = 162
- SYS_ACCT = 163
- SYS_SETTIMEOFDAY = 164
- SYS_MOUNT = 165
- SYS_UMOUNT2 = 166
- SYS_SWAPON = 167
- SYS_SWAPOFF = 168
- SYS_REBOOT = 169
- SYS_SETHOSTNAME = 170
- SYS_SETDOMAINNAME = 171
- SYS_IOPL = 172
- SYS_IOPERM = 173
- SYS_CREATE_MODULE = 174
- SYS_INIT_MODULE = 175
- SYS_DELETE_MODULE = 176
- SYS_GET_KERNEL_SYMS = 177
- SYS_QUERY_MODULE = 178
- SYS_QUOTACTL = 179
- SYS_NFSSERVCTL = 180
- SYS_GETPMSG = 181
- SYS_PUTPMSG = 182
- SYS_AFS_SYSCALL = 183
- SYS_TUXCALL = 184
- SYS_SECURITY = 185
- SYS_GETTID = 186
- SYS_READAHEAD = 187
- SYS_SETXATTR = 188
- SYS_LSETXATTR = 189
- SYS_FSETXATTR = 190
- SYS_GETXATTR = 191
- SYS_LGETXATTR = 192
- SYS_FGETXATTR = 193
- SYS_LISTXATTR = 194
- SYS_LLISTXATTR = 195
- SYS_FLISTXATTR = 196
- SYS_REMOVEXATTR = 197
- SYS_LREMOVEXATTR = 198
- SYS_FREMOVEXATTR = 199
- SYS_TKILL = 200
- SYS_TIME = 201
- SYS_FUTEX = 202
- SYS_SCHED_SETAFFINITY = 203
- SYS_SCHED_GETAFFINITY = 204
- SYS_SET_THREAD_AREA = 205
- SYS_IO_SETUP = 206
- SYS_IO_DESTROY = 207
- SYS_IO_GETEVENTS = 208
- SYS_IO_SUBMIT = 209
- SYS_IO_CANCEL = 210
- SYS_GET_THREAD_AREA = 211
- SYS_LOOKUP_DCOOKIE = 212
- SYS_EPOLL_CREATE = 213
- SYS_EPOLL_CTL_OLD = 214
- SYS_EPOLL_WAIT_OLD = 215
- SYS_REMAP_FILE_PAGES = 216
- SYS_GETDENTS64 = 217
- SYS_SET_TID_ADDRESS = 218
- SYS_RESTART_SYSCALL = 219
- SYS_SEMTIMEDOP = 220
- SYS_FADVISE64 = 221
- SYS_TIMER_CREATE = 222
- SYS_TIMER_SETTIME = 223
- SYS_TIMER_GETTIME = 224
- SYS_TIMER_GETOVERRUN = 225
- SYS_TIMER_DELETE = 226
- SYS_CLOCK_SETTIME = 227
- SYS_CLOCK_GETTIME = 228
- SYS_CLOCK_GETRES = 229
- SYS_CLOCK_NANOSLEEP = 230
- SYS_EXIT_GROUP = 231
- SYS_EPOLL_WAIT = 232
- SYS_EPOLL_CTL = 233
- SYS_TGKILL = 234
- SYS_UTIMES = 235
- SYS_VSERVER = 236
- SYS_MBIND = 237
- SYS_SET_MEMPOLICY = 238
- SYS_GET_MEMPOLICY = 239
- SYS_MQ_OPEN = 240
- SYS_MQ_UNLINK = 241
- SYS_MQ_TIMEDSEND = 242
- SYS_MQ_TIMEDRECEIVE = 243
- SYS_MQ_NOTIFY = 244
- SYS_MQ_GETSETATTR = 245
- SYS_KEXEC_LOAD = 246
- SYS_WAITID = 247
- SYS_ADD_KEY = 248
- SYS_REQUEST_KEY = 249
- SYS_KEYCTL = 250
- SYS_IOPRIO_SET = 251
- SYS_IOPRIO_GET = 252
- SYS_INOTIFY_INIT = 253
- SYS_INOTIFY_ADD_WATCH = 254
- SYS_INOTIFY_RM_WATCH = 255
- SYS_MIGRATE_PAGES = 256
- SYS_OPENAT = 257
- SYS_MKDIRAT = 258
- SYS_MKNODAT = 259
- SYS_FCHOWNAT = 260
- SYS_FUTIMESAT = 261
- SYS_NEWFSTATAT = 262
- SYS_UNLINKAT = 263
- SYS_RENAMEAT = 264
- SYS_LINKAT = 265
- SYS_SYMLINKAT = 266
- SYS_READLINKAT = 267
- SYS_FCHMODAT = 268
- SYS_FACCESSAT = 269
- SYS_PSELECT6 = 270
- SYS_PPOLL = 271
- SYS_UNSHARE = 272
- SYS_SET_ROBUST_LIST = 273
- SYS_GET_ROBUST_LIST = 274
- SYS_SPLICE = 275
- SYS_TEE = 276
- SYS_SYNC_FILE_RANGE = 277
- SYS_VMSPLICE = 278
- SYS_MOVE_PAGES = 279
- SYS_UTIMENSAT = 280
- SYS_EPOLL_PWAIT = 281
- SYS_SIGNALFD = 282
- SYS_TIMERFD_CREATE = 283
- SYS_EVENTFD = 284
- SYS_FALLOCATE = 285
- SYS_TIMERFD_SETTIME = 286
- SYS_TIMERFD_GETTIME = 287
- SYS_ACCEPT4 = 288
- SYS_SIGNALFD4 = 289
- SYS_EVENTFD2 = 290
- SYS_EPOLL_CREATE1 = 291
- SYS_DUP3 = 292
- SYS_PIPE2 = 293
- SYS_INOTIFY_INIT1 = 294
- SYS_PREADV = 295
- SYS_PWRITEV = 296
- SYS_RT_TGSIGQUEUEINFO = 297
- SYS_PERF_EVENT_OPEN = 298
- SYS_RECVMMSG = 299
- SYS_FANOTIFY_INIT = 300
- SYS_FANOTIFY_MARK = 301
- SYS_PRLIMIT64 = 302
- SYS_NAME_TO_HANDLE_AT = 303
- SYS_OPEN_BY_HANDLE_AT = 304
- SYS_CLOCK_ADJTIME = 305
- SYS_SYNCFS = 306
- SYS_SENDMMSG = 307
- SYS_SETNS = 308
- SYS_GETCPU = 309
- SYS_PROCESS_VM_READV = 310
- SYS_PROCESS_VM_WRITEV = 311
- SYS_KCMP = 312
- SYS_FINIT_MODULE = 313
- SYS_SCHED_SETATTR = 314
- SYS_SCHED_GETATTR = 315
- SYS_RENAMEAT2 = 316
- SYS_SECCOMP = 317
- SYS_GETRANDOM = 318
- SYS_MEMFD_CREATE = 319
- SYS_KEXEC_FILE_LOAD = 320
- SYS_BPF = 321
- SYS_EXECVEAT = 322
- SYS_USERFAULTFD = 323
- SYS_MEMBARRIER = 324
- SYS_MLOCK2 = 325
- SYS_COPY_FILE_RANGE = 326
- SYS_PREADV2 = 327
- SYS_PWRITEV2 = 328
- SYS_PKEY_MPROTECT = 329
- SYS_PKEY_ALLOC = 330
- SYS_PKEY_FREE = 331
- SYS_STATX = 332
- SYS_IO_PGETEVENTS = 333
- SYS_RSEQ = 334
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
- SYS_CLONE3 = 435
+ SYS_READ = 0
+ SYS_WRITE = 1
+ SYS_OPEN = 2
+ SYS_CLOSE = 3
+ SYS_STAT = 4
+ SYS_FSTAT = 5
+ SYS_LSTAT = 6
+ SYS_POLL = 7
+ SYS_LSEEK = 8
+ SYS_MMAP = 9
+ SYS_MPROTECT = 10
+ SYS_MUNMAP = 11
+ SYS_BRK = 12
+ SYS_RT_SIGACTION = 13
+ SYS_RT_SIGPROCMASK = 14
+ SYS_RT_SIGRETURN = 15
+ SYS_IOCTL = 16
+ SYS_PREAD64 = 17
+ SYS_PWRITE64 = 18
+ SYS_READV = 19
+ SYS_WRITEV = 20
+ SYS_ACCESS = 21
+ SYS_PIPE = 22
+ SYS_SELECT = 23
+ SYS_SCHED_YIELD = 24
+ SYS_MREMAP = 25
+ SYS_MSYNC = 26
+ SYS_MINCORE = 27
+ SYS_MADVISE = 28
+ SYS_SHMGET = 29
+ SYS_SHMAT = 30
+ SYS_SHMCTL = 31
+ SYS_DUP = 32
+ SYS_DUP2 = 33
+ SYS_PAUSE = 34
+ SYS_NANOSLEEP = 35
+ SYS_GETITIMER = 36
+ SYS_ALARM = 37
+ SYS_SETITIMER = 38
+ SYS_GETPID = 39
+ SYS_SENDFILE = 40
+ SYS_SOCKET = 41
+ SYS_CONNECT = 42
+ SYS_ACCEPT = 43
+ SYS_SENDTO = 44
+ SYS_RECVFROM = 45
+ SYS_SENDMSG = 46
+ SYS_RECVMSG = 47
+ SYS_SHUTDOWN = 48
+ SYS_BIND = 49
+ SYS_LISTEN = 50
+ SYS_GETSOCKNAME = 51
+ SYS_GETPEERNAME = 52
+ SYS_SOCKETPAIR = 53
+ SYS_SETSOCKOPT = 54
+ SYS_GETSOCKOPT = 55
+ SYS_CLONE = 56
+ SYS_FORK = 57
+ SYS_VFORK = 58
+ SYS_EXECVE = 59
+ SYS_EXIT = 60
+ SYS_WAIT4 = 61
+ SYS_KILL = 62
+ SYS_UNAME = 63
+ SYS_SEMGET = 64
+ SYS_SEMOP = 65
+ SYS_SEMCTL = 66
+ SYS_SHMDT = 67
+ SYS_MSGGET = 68
+ SYS_MSGSND = 69
+ SYS_MSGRCV = 70
+ SYS_MSGCTL = 71
+ SYS_FCNTL = 72
+ SYS_FLOCK = 73
+ SYS_FSYNC = 74
+ SYS_FDATASYNC = 75
+ SYS_TRUNCATE = 76
+ SYS_FTRUNCATE = 77
+ SYS_GETDENTS = 78
+ SYS_GETCWD = 79
+ SYS_CHDIR = 80
+ SYS_FCHDIR = 81
+ SYS_RENAME = 82
+ SYS_MKDIR = 83
+ SYS_RMDIR = 84
+ SYS_CREAT = 85
+ SYS_LINK = 86
+ SYS_UNLINK = 87
+ SYS_SYMLINK = 88
+ SYS_READLINK = 89
+ SYS_CHMOD = 90
+ SYS_FCHMOD = 91
+ SYS_CHOWN = 92
+ SYS_FCHOWN = 93
+ SYS_LCHOWN = 94
+ SYS_UMASK = 95
+ SYS_GETTIMEOFDAY = 96
+ SYS_GETRLIMIT = 97
+ SYS_GETRUSAGE = 98
+ SYS_SYSINFO = 99
+ SYS_TIMES = 100
+ SYS_PTRACE = 101
+ SYS_GETUID = 102
+ SYS_SYSLOG = 103
+ SYS_GETGID = 104
+ SYS_SETUID = 105
+ SYS_SETGID = 106
+ SYS_GETEUID = 107
+ SYS_GETEGID = 108
+ SYS_SETPGID = 109
+ SYS_GETPPID = 110
+ SYS_GETPGRP = 111
+ SYS_SETSID = 112
+ SYS_SETREUID = 113
+ SYS_SETREGID = 114
+ SYS_GETGROUPS = 115
+ SYS_SETGROUPS = 116
+ SYS_SETRESUID = 117
+ SYS_GETRESUID = 118
+ SYS_SETRESGID = 119
+ SYS_GETRESGID = 120
+ SYS_GETPGID = 121
+ SYS_SETFSUID = 122
+ SYS_SETFSGID = 123
+ SYS_GETSID = 124
+ SYS_CAPGET = 125
+ SYS_CAPSET = 126
+ SYS_RT_SIGPENDING = 127
+ SYS_RT_SIGTIMEDWAIT = 128
+ SYS_RT_SIGQUEUEINFO = 129
+ SYS_RT_SIGSUSPEND = 130
+ SYS_SIGALTSTACK = 131
+ SYS_UTIME = 132
+ SYS_MKNOD = 133
+ SYS_USELIB = 134
+ SYS_PERSONALITY = 135
+ SYS_USTAT = 136
+ SYS_STATFS = 137
+ SYS_FSTATFS = 138
+ SYS_SYSFS = 139
+ SYS_GETPRIORITY = 140
+ SYS_SETPRIORITY = 141
+ SYS_SCHED_SETPARAM = 142
+ SYS_SCHED_GETPARAM = 143
+ SYS_SCHED_SETSCHEDULER = 144
+ SYS_SCHED_GETSCHEDULER = 145
+ SYS_SCHED_GET_PRIORITY_MAX = 146
+ SYS_SCHED_GET_PRIORITY_MIN = 147
+ SYS_SCHED_RR_GET_INTERVAL = 148
+ SYS_MLOCK = 149
+ SYS_MUNLOCK = 150
+ SYS_MLOCKALL = 151
+ SYS_MUNLOCKALL = 152
+ SYS_VHANGUP = 153
+ SYS_MODIFY_LDT = 154
+ SYS_PIVOT_ROOT = 155
+ SYS__SYSCTL = 156
+ SYS_PRCTL = 157
+ SYS_ARCH_PRCTL = 158
+ SYS_ADJTIMEX = 159
+ SYS_SETRLIMIT = 160
+ SYS_CHROOT = 161
+ SYS_SYNC = 162
+ SYS_ACCT = 163
+ SYS_SETTIMEOFDAY = 164
+ SYS_MOUNT = 165
+ SYS_UMOUNT2 = 166
+ SYS_SWAPON = 167
+ SYS_SWAPOFF = 168
+ SYS_REBOOT = 169
+ SYS_SETHOSTNAME = 170
+ SYS_SETDOMAINNAME = 171
+ SYS_IOPL = 172
+ SYS_IOPERM = 173
+ SYS_CREATE_MODULE = 174
+ SYS_INIT_MODULE = 175
+ SYS_DELETE_MODULE = 176
+ SYS_GET_KERNEL_SYMS = 177
+ SYS_QUERY_MODULE = 178
+ SYS_QUOTACTL = 179
+ SYS_NFSSERVCTL = 180
+ SYS_GETPMSG = 181
+ SYS_PUTPMSG = 182
+ SYS_AFS_SYSCALL = 183
+ SYS_TUXCALL = 184
+ SYS_SECURITY = 185
+ SYS_GETTID = 186
+ SYS_READAHEAD = 187
+ SYS_SETXATTR = 188
+ SYS_LSETXATTR = 189
+ SYS_FSETXATTR = 190
+ SYS_GETXATTR = 191
+ SYS_LGETXATTR = 192
+ SYS_FGETXATTR = 193
+ SYS_LISTXATTR = 194
+ SYS_LLISTXATTR = 195
+ SYS_FLISTXATTR = 196
+ SYS_REMOVEXATTR = 197
+ SYS_LREMOVEXATTR = 198
+ SYS_FREMOVEXATTR = 199
+ SYS_TKILL = 200
+ SYS_TIME = 201
+ SYS_FUTEX = 202
+ SYS_SCHED_SETAFFINITY = 203
+ SYS_SCHED_GETAFFINITY = 204
+ SYS_SET_THREAD_AREA = 205
+ SYS_IO_SETUP = 206
+ SYS_IO_DESTROY = 207
+ SYS_IO_GETEVENTS = 208
+ SYS_IO_SUBMIT = 209
+ SYS_IO_CANCEL = 210
+ SYS_GET_THREAD_AREA = 211
+ SYS_LOOKUP_DCOOKIE = 212
+ SYS_EPOLL_CREATE = 213
+ SYS_EPOLL_CTL_OLD = 214
+ SYS_EPOLL_WAIT_OLD = 215
+ SYS_REMAP_FILE_PAGES = 216
+ SYS_GETDENTS64 = 217
+ SYS_SET_TID_ADDRESS = 218
+ SYS_RESTART_SYSCALL = 219
+ SYS_SEMTIMEDOP = 220
+ SYS_FADVISE64 = 221
+ SYS_TIMER_CREATE = 222
+ SYS_TIMER_SETTIME = 223
+ SYS_TIMER_GETTIME = 224
+ SYS_TIMER_GETOVERRUN = 225
+ SYS_TIMER_DELETE = 226
+ SYS_CLOCK_SETTIME = 227
+ SYS_CLOCK_GETTIME = 228
+ SYS_CLOCK_GETRES = 229
+ SYS_CLOCK_NANOSLEEP = 230
+ SYS_EXIT_GROUP = 231
+ SYS_EPOLL_WAIT = 232
+ SYS_EPOLL_CTL = 233
+ SYS_TGKILL = 234
+ SYS_UTIMES = 235
+ SYS_VSERVER = 236
+ SYS_MBIND = 237
+ SYS_SET_MEMPOLICY = 238
+ SYS_GET_MEMPOLICY = 239
+ SYS_MQ_OPEN = 240
+ SYS_MQ_UNLINK = 241
+ SYS_MQ_TIMEDSEND = 242
+ SYS_MQ_TIMEDRECEIVE = 243
+ SYS_MQ_NOTIFY = 244
+ SYS_MQ_GETSETATTR = 245
+ SYS_KEXEC_LOAD = 246
+ SYS_WAITID = 247
+ SYS_ADD_KEY = 248
+ SYS_REQUEST_KEY = 249
+ SYS_KEYCTL = 250
+ SYS_IOPRIO_SET = 251
+ SYS_IOPRIO_GET = 252
+ SYS_INOTIFY_INIT = 253
+ SYS_INOTIFY_ADD_WATCH = 254
+ SYS_INOTIFY_RM_WATCH = 255
+ SYS_MIGRATE_PAGES = 256
+ SYS_OPENAT = 257
+ SYS_MKDIRAT = 258
+ SYS_MKNODAT = 259
+ SYS_FCHOWNAT = 260
+ SYS_FUTIMESAT = 261
+ SYS_NEWFSTATAT = 262
+ SYS_UNLINKAT = 263
+ SYS_RENAMEAT = 264
+ SYS_LINKAT = 265
+ SYS_SYMLINKAT = 266
+ SYS_READLINKAT = 267
+ SYS_FCHMODAT = 268
+ SYS_FACCESSAT = 269
+ SYS_PSELECT6 = 270
+ SYS_PPOLL = 271
+ SYS_UNSHARE = 272
+ SYS_SET_ROBUST_LIST = 273
+ SYS_GET_ROBUST_LIST = 274
+ SYS_SPLICE = 275
+ SYS_TEE = 276
+ SYS_SYNC_FILE_RANGE = 277
+ SYS_VMSPLICE = 278
+ SYS_MOVE_PAGES = 279
+ SYS_UTIMENSAT = 280
+ SYS_EPOLL_PWAIT = 281
+ SYS_SIGNALFD = 282
+ SYS_TIMERFD_CREATE = 283
+ SYS_EVENTFD = 284
+ SYS_FALLOCATE = 285
+ SYS_TIMERFD_SETTIME = 286
+ SYS_TIMERFD_GETTIME = 287
+ SYS_ACCEPT4 = 288
+ SYS_SIGNALFD4 = 289
+ SYS_EVENTFD2 = 290
+ SYS_EPOLL_CREATE1 = 291
+ SYS_DUP3 = 292
+ SYS_PIPE2 = 293
+ SYS_INOTIFY_INIT1 = 294
+ SYS_PREADV = 295
+ SYS_PWRITEV = 296
+ SYS_RT_TGSIGQUEUEINFO = 297
+ SYS_PERF_EVENT_OPEN = 298
+ SYS_RECVMMSG = 299
+ SYS_FANOTIFY_INIT = 300
+ SYS_FANOTIFY_MARK = 301
+ SYS_PRLIMIT64 = 302
+ SYS_NAME_TO_HANDLE_AT = 303
+ SYS_OPEN_BY_HANDLE_AT = 304
+ SYS_CLOCK_ADJTIME = 305
+ SYS_SYNCFS = 306
+ SYS_SENDMMSG = 307
+ SYS_SETNS = 308
+ SYS_GETCPU = 309
+ SYS_PROCESS_VM_READV = 310
+ SYS_PROCESS_VM_WRITEV = 311
+ SYS_KCMP = 312
+ SYS_FINIT_MODULE = 313
+ SYS_SCHED_SETATTR = 314
+ SYS_SCHED_GETATTR = 315
+ SYS_RENAMEAT2 = 316
+ SYS_SECCOMP = 317
+ SYS_GETRANDOM = 318
+ SYS_MEMFD_CREATE = 319
+ SYS_KEXEC_FILE_LOAD = 320
+ SYS_BPF = 321
+ SYS_EXECVEAT = 322
+ SYS_USERFAULTFD = 323
+ SYS_MEMBARRIER = 324
+ SYS_MLOCK2 = 325
+ SYS_COPY_FILE_RANGE = 326
+ SYS_PREADV2 = 327
+ SYS_PWRITEV2 = 328
+ SYS_PKEY_MPROTECT = 329
+ SYS_PKEY_ALLOC = 330
+ SYS_PKEY_FREE = 331
+ SYS_STATX = 332
+ SYS_IO_PGETEVENTS = 333
+ SYS_RSEQ = 334
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_MEMFD_SECRET = 447
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index 3c663c6..5ecd24b 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -1,11 +1,13 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && linux
// +build arm,linux
package unix
const (
+ SYS_SYSCALL_MASK = 0
SYS_RESTART_SYSCALL = 0
SYS_EXIT = 1
SYS_FORK = 2
@@ -395,4 +397,16 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 753def9..7e5c94c 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -1,300 +1,315 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && linux
// +build arm64,linux
package unix
const (
- SYS_IO_SETUP = 0
- SYS_IO_DESTROY = 1
- SYS_IO_SUBMIT = 2
- SYS_IO_CANCEL = 3
- SYS_IO_GETEVENTS = 4
- SYS_SETXATTR = 5
- SYS_LSETXATTR = 6
- SYS_FSETXATTR = 7
- SYS_GETXATTR = 8
- SYS_LGETXATTR = 9
- SYS_FGETXATTR = 10
- SYS_LISTXATTR = 11
- SYS_LLISTXATTR = 12
- SYS_FLISTXATTR = 13
- SYS_REMOVEXATTR = 14
- SYS_LREMOVEXATTR = 15
- SYS_FREMOVEXATTR = 16
- SYS_GETCWD = 17
- SYS_LOOKUP_DCOOKIE = 18
- SYS_EVENTFD2 = 19
- SYS_EPOLL_CREATE1 = 20
- SYS_EPOLL_CTL = 21
- SYS_EPOLL_PWAIT = 22
- SYS_DUP = 23
- SYS_DUP3 = 24
- SYS_FCNTL = 25
- SYS_INOTIFY_INIT1 = 26
- SYS_INOTIFY_ADD_WATCH = 27
- SYS_INOTIFY_RM_WATCH = 28
- SYS_IOCTL = 29
- SYS_IOPRIO_SET = 30
- SYS_IOPRIO_GET = 31
- SYS_FLOCK = 32
- SYS_MKNODAT = 33
- SYS_MKDIRAT = 34
- SYS_UNLINKAT = 35
- SYS_SYMLINKAT = 36
- SYS_LINKAT = 37
- SYS_RENAMEAT = 38
- SYS_UMOUNT2 = 39
- SYS_MOUNT = 40
- SYS_PIVOT_ROOT = 41
- SYS_NFSSERVCTL = 42
- SYS_STATFS = 43
- SYS_FSTATFS = 44
- SYS_TRUNCATE = 45
- SYS_FTRUNCATE = 46
- SYS_FALLOCATE = 47
- SYS_FACCESSAT = 48
- SYS_CHDIR = 49
- SYS_FCHDIR = 50
- SYS_CHROOT = 51
- SYS_FCHMOD = 52
- SYS_FCHMODAT = 53
- SYS_FCHOWNAT = 54
- SYS_FCHOWN = 55
- SYS_OPENAT = 56
- SYS_CLOSE = 57
- SYS_VHANGUP = 58
- SYS_PIPE2 = 59
- SYS_QUOTACTL = 60
- SYS_GETDENTS64 = 61
- SYS_LSEEK = 62
- SYS_READ = 63
- SYS_WRITE = 64
- SYS_READV = 65
- SYS_WRITEV = 66
- SYS_PREAD64 = 67
- SYS_PWRITE64 = 68
- SYS_PREADV = 69
- SYS_PWRITEV = 70
- SYS_SENDFILE = 71
- SYS_PSELECT6 = 72
- SYS_PPOLL = 73
- SYS_SIGNALFD4 = 74
- SYS_VMSPLICE = 75
- SYS_SPLICE = 76
- SYS_TEE = 77
- SYS_READLINKAT = 78
- SYS_FSTATAT = 79
- SYS_FSTAT = 80
- SYS_SYNC = 81
- SYS_FSYNC = 82
- SYS_FDATASYNC = 83
- SYS_SYNC_FILE_RANGE = 84
- SYS_TIMERFD_CREATE = 85
- SYS_TIMERFD_SETTIME = 86
- SYS_TIMERFD_GETTIME = 87
- SYS_UTIMENSAT = 88
- SYS_ACCT = 89
- SYS_CAPGET = 90
- SYS_CAPSET = 91
- SYS_PERSONALITY = 92
- SYS_EXIT = 93
- SYS_EXIT_GROUP = 94
- SYS_WAITID = 95
- SYS_SET_TID_ADDRESS = 96
- SYS_UNSHARE = 97
- SYS_FUTEX = 98
- SYS_SET_ROBUST_LIST = 99
- SYS_GET_ROBUST_LIST = 100
- SYS_NANOSLEEP = 101
- SYS_GETITIMER = 102
- SYS_SETITIMER = 103
- SYS_KEXEC_LOAD = 104
- SYS_INIT_MODULE = 105
- SYS_DELETE_MODULE = 106
- SYS_TIMER_CREATE = 107
- SYS_TIMER_GETTIME = 108
- SYS_TIMER_GETOVERRUN = 109
- SYS_TIMER_SETTIME = 110
- SYS_TIMER_DELETE = 111
- SYS_CLOCK_SETTIME = 112
- SYS_CLOCK_GETTIME = 113
- SYS_CLOCK_GETRES = 114
- SYS_CLOCK_NANOSLEEP = 115
- SYS_SYSLOG = 116
- SYS_PTRACE = 117
- SYS_SCHED_SETPARAM = 118
- SYS_SCHED_SETSCHEDULER = 119
- SYS_SCHED_GETSCHEDULER = 120
- SYS_SCHED_GETPARAM = 121
- SYS_SCHED_SETAFFINITY = 122
- SYS_SCHED_GETAFFINITY = 123
- SYS_SCHED_YIELD = 124
- SYS_SCHED_GET_PRIORITY_MAX = 125
- SYS_SCHED_GET_PRIORITY_MIN = 126
- SYS_SCHED_RR_GET_INTERVAL = 127
- SYS_RESTART_SYSCALL = 128
- SYS_KILL = 129
- SYS_TKILL = 130
- SYS_TGKILL = 131
- SYS_SIGALTSTACK = 132
- SYS_RT_SIGSUSPEND = 133
- SYS_RT_SIGACTION = 134
- SYS_RT_SIGPROCMASK = 135
- SYS_RT_SIGPENDING = 136
- SYS_RT_SIGTIMEDWAIT = 137
- SYS_RT_SIGQUEUEINFO = 138
- SYS_RT_SIGRETURN = 139
- SYS_SETPRIORITY = 140
- SYS_GETPRIORITY = 141
- SYS_REBOOT = 142
- SYS_SETREGID = 143
- SYS_SETGID = 144
- SYS_SETREUID = 145
- SYS_SETUID = 146
- SYS_SETRESUID = 147
- SYS_GETRESUID = 148
- SYS_SETRESGID = 149
- SYS_GETRESGID = 150
- SYS_SETFSUID = 151
- SYS_SETFSGID = 152
- SYS_TIMES = 153
- SYS_SETPGID = 154
- SYS_GETPGID = 155
- SYS_GETSID = 156
- SYS_SETSID = 157
- SYS_GETGROUPS = 158
- SYS_SETGROUPS = 159
- SYS_UNAME = 160
- SYS_SETHOSTNAME = 161
- SYS_SETDOMAINNAME = 162
- SYS_GETRLIMIT = 163
- SYS_SETRLIMIT = 164
- SYS_GETRUSAGE = 165
- SYS_UMASK = 166
- SYS_PRCTL = 167
- SYS_GETCPU = 168
- SYS_GETTIMEOFDAY = 169
- SYS_SETTIMEOFDAY = 170
- SYS_ADJTIMEX = 171
- SYS_GETPID = 172
- SYS_GETPPID = 173
- SYS_GETUID = 174
- SYS_GETEUID = 175
- SYS_GETGID = 176
- SYS_GETEGID = 177
- SYS_GETTID = 178
- SYS_SYSINFO = 179
- SYS_MQ_OPEN = 180
- SYS_MQ_UNLINK = 181
- SYS_MQ_TIMEDSEND = 182
- SYS_MQ_TIMEDRECEIVE = 183
- SYS_MQ_NOTIFY = 184
- SYS_MQ_GETSETATTR = 185
- SYS_MSGGET = 186
- SYS_MSGCTL = 187
- SYS_MSGRCV = 188
- SYS_MSGSND = 189
- SYS_SEMGET = 190
- SYS_SEMCTL = 191
- SYS_SEMTIMEDOP = 192
- SYS_SEMOP = 193
- SYS_SHMGET = 194
- SYS_SHMCTL = 195
- SYS_SHMAT = 196
- SYS_SHMDT = 197
- SYS_SOCKET = 198
- SYS_SOCKETPAIR = 199
- SYS_BIND = 200
- SYS_LISTEN = 201
- SYS_ACCEPT = 202
- SYS_CONNECT = 203
- SYS_GETSOCKNAME = 204
- SYS_GETPEERNAME = 205
- SYS_SENDTO = 206
- SYS_RECVFROM = 207
- SYS_SETSOCKOPT = 208
- SYS_GETSOCKOPT = 209
- SYS_SHUTDOWN = 210
- SYS_SENDMSG = 211
- SYS_RECVMSG = 212
- SYS_READAHEAD = 213
- SYS_BRK = 214
- SYS_MUNMAP = 215
- SYS_MREMAP = 216
- SYS_ADD_KEY = 217
- SYS_REQUEST_KEY = 218
- SYS_KEYCTL = 219
- SYS_CLONE = 220
- SYS_EXECVE = 221
- SYS_MMAP = 222
- SYS_FADVISE64 = 223
- SYS_SWAPON = 224
- SYS_SWAPOFF = 225
- SYS_MPROTECT = 226
- SYS_MSYNC = 227
- SYS_MLOCK = 228
- SYS_MUNLOCK = 229
- SYS_MLOCKALL = 230
- SYS_MUNLOCKALL = 231
- SYS_MINCORE = 232
- SYS_MADVISE = 233
- SYS_REMAP_FILE_PAGES = 234
- SYS_MBIND = 235
- SYS_GET_MEMPOLICY = 236
- SYS_SET_MEMPOLICY = 237
- SYS_MIGRATE_PAGES = 238
- SYS_MOVE_PAGES = 239
- SYS_RT_TGSIGQUEUEINFO = 240
- SYS_PERF_EVENT_OPEN = 241
- SYS_ACCEPT4 = 242
- SYS_RECVMMSG = 243
- SYS_ARCH_SPECIFIC_SYSCALL = 244
- SYS_WAIT4 = 260
- SYS_PRLIMIT64 = 261
- SYS_FANOTIFY_INIT = 262
- SYS_FANOTIFY_MARK = 263
- SYS_NAME_TO_HANDLE_AT = 264
- SYS_OPEN_BY_HANDLE_AT = 265
- SYS_CLOCK_ADJTIME = 266
- SYS_SYNCFS = 267
- SYS_SETNS = 268
- SYS_SENDMMSG = 269
- SYS_PROCESS_VM_READV = 270
- SYS_PROCESS_VM_WRITEV = 271
- SYS_KCMP = 272
- SYS_FINIT_MODULE = 273
- SYS_SCHED_SETATTR = 274
- SYS_SCHED_GETATTR = 275
- SYS_RENAMEAT2 = 276
- SYS_SECCOMP = 277
- SYS_GETRANDOM = 278
- SYS_MEMFD_CREATE = 279
- SYS_BPF = 280
- SYS_EXECVEAT = 281
- SYS_USERFAULTFD = 282
- SYS_MEMBARRIER = 283
- SYS_MLOCK2 = 284
- SYS_COPY_FILE_RANGE = 285
- SYS_PREADV2 = 286
- SYS_PWRITEV2 = 287
- SYS_PKEY_MPROTECT = 288
- SYS_PKEY_ALLOC = 289
- SYS_PKEY_FREE = 290
- SYS_STATX = 291
- SYS_IO_PGETEVENTS = 292
- SYS_RSEQ = 293
- SYS_KEXEC_FILE_LOAD = 294
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
+ SYS_IO_SETUP = 0
+ SYS_IO_DESTROY = 1
+ SYS_IO_SUBMIT = 2
+ SYS_IO_CANCEL = 3
+ SYS_IO_GETEVENTS = 4
+ SYS_SETXATTR = 5
+ SYS_LSETXATTR = 6
+ SYS_FSETXATTR = 7
+ SYS_GETXATTR = 8
+ SYS_LGETXATTR = 9
+ SYS_FGETXATTR = 10
+ SYS_LISTXATTR = 11
+ SYS_LLISTXATTR = 12
+ SYS_FLISTXATTR = 13
+ SYS_REMOVEXATTR = 14
+ SYS_LREMOVEXATTR = 15
+ SYS_FREMOVEXATTR = 16
+ SYS_GETCWD = 17
+ SYS_LOOKUP_DCOOKIE = 18
+ SYS_EVENTFD2 = 19
+ SYS_EPOLL_CREATE1 = 20
+ SYS_EPOLL_CTL = 21
+ SYS_EPOLL_PWAIT = 22
+ SYS_DUP = 23
+ SYS_DUP3 = 24
+ SYS_FCNTL = 25
+ SYS_INOTIFY_INIT1 = 26
+ SYS_INOTIFY_ADD_WATCH = 27
+ SYS_INOTIFY_RM_WATCH = 28
+ SYS_IOCTL = 29
+ SYS_IOPRIO_SET = 30
+ SYS_IOPRIO_GET = 31
+ SYS_FLOCK = 32
+ SYS_MKNODAT = 33
+ SYS_MKDIRAT = 34
+ SYS_UNLINKAT = 35
+ SYS_SYMLINKAT = 36
+ SYS_LINKAT = 37
+ SYS_RENAMEAT = 38
+ SYS_UMOUNT2 = 39
+ SYS_MOUNT = 40
+ SYS_PIVOT_ROOT = 41
+ SYS_NFSSERVCTL = 42
+ SYS_STATFS = 43
+ SYS_FSTATFS = 44
+ SYS_TRUNCATE = 45
+ SYS_FTRUNCATE = 46
+ SYS_FALLOCATE = 47
+ SYS_FACCESSAT = 48
+ SYS_CHDIR = 49
+ SYS_FCHDIR = 50
+ SYS_CHROOT = 51
+ SYS_FCHMOD = 52
+ SYS_FCHMODAT = 53
+ SYS_FCHOWNAT = 54
+ SYS_FCHOWN = 55
+ SYS_OPENAT = 56
+ SYS_CLOSE = 57
+ SYS_VHANGUP = 58
+ SYS_PIPE2 = 59
+ SYS_QUOTACTL = 60
+ SYS_GETDENTS64 = 61
+ SYS_LSEEK = 62
+ SYS_READ = 63
+ SYS_WRITE = 64
+ SYS_READV = 65
+ SYS_WRITEV = 66
+ SYS_PREAD64 = 67
+ SYS_PWRITE64 = 68
+ SYS_PREADV = 69
+ SYS_PWRITEV = 70
+ SYS_SENDFILE = 71
+ SYS_PSELECT6 = 72
+ SYS_PPOLL = 73
+ SYS_SIGNALFD4 = 74
+ SYS_VMSPLICE = 75
+ SYS_SPLICE = 76
+ SYS_TEE = 77
+ SYS_READLINKAT = 78
+ SYS_FSTATAT = 79
+ SYS_FSTAT = 80
+ SYS_SYNC = 81
+ SYS_FSYNC = 82
+ SYS_FDATASYNC = 83
+ SYS_SYNC_FILE_RANGE = 84
+ SYS_TIMERFD_CREATE = 85
+ SYS_TIMERFD_SETTIME = 86
+ SYS_TIMERFD_GETTIME = 87
+ SYS_UTIMENSAT = 88
+ SYS_ACCT = 89
+ SYS_CAPGET = 90
+ SYS_CAPSET = 91
+ SYS_PERSONALITY = 92
+ SYS_EXIT = 93
+ SYS_EXIT_GROUP = 94
+ SYS_WAITID = 95
+ SYS_SET_TID_ADDRESS = 96
+ SYS_UNSHARE = 97
+ SYS_FUTEX = 98
+ SYS_SET_ROBUST_LIST = 99
+ SYS_GET_ROBUST_LIST = 100
+ SYS_NANOSLEEP = 101
+ SYS_GETITIMER = 102
+ SYS_SETITIMER = 103
+ SYS_KEXEC_LOAD = 104
+ SYS_INIT_MODULE = 105
+ SYS_DELETE_MODULE = 106
+ SYS_TIMER_CREATE = 107
+ SYS_TIMER_GETTIME = 108
+ SYS_TIMER_GETOVERRUN = 109
+ SYS_TIMER_SETTIME = 110
+ SYS_TIMER_DELETE = 111
+ SYS_CLOCK_SETTIME = 112
+ SYS_CLOCK_GETTIME = 113
+ SYS_CLOCK_GETRES = 114
+ SYS_CLOCK_NANOSLEEP = 115
+ SYS_SYSLOG = 116
+ SYS_PTRACE = 117
+ SYS_SCHED_SETPARAM = 118
+ SYS_SCHED_SETSCHEDULER = 119
+ SYS_SCHED_GETSCHEDULER = 120
+ SYS_SCHED_GETPARAM = 121
+ SYS_SCHED_SETAFFINITY = 122
+ SYS_SCHED_GETAFFINITY = 123
+ SYS_SCHED_YIELD = 124
+ SYS_SCHED_GET_PRIORITY_MAX = 125
+ SYS_SCHED_GET_PRIORITY_MIN = 126
+ SYS_SCHED_RR_GET_INTERVAL = 127
+ SYS_RESTART_SYSCALL = 128
+ SYS_KILL = 129
+ SYS_TKILL = 130
+ SYS_TGKILL = 131
+ SYS_SIGALTSTACK = 132
+ SYS_RT_SIGSUSPEND = 133
+ SYS_RT_SIGACTION = 134
+ SYS_RT_SIGPROCMASK = 135
+ SYS_RT_SIGPENDING = 136
+ SYS_RT_SIGTIMEDWAIT = 137
+ SYS_RT_SIGQUEUEINFO = 138
+ SYS_RT_SIGRETURN = 139
+ SYS_SETPRIORITY = 140
+ SYS_GETPRIORITY = 141
+ SYS_REBOOT = 142
+ SYS_SETREGID = 143
+ SYS_SETGID = 144
+ SYS_SETREUID = 145
+ SYS_SETUID = 146
+ SYS_SETRESUID = 147
+ SYS_GETRESUID = 148
+ SYS_SETRESGID = 149
+ SYS_GETRESGID = 150
+ SYS_SETFSUID = 151
+ SYS_SETFSGID = 152
+ SYS_TIMES = 153
+ SYS_SETPGID = 154
+ SYS_GETPGID = 155
+ SYS_GETSID = 156
+ SYS_SETSID = 157
+ SYS_GETGROUPS = 158
+ SYS_SETGROUPS = 159
+ SYS_UNAME = 160
+ SYS_SETHOSTNAME = 161
+ SYS_SETDOMAINNAME = 162
+ SYS_GETRLIMIT = 163
+ SYS_SETRLIMIT = 164
+ SYS_GETRUSAGE = 165
+ SYS_UMASK = 166
+ SYS_PRCTL = 167
+ SYS_GETCPU = 168
+ SYS_GETTIMEOFDAY = 169
+ SYS_SETTIMEOFDAY = 170
+ SYS_ADJTIMEX = 171
+ SYS_GETPID = 172
+ SYS_GETPPID = 173
+ SYS_GETUID = 174
+ SYS_GETEUID = 175
+ SYS_GETGID = 176
+ SYS_GETEGID = 177
+ SYS_GETTID = 178
+ SYS_SYSINFO = 179
+ SYS_MQ_OPEN = 180
+ SYS_MQ_UNLINK = 181
+ SYS_MQ_TIMEDSEND = 182
+ SYS_MQ_TIMEDRECEIVE = 183
+ SYS_MQ_NOTIFY = 184
+ SYS_MQ_GETSETATTR = 185
+ SYS_MSGGET = 186
+ SYS_MSGCTL = 187
+ SYS_MSGRCV = 188
+ SYS_MSGSND = 189
+ SYS_SEMGET = 190
+ SYS_SEMCTL = 191
+ SYS_SEMTIMEDOP = 192
+ SYS_SEMOP = 193
+ SYS_SHMGET = 194
+ SYS_SHMCTL = 195
+ SYS_SHMAT = 196
+ SYS_SHMDT = 197
+ SYS_SOCKET = 198
+ SYS_SOCKETPAIR = 199
+ SYS_BIND = 200
+ SYS_LISTEN = 201
+ SYS_ACCEPT = 202
+ SYS_CONNECT = 203
+ SYS_GETSOCKNAME = 204
+ SYS_GETPEERNAME = 205
+ SYS_SENDTO = 206
+ SYS_RECVFROM = 207
+ SYS_SETSOCKOPT = 208
+ SYS_GETSOCKOPT = 209
+ SYS_SHUTDOWN = 210
+ SYS_SENDMSG = 211
+ SYS_RECVMSG = 212
+ SYS_READAHEAD = 213
+ SYS_BRK = 214
+ SYS_MUNMAP = 215
+ SYS_MREMAP = 216
+ SYS_ADD_KEY = 217
+ SYS_REQUEST_KEY = 218
+ SYS_KEYCTL = 219
+ SYS_CLONE = 220
+ SYS_EXECVE = 221
+ SYS_MMAP = 222
+ SYS_FADVISE64 = 223
+ SYS_SWAPON = 224
+ SYS_SWAPOFF = 225
+ SYS_MPROTECT = 226
+ SYS_MSYNC = 227
+ SYS_MLOCK = 228
+ SYS_MUNLOCK = 229
+ SYS_MLOCKALL = 230
+ SYS_MUNLOCKALL = 231
+ SYS_MINCORE = 232
+ SYS_MADVISE = 233
+ SYS_REMAP_FILE_PAGES = 234
+ SYS_MBIND = 235
+ SYS_GET_MEMPOLICY = 236
+ SYS_SET_MEMPOLICY = 237
+ SYS_MIGRATE_PAGES = 238
+ SYS_MOVE_PAGES = 239
+ SYS_RT_TGSIGQUEUEINFO = 240
+ SYS_PERF_EVENT_OPEN = 241
+ SYS_ACCEPT4 = 242
+ SYS_RECVMMSG = 243
+ SYS_ARCH_SPECIFIC_SYSCALL = 244
+ SYS_WAIT4 = 260
+ SYS_PRLIMIT64 = 261
+ SYS_FANOTIFY_INIT = 262
+ SYS_FANOTIFY_MARK = 263
+ SYS_NAME_TO_HANDLE_AT = 264
+ SYS_OPEN_BY_HANDLE_AT = 265
+ SYS_CLOCK_ADJTIME = 266
+ SYS_SYNCFS = 267
+ SYS_SETNS = 268
+ SYS_SENDMMSG = 269
+ SYS_PROCESS_VM_READV = 270
+ SYS_PROCESS_VM_WRITEV = 271
+ SYS_KCMP = 272
+ SYS_FINIT_MODULE = 273
+ SYS_SCHED_SETATTR = 274
+ SYS_SCHED_GETATTR = 275
+ SYS_RENAMEAT2 = 276
+ SYS_SECCOMP = 277
+ SYS_GETRANDOM = 278
+ SYS_MEMFD_CREATE = 279
+ SYS_BPF = 280
+ SYS_EXECVEAT = 281
+ SYS_USERFAULTFD = 282
+ SYS_MEMBARRIER = 283
+ SYS_MLOCK2 = 284
+ SYS_COPY_FILE_RANGE = 285
+ SYS_PREADV2 = 286
+ SYS_PWRITEV2 = 287
+ SYS_PKEY_MPROTECT = 288
+ SYS_PKEY_ALLOC = 289
+ SYS_PKEY_FREE = 290
+ SYS_STATX = 291
+ SYS_IO_PGETEVENTS = 292
+ SYS_RSEQ = 293
+ SYS_KEXEC_FILE_LOAD = 294
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_MEMFD_SECRET = 447
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 00da3de..e1e2a2b 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips && linux
// +build mips,linux
package unix
@@ -416,4 +417,16 @@ const (
SYS_FSPICK = 4433
SYS_PIDFD_OPEN = 4434
SYS_CLONE3 = 4435
+ SYS_CLOSE_RANGE = 4436
+ SYS_OPENAT2 = 4437
+ SYS_PIDFD_GETFD = 4438
+ SYS_FACCESSAT2 = 4439
+ SYS_PROCESS_MADVISE = 4440
+ SYS_EPOLL_PWAIT2 = 4441
+ SYS_MOUNT_SETATTR = 4442
+ SYS_QUOTACTL_FD = 4443
+ SYS_LANDLOCK_CREATE_RULESET = 4444
+ SYS_LANDLOCK_ADD_RULE = 4445
+ SYS_LANDLOCK_RESTRICT_SELF = 4446
+ SYS_PROCESS_MRELEASE = 4448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index d404fbd..7651915 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -1,349 +1,362 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64 && linux
// +build mips64,linux
package unix
const (
- SYS_READ = 5000
- SYS_WRITE = 5001
- SYS_OPEN = 5002
- SYS_CLOSE = 5003
- SYS_STAT = 5004
- SYS_FSTAT = 5005
- SYS_LSTAT = 5006
- SYS_POLL = 5007
- SYS_LSEEK = 5008
- SYS_MMAP = 5009
- SYS_MPROTECT = 5010
- SYS_MUNMAP = 5011
- SYS_BRK = 5012
- SYS_RT_SIGACTION = 5013
- SYS_RT_SIGPROCMASK = 5014
- SYS_IOCTL = 5015
- SYS_PREAD64 = 5016
- SYS_PWRITE64 = 5017
- SYS_READV = 5018
- SYS_WRITEV = 5019
- SYS_ACCESS = 5020
- SYS_PIPE = 5021
- SYS__NEWSELECT = 5022
- SYS_SCHED_YIELD = 5023
- SYS_MREMAP = 5024
- SYS_MSYNC = 5025
- SYS_MINCORE = 5026
- SYS_MADVISE = 5027
- SYS_SHMGET = 5028
- SYS_SHMAT = 5029
- SYS_SHMCTL = 5030
- SYS_DUP = 5031
- SYS_DUP2 = 5032
- SYS_PAUSE = 5033
- SYS_NANOSLEEP = 5034
- SYS_GETITIMER = 5035
- SYS_SETITIMER = 5036
- SYS_ALARM = 5037
- SYS_GETPID = 5038
- SYS_SENDFILE = 5039
- SYS_SOCKET = 5040
- SYS_CONNECT = 5041
- SYS_ACCEPT = 5042
- SYS_SENDTO = 5043
- SYS_RECVFROM = 5044
- SYS_SENDMSG = 5045
- SYS_RECVMSG = 5046
- SYS_SHUTDOWN = 5047
- SYS_BIND = 5048
- SYS_LISTEN = 5049
- SYS_GETSOCKNAME = 5050
- SYS_GETPEERNAME = 5051
- SYS_SOCKETPAIR = 5052
- SYS_SETSOCKOPT = 5053
- SYS_GETSOCKOPT = 5054
- SYS_CLONE = 5055
- SYS_FORK = 5056
- SYS_EXECVE = 5057
- SYS_EXIT = 5058
- SYS_WAIT4 = 5059
- SYS_KILL = 5060
- SYS_UNAME = 5061
- SYS_SEMGET = 5062
- SYS_SEMOP = 5063
- SYS_SEMCTL = 5064
- SYS_SHMDT = 5065
- SYS_MSGGET = 5066
- SYS_MSGSND = 5067
- SYS_MSGRCV = 5068
- SYS_MSGCTL = 5069
- SYS_FCNTL = 5070
- SYS_FLOCK = 5071
- SYS_FSYNC = 5072
- SYS_FDATASYNC = 5073
- SYS_TRUNCATE = 5074
- SYS_FTRUNCATE = 5075
- SYS_GETDENTS = 5076
- SYS_GETCWD = 5077
- SYS_CHDIR = 5078
- SYS_FCHDIR = 5079
- SYS_RENAME = 5080
- SYS_MKDIR = 5081
- SYS_RMDIR = 5082
- SYS_CREAT = 5083
- SYS_LINK = 5084
- SYS_UNLINK = 5085
- SYS_SYMLINK = 5086
- SYS_READLINK = 5087
- SYS_CHMOD = 5088
- SYS_FCHMOD = 5089
- SYS_CHOWN = 5090
- SYS_FCHOWN = 5091
- SYS_LCHOWN = 5092
- SYS_UMASK = 5093
- SYS_GETTIMEOFDAY = 5094
- SYS_GETRLIMIT = 5095
- SYS_GETRUSAGE = 5096
- SYS_SYSINFO = 5097
- SYS_TIMES = 5098
- SYS_PTRACE = 5099
- SYS_GETUID = 5100
- SYS_SYSLOG = 5101
- SYS_GETGID = 5102
- SYS_SETUID = 5103
- SYS_SETGID = 5104
- SYS_GETEUID = 5105
- SYS_GETEGID = 5106
- SYS_SETPGID = 5107
- SYS_GETPPID = 5108
- SYS_GETPGRP = 5109
- SYS_SETSID = 5110
- SYS_SETREUID = 5111
- SYS_SETREGID = 5112
- SYS_GETGROUPS = 5113
- SYS_SETGROUPS = 5114
- SYS_SETRESUID = 5115
- SYS_GETRESUID = 5116
- SYS_SETRESGID = 5117
- SYS_GETRESGID = 5118
- SYS_GETPGID = 5119
- SYS_SETFSUID = 5120
- SYS_SETFSGID = 5121
- SYS_GETSID = 5122
- SYS_CAPGET = 5123
- SYS_CAPSET = 5124
- SYS_RT_SIGPENDING = 5125
- SYS_RT_SIGTIMEDWAIT = 5126
- SYS_RT_SIGQUEUEINFO = 5127
- SYS_RT_SIGSUSPEND = 5128
- SYS_SIGALTSTACK = 5129
- SYS_UTIME = 5130
- SYS_MKNOD = 5131
- SYS_PERSONALITY = 5132
- SYS_USTAT = 5133
- SYS_STATFS = 5134
- SYS_FSTATFS = 5135
- SYS_SYSFS = 5136
- SYS_GETPRIORITY = 5137
- SYS_SETPRIORITY = 5138
- SYS_SCHED_SETPARAM = 5139
- SYS_SCHED_GETPARAM = 5140
- SYS_SCHED_SETSCHEDULER = 5141
- SYS_SCHED_GETSCHEDULER = 5142
- SYS_SCHED_GET_PRIORITY_MAX = 5143
- SYS_SCHED_GET_PRIORITY_MIN = 5144
- SYS_SCHED_RR_GET_INTERVAL = 5145
- SYS_MLOCK = 5146
- SYS_MUNLOCK = 5147
- SYS_MLOCKALL = 5148
- SYS_MUNLOCKALL = 5149
- SYS_VHANGUP = 5150
- SYS_PIVOT_ROOT = 5151
- SYS__SYSCTL = 5152
- SYS_PRCTL = 5153
- SYS_ADJTIMEX = 5154
- SYS_SETRLIMIT = 5155
- SYS_CHROOT = 5156
- SYS_SYNC = 5157
- SYS_ACCT = 5158
- SYS_SETTIMEOFDAY = 5159
- SYS_MOUNT = 5160
- SYS_UMOUNT2 = 5161
- SYS_SWAPON = 5162
- SYS_SWAPOFF = 5163
- SYS_REBOOT = 5164
- SYS_SETHOSTNAME = 5165
- SYS_SETDOMAINNAME = 5166
- SYS_CREATE_MODULE = 5167
- SYS_INIT_MODULE = 5168
- SYS_DELETE_MODULE = 5169
- SYS_GET_KERNEL_SYMS = 5170
- SYS_QUERY_MODULE = 5171
- SYS_QUOTACTL = 5172
- SYS_NFSSERVCTL = 5173
- SYS_GETPMSG = 5174
- SYS_PUTPMSG = 5175
- SYS_AFS_SYSCALL = 5176
- SYS_RESERVED177 = 5177
- SYS_GETTID = 5178
- SYS_READAHEAD = 5179
- SYS_SETXATTR = 5180
- SYS_LSETXATTR = 5181
- SYS_FSETXATTR = 5182
- SYS_GETXATTR = 5183
- SYS_LGETXATTR = 5184
- SYS_FGETXATTR = 5185
- SYS_LISTXATTR = 5186
- SYS_LLISTXATTR = 5187
- SYS_FLISTXATTR = 5188
- SYS_REMOVEXATTR = 5189
- SYS_LREMOVEXATTR = 5190
- SYS_FREMOVEXATTR = 5191
- SYS_TKILL = 5192
- SYS_RESERVED193 = 5193
- SYS_FUTEX = 5194
- SYS_SCHED_SETAFFINITY = 5195
- SYS_SCHED_GETAFFINITY = 5196
- SYS_CACHEFLUSH = 5197
- SYS_CACHECTL = 5198
- SYS_SYSMIPS = 5199
- SYS_IO_SETUP = 5200
- SYS_IO_DESTROY = 5201
- SYS_IO_GETEVENTS = 5202
- SYS_IO_SUBMIT = 5203
- SYS_IO_CANCEL = 5204
- SYS_EXIT_GROUP = 5205
- SYS_LOOKUP_DCOOKIE = 5206
- SYS_EPOLL_CREATE = 5207
- SYS_EPOLL_CTL = 5208
- SYS_EPOLL_WAIT = 5209
- SYS_REMAP_FILE_PAGES = 5210
- SYS_RT_SIGRETURN = 5211
- SYS_SET_TID_ADDRESS = 5212
- SYS_RESTART_SYSCALL = 5213
- SYS_SEMTIMEDOP = 5214
- SYS_FADVISE64 = 5215
- SYS_TIMER_CREATE = 5216
- SYS_TIMER_SETTIME = 5217
- SYS_TIMER_GETTIME = 5218
- SYS_TIMER_GETOVERRUN = 5219
- SYS_TIMER_DELETE = 5220
- SYS_CLOCK_SETTIME = 5221
- SYS_CLOCK_GETTIME = 5222
- SYS_CLOCK_GETRES = 5223
- SYS_CLOCK_NANOSLEEP = 5224
- SYS_TGKILL = 5225
- SYS_UTIMES = 5226
- SYS_MBIND = 5227
- SYS_GET_MEMPOLICY = 5228
- SYS_SET_MEMPOLICY = 5229
- SYS_MQ_OPEN = 5230
- SYS_MQ_UNLINK = 5231
- SYS_MQ_TIMEDSEND = 5232
- SYS_MQ_TIMEDRECEIVE = 5233
- SYS_MQ_NOTIFY = 5234
- SYS_MQ_GETSETATTR = 5235
- SYS_VSERVER = 5236
- SYS_WAITID = 5237
- SYS_ADD_KEY = 5239
- SYS_REQUEST_KEY = 5240
- SYS_KEYCTL = 5241
- SYS_SET_THREAD_AREA = 5242
- SYS_INOTIFY_INIT = 5243
- SYS_INOTIFY_ADD_WATCH = 5244
- SYS_INOTIFY_RM_WATCH = 5245
- SYS_MIGRATE_PAGES = 5246
- SYS_OPENAT = 5247
- SYS_MKDIRAT = 5248
- SYS_MKNODAT = 5249
- SYS_FCHOWNAT = 5250
- SYS_FUTIMESAT = 5251
- SYS_NEWFSTATAT = 5252
- SYS_UNLINKAT = 5253
- SYS_RENAMEAT = 5254
- SYS_LINKAT = 5255
- SYS_SYMLINKAT = 5256
- SYS_READLINKAT = 5257
- SYS_FCHMODAT = 5258
- SYS_FACCESSAT = 5259
- SYS_PSELECT6 = 5260
- SYS_PPOLL = 5261
- SYS_UNSHARE = 5262
- SYS_SPLICE = 5263
- SYS_SYNC_FILE_RANGE = 5264
- SYS_TEE = 5265
- SYS_VMSPLICE = 5266
- SYS_MOVE_PAGES = 5267
- SYS_SET_ROBUST_LIST = 5268
- SYS_GET_ROBUST_LIST = 5269
- SYS_KEXEC_LOAD = 5270
- SYS_GETCPU = 5271
- SYS_EPOLL_PWAIT = 5272
- SYS_IOPRIO_SET = 5273
- SYS_IOPRIO_GET = 5274
- SYS_UTIMENSAT = 5275
- SYS_SIGNALFD = 5276
- SYS_TIMERFD = 5277
- SYS_EVENTFD = 5278
- SYS_FALLOCATE = 5279
- SYS_TIMERFD_CREATE = 5280
- SYS_TIMERFD_GETTIME = 5281
- SYS_TIMERFD_SETTIME = 5282
- SYS_SIGNALFD4 = 5283
- SYS_EVENTFD2 = 5284
- SYS_EPOLL_CREATE1 = 5285
- SYS_DUP3 = 5286
- SYS_PIPE2 = 5287
- SYS_INOTIFY_INIT1 = 5288
- SYS_PREADV = 5289
- SYS_PWRITEV = 5290
- SYS_RT_TGSIGQUEUEINFO = 5291
- SYS_PERF_EVENT_OPEN = 5292
- SYS_ACCEPT4 = 5293
- SYS_RECVMMSG = 5294
- SYS_FANOTIFY_INIT = 5295
- SYS_FANOTIFY_MARK = 5296
- SYS_PRLIMIT64 = 5297
- SYS_NAME_TO_HANDLE_AT = 5298
- SYS_OPEN_BY_HANDLE_AT = 5299
- SYS_CLOCK_ADJTIME = 5300
- SYS_SYNCFS = 5301
- SYS_SENDMMSG = 5302
- SYS_SETNS = 5303
- SYS_PROCESS_VM_READV = 5304
- SYS_PROCESS_VM_WRITEV = 5305
- SYS_KCMP = 5306
- SYS_FINIT_MODULE = 5307
- SYS_GETDENTS64 = 5308
- SYS_SCHED_SETATTR = 5309
- SYS_SCHED_GETATTR = 5310
- SYS_RENAMEAT2 = 5311
- SYS_SECCOMP = 5312
- SYS_GETRANDOM = 5313
- SYS_MEMFD_CREATE = 5314
- SYS_BPF = 5315
- SYS_EXECVEAT = 5316
- SYS_USERFAULTFD = 5317
- SYS_MEMBARRIER = 5318
- SYS_MLOCK2 = 5319
- SYS_COPY_FILE_RANGE = 5320
- SYS_PREADV2 = 5321
- SYS_PWRITEV2 = 5322
- SYS_PKEY_MPROTECT = 5323
- SYS_PKEY_ALLOC = 5324
- SYS_PKEY_FREE = 5325
- SYS_STATX = 5326
- SYS_RSEQ = 5327
- SYS_IO_PGETEVENTS = 5328
- SYS_PIDFD_SEND_SIGNAL = 5424
- SYS_IO_URING_SETUP = 5425
- SYS_IO_URING_ENTER = 5426
- SYS_IO_URING_REGISTER = 5427
- SYS_OPEN_TREE = 5428
- SYS_MOVE_MOUNT = 5429
- SYS_FSOPEN = 5430
- SYS_FSCONFIG = 5431
- SYS_FSMOUNT = 5432
- SYS_FSPICK = 5433
- SYS_PIDFD_OPEN = 5434
- SYS_CLONE3 = 5435
+ SYS_READ = 5000
+ SYS_WRITE = 5001
+ SYS_OPEN = 5002
+ SYS_CLOSE = 5003
+ SYS_STAT = 5004
+ SYS_FSTAT = 5005
+ SYS_LSTAT = 5006
+ SYS_POLL = 5007
+ SYS_LSEEK = 5008
+ SYS_MMAP = 5009
+ SYS_MPROTECT = 5010
+ SYS_MUNMAP = 5011
+ SYS_BRK = 5012
+ SYS_RT_SIGACTION = 5013
+ SYS_RT_SIGPROCMASK = 5014
+ SYS_IOCTL = 5015
+ SYS_PREAD64 = 5016
+ SYS_PWRITE64 = 5017
+ SYS_READV = 5018
+ SYS_WRITEV = 5019
+ SYS_ACCESS = 5020
+ SYS_PIPE = 5021
+ SYS__NEWSELECT = 5022
+ SYS_SCHED_YIELD = 5023
+ SYS_MREMAP = 5024
+ SYS_MSYNC = 5025
+ SYS_MINCORE = 5026
+ SYS_MADVISE = 5027
+ SYS_SHMGET = 5028
+ SYS_SHMAT = 5029
+ SYS_SHMCTL = 5030
+ SYS_DUP = 5031
+ SYS_DUP2 = 5032
+ SYS_PAUSE = 5033
+ SYS_NANOSLEEP = 5034
+ SYS_GETITIMER = 5035
+ SYS_SETITIMER = 5036
+ SYS_ALARM = 5037
+ SYS_GETPID = 5038
+ SYS_SENDFILE = 5039
+ SYS_SOCKET = 5040
+ SYS_CONNECT = 5041
+ SYS_ACCEPT = 5042
+ SYS_SENDTO = 5043
+ SYS_RECVFROM = 5044
+ SYS_SENDMSG = 5045
+ SYS_RECVMSG = 5046
+ SYS_SHUTDOWN = 5047
+ SYS_BIND = 5048
+ SYS_LISTEN = 5049
+ SYS_GETSOCKNAME = 5050
+ SYS_GETPEERNAME = 5051
+ SYS_SOCKETPAIR = 5052
+ SYS_SETSOCKOPT = 5053
+ SYS_GETSOCKOPT = 5054
+ SYS_CLONE = 5055
+ SYS_FORK = 5056
+ SYS_EXECVE = 5057
+ SYS_EXIT = 5058
+ SYS_WAIT4 = 5059
+ SYS_KILL = 5060
+ SYS_UNAME = 5061
+ SYS_SEMGET = 5062
+ SYS_SEMOP = 5063
+ SYS_SEMCTL = 5064
+ SYS_SHMDT = 5065
+ SYS_MSGGET = 5066
+ SYS_MSGSND = 5067
+ SYS_MSGRCV = 5068
+ SYS_MSGCTL = 5069
+ SYS_FCNTL = 5070
+ SYS_FLOCK = 5071
+ SYS_FSYNC = 5072
+ SYS_FDATASYNC = 5073
+ SYS_TRUNCATE = 5074
+ SYS_FTRUNCATE = 5075
+ SYS_GETDENTS = 5076
+ SYS_GETCWD = 5077
+ SYS_CHDIR = 5078
+ SYS_FCHDIR = 5079
+ SYS_RENAME = 5080
+ SYS_MKDIR = 5081
+ SYS_RMDIR = 5082
+ SYS_CREAT = 5083
+ SYS_LINK = 5084
+ SYS_UNLINK = 5085
+ SYS_SYMLINK = 5086
+ SYS_READLINK = 5087
+ SYS_CHMOD = 5088
+ SYS_FCHMOD = 5089
+ SYS_CHOWN = 5090
+ SYS_FCHOWN = 5091
+ SYS_LCHOWN = 5092
+ SYS_UMASK = 5093
+ SYS_GETTIMEOFDAY = 5094
+ SYS_GETRLIMIT = 5095
+ SYS_GETRUSAGE = 5096
+ SYS_SYSINFO = 5097
+ SYS_TIMES = 5098
+ SYS_PTRACE = 5099
+ SYS_GETUID = 5100
+ SYS_SYSLOG = 5101
+ SYS_GETGID = 5102
+ SYS_SETUID = 5103
+ SYS_SETGID = 5104
+ SYS_GETEUID = 5105
+ SYS_GETEGID = 5106
+ SYS_SETPGID = 5107
+ SYS_GETPPID = 5108
+ SYS_GETPGRP = 5109
+ SYS_SETSID = 5110
+ SYS_SETREUID = 5111
+ SYS_SETREGID = 5112
+ SYS_GETGROUPS = 5113
+ SYS_SETGROUPS = 5114
+ SYS_SETRESUID = 5115
+ SYS_GETRESUID = 5116
+ SYS_SETRESGID = 5117
+ SYS_GETRESGID = 5118
+ SYS_GETPGID = 5119
+ SYS_SETFSUID = 5120
+ SYS_SETFSGID = 5121
+ SYS_GETSID = 5122
+ SYS_CAPGET = 5123
+ SYS_CAPSET = 5124
+ SYS_RT_SIGPENDING = 5125
+ SYS_RT_SIGTIMEDWAIT = 5126
+ SYS_RT_SIGQUEUEINFO = 5127
+ SYS_RT_SIGSUSPEND = 5128
+ SYS_SIGALTSTACK = 5129
+ SYS_UTIME = 5130
+ SYS_MKNOD = 5131
+ SYS_PERSONALITY = 5132
+ SYS_USTAT = 5133
+ SYS_STATFS = 5134
+ SYS_FSTATFS = 5135
+ SYS_SYSFS = 5136
+ SYS_GETPRIORITY = 5137
+ SYS_SETPRIORITY = 5138
+ SYS_SCHED_SETPARAM = 5139
+ SYS_SCHED_GETPARAM = 5140
+ SYS_SCHED_SETSCHEDULER = 5141
+ SYS_SCHED_GETSCHEDULER = 5142
+ SYS_SCHED_GET_PRIORITY_MAX = 5143
+ SYS_SCHED_GET_PRIORITY_MIN = 5144
+ SYS_SCHED_RR_GET_INTERVAL = 5145
+ SYS_MLOCK = 5146
+ SYS_MUNLOCK = 5147
+ SYS_MLOCKALL = 5148
+ SYS_MUNLOCKALL = 5149
+ SYS_VHANGUP = 5150
+ SYS_PIVOT_ROOT = 5151
+ SYS__SYSCTL = 5152
+ SYS_PRCTL = 5153
+ SYS_ADJTIMEX = 5154
+ SYS_SETRLIMIT = 5155
+ SYS_CHROOT = 5156
+ SYS_SYNC = 5157
+ SYS_ACCT = 5158
+ SYS_SETTIMEOFDAY = 5159
+ SYS_MOUNT = 5160
+ SYS_UMOUNT2 = 5161
+ SYS_SWAPON = 5162
+ SYS_SWAPOFF = 5163
+ SYS_REBOOT = 5164
+ SYS_SETHOSTNAME = 5165
+ SYS_SETDOMAINNAME = 5166
+ SYS_CREATE_MODULE = 5167
+ SYS_INIT_MODULE = 5168
+ SYS_DELETE_MODULE = 5169
+ SYS_GET_KERNEL_SYMS = 5170
+ SYS_QUERY_MODULE = 5171
+ SYS_QUOTACTL = 5172
+ SYS_NFSSERVCTL = 5173
+ SYS_GETPMSG = 5174
+ SYS_PUTPMSG = 5175
+ SYS_AFS_SYSCALL = 5176
+ SYS_RESERVED177 = 5177
+ SYS_GETTID = 5178
+ SYS_READAHEAD = 5179
+ SYS_SETXATTR = 5180
+ SYS_LSETXATTR = 5181
+ SYS_FSETXATTR = 5182
+ SYS_GETXATTR = 5183
+ SYS_LGETXATTR = 5184
+ SYS_FGETXATTR = 5185
+ SYS_LISTXATTR = 5186
+ SYS_LLISTXATTR = 5187
+ SYS_FLISTXATTR = 5188
+ SYS_REMOVEXATTR = 5189
+ SYS_LREMOVEXATTR = 5190
+ SYS_FREMOVEXATTR = 5191
+ SYS_TKILL = 5192
+ SYS_RESERVED193 = 5193
+ SYS_FUTEX = 5194
+ SYS_SCHED_SETAFFINITY = 5195
+ SYS_SCHED_GETAFFINITY = 5196
+ SYS_CACHEFLUSH = 5197
+ SYS_CACHECTL = 5198
+ SYS_SYSMIPS = 5199
+ SYS_IO_SETUP = 5200
+ SYS_IO_DESTROY = 5201
+ SYS_IO_GETEVENTS = 5202
+ SYS_IO_SUBMIT = 5203
+ SYS_IO_CANCEL = 5204
+ SYS_EXIT_GROUP = 5205
+ SYS_LOOKUP_DCOOKIE = 5206
+ SYS_EPOLL_CREATE = 5207
+ SYS_EPOLL_CTL = 5208
+ SYS_EPOLL_WAIT = 5209
+ SYS_REMAP_FILE_PAGES = 5210
+ SYS_RT_SIGRETURN = 5211
+ SYS_SET_TID_ADDRESS = 5212
+ SYS_RESTART_SYSCALL = 5213
+ SYS_SEMTIMEDOP = 5214
+ SYS_FADVISE64 = 5215
+ SYS_TIMER_CREATE = 5216
+ SYS_TIMER_SETTIME = 5217
+ SYS_TIMER_GETTIME = 5218
+ SYS_TIMER_GETOVERRUN = 5219
+ SYS_TIMER_DELETE = 5220
+ SYS_CLOCK_SETTIME = 5221
+ SYS_CLOCK_GETTIME = 5222
+ SYS_CLOCK_GETRES = 5223
+ SYS_CLOCK_NANOSLEEP = 5224
+ SYS_TGKILL = 5225
+ SYS_UTIMES = 5226
+ SYS_MBIND = 5227
+ SYS_GET_MEMPOLICY = 5228
+ SYS_SET_MEMPOLICY = 5229
+ SYS_MQ_OPEN = 5230
+ SYS_MQ_UNLINK = 5231
+ SYS_MQ_TIMEDSEND = 5232
+ SYS_MQ_TIMEDRECEIVE = 5233
+ SYS_MQ_NOTIFY = 5234
+ SYS_MQ_GETSETATTR = 5235
+ SYS_VSERVER = 5236
+ SYS_WAITID = 5237
+ SYS_ADD_KEY = 5239
+ SYS_REQUEST_KEY = 5240
+ SYS_KEYCTL = 5241
+ SYS_SET_THREAD_AREA = 5242
+ SYS_INOTIFY_INIT = 5243
+ SYS_INOTIFY_ADD_WATCH = 5244
+ SYS_INOTIFY_RM_WATCH = 5245
+ SYS_MIGRATE_PAGES = 5246
+ SYS_OPENAT = 5247
+ SYS_MKDIRAT = 5248
+ SYS_MKNODAT = 5249
+ SYS_FCHOWNAT = 5250
+ SYS_FUTIMESAT = 5251
+ SYS_NEWFSTATAT = 5252
+ SYS_UNLINKAT = 5253
+ SYS_RENAMEAT = 5254
+ SYS_LINKAT = 5255
+ SYS_SYMLINKAT = 5256
+ SYS_READLINKAT = 5257
+ SYS_FCHMODAT = 5258
+ SYS_FACCESSAT = 5259
+ SYS_PSELECT6 = 5260
+ SYS_PPOLL = 5261
+ SYS_UNSHARE = 5262
+ SYS_SPLICE = 5263
+ SYS_SYNC_FILE_RANGE = 5264
+ SYS_TEE = 5265
+ SYS_VMSPLICE = 5266
+ SYS_MOVE_PAGES = 5267
+ SYS_SET_ROBUST_LIST = 5268
+ SYS_GET_ROBUST_LIST = 5269
+ SYS_KEXEC_LOAD = 5270
+ SYS_GETCPU = 5271
+ SYS_EPOLL_PWAIT = 5272
+ SYS_IOPRIO_SET = 5273
+ SYS_IOPRIO_GET = 5274
+ SYS_UTIMENSAT = 5275
+ SYS_SIGNALFD = 5276
+ SYS_TIMERFD = 5277
+ SYS_EVENTFD = 5278
+ SYS_FALLOCATE = 5279
+ SYS_TIMERFD_CREATE = 5280
+ SYS_TIMERFD_GETTIME = 5281
+ SYS_TIMERFD_SETTIME = 5282
+ SYS_SIGNALFD4 = 5283
+ SYS_EVENTFD2 = 5284
+ SYS_EPOLL_CREATE1 = 5285
+ SYS_DUP3 = 5286
+ SYS_PIPE2 = 5287
+ SYS_INOTIFY_INIT1 = 5288
+ SYS_PREADV = 5289
+ SYS_PWRITEV = 5290
+ SYS_RT_TGSIGQUEUEINFO = 5291
+ SYS_PERF_EVENT_OPEN = 5292
+ SYS_ACCEPT4 = 5293
+ SYS_RECVMMSG = 5294
+ SYS_FANOTIFY_INIT = 5295
+ SYS_FANOTIFY_MARK = 5296
+ SYS_PRLIMIT64 = 5297
+ SYS_NAME_TO_HANDLE_AT = 5298
+ SYS_OPEN_BY_HANDLE_AT = 5299
+ SYS_CLOCK_ADJTIME = 5300
+ SYS_SYNCFS = 5301
+ SYS_SENDMMSG = 5302
+ SYS_SETNS = 5303
+ SYS_PROCESS_VM_READV = 5304
+ SYS_PROCESS_VM_WRITEV = 5305
+ SYS_KCMP = 5306
+ SYS_FINIT_MODULE = 5307
+ SYS_GETDENTS64 = 5308
+ SYS_SCHED_SETATTR = 5309
+ SYS_SCHED_GETATTR = 5310
+ SYS_RENAMEAT2 = 5311
+ SYS_SECCOMP = 5312
+ SYS_GETRANDOM = 5313
+ SYS_MEMFD_CREATE = 5314
+ SYS_BPF = 5315
+ SYS_EXECVEAT = 5316
+ SYS_USERFAULTFD = 5317
+ SYS_MEMBARRIER = 5318
+ SYS_MLOCK2 = 5319
+ SYS_COPY_FILE_RANGE = 5320
+ SYS_PREADV2 = 5321
+ SYS_PWRITEV2 = 5322
+ SYS_PKEY_MPROTECT = 5323
+ SYS_PKEY_ALLOC = 5324
+ SYS_PKEY_FREE = 5325
+ SYS_STATX = 5326
+ SYS_RSEQ = 5327
+ SYS_IO_PGETEVENTS = 5328
+ SYS_PIDFD_SEND_SIGNAL = 5424
+ SYS_IO_URING_SETUP = 5425
+ SYS_IO_URING_ENTER = 5426
+ SYS_IO_URING_REGISTER = 5427
+ SYS_OPEN_TREE = 5428
+ SYS_MOVE_MOUNT = 5429
+ SYS_FSOPEN = 5430
+ SYS_FSCONFIG = 5431
+ SYS_FSMOUNT = 5432
+ SYS_FSPICK = 5433
+ SYS_PIDFD_OPEN = 5434
+ SYS_CLONE3 = 5435
+ SYS_CLOSE_RANGE = 5436
+ SYS_OPENAT2 = 5437
+ SYS_PIDFD_GETFD = 5438
+ SYS_FACCESSAT2 = 5439
+ SYS_PROCESS_MADVISE = 5440
+ SYS_EPOLL_PWAIT2 = 5441
+ SYS_MOUNT_SETATTR = 5442
+ SYS_QUOTACTL_FD = 5443
+ SYS_LANDLOCK_CREATE_RULESET = 5444
+ SYS_LANDLOCK_ADD_RULE = 5445
+ SYS_LANDLOCK_RESTRICT_SELF = 5446
+ SYS_PROCESS_MRELEASE = 5448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index bfbf242..a26a2c0 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -1,349 +1,362 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64le && linux
// +build mips64le,linux
package unix
const (
- SYS_READ = 5000
- SYS_WRITE = 5001
- SYS_OPEN = 5002
- SYS_CLOSE = 5003
- SYS_STAT = 5004
- SYS_FSTAT = 5005
- SYS_LSTAT = 5006
- SYS_POLL = 5007
- SYS_LSEEK = 5008
- SYS_MMAP = 5009
- SYS_MPROTECT = 5010
- SYS_MUNMAP = 5011
- SYS_BRK = 5012
- SYS_RT_SIGACTION = 5013
- SYS_RT_SIGPROCMASK = 5014
- SYS_IOCTL = 5015
- SYS_PREAD64 = 5016
- SYS_PWRITE64 = 5017
- SYS_READV = 5018
- SYS_WRITEV = 5019
- SYS_ACCESS = 5020
- SYS_PIPE = 5021
- SYS__NEWSELECT = 5022
- SYS_SCHED_YIELD = 5023
- SYS_MREMAP = 5024
- SYS_MSYNC = 5025
- SYS_MINCORE = 5026
- SYS_MADVISE = 5027
- SYS_SHMGET = 5028
- SYS_SHMAT = 5029
- SYS_SHMCTL = 5030
- SYS_DUP = 5031
- SYS_DUP2 = 5032
- SYS_PAUSE = 5033
- SYS_NANOSLEEP = 5034
- SYS_GETITIMER = 5035
- SYS_SETITIMER = 5036
- SYS_ALARM = 5037
- SYS_GETPID = 5038
- SYS_SENDFILE = 5039
- SYS_SOCKET = 5040
- SYS_CONNECT = 5041
- SYS_ACCEPT = 5042
- SYS_SENDTO = 5043
- SYS_RECVFROM = 5044
- SYS_SENDMSG = 5045
- SYS_RECVMSG = 5046
- SYS_SHUTDOWN = 5047
- SYS_BIND = 5048
- SYS_LISTEN = 5049
- SYS_GETSOCKNAME = 5050
- SYS_GETPEERNAME = 5051
- SYS_SOCKETPAIR = 5052
- SYS_SETSOCKOPT = 5053
- SYS_GETSOCKOPT = 5054
- SYS_CLONE = 5055
- SYS_FORK = 5056
- SYS_EXECVE = 5057
- SYS_EXIT = 5058
- SYS_WAIT4 = 5059
- SYS_KILL = 5060
- SYS_UNAME = 5061
- SYS_SEMGET = 5062
- SYS_SEMOP = 5063
- SYS_SEMCTL = 5064
- SYS_SHMDT = 5065
- SYS_MSGGET = 5066
- SYS_MSGSND = 5067
- SYS_MSGRCV = 5068
- SYS_MSGCTL = 5069
- SYS_FCNTL = 5070
- SYS_FLOCK = 5071
- SYS_FSYNC = 5072
- SYS_FDATASYNC = 5073
- SYS_TRUNCATE = 5074
- SYS_FTRUNCATE = 5075
- SYS_GETDENTS = 5076
- SYS_GETCWD = 5077
- SYS_CHDIR = 5078
- SYS_FCHDIR = 5079
- SYS_RENAME = 5080
- SYS_MKDIR = 5081
- SYS_RMDIR = 5082
- SYS_CREAT = 5083
- SYS_LINK = 5084
- SYS_UNLINK = 5085
- SYS_SYMLINK = 5086
- SYS_READLINK = 5087
- SYS_CHMOD = 5088
- SYS_FCHMOD = 5089
- SYS_CHOWN = 5090
- SYS_FCHOWN = 5091
- SYS_LCHOWN = 5092
- SYS_UMASK = 5093
- SYS_GETTIMEOFDAY = 5094
- SYS_GETRLIMIT = 5095
- SYS_GETRUSAGE = 5096
- SYS_SYSINFO = 5097
- SYS_TIMES = 5098
- SYS_PTRACE = 5099
- SYS_GETUID = 5100
- SYS_SYSLOG = 5101
- SYS_GETGID = 5102
- SYS_SETUID = 5103
- SYS_SETGID = 5104
- SYS_GETEUID = 5105
- SYS_GETEGID = 5106
- SYS_SETPGID = 5107
- SYS_GETPPID = 5108
- SYS_GETPGRP = 5109
- SYS_SETSID = 5110
- SYS_SETREUID = 5111
- SYS_SETREGID = 5112
- SYS_GETGROUPS = 5113
- SYS_SETGROUPS = 5114
- SYS_SETRESUID = 5115
- SYS_GETRESUID = 5116
- SYS_SETRESGID = 5117
- SYS_GETRESGID = 5118
- SYS_GETPGID = 5119
- SYS_SETFSUID = 5120
- SYS_SETFSGID = 5121
- SYS_GETSID = 5122
- SYS_CAPGET = 5123
- SYS_CAPSET = 5124
- SYS_RT_SIGPENDING = 5125
- SYS_RT_SIGTIMEDWAIT = 5126
- SYS_RT_SIGQUEUEINFO = 5127
- SYS_RT_SIGSUSPEND = 5128
- SYS_SIGALTSTACK = 5129
- SYS_UTIME = 5130
- SYS_MKNOD = 5131
- SYS_PERSONALITY = 5132
- SYS_USTAT = 5133
- SYS_STATFS = 5134
- SYS_FSTATFS = 5135
- SYS_SYSFS = 5136
- SYS_GETPRIORITY = 5137
- SYS_SETPRIORITY = 5138
- SYS_SCHED_SETPARAM = 5139
- SYS_SCHED_GETPARAM = 5140
- SYS_SCHED_SETSCHEDULER = 5141
- SYS_SCHED_GETSCHEDULER = 5142
- SYS_SCHED_GET_PRIORITY_MAX = 5143
- SYS_SCHED_GET_PRIORITY_MIN = 5144
- SYS_SCHED_RR_GET_INTERVAL = 5145
- SYS_MLOCK = 5146
- SYS_MUNLOCK = 5147
- SYS_MLOCKALL = 5148
- SYS_MUNLOCKALL = 5149
- SYS_VHANGUP = 5150
- SYS_PIVOT_ROOT = 5151
- SYS__SYSCTL = 5152
- SYS_PRCTL = 5153
- SYS_ADJTIMEX = 5154
- SYS_SETRLIMIT = 5155
- SYS_CHROOT = 5156
- SYS_SYNC = 5157
- SYS_ACCT = 5158
- SYS_SETTIMEOFDAY = 5159
- SYS_MOUNT = 5160
- SYS_UMOUNT2 = 5161
- SYS_SWAPON = 5162
- SYS_SWAPOFF = 5163
- SYS_REBOOT = 5164
- SYS_SETHOSTNAME = 5165
- SYS_SETDOMAINNAME = 5166
- SYS_CREATE_MODULE = 5167
- SYS_INIT_MODULE = 5168
- SYS_DELETE_MODULE = 5169
- SYS_GET_KERNEL_SYMS = 5170
- SYS_QUERY_MODULE = 5171
- SYS_QUOTACTL = 5172
- SYS_NFSSERVCTL = 5173
- SYS_GETPMSG = 5174
- SYS_PUTPMSG = 5175
- SYS_AFS_SYSCALL = 5176
- SYS_RESERVED177 = 5177
- SYS_GETTID = 5178
- SYS_READAHEAD = 5179
- SYS_SETXATTR = 5180
- SYS_LSETXATTR = 5181
- SYS_FSETXATTR = 5182
- SYS_GETXATTR = 5183
- SYS_LGETXATTR = 5184
- SYS_FGETXATTR = 5185
- SYS_LISTXATTR = 5186
- SYS_LLISTXATTR = 5187
- SYS_FLISTXATTR = 5188
- SYS_REMOVEXATTR = 5189
- SYS_LREMOVEXATTR = 5190
- SYS_FREMOVEXATTR = 5191
- SYS_TKILL = 5192
- SYS_RESERVED193 = 5193
- SYS_FUTEX = 5194
- SYS_SCHED_SETAFFINITY = 5195
- SYS_SCHED_GETAFFINITY = 5196
- SYS_CACHEFLUSH = 5197
- SYS_CACHECTL = 5198
- SYS_SYSMIPS = 5199
- SYS_IO_SETUP = 5200
- SYS_IO_DESTROY = 5201
- SYS_IO_GETEVENTS = 5202
- SYS_IO_SUBMIT = 5203
- SYS_IO_CANCEL = 5204
- SYS_EXIT_GROUP = 5205
- SYS_LOOKUP_DCOOKIE = 5206
- SYS_EPOLL_CREATE = 5207
- SYS_EPOLL_CTL = 5208
- SYS_EPOLL_WAIT = 5209
- SYS_REMAP_FILE_PAGES = 5210
- SYS_RT_SIGRETURN = 5211
- SYS_SET_TID_ADDRESS = 5212
- SYS_RESTART_SYSCALL = 5213
- SYS_SEMTIMEDOP = 5214
- SYS_FADVISE64 = 5215
- SYS_TIMER_CREATE = 5216
- SYS_TIMER_SETTIME = 5217
- SYS_TIMER_GETTIME = 5218
- SYS_TIMER_GETOVERRUN = 5219
- SYS_TIMER_DELETE = 5220
- SYS_CLOCK_SETTIME = 5221
- SYS_CLOCK_GETTIME = 5222
- SYS_CLOCK_GETRES = 5223
- SYS_CLOCK_NANOSLEEP = 5224
- SYS_TGKILL = 5225
- SYS_UTIMES = 5226
- SYS_MBIND = 5227
- SYS_GET_MEMPOLICY = 5228
- SYS_SET_MEMPOLICY = 5229
- SYS_MQ_OPEN = 5230
- SYS_MQ_UNLINK = 5231
- SYS_MQ_TIMEDSEND = 5232
- SYS_MQ_TIMEDRECEIVE = 5233
- SYS_MQ_NOTIFY = 5234
- SYS_MQ_GETSETATTR = 5235
- SYS_VSERVER = 5236
- SYS_WAITID = 5237
- SYS_ADD_KEY = 5239
- SYS_REQUEST_KEY = 5240
- SYS_KEYCTL = 5241
- SYS_SET_THREAD_AREA = 5242
- SYS_INOTIFY_INIT = 5243
- SYS_INOTIFY_ADD_WATCH = 5244
- SYS_INOTIFY_RM_WATCH = 5245
- SYS_MIGRATE_PAGES = 5246
- SYS_OPENAT = 5247
- SYS_MKDIRAT = 5248
- SYS_MKNODAT = 5249
- SYS_FCHOWNAT = 5250
- SYS_FUTIMESAT = 5251
- SYS_NEWFSTATAT = 5252
- SYS_UNLINKAT = 5253
- SYS_RENAMEAT = 5254
- SYS_LINKAT = 5255
- SYS_SYMLINKAT = 5256
- SYS_READLINKAT = 5257
- SYS_FCHMODAT = 5258
- SYS_FACCESSAT = 5259
- SYS_PSELECT6 = 5260
- SYS_PPOLL = 5261
- SYS_UNSHARE = 5262
- SYS_SPLICE = 5263
- SYS_SYNC_FILE_RANGE = 5264
- SYS_TEE = 5265
- SYS_VMSPLICE = 5266
- SYS_MOVE_PAGES = 5267
- SYS_SET_ROBUST_LIST = 5268
- SYS_GET_ROBUST_LIST = 5269
- SYS_KEXEC_LOAD = 5270
- SYS_GETCPU = 5271
- SYS_EPOLL_PWAIT = 5272
- SYS_IOPRIO_SET = 5273
- SYS_IOPRIO_GET = 5274
- SYS_UTIMENSAT = 5275
- SYS_SIGNALFD = 5276
- SYS_TIMERFD = 5277
- SYS_EVENTFD = 5278
- SYS_FALLOCATE = 5279
- SYS_TIMERFD_CREATE = 5280
- SYS_TIMERFD_GETTIME = 5281
- SYS_TIMERFD_SETTIME = 5282
- SYS_SIGNALFD4 = 5283
- SYS_EVENTFD2 = 5284
- SYS_EPOLL_CREATE1 = 5285
- SYS_DUP3 = 5286
- SYS_PIPE2 = 5287
- SYS_INOTIFY_INIT1 = 5288
- SYS_PREADV = 5289
- SYS_PWRITEV = 5290
- SYS_RT_TGSIGQUEUEINFO = 5291
- SYS_PERF_EVENT_OPEN = 5292
- SYS_ACCEPT4 = 5293
- SYS_RECVMMSG = 5294
- SYS_FANOTIFY_INIT = 5295
- SYS_FANOTIFY_MARK = 5296
- SYS_PRLIMIT64 = 5297
- SYS_NAME_TO_HANDLE_AT = 5298
- SYS_OPEN_BY_HANDLE_AT = 5299
- SYS_CLOCK_ADJTIME = 5300
- SYS_SYNCFS = 5301
- SYS_SENDMMSG = 5302
- SYS_SETNS = 5303
- SYS_PROCESS_VM_READV = 5304
- SYS_PROCESS_VM_WRITEV = 5305
- SYS_KCMP = 5306
- SYS_FINIT_MODULE = 5307
- SYS_GETDENTS64 = 5308
- SYS_SCHED_SETATTR = 5309
- SYS_SCHED_GETATTR = 5310
- SYS_RENAMEAT2 = 5311
- SYS_SECCOMP = 5312
- SYS_GETRANDOM = 5313
- SYS_MEMFD_CREATE = 5314
- SYS_BPF = 5315
- SYS_EXECVEAT = 5316
- SYS_USERFAULTFD = 5317
- SYS_MEMBARRIER = 5318
- SYS_MLOCK2 = 5319
- SYS_COPY_FILE_RANGE = 5320
- SYS_PREADV2 = 5321
- SYS_PWRITEV2 = 5322
- SYS_PKEY_MPROTECT = 5323
- SYS_PKEY_ALLOC = 5324
- SYS_PKEY_FREE = 5325
- SYS_STATX = 5326
- SYS_RSEQ = 5327
- SYS_IO_PGETEVENTS = 5328
- SYS_PIDFD_SEND_SIGNAL = 5424
- SYS_IO_URING_SETUP = 5425
- SYS_IO_URING_ENTER = 5426
- SYS_IO_URING_REGISTER = 5427
- SYS_OPEN_TREE = 5428
- SYS_MOVE_MOUNT = 5429
- SYS_FSOPEN = 5430
- SYS_FSCONFIG = 5431
- SYS_FSMOUNT = 5432
- SYS_FSPICK = 5433
- SYS_PIDFD_OPEN = 5434
- SYS_CLONE3 = 5435
+ SYS_READ = 5000
+ SYS_WRITE = 5001
+ SYS_OPEN = 5002
+ SYS_CLOSE = 5003
+ SYS_STAT = 5004
+ SYS_FSTAT = 5005
+ SYS_LSTAT = 5006
+ SYS_POLL = 5007
+ SYS_LSEEK = 5008
+ SYS_MMAP = 5009
+ SYS_MPROTECT = 5010
+ SYS_MUNMAP = 5011
+ SYS_BRK = 5012
+ SYS_RT_SIGACTION = 5013
+ SYS_RT_SIGPROCMASK = 5014
+ SYS_IOCTL = 5015
+ SYS_PREAD64 = 5016
+ SYS_PWRITE64 = 5017
+ SYS_READV = 5018
+ SYS_WRITEV = 5019
+ SYS_ACCESS = 5020
+ SYS_PIPE = 5021
+ SYS__NEWSELECT = 5022
+ SYS_SCHED_YIELD = 5023
+ SYS_MREMAP = 5024
+ SYS_MSYNC = 5025
+ SYS_MINCORE = 5026
+ SYS_MADVISE = 5027
+ SYS_SHMGET = 5028
+ SYS_SHMAT = 5029
+ SYS_SHMCTL = 5030
+ SYS_DUP = 5031
+ SYS_DUP2 = 5032
+ SYS_PAUSE = 5033
+ SYS_NANOSLEEP = 5034
+ SYS_GETITIMER = 5035
+ SYS_SETITIMER = 5036
+ SYS_ALARM = 5037
+ SYS_GETPID = 5038
+ SYS_SENDFILE = 5039
+ SYS_SOCKET = 5040
+ SYS_CONNECT = 5041
+ SYS_ACCEPT = 5042
+ SYS_SENDTO = 5043
+ SYS_RECVFROM = 5044
+ SYS_SENDMSG = 5045
+ SYS_RECVMSG = 5046
+ SYS_SHUTDOWN = 5047
+ SYS_BIND = 5048
+ SYS_LISTEN = 5049
+ SYS_GETSOCKNAME = 5050
+ SYS_GETPEERNAME = 5051
+ SYS_SOCKETPAIR = 5052
+ SYS_SETSOCKOPT = 5053
+ SYS_GETSOCKOPT = 5054
+ SYS_CLONE = 5055
+ SYS_FORK = 5056
+ SYS_EXECVE = 5057
+ SYS_EXIT = 5058
+ SYS_WAIT4 = 5059
+ SYS_KILL = 5060
+ SYS_UNAME = 5061
+ SYS_SEMGET = 5062
+ SYS_SEMOP = 5063
+ SYS_SEMCTL = 5064
+ SYS_SHMDT = 5065
+ SYS_MSGGET = 5066
+ SYS_MSGSND = 5067
+ SYS_MSGRCV = 5068
+ SYS_MSGCTL = 5069
+ SYS_FCNTL = 5070
+ SYS_FLOCK = 5071
+ SYS_FSYNC = 5072
+ SYS_FDATASYNC = 5073
+ SYS_TRUNCATE = 5074
+ SYS_FTRUNCATE = 5075
+ SYS_GETDENTS = 5076
+ SYS_GETCWD = 5077
+ SYS_CHDIR = 5078
+ SYS_FCHDIR = 5079
+ SYS_RENAME = 5080
+ SYS_MKDIR = 5081
+ SYS_RMDIR = 5082
+ SYS_CREAT = 5083
+ SYS_LINK = 5084
+ SYS_UNLINK = 5085
+ SYS_SYMLINK = 5086
+ SYS_READLINK = 5087
+ SYS_CHMOD = 5088
+ SYS_FCHMOD = 5089
+ SYS_CHOWN = 5090
+ SYS_FCHOWN = 5091
+ SYS_LCHOWN = 5092
+ SYS_UMASK = 5093
+ SYS_GETTIMEOFDAY = 5094
+ SYS_GETRLIMIT = 5095
+ SYS_GETRUSAGE = 5096
+ SYS_SYSINFO = 5097
+ SYS_TIMES = 5098
+ SYS_PTRACE = 5099
+ SYS_GETUID = 5100
+ SYS_SYSLOG = 5101
+ SYS_GETGID = 5102
+ SYS_SETUID = 5103
+ SYS_SETGID = 5104
+ SYS_GETEUID = 5105
+ SYS_GETEGID = 5106
+ SYS_SETPGID = 5107
+ SYS_GETPPID = 5108
+ SYS_GETPGRP = 5109
+ SYS_SETSID = 5110
+ SYS_SETREUID = 5111
+ SYS_SETREGID = 5112
+ SYS_GETGROUPS = 5113
+ SYS_SETGROUPS = 5114
+ SYS_SETRESUID = 5115
+ SYS_GETRESUID = 5116
+ SYS_SETRESGID = 5117
+ SYS_GETRESGID = 5118
+ SYS_GETPGID = 5119
+ SYS_SETFSUID = 5120
+ SYS_SETFSGID = 5121
+ SYS_GETSID = 5122
+ SYS_CAPGET = 5123
+ SYS_CAPSET = 5124
+ SYS_RT_SIGPENDING = 5125
+ SYS_RT_SIGTIMEDWAIT = 5126
+ SYS_RT_SIGQUEUEINFO = 5127
+ SYS_RT_SIGSUSPEND = 5128
+ SYS_SIGALTSTACK = 5129
+ SYS_UTIME = 5130
+ SYS_MKNOD = 5131
+ SYS_PERSONALITY = 5132
+ SYS_USTAT = 5133
+ SYS_STATFS = 5134
+ SYS_FSTATFS = 5135
+ SYS_SYSFS = 5136
+ SYS_GETPRIORITY = 5137
+ SYS_SETPRIORITY = 5138
+ SYS_SCHED_SETPARAM = 5139
+ SYS_SCHED_GETPARAM = 5140
+ SYS_SCHED_SETSCHEDULER = 5141
+ SYS_SCHED_GETSCHEDULER = 5142
+ SYS_SCHED_GET_PRIORITY_MAX = 5143
+ SYS_SCHED_GET_PRIORITY_MIN = 5144
+ SYS_SCHED_RR_GET_INTERVAL = 5145
+ SYS_MLOCK = 5146
+ SYS_MUNLOCK = 5147
+ SYS_MLOCKALL = 5148
+ SYS_MUNLOCKALL = 5149
+ SYS_VHANGUP = 5150
+ SYS_PIVOT_ROOT = 5151
+ SYS__SYSCTL = 5152
+ SYS_PRCTL = 5153
+ SYS_ADJTIMEX = 5154
+ SYS_SETRLIMIT = 5155
+ SYS_CHROOT = 5156
+ SYS_SYNC = 5157
+ SYS_ACCT = 5158
+ SYS_SETTIMEOFDAY = 5159
+ SYS_MOUNT = 5160
+ SYS_UMOUNT2 = 5161
+ SYS_SWAPON = 5162
+ SYS_SWAPOFF = 5163
+ SYS_REBOOT = 5164
+ SYS_SETHOSTNAME = 5165
+ SYS_SETDOMAINNAME = 5166
+ SYS_CREATE_MODULE = 5167
+ SYS_INIT_MODULE = 5168
+ SYS_DELETE_MODULE = 5169
+ SYS_GET_KERNEL_SYMS = 5170
+ SYS_QUERY_MODULE = 5171
+ SYS_QUOTACTL = 5172
+ SYS_NFSSERVCTL = 5173
+ SYS_GETPMSG = 5174
+ SYS_PUTPMSG = 5175
+ SYS_AFS_SYSCALL = 5176
+ SYS_RESERVED177 = 5177
+ SYS_GETTID = 5178
+ SYS_READAHEAD = 5179
+ SYS_SETXATTR = 5180
+ SYS_LSETXATTR = 5181
+ SYS_FSETXATTR = 5182
+ SYS_GETXATTR = 5183
+ SYS_LGETXATTR = 5184
+ SYS_FGETXATTR = 5185
+ SYS_LISTXATTR = 5186
+ SYS_LLISTXATTR = 5187
+ SYS_FLISTXATTR = 5188
+ SYS_REMOVEXATTR = 5189
+ SYS_LREMOVEXATTR = 5190
+ SYS_FREMOVEXATTR = 5191
+ SYS_TKILL = 5192
+ SYS_RESERVED193 = 5193
+ SYS_FUTEX = 5194
+ SYS_SCHED_SETAFFINITY = 5195
+ SYS_SCHED_GETAFFINITY = 5196
+ SYS_CACHEFLUSH = 5197
+ SYS_CACHECTL = 5198
+ SYS_SYSMIPS = 5199
+ SYS_IO_SETUP = 5200
+ SYS_IO_DESTROY = 5201
+ SYS_IO_GETEVENTS = 5202
+ SYS_IO_SUBMIT = 5203
+ SYS_IO_CANCEL = 5204
+ SYS_EXIT_GROUP = 5205
+ SYS_LOOKUP_DCOOKIE = 5206
+ SYS_EPOLL_CREATE = 5207
+ SYS_EPOLL_CTL = 5208
+ SYS_EPOLL_WAIT = 5209
+ SYS_REMAP_FILE_PAGES = 5210
+ SYS_RT_SIGRETURN = 5211
+ SYS_SET_TID_ADDRESS = 5212
+ SYS_RESTART_SYSCALL = 5213
+ SYS_SEMTIMEDOP = 5214
+ SYS_FADVISE64 = 5215
+ SYS_TIMER_CREATE = 5216
+ SYS_TIMER_SETTIME = 5217
+ SYS_TIMER_GETTIME = 5218
+ SYS_TIMER_GETOVERRUN = 5219
+ SYS_TIMER_DELETE = 5220
+ SYS_CLOCK_SETTIME = 5221
+ SYS_CLOCK_GETTIME = 5222
+ SYS_CLOCK_GETRES = 5223
+ SYS_CLOCK_NANOSLEEP = 5224
+ SYS_TGKILL = 5225
+ SYS_UTIMES = 5226
+ SYS_MBIND = 5227
+ SYS_GET_MEMPOLICY = 5228
+ SYS_SET_MEMPOLICY = 5229
+ SYS_MQ_OPEN = 5230
+ SYS_MQ_UNLINK = 5231
+ SYS_MQ_TIMEDSEND = 5232
+ SYS_MQ_TIMEDRECEIVE = 5233
+ SYS_MQ_NOTIFY = 5234
+ SYS_MQ_GETSETATTR = 5235
+ SYS_VSERVER = 5236
+ SYS_WAITID = 5237
+ SYS_ADD_KEY = 5239
+ SYS_REQUEST_KEY = 5240
+ SYS_KEYCTL = 5241
+ SYS_SET_THREAD_AREA = 5242
+ SYS_INOTIFY_INIT = 5243
+ SYS_INOTIFY_ADD_WATCH = 5244
+ SYS_INOTIFY_RM_WATCH = 5245
+ SYS_MIGRATE_PAGES = 5246
+ SYS_OPENAT = 5247
+ SYS_MKDIRAT = 5248
+ SYS_MKNODAT = 5249
+ SYS_FCHOWNAT = 5250
+ SYS_FUTIMESAT = 5251
+ SYS_NEWFSTATAT = 5252
+ SYS_UNLINKAT = 5253
+ SYS_RENAMEAT = 5254
+ SYS_LINKAT = 5255
+ SYS_SYMLINKAT = 5256
+ SYS_READLINKAT = 5257
+ SYS_FCHMODAT = 5258
+ SYS_FACCESSAT = 5259
+ SYS_PSELECT6 = 5260
+ SYS_PPOLL = 5261
+ SYS_UNSHARE = 5262
+ SYS_SPLICE = 5263
+ SYS_SYNC_FILE_RANGE = 5264
+ SYS_TEE = 5265
+ SYS_VMSPLICE = 5266
+ SYS_MOVE_PAGES = 5267
+ SYS_SET_ROBUST_LIST = 5268
+ SYS_GET_ROBUST_LIST = 5269
+ SYS_KEXEC_LOAD = 5270
+ SYS_GETCPU = 5271
+ SYS_EPOLL_PWAIT = 5272
+ SYS_IOPRIO_SET = 5273
+ SYS_IOPRIO_GET = 5274
+ SYS_UTIMENSAT = 5275
+ SYS_SIGNALFD = 5276
+ SYS_TIMERFD = 5277
+ SYS_EVENTFD = 5278
+ SYS_FALLOCATE = 5279
+ SYS_TIMERFD_CREATE = 5280
+ SYS_TIMERFD_GETTIME = 5281
+ SYS_TIMERFD_SETTIME = 5282
+ SYS_SIGNALFD4 = 5283
+ SYS_EVENTFD2 = 5284
+ SYS_EPOLL_CREATE1 = 5285
+ SYS_DUP3 = 5286
+ SYS_PIPE2 = 5287
+ SYS_INOTIFY_INIT1 = 5288
+ SYS_PREADV = 5289
+ SYS_PWRITEV = 5290
+ SYS_RT_TGSIGQUEUEINFO = 5291
+ SYS_PERF_EVENT_OPEN = 5292
+ SYS_ACCEPT4 = 5293
+ SYS_RECVMMSG = 5294
+ SYS_FANOTIFY_INIT = 5295
+ SYS_FANOTIFY_MARK = 5296
+ SYS_PRLIMIT64 = 5297
+ SYS_NAME_TO_HANDLE_AT = 5298
+ SYS_OPEN_BY_HANDLE_AT = 5299
+ SYS_CLOCK_ADJTIME = 5300
+ SYS_SYNCFS = 5301
+ SYS_SENDMMSG = 5302
+ SYS_SETNS = 5303
+ SYS_PROCESS_VM_READV = 5304
+ SYS_PROCESS_VM_WRITEV = 5305
+ SYS_KCMP = 5306
+ SYS_FINIT_MODULE = 5307
+ SYS_GETDENTS64 = 5308
+ SYS_SCHED_SETATTR = 5309
+ SYS_SCHED_GETATTR = 5310
+ SYS_RENAMEAT2 = 5311
+ SYS_SECCOMP = 5312
+ SYS_GETRANDOM = 5313
+ SYS_MEMFD_CREATE = 5314
+ SYS_BPF = 5315
+ SYS_EXECVEAT = 5316
+ SYS_USERFAULTFD = 5317
+ SYS_MEMBARRIER = 5318
+ SYS_MLOCK2 = 5319
+ SYS_COPY_FILE_RANGE = 5320
+ SYS_PREADV2 = 5321
+ SYS_PWRITEV2 = 5322
+ SYS_PKEY_MPROTECT = 5323
+ SYS_PKEY_ALLOC = 5324
+ SYS_PKEY_FREE = 5325
+ SYS_STATX = 5326
+ SYS_RSEQ = 5327
+ SYS_IO_PGETEVENTS = 5328
+ SYS_PIDFD_SEND_SIGNAL = 5424
+ SYS_IO_URING_SETUP = 5425
+ SYS_IO_URING_ENTER = 5426
+ SYS_IO_URING_REGISTER = 5427
+ SYS_OPEN_TREE = 5428
+ SYS_MOVE_MOUNT = 5429
+ SYS_FSOPEN = 5430
+ SYS_FSCONFIG = 5431
+ SYS_FSMOUNT = 5432
+ SYS_FSPICK = 5433
+ SYS_PIDFD_OPEN = 5434
+ SYS_CLONE3 = 5435
+ SYS_CLOSE_RANGE = 5436
+ SYS_OPENAT2 = 5437
+ SYS_PIDFD_GETFD = 5438
+ SYS_FACCESSAT2 = 5439
+ SYS_PROCESS_MADVISE = 5440
+ SYS_EPOLL_PWAIT2 = 5441
+ SYS_MOUNT_SETATTR = 5442
+ SYS_QUOTACTL_FD = 5443
+ SYS_LANDLOCK_CREATE_RULESET = 5444
+ SYS_LANDLOCK_ADD_RULE = 5445
+ SYS_LANDLOCK_RESTRICT_SELF = 5446
+ SYS_PROCESS_MRELEASE = 5448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 3826f49..fda9a6a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mipsle && linux
// +build mipsle,linux
package unix
@@ -416,4 +417,16 @@ const (
SYS_FSPICK = 4433
SYS_PIDFD_OPEN = 4434
SYS_CLONE3 = 4435
+ SYS_CLOSE_RANGE = 4436
+ SYS_OPENAT2 = 4437
+ SYS_PIDFD_GETFD = 4438
+ SYS_FACCESSAT2 = 4439
+ SYS_PROCESS_MADVISE = 4440
+ SYS_EPOLL_PWAIT2 = 4441
+ SYS_MOUNT_SETATTR = 4442
+ SYS_QUOTACTL_FD = 4443
+ SYS_LANDLOCK_CREATE_RULESET = 4444
+ SYS_LANDLOCK_ADD_RULE = 4445
+ SYS_LANDLOCK_RESTRICT_SELF = 4446
+ SYS_PROCESS_MRELEASE = 4448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
new file mode 100644
index 0000000..e849615
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -0,0 +1,439 @@
+// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc && linux
+// +build ppc,linux
+
+package unix
+
+const (
+ SYS_RESTART_SYSCALL = 0
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_WAITPID = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECVE = 11
+ SYS_CHDIR = 12
+ SYS_TIME = 13
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LCHOWN = 16
+ SYS_BREAK = 17
+ SYS_OLDSTAT = 18
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_MOUNT = 21
+ SYS_UMOUNT = 22
+ SYS_SETUID = 23
+ SYS_GETUID = 24
+ SYS_STIME = 25
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_OLDFSTAT = 28
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_STTY = 31
+ SYS_GTTY = 32
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_FTIME = 35
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_RENAME = 38
+ SYS_MKDIR = 39
+ SYS_RMDIR = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_PROF = 44
+ SYS_BRK = 45
+ SYS_SETGID = 46
+ SYS_GETGID = 47
+ SYS_SIGNAL = 48
+ SYS_GETEUID = 49
+ SYS_GETEGID = 50
+ SYS_ACCT = 51
+ SYS_UMOUNT2 = 52
+ SYS_LOCK = 53
+ SYS_IOCTL = 54
+ SYS_FCNTL = 55
+ SYS_MPX = 56
+ SYS_SETPGID = 57
+ SYS_ULIMIT = 58
+ SYS_OLDOLDUNAME = 59
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_USTAT = 62
+ SYS_DUP2 = 63
+ SYS_GETPPID = 64
+ SYS_GETPGRP = 65
+ SYS_SETSID = 66
+ SYS_SIGACTION = 67
+ SYS_SGETMASK = 68
+ SYS_SSETMASK = 69
+ SYS_SETREUID = 70
+ SYS_SETREGID = 71
+ SYS_SIGSUSPEND = 72
+ SYS_SIGPENDING = 73
+ SYS_SETHOSTNAME = 74
+ SYS_SETRLIMIT = 75
+ SYS_GETRLIMIT = 76
+ SYS_GETRUSAGE = 77
+ SYS_GETTIMEOFDAY = 78
+ SYS_SETTIMEOFDAY = 79
+ SYS_GETGROUPS = 80
+ SYS_SETGROUPS = 81
+ SYS_SELECT = 82
+ SYS_SYMLINK = 83
+ SYS_OLDLSTAT = 84
+ SYS_READLINK = 85
+ SYS_USELIB = 86
+ SYS_SWAPON = 87
+ SYS_REBOOT = 88
+ SYS_READDIR = 89
+ SYS_MMAP = 90
+ SYS_MUNMAP = 91
+ SYS_TRUNCATE = 92
+ SYS_FTRUNCATE = 93
+ SYS_FCHMOD = 94
+ SYS_FCHOWN = 95
+ SYS_GETPRIORITY = 96
+ SYS_SETPRIORITY = 97
+ SYS_PROFIL = 98
+ SYS_STATFS = 99
+ SYS_FSTATFS = 100
+ SYS_IOPERM = 101
+ SYS_SOCKETCALL = 102
+ SYS_SYSLOG = 103
+ SYS_SETITIMER = 104
+ SYS_GETITIMER = 105
+ SYS_STAT = 106
+ SYS_LSTAT = 107
+ SYS_FSTAT = 108
+ SYS_OLDUNAME = 109
+ SYS_IOPL = 110
+ SYS_VHANGUP = 111
+ SYS_IDLE = 112
+ SYS_VM86 = 113
+ SYS_WAIT4 = 114
+ SYS_SWAPOFF = 115
+ SYS_SYSINFO = 116
+ SYS_IPC = 117
+ SYS_FSYNC = 118
+ SYS_SIGRETURN = 119
+ SYS_CLONE = 120
+ SYS_SETDOMAINNAME = 121
+ SYS_UNAME = 122
+ SYS_MODIFY_LDT = 123
+ SYS_ADJTIMEX = 124
+ SYS_MPROTECT = 125
+ SYS_SIGPROCMASK = 126
+ SYS_CREATE_MODULE = 127
+ SYS_INIT_MODULE = 128
+ SYS_DELETE_MODULE = 129
+ SYS_GET_KERNEL_SYMS = 130
+ SYS_QUOTACTL = 131
+ SYS_GETPGID = 132
+ SYS_FCHDIR = 133
+ SYS_BDFLUSH = 134
+ SYS_SYSFS = 135
+ SYS_PERSONALITY = 136
+ SYS_AFS_SYSCALL = 137
+ SYS_SETFSUID = 138
+ SYS_SETFSGID = 139
+ SYS__LLSEEK = 140
+ SYS_GETDENTS = 141
+ SYS__NEWSELECT = 142
+ SYS_FLOCK = 143
+ SYS_MSYNC = 144
+ SYS_READV = 145
+ SYS_WRITEV = 146
+ SYS_GETSID = 147
+ SYS_FDATASYNC = 148
+ SYS__SYSCTL = 149
+ SYS_MLOCK = 150
+ SYS_MUNLOCK = 151
+ SYS_MLOCKALL = 152
+ SYS_MUNLOCKALL = 153
+ SYS_SCHED_SETPARAM = 154
+ SYS_SCHED_GETPARAM = 155
+ SYS_SCHED_SETSCHEDULER = 156
+ SYS_SCHED_GETSCHEDULER = 157
+ SYS_SCHED_YIELD = 158
+ SYS_SCHED_GET_PRIORITY_MAX = 159
+ SYS_SCHED_GET_PRIORITY_MIN = 160
+ SYS_SCHED_RR_GET_INTERVAL = 161
+ SYS_NANOSLEEP = 162
+ SYS_MREMAP = 163
+ SYS_SETRESUID = 164
+ SYS_GETRESUID = 165
+ SYS_QUERY_MODULE = 166
+ SYS_POLL = 167
+ SYS_NFSSERVCTL = 168
+ SYS_SETRESGID = 169
+ SYS_GETRESGID = 170
+ SYS_PRCTL = 171
+ SYS_RT_SIGRETURN = 172
+ SYS_RT_SIGACTION = 173
+ SYS_RT_SIGPROCMASK = 174
+ SYS_RT_SIGPENDING = 175
+ SYS_RT_SIGTIMEDWAIT = 176
+ SYS_RT_SIGQUEUEINFO = 177
+ SYS_RT_SIGSUSPEND = 178
+ SYS_PREAD64 = 179
+ SYS_PWRITE64 = 180
+ SYS_CHOWN = 181
+ SYS_GETCWD = 182
+ SYS_CAPGET = 183
+ SYS_CAPSET = 184
+ SYS_SIGALTSTACK = 185
+ SYS_SENDFILE = 186
+ SYS_GETPMSG = 187
+ SYS_PUTPMSG = 188
+ SYS_VFORK = 189
+ SYS_UGETRLIMIT = 190
+ SYS_READAHEAD = 191
+ SYS_MMAP2 = 192
+ SYS_TRUNCATE64 = 193
+ SYS_FTRUNCATE64 = 194
+ SYS_STAT64 = 195
+ SYS_LSTAT64 = 196
+ SYS_FSTAT64 = 197
+ SYS_PCICONFIG_READ = 198
+ SYS_PCICONFIG_WRITE = 199
+ SYS_PCICONFIG_IOBASE = 200
+ SYS_MULTIPLEXER = 201
+ SYS_GETDENTS64 = 202
+ SYS_PIVOT_ROOT = 203
+ SYS_FCNTL64 = 204
+ SYS_MADVISE = 205
+ SYS_MINCORE = 206
+ SYS_GETTID = 207
+ SYS_TKILL = 208
+ SYS_SETXATTR = 209
+ SYS_LSETXATTR = 210
+ SYS_FSETXATTR = 211
+ SYS_GETXATTR = 212
+ SYS_LGETXATTR = 213
+ SYS_FGETXATTR = 214
+ SYS_LISTXATTR = 215
+ SYS_LLISTXATTR = 216
+ SYS_FLISTXATTR = 217
+ SYS_REMOVEXATTR = 218
+ SYS_LREMOVEXATTR = 219
+ SYS_FREMOVEXATTR = 220
+ SYS_FUTEX = 221
+ SYS_SCHED_SETAFFINITY = 222
+ SYS_SCHED_GETAFFINITY = 223
+ SYS_TUXCALL = 225
+ SYS_SENDFILE64 = 226
+ SYS_IO_SETUP = 227
+ SYS_IO_DESTROY = 228
+ SYS_IO_GETEVENTS = 229
+ SYS_IO_SUBMIT = 230
+ SYS_IO_CANCEL = 231
+ SYS_SET_TID_ADDRESS = 232
+ SYS_FADVISE64 = 233
+ SYS_EXIT_GROUP = 234
+ SYS_LOOKUP_DCOOKIE = 235
+ SYS_EPOLL_CREATE = 236
+ SYS_EPOLL_CTL = 237
+ SYS_EPOLL_WAIT = 238
+ SYS_REMAP_FILE_PAGES = 239
+ SYS_TIMER_CREATE = 240
+ SYS_TIMER_SETTIME = 241
+ SYS_TIMER_GETTIME = 242
+ SYS_TIMER_GETOVERRUN = 243
+ SYS_TIMER_DELETE = 244
+ SYS_CLOCK_SETTIME = 245
+ SYS_CLOCK_GETTIME = 246
+ SYS_CLOCK_GETRES = 247
+ SYS_CLOCK_NANOSLEEP = 248
+ SYS_SWAPCONTEXT = 249
+ SYS_TGKILL = 250
+ SYS_UTIMES = 251
+ SYS_STATFS64 = 252
+ SYS_FSTATFS64 = 253
+ SYS_FADVISE64_64 = 254
+ SYS_RTAS = 255
+ SYS_SYS_DEBUG_SETCONTEXT = 256
+ SYS_MIGRATE_PAGES = 258
+ SYS_MBIND = 259
+ SYS_GET_MEMPOLICY = 260
+ SYS_SET_MEMPOLICY = 261
+ SYS_MQ_OPEN = 262
+ SYS_MQ_UNLINK = 263
+ SYS_MQ_TIMEDSEND = 264
+ SYS_MQ_TIMEDRECEIVE = 265
+ SYS_MQ_NOTIFY = 266
+ SYS_MQ_GETSETATTR = 267
+ SYS_KEXEC_LOAD = 268
+ SYS_ADD_KEY = 269
+ SYS_REQUEST_KEY = 270
+ SYS_KEYCTL = 271
+ SYS_WAITID = 272
+ SYS_IOPRIO_SET = 273
+ SYS_IOPRIO_GET = 274
+ SYS_INOTIFY_INIT = 275
+ SYS_INOTIFY_ADD_WATCH = 276
+ SYS_INOTIFY_RM_WATCH = 277
+ SYS_SPU_RUN = 278
+ SYS_SPU_CREATE = 279
+ SYS_PSELECT6 = 280
+ SYS_PPOLL = 281
+ SYS_UNSHARE = 282
+ SYS_SPLICE = 283
+ SYS_TEE = 284
+ SYS_VMSPLICE = 285
+ SYS_OPENAT = 286
+ SYS_MKDIRAT = 287
+ SYS_MKNODAT = 288
+ SYS_FCHOWNAT = 289
+ SYS_FUTIMESAT = 290
+ SYS_FSTATAT64 = 291
+ SYS_UNLINKAT = 292
+ SYS_RENAMEAT = 293
+ SYS_LINKAT = 294
+ SYS_SYMLINKAT = 295
+ SYS_READLINKAT = 296
+ SYS_FCHMODAT = 297
+ SYS_FACCESSAT = 298
+ SYS_GET_ROBUST_LIST = 299
+ SYS_SET_ROBUST_LIST = 300
+ SYS_MOVE_PAGES = 301
+ SYS_GETCPU = 302
+ SYS_EPOLL_PWAIT = 303
+ SYS_UTIMENSAT = 304
+ SYS_SIGNALFD = 305
+ SYS_TIMERFD_CREATE = 306
+ SYS_EVENTFD = 307
+ SYS_SYNC_FILE_RANGE2 = 308
+ SYS_FALLOCATE = 309
+ SYS_SUBPAGE_PROT = 310
+ SYS_TIMERFD_SETTIME = 311
+ SYS_TIMERFD_GETTIME = 312
+ SYS_SIGNALFD4 = 313
+ SYS_EVENTFD2 = 314
+ SYS_EPOLL_CREATE1 = 315
+ SYS_DUP3 = 316
+ SYS_PIPE2 = 317
+ SYS_INOTIFY_INIT1 = 318
+ SYS_PERF_EVENT_OPEN = 319
+ SYS_PREADV = 320
+ SYS_PWRITEV = 321
+ SYS_RT_TGSIGQUEUEINFO = 322
+ SYS_FANOTIFY_INIT = 323
+ SYS_FANOTIFY_MARK = 324
+ SYS_PRLIMIT64 = 325
+ SYS_SOCKET = 326
+ SYS_BIND = 327
+ SYS_CONNECT = 328
+ SYS_LISTEN = 329
+ SYS_ACCEPT = 330
+ SYS_GETSOCKNAME = 331
+ SYS_GETPEERNAME = 332
+ SYS_SOCKETPAIR = 333
+ SYS_SEND = 334
+ SYS_SENDTO = 335
+ SYS_RECV = 336
+ SYS_RECVFROM = 337
+ SYS_SHUTDOWN = 338
+ SYS_SETSOCKOPT = 339
+ SYS_GETSOCKOPT = 340
+ SYS_SENDMSG = 341
+ SYS_RECVMSG = 342
+ SYS_RECVMMSG = 343
+ SYS_ACCEPT4 = 344
+ SYS_NAME_TO_HANDLE_AT = 345
+ SYS_OPEN_BY_HANDLE_AT = 346
+ SYS_CLOCK_ADJTIME = 347
+ SYS_SYNCFS = 348
+ SYS_SENDMMSG = 349
+ SYS_SETNS = 350
+ SYS_PROCESS_VM_READV = 351
+ SYS_PROCESS_VM_WRITEV = 352
+ SYS_FINIT_MODULE = 353
+ SYS_KCMP = 354
+ SYS_SCHED_SETATTR = 355
+ SYS_SCHED_GETATTR = 356
+ SYS_RENAMEAT2 = 357
+ SYS_SECCOMP = 358
+ SYS_GETRANDOM = 359
+ SYS_MEMFD_CREATE = 360
+ SYS_BPF = 361
+ SYS_EXECVEAT = 362
+ SYS_SWITCH_ENDIAN = 363
+ SYS_USERFAULTFD = 364
+ SYS_MEMBARRIER = 365
+ SYS_MLOCK2 = 378
+ SYS_COPY_FILE_RANGE = 379
+ SYS_PREADV2 = 380
+ SYS_PWRITEV2 = 381
+ SYS_KEXEC_FILE_LOAD = 382
+ SYS_STATX = 383
+ SYS_PKEY_ALLOC = 384
+ SYS_PKEY_FREE = 385
+ SYS_PKEY_MPROTECT = 386
+ SYS_RSEQ = 387
+ SYS_IO_PGETEVENTS = 388
+ SYS_SEMGET = 393
+ SYS_SEMCTL = 394
+ SYS_SHMGET = 395
+ SYS_SHMCTL = 396
+ SYS_SHMAT = 397
+ SYS_SHMDT = 398
+ SYS_MSGGET = 399
+ SYS_MSGSND = 400
+ SYS_MSGRCV = 401
+ SYS_MSGCTL = 402
+ SYS_CLOCK_GETTIME64 = 403
+ SYS_CLOCK_SETTIME64 = 404
+ SYS_CLOCK_ADJTIME64 = 405
+ SYS_CLOCK_GETRES_TIME64 = 406
+ SYS_CLOCK_NANOSLEEP_TIME64 = 407
+ SYS_TIMER_GETTIME64 = 408
+ SYS_TIMER_SETTIME64 = 409
+ SYS_TIMERFD_GETTIME64 = 410
+ SYS_TIMERFD_SETTIME64 = 411
+ SYS_UTIMENSAT_TIME64 = 412
+ SYS_PSELECT6_TIME64 = 413
+ SYS_PPOLL_TIME64 = 414
+ SYS_IO_PGETEVENTS_TIME64 = 416
+ SYS_RECVMMSG_TIME64 = 417
+ SYS_MQ_TIMEDSEND_TIME64 = 418
+ SYS_MQ_TIMEDRECEIVE_TIME64 = 419
+ SYS_SEMTIMEDOP_TIME64 = 420
+ SYS_RT_SIGTIMEDWAIT_TIME64 = 421
+ SYS_FUTEX_TIME64 = 422
+ SYS_SCHED_RR_GET_INTERVAL_TIME64 = 423
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 52e3da6..5ee0678 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -1,398 +1,411 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && linux
// +build ppc64,linux
package unix
const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAITPID = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BREAK = 17
- SYS_OLDSTAT = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_OLDFSTAT = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_STTY = 31
- SYS_GTTY = 32
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_FTIME = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_PROF = 44
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_LOCK = 53
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_MPX = 56
- SYS_SETPGID = 57
- SYS_ULIMIT = 58
- SYS_OLDOLDUNAME = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SGETMASK = 68
- SYS_SSETMASK = 69
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_OLDLSTAT = 84
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_PROFIL = 98
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_IOPERM = 101
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_OLDUNAME = 109
- SYS_IOPL = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_VM86 = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_MODIFY_LDT = 123
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_QUERY_MODULE = 166
- SYS_POLL = 167
- SYS_NFSSERVCTL = 168
- SYS_SETRESGID = 169
- SYS_GETRESGID = 170
- SYS_PRCTL = 171
- SYS_RT_SIGRETURN = 172
- SYS_RT_SIGACTION = 173
- SYS_RT_SIGPROCMASK = 174
- SYS_RT_SIGPENDING = 175
- SYS_RT_SIGTIMEDWAIT = 176
- SYS_RT_SIGQUEUEINFO = 177
- SYS_RT_SIGSUSPEND = 178
- SYS_PREAD64 = 179
- SYS_PWRITE64 = 180
- SYS_CHOWN = 181
- SYS_GETCWD = 182
- SYS_CAPGET = 183
- SYS_CAPSET = 184
- SYS_SIGALTSTACK = 185
- SYS_SENDFILE = 186
- SYS_GETPMSG = 187
- SYS_PUTPMSG = 188
- SYS_VFORK = 189
- SYS_UGETRLIMIT = 190
- SYS_READAHEAD = 191
- SYS_PCICONFIG_READ = 198
- SYS_PCICONFIG_WRITE = 199
- SYS_PCICONFIG_IOBASE = 200
- SYS_MULTIPLEXER = 201
- SYS_GETDENTS64 = 202
- SYS_PIVOT_ROOT = 203
- SYS_MADVISE = 205
- SYS_MINCORE = 206
- SYS_GETTID = 207
- SYS_TKILL = 208
- SYS_SETXATTR = 209
- SYS_LSETXATTR = 210
- SYS_FSETXATTR = 211
- SYS_GETXATTR = 212
- SYS_LGETXATTR = 213
- SYS_FGETXATTR = 214
- SYS_LISTXATTR = 215
- SYS_LLISTXATTR = 216
- SYS_FLISTXATTR = 217
- SYS_REMOVEXATTR = 218
- SYS_LREMOVEXATTR = 219
- SYS_FREMOVEXATTR = 220
- SYS_FUTEX = 221
- SYS_SCHED_SETAFFINITY = 222
- SYS_SCHED_GETAFFINITY = 223
- SYS_TUXCALL = 225
- SYS_IO_SETUP = 227
- SYS_IO_DESTROY = 228
- SYS_IO_GETEVENTS = 229
- SYS_IO_SUBMIT = 230
- SYS_IO_CANCEL = 231
- SYS_SET_TID_ADDRESS = 232
- SYS_FADVISE64 = 233
- SYS_EXIT_GROUP = 234
- SYS_LOOKUP_DCOOKIE = 235
- SYS_EPOLL_CREATE = 236
- SYS_EPOLL_CTL = 237
- SYS_EPOLL_WAIT = 238
- SYS_REMAP_FILE_PAGES = 239
- SYS_TIMER_CREATE = 240
- SYS_TIMER_SETTIME = 241
- SYS_TIMER_GETTIME = 242
- SYS_TIMER_GETOVERRUN = 243
- SYS_TIMER_DELETE = 244
- SYS_CLOCK_SETTIME = 245
- SYS_CLOCK_GETTIME = 246
- SYS_CLOCK_GETRES = 247
- SYS_CLOCK_NANOSLEEP = 248
- SYS_SWAPCONTEXT = 249
- SYS_TGKILL = 250
- SYS_UTIMES = 251
- SYS_STATFS64 = 252
- SYS_FSTATFS64 = 253
- SYS_RTAS = 255
- SYS_SYS_DEBUG_SETCONTEXT = 256
- SYS_MIGRATE_PAGES = 258
- SYS_MBIND = 259
- SYS_GET_MEMPOLICY = 260
- SYS_SET_MEMPOLICY = 261
- SYS_MQ_OPEN = 262
- SYS_MQ_UNLINK = 263
- SYS_MQ_TIMEDSEND = 264
- SYS_MQ_TIMEDRECEIVE = 265
- SYS_MQ_NOTIFY = 266
- SYS_MQ_GETSETATTR = 267
- SYS_KEXEC_LOAD = 268
- SYS_ADD_KEY = 269
- SYS_REQUEST_KEY = 270
- SYS_KEYCTL = 271
- SYS_WAITID = 272
- SYS_IOPRIO_SET = 273
- SYS_IOPRIO_GET = 274
- SYS_INOTIFY_INIT = 275
- SYS_INOTIFY_ADD_WATCH = 276
- SYS_INOTIFY_RM_WATCH = 277
- SYS_SPU_RUN = 278
- SYS_SPU_CREATE = 279
- SYS_PSELECT6 = 280
- SYS_PPOLL = 281
- SYS_UNSHARE = 282
- SYS_SPLICE = 283
- SYS_TEE = 284
- SYS_VMSPLICE = 285
- SYS_OPENAT = 286
- SYS_MKDIRAT = 287
- SYS_MKNODAT = 288
- SYS_FCHOWNAT = 289
- SYS_FUTIMESAT = 290
- SYS_NEWFSTATAT = 291
- SYS_UNLINKAT = 292
- SYS_RENAMEAT = 293
- SYS_LINKAT = 294
- SYS_SYMLINKAT = 295
- SYS_READLINKAT = 296
- SYS_FCHMODAT = 297
- SYS_FACCESSAT = 298
- SYS_GET_ROBUST_LIST = 299
- SYS_SET_ROBUST_LIST = 300
- SYS_MOVE_PAGES = 301
- SYS_GETCPU = 302
- SYS_EPOLL_PWAIT = 303
- SYS_UTIMENSAT = 304
- SYS_SIGNALFD = 305
- SYS_TIMERFD_CREATE = 306
- SYS_EVENTFD = 307
- SYS_SYNC_FILE_RANGE2 = 308
- SYS_FALLOCATE = 309
- SYS_SUBPAGE_PROT = 310
- SYS_TIMERFD_SETTIME = 311
- SYS_TIMERFD_GETTIME = 312
- SYS_SIGNALFD4 = 313
- SYS_EVENTFD2 = 314
- SYS_EPOLL_CREATE1 = 315
- SYS_DUP3 = 316
- SYS_PIPE2 = 317
- SYS_INOTIFY_INIT1 = 318
- SYS_PERF_EVENT_OPEN = 319
- SYS_PREADV = 320
- SYS_PWRITEV = 321
- SYS_RT_TGSIGQUEUEINFO = 322
- SYS_FANOTIFY_INIT = 323
- SYS_FANOTIFY_MARK = 324
- SYS_PRLIMIT64 = 325
- SYS_SOCKET = 326
- SYS_BIND = 327
- SYS_CONNECT = 328
- SYS_LISTEN = 329
- SYS_ACCEPT = 330
- SYS_GETSOCKNAME = 331
- SYS_GETPEERNAME = 332
- SYS_SOCKETPAIR = 333
- SYS_SEND = 334
- SYS_SENDTO = 335
- SYS_RECV = 336
- SYS_RECVFROM = 337
- SYS_SHUTDOWN = 338
- SYS_SETSOCKOPT = 339
- SYS_GETSOCKOPT = 340
- SYS_SENDMSG = 341
- SYS_RECVMSG = 342
- SYS_RECVMMSG = 343
- SYS_ACCEPT4 = 344
- SYS_NAME_TO_HANDLE_AT = 345
- SYS_OPEN_BY_HANDLE_AT = 346
- SYS_CLOCK_ADJTIME = 347
- SYS_SYNCFS = 348
- SYS_SENDMMSG = 349
- SYS_SETNS = 350
- SYS_PROCESS_VM_READV = 351
- SYS_PROCESS_VM_WRITEV = 352
- SYS_FINIT_MODULE = 353
- SYS_KCMP = 354
- SYS_SCHED_SETATTR = 355
- SYS_SCHED_GETATTR = 356
- SYS_RENAMEAT2 = 357
- SYS_SECCOMP = 358
- SYS_GETRANDOM = 359
- SYS_MEMFD_CREATE = 360
- SYS_BPF = 361
- SYS_EXECVEAT = 362
- SYS_SWITCH_ENDIAN = 363
- SYS_USERFAULTFD = 364
- SYS_MEMBARRIER = 365
- SYS_MLOCK2 = 378
- SYS_COPY_FILE_RANGE = 379
- SYS_PREADV2 = 380
- SYS_PWRITEV2 = 381
- SYS_KEXEC_FILE_LOAD = 382
- SYS_STATX = 383
- SYS_PKEY_ALLOC = 384
- SYS_PKEY_FREE = 385
- SYS_PKEY_MPROTECT = 386
- SYS_RSEQ = 387
- SYS_IO_PGETEVENTS = 388
- SYS_SEMTIMEDOP = 392
- SYS_SEMGET = 393
- SYS_SEMCTL = 394
- SYS_SHMGET = 395
- SYS_SHMCTL = 396
- SYS_SHMAT = 397
- SYS_SHMDT = 398
- SYS_MSGGET = 399
- SYS_MSGSND = 400
- SYS_MSGRCV = 401
- SYS_MSGCTL = 402
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
- SYS_CLONE3 = 435
+ SYS_RESTART_SYSCALL = 0
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_WAITPID = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECVE = 11
+ SYS_CHDIR = 12
+ SYS_TIME = 13
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LCHOWN = 16
+ SYS_BREAK = 17
+ SYS_OLDSTAT = 18
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_MOUNT = 21
+ SYS_UMOUNT = 22
+ SYS_SETUID = 23
+ SYS_GETUID = 24
+ SYS_STIME = 25
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_OLDFSTAT = 28
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_STTY = 31
+ SYS_GTTY = 32
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_FTIME = 35
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_RENAME = 38
+ SYS_MKDIR = 39
+ SYS_RMDIR = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_PROF = 44
+ SYS_BRK = 45
+ SYS_SETGID = 46
+ SYS_GETGID = 47
+ SYS_SIGNAL = 48
+ SYS_GETEUID = 49
+ SYS_GETEGID = 50
+ SYS_ACCT = 51
+ SYS_UMOUNT2 = 52
+ SYS_LOCK = 53
+ SYS_IOCTL = 54
+ SYS_FCNTL = 55
+ SYS_MPX = 56
+ SYS_SETPGID = 57
+ SYS_ULIMIT = 58
+ SYS_OLDOLDUNAME = 59
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_USTAT = 62
+ SYS_DUP2 = 63
+ SYS_GETPPID = 64
+ SYS_GETPGRP = 65
+ SYS_SETSID = 66
+ SYS_SIGACTION = 67
+ SYS_SGETMASK = 68
+ SYS_SSETMASK = 69
+ SYS_SETREUID = 70
+ SYS_SETREGID = 71
+ SYS_SIGSUSPEND = 72
+ SYS_SIGPENDING = 73
+ SYS_SETHOSTNAME = 74
+ SYS_SETRLIMIT = 75
+ SYS_GETRLIMIT = 76
+ SYS_GETRUSAGE = 77
+ SYS_GETTIMEOFDAY = 78
+ SYS_SETTIMEOFDAY = 79
+ SYS_GETGROUPS = 80
+ SYS_SETGROUPS = 81
+ SYS_SELECT = 82
+ SYS_SYMLINK = 83
+ SYS_OLDLSTAT = 84
+ SYS_READLINK = 85
+ SYS_USELIB = 86
+ SYS_SWAPON = 87
+ SYS_REBOOT = 88
+ SYS_READDIR = 89
+ SYS_MMAP = 90
+ SYS_MUNMAP = 91
+ SYS_TRUNCATE = 92
+ SYS_FTRUNCATE = 93
+ SYS_FCHMOD = 94
+ SYS_FCHOWN = 95
+ SYS_GETPRIORITY = 96
+ SYS_SETPRIORITY = 97
+ SYS_PROFIL = 98
+ SYS_STATFS = 99
+ SYS_FSTATFS = 100
+ SYS_IOPERM = 101
+ SYS_SOCKETCALL = 102
+ SYS_SYSLOG = 103
+ SYS_SETITIMER = 104
+ SYS_GETITIMER = 105
+ SYS_STAT = 106
+ SYS_LSTAT = 107
+ SYS_FSTAT = 108
+ SYS_OLDUNAME = 109
+ SYS_IOPL = 110
+ SYS_VHANGUP = 111
+ SYS_IDLE = 112
+ SYS_VM86 = 113
+ SYS_WAIT4 = 114
+ SYS_SWAPOFF = 115
+ SYS_SYSINFO = 116
+ SYS_IPC = 117
+ SYS_FSYNC = 118
+ SYS_SIGRETURN = 119
+ SYS_CLONE = 120
+ SYS_SETDOMAINNAME = 121
+ SYS_UNAME = 122
+ SYS_MODIFY_LDT = 123
+ SYS_ADJTIMEX = 124
+ SYS_MPROTECT = 125
+ SYS_SIGPROCMASK = 126
+ SYS_CREATE_MODULE = 127
+ SYS_INIT_MODULE = 128
+ SYS_DELETE_MODULE = 129
+ SYS_GET_KERNEL_SYMS = 130
+ SYS_QUOTACTL = 131
+ SYS_GETPGID = 132
+ SYS_FCHDIR = 133
+ SYS_BDFLUSH = 134
+ SYS_SYSFS = 135
+ SYS_PERSONALITY = 136
+ SYS_AFS_SYSCALL = 137
+ SYS_SETFSUID = 138
+ SYS_SETFSGID = 139
+ SYS__LLSEEK = 140
+ SYS_GETDENTS = 141
+ SYS__NEWSELECT = 142
+ SYS_FLOCK = 143
+ SYS_MSYNC = 144
+ SYS_READV = 145
+ SYS_WRITEV = 146
+ SYS_GETSID = 147
+ SYS_FDATASYNC = 148
+ SYS__SYSCTL = 149
+ SYS_MLOCK = 150
+ SYS_MUNLOCK = 151
+ SYS_MLOCKALL = 152
+ SYS_MUNLOCKALL = 153
+ SYS_SCHED_SETPARAM = 154
+ SYS_SCHED_GETPARAM = 155
+ SYS_SCHED_SETSCHEDULER = 156
+ SYS_SCHED_GETSCHEDULER = 157
+ SYS_SCHED_YIELD = 158
+ SYS_SCHED_GET_PRIORITY_MAX = 159
+ SYS_SCHED_GET_PRIORITY_MIN = 160
+ SYS_SCHED_RR_GET_INTERVAL = 161
+ SYS_NANOSLEEP = 162
+ SYS_MREMAP = 163
+ SYS_SETRESUID = 164
+ SYS_GETRESUID = 165
+ SYS_QUERY_MODULE = 166
+ SYS_POLL = 167
+ SYS_NFSSERVCTL = 168
+ SYS_SETRESGID = 169
+ SYS_GETRESGID = 170
+ SYS_PRCTL = 171
+ SYS_RT_SIGRETURN = 172
+ SYS_RT_SIGACTION = 173
+ SYS_RT_SIGPROCMASK = 174
+ SYS_RT_SIGPENDING = 175
+ SYS_RT_SIGTIMEDWAIT = 176
+ SYS_RT_SIGQUEUEINFO = 177
+ SYS_RT_SIGSUSPEND = 178
+ SYS_PREAD64 = 179
+ SYS_PWRITE64 = 180
+ SYS_CHOWN = 181
+ SYS_GETCWD = 182
+ SYS_CAPGET = 183
+ SYS_CAPSET = 184
+ SYS_SIGALTSTACK = 185
+ SYS_SENDFILE = 186
+ SYS_GETPMSG = 187
+ SYS_PUTPMSG = 188
+ SYS_VFORK = 189
+ SYS_UGETRLIMIT = 190
+ SYS_READAHEAD = 191
+ SYS_PCICONFIG_READ = 198
+ SYS_PCICONFIG_WRITE = 199
+ SYS_PCICONFIG_IOBASE = 200
+ SYS_MULTIPLEXER = 201
+ SYS_GETDENTS64 = 202
+ SYS_PIVOT_ROOT = 203
+ SYS_MADVISE = 205
+ SYS_MINCORE = 206
+ SYS_GETTID = 207
+ SYS_TKILL = 208
+ SYS_SETXATTR = 209
+ SYS_LSETXATTR = 210
+ SYS_FSETXATTR = 211
+ SYS_GETXATTR = 212
+ SYS_LGETXATTR = 213
+ SYS_FGETXATTR = 214
+ SYS_LISTXATTR = 215
+ SYS_LLISTXATTR = 216
+ SYS_FLISTXATTR = 217
+ SYS_REMOVEXATTR = 218
+ SYS_LREMOVEXATTR = 219
+ SYS_FREMOVEXATTR = 220
+ SYS_FUTEX = 221
+ SYS_SCHED_SETAFFINITY = 222
+ SYS_SCHED_GETAFFINITY = 223
+ SYS_TUXCALL = 225
+ SYS_IO_SETUP = 227
+ SYS_IO_DESTROY = 228
+ SYS_IO_GETEVENTS = 229
+ SYS_IO_SUBMIT = 230
+ SYS_IO_CANCEL = 231
+ SYS_SET_TID_ADDRESS = 232
+ SYS_FADVISE64 = 233
+ SYS_EXIT_GROUP = 234
+ SYS_LOOKUP_DCOOKIE = 235
+ SYS_EPOLL_CREATE = 236
+ SYS_EPOLL_CTL = 237
+ SYS_EPOLL_WAIT = 238
+ SYS_REMAP_FILE_PAGES = 239
+ SYS_TIMER_CREATE = 240
+ SYS_TIMER_SETTIME = 241
+ SYS_TIMER_GETTIME = 242
+ SYS_TIMER_GETOVERRUN = 243
+ SYS_TIMER_DELETE = 244
+ SYS_CLOCK_SETTIME = 245
+ SYS_CLOCK_GETTIME = 246
+ SYS_CLOCK_GETRES = 247
+ SYS_CLOCK_NANOSLEEP = 248
+ SYS_SWAPCONTEXT = 249
+ SYS_TGKILL = 250
+ SYS_UTIMES = 251
+ SYS_STATFS64 = 252
+ SYS_FSTATFS64 = 253
+ SYS_RTAS = 255
+ SYS_SYS_DEBUG_SETCONTEXT = 256
+ SYS_MIGRATE_PAGES = 258
+ SYS_MBIND = 259
+ SYS_GET_MEMPOLICY = 260
+ SYS_SET_MEMPOLICY = 261
+ SYS_MQ_OPEN = 262
+ SYS_MQ_UNLINK = 263
+ SYS_MQ_TIMEDSEND = 264
+ SYS_MQ_TIMEDRECEIVE = 265
+ SYS_MQ_NOTIFY = 266
+ SYS_MQ_GETSETATTR = 267
+ SYS_KEXEC_LOAD = 268
+ SYS_ADD_KEY = 269
+ SYS_REQUEST_KEY = 270
+ SYS_KEYCTL = 271
+ SYS_WAITID = 272
+ SYS_IOPRIO_SET = 273
+ SYS_IOPRIO_GET = 274
+ SYS_INOTIFY_INIT = 275
+ SYS_INOTIFY_ADD_WATCH = 276
+ SYS_INOTIFY_RM_WATCH = 277
+ SYS_SPU_RUN = 278
+ SYS_SPU_CREATE = 279
+ SYS_PSELECT6 = 280
+ SYS_PPOLL = 281
+ SYS_UNSHARE = 282
+ SYS_SPLICE = 283
+ SYS_TEE = 284
+ SYS_VMSPLICE = 285
+ SYS_OPENAT = 286
+ SYS_MKDIRAT = 287
+ SYS_MKNODAT = 288
+ SYS_FCHOWNAT = 289
+ SYS_FUTIMESAT = 290
+ SYS_NEWFSTATAT = 291
+ SYS_UNLINKAT = 292
+ SYS_RENAMEAT = 293
+ SYS_LINKAT = 294
+ SYS_SYMLINKAT = 295
+ SYS_READLINKAT = 296
+ SYS_FCHMODAT = 297
+ SYS_FACCESSAT = 298
+ SYS_GET_ROBUST_LIST = 299
+ SYS_SET_ROBUST_LIST = 300
+ SYS_MOVE_PAGES = 301
+ SYS_GETCPU = 302
+ SYS_EPOLL_PWAIT = 303
+ SYS_UTIMENSAT = 304
+ SYS_SIGNALFD = 305
+ SYS_TIMERFD_CREATE = 306
+ SYS_EVENTFD = 307
+ SYS_SYNC_FILE_RANGE2 = 308
+ SYS_FALLOCATE = 309
+ SYS_SUBPAGE_PROT = 310
+ SYS_TIMERFD_SETTIME = 311
+ SYS_TIMERFD_GETTIME = 312
+ SYS_SIGNALFD4 = 313
+ SYS_EVENTFD2 = 314
+ SYS_EPOLL_CREATE1 = 315
+ SYS_DUP3 = 316
+ SYS_PIPE2 = 317
+ SYS_INOTIFY_INIT1 = 318
+ SYS_PERF_EVENT_OPEN = 319
+ SYS_PREADV = 320
+ SYS_PWRITEV = 321
+ SYS_RT_TGSIGQUEUEINFO = 322
+ SYS_FANOTIFY_INIT = 323
+ SYS_FANOTIFY_MARK = 324
+ SYS_PRLIMIT64 = 325
+ SYS_SOCKET = 326
+ SYS_BIND = 327
+ SYS_CONNECT = 328
+ SYS_LISTEN = 329
+ SYS_ACCEPT = 330
+ SYS_GETSOCKNAME = 331
+ SYS_GETPEERNAME = 332
+ SYS_SOCKETPAIR = 333
+ SYS_SEND = 334
+ SYS_SENDTO = 335
+ SYS_RECV = 336
+ SYS_RECVFROM = 337
+ SYS_SHUTDOWN = 338
+ SYS_SETSOCKOPT = 339
+ SYS_GETSOCKOPT = 340
+ SYS_SENDMSG = 341
+ SYS_RECVMSG = 342
+ SYS_RECVMMSG = 343
+ SYS_ACCEPT4 = 344
+ SYS_NAME_TO_HANDLE_AT = 345
+ SYS_OPEN_BY_HANDLE_AT = 346
+ SYS_CLOCK_ADJTIME = 347
+ SYS_SYNCFS = 348
+ SYS_SENDMMSG = 349
+ SYS_SETNS = 350
+ SYS_PROCESS_VM_READV = 351
+ SYS_PROCESS_VM_WRITEV = 352
+ SYS_FINIT_MODULE = 353
+ SYS_KCMP = 354
+ SYS_SCHED_SETATTR = 355
+ SYS_SCHED_GETATTR = 356
+ SYS_RENAMEAT2 = 357
+ SYS_SECCOMP = 358
+ SYS_GETRANDOM = 359
+ SYS_MEMFD_CREATE = 360
+ SYS_BPF = 361
+ SYS_EXECVEAT = 362
+ SYS_SWITCH_ENDIAN = 363
+ SYS_USERFAULTFD = 364
+ SYS_MEMBARRIER = 365
+ SYS_MLOCK2 = 378
+ SYS_COPY_FILE_RANGE = 379
+ SYS_PREADV2 = 380
+ SYS_PWRITEV2 = 381
+ SYS_KEXEC_FILE_LOAD = 382
+ SYS_STATX = 383
+ SYS_PKEY_ALLOC = 384
+ SYS_PKEY_FREE = 385
+ SYS_PKEY_MPROTECT = 386
+ SYS_RSEQ = 387
+ SYS_IO_PGETEVENTS = 388
+ SYS_SEMTIMEDOP = 392
+ SYS_SEMGET = 393
+ SYS_SEMCTL = 394
+ SYS_SHMGET = 395
+ SYS_SHMCTL = 396
+ SYS_SHMAT = 397
+ SYS_SHMDT = 398
+ SYS_MSGGET = 399
+ SYS_MSGSND = 400
+ SYS_MSGRCV = 401
+ SYS_MSGCTL = 402
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 6141f90..29c0f9a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -1,398 +1,411 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64le && linux
// +build ppc64le,linux
package unix
const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAITPID = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BREAK = 17
- SYS_OLDSTAT = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_OLDFSTAT = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_STTY = 31
- SYS_GTTY = 32
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_FTIME = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_PROF = 44
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_LOCK = 53
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_MPX = 56
- SYS_SETPGID = 57
- SYS_ULIMIT = 58
- SYS_OLDOLDUNAME = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SGETMASK = 68
- SYS_SSETMASK = 69
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_OLDLSTAT = 84
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_PROFIL = 98
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_IOPERM = 101
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_OLDUNAME = 109
- SYS_IOPL = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_VM86 = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_MODIFY_LDT = 123
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_QUERY_MODULE = 166
- SYS_POLL = 167
- SYS_NFSSERVCTL = 168
- SYS_SETRESGID = 169
- SYS_GETRESGID = 170
- SYS_PRCTL = 171
- SYS_RT_SIGRETURN = 172
- SYS_RT_SIGACTION = 173
- SYS_RT_SIGPROCMASK = 174
- SYS_RT_SIGPENDING = 175
- SYS_RT_SIGTIMEDWAIT = 176
- SYS_RT_SIGQUEUEINFO = 177
- SYS_RT_SIGSUSPEND = 178
- SYS_PREAD64 = 179
- SYS_PWRITE64 = 180
- SYS_CHOWN = 181
- SYS_GETCWD = 182
- SYS_CAPGET = 183
- SYS_CAPSET = 184
- SYS_SIGALTSTACK = 185
- SYS_SENDFILE = 186
- SYS_GETPMSG = 187
- SYS_PUTPMSG = 188
- SYS_VFORK = 189
- SYS_UGETRLIMIT = 190
- SYS_READAHEAD = 191
- SYS_PCICONFIG_READ = 198
- SYS_PCICONFIG_WRITE = 199
- SYS_PCICONFIG_IOBASE = 200
- SYS_MULTIPLEXER = 201
- SYS_GETDENTS64 = 202
- SYS_PIVOT_ROOT = 203
- SYS_MADVISE = 205
- SYS_MINCORE = 206
- SYS_GETTID = 207
- SYS_TKILL = 208
- SYS_SETXATTR = 209
- SYS_LSETXATTR = 210
- SYS_FSETXATTR = 211
- SYS_GETXATTR = 212
- SYS_LGETXATTR = 213
- SYS_FGETXATTR = 214
- SYS_LISTXATTR = 215
- SYS_LLISTXATTR = 216
- SYS_FLISTXATTR = 217
- SYS_REMOVEXATTR = 218
- SYS_LREMOVEXATTR = 219
- SYS_FREMOVEXATTR = 220
- SYS_FUTEX = 221
- SYS_SCHED_SETAFFINITY = 222
- SYS_SCHED_GETAFFINITY = 223
- SYS_TUXCALL = 225
- SYS_IO_SETUP = 227
- SYS_IO_DESTROY = 228
- SYS_IO_GETEVENTS = 229
- SYS_IO_SUBMIT = 230
- SYS_IO_CANCEL = 231
- SYS_SET_TID_ADDRESS = 232
- SYS_FADVISE64 = 233
- SYS_EXIT_GROUP = 234
- SYS_LOOKUP_DCOOKIE = 235
- SYS_EPOLL_CREATE = 236
- SYS_EPOLL_CTL = 237
- SYS_EPOLL_WAIT = 238
- SYS_REMAP_FILE_PAGES = 239
- SYS_TIMER_CREATE = 240
- SYS_TIMER_SETTIME = 241
- SYS_TIMER_GETTIME = 242
- SYS_TIMER_GETOVERRUN = 243
- SYS_TIMER_DELETE = 244
- SYS_CLOCK_SETTIME = 245
- SYS_CLOCK_GETTIME = 246
- SYS_CLOCK_GETRES = 247
- SYS_CLOCK_NANOSLEEP = 248
- SYS_SWAPCONTEXT = 249
- SYS_TGKILL = 250
- SYS_UTIMES = 251
- SYS_STATFS64 = 252
- SYS_FSTATFS64 = 253
- SYS_RTAS = 255
- SYS_SYS_DEBUG_SETCONTEXT = 256
- SYS_MIGRATE_PAGES = 258
- SYS_MBIND = 259
- SYS_GET_MEMPOLICY = 260
- SYS_SET_MEMPOLICY = 261
- SYS_MQ_OPEN = 262
- SYS_MQ_UNLINK = 263
- SYS_MQ_TIMEDSEND = 264
- SYS_MQ_TIMEDRECEIVE = 265
- SYS_MQ_NOTIFY = 266
- SYS_MQ_GETSETATTR = 267
- SYS_KEXEC_LOAD = 268
- SYS_ADD_KEY = 269
- SYS_REQUEST_KEY = 270
- SYS_KEYCTL = 271
- SYS_WAITID = 272
- SYS_IOPRIO_SET = 273
- SYS_IOPRIO_GET = 274
- SYS_INOTIFY_INIT = 275
- SYS_INOTIFY_ADD_WATCH = 276
- SYS_INOTIFY_RM_WATCH = 277
- SYS_SPU_RUN = 278
- SYS_SPU_CREATE = 279
- SYS_PSELECT6 = 280
- SYS_PPOLL = 281
- SYS_UNSHARE = 282
- SYS_SPLICE = 283
- SYS_TEE = 284
- SYS_VMSPLICE = 285
- SYS_OPENAT = 286
- SYS_MKDIRAT = 287
- SYS_MKNODAT = 288
- SYS_FCHOWNAT = 289
- SYS_FUTIMESAT = 290
- SYS_NEWFSTATAT = 291
- SYS_UNLINKAT = 292
- SYS_RENAMEAT = 293
- SYS_LINKAT = 294
- SYS_SYMLINKAT = 295
- SYS_READLINKAT = 296
- SYS_FCHMODAT = 297
- SYS_FACCESSAT = 298
- SYS_GET_ROBUST_LIST = 299
- SYS_SET_ROBUST_LIST = 300
- SYS_MOVE_PAGES = 301
- SYS_GETCPU = 302
- SYS_EPOLL_PWAIT = 303
- SYS_UTIMENSAT = 304
- SYS_SIGNALFD = 305
- SYS_TIMERFD_CREATE = 306
- SYS_EVENTFD = 307
- SYS_SYNC_FILE_RANGE2 = 308
- SYS_FALLOCATE = 309
- SYS_SUBPAGE_PROT = 310
- SYS_TIMERFD_SETTIME = 311
- SYS_TIMERFD_GETTIME = 312
- SYS_SIGNALFD4 = 313
- SYS_EVENTFD2 = 314
- SYS_EPOLL_CREATE1 = 315
- SYS_DUP3 = 316
- SYS_PIPE2 = 317
- SYS_INOTIFY_INIT1 = 318
- SYS_PERF_EVENT_OPEN = 319
- SYS_PREADV = 320
- SYS_PWRITEV = 321
- SYS_RT_TGSIGQUEUEINFO = 322
- SYS_FANOTIFY_INIT = 323
- SYS_FANOTIFY_MARK = 324
- SYS_PRLIMIT64 = 325
- SYS_SOCKET = 326
- SYS_BIND = 327
- SYS_CONNECT = 328
- SYS_LISTEN = 329
- SYS_ACCEPT = 330
- SYS_GETSOCKNAME = 331
- SYS_GETPEERNAME = 332
- SYS_SOCKETPAIR = 333
- SYS_SEND = 334
- SYS_SENDTO = 335
- SYS_RECV = 336
- SYS_RECVFROM = 337
- SYS_SHUTDOWN = 338
- SYS_SETSOCKOPT = 339
- SYS_GETSOCKOPT = 340
- SYS_SENDMSG = 341
- SYS_RECVMSG = 342
- SYS_RECVMMSG = 343
- SYS_ACCEPT4 = 344
- SYS_NAME_TO_HANDLE_AT = 345
- SYS_OPEN_BY_HANDLE_AT = 346
- SYS_CLOCK_ADJTIME = 347
- SYS_SYNCFS = 348
- SYS_SENDMMSG = 349
- SYS_SETNS = 350
- SYS_PROCESS_VM_READV = 351
- SYS_PROCESS_VM_WRITEV = 352
- SYS_FINIT_MODULE = 353
- SYS_KCMP = 354
- SYS_SCHED_SETATTR = 355
- SYS_SCHED_GETATTR = 356
- SYS_RENAMEAT2 = 357
- SYS_SECCOMP = 358
- SYS_GETRANDOM = 359
- SYS_MEMFD_CREATE = 360
- SYS_BPF = 361
- SYS_EXECVEAT = 362
- SYS_SWITCH_ENDIAN = 363
- SYS_USERFAULTFD = 364
- SYS_MEMBARRIER = 365
- SYS_MLOCK2 = 378
- SYS_COPY_FILE_RANGE = 379
- SYS_PREADV2 = 380
- SYS_PWRITEV2 = 381
- SYS_KEXEC_FILE_LOAD = 382
- SYS_STATX = 383
- SYS_PKEY_ALLOC = 384
- SYS_PKEY_FREE = 385
- SYS_PKEY_MPROTECT = 386
- SYS_RSEQ = 387
- SYS_IO_PGETEVENTS = 388
- SYS_SEMTIMEDOP = 392
- SYS_SEMGET = 393
- SYS_SEMCTL = 394
- SYS_SHMGET = 395
- SYS_SHMCTL = 396
- SYS_SHMAT = 397
- SYS_SHMDT = 398
- SYS_MSGGET = 399
- SYS_MSGSND = 400
- SYS_MSGRCV = 401
- SYS_MSGCTL = 402
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
- SYS_CLONE3 = 435
+ SYS_RESTART_SYSCALL = 0
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_WAITPID = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECVE = 11
+ SYS_CHDIR = 12
+ SYS_TIME = 13
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LCHOWN = 16
+ SYS_BREAK = 17
+ SYS_OLDSTAT = 18
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_MOUNT = 21
+ SYS_UMOUNT = 22
+ SYS_SETUID = 23
+ SYS_GETUID = 24
+ SYS_STIME = 25
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_OLDFSTAT = 28
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_STTY = 31
+ SYS_GTTY = 32
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_FTIME = 35
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_RENAME = 38
+ SYS_MKDIR = 39
+ SYS_RMDIR = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_PROF = 44
+ SYS_BRK = 45
+ SYS_SETGID = 46
+ SYS_GETGID = 47
+ SYS_SIGNAL = 48
+ SYS_GETEUID = 49
+ SYS_GETEGID = 50
+ SYS_ACCT = 51
+ SYS_UMOUNT2 = 52
+ SYS_LOCK = 53
+ SYS_IOCTL = 54
+ SYS_FCNTL = 55
+ SYS_MPX = 56
+ SYS_SETPGID = 57
+ SYS_ULIMIT = 58
+ SYS_OLDOLDUNAME = 59
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_USTAT = 62
+ SYS_DUP2 = 63
+ SYS_GETPPID = 64
+ SYS_GETPGRP = 65
+ SYS_SETSID = 66
+ SYS_SIGACTION = 67
+ SYS_SGETMASK = 68
+ SYS_SSETMASK = 69
+ SYS_SETREUID = 70
+ SYS_SETREGID = 71
+ SYS_SIGSUSPEND = 72
+ SYS_SIGPENDING = 73
+ SYS_SETHOSTNAME = 74
+ SYS_SETRLIMIT = 75
+ SYS_GETRLIMIT = 76
+ SYS_GETRUSAGE = 77
+ SYS_GETTIMEOFDAY = 78
+ SYS_SETTIMEOFDAY = 79
+ SYS_GETGROUPS = 80
+ SYS_SETGROUPS = 81
+ SYS_SELECT = 82
+ SYS_SYMLINK = 83
+ SYS_OLDLSTAT = 84
+ SYS_READLINK = 85
+ SYS_USELIB = 86
+ SYS_SWAPON = 87
+ SYS_REBOOT = 88
+ SYS_READDIR = 89
+ SYS_MMAP = 90
+ SYS_MUNMAP = 91
+ SYS_TRUNCATE = 92
+ SYS_FTRUNCATE = 93
+ SYS_FCHMOD = 94
+ SYS_FCHOWN = 95
+ SYS_GETPRIORITY = 96
+ SYS_SETPRIORITY = 97
+ SYS_PROFIL = 98
+ SYS_STATFS = 99
+ SYS_FSTATFS = 100
+ SYS_IOPERM = 101
+ SYS_SOCKETCALL = 102
+ SYS_SYSLOG = 103
+ SYS_SETITIMER = 104
+ SYS_GETITIMER = 105
+ SYS_STAT = 106
+ SYS_LSTAT = 107
+ SYS_FSTAT = 108
+ SYS_OLDUNAME = 109
+ SYS_IOPL = 110
+ SYS_VHANGUP = 111
+ SYS_IDLE = 112
+ SYS_VM86 = 113
+ SYS_WAIT4 = 114
+ SYS_SWAPOFF = 115
+ SYS_SYSINFO = 116
+ SYS_IPC = 117
+ SYS_FSYNC = 118
+ SYS_SIGRETURN = 119
+ SYS_CLONE = 120
+ SYS_SETDOMAINNAME = 121
+ SYS_UNAME = 122
+ SYS_MODIFY_LDT = 123
+ SYS_ADJTIMEX = 124
+ SYS_MPROTECT = 125
+ SYS_SIGPROCMASK = 126
+ SYS_CREATE_MODULE = 127
+ SYS_INIT_MODULE = 128
+ SYS_DELETE_MODULE = 129
+ SYS_GET_KERNEL_SYMS = 130
+ SYS_QUOTACTL = 131
+ SYS_GETPGID = 132
+ SYS_FCHDIR = 133
+ SYS_BDFLUSH = 134
+ SYS_SYSFS = 135
+ SYS_PERSONALITY = 136
+ SYS_AFS_SYSCALL = 137
+ SYS_SETFSUID = 138
+ SYS_SETFSGID = 139
+ SYS__LLSEEK = 140
+ SYS_GETDENTS = 141
+ SYS__NEWSELECT = 142
+ SYS_FLOCK = 143
+ SYS_MSYNC = 144
+ SYS_READV = 145
+ SYS_WRITEV = 146
+ SYS_GETSID = 147
+ SYS_FDATASYNC = 148
+ SYS__SYSCTL = 149
+ SYS_MLOCK = 150
+ SYS_MUNLOCK = 151
+ SYS_MLOCKALL = 152
+ SYS_MUNLOCKALL = 153
+ SYS_SCHED_SETPARAM = 154
+ SYS_SCHED_GETPARAM = 155
+ SYS_SCHED_SETSCHEDULER = 156
+ SYS_SCHED_GETSCHEDULER = 157
+ SYS_SCHED_YIELD = 158
+ SYS_SCHED_GET_PRIORITY_MAX = 159
+ SYS_SCHED_GET_PRIORITY_MIN = 160
+ SYS_SCHED_RR_GET_INTERVAL = 161
+ SYS_NANOSLEEP = 162
+ SYS_MREMAP = 163
+ SYS_SETRESUID = 164
+ SYS_GETRESUID = 165
+ SYS_QUERY_MODULE = 166
+ SYS_POLL = 167
+ SYS_NFSSERVCTL = 168
+ SYS_SETRESGID = 169
+ SYS_GETRESGID = 170
+ SYS_PRCTL = 171
+ SYS_RT_SIGRETURN = 172
+ SYS_RT_SIGACTION = 173
+ SYS_RT_SIGPROCMASK = 174
+ SYS_RT_SIGPENDING = 175
+ SYS_RT_SIGTIMEDWAIT = 176
+ SYS_RT_SIGQUEUEINFO = 177
+ SYS_RT_SIGSUSPEND = 178
+ SYS_PREAD64 = 179
+ SYS_PWRITE64 = 180
+ SYS_CHOWN = 181
+ SYS_GETCWD = 182
+ SYS_CAPGET = 183
+ SYS_CAPSET = 184
+ SYS_SIGALTSTACK = 185
+ SYS_SENDFILE = 186
+ SYS_GETPMSG = 187
+ SYS_PUTPMSG = 188
+ SYS_VFORK = 189
+ SYS_UGETRLIMIT = 190
+ SYS_READAHEAD = 191
+ SYS_PCICONFIG_READ = 198
+ SYS_PCICONFIG_WRITE = 199
+ SYS_PCICONFIG_IOBASE = 200
+ SYS_MULTIPLEXER = 201
+ SYS_GETDENTS64 = 202
+ SYS_PIVOT_ROOT = 203
+ SYS_MADVISE = 205
+ SYS_MINCORE = 206
+ SYS_GETTID = 207
+ SYS_TKILL = 208
+ SYS_SETXATTR = 209
+ SYS_LSETXATTR = 210
+ SYS_FSETXATTR = 211
+ SYS_GETXATTR = 212
+ SYS_LGETXATTR = 213
+ SYS_FGETXATTR = 214
+ SYS_LISTXATTR = 215
+ SYS_LLISTXATTR = 216
+ SYS_FLISTXATTR = 217
+ SYS_REMOVEXATTR = 218
+ SYS_LREMOVEXATTR = 219
+ SYS_FREMOVEXATTR = 220
+ SYS_FUTEX = 221
+ SYS_SCHED_SETAFFINITY = 222
+ SYS_SCHED_GETAFFINITY = 223
+ SYS_TUXCALL = 225
+ SYS_IO_SETUP = 227
+ SYS_IO_DESTROY = 228
+ SYS_IO_GETEVENTS = 229
+ SYS_IO_SUBMIT = 230
+ SYS_IO_CANCEL = 231
+ SYS_SET_TID_ADDRESS = 232
+ SYS_FADVISE64 = 233
+ SYS_EXIT_GROUP = 234
+ SYS_LOOKUP_DCOOKIE = 235
+ SYS_EPOLL_CREATE = 236
+ SYS_EPOLL_CTL = 237
+ SYS_EPOLL_WAIT = 238
+ SYS_REMAP_FILE_PAGES = 239
+ SYS_TIMER_CREATE = 240
+ SYS_TIMER_SETTIME = 241
+ SYS_TIMER_GETTIME = 242
+ SYS_TIMER_GETOVERRUN = 243
+ SYS_TIMER_DELETE = 244
+ SYS_CLOCK_SETTIME = 245
+ SYS_CLOCK_GETTIME = 246
+ SYS_CLOCK_GETRES = 247
+ SYS_CLOCK_NANOSLEEP = 248
+ SYS_SWAPCONTEXT = 249
+ SYS_TGKILL = 250
+ SYS_UTIMES = 251
+ SYS_STATFS64 = 252
+ SYS_FSTATFS64 = 253
+ SYS_RTAS = 255
+ SYS_SYS_DEBUG_SETCONTEXT = 256
+ SYS_MIGRATE_PAGES = 258
+ SYS_MBIND = 259
+ SYS_GET_MEMPOLICY = 260
+ SYS_SET_MEMPOLICY = 261
+ SYS_MQ_OPEN = 262
+ SYS_MQ_UNLINK = 263
+ SYS_MQ_TIMEDSEND = 264
+ SYS_MQ_TIMEDRECEIVE = 265
+ SYS_MQ_NOTIFY = 266
+ SYS_MQ_GETSETATTR = 267
+ SYS_KEXEC_LOAD = 268
+ SYS_ADD_KEY = 269
+ SYS_REQUEST_KEY = 270
+ SYS_KEYCTL = 271
+ SYS_WAITID = 272
+ SYS_IOPRIO_SET = 273
+ SYS_IOPRIO_GET = 274
+ SYS_INOTIFY_INIT = 275
+ SYS_INOTIFY_ADD_WATCH = 276
+ SYS_INOTIFY_RM_WATCH = 277
+ SYS_SPU_RUN = 278
+ SYS_SPU_CREATE = 279
+ SYS_PSELECT6 = 280
+ SYS_PPOLL = 281
+ SYS_UNSHARE = 282
+ SYS_SPLICE = 283
+ SYS_TEE = 284
+ SYS_VMSPLICE = 285
+ SYS_OPENAT = 286
+ SYS_MKDIRAT = 287
+ SYS_MKNODAT = 288
+ SYS_FCHOWNAT = 289
+ SYS_FUTIMESAT = 290
+ SYS_NEWFSTATAT = 291
+ SYS_UNLINKAT = 292
+ SYS_RENAMEAT = 293
+ SYS_LINKAT = 294
+ SYS_SYMLINKAT = 295
+ SYS_READLINKAT = 296
+ SYS_FCHMODAT = 297
+ SYS_FACCESSAT = 298
+ SYS_GET_ROBUST_LIST = 299
+ SYS_SET_ROBUST_LIST = 300
+ SYS_MOVE_PAGES = 301
+ SYS_GETCPU = 302
+ SYS_EPOLL_PWAIT = 303
+ SYS_UTIMENSAT = 304
+ SYS_SIGNALFD = 305
+ SYS_TIMERFD_CREATE = 306
+ SYS_EVENTFD = 307
+ SYS_SYNC_FILE_RANGE2 = 308
+ SYS_FALLOCATE = 309
+ SYS_SUBPAGE_PROT = 310
+ SYS_TIMERFD_SETTIME = 311
+ SYS_TIMERFD_GETTIME = 312
+ SYS_SIGNALFD4 = 313
+ SYS_EVENTFD2 = 314
+ SYS_EPOLL_CREATE1 = 315
+ SYS_DUP3 = 316
+ SYS_PIPE2 = 317
+ SYS_INOTIFY_INIT1 = 318
+ SYS_PERF_EVENT_OPEN = 319
+ SYS_PREADV = 320
+ SYS_PWRITEV = 321
+ SYS_RT_TGSIGQUEUEINFO = 322
+ SYS_FANOTIFY_INIT = 323
+ SYS_FANOTIFY_MARK = 324
+ SYS_PRLIMIT64 = 325
+ SYS_SOCKET = 326
+ SYS_BIND = 327
+ SYS_CONNECT = 328
+ SYS_LISTEN = 329
+ SYS_ACCEPT = 330
+ SYS_GETSOCKNAME = 331
+ SYS_GETPEERNAME = 332
+ SYS_SOCKETPAIR = 333
+ SYS_SEND = 334
+ SYS_SENDTO = 335
+ SYS_RECV = 336
+ SYS_RECVFROM = 337
+ SYS_SHUTDOWN = 338
+ SYS_SETSOCKOPT = 339
+ SYS_GETSOCKOPT = 340
+ SYS_SENDMSG = 341
+ SYS_RECVMSG = 342
+ SYS_RECVMMSG = 343
+ SYS_ACCEPT4 = 344
+ SYS_NAME_TO_HANDLE_AT = 345
+ SYS_OPEN_BY_HANDLE_AT = 346
+ SYS_CLOCK_ADJTIME = 347
+ SYS_SYNCFS = 348
+ SYS_SENDMMSG = 349
+ SYS_SETNS = 350
+ SYS_PROCESS_VM_READV = 351
+ SYS_PROCESS_VM_WRITEV = 352
+ SYS_FINIT_MODULE = 353
+ SYS_KCMP = 354
+ SYS_SCHED_SETATTR = 355
+ SYS_SCHED_GETATTR = 356
+ SYS_RENAMEAT2 = 357
+ SYS_SECCOMP = 358
+ SYS_GETRANDOM = 359
+ SYS_MEMFD_CREATE = 360
+ SYS_BPF = 361
+ SYS_EXECVEAT = 362
+ SYS_SWITCH_ENDIAN = 363
+ SYS_USERFAULTFD = 364
+ SYS_MEMBARRIER = 365
+ SYS_MLOCK2 = 378
+ SYS_COPY_FILE_RANGE = 379
+ SYS_PREADV2 = 380
+ SYS_PWRITEV2 = 381
+ SYS_KEXEC_FILE_LOAD = 382
+ SYS_STATX = 383
+ SYS_PKEY_ALLOC = 384
+ SYS_PKEY_FREE = 385
+ SYS_PKEY_MPROTECT = 386
+ SYS_RSEQ = 387
+ SYS_IO_PGETEVENTS = 388
+ SYS_SEMTIMEDOP = 392
+ SYS_SEMGET = 393
+ SYS_SEMCTL = 394
+ SYS_SHMGET = 395
+ SYS_SHMCTL = 396
+ SYS_SHMAT = 397
+ SYS_SHMDT = 398
+ SYS_MSGGET = 399
+ SYS_MSGSND = 400
+ SYS_MSGRCV = 401
+ SYS_MSGCTL = 402
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index 4f7261a..5c9a9a3 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -1,300 +1,313 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build riscv64 && linux
// +build riscv64,linux
package unix
const (
- SYS_IO_SETUP = 0
- SYS_IO_DESTROY = 1
- SYS_IO_SUBMIT = 2
- SYS_IO_CANCEL = 3
- SYS_IO_GETEVENTS = 4
- SYS_SETXATTR = 5
- SYS_LSETXATTR = 6
- SYS_FSETXATTR = 7
- SYS_GETXATTR = 8
- SYS_LGETXATTR = 9
- SYS_FGETXATTR = 10
- SYS_LISTXATTR = 11
- SYS_LLISTXATTR = 12
- SYS_FLISTXATTR = 13
- SYS_REMOVEXATTR = 14
- SYS_LREMOVEXATTR = 15
- SYS_FREMOVEXATTR = 16
- SYS_GETCWD = 17
- SYS_LOOKUP_DCOOKIE = 18
- SYS_EVENTFD2 = 19
- SYS_EPOLL_CREATE1 = 20
- SYS_EPOLL_CTL = 21
- SYS_EPOLL_PWAIT = 22
- SYS_DUP = 23
- SYS_DUP3 = 24
- SYS_FCNTL = 25
- SYS_INOTIFY_INIT1 = 26
- SYS_INOTIFY_ADD_WATCH = 27
- SYS_INOTIFY_RM_WATCH = 28
- SYS_IOCTL = 29
- SYS_IOPRIO_SET = 30
- SYS_IOPRIO_GET = 31
- SYS_FLOCK = 32
- SYS_MKNODAT = 33
- SYS_MKDIRAT = 34
- SYS_UNLINKAT = 35
- SYS_SYMLINKAT = 36
- SYS_LINKAT = 37
- SYS_UMOUNT2 = 39
- SYS_MOUNT = 40
- SYS_PIVOT_ROOT = 41
- SYS_NFSSERVCTL = 42
- SYS_STATFS = 43
- SYS_FSTATFS = 44
- SYS_TRUNCATE = 45
- SYS_FTRUNCATE = 46
- SYS_FALLOCATE = 47
- SYS_FACCESSAT = 48
- SYS_CHDIR = 49
- SYS_FCHDIR = 50
- SYS_CHROOT = 51
- SYS_FCHMOD = 52
- SYS_FCHMODAT = 53
- SYS_FCHOWNAT = 54
- SYS_FCHOWN = 55
- SYS_OPENAT = 56
- SYS_CLOSE = 57
- SYS_VHANGUP = 58
- SYS_PIPE2 = 59
- SYS_QUOTACTL = 60
- SYS_GETDENTS64 = 61
- SYS_LSEEK = 62
- SYS_READ = 63
- SYS_WRITE = 64
- SYS_READV = 65
- SYS_WRITEV = 66
- SYS_PREAD64 = 67
- SYS_PWRITE64 = 68
- SYS_PREADV = 69
- SYS_PWRITEV = 70
- SYS_SENDFILE = 71
- SYS_PSELECT6 = 72
- SYS_PPOLL = 73
- SYS_SIGNALFD4 = 74
- SYS_VMSPLICE = 75
- SYS_SPLICE = 76
- SYS_TEE = 77
- SYS_READLINKAT = 78
- SYS_FSTATAT = 79
- SYS_FSTAT = 80
- SYS_SYNC = 81
- SYS_FSYNC = 82
- SYS_FDATASYNC = 83
- SYS_SYNC_FILE_RANGE = 84
- SYS_TIMERFD_CREATE = 85
- SYS_TIMERFD_SETTIME = 86
- SYS_TIMERFD_GETTIME = 87
- SYS_UTIMENSAT = 88
- SYS_ACCT = 89
- SYS_CAPGET = 90
- SYS_CAPSET = 91
- SYS_PERSONALITY = 92
- SYS_EXIT = 93
- SYS_EXIT_GROUP = 94
- SYS_WAITID = 95
- SYS_SET_TID_ADDRESS = 96
- SYS_UNSHARE = 97
- SYS_FUTEX = 98
- SYS_SET_ROBUST_LIST = 99
- SYS_GET_ROBUST_LIST = 100
- SYS_NANOSLEEP = 101
- SYS_GETITIMER = 102
- SYS_SETITIMER = 103
- SYS_KEXEC_LOAD = 104
- SYS_INIT_MODULE = 105
- SYS_DELETE_MODULE = 106
- SYS_TIMER_CREATE = 107
- SYS_TIMER_GETTIME = 108
- SYS_TIMER_GETOVERRUN = 109
- SYS_TIMER_SETTIME = 110
- SYS_TIMER_DELETE = 111
- SYS_CLOCK_SETTIME = 112
- SYS_CLOCK_GETTIME = 113
- SYS_CLOCK_GETRES = 114
- SYS_CLOCK_NANOSLEEP = 115
- SYS_SYSLOG = 116
- SYS_PTRACE = 117
- SYS_SCHED_SETPARAM = 118
- SYS_SCHED_SETSCHEDULER = 119
- SYS_SCHED_GETSCHEDULER = 120
- SYS_SCHED_GETPARAM = 121
- SYS_SCHED_SETAFFINITY = 122
- SYS_SCHED_GETAFFINITY = 123
- SYS_SCHED_YIELD = 124
- SYS_SCHED_GET_PRIORITY_MAX = 125
- SYS_SCHED_GET_PRIORITY_MIN = 126
- SYS_SCHED_RR_GET_INTERVAL = 127
- SYS_RESTART_SYSCALL = 128
- SYS_KILL = 129
- SYS_TKILL = 130
- SYS_TGKILL = 131
- SYS_SIGALTSTACK = 132
- SYS_RT_SIGSUSPEND = 133
- SYS_RT_SIGACTION = 134
- SYS_RT_SIGPROCMASK = 135
- SYS_RT_SIGPENDING = 136
- SYS_RT_SIGTIMEDWAIT = 137
- SYS_RT_SIGQUEUEINFO = 138
- SYS_RT_SIGRETURN = 139
- SYS_SETPRIORITY = 140
- SYS_GETPRIORITY = 141
- SYS_REBOOT = 142
- SYS_SETREGID = 143
- SYS_SETGID = 144
- SYS_SETREUID = 145
- SYS_SETUID = 146
- SYS_SETRESUID = 147
- SYS_GETRESUID = 148
- SYS_SETRESGID = 149
- SYS_GETRESGID = 150
- SYS_SETFSUID = 151
- SYS_SETFSGID = 152
- SYS_TIMES = 153
- SYS_SETPGID = 154
- SYS_GETPGID = 155
- SYS_GETSID = 156
- SYS_SETSID = 157
- SYS_GETGROUPS = 158
- SYS_SETGROUPS = 159
- SYS_UNAME = 160
- SYS_SETHOSTNAME = 161
- SYS_SETDOMAINNAME = 162
- SYS_GETRLIMIT = 163
- SYS_SETRLIMIT = 164
- SYS_GETRUSAGE = 165
- SYS_UMASK = 166
- SYS_PRCTL = 167
- SYS_GETCPU = 168
- SYS_GETTIMEOFDAY = 169
- SYS_SETTIMEOFDAY = 170
- SYS_ADJTIMEX = 171
- SYS_GETPID = 172
- SYS_GETPPID = 173
- SYS_GETUID = 174
- SYS_GETEUID = 175
- SYS_GETGID = 176
- SYS_GETEGID = 177
- SYS_GETTID = 178
- SYS_SYSINFO = 179
- SYS_MQ_OPEN = 180
- SYS_MQ_UNLINK = 181
- SYS_MQ_TIMEDSEND = 182
- SYS_MQ_TIMEDRECEIVE = 183
- SYS_MQ_NOTIFY = 184
- SYS_MQ_GETSETATTR = 185
- SYS_MSGGET = 186
- SYS_MSGCTL = 187
- SYS_MSGRCV = 188
- SYS_MSGSND = 189
- SYS_SEMGET = 190
- SYS_SEMCTL = 191
- SYS_SEMTIMEDOP = 192
- SYS_SEMOP = 193
- SYS_SHMGET = 194
- SYS_SHMCTL = 195
- SYS_SHMAT = 196
- SYS_SHMDT = 197
- SYS_SOCKET = 198
- SYS_SOCKETPAIR = 199
- SYS_BIND = 200
- SYS_LISTEN = 201
- SYS_ACCEPT = 202
- SYS_CONNECT = 203
- SYS_GETSOCKNAME = 204
- SYS_GETPEERNAME = 205
- SYS_SENDTO = 206
- SYS_RECVFROM = 207
- SYS_SETSOCKOPT = 208
- SYS_GETSOCKOPT = 209
- SYS_SHUTDOWN = 210
- SYS_SENDMSG = 211
- SYS_RECVMSG = 212
- SYS_READAHEAD = 213
- SYS_BRK = 214
- SYS_MUNMAP = 215
- SYS_MREMAP = 216
- SYS_ADD_KEY = 217
- SYS_REQUEST_KEY = 218
- SYS_KEYCTL = 219
- SYS_CLONE = 220
- SYS_EXECVE = 221
- SYS_MMAP = 222
- SYS_FADVISE64 = 223
- SYS_SWAPON = 224
- SYS_SWAPOFF = 225
- SYS_MPROTECT = 226
- SYS_MSYNC = 227
- SYS_MLOCK = 228
- SYS_MUNLOCK = 229
- SYS_MLOCKALL = 230
- SYS_MUNLOCKALL = 231
- SYS_MINCORE = 232
- SYS_MADVISE = 233
- SYS_REMAP_FILE_PAGES = 234
- SYS_MBIND = 235
- SYS_GET_MEMPOLICY = 236
- SYS_SET_MEMPOLICY = 237
- SYS_MIGRATE_PAGES = 238
- SYS_MOVE_PAGES = 239
- SYS_RT_TGSIGQUEUEINFO = 240
- SYS_PERF_EVENT_OPEN = 241
- SYS_ACCEPT4 = 242
- SYS_RECVMMSG = 243
- SYS_ARCH_SPECIFIC_SYSCALL = 244
- SYS_WAIT4 = 260
- SYS_PRLIMIT64 = 261
- SYS_FANOTIFY_INIT = 262
- SYS_FANOTIFY_MARK = 263
- SYS_NAME_TO_HANDLE_AT = 264
- SYS_OPEN_BY_HANDLE_AT = 265
- SYS_CLOCK_ADJTIME = 266
- SYS_SYNCFS = 267
- SYS_SETNS = 268
- SYS_SENDMMSG = 269
- SYS_PROCESS_VM_READV = 270
- SYS_PROCESS_VM_WRITEV = 271
- SYS_KCMP = 272
- SYS_FINIT_MODULE = 273
- SYS_SCHED_SETATTR = 274
- SYS_SCHED_GETATTR = 275
- SYS_RENAMEAT2 = 276
- SYS_SECCOMP = 277
- SYS_GETRANDOM = 278
- SYS_MEMFD_CREATE = 279
- SYS_BPF = 280
- SYS_EXECVEAT = 281
- SYS_USERFAULTFD = 282
- SYS_MEMBARRIER = 283
- SYS_MLOCK2 = 284
- SYS_COPY_FILE_RANGE = 285
- SYS_PREADV2 = 286
- SYS_PWRITEV2 = 287
- SYS_PKEY_MPROTECT = 288
- SYS_PKEY_ALLOC = 289
- SYS_PKEY_FREE = 290
- SYS_STATX = 291
- SYS_IO_PGETEVENTS = 292
- SYS_RSEQ = 293
- SYS_KEXEC_FILE_LOAD = 294
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
- SYS_CLONE3 = 435
+ SYS_IO_SETUP = 0
+ SYS_IO_DESTROY = 1
+ SYS_IO_SUBMIT = 2
+ SYS_IO_CANCEL = 3
+ SYS_IO_GETEVENTS = 4
+ SYS_SETXATTR = 5
+ SYS_LSETXATTR = 6
+ SYS_FSETXATTR = 7
+ SYS_GETXATTR = 8
+ SYS_LGETXATTR = 9
+ SYS_FGETXATTR = 10
+ SYS_LISTXATTR = 11
+ SYS_LLISTXATTR = 12
+ SYS_FLISTXATTR = 13
+ SYS_REMOVEXATTR = 14
+ SYS_LREMOVEXATTR = 15
+ SYS_FREMOVEXATTR = 16
+ SYS_GETCWD = 17
+ SYS_LOOKUP_DCOOKIE = 18
+ SYS_EVENTFD2 = 19
+ SYS_EPOLL_CREATE1 = 20
+ SYS_EPOLL_CTL = 21
+ SYS_EPOLL_PWAIT = 22
+ SYS_DUP = 23
+ SYS_DUP3 = 24
+ SYS_FCNTL = 25
+ SYS_INOTIFY_INIT1 = 26
+ SYS_INOTIFY_ADD_WATCH = 27
+ SYS_INOTIFY_RM_WATCH = 28
+ SYS_IOCTL = 29
+ SYS_IOPRIO_SET = 30
+ SYS_IOPRIO_GET = 31
+ SYS_FLOCK = 32
+ SYS_MKNODAT = 33
+ SYS_MKDIRAT = 34
+ SYS_UNLINKAT = 35
+ SYS_SYMLINKAT = 36
+ SYS_LINKAT = 37
+ SYS_UMOUNT2 = 39
+ SYS_MOUNT = 40
+ SYS_PIVOT_ROOT = 41
+ SYS_NFSSERVCTL = 42
+ SYS_STATFS = 43
+ SYS_FSTATFS = 44
+ SYS_TRUNCATE = 45
+ SYS_FTRUNCATE = 46
+ SYS_FALLOCATE = 47
+ SYS_FACCESSAT = 48
+ SYS_CHDIR = 49
+ SYS_FCHDIR = 50
+ SYS_CHROOT = 51
+ SYS_FCHMOD = 52
+ SYS_FCHMODAT = 53
+ SYS_FCHOWNAT = 54
+ SYS_FCHOWN = 55
+ SYS_OPENAT = 56
+ SYS_CLOSE = 57
+ SYS_VHANGUP = 58
+ SYS_PIPE2 = 59
+ SYS_QUOTACTL = 60
+ SYS_GETDENTS64 = 61
+ SYS_LSEEK = 62
+ SYS_READ = 63
+ SYS_WRITE = 64
+ SYS_READV = 65
+ SYS_WRITEV = 66
+ SYS_PREAD64 = 67
+ SYS_PWRITE64 = 68
+ SYS_PREADV = 69
+ SYS_PWRITEV = 70
+ SYS_SENDFILE = 71
+ SYS_PSELECT6 = 72
+ SYS_PPOLL = 73
+ SYS_SIGNALFD4 = 74
+ SYS_VMSPLICE = 75
+ SYS_SPLICE = 76
+ SYS_TEE = 77
+ SYS_READLINKAT = 78
+ SYS_FSTATAT = 79
+ SYS_FSTAT = 80
+ SYS_SYNC = 81
+ SYS_FSYNC = 82
+ SYS_FDATASYNC = 83
+ SYS_SYNC_FILE_RANGE = 84
+ SYS_TIMERFD_CREATE = 85
+ SYS_TIMERFD_SETTIME = 86
+ SYS_TIMERFD_GETTIME = 87
+ SYS_UTIMENSAT = 88
+ SYS_ACCT = 89
+ SYS_CAPGET = 90
+ SYS_CAPSET = 91
+ SYS_PERSONALITY = 92
+ SYS_EXIT = 93
+ SYS_EXIT_GROUP = 94
+ SYS_WAITID = 95
+ SYS_SET_TID_ADDRESS = 96
+ SYS_UNSHARE = 97
+ SYS_FUTEX = 98
+ SYS_SET_ROBUST_LIST = 99
+ SYS_GET_ROBUST_LIST = 100
+ SYS_NANOSLEEP = 101
+ SYS_GETITIMER = 102
+ SYS_SETITIMER = 103
+ SYS_KEXEC_LOAD = 104
+ SYS_INIT_MODULE = 105
+ SYS_DELETE_MODULE = 106
+ SYS_TIMER_CREATE = 107
+ SYS_TIMER_GETTIME = 108
+ SYS_TIMER_GETOVERRUN = 109
+ SYS_TIMER_SETTIME = 110
+ SYS_TIMER_DELETE = 111
+ SYS_CLOCK_SETTIME = 112
+ SYS_CLOCK_GETTIME = 113
+ SYS_CLOCK_GETRES = 114
+ SYS_CLOCK_NANOSLEEP = 115
+ SYS_SYSLOG = 116
+ SYS_PTRACE = 117
+ SYS_SCHED_SETPARAM = 118
+ SYS_SCHED_SETSCHEDULER = 119
+ SYS_SCHED_GETSCHEDULER = 120
+ SYS_SCHED_GETPARAM = 121
+ SYS_SCHED_SETAFFINITY = 122
+ SYS_SCHED_GETAFFINITY = 123
+ SYS_SCHED_YIELD = 124
+ SYS_SCHED_GET_PRIORITY_MAX = 125
+ SYS_SCHED_GET_PRIORITY_MIN = 126
+ SYS_SCHED_RR_GET_INTERVAL = 127
+ SYS_RESTART_SYSCALL = 128
+ SYS_KILL = 129
+ SYS_TKILL = 130
+ SYS_TGKILL = 131
+ SYS_SIGALTSTACK = 132
+ SYS_RT_SIGSUSPEND = 133
+ SYS_RT_SIGACTION = 134
+ SYS_RT_SIGPROCMASK = 135
+ SYS_RT_SIGPENDING = 136
+ SYS_RT_SIGTIMEDWAIT = 137
+ SYS_RT_SIGQUEUEINFO = 138
+ SYS_RT_SIGRETURN = 139
+ SYS_SETPRIORITY = 140
+ SYS_GETPRIORITY = 141
+ SYS_REBOOT = 142
+ SYS_SETREGID = 143
+ SYS_SETGID = 144
+ SYS_SETREUID = 145
+ SYS_SETUID = 146
+ SYS_SETRESUID = 147
+ SYS_GETRESUID = 148
+ SYS_SETRESGID = 149
+ SYS_GETRESGID = 150
+ SYS_SETFSUID = 151
+ SYS_SETFSGID = 152
+ SYS_TIMES = 153
+ SYS_SETPGID = 154
+ SYS_GETPGID = 155
+ SYS_GETSID = 156
+ SYS_SETSID = 157
+ SYS_GETGROUPS = 158
+ SYS_SETGROUPS = 159
+ SYS_UNAME = 160
+ SYS_SETHOSTNAME = 161
+ SYS_SETDOMAINNAME = 162
+ SYS_GETRLIMIT = 163
+ SYS_SETRLIMIT = 164
+ SYS_GETRUSAGE = 165
+ SYS_UMASK = 166
+ SYS_PRCTL = 167
+ SYS_GETCPU = 168
+ SYS_GETTIMEOFDAY = 169
+ SYS_SETTIMEOFDAY = 170
+ SYS_ADJTIMEX = 171
+ SYS_GETPID = 172
+ SYS_GETPPID = 173
+ SYS_GETUID = 174
+ SYS_GETEUID = 175
+ SYS_GETGID = 176
+ SYS_GETEGID = 177
+ SYS_GETTID = 178
+ SYS_SYSINFO = 179
+ SYS_MQ_OPEN = 180
+ SYS_MQ_UNLINK = 181
+ SYS_MQ_TIMEDSEND = 182
+ SYS_MQ_TIMEDRECEIVE = 183
+ SYS_MQ_NOTIFY = 184
+ SYS_MQ_GETSETATTR = 185
+ SYS_MSGGET = 186
+ SYS_MSGCTL = 187
+ SYS_MSGRCV = 188
+ SYS_MSGSND = 189
+ SYS_SEMGET = 190
+ SYS_SEMCTL = 191
+ SYS_SEMTIMEDOP = 192
+ SYS_SEMOP = 193
+ SYS_SHMGET = 194
+ SYS_SHMCTL = 195
+ SYS_SHMAT = 196
+ SYS_SHMDT = 197
+ SYS_SOCKET = 198
+ SYS_SOCKETPAIR = 199
+ SYS_BIND = 200
+ SYS_LISTEN = 201
+ SYS_ACCEPT = 202
+ SYS_CONNECT = 203
+ SYS_GETSOCKNAME = 204
+ SYS_GETPEERNAME = 205
+ SYS_SENDTO = 206
+ SYS_RECVFROM = 207
+ SYS_SETSOCKOPT = 208
+ SYS_GETSOCKOPT = 209
+ SYS_SHUTDOWN = 210
+ SYS_SENDMSG = 211
+ SYS_RECVMSG = 212
+ SYS_READAHEAD = 213
+ SYS_BRK = 214
+ SYS_MUNMAP = 215
+ SYS_MREMAP = 216
+ SYS_ADD_KEY = 217
+ SYS_REQUEST_KEY = 218
+ SYS_KEYCTL = 219
+ SYS_CLONE = 220
+ SYS_EXECVE = 221
+ SYS_MMAP = 222
+ SYS_FADVISE64 = 223
+ SYS_SWAPON = 224
+ SYS_SWAPOFF = 225
+ SYS_MPROTECT = 226
+ SYS_MSYNC = 227
+ SYS_MLOCK = 228
+ SYS_MUNLOCK = 229
+ SYS_MLOCKALL = 230
+ SYS_MUNLOCKALL = 231
+ SYS_MINCORE = 232
+ SYS_MADVISE = 233
+ SYS_REMAP_FILE_PAGES = 234
+ SYS_MBIND = 235
+ SYS_GET_MEMPOLICY = 236
+ SYS_SET_MEMPOLICY = 237
+ SYS_MIGRATE_PAGES = 238
+ SYS_MOVE_PAGES = 239
+ SYS_RT_TGSIGQUEUEINFO = 240
+ SYS_PERF_EVENT_OPEN = 241
+ SYS_ACCEPT4 = 242
+ SYS_RECVMMSG = 243
+ SYS_ARCH_SPECIFIC_SYSCALL = 244
+ SYS_WAIT4 = 260
+ SYS_PRLIMIT64 = 261
+ SYS_FANOTIFY_INIT = 262
+ SYS_FANOTIFY_MARK = 263
+ SYS_NAME_TO_HANDLE_AT = 264
+ SYS_OPEN_BY_HANDLE_AT = 265
+ SYS_CLOCK_ADJTIME = 266
+ SYS_SYNCFS = 267
+ SYS_SETNS = 268
+ SYS_SENDMMSG = 269
+ SYS_PROCESS_VM_READV = 270
+ SYS_PROCESS_VM_WRITEV = 271
+ SYS_KCMP = 272
+ SYS_FINIT_MODULE = 273
+ SYS_SCHED_SETATTR = 274
+ SYS_SCHED_GETATTR = 275
+ SYS_RENAMEAT2 = 276
+ SYS_SECCOMP = 277
+ SYS_GETRANDOM = 278
+ SYS_MEMFD_CREATE = 279
+ SYS_BPF = 280
+ SYS_EXECVEAT = 281
+ SYS_USERFAULTFD = 282
+ SYS_MEMBARRIER = 283
+ SYS_MLOCK2 = 284
+ SYS_COPY_FILE_RANGE = 285
+ SYS_PREADV2 = 286
+ SYS_PWRITEV2 = 287
+ SYS_PKEY_MPROTECT = 288
+ SYS_PKEY_ALLOC = 289
+ SYS_PKEY_FREE = 290
+ SYS_STATX = 291
+ SYS_IO_PGETEVENTS = 292
+ SYS_RSEQ = 293
+ SYS_KEXEC_FILE_LOAD = 294
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index f47014a..913f50f 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -1,363 +1,376 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build s390x && linux
// +build s390x,linux
package unix
const (
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_RESTART_SYSCALL = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_BRK = 45
- SYS_SIGNAL = 48
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_SETPGID = 57
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_SYMLINK = 83
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_LOOKUP_DCOOKIE = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_GETDENTS = 141
- SYS_SELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_QUERY_MODULE = 167
- SYS_POLL = 168
- SYS_NFSSERVCTL = 169
- SYS_PRCTL = 172
- SYS_RT_SIGRETURN = 173
- SYS_RT_SIGACTION = 174
- SYS_RT_SIGPROCMASK = 175
- SYS_RT_SIGPENDING = 176
- SYS_RT_SIGTIMEDWAIT = 177
- SYS_RT_SIGQUEUEINFO = 178
- SYS_RT_SIGSUSPEND = 179
- SYS_PREAD64 = 180
- SYS_PWRITE64 = 181
- SYS_GETCWD = 183
- SYS_CAPGET = 184
- SYS_CAPSET = 185
- SYS_SIGALTSTACK = 186
- SYS_SENDFILE = 187
- SYS_GETPMSG = 188
- SYS_PUTPMSG = 189
- SYS_VFORK = 190
- SYS_GETRLIMIT = 191
- SYS_LCHOWN = 198
- SYS_GETUID = 199
- SYS_GETGID = 200
- SYS_GETEUID = 201
- SYS_GETEGID = 202
- SYS_SETREUID = 203
- SYS_SETREGID = 204
- SYS_GETGROUPS = 205
- SYS_SETGROUPS = 206
- SYS_FCHOWN = 207
- SYS_SETRESUID = 208
- SYS_GETRESUID = 209
- SYS_SETRESGID = 210
- SYS_GETRESGID = 211
- SYS_CHOWN = 212
- SYS_SETUID = 213
- SYS_SETGID = 214
- SYS_SETFSUID = 215
- SYS_SETFSGID = 216
- SYS_PIVOT_ROOT = 217
- SYS_MINCORE = 218
- SYS_MADVISE = 219
- SYS_GETDENTS64 = 220
- SYS_READAHEAD = 222
- SYS_SETXATTR = 224
- SYS_LSETXATTR = 225
- SYS_FSETXATTR = 226
- SYS_GETXATTR = 227
- SYS_LGETXATTR = 228
- SYS_FGETXATTR = 229
- SYS_LISTXATTR = 230
- SYS_LLISTXATTR = 231
- SYS_FLISTXATTR = 232
- SYS_REMOVEXATTR = 233
- SYS_LREMOVEXATTR = 234
- SYS_FREMOVEXATTR = 235
- SYS_GETTID = 236
- SYS_TKILL = 237
- SYS_FUTEX = 238
- SYS_SCHED_SETAFFINITY = 239
- SYS_SCHED_GETAFFINITY = 240
- SYS_TGKILL = 241
- SYS_IO_SETUP = 243
- SYS_IO_DESTROY = 244
- SYS_IO_GETEVENTS = 245
- SYS_IO_SUBMIT = 246
- SYS_IO_CANCEL = 247
- SYS_EXIT_GROUP = 248
- SYS_EPOLL_CREATE = 249
- SYS_EPOLL_CTL = 250
- SYS_EPOLL_WAIT = 251
- SYS_SET_TID_ADDRESS = 252
- SYS_FADVISE64 = 253
- SYS_TIMER_CREATE = 254
- SYS_TIMER_SETTIME = 255
- SYS_TIMER_GETTIME = 256
- SYS_TIMER_GETOVERRUN = 257
- SYS_TIMER_DELETE = 258
- SYS_CLOCK_SETTIME = 259
- SYS_CLOCK_GETTIME = 260
- SYS_CLOCK_GETRES = 261
- SYS_CLOCK_NANOSLEEP = 262
- SYS_STATFS64 = 265
- SYS_FSTATFS64 = 266
- SYS_REMAP_FILE_PAGES = 267
- SYS_MBIND = 268
- SYS_GET_MEMPOLICY = 269
- SYS_SET_MEMPOLICY = 270
- SYS_MQ_OPEN = 271
- SYS_MQ_UNLINK = 272
- SYS_MQ_TIMEDSEND = 273
- SYS_MQ_TIMEDRECEIVE = 274
- SYS_MQ_NOTIFY = 275
- SYS_MQ_GETSETATTR = 276
- SYS_KEXEC_LOAD = 277
- SYS_ADD_KEY = 278
- SYS_REQUEST_KEY = 279
- SYS_KEYCTL = 280
- SYS_WAITID = 281
- SYS_IOPRIO_SET = 282
- SYS_IOPRIO_GET = 283
- SYS_INOTIFY_INIT = 284
- SYS_INOTIFY_ADD_WATCH = 285
- SYS_INOTIFY_RM_WATCH = 286
- SYS_MIGRATE_PAGES = 287
- SYS_OPENAT = 288
- SYS_MKDIRAT = 289
- SYS_MKNODAT = 290
- SYS_FCHOWNAT = 291
- SYS_FUTIMESAT = 292
- SYS_NEWFSTATAT = 293
- SYS_UNLINKAT = 294
- SYS_RENAMEAT = 295
- SYS_LINKAT = 296
- SYS_SYMLINKAT = 297
- SYS_READLINKAT = 298
- SYS_FCHMODAT = 299
- SYS_FACCESSAT = 300
- SYS_PSELECT6 = 301
- SYS_PPOLL = 302
- SYS_UNSHARE = 303
- SYS_SET_ROBUST_LIST = 304
- SYS_GET_ROBUST_LIST = 305
- SYS_SPLICE = 306
- SYS_SYNC_FILE_RANGE = 307
- SYS_TEE = 308
- SYS_VMSPLICE = 309
- SYS_MOVE_PAGES = 310
- SYS_GETCPU = 311
- SYS_EPOLL_PWAIT = 312
- SYS_UTIMES = 313
- SYS_FALLOCATE = 314
- SYS_UTIMENSAT = 315
- SYS_SIGNALFD = 316
- SYS_TIMERFD = 317
- SYS_EVENTFD = 318
- SYS_TIMERFD_CREATE = 319
- SYS_TIMERFD_SETTIME = 320
- SYS_TIMERFD_GETTIME = 321
- SYS_SIGNALFD4 = 322
- SYS_EVENTFD2 = 323
- SYS_INOTIFY_INIT1 = 324
- SYS_PIPE2 = 325
- SYS_DUP3 = 326
- SYS_EPOLL_CREATE1 = 327
- SYS_PREADV = 328
- SYS_PWRITEV = 329
- SYS_RT_TGSIGQUEUEINFO = 330
- SYS_PERF_EVENT_OPEN = 331
- SYS_FANOTIFY_INIT = 332
- SYS_FANOTIFY_MARK = 333
- SYS_PRLIMIT64 = 334
- SYS_NAME_TO_HANDLE_AT = 335
- SYS_OPEN_BY_HANDLE_AT = 336
- SYS_CLOCK_ADJTIME = 337
- SYS_SYNCFS = 338
- SYS_SETNS = 339
- SYS_PROCESS_VM_READV = 340
- SYS_PROCESS_VM_WRITEV = 341
- SYS_S390_RUNTIME_INSTR = 342
- SYS_KCMP = 343
- SYS_FINIT_MODULE = 344
- SYS_SCHED_SETATTR = 345
- SYS_SCHED_GETATTR = 346
- SYS_RENAMEAT2 = 347
- SYS_SECCOMP = 348
- SYS_GETRANDOM = 349
- SYS_MEMFD_CREATE = 350
- SYS_BPF = 351
- SYS_S390_PCI_MMIO_WRITE = 352
- SYS_S390_PCI_MMIO_READ = 353
- SYS_EXECVEAT = 354
- SYS_USERFAULTFD = 355
- SYS_MEMBARRIER = 356
- SYS_RECVMMSG = 357
- SYS_SENDMMSG = 358
- SYS_SOCKET = 359
- SYS_SOCKETPAIR = 360
- SYS_BIND = 361
- SYS_CONNECT = 362
- SYS_LISTEN = 363
- SYS_ACCEPT4 = 364
- SYS_GETSOCKOPT = 365
- SYS_SETSOCKOPT = 366
- SYS_GETSOCKNAME = 367
- SYS_GETPEERNAME = 368
- SYS_SENDTO = 369
- SYS_SENDMSG = 370
- SYS_RECVFROM = 371
- SYS_RECVMSG = 372
- SYS_SHUTDOWN = 373
- SYS_MLOCK2 = 374
- SYS_COPY_FILE_RANGE = 375
- SYS_PREADV2 = 376
- SYS_PWRITEV2 = 377
- SYS_S390_GUARDED_STORAGE = 378
- SYS_STATX = 379
- SYS_S390_STHYI = 380
- SYS_KEXEC_FILE_LOAD = 381
- SYS_IO_PGETEVENTS = 382
- SYS_RSEQ = 383
- SYS_PKEY_MPROTECT = 384
- SYS_PKEY_ALLOC = 385
- SYS_PKEY_FREE = 386
- SYS_SEMTIMEDOP = 392
- SYS_SEMGET = 393
- SYS_SEMCTL = 394
- SYS_SHMGET = 395
- SYS_SHMCTL = 396
- SYS_SHMAT = 397
- SYS_SHMDT = 398
- SYS_MSGGET = 399
- SYS_MSGSND = 400
- SYS_MSGRCV = 401
- SYS_MSGCTL = 402
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
- SYS_CLONE3 = 435
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_RESTART_SYSCALL = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECVE = 11
+ SYS_CHDIR = 12
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_MOUNT = 21
+ SYS_UMOUNT = 22
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_RENAME = 38
+ SYS_MKDIR = 39
+ SYS_RMDIR = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_BRK = 45
+ SYS_SIGNAL = 48
+ SYS_ACCT = 51
+ SYS_UMOUNT2 = 52
+ SYS_IOCTL = 54
+ SYS_FCNTL = 55
+ SYS_SETPGID = 57
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_USTAT = 62
+ SYS_DUP2 = 63
+ SYS_GETPPID = 64
+ SYS_GETPGRP = 65
+ SYS_SETSID = 66
+ SYS_SIGACTION = 67
+ SYS_SIGSUSPEND = 72
+ SYS_SIGPENDING = 73
+ SYS_SETHOSTNAME = 74
+ SYS_SETRLIMIT = 75
+ SYS_GETRUSAGE = 77
+ SYS_GETTIMEOFDAY = 78
+ SYS_SETTIMEOFDAY = 79
+ SYS_SYMLINK = 83
+ SYS_READLINK = 85
+ SYS_USELIB = 86
+ SYS_SWAPON = 87
+ SYS_REBOOT = 88
+ SYS_READDIR = 89
+ SYS_MMAP = 90
+ SYS_MUNMAP = 91
+ SYS_TRUNCATE = 92
+ SYS_FTRUNCATE = 93
+ SYS_FCHMOD = 94
+ SYS_GETPRIORITY = 96
+ SYS_SETPRIORITY = 97
+ SYS_STATFS = 99
+ SYS_FSTATFS = 100
+ SYS_SOCKETCALL = 102
+ SYS_SYSLOG = 103
+ SYS_SETITIMER = 104
+ SYS_GETITIMER = 105
+ SYS_STAT = 106
+ SYS_LSTAT = 107
+ SYS_FSTAT = 108
+ SYS_LOOKUP_DCOOKIE = 110
+ SYS_VHANGUP = 111
+ SYS_IDLE = 112
+ SYS_WAIT4 = 114
+ SYS_SWAPOFF = 115
+ SYS_SYSINFO = 116
+ SYS_IPC = 117
+ SYS_FSYNC = 118
+ SYS_SIGRETURN = 119
+ SYS_CLONE = 120
+ SYS_SETDOMAINNAME = 121
+ SYS_UNAME = 122
+ SYS_ADJTIMEX = 124
+ SYS_MPROTECT = 125
+ SYS_SIGPROCMASK = 126
+ SYS_CREATE_MODULE = 127
+ SYS_INIT_MODULE = 128
+ SYS_DELETE_MODULE = 129
+ SYS_GET_KERNEL_SYMS = 130
+ SYS_QUOTACTL = 131
+ SYS_GETPGID = 132
+ SYS_FCHDIR = 133
+ SYS_BDFLUSH = 134
+ SYS_SYSFS = 135
+ SYS_PERSONALITY = 136
+ SYS_AFS_SYSCALL = 137
+ SYS_GETDENTS = 141
+ SYS_SELECT = 142
+ SYS_FLOCK = 143
+ SYS_MSYNC = 144
+ SYS_READV = 145
+ SYS_WRITEV = 146
+ SYS_GETSID = 147
+ SYS_FDATASYNC = 148
+ SYS__SYSCTL = 149
+ SYS_MLOCK = 150
+ SYS_MUNLOCK = 151
+ SYS_MLOCKALL = 152
+ SYS_MUNLOCKALL = 153
+ SYS_SCHED_SETPARAM = 154
+ SYS_SCHED_GETPARAM = 155
+ SYS_SCHED_SETSCHEDULER = 156
+ SYS_SCHED_GETSCHEDULER = 157
+ SYS_SCHED_YIELD = 158
+ SYS_SCHED_GET_PRIORITY_MAX = 159
+ SYS_SCHED_GET_PRIORITY_MIN = 160
+ SYS_SCHED_RR_GET_INTERVAL = 161
+ SYS_NANOSLEEP = 162
+ SYS_MREMAP = 163
+ SYS_QUERY_MODULE = 167
+ SYS_POLL = 168
+ SYS_NFSSERVCTL = 169
+ SYS_PRCTL = 172
+ SYS_RT_SIGRETURN = 173
+ SYS_RT_SIGACTION = 174
+ SYS_RT_SIGPROCMASK = 175
+ SYS_RT_SIGPENDING = 176
+ SYS_RT_SIGTIMEDWAIT = 177
+ SYS_RT_SIGQUEUEINFO = 178
+ SYS_RT_SIGSUSPEND = 179
+ SYS_PREAD64 = 180
+ SYS_PWRITE64 = 181
+ SYS_GETCWD = 183
+ SYS_CAPGET = 184
+ SYS_CAPSET = 185
+ SYS_SIGALTSTACK = 186
+ SYS_SENDFILE = 187
+ SYS_GETPMSG = 188
+ SYS_PUTPMSG = 189
+ SYS_VFORK = 190
+ SYS_GETRLIMIT = 191
+ SYS_LCHOWN = 198
+ SYS_GETUID = 199
+ SYS_GETGID = 200
+ SYS_GETEUID = 201
+ SYS_GETEGID = 202
+ SYS_SETREUID = 203
+ SYS_SETREGID = 204
+ SYS_GETGROUPS = 205
+ SYS_SETGROUPS = 206
+ SYS_FCHOWN = 207
+ SYS_SETRESUID = 208
+ SYS_GETRESUID = 209
+ SYS_SETRESGID = 210
+ SYS_GETRESGID = 211
+ SYS_CHOWN = 212
+ SYS_SETUID = 213
+ SYS_SETGID = 214
+ SYS_SETFSUID = 215
+ SYS_SETFSGID = 216
+ SYS_PIVOT_ROOT = 217
+ SYS_MINCORE = 218
+ SYS_MADVISE = 219
+ SYS_GETDENTS64 = 220
+ SYS_READAHEAD = 222
+ SYS_SETXATTR = 224
+ SYS_LSETXATTR = 225
+ SYS_FSETXATTR = 226
+ SYS_GETXATTR = 227
+ SYS_LGETXATTR = 228
+ SYS_FGETXATTR = 229
+ SYS_LISTXATTR = 230
+ SYS_LLISTXATTR = 231
+ SYS_FLISTXATTR = 232
+ SYS_REMOVEXATTR = 233
+ SYS_LREMOVEXATTR = 234
+ SYS_FREMOVEXATTR = 235
+ SYS_GETTID = 236
+ SYS_TKILL = 237
+ SYS_FUTEX = 238
+ SYS_SCHED_SETAFFINITY = 239
+ SYS_SCHED_GETAFFINITY = 240
+ SYS_TGKILL = 241
+ SYS_IO_SETUP = 243
+ SYS_IO_DESTROY = 244
+ SYS_IO_GETEVENTS = 245
+ SYS_IO_SUBMIT = 246
+ SYS_IO_CANCEL = 247
+ SYS_EXIT_GROUP = 248
+ SYS_EPOLL_CREATE = 249
+ SYS_EPOLL_CTL = 250
+ SYS_EPOLL_WAIT = 251
+ SYS_SET_TID_ADDRESS = 252
+ SYS_FADVISE64 = 253
+ SYS_TIMER_CREATE = 254
+ SYS_TIMER_SETTIME = 255
+ SYS_TIMER_GETTIME = 256
+ SYS_TIMER_GETOVERRUN = 257
+ SYS_TIMER_DELETE = 258
+ SYS_CLOCK_SETTIME = 259
+ SYS_CLOCK_GETTIME = 260
+ SYS_CLOCK_GETRES = 261
+ SYS_CLOCK_NANOSLEEP = 262
+ SYS_STATFS64 = 265
+ SYS_FSTATFS64 = 266
+ SYS_REMAP_FILE_PAGES = 267
+ SYS_MBIND = 268
+ SYS_GET_MEMPOLICY = 269
+ SYS_SET_MEMPOLICY = 270
+ SYS_MQ_OPEN = 271
+ SYS_MQ_UNLINK = 272
+ SYS_MQ_TIMEDSEND = 273
+ SYS_MQ_TIMEDRECEIVE = 274
+ SYS_MQ_NOTIFY = 275
+ SYS_MQ_GETSETATTR = 276
+ SYS_KEXEC_LOAD = 277
+ SYS_ADD_KEY = 278
+ SYS_REQUEST_KEY = 279
+ SYS_KEYCTL = 280
+ SYS_WAITID = 281
+ SYS_IOPRIO_SET = 282
+ SYS_IOPRIO_GET = 283
+ SYS_INOTIFY_INIT = 284
+ SYS_INOTIFY_ADD_WATCH = 285
+ SYS_INOTIFY_RM_WATCH = 286
+ SYS_MIGRATE_PAGES = 287
+ SYS_OPENAT = 288
+ SYS_MKDIRAT = 289
+ SYS_MKNODAT = 290
+ SYS_FCHOWNAT = 291
+ SYS_FUTIMESAT = 292
+ SYS_NEWFSTATAT = 293
+ SYS_UNLINKAT = 294
+ SYS_RENAMEAT = 295
+ SYS_LINKAT = 296
+ SYS_SYMLINKAT = 297
+ SYS_READLINKAT = 298
+ SYS_FCHMODAT = 299
+ SYS_FACCESSAT = 300
+ SYS_PSELECT6 = 301
+ SYS_PPOLL = 302
+ SYS_UNSHARE = 303
+ SYS_SET_ROBUST_LIST = 304
+ SYS_GET_ROBUST_LIST = 305
+ SYS_SPLICE = 306
+ SYS_SYNC_FILE_RANGE = 307
+ SYS_TEE = 308
+ SYS_VMSPLICE = 309
+ SYS_MOVE_PAGES = 310
+ SYS_GETCPU = 311
+ SYS_EPOLL_PWAIT = 312
+ SYS_UTIMES = 313
+ SYS_FALLOCATE = 314
+ SYS_UTIMENSAT = 315
+ SYS_SIGNALFD = 316
+ SYS_TIMERFD = 317
+ SYS_EVENTFD = 318
+ SYS_TIMERFD_CREATE = 319
+ SYS_TIMERFD_SETTIME = 320
+ SYS_TIMERFD_GETTIME = 321
+ SYS_SIGNALFD4 = 322
+ SYS_EVENTFD2 = 323
+ SYS_INOTIFY_INIT1 = 324
+ SYS_PIPE2 = 325
+ SYS_DUP3 = 326
+ SYS_EPOLL_CREATE1 = 327
+ SYS_PREADV = 328
+ SYS_PWRITEV = 329
+ SYS_RT_TGSIGQUEUEINFO = 330
+ SYS_PERF_EVENT_OPEN = 331
+ SYS_FANOTIFY_INIT = 332
+ SYS_FANOTIFY_MARK = 333
+ SYS_PRLIMIT64 = 334
+ SYS_NAME_TO_HANDLE_AT = 335
+ SYS_OPEN_BY_HANDLE_AT = 336
+ SYS_CLOCK_ADJTIME = 337
+ SYS_SYNCFS = 338
+ SYS_SETNS = 339
+ SYS_PROCESS_VM_READV = 340
+ SYS_PROCESS_VM_WRITEV = 341
+ SYS_S390_RUNTIME_INSTR = 342
+ SYS_KCMP = 343
+ SYS_FINIT_MODULE = 344
+ SYS_SCHED_SETATTR = 345
+ SYS_SCHED_GETATTR = 346
+ SYS_RENAMEAT2 = 347
+ SYS_SECCOMP = 348
+ SYS_GETRANDOM = 349
+ SYS_MEMFD_CREATE = 350
+ SYS_BPF = 351
+ SYS_S390_PCI_MMIO_WRITE = 352
+ SYS_S390_PCI_MMIO_READ = 353
+ SYS_EXECVEAT = 354
+ SYS_USERFAULTFD = 355
+ SYS_MEMBARRIER = 356
+ SYS_RECVMMSG = 357
+ SYS_SENDMMSG = 358
+ SYS_SOCKET = 359
+ SYS_SOCKETPAIR = 360
+ SYS_BIND = 361
+ SYS_CONNECT = 362
+ SYS_LISTEN = 363
+ SYS_ACCEPT4 = 364
+ SYS_GETSOCKOPT = 365
+ SYS_SETSOCKOPT = 366
+ SYS_GETSOCKNAME = 367
+ SYS_GETPEERNAME = 368
+ SYS_SENDTO = 369
+ SYS_SENDMSG = 370
+ SYS_RECVFROM = 371
+ SYS_RECVMSG = 372
+ SYS_SHUTDOWN = 373
+ SYS_MLOCK2 = 374
+ SYS_COPY_FILE_RANGE = 375
+ SYS_PREADV2 = 376
+ SYS_PWRITEV2 = 377
+ SYS_S390_GUARDED_STORAGE = 378
+ SYS_STATX = 379
+ SYS_S390_STHYI = 380
+ SYS_KEXEC_FILE_LOAD = 381
+ SYS_IO_PGETEVENTS = 382
+ SYS_RSEQ = 383
+ SYS_PKEY_MPROTECT = 384
+ SYS_PKEY_ALLOC = 385
+ SYS_PKEY_FREE = 386
+ SYS_SEMTIMEDOP = 392
+ SYS_SEMGET = 393
+ SYS_SEMCTL = 394
+ SYS_SHMGET = 395
+ SYS_SHMCTL = 396
+ SYS_SHMAT = 397
+ SYS_SHMDT = 398
+ SYS_MSGGET = 399
+ SYS_MSGSND = 400
+ SYS_MSGRCV = 401
+ SYS_MSGCTL = 402
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index dd78abb..0de03a7 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -1,377 +1,390 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build sparc64 && linux
// +build sparc64,linux
package unix
const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECV = 11
- SYS_CHDIR = 12
- SYS_CHOWN = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BRK = 17
- SYS_PERFCTR = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_CAPGET = 21
- SYS_CAPSET = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_VMSPLICE = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_SIGALTSTACK = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_STAT = 38
- SYS_SENDFILE = 39
- SYS_LSTAT = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_UMOUNT2 = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_MEMORY_ORDERING = 52
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_FSTAT = 62
- SYS_FSTAT64 = 63
- SYS_GETPAGESIZE = 64
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_PREAD64 = 67
- SYS_PWRITE64 = 68
- SYS_MMAP = 71
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_VHANGUP = 76
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_SETHOSTNAME = 88
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_ACCEPT = 99
- SYS_GETPRIORITY = 100
- SYS_RT_SIGRETURN = 101
- SYS_RT_SIGACTION = 102
- SYS_RT_SIGPROCMASK = 103
- SYS_RT_SIGPENDING = 104
- SYS_RT_SIGTIMEDWAIT = 105
- SYS_RT_SIGQUEUEINFO = 106
- SYS_RT_SIGSUSPEND = 107
- SYS_SETRESUID = 108
- SYS_GETRESUID = 109
- SYS_SETRESGID = 110
- SYS_GETRESGID = 111
- SYS_RECVMSG = 113
- SYS_SENDMSG = 114
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_GETCWD = 119
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_RECVFROM = 125
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_TRUNCATE = 129
- SYS_FTRUNCATE = 130
- SYS_FLOCK = 131
- SYS_LSTAT64 = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_STAT64 = 139
- SYS_SENDFILE64 = 140
- SYS_GETPEERNAME = 141
- SYS_FUTEX = 142
- SYS_GETTID = 143
- SYS_GETRLIMIT = 144
- SYS_SETRLIMIT = 145
- SYS_PIVOT_ROOT = 146
- SYS_PRCTL = 147
- SYS_PCICONFIG_READ = 148
- SYS_PCICONFIG_WRITE = 149
- SYS_GETSOCKNAME = 150
- SYS_INOTIFY_INIT = 151
- SYS_INOTIFY_ADD_WATCH = 152
- SYS_POLL = 153
- SYS_GETDENTS64 = 154
- SYS_INOTIFY_RM_WATCH = 156
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UMOUNT = 159
- SYS_SCHED_SET_AFFINITY = 160
- SYS_SCHED_GET_AFFINITY = 161
- SYS_GETDOMAINNAME = 162
- SYS_SETDOMAINNAME = 163
- SYS_UTRAP_INSTALL = 164
- SYS_QUOTACTL = 165
- SYS_SET_TID_ADDRESS = 166
- SYS_MOUNT = 167
- SYS_USTAT = 168
- SYS_SETXATTR = 169
- SYS_LSETXATTR = 170
- SYS_FSETXATTR = 171
- SYS_GETXATTR = 172
- SYS_LGETXATTR = 173
- SYS_GETDENTS = 174
- SYS_SETSID = 175
- SYS_FCHDIR = 176
- SYS_FGETXATTR = 177
- SYS_LISTXATTR = 178
- SYS_LLISTXATTR = 179
- SYS_FLISTXATTR = 180
- SYS_REMOVEXATTR = 181
- SYS_LREMOVEXATTR = 182
- SYS_SIGPENDING = 183
- SYS_QUERY_MODULE = 184
- SYS_SETPGID = 185
- SYS_FREMOVEXATTR = 186
- SYS_TKILL = 187
- SYS_EXIT_GROUP = 188
- SYS_UNAME = 189
- SYS_INIT_MODULE = 190
- SYS_PERSONALITY = 191
- SYS_REMAP_FILE_PAGES = 192
- SYS_EPOLL_CREATE = 193
- SYS_EPOLL_CTL = 194
- SYS_EPOLL_WAIT = 195
- SYS_IOPRIO_SET = 196
- SYS_GETPPID = 197
- SYS_SIGACTION = 198
- SYS_SGETMASK = 199
- SYS_SSETMASK = 200
- SYS_SIGSUSPEND = 201
- SYS_OLDLSTAT = 202
- SYS_USELIB = 203
- SYS_READDIR = 204
- SYS_READAHEAD = 205
- SYS_SOCKETCALL = 206
- SYS_SYSLOG = 207
- SYS_LOOKUP_DCOOKIE = 208
- SYS_FADVISE64 = 209
- SYS_FADVISE64_64 = 210
- SYS_TGKILL = 211
- SYS_WAITPID = 212
- SYS_SWAPOFF = 213
- SYS_SYSINFO = 214
- SYS_IPC = 215
- SYS_SIGRETURN = 216
- SYS_CLONE = 217
- SYS_IOPRIO_GET = 218
- SYS_ADJTIMEX = 219
- SYS_SIGPROCMASK = 220
- SYS_CREATE_MODULE = 221
- SYS_DELETE_MODULE = 222
- SYS_GET_KERNEL_SYMS = 223
- SYS_GETPGID = 224
- SYS_BDFLUSH = 225
- SYS_SYSFS = 226
- SYS_AFS_SYSCALL = 227
- SYS_SETFSUID = 228
- SYS_SETFSGID = 229
- SYS__NEWSELECT = 230
- SYS_SPLICE = 232
- SYS_STIME = 233
- SYS_STATFS64 = 234
- SYS_FSTATFS64 = 235
- SYS__LLSEEK = 236
- SYS_MLOCK = 237
- SYS_MUNLOCK = 238
- SYS_MLOCKALL = 239
- SYS_MUNLOCKALL = 240
- SYS_SCHED_SETPARAM = 241
- SYS_SCHED_GETPARAM = 242
- SYS_SCHED_SETSCHEDULER = 243
- SYS_SCHED_GETSCHEDULER = 244
- SYS_SCHED_YIELD = 245
- SYS_SCHED_GET_PRIORITY_MAX = 246
- SYS_SCHED_GET_PRIORITY_MIN = 247
- SYS_SCHED_RR_GET_INTERVAL = 248
- SYS_NANOSLEEP = 249
- SYS_MREMAP = 250
- SYS__SYSCTL = 251
- SYS_GETSID = 252
- SYS_FDATASYNC = 253
- SYS_NFSSERVCTL = 254
- SYS_SYNC_FILE_RANGE = 255
- SYS_CLOCK_SETTIME = 256
- SYS_CLOCK_GETTIME = 257
- SYS_CLOCK_GETRES = 258
- SYS_CLOCK_NANOSLEEP = 259
- SYS_SCHED_GETAFFINITY = 260
- SYS_SCHED_SETAFFINITY = 261
- SYS_TIMER_SETTIME = 262
- SYS_TIMER_GETTIME = 263
- SYS_TIMER_GETOVERRUN = 264
- SYS_TIMER_DELETE = 265
- SYS_TIMER_CREATE = 266
- SYS_VSERVER = 267
- SYS_IO_SETUP = 268
- SYS_IO_DESTROY = 269
- SYS_IO_SUBMIT = 270
- SYS_IO_CANCEL = 271
- SYS_IO_GETEVENTS = 272
- SYS_MQ_OPEN = 273
- SYS_MQ_UNLINK = 274
- SYS_MQ_TIMEDSEND = 275
- SYS_MQ_TIMEDRECEIVE = 276
- SYS_MQ_NOTIFY = 277
- SYS_MQ_GETSETATTR = 278
- SYS_WAITID = 279
- SYS_TEE = 280
- SYS_ADD_KEY = 281
- SYS_REQUEST_KEY = 282
- SYS_KEYCTL = 283
- SYS_OPENAT = 284
- SYS_MKDIRAT = 285
- SYS_MKNODAT = 286
- SYS_FCHOWNAT = 287
- SYS_FUTIMESAT = 288
- SYS_FSTATAT64 = 289
- SYS_UNLINKAT = 290
- SYS_RENAMEAT = 291
- SYS_LINKAT = 292
- SYS_SYMLINKAT = 293
- SYS_READLINKAT = 294
- SYS_FCHMODAT = 295
- SYS_FACCESSAT = 296
- SYS_PSELECT6 = 297
- SYS_PPOLL = 298
- SYS_UNSHARE = 299
- SYS_SET_ROBUST_LIST = 300
- SYS_GET_ROBUST_LIST = 301
- SYS_MIGRATE_PAGES = 302
- SYS_MBIND = 303
- SYS_GET_MEMPOLICY = 304
- SYS_SET_MEMPOLICY = 305
- SYS_KEXEC_LOAD = 306
- SYS_MOVE_PAGES = 307
- SYS_GETCPU = 308
- SYS_EPOLL_PWAIT = 309
- SYS_UTIMENSAT = 310
- SYS_SIGNALFD = 311
- SYS_TIMERFD_CREATE = 312
- SYS_EVENTFD = 313
- SYS_FALLOCATE = 314
- SYS_TIMERFD_SETTIME = 315
- SYS_TIMERFD_GETTIME = 316
- SYS_SIGNALFD4 = 317
- SYS_EVENTFD2 = 318
- SYS_EPOLL_CREATE1 = 319
- SYS_DUP3 = 320
- SYS_PIPE2 = 321
- SYS_INOTIFY_INIT1 = 322
- SYS_ACCEPT4 = 323
- SYS_PREADV = 324
- SYS_PWRITEV = 325
- SYS_RT_TGSIGQUEUEINFO = 326
- SYS_PERF_EVENT_OPEN = 327
- SYS_RECVMMSG = 328
- SYS_FANOTIFY_INIT = 329
- SYS_FANOTIFY_MARK = 330
- SYS_PRLIMIT64 = 331
- SYS_NAME_TO_HANDLE_AT = 332
- SYS_OPEN_BY_HANDLE_AT = 333
- SYS_CLOCK_ADJTIME = 334
- SYS_SYNCFS = 335
- SYS_SENDMMSG = 336
- SYS_SETNS = 337
- SYS_PROCESS_VM_READV = 338
- SYS_PROCESS_VM_WRITEV = 339
- SYS_KERN_FEATURES = 340
- SYS_KCMP = 341
- SYS_FINIT_MODULE = 342
- SYS_SCHED_SETATTR = 343
- SYS_SCHED_GETATTR = 344
- SYS_RENAMEAT2 = 345
- SYS_SECCOMP = 346
- SYS_GETRANDOM = 347
- SYS_MEMFD_CREATE = 348
- SYS_BPF = 349
- SYS_EXECVEAT = 350
- SYS_MEMBARRIER = 351
- SYS_USERFAULTFD = 352
- SYS_BIND = 353
- SYS_LISTEN = 354
- SYS_SETSOCKOPT = 355
- SYS_MLOCK2 = 356
- SYS_COPY_FILE_RANGE = 357
- SYS_PREADV2 = 358
- SYS_PWRITEV2 = 359
- SYS_STATX = 360
- SYS_IO_PGETEVENTS = 361
- SYS_PKEY_MPROTECT = 362
- SYS_PKEY_ALLOC = 363
- SYS_PKEY_FREE = 364
- SYS_RSEQ = 365
- SYS_SEMTIMEDOP = 392
- SYS_SEMGET = 393
- SYS_SEMCTL = 394
- SYS_SHMGET = 395
- SYS_SHMCTL = 396
- SYS_SHMAT = 397
- SYS_SHMDT = 398
- SYS_MSGGET = 399
- SYS_MSGSND = 400
- SYS_MSGRCV = 401
- SYS_MSGCTL = 402
- SYS_PIDFD_SEND_SIGNAL = 424
- SYS_IO_URING_SETUP = 425
- SYS_IO_URING_ENTER = 426
- SYS_IO_URING_REGISTER = 427
- SYS_OPEN_TREE = 428
- SYS_MOVE_MOUNT = 429
- SYS_FSOPEN = 430
- SYS_FSCONFIG = 431
- SYS_FSMOUNT = 432
- SYS_FSPICK = 433
- SYS_PIDFD_OPEN = 434
+ SYS_RESTART_SYSCALL = 0
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_WAIT4 = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECV = 11
+ SYS_CHDIR = 12
+ SYS_CHOWN = 13
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LCHOWN = 16
+ SYS_BRK = 17
+ SYS_PERFCTR = 18
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_CAPGET = 21
+ SYS_CAPSET = 22
+ SYS_SETUID = 23
+ SYS_GETUID = 24
+ SYS_VMSPLICE = 25
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_SIGALTSTACK = 28
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_STAT = 38
+ SYS_SENDFILE = 39
+ SYS_LSTAT = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_UMOUNT2 = 45
+ SYS_SETGID = 46
+ SYS_GETGID = 47
+ SYS_SIGNAL = 48
+ SYS_GETEUID = 49
+ SYS_GETEGID = 50
+ SYS_ACCT = 51
+ SYS_MEMORY_ORDERING = 52
+ SYS_IOCTL = 54
+ SYS_REBOOT = 55
+ SYS_SYMLINK = 57
+ SYS_READLINK = 58
+ SYS_EXECVE = 59
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_FSTAT = 62
+ SYS_FSTAT64 = 63
+ SYS_GETPAGESIZE = 64
+ SYS_MSYNC = 65
+ SYS_VFORK = 66
+ SYS_PREAD64 = 67
+ SYS_PWRITE64 = 68
+ SYS_MMAP = 71
+ SYS_MUNMAP = 73
+ SYS_MPROTECT = 74
+ SYS_MADVISE = 75
+ SYS_VHANGUP = 76
+ SYS_MINCORE = 78
+ SYS_GETGROUPS = 79
+ SYS_SETGROUPS = 80
+ SYS_GETPGRP = 81
+ SYS_SETITIMER = 83
+ SYS_SWAPON = 85
+ SYS_GETITIMER = 86
+ SYS_SETHOSTNAME = 88
+ SYS_DUP2 = 90
+ SYS_FCNTL = 92
+ SYS_SELECT = 93
+ SYS_FSYNC = 95
+ SYS_SETPRIORITY = 96
+ SYS_SOCKET = 97
+ SYS_CONNECT = 98
+ SYS_ACCEPT = 99
+ SYS_GETPRIORITY = 100
+ SYS_RT_SIGRETURN = 101
+ SYS_RT_SIGACTION = 102
+ SYS_RT_SIGPROCMASK = 103
+ SYS_RT_SIGPENDING = 104
+ SYS_RT_SIGTIMEDWAIT = 105
+ SYS_RT_SIGQUEUEINFO = 106
+ SYS_RT_SIGSUSPEND = 107
+ SYS_SETRESUID = 108
+ SYS_GETRESUID = 109
+ SYS_SETRESGID = 110
+ SYS_GETRESGID = 111
+ SYS_RECVMSG = 113
+ SYS_SENDMSG = 114
+ SYS_GETTIMEOFDAY = 116
+ SYS_GETRUSAGE = 117
+ SYS_GETSOCKOPT = 118
+ SYS_GETCWD = 119
+ SYS_READV = 120
+ SYS_WRITEV = 121
+ SYS_SETTIMEOFDAY = 122
+ SYS_FCHOWN = 123
+ SYS_FCHMOD = 124
+ SYS_RECVFROM = 125
+ SYS_SETREUID = 126
+ SYS_SETREGID = 127
+ SYS_RENAME = 128
+ SYS_TRUNCATE = 129
+ SYS_FTRUNCATE = 130
+ SYS_FLOCK = 131
+ SYS_LSTAT64 = 132
+ SYS_SENDTO = 133
+ SYS_SHUTDOWN = 134
+ SYS_SOCKETPAIR = 135
+ SYS_MKDIR = 136
+ SYS_RMDIR = 137
+ SYS_UTIMES = 138
+ SYS_STAT64 = 139
+ SYS_SENDFILE64 = 140
+ SYS_GETPEERNAME = 141
+ SYS_FUTEX = 142
+ SYS_GETTID = 143
+ SYS_GETRLIMIT = 144
+ SYS_SETRLIMIT = 145
+ SYS_PIVOT_ROOT = 146
+ SYS_PRCTL = 147
+ SYS_PCICONFIG_READ = 148
+ SYS_PCICONFIG_WRITE = 149
+ SYS_GETSOCKNAME = 150
+ SYS_INOTIFY_INIT = 151
+ SYS_INOTIFY_ADD_WATCH = 152
+ SYS_POLL = 153
+ SYS_GETDENTS64 = 154
+ SYS_INOTIFY_RM_WATCH = 156
+ SYS_STATFS = 157
+ SYS_FSTATFS = 158
+ SYS_UMOUNT = 159
+ SYS_SCHED_SET_AFFINITY = 160
+ SYS_SCHED_GET_AFFINITY = 161
+ SYS_GETDOMAINNAME = 162
+ SYS_SETDOMAINNAME = 163
+ SYS_UTRAP_INSTALL = 164
+ SYS_QUOTACTL = 165
+ SYS_SET_TID_ADDRESS = 166
+ SYS_MOUNT = 167
+ SYS_USTAT = 168
+ SYS_SETXATTR = 169
+ SYS_LSETXATTR = 170
+ SYS_FSETXATTR = 171
+ SYS_GETXATTR = 172
+ SYS_LGETXATTR = 173
+ SYS_GETDENTS = 174
+ SYS_SETSID = 175
+ SYS_FCHDIR = 176
+ SYS_FGETXATTR = 177
+ SYS_LISTXATTR = 178
+ SYS_LLISTXATTR = 179
+ SYS_FLISTXATTR = 180
+ SYS_REMOVEXATTR = 181
+ SYS_LREMOVEXATTR = 182
+ SYS_SIGPENDING = 183
+ SYS_QUERY_MODULE = 184
+ SYS_SETPGID = 185
+ SYS_FREMOVEXATTR = 186
+ SYS_TKILL = 187
+ SYS_EXIT_GROUP = 188
+ SYS_UNAME = 189
+ SYS_INIT_MODULE = 190
+ SYS_PERSONALITY = 191
+ SYS_REMAP_FILE_PAGES = 192
+ SYS_EPOLL_CREATE = 193
+ SYS_EPOLL_CTL = 194
+ SYS_EPOLL_WAIT = 195
+ SYS_IOPRIO_SET = 196
+ SYS_GETPPID = 197
+ SYS_SIGACTION = 198
+ SYS_SGETMASK = 199
+ SYS_SSETMASK = 200
+ SYS_SIGSUSPEND = 201
+ SYS_OLDLSTAT = 202
+ SYS_USELIB = 203
+ SYS_READDIR = 204
+ SYS_READAHEAD = 205
+ SYS_SOCKETCALL = 206
+ SYS_SYSLOG = 207
+ SYS_LOOKUP_DCOOKIE = 208
+ SYS_FADVISE64 = 209
+ SYS_FADVISE64_64 = 210
+ SYS_TGKILL = 211
+ SYS_WAITPID = 212
+ SYS_SWAPOFF = 213
+ SYS_SYSINFO = 214
+ SYS_IPC = 215
+ SYS_SIGRETURN = 216
+ SYS_CLONE = 217
+ SYS_IOPRIO_GET = 218
+ SYS_ADJTIMEX = 219
+ SYS_SIGPROCMASK = 220
+ SYS_CREATE_MODULE = 221
+ SYS_DELETE_MODULE = 222
+ SYS_GET_KERNEL_SYMS = 223
+ SYS_GETPGID = 224
+ SYS_BDFLUSH = 225
+ SYS_SYSFS = 226
+ SYS_AFS_SYSCALL = 227
+ SYS_SETFSUID = 228
+ SYS_SETFSGID = 229
+ SYS__NEWSELECT = 230
+ SYS_SPLICE = 232
+ SYS_STIME = 233
+ SYS_STATFS64 = 234
+ SYS_FSTATFS64 = 235
+ SYS__LLSEEK = 236
+ SYS_MLOCK = 237
+ SYS_MUNLOCK = 238
+ SYS_MLOCKALL = 239
+ SYS_MUNLOCKALL = 240
+ SYS_SCHED_SETPARAM = 241
+ SYS_SCHED_GETPARAM = 242
+ SYS_SCHED_SETSCHEDULER = 243
+ SYS_SCHED_GETSCHEDULER = 244
+ SYS_SCHED_YIELD = 245
+ SYS_SCHED_GET_PRIORITY_MAX = 246
+ SYS_SCHED_GET_PRIORITY_MIN = 247
+ SYS_SCHED_RR_GET_INTERVAL = 248
+ SYS_NANOSLEEP = 249
+ SYS_MREMAP = 250
+ SYS__SYSCTL = 251
+ SYS_GETSID = 252
+ SYS_FDATASYNC = 253
+ SYS_NFSSERVCTL = 254
+ SYS_SYNC_FILE_RANGE = 255
+ SYS_CLOCK_SETTIME = 256
+ SYS_CLOCK_GETTIME = 257
+ SYS_CLOCK_GETRES = 258
+ SYS_CLOCK_NANOSLEEP = 259
+ SYS_SCHED_GETAFFINITY = 260
+ SYS_SCHED_SETAFFINITY = 261
+ SYS_TIMER_SETTIME = 262
+ SYS_TIMER_GETTIME = 263
+ SYS_TIMER_GETOVERRUN = 264
+ SYS_TIMER_DELETE = 265
+ SYS_TIMER_CREATE = 266
+ SYS_VSERVER = 267
+ SYS_IO_SETUP = 268
+ SYS_IO_DESTROY = 269
+ SYS_IO_SUBMIT = 270
+ SYS_IO_CANCEL = 271
+ SYS_IO_GETEVENTS = 272
+ SYS_MQ_OPEN = 273
+ SYS_MQ_UNLINK = 274
+ SYS_MQ_TIMEDSEND = 275
+ SYS_MQ_TIMEDRECEIVE = 276
+ SYS_MQ_NOTIFY = 277
+ SYS_MQ_GETSETATTR = 278
+ SYS_WAITID = 279
+ SYS_TEE = 280
+ SYS_ADD_KEY = 281
+ SYS_REQUEST_KEY = 282
+ SYS_KEYCTL = 283
+ SYS_OPENAT = 284
+ SYS_MKDIRAT = 285
+ SYS_MKNODAT = 286
+ SYS_FCHOWNAT = 287
+ SYS_FUTIMESAT = 288
+ SYS_FSTATAT64 = 289
+ SYS_UNLINKAT = 290
+ SYS_RENAMEAT = 291
+ SYS_LINKAT = 292
+ SYS_SYMLINKAT = 293
+ SYS_READLINKAT = 294
+ SYS_FCHMODAT = 295
+ SYS_FACCESSAT = 296
+ SYS_PSELECT6 = 297
+ SYS_PPOLL = 298
+ SYS_UNSHARE = 299
+ SYS_SET_ROBUST_LIST = 300
+ SYS_GET_ROBUST_LIST = 301
+ SYS_MIGRATE_PAGES = 302
+ SYS_MBIND = 303
+ SYS_GET_MEMPOLICY = 304
+ SYS_SET_MEMPOLICY = 305
+ SYS_KEXEC_LOAD = 306
+ SYS_MOVE_PAGES = 307
+ SYS_GETCPU = 308
+ SYS_EPOLL_PWAIT = 309
+ SYS_UTIMENSAT = 310
+ SYS_SIGNALFD = 311
+ SYS_TIMERFD_CREATE = 312
+ SYS_EVENTFD = 313
+ SYS_FALLOCATE = 314
+ SYS_TIMERFD_SETTIME = 315
+ SYS_TIMERFD_GETTIME = 316
+ SYS_SIGNALFD4 = 317
+ SYS_EVENTFD2 = 318
+ SYS_EPOLL_CREATE1 = 319
+ SYS_DUP3 = 320
+ SYS_PIPE2 = 321
+ SYS_INOTIFY_INIT1 = 322
+ SYS_ACCEPT4 = 323
+ SYS_PREADV = 324
+ SYS_PWRITEV = 325
+ SYS_RT_TGSIGQUEUEINFO = 326
+ SYS_PERF_EVENT_OPEN = 327
+ SYS_RECVMMSG = 328
+ SYS_FANOTIFY_INIT = 329
+ SYS_FANOTIFY_MARK = 330
+ SYS_PRLIMIT64 = 331
+ SYS_NAME_TO_HANDLE_AT = 332
+ SYS_OPEN_BY_HANDLE_AT = 333
+ SYS_CLOCK_ADJTIME = 334
+ SYS_SYNCFS = 335
+ SYS_SENDMMSG = 336
+ SYS_SETNS = 337
+ SYS_PROCESS_VM_READV = 338
+ SYS_PROCESS_VM_WRITEV = 339
+ SYS_KERN_FEATURES = 340
+ SYS_KCMP = 341
+ SYS_FINIT_MODULE = 342
+ SYS_SCHED_SETATTR = 343
+ SYS_SCHED_GETATTR = 344
+ SYS_RENAMEAT2 = 345
+ SYS_SECCOMP = 346
+ SYS_GETRANDOM = 347
+ SYS_MEMFD_CREATE = 348
+ SYS_BPF = 349
+ SYS_EXECVEAT = 350
+ SYS_MEMBARRIER = 351
+ SYS_USERFAULTFD = 352
+ SYS_BIND = 353
+ SYS_LISTEN = 354
+ SYS_SETSOCKOPT = 355
+ SYS_MLOCK2 = 356
+ SYS_COPY_FILE_RANGE = 357
+ SYS_PREADV2 = 358
+ SYS_PWRITEV2 = 359
+ SYS_STATX = 360
+ SYS_IO_PGETEVENTS = 361
+ SYS_PKEY_MPROTECT = 362
+ SYS_PKEY_ALLOC = 363
+ SYS_PKEY_FREE = 364
+ SYS_RSEQ = 365
+ SYS_SEMTIMEDOP = 392
+ SYS_SEMGET = 393
+ SYS_SEMCTL = 394
+ SYS_SHMGET = 395
+ SYS_SHMCTL = 396
+ SYS_SHMAT = 397
+ SYS_SHMDT = 398
+ SYS_MSGGET = 399
+ SYS_MSGSND = 400
+ SYS_MSGRCV = 401
+ SYS_MSGCTL = 402
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
index e66a8c9..3a6699e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && netbsd
// +build 386,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
index 42c788f..5677cd4 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && netbsd
// +build amd64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
index 0a07571..e784cb6 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && netbsd
// +build arm,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
index 0291c09..bd4952e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; DO NOT EDIT.
+//go:build arm64 && netbsd
// +build arm64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
index b0207d1..817edbf 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
index f0dec6f..ea45361 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
index 33d1dc5..467971e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
index fe2b689..32eec5e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
new file mode 100644
index 0000000..a37f773
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
@@ -0,0 +1,221 @@
+// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+package unix
+
+const (
+ SYS_EXIT = 1 // { void sys_exit(int rval); }
+ SYS_FORK = 2 // { int sys_fork(void); }
+ SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
+ SYS_CLOSE = 6 // { int sys_close(int fd); }
+ SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
+ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
+ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
+ SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
+ SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
+ SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
+ SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
+ SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
+ SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
+ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
+ SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
+ SYS_GETPID = 20 // { pid_t sys_getpid(void); }
+ SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
+ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
+ SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t sys_getuid(void); }
+ SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
+ SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
+ SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
+ SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
+ SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
+ SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
+ SYS_SYNC = 36 // { void sys_sync(void); }
+ SYS_MSYSCALL = 37 // { int sys_msyscall(void *addr, size_t len); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
+ SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
+ SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
+ SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
+ SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
+ SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
+ SYS_GETGID = 47 // { gid_t sys_getgid(void); }
+ SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
+ SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
+ SYS_ACCT = 51 // { int sys_acct(const char *path); }
+ SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
+ SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
+ SYS_REBOOT = 55 // { int sys_reboot(int opt); }
+ SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
+ SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
+ SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
+ SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
+ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
+ SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
+ SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
+ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
+ SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
+ SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
+ SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
+ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
+ SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
+ SYS_FSYNC = 95 // { int sys_fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
+ SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
+ SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
+ SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
+ SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
+ SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
+ SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
+ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
+ SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
+ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
+ SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
+ SYS___REALPATH = 115 // { int sys___realpath(const char *pathname, char *resolved); }
+ SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
+ SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
+ SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
+ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
+ SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
+ SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
+ SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
+ SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
+ SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
+ SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
+ SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
+ SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
+ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
+ SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
+ SYS_SETSID = 147 // { int sys_setsid(void); }
+ SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
+ SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
+ SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
+ SYS___TMPFD = 164 // { int sys___tmpfd(int flags); }
+ SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
+ SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
+ SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
+ SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
+ SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
+ SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
+ SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
+ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
+ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
+ SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
+ SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
+ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
+ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
+ SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
+ SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
+ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
+ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
+ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
+ SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
+ SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
+ SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
+ SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
+ SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
+ SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
+ SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_KQUEUE = 269 // { int sys_kqueue(void); }
+ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
+ SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
+ SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+ SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+ SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+ SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+ SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
+ SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
+ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
+ SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
+ SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
+ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
+ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
+ SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
+ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
+ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
+ SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
+ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
+ SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
+ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
+ SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
+ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
+ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
+ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
+ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
+ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
+ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
+ SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
+ SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
+ SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
+ SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
+ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
+ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
+ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
+ SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
+)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
new file mode 100644
index 0000000..073daad
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
@@ -0,0 +1,2670 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+package unix
+
+// TODO: auto-generate.
+
+const (
+ SYS_ACOSD128 = 0xB80
+ SYS_ACOSD32 = 0xB7E
+ SYS_ACOSD64 = 0xB7F
+ SYS_ACOSHD128 = 0xB83
+ SYS_ACOSHD32 = 0xB81
+ SYS_ACOSHD64 = 0xB82
+ SYS_AIO_FSYNC = 0xC69
+ SYS_ASCTIME = 0x0AE
+ SYS_ASCTIME64 = 0xCD7
+ SYS_ASCTIME64_R = 0xCD8
+ SYS_ASIND128 = 0xB86
+ SYS_ASIND32 = 0xB84
+ SYS_ASIND64 = 0xB85
+ SYS_ASINHD128 = 0xB89
+ SYS_ASINHD32 = 0xB87
+ SYS_ASINHD64 = 0xB88
+ SYS_ATAN2D128 = 0xB8F
+ SYS_ATAN2D32 = 0xB8D
+ SYS_ATAN2D64 = 0xB8E
+ SYS_ATAND128 = 0xB8C
+ SYS_ATAND32 = 0xB8A
+ SYS_ATAND64 = 0xB8B
+ SYS_ATANHD128 = 0xB92
+ SYS_ATANHD32 = 0xB90
+ SYS_ATANHD64 = 0xB91
+ SYS_BIND2ADDRSEL = 0xD59
+ SYS_C16RTOMB = 0xD40
+ SYS_C32RTOMB = 0xD41
+ SYS_CBRTD128 = 0xB95
+ SYS_CBRTD32 = 0xB93
+ SYS_CBRTD64 = 0xB94
+ SYS_CEILD128 = 0xB98
+ SYS_CEILD32 = 0xB96
+ SYS_CEILD64 = 0xB97
+ SYS_CLEARENV = 0x0C9
+ SYS_CLEARERR_UNLOCKED = 0xCA1
+ SYS_CLOCK = 0x0AA
+ SYS_CLOGL = 0xA00
+ SYS_CLRMEMF = 0x0BD
+ SYS_CONJ = 0xA03
+ SYS_CONJF = 0xA06
+ SYS_CONJL = 0xA09
+ SYS_COPYSIGND128 = 0xB9E
+ SYS_COPYSIGND32 = 0xB9C
+ SYS_COPYSIGND64 = 0xB9D
+ SYS_COSD128 = 0xBA1
+ SYS_COSD32 = 0xB9F
+ SYS_COSD64 = 0xBA0
+ SYS_COSHD128 = 0xBA4
+ SYS_COSHD32 = 0xBA2
+ SYS_COSHD64 = 0xBA3
+ SYS_CPOW = 0xA0C
+ SYS_CPOWF = 0xA0F
+ SYS_CPOWL = 0xA12
+ SYS_CPROJ = 0xA15
+ SYS_CPROJF = 0xA18
+ SYS_CPROJL = 0xA1B
+ SYS_CREAL = 0xA1E
+ SYS_CREALF = 0xA21
+ SYS_CREALL = 0xA24
+ SYS_CSIN = 0xA27
+ SYS_CSINF = 0xA2A
+ SYS_CSINH = 0xA30
+ SYS_CSINHF = 0xA33
+ SYS_CSINHL = 0xA36
+ SYS_CSINL = 0xA2D
+ SYS_CSNAP = 0x0C5
+ SYS_CSQRT = 0xA39
+ SYS_CSQRTF = 0xA3C
+ SYS_CSQRTL = 0xA3F
+ SYS_CTAN = 0xA42
+ SYS_CTANF = 0xA45
+ SYS_CTANH = 0xA4B
+ SYS_CTANHF = 0xA4E
+ SYS_CTANHL = 0xA51
+ SYS_CTANL = 0xA48
+ SYS_CTIME = 0x0AB
+ SYS_CTIME64 = 0xCD9
+ SYS_CTIME64_R = 0xCDA
+ SYS_CTRACE = 0x0C6
+ SYS_DIFFTIME = 0x0A7
+ SYS_DIFFTIME64 = 0xCDB
+ SYS_DLADDR = 0xC82
+ SYS_DYNALLOC = 0x0C3
+ SYS_DYNFREE = 0x0C2
+ SYS_ERFCD128 = 0xBAA
+ SYS_ERFCD32 = 0xBA8
+ SYS_ERFCD64 = 0xBA9
+ SYS_ERFD128 = 0xBA7
+ SYS_ERFD32 = 0xBA5
+ SYS_ERFD64 = 0xBA6
+ SYS_EXP2D128 = 0xBB0
+ SYS_EXP2D32 = 0xBAE
+ SYS_EXP2D64 = 0xBAF
+ SYS_EXPD128 = 0xBAD
+ SYS_EXPD32 = 0xBAB
+ SYS_EXPD64 = 0xBAC
+ SYS_EXPM1D128 = 0xBB3
+ SYS_EXPM1D32 = 0xBB1
+ SYS_EXPM1D64 = 0xBB2
+ SYS_FABSD128 = 0xBB6
+ SYS_FABSD32 = 0xBB4
+ SYS_FABSD64 = 0xBB5
+ SYS_FDELREC_UNLOCKED = 0xCA2
+ SYS_FDIMD128 = 0xBB9
+ SYS_FDIMD32 = 0xBB7
+ SYS_FDIMD64 = 0xBB8
+ SYS_FDOPEN_UNLOCKED = 0xCFC
+ SYS_FECLEAREXCEPT = 0xAEA
+ SYS_FEGETENV = 0xAEB
+ SYS_FEGETEXCEPTFLAG = 0xAEC
+ SYS_FEGETROUND = 0xAED
+ SYS_FEHOLDEXCEPT = 0xAEE
+ SYS_FEOF_UNLOCKED = 0xCA3
+ SYS_FERAISEEXCEPT = 0xAEF
+ SYS_FERROR_UNLOCKED = 0xCA4
+ SYS_FESETENV = 0xAF0
+ SYS_FESETEXCEPTFLAG = 0xAF1
+ SYS_FESETROUND = 0xAF2
+ SYS_FETCHEP = 0x0BF
+ SYS_FETESTEXCEPT = 0xAF3
+ SYS_FEUPDATEENV = 0xAF4
+ SYS_FE_DEC_GETROUND = 0xBBA
+ SYS_FE_DEC_SETROUND = 0xBBB
+ SYS_FFLUSH_UNLOCKED = 0xCA5
+ SYS_FGETC_UNLOCKED = 0xC80
+ SYS_FGETPOS64 = 0xCEE
+ SYS_FGETPOS64_UNLOCKED = 0xCF4
+ SYS_FGETPOS_UNLOCKED = 0xCA6
+ SYS_FGETS_UNLOCKED = 0xC7C
+ SYS_FGETWC_UNLOCKED = 0xCA7
+ SYS_FGETWS_UNLOCKED = 0xCA8
+ SYS_FILENO_UNLOCKED = 0xCA9
+ SYS_FLDATA = 0x0C1
+ SYS_FLDATA_UNLOCKED = 0xCAA
+ SYS_FLOCATE_UNLOCKED = 0xCAB
+ SYS_FLOORD128 = 0xBBE
+ SYS_FLOORD32 = 0xBBC
+ SYS_FLOORD64 = 0xBBD
+ SYS_FMA = 0xA63
+ SYS_FMAD128 = 0xBC1
+ SYS_FMAD32 = 0xBBF
+ SYS_FMAD64 = 0xBC0
+ SYS_FMAF = 0xA66
+ SYS_FMAL = 0xA69
+ SYS_FMAX = 0xA6C
+ SYS_FMAXD128 = 0xBC4
+ SYS_FMAXD32 = 0xBC2
+ SYS_FMAXD64 = 0xBC3
+ SYS_FMAXF = 0xA6F
+ SYS_FMAXL = 0xA72
+ SYS_FMIN = 0xA75
+ SYS_FMIND128 = 0xBC7
+ SYS_FMIND32 = 0xBC5
+ SYS_FMIND64 = 0xBC6
+ SYS_FMINF = 0xA78
+ SYS_FMINL = 0xA7B
+ SYS_FMODD128 = 0xBCA
+ SYS_FMODD32 = 0xBC8
+ SYS_FMODD64 = 0xBC9
+ SYS_FOPEN64 = 0xD49
+ SYS_FOPEN64_UNLOCKED = 0xD4A
+ SYS_FOPEN_UNLOCKED = 0xCFA
+ SYS_FPRINTF_UNLOCKED = 0xCAC
+ SYS_FPUTC_UNLOCKED = 0xC81
+ SYS_FPUTS_UNLOCKED = 0xC7E
+ SYS_FPUTWC_UNLOCKED = 0xCAD
+ SYS_FPUTWS_UNLOCKED = 0xCAE
+ SYS_FREAD_NOUPDATE = 0xCEC
+ SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED
+ SYS_FREAD_UNLOCKED = 0xC7B
+ SYS_FREEIFADDRS = 0xCE6
+ SYS_FREOPEN64 = 0xD4B
+ SYS_FREOPEN64_UNLOCKED = 0xD4C
+ SYS_FREOPEN_UNLOCKED = 0xCFB
+ SYS_FREXPD128 = 0xBCE
+ SYS_FREXPD32 = 0xBCC
+ SYS_FREXPD64 = 0xBCD
+ SYS_FSCANF_UNLOCKED = 0xCAF
+ SYS_FSEEK64 = 0xCEF
+ SYS_FSEEK64_UNLOCKED = 0xCF5
+ SYS_FSEEKO64 = 0xCF0
+ SYS_FSEEKO64_UNLOCKED = 0xCF6
+ SYS_FSEEKO_UNLOCKED = 0xCB1
+ SYS_FSEEK_UNLOCKED = 0xCB0
+ SYS_FSETPOS64 = 0xCF1
+ SYS_FSETPOS64_UNLOCKED = 0xCF7
+ SYS_FSETPOS_UNLOCKED = 0xCB3
+ SYS_FTELL64 = 0xCF2
+ SYS_FTELL64_UNLOCKED = 0xCF8
+ SYS_FTELLO64 = 0xCF3
+ SYS_FTELLO64_UNLOCKED = 0xCF9
+ SYS_FTELLO_UNLOCKED = 0xCB5
+ SYS_FTELL_UNLOCKED = 0xCB4
+ SYS_FUPDATE = 0x0B5
+ SYS_FUPDATE_UNLOCKED = 0xCB7
+ SYS_FWIDE_UNLOCKED = 0xCB8
+ SYS_FWPRINTF_UNLOCKED = 0xCB9
+ SYS_FWRITE_UNLOCKED = 0xC7A
+ SYS_FWSCANF_UNLOCKED = 0xCBA
+ SYS_GETDATE64 = 0xD4F
+ SYS_GETIFADDRS = 0xCE7
+ SYS_GETIPV4SOURCEFILTER = 0xC77
+ SYS_GETSOURCEFILTER = 0xC79
+ SYS_GETSYNTX = 0x0FD
+ SYS_GETS_UNLOCKED = 0xC7D
+ SYS_GETTIMEOFDAY64 = 0xD50
+ SYS_GETWCHAR_UNLOCKED = 0xCBC
+ SYS_GETWC_UNLOCKED = 0xCBB
+ SYS_GMTIME = 0x0B0
+ SYS_GMTIME64 = 0xCDC
+ SYS_GMTIME64_R = 0xCDD
+ SYS_HYPOTD128 = 0xBD1
+ SYS_HYPOTD32 = 0xBCF
+ SYS_HYPOTD64 = 0xBD0
+ SYS_ILOGBD128 = 0xBD4
+ SYS_ILOGBD32 = 0xBD2
+ SYS_ILOGBD64 = 0xBD3
+ SYS_ILOGBF = 0xA7E
+ SYS_ILOGBL = 0xA81
+ SYS_INET6_IS_SRCADDR = 0xD5A
+ SYS_ISBLANK = 0x0FE
+ SYS_ISWALNUM = 0x0FF
+ SYS_LDEXPD128 = 0xBD7
+ SYS_LDEXPD32 = 0xBD5
+ SYS_LDEXPD64 = 0xBD6
+ SYS_LGAMMAD128 = 0xBDA
+ SYS_LGAMMAD32 = 0xBD8
+ SYS_LGAMMAD64 = 0xBD9
+ SYS_LIO_LISTIO = 0xC6A
+ SYS_LLRINT = 0xA84
+ SYS_LLRINTD128 = 0xBDD
+ SYS_LLRINTD32 = 0xBDB
+ SYS_LLRINTD64 = 0xBDC
+ SYS_LLRINTF = 0xA87
+ SYS_LLRINTL = 0xA8A
+ SYS_LLROUND = 0xA8D
+ SYS_LLROUNDD128 = 0xBE0
+ SYS_LLROUNDD32 = 0xBDE
+ SYS_LLROUNDD64 = 0xBDF
+ SYS_LLROUNDF = 0xA90
+ SYS_LLROUNDL = 0xA93
+ SYS_LOCALTIM = 0x0B1
+ SYS_LOCALTIME = 0x0B1
+ SYS_LOCALTIME64 = 0xCDE
+ SYS_LOCALTIME64_R = 0xCDF
+ SYS_LOG10D128 = 0xBE6
+ SYS_LOG10D32 = 0xBE4
+ SYS_LOG10D64 = 0xBE5
+ SYS_LOG1PD128 = 0xBE9
+ SYS_LOG1PD32 = 0xBE7
+ SYS_LOG1PD64 = 0xBE8
+ SYS_LOG2D128 = 0xBEC
+ SYS_LOG2D32 = 0xBEA
+ SYS_LOG2D64 = 0xBEB
+ SYS_LOGBD128 = 0xBEF
+ SYS_LOGBD32 = 0xBED
+ SYS_LOGBD64 = 0xBEE
+ SYS_LOGBF = 0xA96
+ SYS_LOGBL = 0xA99
+ SYS_LOGD128 = 0xBE3
+ SYS_LOGD32 = 0xBE1
+ SYS_LOGD64 = 0xBE2
+ SYS_LRINT = 0xA9C
+ SYS_LRINTD128 = 0xBF2
+ SYS_LRINTD32 = 0xBF0
+ SYS_LRINTD64 = 0xBF1
+ SYS_LRINTF = 0xA9F
+ SYS_LRINTL = 0xAA2
+ SYS_LROUNDD128 = 0xBF5
+ SYS_LROUNDD32 = 0xBF3
+ SYS_LROUNDD64 = 0xBF4
+ SYS_LROUNDL = 0xAA5
+ SYS_MBLEN = 0x0AF
+ SYS_MBRTOC16 = 0xD42
+ SYS_MBRTOC32 = 0xD43
+ SYS_MEMSET = 0x0A3
+ SYS_MKTIME = 0x0AC
+ SYS_MKTIME64 = 0xCE0
+ SYS_MODFD128 = 0xBF8
+ SYS_MODFD32 = 0xBF6
+ SYS_MODFD64 = 0xBF7
+ SYS_NAN = 0xAA8
+ SYS_NAND128 = 0xBFB
+ SYS_NAND32 = 0xBF9
+ SYS_NAND64 = 0xBFA
+ SYS_NANF = 0xAAA
+ SYS_NANL = 0xAAC
+ SYS_NEARBYINT = 0xAAE
+ SYS_NEARBYINTD128 = 0xBFE
+ SYS_NEARBYINTD32 = 0xBFC
+ SYS_NEARBYINTD64 = 0xBFD
+ SYS_NEARBYINTF = 0xAB1
+ SYS_NEARBYINTL = 0xAB4
+ SYS_NEXTAFTERD128 = 0xC01
+ SYS_NEXTAFTERD32 = 0xBFF
+ SYS_NEXTAFTERD64 = 0xC00
+ SYS_NEXTAFTERF = 0xAB7
+ SYS_NEXTAFTERL = 0xABA
+ SYS_NEXTTOWARD = 0xABD
+ SYS_NEXTTOWARDD128 = 0xC04
+ SYS_NEXTTOWARDD32 = 0xC02
+ SYS_NEXTTOWARDD64 = 0xC03
+ SYS_NEXTTOWARDF = 0xAC0
+ SYS_NEXTTOWARDL = 0xAC3
+ SYS_NL_LANGINFO = 0x0FC
+ SYS_PERROR_UNLOCKED = 0xCBD
+ SYS_POSIX_FALLOCATE = 0xCE8
+ SYS_POSIX_MEMALIGN = 0xCE9
+ SYS_POSIX_OPENPT = 0xC66
+ SYS_POWD128 = 0xC07
+ SYS_POWD32 = 0xC05
+ SYS_POWD64 = 0xC06
+ SYS_PRINTF_UNLOCKED = 0xCBE
+ SYS_PSELECT = 0xC67
+ SYS_PTHREAD_ATTR_GETSTACK = 0xB3E
+ SYS_PTHREAD_ATTR_SETSTACK = 0xB3F
+ SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4
+ SYS_PUTS_UNLOCKED = 0xC7F
+ SYS_PUTWCHAR_UNLOCKED = 0xCC0
+ SYS_PUTWC_UNLOCKED = 0xCBF
+ SYS_QUANTEXPD128 = 0xD46
+ SYS_QUANTEXPD32 = 0xD44
+ SYS_QUANTEXPD64 = 0xD45
+ SYS_QUANTIZED128 = 0xC0A
+ SYS_QUANTIZED32 = 0xC08
+ SYS_QUANTIZED64 = 0xC09
+ SYS_REMAINDERD128 = 0xC0D
+ SYS_REMAINDERD32 = 0xC0B
+ SYS_REMAINDERD64 = 0xC0C
+ SYS_RESIZE_ALLOC = 0xCEB
+ SYS_REWIND_UNLOCKED = 0xCC1
+ SYS_RINTD128 = 0xC13
+ SYS_RINTD32 = 0xC11
+ SYS_RINTD64 = 0xC12
+ SYS_RINTF = 0xACB
+ SYS_RINTL = 0xACD
+ SYS_ROUND = 0xACF
+ SYS_ROUNDD128 = 0xC16
+ SYS_ROUNDD32 = 0xC14
+ SYS_ROUNDD64 = 0xC15
+ SYS_ROUNDF = 0xAD2
+ SYS_ROUNDL = 0xAD5
+ SYS_SAMEQUANTUMD128 = 0xC19
+ SYS_SAMEQUANTUMD32 = 0xC17
+ SYS_SAMEQUANTUMD64 = 0xC18
+ SYS_SCALBLN = 0xAD8
+ SYS_SCALBLND128 = 0xC1C
+ SYS_SCALBLND32 = 0xC1A
+ SYS_SCALBLND64 = 0xC1B
+ SYS_SCALBLNF = 0xADB
+ SYS_SCALBLNL = 0xADE
+ SYS_SCALBND128 = 0xC1F
+ SYS_SCALBND32 = 0xC1D
+ SYS_SCALBND64 = 0xC1E
+ SYS_SCALBNF = 0xAE3
+ SYS_SCALBNL = 0xAE6
+ SYS_SCANF_UNLOCKED = 0xCC2
+ SYS_SCHED_YIELD = 0xB32
+ SYS_SETENV = 0x0C8
+ SYS_SETIPV4SOURCEFILTER = 0xC76
+ SYS_SETSOURCEFILTER = 0xC78
+ SYS_SHM_OPEN = 0xC8C
+ SYS_SHM_UNLINK = 0xC8D
+ SYS_SIND128 = 0xC22
+ SYS_SIND32 = 0xC20
+ SYS_SIND64 = 0xC21
+ SYS_SINHD128 = 0xC25
+ SYS_SINHD32 = 0xC23
+ SYS_SINHD64 = 0xC24
+ SYS_SIZEOF_ALLOC = 0xCEA
+ SYS_SOCKATMARK = 0xC68
+ SYS_SQRTD128 = 0xC28
+ SYS_SQRTD32 = 0xC26
+ SYS_SQRTD64 = 0xC27
+ SYS_STRCHR = 0x0A0
+ SYS_STRCSPN = 0x0A1
+ SYS_STRERROR = 0x0A8
+ SYS_STRERROR_R = 0xB33
+ SYS_STRFTIME = 0x0B2
+ SYS_STRLEN = 0x0A9
+ SYS_STRPBRK = 0x0A2
+ SYS_STRSPN = 0x0A4
+ SYS_STRSTR = 0x0A5
+ SYS_STRTOD128 = 0xC2B
+ SYS_STRTOD32 = 0xC29
+ SYS_STRTOD64 = 0xC2A
+ SYS_STRTOK = 0x0A6
+ SYS_TAND128 = 0xC2E
+ SYS_TAND32 = 0xC2C
+ SYS_TAND64 = 0xC2D
+ SYS_TANHD128 = 0xC31
+ SYS_TANHD32 = 0xC2F
+ SYS_TANHD64 = 0xC30
+ SYS_TGAMMAD128 = 0xC34
+ SYS_TGAMMAD32 = 0xC32
+ SYS_TGAMMAD64 = 0xC33
+ SYS_TIME = 0x0AD
+ SYS_TIME64 = 0xCE1
+ SYS_TMPFILE64 = 0xD4D
+ SYS_TMPFILE64_UNLOCKED = 0xD4E
+ SYS_TMPFILE_UNLOCKED = 0xCFD
+ SYS_TRUNCD128 = 0xC40
+ SYS_TRUNCD32 = 0xC3E
+ SYS_TRUNCD64 = 0xC3F
+ SYS_UNGETC_UNLOCKED = 0xCC3
+ SYS_UNGETWC_UNLOCKED = 0xCC4
+ SYS_UNSETENV = 0xB34
+ SYS_VFPRINTF_UNLOCKED = 0xCC5
+ SYS_VFSCANF_UNLOCKED = 0xCC7
+ SYS_VFWPRINTF_UNLOCKED = 0xCC9
+ SYS_VFWSCANF_UNLOCKED = 0xCCB
+ SYS_VPRINTF_UNLOCKED = 0xCCD
+ SYS_VSCANF_UNLOCKED = 0xCCF
+ SYS_VWPRINTF_UNLOCKED = 0xCD1
+ SYS_VWSCANF_UNLOCKED = 0xCD3
+ SYS_WCSTOD128 = 0xC43
+ SYS_WCSTOD32 = 0xC41
+ SYS_WCSTOD64 = 0xC42
+ SYS_WPRINTF_UNLOCKED = 0xCD5
+ SYS_WSCANF_UNLOCKED = 0xCD6
+ SYS__FLUSHLBF = 0xD68
+ SYS__FLUSHLBF_UNLOCKED = 0xD6F
+ SYS___ACOSHF_H = 0xA54
+ SYS___ACOSHL_H = 0xA55
+ SYS___ASINHF_H = 0xA56
+ SYS___ASINHL_H = 0xA57
+ SYS___ATANPID128 = 0xC6D
+ SYS___ATANPID32 = 0xC6B
+ SYS___ATANPID64 = 0xC6C
+ SYS___CBRTF_H = 0xA58
+ SYS___CBRTL_H = 0xA59
+ SYS___CDUMP = 0x0C4
+ SYS___CLASS = 0xAFA
+ SYS___CLASS2 = 0xB99
+ SYS___CLASS2D128 = 0xC99
+ SYS___CLASS2D32 = 0xC97
+ SYS___CLASS2D64 = 0xC98
+ SYS___CLASS2F = 0xC91
+ SYS___CLASS2F_B = 0xC93
+ SYS___CLASS2F_H = 0xC94
+ SYS___CLASS2L = 0xC92
+ SYS___CLASS2L_B = 0xC95
+ SYS___CLASS2L_H = 0xC96
+ SYS___CLASS2_B = 0xB9A
+ SYS___CLASS2_H = 0xB9B
+ SYS___CLASS_B = 0xAFB
+ SYS___CLASS_H = 0xAFC
+ SYS___CLOGL_B = 0xA01
+ SYS___CLOGL_H = 0xA02
+ SYS___CLRENV = 0x0C9
+ SYS___CLRMF = 0x0BD
+ SYS___CODEPAGE_INFO = 0xC64
+ SYS___CONJF_B = 0xA07
+ SYS___CONJF_H = 0xA08
+ SYS___CONJL_B = 0xA0A
+ SYS___CONJL_H = 0xA0B
+ SYS___CONJ_B = 0xA04
+ SYS___CONJ_H = 0xA05
+ SYS___COPYSIGN_B = 0xA5A
+ SYS___COPYSIGN_H = 0xAF5
+ SYS___COSPID128 = 0xC70
+ SYS___COSPID32 = 0xC6E
+ SYS___COSPID64 = 0xC6F
+ SYS___CPOWF_B = 0xA10
+ SYS___CPOWF_H = 0xA11
+ SYS___CPOWL_B = 0xA13
+ SYS___CPOWL_H = 0xA14
+ SYS___CPOW_B = 0xA0D
+ SYS___CPOW_H = 0xA0E
+ SYS___CPROJF_B = 0xA19
+ SYS___CPROJF_H = 0xA1A
+ SYS___CPROJL_B = 0xA1C
+ SYS___CPROJL_H = 0xA1D
+ SYS___CPROJ_B = 0xA16
+ SYS___CPROJ_H = 0xA17
+ SYS___CREALF_B = 0xA22
+ SYS___CREALF_H = 0xA23
+ SYS___CREALL_B = 0xA25
+ SYS___CREALL_H = 0xA26
+ SYS___CREAL_B = 0xA1F
+ SYS___CREAL_H = 0xA20
+ SYS___CSINF_B = 0xA2B
+ SYS___CSINF_H = 0xA2C
+ SYS___CSINHF_B = 0xA34
+ SYS___CSINHF_H = 0xA35
+ SYS___CSINHL_B = 0xA37
+ SYS___CSINHL_H = 0xA38
+ SYS___CSINH_B = 0xA31
+ SYS___CSINH_H = 0xA32
+ SYS___CSINL_B = 0xA2E
+ SYS___CSINL_H = 0xA2F
+ SYS___CSIN_B = 0xA28
+ SYS___CSIN_H = 0xA29
+ SYS___CSNAP = 0x0C5
+ SYS___CSQRTF_B = 0xA3D
+ SYS___CSQRTF_H = 0xA3E
+ SYS___CSQRTL_B = 0xA40
+ SYS___CSQRTL_H = 0xA41
+ SYS___CSQRT_B = 0xA3A
+ SYS___CSQRT_H = 0xA3B
+ SYS___CTANF_B = 0xA46
+ SYS___CTANF_H = 0xA47
+ SYS___CTANHF_B = 0xA4F
+ SYS___CTANHF_H = 0xA50
+ SYS___CTANHL_B = 0xA52
+ SYS___CTANHL_H = 0xA53
+ SYS___CTANH_B = 0xA4C
+ SYS___CTANH_H = 0xA4D
+ SYS___CTANL_B = 0xA49
+ SYS___CTANL_H = 0xA4A
+ SYS___CTAN_B = 0xA43
+ SYS___CTAN_H = 0xA44
+ SYS___CTEST = 0x0C7
+ SYS___CTRACE = 0x0C6
+ SYS___D1TOP = 0xC9B
+ SYS___D2TOP = 0xC9C
+ SYS___D4TOP = 0xC9D
+ SYS___DYNALL = 0x0C3
+ SYS___DYNFRE = 0x0C2
+ SYS___EXP2F_H = 0xA5E
+ SYS___EXP2L_H = 0xA5F
+ SYS___EXP2_H = 0xA5D
+ SYS___EXPM1F_H = 0xA5B
+ SYS___EXPM1L_H = 0xA5C
+ SYS___FBUFSIZE = 0xD60
+ SYS___FLBF = 0xD62
+ SYS___FLDATA = 0x0C1
+ SYS___FMAF_B = 0xA67
+ SYS___FMAF_H = 0xA68
+ SYS___FMAL_B = 0xA6A
+ SYS___FMAL_H = 0xA6B
+ SYS___FMAXF_B = 0xA70
+ SYS___FMAXF_H = 0xA71
+ SYS___FMAXL_B = 0xA73
+ SYS___FMAXL_H = 0xA74
+ SYS___FMAX_B = 0xA6D
+ SYS___FMAX_H = 0xA6E
+ SYS___FMA_B = 0xA64
+ SYS___FMA_H = 0xA65
+ SYS___FMINF_B = 0xA79
+ SYS___FMINF_H = 0xA7A
+ SYS___FMINL_B = 0xA7C
+ SYS___FMINL_H = 0xA7D
+ SYS___FMIN_B = 0xA76
+ SYS___FMIN_H = 0xA77
+ SYS___FPENDING = 0xD61
+ SYS___FPENDING_UNLOCKED = 0xD6C
+ SYS___FPURGE = 0xD69
+ SYS___FPURGE_UNLOCKED = 0xD70
+ SYS___FP_CAST_D = 0xBCB
+ SYS___FREADABLE = 0xD63
+ SYS___FREADAHEAD = 0xD6A
+ SYS___FREADAHEAD_UNLOCKED = 0xD71
+ SYS___FREADING = 0xD65
+ SYS___FREADING_UNLOCKED = 0xD6D
+ SYS___FSEEK2 = 0xB3C
+ SYS___FSETERR = 0xD6B
+ SYS___FSETLOCKING = 0xD67
+ SYS___FTCHEP = 0x0BF
+ SYS___FTELL2 = 0xB3B
+ SYS___FUPDT = 0x0B5
+ SYS___FWRITABLE = 0xD64
+ SYS___FWRITING = 0xD66
+ SYS___FWRITING_UNLOCKED = 0xD6E
+ SYS___GETCB = 0x0B4
+ SYS___GETGRGID1 = 0xD5B
+ SYS___GETGRNAM1 = 0xD5C
+ SYS___GETTHENT = 0xCE5
+ SYS___GETTOD = 0xD3E
+ SYS___HYPOTF_H = 0xAF6
+ SYS___HYPOTL_H = 0xAF7
+ SYS___ILOGBF_B = 0xA7F
+ SYS___ILOGBF_H = 0xA80
+ SYS___ILOGBL_B = 0xA82
+ SYS___ILOGBL_H = 0xA83
+ SYS___ISBLANK_A = 0xB2E
+ SYS___ISBLNK = 0x0FE
+ SYS___ISWBLANK_A = 0xB2F
+ SYS___LE_CEEGTJS = 0xD72
+ SYS___LE_TRACEBACK = 0xB7A
+ SYS___LGAMMAL_H = 0xA62
+ SYS___LGAMMA_B_C99 = 0xB39
+ SYS___LGAMMA_H_C99 = 0xB38
+ SYS___LGAMMA_R_C99 = 0xB3A
+ SYS___LLRINTF_B = 0xA88
+ SYS___LLRINTF_H = 0xA89
+ SYS___LLRINTL_B = 0xA8B
+ SYS___LLRINTL_H = 0xA8C
+ SYS___LLRINT_B = 0xA85
+ SYS___LLRINT_H = 0xA86
+ SYS___LLROUNDF_B = 0xA91
+ SYS___LLROUNDF_H = 0xA92
+ SYS___LLROUNDL_B = 0xA94
+ SYS___LLROUNDL_H = 0xA95
+ SYS___LLROUND_B = 0xA8E
+ SYS___LLROUND_H = 0xA8F
+ SYS___LOCALE_CTL = 0xD47
+ SYS___LOG1PF_H = 0xA60
+ SYS___LOG1PL_H = 0xA61
+ SYS___LOGBF_B = 0xA97
+ SYS___LOGBF_H = 0xA98
+ SYS___LOGBL_B = 0xA9A
+ SYS___LOGBL_H = 0xA9B
+ SYS___LOGIN_APPLID = 0xCE2
+ SYS___LRINTF_B = 0xAA0
+ SYS___LRINTF_H = 0xAA1
+ SYS___LRINTL_B = 0xAA3
+ SYS___LRINTL_H = 0xAA4
+ SYS___LRINT_B = 0xA9D
+ SYS___LRINT_H = 0xA9E
+ SYS___LROUNDF_FIXUP = 0xB31
+ SYS___LROUNDL_B = 0xAA6
+ SYS___LROUNDL_H = 0xAA7
+ SYS___LROUND_FIXUP = 0xB30
+ SYS___MOSERVICES = 0xD3D
+ SYS___MUST_STAY_CLEAN = 0xB7C
+ SYS___NANF_B = 0xAAB
+ SYS___NANL_B = 0xAAD
+ SYS___NAN_B = 0xAA9
+ SYS___NEARBYINTF_B = 0xAB2
+ SYS___NEARBYINTF_H = 0xAB3
+ SYS___NEARBYINTL_B = 0xAB5
+ SYS___NEARBYINTL_H = 0xAB6
+ SYS___NEARBYINT_B = 0xAAF
+ SYS___NEARBYINT_H = 0xAB0
+ SYS___NEXTAFTERF_B = 0xAB8
+ SYS___NEXTAFTERF_H = 0xAB9
+ SYS___NEXTAFTERL_B = 0xABB
+ SYS___NEXTAFTERL_H = 0xABC
+ SYS___NEXTTOWARDF_B = 0xAC1
+ SYS___NEXTTOWARDF_H = 0xAC2
+ SYS___NEXTTOWARDL_B = 0xAC4
+ SYS___NEXTTOWARDL_H = 0xAC5
+ SYS___NEXTTOWARD_B = 0xABE
+ SYS___NEXTTOWARD_H = 0xABF
+ SYS___O_ENV = 0xB7D
+ SYS___PASSWD_APPLID = 0xCE3
+ SYS___PTOD1 = 0xC9E
+ SYS___PTOD2 = 0xC9F
+ SYS___PTOD4 = 0xCA0
+ SYS___REGCOMP_STD = 0x0EA
+ SYS___REMAINDERF_H = 0xAC6
+ SYS___REMAINDERL_H = 0xAC7
+ SYS___REMQUOD128 = 0xC10
+ SYS___REMQUOD32 = 0xC0E
+ SYS___REMQUOD64 = 0xC0F
+ SYS___REMQUOF_H = 0xAC9
+ SYS___REMQUOL_H = 0xACA
+ SYS___REMQUO_H = 0xAC8
+ SYS___RINTF_B = 0xACC
+ SYS___RINTL_B = 0xACE
+ SYS___ROUNDF_B = 0xAD3
+ SYS___ROUNDF_H = 0xAD4
+ SYS___ROUNDL_B = 0xAD6
+ SYS___ROUNDL_H = 0xAD7
+ SYS___ROUND_B = 0xAD0
+ SYS___ROUND_H = 0xAD1
+ SYS___SCALBLNF_B = 0xADC
+ SYS___SCALBLNF_H = 0xADD
+ SYS___SCALBLNL_B = 0xADF
+ SYS___SCALBLNL_H = 0xAE0
+ SYS___SCALBLN_B = 0xAD9
+ SYS___SCALBLN_H = 0xADA
+ SYS___SCALBNF_B = 0xAE4
+ SYS___SCALBNF_H = 0xAE5
+ SYS___SCALBNL_B = 0xAE7
+ SYS___SCALBNL_H = 0xAE8
+ SYS___SCALBN_B = 0xAE1
+ SYS___SCALBN_H = 0xAE2
+ SYS___SETENV = 0x0C8
+ SYS___SINPID128 = 0xC73
+ SYS___SINPID32 = 0xC71
+ SYS___SINPID64 = 0xC72
+ SYS___SMF_RECORD2 = 0xD48
+ SYS___STATIC_REINIT = 0xB3D
+ SYS___TGAMMAF_H_C99 = 0xB79
+ SYS___TGAMMAL_H = 0xAE9
+ SYS___TGAMMA_H_C99 = 0xB78
+ SYS___TOCSNAME2 = 0xC9A
+ SYS_CEIL = 0x01F
+ SYS_CHAUDIT = 0x1E0
+ SYS_EXP = 0x01A
+ SYS_FCHAUDIT = 0x1E1
+ SYS_FREXP = 0x01D
+ SYS_GETGROUPSBYNAME = 0x1E2
+ SYS_GETPWUID = 0x1A0
+ SYS_GETUID = 0x1A1
+ SYS_ISATTY = 0x1A3
+ SYS_KILL = 0x1A4
+ SYS_LDEXP = 0x01E
+ SYS_LINK = 0x1A5
+ SYS_LOG10 = 0x01C
+ SYS_LSEEK = 0x1A6
+ SYS_LSTAT = 0x1A7
+ SYS_MKDIR = 0x1A8
+ SYS_MKFIFO = 0x1A9
+ SYS_MKNOD = 0x1AA
+ SYS_MODF = 0x01B
+ SYS_MOUNT = 0x1AB
+ SYS_OPEN = 0x1AC
+ SYS_OPENDIR = 0x1AD
+ SYS_PATHCONF = 0x1AE
+ SYS_PAUSE = 0x1AF
+ SYS_PIPE = 0x1B0
+ SYS_PTHREAD_ATTR_DESTROY = 0x1E7
+ SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB
+ SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9
+ SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED
+ SYS_PTHREAD_ATTR_INIT = 0x1E6
+ SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA
+ SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8
+ SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC
+ SYS_PTHREAD_CANCEL = 0x1EE
+ SYS_PTHREAD_CLEANUP_POP = 0x1F0
+ SYS_PTHREAD_CLEANUP_PUSH = 0x1EF
+ SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2
+ SYS_PTHREAD_CONDATTR_INIT = 0x1F1
+ SYS_PTHREAD_COND_BROADCAST = 0x1F6
+ SYS_PTHREAD_COND_DESTROY = 0x1F4
+ SYS_PTHREAD_COND_INIT = 0x1F3
+ SYS_PTHREAD_COND_SIGNAL = 0x1F5
+ SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8
+ SYS_PTHREAD_COND_WAIT = 0x1F7
+ SYS_PTHREAD_CREATE = 0x1F9
+ SYS_PTHREAD_DETACH = 0x1FA
+ SYS_PTHREAD_EQUAL = 0x1FB
+ SYS_PTHREAD_EXIT = 0x1E4
+ SYS_PTHREAD_GETSPECIFIC = 0x1FC
+ SYS_PTHREAD_JOIN = 0x1FD
+ SYS_PTHREAD_KEY_CREATE = 0x1FE
+ SYS_PTHREAD_KILL = 0x1E5
+ SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF
+ SYS_READ = 0x1B2
+ SYS_READDIR = 0x1B3
+ SYS_READLINK = 0x1B4
+ SYS_REWINDDIR = 0x1B5
+ SYS_RMDIR = 0x1B6
+ SYS_SETEGID = 0x1B7
+ SYS_SETEUID = 0x1B8
+ SYS_SETGID = 0x1B9
+ SYS_SETPGID = 0x1BA
+ SYS_SETSID = 0x1BB
+ SYS_SETUID = 0x1BC
+ SYS_SIGACTION = 0x1BD
+ SYS_SIGADDSET = 0x1BE
+ SYS_SIGDELSET = 0x1BF
+ SYS_SIGEMPTYSET = 0x1C0
+ SYS_SIGFILLSET = 0x1C1
+ SYS_SIGISMEMBER = 0x1C2
+ SYS_SIGLONGJMP = 0x1C3
+ SYS_SIGPENDING = 0x1C4
+ SYS_SIGPROCMASK = 0x1C5
+ SYS_SIGSETJMP = 0x1C6
+ SYS_SIGSUSPEND = 0x1C7
+ SYS_SIGWAIT = 0x1E3
+ SYS_SLEEP = 0x1C8
+ SYS_STAT = 0x1C9
+ SYS_SYMLINK = 0x1CB
+ SYS_SYSCONF = 0x1CC
+ SYS_TCDRAIN = 0x1CD
+ SYS_TCFLOW = 0x1CE
+ SYS_TCFLUSH = 0x1CF
+ SYS_TCGETATTR = 0x1D0
+ SYS_TCGETPGRP = 0x1D1
+ SYS_TCSENDBREAK = 0x1D2
+ SYS_TCSETATTR = 0x1D3
+ SYS_TCSETPGRP = 0x1D4
+ SYS_TIMES = 0x1D5
+ SYS_TTYNAME = 0x1D6
+ SYS_TZSET = 0x1D7
+ SYS_UMASK = 0x1D8
+ SYS_UMOUNT = 0x1D9
+ SYS_UNAME = 0x1DA
+ SYS_UNLINK = 0x1DB
+ SYS_UTIME = 0x1DC
+ SYS_WAIT = 0x1DD
+ SYS_WAITPID = 0x1DE
+ SYS_WRITE = 0x1DF
+ SYS_W_GETPSENT = 0x1B1
+ SYS_W_IOCTL = 0x1A2
+ SYS_W_STATFS = 0x1CA
+ SYS_A64L = 0x2EF
+ SYS_BCMP = 0x2B9
+ SYS_BCOPY = 0x2BA
+ SYS_BZERO = 0x2BB
+ SYS_CATCLOSE = 0x2B6
+ SYS_CATGETS = 0x2B7
+ SYS_CATOPEN = 0x2B8
+ SYS_CRYPT = 0x2AC
+ SYS_DBM_CLEARERR = 0x2F7
+ SYS_DBM_CLOSE = 0x2F8
+ SYS_DBM_DELETE = 0x2F9
+ SYS_DBM_ERROR = 0x2FA
+ SYS_DBM_FETCH = 0x2FB
+ SYS_DBM_FIRSTKEY = 0x2FC
+ SYS_DBM_NEXTKEY = 0x2FD
+ SYS_DBM_OPEN = 0x2FE
+ SYS_DBM_STORE = 0x2FF
+ SYS_DRAND48 = 0x2B2
+ SYS_ENCRYPT = 0x2AD
+ SYS_ENDUTXENT = 0x2E1
+ SYS_ERAND48 = 0x2B3
+ SYS_ERF = 0x02C
+ SYS_ERFC = 0x02D
+ SYS_FCHDIR = 0x2D9
+ SYS_FFS = 0x2BC
+ SYS_FMTMSG = 0x2E5
+ SYS_FSTATVFS = 0x2B4
+ SYS_FTIME = 0x2F5
+ SYS_GAMMA = 0x02E
+ SYS_GETDATE = 0x2A6
+ SYS_GETPAGESIZE = 0x2D8
+ SYS_GETTIMEOFDAY = 0x2F6
+ SYS_GETUTXENT = 0x2E0
+ SYS_GETUTXID = 0x2E2
+ SYS_GETUTXLINE = 0x2E3
+ SYS_HCREATE = 0x2C6
+ SYS_HDESTROY = 0x2C7
+ SYS_HSEARCH = 0x2C8
+ SYS_HYPOT = 0x02B
+ SYS_INDEX = 0x2BD
+ SYS_INITSTATE = 0x2C2
+ SYS_INSQUE = 0x2CF
+ SYS_ISASCII = 0x2ED
+ SYS_JRAND48 = 0x2E6
+ SYS_L64A = 0x2F0
+ SYS_LCONG48 = 0x2EA
+ SYS_LFIND = 0x2C9
+ SYS_LRAND48 = 0x2E7
+ SYS_LSEARCH = 0x2CA
+ SYS_MEMCCPY = 0x2D4
+ SYS_MRAND48 = 0x2E8
+ SYS_NRAND48 = 0x2E9
+ SYS_PCLOSE = 0x2D2
+ SYS_POPEN = 0x2D1
+ SYS_PUTUTXLINE = 0x2E4
+ SYS_RANDOM = 0x2C4
+ SYS_REMQUE = 0x2D0
+ SYS_RINDEX = 0x2BE
+ SYS_SEED48 = 0x2EC
+ SYS_SETKEY = 0x2AE
+ SYS_SETSTATE = 0x2C3
+ SYS_SETUTXENT = 0x2DF
+ SYS_SRAND48 = 0x2EB
+ SYS_SRANDOM = 0x2C5
+ SYS_STATVFS = 0x2B5
+ SYS_STRCASECMP = 0x2BF
+ SYS_STRDUP = 0x2C0
+ SYS_STRNCASECMP = 0x2C1
+ SYS_SWAB = 0x2D3
+ SYS_TDELETE = 0x2CB
+ SYS_TFIND = 0x2CC
+ SYS_TOASCII = 0x2EE
+ SYS_TSEARCH = 0x2CD
+ SYS_TWALK = 0x2CE
+ SYS_UALARM = 0x2F1
+ SYS_USLEEP = 0x2F2
+ SYS_WAIT3 = 0x2A7
+ SYS_WAITID = 0x2A8
+ SYS_Y1 = 0x02A
+ SYS___ATOE = 0x2DB
+ SYS___ATOE_L = 0x2DC
+ SYS___CATTRM = 0x2A9
+ SYS___CNVBLK = 0x2AF
+ SYS___CRYTRM = 0x2B0
+ SYS___DLGHT = 0x2A1
+ SYS___ECRTRM = 0x2B1
+ SYS___ETOA = 0x2DD
+ SYS___ETOA_L = 0x2DE
+ SYS___GDTRM = 0x2AA
+ SYS___OCLCK = 0x2DA
+ SYS___OPARGF = 0x2A2
+ SYS___OPERRF = 0x2A5
+ SYS___OPINDF = 0x2A4
+ SYS___OPOPTF = 0x2A3
+ SYS___RNDTRM = 0x2AB
+ SYS___SRCTRM = 0x2F4
+ SYS___TZONE = 0x2A0
+ SYS___UTXTRM = 0x2F3
+ SYS_ASIN = 0x03E
+ SYS_ISXDIGIT = 0x03B
+ SYS_SETLOCAL = 0x03A
+ SYS_SETLOCALE = 0x03A
+ SYS_SIN = 0x03F
+ SYS_TOLOWER = 0x03C
+ SYS_TOUPPER = 0x03D
+ SYS_ACCEPT_AND_RECV = 0x4F7
+ SYS_ATOL = 0x04E
+ SYS_CHECKSCH = 0x4BC
+ SYS_CHECKSCHENV = 0x4BC
+ SYS_CLEARERR = 0x04C
+ SYS_CONNECTS = 0x4B5
+ SYS_CONNECTSERVER = 0x4B5
+ SYS_CONNECTW = 0x4B4
+ SYS_CONNECTWORKMGR = 0x4B4
+ SYS_CONTINUE = 0x4B3
+ SYS_CONTINUEWORKUNIT = 0x4B3
+ SYS_COPYSIGN = 0x4C2
+ SYS_CREATEWO = 0x4B2
+ SYS_CREATEWORKUNIT = 0x4B2
+ SYS_DELETEWO = 0x4B9
+ SYS_DELETEWORKUNIT = 0x4B9
+ SYS_DISCONNE = 0x4B6
+ SYS_DISCONNECTSERVER = 0x4B6
+ SYS_FEOF = 0x04D
+ SYS_FERROR = 0x04A
+ SYS_FINITE = 0x4C8
+ SYS_GAMMA_R = 0x4E2
+ SYS_JOINWORK = 0x4B7
+ SYS_JOINWORKUNIT = 0x4B7
+ SYS_LEAVEWOR = 0x4B8
+ SYS_LEAVEWORKUNIT = 0x4B8
+ SYS_LGAMMA_R = 0x4EB
+ SYS_MATHERR = 0x4D0
+ SYS_PERROR = 0x04F
+ SYS_QUERYMET = 0x4BA
+ SYS_QUERYMETRICS = 0x4BA
+ SYS_QUERYSCH = 0x4BB
+ SYS_QUERYSCHENV = 0x4BB
+ SYS_REWIND = 0x04B
+ SYS_SCALBN = 0x4D4
+ SYS_SIGNIFIC = 0x4D5
+ SYS_SIGNIFICAND = 0x4D5
+ SYS___ACOSH_B = 0x4DA
+ SYS___ACOS_B = 0x4D9
+ SYS___ASINH_B = 0x4BE
+ SYS___ASIN_B = 0x4DB
+ SYS___ATAN2_B = 0x4DC
+ SYS___ATANH_B = 0x4DD
+ SYS___ATAN_B = 0x4BF
+ SYS___CBRT_B = 0x4C0
+ SYS___CEIL_B = 0x4C1
+ SYS___COSH_B = 0x4DE
+ SYS___COS_B = 0x4C3
+ SYS___DGHT = 0x4A8
+ SYS___ENVN = 0x4B0
+ SYS___ERFC_B = 0x4C5
+ SYS___ERF_B = 0x4C4
+ SYS___EXPM1_B = 0x4C6
+ SYS___EXP_B = 0x4DF
+ SYS___FABS_B = 0x4C7
+ SYS___FLOOR_B = 0x4C9
+ SYS___FMOD_B = 0x4E0
+ SYS___FP_SETMODE = 0x4F8
+ SYS___FREXP_B = 0x4CA
+ SYS___GAMMA_B = 0x4E1
+ SYS___GDRR = 0x4A1
+ SYS___HRRNO = 0x4A2
+ SYS___HYPOT_B = 0x4E3
+ SYS___ILOGB_B = 0x4CB
+ SYS___ISNAN_B = 0x4CC
+ SYS___J0_B = 0x4E4
+ SYS___J1_B = 0x4E6
+ SYS___JN_B = 0x4E8
+ SYS___LDEXP_B = 0x4CD
+ SYS___LGAMMA_B = 0x4EA
+ SYS___LOG10_B = 0x4ED
+ SYS___LOG1P_B = 0x4CE
+ SYS___LOGB_B = 0x4CF
+ SYS___LOGIN = 0x4F5
+ SYS___LOG_B = 0x4EC
+ SYS___MLOCKALL = 0x4B1
+ SYS___MODF_B = 0x4D1
+ SYS___NEXTAFTER_B = 0x4D2
+ SYS___OPENDIR2 = 0x4F3
+ SYS___OPEN_STAT = 0x4F6
+ SYS___OPND = 0x4A5
+ SYS___OPPT = 0x4A6
+ SYS___OPRG = 0x4A3
+ SYS___OPRR = 0x4A4
+ SYS___PID_AFFINITY = 0x4BD
+ SYS___POW_B = 0x4EE
+ SYS___READDIR2 = 0x4F4
+ SYS___REMAINDER_B = 0x4EF
+ SYS___RINT_B = 0x4D3
+ SYS___SCALB_B = 0x4F0
+ SYS___SIGACTIONSET = 0x4FB
+ SYS___SIGGM = 0x4A7
+ SYS___SINH_B = 0x4F1
+ SYS___SIN_B = 0x4D6
+ SYS___SQRT_B = 0x4F2
+ SYS___TANH_B = 0x4D8
+ SYS___TAN_B = 0x4D7
+ SYS___TRRNO = 0x4AF
+ SYS___TZNE = 0x4A9
+ SYS___TZZN = 0x4AA
+ SYS___UCREATE = 0x4FC
+ SYS___UFREE = 0x4FE
+ SYS___UHEAPREPORT = 0x4FF
+ SYS___UMALLOC = 0x4FD
+ SYS___Y0_B = 0x4E5
+ SYS___Y1_B = 0x4E7
+ SYS___YN_B = 0x4E9
+ SYS_ABORT = 0x05C
+ SYS_ASCTIME_R = 0x5E0
+ SYS_ATEXIT = 0x05D
+ SYS_CONNECTE = 0x5AE
+ SYS_CONNECTEXPORTIMPORT = 0x5AE
+ SYS_CTIME_R = 0x5E1
+ SYS_DN_COMP = 0x5DF
+ SYS_DN_EXPAND = 0x5DD
+ SYS_DN_SKIPNAME = 0x5DE
+ SYS_EXIT = 0x05A
+ SYS_EXPORTWO = 0x5A1
+ SYS_EXPORTWORKUNIT = 0x5A1
+ SYS_EXTRACTW = 0x5A5
+ SYS_EXTRACTWORKUNIT = 0x5A5
+ SYS_FSEEKO = 0x5C9
+ SYS_FTELLO = 0x5C8
+ SYS_GETGRGID_R = 0x5E7
+ SYS_GETGRNAM_R = 0x5E8
+ SYS_GETLOGIN_R = 0x5E9
+ SYS_GETPWNAM_R = 0x5EA
+ SYS_GETPWUID_R = 0x5EB
+ SYS_GMTIME_R = 0x5E2
+ SYS_IMPORTWO = 0x5A3
+ SYS_IMPORTWORKUNIT = 0x5A3
+ SYS_INET_NTOP = 0x5D3
+ SYS_INET_PTON = 0x5D4
+ SYS_LLABS = 0x5CE
+ SYS_LLDIV = 0x5CB
+ SYS_LOCALTIME_R = 0x5E3
+ SYS_PTHREAD_ATFORK = 0x5ED
+ SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB
+ SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE
+ SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9
+ SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF
+ SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC
+ SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0
+ SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA
+ SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1
+ SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2
+ SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3
+ SYS_PTHREAD_DETACH_U98 = 0x5FD
+ SYS_PTHREAD_GETCONCURRENCY = 0x5F4
+ SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE
+ SYS_PTHREAD_KEY_DELETE = 0x5F5
+ SYS_PTHREAD_SETCANCELSTATE = 0x5FF
+ SYS_PTHREAD_SETCONCURRENCY = 0x5F6
+ SYS_PTHREAD_SIGMASK = 0x5F7
+ SYS_QUERYENC = 0x5AD
+ SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD
+ SYS_RAISE = 0x05E
+ SYS_RAND_R = 0x5E4
+ SYS_READDIR_R = 0x5E6
+ SYS_REALLOC = 0x05B
+ SYS_RES_INIT = 0x5D8
+ SYS_RES_MKQUERY = 0x5D7
+ SYS_RES_QUERY = 0x5D9
+ SYS_RES_QUERYDOMAIN = 0x5DC
+ SYS_RES_SEARCH = 0x5DA
+ SYS_RES_SEND = 0x5DB
+ SYS_SETJMP = 0x05F
+ SYS_SIGQUEUE = 0x5A9
+ SYS_STRTOK_R = 0x5E5
+ SYS_STRTOLL = 0x5B0
+ SYS_STRTOULL = 0x5B1
+ SYS_TTYNAME_R = 0x5EC
+ SYS_UNDOEXPO = 0x5A2
+ SYS_UNDOEXPORTWORKUNIT = 0x5A2
+ SYS_UNDOIMPO = 0x5A4
+ SYS_UNDOIMPORTWORKUNIT = 0x5A4
+ SYS_WCSTOLL = 0x5CC
+ SYS_WCSTOULL = 0x5CD
+ SYS___ABORT = 0x05C
+ SYS___CONSOLE2 = 0x5D2
+ SYS___CPL = 0x5A6
+ SYS___DISCARDDATA = 0x5F8
+ SYS___DSA_PREV = 0x5B2
+ SYS___EP_FIND = 0x5B3
+ SYS___FP_SWAPMODE = 0x5AF
+ SYS___GETUSERID = 0x5AB
+ SYS___GET_CPUID = 0x5B9
+ SYS___GET_SYSTEM_SETTINGS = 0x5BA
+ SYS___IPDOMAINNAME = 0x5AC
+ SYS___MAP_INIT = 0x5A7
+ SYS___MAP_SERVICE = 0x5A8
+ SYS___MOUNT = 0x5AA
+ SYS___MSGRCV_TIMED = 0x5B7
+ SYS___RES = 0x5D6
+ SYS___SEMOP_TIMED = 0x5B8
+ SYS___SERVER_THREADS_QUERY = 0x5B4
+ SYS_FPRINTF = 0x06D
+ SYS_FSCANF = 0x06A
+ SYS_PRINTF = 0x06F
+ SYS_SETBUF = 0x06B
+ SYS_SETVBUF = 0x06C
+ SYS_SSCANF = 0x06E
+ SYS___CATGETS_A = 0x6C0
+ SYS___CHAUDIT_A = 0x6F4
+ SYS___CHMOD_A = 0x6E8
+ SYS___COLLATE_INIT_A = 0x6AC
+ SYS___CREAT_A = 0x6F6
+ SYS___CTYPE_INIT_A = 0x6AF
+ SYS___DLLLOAD_A = 0x6DF
+ SYS___DLLQUERYFN_A = 0x6E0
+ SYS___DLLQUERYVAR_A = 0x6E1
+ SYS___E2A_L = 0x6E3
+ SYS___EXECLE_A = 0x6A0
+ SYS___EXECLP_A = 0x6A4
+ SYS___EXECVE_A = 0x6C1
+ SYS___EXECVP_A = 0x6C2
+ SYS___EXECV_A = 0x6B1
+ SYS___FPRINTF_A = 0x6FA
+ SYS___GETADDRINFO_A = 0x6BF
+ SYS___GETNAMEINFO_A = 0x6C4
+ SYS___GET_WCTYPE_STD_A = 0x6AE
+ SYS___ICONV_OPEN_A = 0x6DE
+ SYS___IF_INDEXTONAME_A = 0x6DC
+ SYS___IF_NAMETOINDEX_A = 0x6DB
+ SYS___ISWCTYPE_A = 0x6B0
+ SYS___IS_WCTYPE_STD_A = 0x6B2
+ SYS___LOCALECONV_A = 0x6B8
+ SYS___LOCALECONV_STD_A = 0x6B9
+ SYS___LOCALE_INIT_A = 0x6B7
+ SYS___LSTAT_A = 0x6EE
+ SYS___LSTAT_O_A = 0x6EF
+ SYS___MKDIR_A = 0x6E9
+ SYS___MKFIFO_A = 0x6EC
+ SYS___MKNOD_A = 0x6F0
+ SYS___MONETARY_INIT_A = 0x6BC
+ SYS___MOUNT_A = 0x6F1
+ SYS___NL_CSINFO_A = 0x6D6
+ SYS___NL_LANGINFO_A = 0x6BA
+ SYS___NL_LNAGINFO_STD_A = 0x6BB
+ SYS___NL_MONINFO_A = 0x6D7
+ SYS___NL_NUMINFO_A = 0x6D8
+ SYS___NL_RESPINFO_A = 0x6D9
+ SYS___NL_TIMINFO_A = 0x6DA
+ SYS___NUMERIC_INIT_A = 0x6C6
+ SYS___OPEN_A = 0x6F7
+ SYS___PRINTF_A = 0x6DD
+ SYS___RESP_INIT_A = 0x6C7
+ SYS___RPMATCH_A = 0x6C8
+ SYS___RPMATCH_C_A = 0x6C9
+ SYS___RPMATCH_STD_A = 0x6CA
+ SYS___SETLOCALE_A = 0x6F9
+ SYS___SPAWNP_A = 0x6C5
+ SYS___SPAWN_A = 0x6C3
+ SYS___SPRINTF_A = 0x6FB
+ SYS___STAT_A = 0x6EA
+ SYS___STAT_O_A = 0x6EB
+ SYS___STRCOLL_STD_A = 0x6A1
+ SYS___STRFMON_A = 0x6BD
+ SYS___STRFMON_STD_A = 0x6BE
+ SYS___STRFTIME_A = 0x6CC
+ SYS___STRFTIME_STD_A = 0x6CD
+ SYS___STRPTIME_A = 0x6CE
+ SYS___STRPTIME_STD_A = 0x6CF
+ SYS___STRXFRM_A = 0x6A2
+ SYS___STRXFRM_C_A = 0x6A3
+ SYS___STRXFRM_STD_A = 0x6A5
+ SYS___SYNTAX_INIT_A = 0x6D4
+ SYS___TIME_INIT_A = 0x6CB
+ SYS___TOD_INIT_A = 0x6D5
+ SYS___TOWLOWER_A = 0x6B3
+ SYS___TOWLOWER_STD_A = 0x6B4
+ SYS___TOWUPPER_A = 0x6B5
+ SYS___TOWUPPER_STD_A = 0x6B6
+ SYS___UMOUNT_A = 0x6F2
+ SYS___VFPRINTF_A = 0x6FC
+ SYS___VPRINTF_A = 0x6FD
+ SYS___VSPRINTF_A = 0x6FE
+ SYS___VSWPRINTF_A = 0x6FF
+ SYS___WCSCOLL_A = 0x6A6
+ SYS___WCSCOLL_C_A = 0x6A7
+ SYS___WCSCOLL_STD_A = 0x6A8
+ SYS___WCSFTIME_A = 0x6D0
+ SYS___WCSFTIME_STD_A = 0x6D1
+ SYS___WCSXFRM_A = 0x6A9
+ SYS___WCSXFRM_C_A = 0x6AA
+ SYS___WCSXFRM_STD_A = 0x6AB
+ SYS___WCTYPE_A = 0x6AD
+ SYS___W_GETMNTENT_A = 0x6F5
+ SYS_____CCSIDTYPE_A = 0x6E6
+ SYS_____CHATTR_A = 0x6E2
+ SYS_____CSNAMETYPE_A = 0x6E7
+ SYS_____OPEN_STAT_A = 0x6ED
+ SYS_____SPAWN2_A = 0x6D2
+ SYS_____SPAWNP2_A = 0x6D3
+ SYS_____TOCCSID_A = 0x6E4
+ SYS_____TOCSNAME_A = 0x6E5
+ SYS_ACL_FREE = 0x7FF
+ SYS_ACL_INIT = 0x7FE
+ SYS_FWIDE = 0x7DF
+ SYS_FWPRINTF = 0x7D1
+ SYS_FWRITE = 0x07E
+ SYS_FWSCANF = 0x7D5
+ SYS_GETCHAR = 0x07B
+ SYS_GETS = 0x07C
+ SYS_M_CREATE_LAYOUT = 0x7C9
+ SYS_M_DESTROY_LAYOUT = 0x7CA
+ SYS_M_GETVALUES_LAYOUT = 0x7CB
+ SYS_M_SETVALUES_LAYOUT = 0x7CC
+ SYS_M_TRANSFORM_LAYOUT = 0x7CD
+ SYS_M_WTRANSFORM_LAYOUT = 0x7CE
+ SYS_PREAD = 0x7C7
+ SYS_PUTC = 0x07D
+ SYS_PUTCHAR = 0x07A
+ SYS_PUTS = 0x07F
+ SYS_PWRITE = 0x7C8
+ SYS_TOWCTRAN = 0x7D8
+ SYS_TOWCTRANS = 0x7D8
+ SYS_UNATEXIT = 0x7B5
+ SYS_VFWPRINT = 0x7D3
+ SYS_VFWPRINTF = 0x7D3
+ SYS_VWPRINTF = 0x7D4
+ SYS_WCTRANS = 0x7D7
+ SYS_WPRINTF = 0x7D2
+ SYS_WSCANF = 0x7D6
+ SYS___ASCTIME_R_A = 0x7A1
+ SYS___BASENAME_A = 0x7DC
+ SYS___BTOWC_A = 0x7E4
+ SYS___CDUMP_A = 0x7B7
+ SYS___CEE3DMP_A = 0x7B6
+ SYS___CEILF_H = 0x7F4
+ SYS___CEILL_H = 0x7F5
+ SYS___CEIL_H = 0x7EA
+ SYS___CRYPT_A = 0x7BE
+ SYS___CSNAP_A = 0x7B8
+ SYS___CTEST_A = 0x7B9
+ SYS___CTIME_R_A = 0x7A2
+ SYS___CTRACE_A = 0x7BA
+ SYS___DBM_OPEN_A = 0x7E6
+ SYS___DIRNAME_A = 0x7DD
+ SYS___FABSF_H = 0x7FA
+ SYS___FABSL_H = 0x7FB
+ SYS___FABS_H = 0x7ED
+ SYS___FGETWC_A = 0x7AA
+ SYS___FGETWS_A = 0x7AD
+ SYS___FLOORF_H = 0x7F6
+ SYS___FLOORL_H = 0x7F7
+ SYS___FLOOR_H = 0x7EB
+ SYS___FPUTWC_A = 0x7A5
+ SYS___FPUTWS_A = 0x7A8
+ SYS___GETTIMEOFDAY_A = 0x7AE
+ SYS___GETWCHAR_A = 0x7AC
+ SYS___GETWC_A = 0x7AB
+ SYS___GLOB_A = 0x7DE
+ SYS___GMTIME_A = 0x7AF
+ SYS___GMTIME_R_A = 0x7B0
+ SYS___INET_PTON_A = 0x7BC
+ SYS___J0_H = 0x7EE
+ SYS___J1_H = 0x7EF
+ SYS___JN_H = 0x7F0
+ SYS___LOCALTIME_A = 0x7B1
+ SYS___LOCALTIME_R_A = 0x7B2
+ SYS___MALLOC24 = 0x7FC
+ SYS___MALLOC31 = 0x7FD
+ SYS___MKTIME_A = 0x7B3
+ SYS___MODFF_H = 0x7F8
+ SYS___MODFL_H = 0x7F9
+ SYS___MODF_H = 0x7EC
+ SYS___OPENDIR_A = 0x7C2
+ SYS___OSNAME = 0x7E0
+ SYS___PUTWCHAR_A = 0x7A7
+ SYS___PUTWC_A = 0x7A6
+ SYS___READDIR_A = 0x7C3
+ SYS___STRTOLL_A = 0x7A3
+ SYS___STRTOULL_A = 0x7A4
+ SYS___SYSLOG_A = 0x7BD
+ SYS___TZZNA = 0x7B4
+ SYS___UNGETWC_A = 0x7A9
+ SYS___UTIME_A = 0x7A0
+ SYS___VFPRINTF2_A = 0x7E7
+ SYS___VPRINTF2_A = 0x7E8
+ SYS___VSPRINTF2_A = 0x7E9
+ SYS___VSWPRNTF2_A = 0x7BB
+ SYS___WCSTOD_A = 0x7D9
+ SYS___WCSTOL_A = 0x7DA
+ SYS___WCSTOUL_A = 0x7DB
+ SYS___WCTOB_A = 0x7E5
+ SYS___Y0_H = 0x7F1
+ SYS___Y1_H = 0x7F2
+ SYS___YN_H = 0x7F3
+ SYS_____OPENDIR2_A = 0x7BF
+ SYS_____OSNAME_A = 0x7E1
+ SYS_____READDIR2_A = 0x7C0
+ SYS_DLCLOSE = 0x8DF
+ SYS_DLERROR = 0x8E0
+ SYS_DLOPEN = 0x8DD
+ SYS_DLSYM = 0x8DE
+ SYS_FLOCKFILE = 0x8D3
+ SYS_FTRYLOCKFILE = 0x8D4
+ SYS_FUNLOCKFILE = 0x8D5
+ SYS_GETCHAR_UNLOCKED = 0x8D7
+ SYS_GETC_UNLOCKED = 0x8D6
+ SYS_PUTCHAR_UNLOCKED = 0x8D9
+ SYS_PUTC_UNLOCKED = 0x8D8
+ SYS_SNPRINTF = 0x8DA
+ SYS_VSNPRINTF = 0x8DB
+ SYS_WCSCSPN = 0x08B
+ SYS_WCSLEN = 0x08C
+ SYS_WCSNCAT = 0x08D
+ SYS_WCSNCMP = 0x08A
+ SYS_WCSNCPY = 0x08F
+ SYS_WCSSPN = 0x08E
+ SYS___ABSF_H = 0x8E7
+ SYS___ABSL_H = 0x8E8
+ SYS___ABS_H = 0x8E6
+ SYS___ACOSF_H = 0x8EA
+ SYS___ACOSH_H = 0x8EC
+ SYS___ACOSL_H = 0x8EB
+ SYS___ACOS_H = 0x8E9
+ SYS___ASINF_H = 0x8EE
+ SYS___ASINH_H = 0x8F0
+ SYS___ASINL_H = 0x8EF
+ SYS___ASIN_H = 0x8ED
+ SYS___ATAN2F_H = 0x8F8
+ SYS___ATAN2L_H = 0x8F9
+ SYS___ATAN2_H = 0x8F7
+ SYS___ATANF_H = 0x8F2
+ SYS___ATANHF_H = 0x8F5
+ SYS___ATANHL_H = 0x8F6
+ SYS___ATANH_H = 0x8F4
+ SYS___ATANL_H = 0x8F3
+ SYS___ATAN_H = 0x8F1
+ SYS___CBRT_H = 0x8FA
+ SYS___COPYSIGNF_H = 0x8FB
+ SYS___COPYSIGNL_H = 0x8FC
+ SYS___COSF_H = 0x8FE
+ SYS___COSL_H = 0x8FF
+ SYS___COS_H = 0x8FD
+ SYS___DLERROR_A = 0x8D2
+ SYS___DLOPEN_A = 0x8D0
+ SYS___DLSYM_A = 0x8D1
+ SYS___GETUTXENT_A = 0x8C6
+ SYS___GETUTXID_A = 0x8C7
+ SYS___GETUTXLINE_A = 0x8C8
+ SYS___ITOA = 0x8AA
+ SYS___ITOA_A = 0x8B0
+ SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5
+ SYS___LE_MSG_ADD_INSERT = 0x8A6
+ SYS___LE_MSG_GET = 0x8A7
+ SYS___LE_MSG_GET_AND_WRITE = 0x8A8
+ SYS___LE_MSG_WRITE = 0x8A9
+ SYS___LLTOA = 0x8AE
+ SYS___LLTOA_A = 0x8B4
+ SYS___LTOA = 0x8AC
+ SYS___LTOA_A = 0x8B2
+ SYS___PUTCHAR_UNLOCKED_A = 0x8CC
+ SYS___PUTC_UNLOCKED_A = 0x8CB
+ SYS___PUTUTXLINE_A = 0x8C9
+ SYS___RESET_EXCEPTION_HANDLER = 0x8E3
+ SYS___REXEC_A = 0x8C4
+ SYS___REXEC_AF_A = 0x8C5
+ SYS___SET_EXCEPTION_HANDLER = 0x8E2
+ SYS___SNPRINTF_A = 0x8CD
+ SYS___SUPERKILL = 0x8A4
+ SYS___TCGETATTR_A = 0x8A1
+ SYS___TCSETATTR_A = 0x8A2
+ SYS___ULLTOA = 0x8AF
+ SYS___ULLTOA_A = 0x8B5
+ SYS___ULTOA = 0x8AD
+ SYS___ULTOA_A = 0x8B3
+ SYS___UTOA = 0x8AB
+ SYS___UTOA_A = 0x8B1
+ SYS___VHM_EVENT = 0x8E4
+ SYS___VSNPRINTF_A = 0x8CE
+ SYS_____GETENV_A = 0x8C3
+ SYS_____UTMPXNAME_A = 0x8CA
+ SYS_CACOSH = 0x9A0
+ SYS_CACOSHF = 0x9A3
+ SYS_CACOSHL = 0x9A6
+ SYS_CARG = 0x9A9
+ SYS_CARGF = 0x9AC
+ SYS_CARGL = 0x9AF
+ SYS_CASIN = 0x9B2
+ SYS_CASINF = 0x9B5
+ SYS_CASINH = 0x9BB
+ SYS_CASINHF = 0x9BE
+ SYS_CASINHL = 0x9C1
+ SYS_CASINL = 0x9B8
+ SYS_CATAN = 0x9C4
+ SYS_CATANF = 0x9C7
+ SYS_CATANH = 0x9CD
+ SYS_CATANHF = 0x9D0
+ SYS_CATANHL = 0x9D3
+ SYS_CATANL = 0x9CA
+ SYS_CCOS = 0x9D6
+ SYS_CCOSF = 0x9D9
+ SYS_CCOSH = 0x9DF
+ SYS_CCOSHF = 0x9E2
+ SYS_CCOSHL = 0x9E5
+ SYS_CCOSL = 0x9DC
+ SYS_CEXP = 0x9E8
+ SYS_CEXPF = 0x9EB
+ SYS_CEXPL = 0x9EE
+ SYS_CIMAG = 0x9F1
+ SYS_CIMAGF = 0x9F4
+ SYS_CIMAGL = 0x9F7
+ SYS_CLOGF = 0x9FD
+ SYS_MEMCHR = 0x09B
+ SYS_MEMCMP = 0x09A
+ SYS_STRCOLL = 0x09C
+ SYS_STRNCMP = 0x09D
+ SYS_STRRCHR = 0x09F
+ SYS_STRXFRM = 0x09E
+ SYS___CACOSHF_B = 0x9A4
+ SYS___CACOSHF_H = 0x9A5
+ SYS___CACOSHL_B = 0x9A7
+ SYS___CACOSHL_H = 0x9A8
+ SYS___CACOSH_B = 0x9A1
+ SYS___CACOSH_H = 0x9A2
+ SYS___CARGF_B = 0x9AD
+ SYS___CARGF_H = 0x9AE
+ SYS___CARGL_B = 0x9B0
+ SYS___CARGL_H = 0x9B1
+ SYS___CARG_B = 0x9AA
+ SYS___CARG_H = 0x9AB
+ SYS___CASINF_B = 0x9B6
+ SYS___CASINF_H = 0x9B7
+ SYS___CASINHF_B = 0x9BF
+ SYS___CASINHF_H = 0x9C0
+ SYS___CASINHL_B = 0x9C2
+ SYS___CASINHL_H = 0x9C3
+ SYS___CASINH_B = 0x9BC
+ SYS___CASINH_H = 0x9BD
+ SYS___CASINL_B = 0x9B9
+ SYS___CASINL_H = 0x9BA
+ SYS___CASIN_B = 0x9B3
+ SYS___CASIN_H = 0x9B4
+ SYS___CATANF_B = 0x9C8
+ SYS___CATANF_H = 0x9C9
+ SYS___CATANHF_B = 0x9D1
+ SYS___CATANHF_H = 0x9D2
+ SYS___CATANHL_B = 0x9D4
+ SYS___CATANHL_H = 0x9D5
+ SYS___CATANH_B = 0x9CE
+ SYS___CATANH_H = 0x9CF
+ SYS___CATANL_B = 0x9CB
+ SYS___CATANL_H = 0x9CC
+ SYS___CATAN_B = 0x9C5
+ SYS___CATAN_H = 0x9C6
+ SYS___CCOSF_B = 0x9DA
+ SYS___CCOSF_H = 0x9DB
+ SYS___CCOSHF_B = 0x9E3
+ SYS___CCOSHF_H = 0x9E4
+ SYS___CCOSHL_B = 0x9E6
+ SYS___CCOSHL_H = 0x9E7
+ SYS___CCOSH_B = 0x9E0
+ SYS___CCOSH_H = 0x9E1
+ SYS___CCOSL_B = 0x9DD
+ SYS___CCOSL_H = 0x9DE
+ SYS___CCOS_B = 0x9D7
+ SYS___CCOS_H = 0x9D8
+ SYS___CEXPF_B = 0x9EC
+ SYS___CEXPF_H = 0x9ED
+ SYS___CEXPL_B = 0x9EF
+ SYS___CEXPL_H = 0x9F0
+ SYS___CEXP_B = 0x9E9
+ SYS___CEXP_H = 0x9EA
+ SYS___CIMAGF_B = 0x9F5
+ SYS___CIMAGF_H = 0x9F6
+ SYS___CIMAGL_B = 0x9F8
+ SYS___CIMAGL_H = 0x9F9
+ SYS___CIMAG_B = 0x9F2
+ SYS___CIMAG_H = 0x9F3
+ SYS___CLOG = 0x9FA
+ SYS___CLOGF_B = 0x9FE
+ SYS___CLOGF_H = 0x9FF
+ SYS___CLOG_B = 0x9FB
+ SYS___CLOG_H = 0x9FC
+ SYS_ISWCTYPE = 0x10C
+ SYS_ISWXDIGI = 0x10A
+ SYS_ISWXDIGIT = 0x10A
+ SYS_MBSINIT = 0x10F
+ SYS_TOWLOWER = 0x10D
+ SYS_TOWUPPER = 0x10E
+ SYS_WCTYPE = 0x10B
+ SYS_WCSSTR = 0x11B
+ SYS___RPMTCH = 0x11A
+ SYS_WCSTOD = 0x12E
+ SYS_WCSTOK = 0x12C
+ SYS_WCSTOL = 0x12D
+ SYS_WCSTOUL = 0x12F
+ SYS_FGETWC = 0x13C
+ SYS_FGETWS = 0x13D
+ SYS_FPUTWC = 0x13E
+ SYS_FPUTWS = 0x13F
+ SYS_REGERROR = 0x13B
+ SYS_REGFREE = 0x13A
+ SYS_COLLEQUIV = 0x14F
+ SYS_COLLTOSTR = 0x14E
+ SYS_ISMCCOLLEL = 0x14C
+ SYS_STRTOCOLL = 0x14D
+ SYS_DLLFREE = 0x16F
+ SYS_DLLQUERYFN = 0x16D
+ SYS_DLLQUERYVAR = 0x16E
+ SYS_GETMCCOLL = 0x16A
+ SYS_GETWMCCOLL = 0x16B
+ SYS___ERR2AD = 0x16C
+ SYS_CFSETOSPEED = 0x17A
+ SYS_CHDIR = 0x17B
+ SYS_CHMOD = 0x17C
+ SYS_CHOWN = 0x17D
+ SYS_CLOSE = 0x17E
+ SYS_CLOSEDIR = 0x17F
+ SYS_LOG = 0x017
+ SYS_COSH = 0x018
+ SYS_FCHMOD = 0x18A
+ SYS_FCHOWN = 0x18B
+ SYS_FCNTL = 0x18C
+ SYS_FILENO = 0x18D
+ SYS_FORK = 0x18E
+ SYS_FPATHCONF = 0x18F
+ SYS_GETLOGIN = 0x19A
+ SYS_GETPGRP = 0x19C
+ SYS_GETPID = 0x19D
+ SYS_GETPPID = 0x19E
+ SYS_GETPWNAM = 0x19F
+ SYS_TANH = 0x019
+ SYS_W_GETMNTENT = 0x19B
+ SYS_POW = 0x020
+ SYS_PTHREAD_SELF = 0x20A
+ SYS_PTHREAD_SETINTR = 0x20B
+ SYS_PTHREAD_SETINTRTYPE = 0x20C
+ SYS_PTHREAD_SETSPECIFIC = 0x20D
+ SYS_PTHREAD_TESTINTR = 0x20E
+ SYS_PTHREAD_YIELD = 0x20F
+ SYS_SQRT = 0x021
+ SYS_FLOOR = 0x022
+ SYS_J1 = 0x023
+ SYS_WCSPBRK = 0x23F
+ SYS_BSEARCH = 0x24C
+ SYS_FABS = 0x024
+ SYS_GETENV = 0x24A
+ SYS_LDIV = 0x24D
+ SYS_SYSTEM = 0x24B
+ SYS_FMOD = 0x025
+ SYS___RETHROW = 0x25F
+ SYS___THROW = 0x25E
+ SYS_J0 = 0x026
+ SYS_PUTENV = 0x26A
+ SYS___GETENV = 0x26F
+ SYS_SEMCTL = 0x27A
+ SYS_SEMGET = 0x27B
+ SYS_SEMOP = 0x27C
+ SYS_SHMAT = 0x27D
+ SYS_SHMCTL = 0x27E
+ SYS_SHMDT = 0x27F
+ SYS_YN = 0x027
+ SYS_JN = 0x028
+ SYS_SIGALTSTACK = 0x28A
+ SYS_SIGHOLD = 0x28B
+ SYS_SIGIGNORE = 0x28C
+ SYS_SIGINTERRUPT = 0x28D
+ SYS_SIGPAUSE = 0x28E
+ SYS_SIGRELSE = 0x28F
+ SYS_GETOPT = 0x29A
+ SYS_GETSUBOPT = 0x29D
+ SYS_LCHOWN = 0x29B
+ SYS_SETPGRP = 0x29E
+ SYS_TRUNCATE = 0x29C
+ SYS_Y0 = 0x029
+ SYS___GDERR = 0x29F
+ SYS_ISALPHA = 0x030
+ SYS_VFORK = 0x30F
+ SYS__LONGJMP = 0x30D
+ SYS__SETJMP = 0x30E
+ SYS_GLOB = 0x31A
+ SYS_GLOBFREE = 0x31B
+ SYS_ISALNUM = 0x031
+ SYS_PUTW = 0x31C
+ SYS_SEEKDIR = 0x31D
+ SYS_TELLDIR = 0x31E
+ SYS_TEMPNAM = 0x31F
+ SYS_GETTIMEOFDAY_R = 0x32E
+ SYS_ISLOWER = 0x032
+ SYS_LGAMMA = 0x32C
+ SYS_REMAINDER = 0x32A
+ SYS_SCALB = 0x32B
+ SYS_SYNC = 0x32F
+ SYS_TTYSLOT = 0x32D
+ SYS_ENDPROTOENT = 0x33A
+ SYS_ENDSERVENT = 0x33B
+ SYS_GETHOSTBYADDR = 0x33D
+ SYS_GETHOSTBYADDR_R = 0x33C
+ SYS_GETHOSTBYNAME = 0x33F
+ SYS_GETHOSTBYNAME_R = 0x33E
+ SYS_ISCNTRL = 0x033
+ SYS_GETSERVBYNAME = 0x34A
+ SYS_GETSERVBYPORT = 0x34B
+ SYS_GETSERVENT = 0x34C
+ SYS_GETSOCKNAME = 0x34D
+ SYS_GETSOCKOPT = 0x34E
+ SYS_INET_ADDR = 0x34F
+ SYS_ISDIGIT = 0x034
+ SYS_ISGRAPH = 0x035
+ SYS_SELECT = 0x35B
+ SYS_SELECTEX = 0x35C
+ SYS_SEND = 0x35D
+ SYS_SENDTO = 0x35F
+ SYS_CHROOT = 0x36A
+ SYS_ISNAN = 0x36D
+ SYS_ISUPPER = 0x036
+ SYS_ULIMIT = 0x36C
+ SYS_UTIMES = 0x36E
+ SYS_W_STATVFS = 0x36B
+ SYS___H_ERRNO = 0x36F
+ SYS_GRANTPT = 0x37A
+ SYS_ISPRINT = 0x037
+ SYS_TCGETSID = 0x37C
+ SYS_UNLOCKPT = 0x37B
+ SYS___TCGETCP = 0x37D
+ SYS___TCSETCP = 0x37E
+ SYS___TCSETTABLES = 0x37F
+ SYS_ISPUNCT = 0x038
+ SYS_NLIST = 0x38C
+ SYS___IPDBCS = 0x38D
+ SYS___IPDSPX = 0x38E
+ SYS___IPMSGC = 0x38F
+ SYS___STHOSTENT = 0x38B
+ SYS___STSERVENT = 0x38A
+ SYS_ISSPACE = 0x039
+ SYS_COS = 0x040
+ SYS_T_ALLOC = 0x40A
+ SYS_T_BIND = 0x40B
+ SYS_T_CLOSE = 0x40C
+ SYS_T_CONNECT = 0x40D
+ SYS_T_ERROR = 0x40E
+ SYS_T_FREE = 0x40F
+ SYS_TAN = 0x041
+ SYS_T_RCVREL = 0x41A
+ SYS_T_RCVUDATA = 0x41B
+ SYS_T_RCVUDERR = 0x41C
+ SYS_T_SND = 0x41D
+ SYS_T_SNDDIS = 0x41E
+ SYS_T_SNDREL = 0x41F
+ SYS_GETPMSG = 0x42A
+ SYS_ISASTREAM = 0x42B
+ SYS_PUTMSG = 0x42C
+ SYS_PUTPMSG = 0x42D
+ SYS_SINH = 0x042
+ SYS___ISPOSIXON = 0x42E
+ SYS___OPENMVSREL = 0x42F
+ SYS_ACOS = 0x043
+ SYS_ATAN = 0x044
+ SYS_ATAN2 = 0x045
+ SYS_FTELL = 0x046
+ SYS_FGETPOS = 0x047
+ SYS_SOCK_DEBUG = 0x47A
+ SYS_SOCK_DO_TESTSTOR = 0x47D
+ SYS_TAKESOCKET = 0x47E
+ SYS___SERVER_INIT = 0x47F
+ SYS_FSEEK = 0x048
+ SYS___IPHOST = 0x48B
+ SYS___IPNODE = 0x48C
+ SYS___SERVER_CLASSIFY_CREATE = 0x48D
+ SYS___SERVER_CLASSIFY_DESTROY = 0x48E
+ SYS___SERVER_CLASSIFY_RESET = 0x48F
+ SYS___SMF_RECORD = 0x48A
+ SYS_FSETPOS = 0x049
+ SYS___FNWSA = 0x49B
+ SYS___SPAWN2 = 0x49D
+ SYS___SPAWNP2 = 0x49E
+ SYS_ATOF = 0x050
+ SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A
+ SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B
+ SYS_PTHREAD_RWLOCK_DESTROY = 0x50C
+ SYS_PTHREAD_RWLOCK_INIT = 0x50D
+ SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E
+ SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F
+ SYS_ATOI = 0x051
+ SYS___FP_CLASS = 0x51D
+ SYS___FP_CLR_FLAG = 0x51A
+ SYS___FP_FINITE = 0x51E
+ SYS___FP_ISNAN = 0x51F
+ SYS___FP_RAISE_XCP = 0x51C
+ SYS___FP_READ_FLAG = 0x51B
+ SYS_RAND = 0x052
+ SYS_SIGTIMEDWAIT = 0x52D
+ SYS_SIGWAITINFO = 0x52E
+ SYS___CHKBFP = 0x52F
+ SYS___FPC_RS = 0x52C
+ SYS___FPC_RW = 0x52A
+ SYS___FPC_SM = 0x52B
+ SYS_STRTOD = 0x053
+ SYS_STRTOL = 0x054
+ SYS_STRTOUL = 0x055
+ SYS_MALLOC = 0x056
+ SYS_SRAND = 0x057
+ SYS_CALLOC = 0x058
+ SYS_FREE = 0x059
+ SYS___OSENV = 0x59F
+ SYS___W_PIOCTL = 0x59E
+ SYS_LONGJMP = 0x060
+ SYS___FLOORF_B = 0x60A
+ SYS___FLOORL_B = 0x60B
+ SYS___FREXPF_B = 0x60C
+ SYS___FREXPL_B = 0x60D
+ SYS___LDEXPF_B = 0x60E
+ SYS___LDEXPL_B = 0x60F
+ SYS_SIGNAL = 0x061
+ SYS___ATAN2F_B = 0x61A
+ SYS___ATAN2L_B = 0x61B
+ SYS___COSHF_B = 0x61C
+ SYS___COSHL_B = 0x61D
+ SYS___EXPF_B = 0x61E
+ SYS___EXPL_B = 0x61F
+ SYS_TMPNAM = 0x062
+ SYS___ABSF_B = 0x62A
+ SYS___ABSL_B = 0x62C
+ SYS___ABS_B = 0x62B
+ SYS___FMODF_B = 0x62D
+ SYS___FMODL_B = 0x62E
+ SYS___MODFF_B = 0x62F
+ SYS_ATANL = 0x63A
+ SYS_CEILF = 0x63B
+ SYS_CEILL = 0x63C
+ SYS_COSF = 0x63D
+ SYS_COSHF = 0x63F
+ SYS_COSL = 0x63E
+ SYS_REMOVE = 0x063
+ SYS_POWL = 0x64A
+ SYS_RENAME = 0x064
+ SYS_SINF = 0x64B
+ SYS_SINHF = 0x64F
+ SYS_SINL = 0x64C
+ SYS_SQRTF = 0x64D
+ SYS_SQRTL = 0x64E
+ SYS_BTOWC = 0x65F
+ SYS_FREXPL = 0x65A
+ SYS_LDEXPF = 0x65B
+ SYS_LDEXPL = 0x65C
+ SYS_MODFF = 0x65D
+ SYS_MODFL = 0x65E
+ SYS_TMPFILE = 0x065
+ SYS_FREOPEN = 0x066
+ SYS___CHARMAP_INIT_A = 0x66E
+ SYS___GETHOSTBYADDR_R_A = 0x66C
+ SYS___GETHOSTBYNAME_A = 0x66A
+ SYS___GETHOSTBYNAME_R_A = 0x66D
+ SYS___MBLEN_A = 0x66F
+ SYS___RES_INIT_A = 0x66B
+ SYS_FCLOSE = 0x067
+ SYS___GETGRGID_R_A = 0x67D
+ SYS___WCSTOMBS_A = 0x67A
+ SYS___WCSTOMBS_STD_A = 0x67B
+ SYS___WCSWIDTH_A = 0x67C
+ SYS___WCSWIDTH_ASIA = 0x67F
+ SYS___WCSWIDTH_STD_A = 0x67E
+ SYS_FFLUSH = 0x068
+ SYS___GETLOGIN_R_A = 0x68E
+ SYS___GETPWNAM_R_A = 0x68C
+ SYS___GETPWUID_R_A = 0x68D
+ SYS___TTYNAME_R_A = 0x68F
+ SYS___WCWIDTH_ASIA = 0x68B
+ SYS___WCWIDTH_STD_A = 0x68A
+ SYS_FOPEN = 0x069
+ SYS___REGEXEC_A = 0x69A
+ SYS___REGEXEC_STD_A = 0x69B
+ SYS___REGFREE_A = 0x69C
+ SYS___REGFREE_STD_A = 0x69D
+ SYS___STRCOLL_A = 0x69E
+ SYS___STRCOLL_C_A = 0x69F
+ SYS_SCANF = 0x070
+ SYS___A64L_A = 0x70C
+ SYS___ECVT_A = 0x70D
+ SYS___FCVT_A = 0x70E
+ SYS___GCVT_A = 0x70F
+ SYS___STRTOUL_A = 0x70A
+ SYS_____AE_CORRESTBL_QUERY_A = 0x70B
+ SYS_SPRINTF = 0x071
+ SYS___ACCESS_A = 0x71F
+ SYS___CATOPEN_A = 0x71E
+ SYS___GETOPT_A = 0x71D
+ SYS___REALPATH_A = 0x71A
+ SYS___SETENV_A = 0x71B
+ SYS___SYSTEM_A = 0x71C
+ SYS_FGETC = 0x072
+ SYS___GAI_STRERROR_A = 0x72F
+ SYS___RMDIR_A = 0x72A
+ SYS___STATVFS_A = 0x72B
+ SYS___SYMLINK_A = 0x72C
+ SYS___TRUNCATE_A = 0x72D
+ SYS___UNLINK_A = 0x72E
+ SYS_VFPRINTF = 0x073
+ SYS___ISSPACE_A = 0x73A
+ SYS___ISUPPER_A = 0x73B
+ SYS___ISWALNUM_A = 0x73F
+ SYS___ISXDIGIT_A = 0x73C
+ SYS___TOLOWER_A = 0x73D
+ SYS___TOUPPER_A = 0x73E
+ SYS_VPRINTF = 0x074
+ SYS___CONFSTR_A = 0x74B
+ SYS___FDOPEN_A = 0x74E
+ SYS___FLDATA_A = 0x74F
+ SYS___FTOK_A = 0x74C
+ SYS___ISWXDIGIT_A = 0x74A
+ SYS___MKTEMP_A = 0x74D
+ SYS_VSPRINTF = 0x075
+ SYS___GETGRGID_A = 0x75A
+ SYS___GETGRNAM_A = 0x75B
+ SYS___GETGROUPSBYNAME_A = 0x75C
+ SYS___GETHOSTENT_A = 0x75D
+ SYS___GETHOSTNAME_A = 0x75E
+ SYS___GETLOGIN_A = 0x75F
+ SYS_GETC = 0x076
+ SYS___CREATEWORKUNIT_A = 0x76A
+ SYS___CTERMID_A = 0x76B
+ SYS___FMTMSG_A = 0x76C
+ SYS___INITGROUPS_A = 0x76D
+ SYS___MSGRCV_A = 0x76F
+ SYS_____LOGIN_A = 0x76E
+ SYS_FGETS = 0x077
+ SYS___STRCASECMP_A = 0x77B
+ SYS___STRNCASECMP_A = 0x77C
+ SYS___TTYNAME_A = 0x77D
+ SYS___UNAME_A = 0x77E
+ SYS___UTIMES_A = 0x77F
+ SYS_____SERVER_PWU_A = 0x77A
+ SYS_FPUTC = 0x078
+ SYS___CREAT_O_A = 0x78E
+ SYS___ENVNA = 0x78F
+ SYS___FREAD_A = 0x78A
+ SYS___FWRITE_A = 0x78B
+ SYS___ISASCII = 0x78D
+ SYS___OPEN_O_A = 0x78C
+ SYS_FPUTS = 0x079
+ SYS___ASCTIME_A = 0x79C
+ SYS___CTIME_A = 0x79D
+ SYS___GETDATE_A = 0x79E
+ SYS___GETSERVBYPORT_A = 0x79A
+ SYS___GETSERVENT_A = 0x79B
+ SYS___TZSET_A = 0x79F
+ SYS_ACL_FROM_TEXT = 0x80C
+ SYS_ACL_SET_FD = 0x80A
+ SYS_ACL_SET_FILE = 0x80B
+ SYS_ACL_SORT = 0x80E
+ SYS_ACL_TO_TEXT = 0x80D
+ SYS_UNGETC = 0x080
+ SYS___SHUTDOWN_REGISTRATION = 0x80F
+ SYS_FREAD = 0x081
+ SYS_FREEADDRINFO = 0x81A
+ SYS_GAI_STRERROR = 0x81B
+ SYS_REXEC_AF = 0x81C
+ SYS___DYNALLOC_A = 0x81F
+ SYS___POE = 0x81D
+ SYS_WCSTOMBS = 0x082
+ SYS___INET_ADDR_A = 0x82F
+ SYS___NLIST_A = 0x82A
+ SYS_____TCGETCP_A = 0x82B
+ SYS_____TCSETCP_A = 0x82C
+ SYS_____W_PIOCTL_A = 0x82E
+ SYS_MBTOWC = 0x083
+ SYS___CABEND = 0x83D
+ SYS___LE_CIB_GET = 0x83E
+ SYS___RECVMSG_A = 0x83B
+ SYS___SENDMSG_A = 0x83A
+ SYS___SET_LAA_FOR_JIT = 0x83F
+ SYS_____LCHATTR_A = 0x83C
+ SYS_WCTOMB = 0x084
+ SYS___CBRTL_B = 0x84A
+ SYS___COPYSIGNF_B = 0x84B
+ SYS___COPYSIGNL_B = 0x84C
+ SYS___COTANF_B = 0x84D
+ SYS___COTANL_B = 0x84F
+ SYS___COTAN_B = 0x84E
+ SYS_MBSTOWCS = 0x085
+ SYS___LOG1PL_B = 0x85A
+ SYS___LOG2F_B = 0x85B
+ SYS___LOG2L_B = 0x85D
+ SYS___LOG2_B = 0x85C
+ SYS___REMAINDERF_B = 0x85E
+ SYS___REMAINDERL_B = 0x85F
+ SYS_ACOSHF = 0x86E
+ SYS_ACOSHL = 0x86F
+ SYS_WCSCPY = 0x086
+ SYS___ERFCF_B = 0x86D
+ SYS___ERFF_B = 0x86C
+ SYS___LROUNDF_B = 0x86A
+ SYS___LROUND_B = 0x86B
+ SYS_COTANL = 0x87A
+ SYS_EXP2F = 0x87B
+ SYS_EXP2L = 0x87C
+ SYS_EXPM1F = 0x87D
+ SYS_EXPM1L = 0x87E
+ SYS_FDIMF = 0x87F
+ SYS_WCSCAT = 0x087
+ SYS___COTANL = 0x87A
+ SYS_REMAINDERF = 0x88A
+ SYS_REMAINDERL = 0x88B
+ SYS_REMAINDF = 0x88A
+ SYS_REMAINDL = 0x88B
+ SYS_REMQUO = 0x88D
+ SYS_REMQUOF = 0x88C
+ SYS_REMQUOL = 0x88E
+ SYS_TGAMMAF = 0x88F
+ SYS_WCSCHR = 0x088
+ SYS_ERFCF = 0x89B
+ SYS_ERFCL = 0x89C
+ SYS_ERFL = 0x89A
+ SYS_EXP2 = 0x89E
+ SYS_WCSCMP = 0x089
+ SYS___EXP2_B = 0x89D
+ SYS___FAR_JUMP = 0x89F
+ SYS_ABS = 0x090
+ SYS___ERFCL_H = 0x90A
+ SYS___EXPF_H = 0x90C
+ SYS___EXPL_H = 0x90D
+ SYS___EXPM1_H = 0x90E
+ SYS___EXP_H = 0x90B
+ SYS___FDIM_H = 0x90F
+ SYS_DIV = 0x091
+ SYS___LOG2F_H = 0x91F
+ SYS___LOG2_H = 0x91E
+ SYS___LOGB_H = 0x91D
+ SYS___LOGF_H = 0x91B
+ SYS___LOGL_H = 0x91C
+ SYS___LOG_H = 0x91A
+ SYS_LABS = 0x092
+ SYS___POWL_H = 0x92A
+ SYS___REMAINDER_H = 0x92B
+ SYS___RINT_H = 0x92C
+ SYS___SCALB_H = 0x92D
+ SYS___SINF_H = 0x92F
+ SYS___SIN_H = 0x92E
+ SYS_STRNCPY = 0x093
+ SYS___TANHF_H = 0x93B
+ SYS___TANHL_H = 0x93C
+ SYS___TANH_H = 0x93A
+ SYS___TGAMMAF_H = 0x93E
+ SYS___TGAMMA_H = 0x93D
+ SYS___TRUNC_H = 0x93F
+ SYS_MEMCPY = 0x094
+ SYS_VFWSCANF = 0x94A
+ SYS_VSWSCANF = 0x94E
+ SYS_VWSCANF = 0x94C
+ SYS_INET6_RTH_ADD = 0x95D
+ SYS_INET6_RTH_INIT = 0x95C
+ SYS_INET6_RTH_REVERSE = 0x95E
+ SYS_INET6_RTH_SEGMENTS = 0x95F
+ SYS_INET6_RTH_SPACE = 0x95B
+ SYS_MEMMOVE = 0x095
+ SYS_WCSTOLD = 0x95A
+ SYS_STRCPY = 0x096
+ SYS_STRCMP = 0x097
+ SYS_CABS = 0x98E
+ SYS_STRCAT = 0x098
+ SYS___CABS_B = 0x98F
+ SYS___POW_II = 0x98A
+ SYS___POW_II_B = 0x98B
+ SYS___POW_II_H = 0x98C
+ SYS_CACOSF = 0x99A
+ SYS_CACOSL = 0x99D
+ SYS_STRNCAT = 0x099
+ SYS___CACOSF_B = 0x99B
+ SYS___CACOSF_H = 0x99C
+ SYS___CACOSL_B = 0x99E
+ SYS___CACOSL_H = 0x99F
+ SYS_ISWALPHA = 0x100
+ SYS_ISWBLANK = 0x101
+ SYS___ISWBLK = 0x101
+ SYS_ISWCNTRL = 0x102
+ SYS_ISWDIGIT = 0x103
+ SYS_ISWGRAPH = 0x104
+ SYS_ISWLOWER = 0x105
+ SYS_ISWPRINT = 0x106
+ SYS_ISWPUNCT = 0x107
+ SYS_ISWSPACE = 0x108
+ SYS_ISWUPPER = 0x109
+ SYS_WCTOB = 0x110
+ SYS_MBRLEN = 0x111
+ SYS_MBRTOWC = 0x112
+ SYS_MBSRTOWC = 0x113
+ SYS_MBSRTOWCS = 0x113
+ SYS_WCRTOMB = 0x114
+ SYS_WCSRTOMB = 0x115
+ SYS_WCSRTOMBS = 0x115
+ SYS___CSID = 0x116
+ SYS___WCSID = 0x117
+ SYS_STRPTIME = 0x118
+ SYS___STRPTM = 0x118
+ SYS_STRFMON = 0x119
+ SYS_WCSCOLL = 0x130
+ SYS_WCSXFRM = 0x131
+ SYS_WCSWIDTH = 0x132
+ SYS_WCWIDTH = 0x133
+ SYS_WCSFTIME = 0x134
+ SYS_SWPRINTF = 0x135
+ SYS_VSWPRINT = 0x136
+ SYS_VSWPRINTF = 0x136
+ SYS_SWSCANF = 0x137
+ SYS_REGCOMP = 0x138
+ SYS_REGEXEC = 0x139
+ SYS_GETWC = 0x140
+ SYS_GETWCHAR = 0x141
+ SYS_PUTWC = 0x142
+ SYS_PUTWCHAR = 0x143
+ SYS_UNGETWC = 0x144
+ SYS_ICONV_OPEN = 0x145
+ SYS_ICONV = 0x146
+ SYS_ICONV_CLOSE = 0x147
+ SYS_COLLRANGE = 0x150
+ SYS_CCLASS = 0x151
+ SYS_COLLORDER = 0x152
+ SYS___DEMANGLE = 0x154
+ SYS_FDOPEN = 0x155
+ SYS___ERRNO = 0x156
+ SYS___ERRNO2 = 0x157
+ SYS___TERROR = 0x158
+ SYS_MAXCOLL = 0x169
+ SYS_DLLLOAD = 0x170
+ SYS__EXIT = 0x174
+ SYS_ACCESS = 0x175
+ SYS_ALARM = 0x176
+ SYS_CFGETISPEED = 0x177
+ SYS_CFGETOSPEED = 0x178
+ SYS_CFSETISPEED = 0x179
+ SYS_CREAT = 0x180
+ SYS_CTERMID = 0x181
+ SYS_DUP = 0x182
+ SYS_DUP2 = 0x183
+ SYS_EXECL = 0x184
+ SYS_EXECLE = 0x185
+ SYS_EXECLP = 0x186
+ SYS_EXECV = 0x187
+ SYS_EXECVE = 0x188
+ SYS_EXECVP = 0x189
+ SYS_FSTAT = 0x190
+ SYS_FSYNC = 0x191
+ SYS_FTRUNCATE = 0x192
+ SYS_GETCWD = 0x193
+ SYS_GETEGID = 0x194
+ SYS_GETEUID = 0x195
+ SYS_GETGID = 0x196
+ SYS_GETGRGID = 0x197
+ SYS_GETGRNAM = 0x198
+ SYS_GETGROUPS = 0x199
+ SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200
+ SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201
+ SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202
+ SYS_PTHREAD_MUTEX_INIT = 0x203
+ SYS_PTHREAD_MUTEX_DESTROY = 0x204
+ SYS_PTHREAD_MUTEX_LOCK = 0x205
+ SYS_PTHREAD_MUTEX_TRYLOCK = 0x206
+ SYS_PTHREAD_MUTEX_UNLOCK = 0x207
+ SYS_PTHREAD_ONCE = 0x209
+ SYS_TW_OPEN = 0x210
+ SYS_TW_FCNTL = 0x211
+ SYS_PTHREAD_JOIN_D4_NP = 0x212
+ SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213
+ SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214
+ SYS_EXTLINK_NP = 0x215
+ SYS___PASSWD = 0x216
+ SYS_SETGROUPS = 0x217
+ SYS_INITGROUPS = 0x218
+ SYS_WCSRCHR = 0x240
+ SYS_SVC99 = 0x241
+ SYS___SVC99 = 0x241
+ SYS_WCSWCS = 0x242
+ SYS_LOCALECO = 0x243
+ SYS_LOCALECONV = 0x243
+ SYS___LIBREL = 0x244
+ SYS_RELEASE = 0x245
+ SYS___RLSE = 0x245
+ SYS_FLOCATE = 0x246
+ SYS___FLOCT = 0x246
+ SYS_FDELREC = 0x247
+ SYS___FDLREC = 0x247
+ SYS_FETCH = 0x248
+ SYS___FETCH = 0x248
+ SYS_QSORT = 0x249
+ SYS___CLEANUPCATCH = 0x260
+ SYS___CATCHMATCH = 0x261
+ SYS___CLEAN2UPCATCH = 0x262
+ SYS_GETPRIORITY = 0x270
+ SYS_NICE = 0x271
+ SYS_SETPRIORITY = 0x272
+ SYS_GETITIMER = 0x273
+ SYS_SETITIMER = 0x274
+ SYS_MSGCTL = 0x275
+ SYS_MSGGET = 0x276
+ SYS_MSGRCV = 0x277
+ SYS_MSGSND = 0x278
+ SYS_MSGXRCV = 0x279
+ SYS___MSGXR = 0x279
+ SYS_SHMGET = 0x280
+ SYS___GETIPC = 0x281
+ SYS_SETGRENT = 0x282
+ SYS_GETGRENT = 0x283
+ SYS_ENDGRENT = 0x284
+ SYS_SETPWENT = 0x285
+ SYS_GETPWENT = 0x286
+ SYS_ENDPWENT = 0x287
+ SYS_BSD_SIGNAL = 0x288
+ SYS_KILLPG = 0x289
+ SYS_SIGSET = 0x290
+ SYS_SIGSTACK = 0x291
+ SYS_GETRLIMIT = 0x292
+ SYS_SETRLIMIT = 0x293
+ SYS_GETRUSAGE = 0x294
+ SYS_MMAP = 0x295
+ SYS_MPROTECT = 0x296
+ SYS_MSYNC = 0x297
+ SYS_MUNMAP = 0x298
+ SYS_CONFSTR = 0x299
+ SYS___NDMTRM = 0x300
+ SYS_FTOK = 0x301
+ SYS_BASENAME = 0x302
+ SYS_DIRNAME = 0x303
+ SYS_GETDTABLESIZE = 0x304
+ SYS_MKSTEMP = 0x305
+ SYS_MKTEMP = 0x306
+ SYS_NFTW = 0x307
+ SYS_GETWD = 0x308
+ SYS_LOCKF = 0x309
+ SYS_WORDEXP = 0x310
+ SYS_WORDFREE = 0x311
+ SYS_GETPGID = 0x312
+ SYS_GETSID = 0x313
+ SYS___UTMPXNAME = 0x314
+ SYS_CUSERID = 0x315
+ SYS_GETPASS = 0x316
+ SYS_FNMATCH = 0x317
+ SYS_FTW = 0x318
+ SYS_GETW = 0x319
+ SYS_ACOSH = 0x320
+ SYS_ASINH = 0x321
+ SYS_ATANH = 0x322
+ SYS_CBRT = 0x323
+ SYS_EXPM1 = 0x324
+ SYS_ILOGB = 0x325
+ SYS_LOGB = 0x326
+ SYS_LOG1P = 0x327
+ SYS_NEXTAFTER = 0x328
+ SYS_RINT = 0x329
+ SYS_SPAWN = 0x330
+ SYS_SPAWNP = 0x331
+ SYS_GETLOGIN_UU = 0x332
+ SYS_ECVT = 0x333
+ SYS_FCVT = 0x334
+ SYS_GCVT = 0x335
+ SYS_ACCEPT = 0x336
+ SYS_BIND = 0x337
+ SYS_CONNECT = 0x338
+ SYS_ENDHOSTENT = 0x339
+ SYS_GETHOSTENT = 0x340
+ SYS_GETHOSTID = 0x341
+ SYS_GETHOSTNAME = 0x342
+ SYS_GETNETBYADDR = 0x343
+ SYS_GETNETBYNAME = 0x344
+ SYS_GETNETENT = 0x345
+ SYS_GETPEERNAME = 0x346
+ SYS_GETPROTOBYNAME = 0x347
+ SYS_GETPROTOBYNUMBER = 0x348
+ SYS_GETPROTOENT = 0x349
+ SYS_INET_LNAOF = 0x350
+ SYS_INET_MAKEADDR = 0x351
+ SYS_INET_NETOF = 0x352
+ SYS_INET_NETWORK = 0x353
+ SYS_INET_NTOA = 0x354
+ SYS_IOCTL = 0x355
+ SYS_LISTEN = 0x356
+ SYS_READV = 0x357
+ SYS_RECV = 0x358
+ SYS_RECVFROM = 0x359
+ SYS_SETHOSTENT = 0x360
+ SYS_SETNETENT = 0x361
+ SYS_SETPEER = 0x362
+ SYS_SETPROTOENT = 0x363
+ SYS_SETSERVENT = 0x364
+ SYS_SETSOCKOPT = 0x365
+ SYS_SHUTDOWN = 0x366
+ SYS_SOCKET = 0x367
+ SYS_SOCKETPAIR = 0x368
+ SYS_WRITEV = 0x369
+ SYS_ENDNETENT = 0x370
+ SYS_CLOSELOG = 0x371
+ SYS_OPENLOG = 0x372
+ SYS_SETLOGMASK = 0x373
+ SYS_SYSLOG = 0x374
+ SYS_PTSNAME = 0x375
+ SYS_SETREUID = 0x376
+ SYS_SETREGID = 0x377
+ SYS_REALPATH = 0x378
+ SYS___SIGNGAM = 0x379
+ SYS_POLL = 0x380
+ SYS_REXEC = 0x381
+ SYS___ISASCII2 = 0x382
+ SYS___TOASCII2 = 0x383
+ SYS_CHPRIORITY = 0x384
+ SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385
+ SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386
+ SYS_PTHREAD_SET_LIMIT_NP = 0x387
+ SYS___STNETENT = 0x388
+ SYS___STPROTOENT = 0x389
+ SYS___SELECT1 = 0x390
+ SYS_PTHREAD_SECURITY_NP = 0x391
+ SYS___CHECK_RESOURCE_AUTH_NP = 0x392
+ SYS___CONVERT_ID_NP = 0x393
+ SYS___OPENVMREL = 0x394
+ SYS_WMEMCHR = 0x395
+ SYS_WMEMCMP = 0x396
+ SYS_WMEMCPY = 0x397
+ SYS_WMEMMOVE = 0x398
+ SYS_WMEMSET = 0x399
+ SYS___FPUTWC = 0x400
+ SYS___PUTWC = 0x401
+ SYS___PWCHAR = 0x402
+ SYS___WCSFTM = 0x403
+ SYS___WCSTOK = 0x404
+ SYS___WCWDTH = 0x405
+ SYS_T_ACCEPT = 0x409
+ SYS_T_GETINFO = 0x410
+ SYS_T_GETPROTADDR = 0x411
+ SYS_T_GETSTATE = 0x412
+ SYS_T_LISTEN = 0x413
+ SYS_T_LOOK = 0x414
+ SYS_T_OPEN = 0x415
+ SYS_T_OPTMGMT = 0x416
+ SYS_T_RCV = 0x417
+ SYS_T_RCVCONNECT = 0x418
+ SYS_T_RCVDIS = 0x419
+ SYS_T_SNDUDATA = 0x420
+ SYS_T_STRERROR = 0x421
+ SYS_T_SYNC = 0x422
+ SYS_T_UNBIND = 0x423
+ SYS___T_ERRNO = 0x424
+ SYS___RECVMSG2 = 0x425
+ SYS___SENDMSG2 = 0x426
+ SYS_FATTACH = 0x427
+ SYS_FDETACH = 0x428
+ SYS_GETMSG = 0x429
+ SYS_GETCONTEXT = 0x430
+ SYS_SETCONTEXT = 0x431
+ SYS_MAKECONTEXT = 0x432
+ SYS_SWAPCONTEXT = 0x433
+ SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434
+ SYS_GETCLIENTID = 0x470
+ SYS___GETCLIENTID = 0x471
+ SYS_GETSTABLESIZE = 0x472
+ SYS_GETIBMOPT = 0x473
+ SYS_GETIBMSOCKOPT = 0x474
+ SYS_GIVESOCKET = 0x475
+ SYS_IBMSFLUSH = 0x476
+ SYS_MAXDESC = 0x477
+ SYS_SETIBMOPT = 0x478
+ SYS_SETIBMSOCKOPT = 0x479
+ SYS___SERVER_PWU = 0x480
+ SYS_PTHREAD_TAG_NP = 0x481
+ SYS___CONSOLE = 0x482
+ SYS___WSINIT = 0x483
+ SYS___IPTCPN = 0x489
+ SYS___SERVER_CLASSIFY = 0x490
+ SYS___HEAPRPT = 0x496
+ SYS___ISBFP = 0x500
+ SYS___FP_CAST = 0x501
+ SYS___CERTIFICATE = 0x502
+ SYS_SEND_FILE = 0x503
+ SYS_AIO_CANCEL = 0x504
+ SYS_AIO_ERROR = 0x505
+ SYS_AIO_READ = 0x506
+ SYS_AIO_RETURN = 0x507
+ SYS_AIO_SUSPEND = 0x508
+ SYS_AIO_WRITE = 0x509
+ SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510
+ SYS_PTHREAD_RWLOCK_UNLOCK = 0x511
+ SYS_PTHREAD_RWLOCK_WRLOCK = 0x512
+ SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513
+ SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514
+ SYS_PTHREAD_RWLOCKATTR_INIT = 0x515
+ SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516
+ SYS___CTTBL = 0x517
+ SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518
+ SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519
+ SYS___FP_UNORDERED = 0x520
+ SYS___FP_READ_RND = 0x521
+ SYS___FP_READ_RND_B = 0x522
+ SYS___FP_SWAP_RND = 0x523
+ SYS___FP_SWAP_RND_B = 0x524
+ SYS___FP_LEVEL = 0x525
+ SYS___FP_BTOH = 0x526
+ SYS___FP_HTOB = 0x527
+ SYS___FPC_RD = 0x528
+ SYS___FPC_WR = 0x529
+ SYS_PTHREAD_SETCANCELTYPE = 0x600
+ SYS_PTHREAD_TESTCANCEL = 0x601
+ SYS___ATANF_B = 0x602
+ SYS___ATANL_B = 0x603
+ SYS___CEILF_B = 0x604
+ SYS___CEILL_B = 0x605
+ SYS___COSF_B = 0x606
+ SYS___COSL_B = 0x607
+ SYS___FABSF_B = 0x608
+ SYS___FABSL_B = 0x609
+ SYS___SINF_B = 0x610
+ SYS___SINL_B = 0x611
+ SYS___TANF_B = 0x612
+ SYS___TANL_B = 0x613
+ SYS___TANHF_B = 0x614
+ SYS___TANHL_B = 0x615
+ SYS___ACOSF_B = 0x616
+ SYS___ACOSL_B = 0x617
+ SYS___ASINF_B = 0x618
+ SYS___ASINL_B = 0x619
+ SYS___LOGF_B = 0x620
+ SYS___LOGL_B = 0x621
+ SYS___LOG10F_B = 0x622
+ SYS___LOG10L_B = 0x623
+ SYS___POWF_B = 0x624
+ SYS___POWL_B = 0x625
+ SYS___SINHF_B = 0x626
+ SYS___SINHL_B = 0x627
+ SYS___SQRTF_B = 0x628
+ SYS___SQRTL_B = 0x629
+ SYS___MODFL_B = 0x630
+ SYS_ABSF = 0x631
+ SYS_ABSL = 0x632
+ SYS_ACOSF = 0x633
+ SYS_ACOSL = 0x634
+ SYS_ASINF = 0x635
+ SYS_ASINL = 0x636
+ SYS_ATAN2F = 0x637
+ SYS_ATAN2L = 0x638
+ SYS_ATANF = 0x639
+ SYS_COSHL = 0x640
+ SYS_EXPF = 0x641
+ SYS_EXPL = 0x642
+ SYS_TANHF = 0x643
+ SYS_TANHL = 0x644
+ SYS_LOG10F = 0x645
+ SYS_LOG10L = 0x646
+ SYS_LOGF = 0x647
+ SYS_LOGL = 0x648
+ SYS_POWF = 0x649
+ SYS_SINHL = 0x650
+ SYS_TANF = 0x651
+ SYS_TANL = 0x652
+ SYS_FABSF = 0x653
+ SYS_FABSL = 0x654
+ SYS_FLOORF = 0x655
+ SYS_FLOORL = 0x656
+ SYS_FMODF = 0x657
+ SYS_FMODL = 0x658
+ SYS_FREXPF = 0x659
+ SYS___CHATTR = 0x660
+ SYS___FCHATTR = 0x661
+ SYS___TOCCSID = 0x662
+ SYS___CSNAMETYPE = 0x663
+ SYS___TOCSNAME = 0x664
+ SYS___CCSIDTYPE = 0x665
+ SYS___AE_CORRESTBL_QUERY = 0x666
+ SYS___AE_AUTOCONVERT_STATE = 0x667
+ SYS_DN_FIND = 0x668
+ SYS___GETHOSTBYADDR_A = 0x669
+ SYS___MBLEN_SB_A = 0x670
+ SYS___MBLEN_STD_A = 0x671
+ SYS___MBLEN_UTF = 0x672
+ SYS___MBSTOWCS_A = 0x673
+ SYS___MBSTOWCS_STD_A = 0x674
+ SYS___MBTOWC_A = 0x675
+ SYS___MBTOWC_ISO1 = 0x676
+ SYS___MBTOWC_SBCS = 0x677
+ SYS___MBTOWC_MBCS = 0x678
+ SYS___MBTOWC_UTF = 0x679
+ SYS___CSID_A = 0x680
+ SYS___CSID_STD_A = 0x681
+ SYS___WCSID_A = 0x682
+ SYS___WCSID_STD_A = 0x683
+ SYS___WCTOMB_A = 0x684
+ SYS___WCTOMB_ISO1 = 0x685
+ SYS___WCTOMB_STD_A = 0x686
+ SYS___WCTOMB_UTF = 0x687
+ SYS___WCWIDTH_A = 0x688
+ SYS___GETGRNAM_R_A = 0x689
+ SYS___READDIR_R_A = 0x690
+ SYS___E2A_S = 0x691
+ SYS___FNMATCH_A = 0x692
+ SYS___FNMATCH_C_A = 0x693
+ SYS___EXECL_A = 0x694
+ SYS___FNMATCH_STD_A = 0x695
+ SYS___REGCOMP_A = 0x696
+ SYS___REGCOMP_STD_A = 0x697
+ SYS___REGERROR_A = 0x698
+ SYS___REGERROR_STD_A = 0x699
+ SYS___SWPRINTF_A = 0x700
+ SYS___FSCANF_A = 0x701
+ SYS___SCANF_A = 0x702
+ SYS___SSCANF_A = 0x703
+ SYS___SWSCANF_A = 0x704
+ SYS___ATOF_A = 0x705
+ SYS___ATOI_A = 0x706
+ SYS___ATOL_A = 0x707
+ SYS___STRTOD_A = 0x708
+ SYS___STRTOL_A = 0x709
+ SYS___L64A_A = 0x710
+ SYS___STRERROR_A = 0x711
+ SYS___PERROR_A = 0x712
+ SYS___FETCH_A = 0x713
+ SYS___GETENV_A = 0x714
+ SYS___MKSTEMP_A = 0x717
+ SYS___PTSNAME_A = 0x718
+ SYS___PUTENV_A = 0x719
+ SYS___CHDIR_A = 0x720
+ SYS___CHOWN_A = 0x721
+ SYS___CHROOT_A = 0x722
+ SYS___GETCWD_A = 0x723
+ SYS___GETWD_A = 0x724
+ SYS___LCHOWN_A = 0x725
+ SYS___LINK_A = 0x726
+ SYS___PATHCONF_A = 0x727
+ SYS___IF_NAMEINDEX_A = 0x728
+ SYS___READLINK_A = 0x729
+ SYS___EXTLINK_NP_A = 0x730
+ SYS___ISALNUM_A = 0x731
+ SYS___ISALPHA_A = 0x732
+ SYS___A2E_S = 0x733
+ SYS___ISCNTRL_A = 0x734
+ SYS___ISDIGIT_A = 0x735
+ SYS___ISGRAPH_A = 0x736
+ SYS___ISLOWER_A = 0x737
+ SYS___ISPRINT_A = 0x738
+ SYS___ISPUNCT_A = 0x739
+ SYS___ISWALPHA_A = 0x740
+ SYS___A2E_L = 0x741
+ SYS___ISWCNTRL_A = 0x742
+ SYS___ISWDIGIT_A = 0x743
+ SYS___ISWGRAPH_A = 0x744
+ SYS___ISWLOWER_A = 0x745
+ SYS___ISWPRINT_A = 0x746
+ SYS___ISWPUNCT_A = 0x747
+ SYS___ISWSPACE_A = 0x748
+ SYS___ISWUPPER_A = 0x749
+ SYS___REMOVE_A = 0x750
+ SYS___RENAME_A = 0x751
+ SYS___TMPNAM_A = 0x752
+ SYS___FOPEN_A = 0x753
+ SYS___FREOPEN_A = 0x754
+ SYS___CUSERID_A = 0x755
+ SYS___POPEN_A = 0x756
+ SYS___TEMPNAM_A = 0x757
+ SYS___FTW_A = 0x758
+ SYS___GETGRENT_A = 0x759
+ SYS___INET_NTOP_A = 0x760
+ SYS___GETPASS_A = 0x761
+ SYS___GETPWENT_A = 0x762
+ SYS___GETPWNAM_A = 0x763
+ SYS___GETPWUID_A = 0x764
+ SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765
+ SYS___CHECKSCHENV_A = 0x766
+ SYS___CONNECTSERVER_A = 0x767
+ SYS___CONNECTWORKMGR_A = 0x768
+ SYS_____CONSOLE_A = 0x769
+ SYS___MSGSND_A = 0x770
+ SYS___MSGXRCV_A = 0x771
+ SYS___NFTW_A = 0x772
+ SYS_____PASSWD_A = 0x773
+ SYS___PTHREAD_SECURITY_NP_A = 0x774
+ SYS___QUERYMETRICS_A = 0x775
+ SYS___QUERYSCHENV = 0x776
+ SYS___READV_A = 0x777
+ SYS_____SERVER_CLASSIFY_A = 0x778
+ SYS_____SERVER_INIT_A = 0x779
+ SYS___W_GETPSENT_A = 0x780
+ SYS___WRITEV_A = 0x781
+ SYS___W_STATFS_A = 0x782
+ SYS___W_STATVFS_A = 0x783
+ SYS___FPUTC_A = 0x784
+ SYS___PUTCHAR_A = 0x785
+ SYS___PUTS_A = 0x786
+ SYS___FGETS_A = 0x787
+ SYS___GETS_A = 0x788
+ SYS___FPUTS_A = 0x789
+ SYS___PUTC_A = 0x790
+ SYS___AE_THREAD_SETMODE = 0x791
+ SYS___AE_THREAD_SWAPMODE = 0x792
+ SYS___GETNETBYADDR_A = 0x793
+ SYS___GETNETBYNAME_A = 0x794
+ SYS___GETNETENT_A = 0x795
+ SYS___GETPROTOBYNAME_A = 0x796
+ SYS___GETPROTOBYNUMBER_A = 0x797
+ SYS___GETPROTOENT_A = 0x798
+ SYS___GETSERVBYNAME_A = 0x799
+ SYS_ACL_FIRST_ENTRY = 0x800
+ SYS_ACL_GET_ENTRY = 0x801
+ SYS_ACL_VALID = 0x802
+ SYS_ACL_CREATE_ENTRY = 0x803
+ SYS_ACL_DELETE_ENTRY = 0x804
+ SYS_ACL_UPDATE_ENTRY = 0x805
+ SYS_ACL_DELETE_FD = 0x806
+ SYS_ACL_DELETE_FILE = 0x807
+ SYS_ACL_GET_FD = 0x808
+ SYS_ACL_GET_FILE = 0x809
+ SYS___ERFL_B = 0x810
+ SYS___ERFCL_B = 0x811
+ SYS___LGAMMAL_B = 0x812
+ SYS___SETHOOKEVENTS = 0x813
+ SYS_IF_NAMETOINDEX = 0x814
+ SYS_IF_INDEXTONAME = 0x815
+ SYS_IF_NAMEINDEX = 0x816
+ SYS_IF_FREENAMEINDEX = 0x817
+ SYS_GETADDRINFO = 0x818
+ SYS_GETNAMEINFO = 0x819
+ SYS___DYNFREE_A = 0x820
+ SYS___RES_QUERY_A = 0x821
+ SYS___RES_SEARCH_A = 0x822
+ SYS___RES_QUERYDOMAIN_A = 0x823
+ SYS___RES_MKQUERY_A = 0x824
+ SYS___RES_SEND_A = 0x825
+ SYS___DN_EXPAND_A = 0x826
+ SYS___DN_SKIPNAME_A = 0x827
+ SYS___DN_COMP_A = 0x828
+ SYS___DN_FIND_A = 0x829
+ SYS___INET_NTOA_A = 0x830
+ SYS___INET_NETWORK_A = 0x831
+ SYS___ACCEPT_A = 0x832
+ SYS___ACCEPT_AND_RECV_A = 0x833
+ SYS___BIND_A = 0x834
+ SYS___CONNECT_A = 0x835
+ SYS___GETPEERNAME_A = 0x836
+ SYS___GETSOCKNAME_A = 0x837
+ SYS___RECVFROM_A = 0x838
+ SYS___SENDTO_A = 0x839
+ SYS___LCHATTR = 0x840
+ SYS___WRITEDOWN = 0x841
+ SYS_PTHREAD_MUTEX_INIT2 = 0x842
+ SYS___ACOSHF_B = 0x843
+ SYS___ACOSHL_B = 0x844
+ SYS___ASINHF_B = 0x845
+ SYS___ASINHL_B = 0x846
+ SYS___ATANHF_B = 0x847
+ SYS___ATANHL_B = 0x848
+ SYS___CBRTF_B = 0x849
+ SYS___EXP2F_B = 0x850
+ SYS___EXP2L_B = 0x851
+ SYS___EXPM1F_B = 0x852
+ SYS___EXPM1L_B = 0x853
+ SYS___FDIMF_B = 0x854
+ SYS___FDIM_B = 0x855
+ SYS___FDIML_B = 0x856
+ SYS___HYPOTF_B = 0x857
+ SYS___HYPOTL_B = 0x858
+ SYS___LOG1PF_B = 0x859
+ SYS___REMQUOF_B = 0x860
+ SYS___REMQUO_B = 0x861
+ SYS___REMQUOL_B = 0x862
+ SYS___TGAMMAF_B = 0x863
+ SYS___TGAMMA_B = 0x864
+ SYS___TGAMMAL_B = 0x865
+ SYS___TRUNCF_B = 0x866
+ SYS___TRUNC_B = 0x867
+ SYS___TRUNCL_B = 0x868
+ SYS___LGAMMAF_B = 0x869
+ SYS_ASINHF = 0x870
+ SYS_ASINHL = 0x871
+ SYS_ATANHF = 0x872
+ SYS_ATANHL = 0x873
+ SYS_CBRTF = 0x874
+ SYS_CBRTL = 0x875
+ SYS_COPYSIGNF = 0x876
+ SYS_CPYSIGNF = 0x876
+ SYS_COPYSIGNL = 0x877
+ SYS_CPYSIGNL = 0x877
+ SYS_COTANF = 0x878
+ SYS___COTANF = 0x878
+ SYS_COTAN = 0x879
+ SYS___COTAN = 0x879
+ SYS_FDIM = 0x881
+ SYS_FDIML = 0x882
+ SYS_HYPOTF = 0x883
+ SYS_HYPOTL = 0x884
+ SYS_LOG1PF = 0x885
+ SYS_LOG1PL = 0x886
+ SYS_LOG2F = 0x887
+ SYS_LOG2 = 0x888
+ SYS_LOG2L = 0x889
+ SYS_TGAMMA = 0x890
+ SYS_TGAMMAL = 0x891
+ SYS_TRUNCF = 0x892
+ SYS_TRUNC = 0x893
+ SYS_TRUNCL = 0x894
+ SYS_LGAMMAF = 0x895
+ SYS_LGAMMAL = 0x896
+ SYS_LROUNDF = 0x897
+ SYS_LROUND = 0x898
+ SYS_ERFF = 0x899
+ SYS___COSHF_H = 0x900
+ SYS___COSHL_H = 0x901
+ SYS___COTAN_H = 0x902
+ SYS___COTANF_H = 0x903
+ SYS___COTANL_H = 0x904
+ SYS___ERF_H = 0x905
+ SYS___ERFF_H = 0x906
+ SYS___ERFL_H = 0x907
+ SYS___ERFC_H = 0x908
+ SYS___ERFCF_H = 0x909
+ SYS___FDIMF_H = 0x910
+ SYS___FDIML_H = 0x911
+ SYS___FMOD_H = 0x912
+ SYS___FMODF_H = 0x913
+ SYS___FMODL_H = 0x914
+ SYS___GAMMA_H = 0x915
+ SYS___HYPOT_H = 0x916
+ SYS___ILOGB_H = 0x917
+ SYS___LGAMMA_H = 0x918
+ SYS___LGAMMAF_H = 0x919
+ SYS___LOG2L_H = 0x920
+ SYS___LOG1P_H = 0x921
+ SYS___LOG10_H = 0x922
+ SYS___LOG10F_H = 0x923
+ SYS___LOG10L_H = 0x924
+ SYS___LROUND_H = 0x925
+ SYS___LROUNDF_H = 0x926
+ SYS___NEXTAFTER_H = 0x927
+ SYS___POW_H = 0x928
+ SYS___POWF_H = 0x929
+ SYS___SINL_H = 0x930
+ SYS___SINH_H = 0x931
+ SYS___SINHF_H = 0x932
+ SYS___SINHL_H = 0x933
+ SYS___SQRT_H = 0x934
+ SYS___SQRTF_H = 0x935
+ SYS___SQRTL_H = 0x936
+ SYS___TAN_H = 0x937
+ SYS___TANF_H = 0x938
+ SYS___TANL_H = 0x939
+ SYS___TRUNCF_H = 0x940
+ SYS___TRUNCL_H = 0x941
+ SYS___COSH_H = 0x942
+ SYS___LE_DEBUG_SET_RESUME_MCH = 0x943
+ SYS_VFSCANF = 0x944
+ SYS_VSCANF = 0x946
+ SYS_VSSCANF = 0x948
+ SYS_IMAXABS = 0x950
+ SYS_IMAXDIV = 0x951
+ SYS_STRTOIMAX = 0x952
+ SYS_STRTOUMAX = 0x953
+ SYS_WCSTOIMAX = 0x954
+ SYS_WCSTOUMAX = 0x955
+ SYS_ATOLL = 0x956
+ SYS_STRTOF = 0x957
+ SYS_STRTOLD = 0x958
+ SYS_WCSTOF = 0x959
+ SYS_INET6_RTH_GETADDR = 0x960
+ SYS_INET6_OPT_INIT = 0x961
+ SYS_INET6_OPT_APPEND = 0x962
+ SYS_INET6_OPT_FINISH = 0x963
+ SYS_INET6_OPT_SET_VAL = 0x964
+ SYS_INET6_OPT_NEXT = 0x965
+ SYS_INET6_OPT_FIND = 0x966
+ SYS_INET6_OPT_GET_VAL = 0x967
+ SYS___POW_I = 0x987
+ SYS___POW_I_B = 0x988
+ SYS___POW_I_H = 0x989
+ SYS___CABS_H = 0x990
+ SYS_CABSF = 0x991
+ SYS___CABSF_B = 0x992
+ SYS___CABSF_H = 0x993
+ SYS_CABSL = 0x994
+ SYS___CABSL_B = 0x995
+ SYS___CABSL_H = 0x996
+ SYS_CACOS = 0x997
+ SYS___CACOS_B = 0x998
+ SYS___CACOS_H = 0x999
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
index 2c1f815..7a8161c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
@@ -1,6 +1,7 @@
// cgo -godefs types_aix.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc && aix
// +build ppc,aix
package unix
@@ -219,6 +220,7 @@ const (
SizeofSockaddrUnix = 0x401
SizeofSockaddrDatalink = 0x80
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofIPv6MTUInfo = 0x20
diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
index b4a069e..07ed733 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_aix.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && aix
// +build ppc64,aix
package unix
@@ -223,6 +224,7 @@ const (
SizeofSockaddrUnix = 0x401
SizeofSockaddrDatalink = 0x80
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofIPv6MTUInfo = 0x20
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
deleted file mode 100644
index 9f47b87..0000000
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
+++ /dev/null
@@ -1,499 +0,0 @@
-// cgo -godefs types_darwin.go | go run mkpost.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build 386,darwin
-
-package unix
-
-const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Timeval32 struct{}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Btim Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint32
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Contigbytes int64
- Devoffset int64
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- _ [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- _ [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- _ [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
-
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
-const (
- AT_FDCWD = -0x2
- AT_REMOVEDIR = 0x80
- AT_SYMLINK_FOLLOW = 0x40
- AT_SYMLINK_NOFOLLOW = 0x20
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLIN = 0x1
- POLLNVAL = 0x20
- POLLOUT = 0x4
- POLLPRI = 0x2
- POLLRDBAND = 0x80
- POLLRDNORM = 0x40
- POLLWRBAND = 0x100
- POLLWRNORM = 0x4
-)
-
-type Utsname struct {
- Sysname [256]byte
- Nodename [256]byte
- Release [256]byte
- Version [256]byte
- Machine [256]byte
-}
-
-const SizeofClockinfo = 0x14
-
-type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
-}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 966798a..885842c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_darwin.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && darwin
// +build amd64,darwin
package unix
@@ -70,7 +71,6 @@ type Stat_t struct {
Uid uint32
Gid uint32
Rdev int32
- _ [4]byte
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -97,10 +97,11 @@ type Statfs_t struct {
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
+ Flags_ext uint32
+ Reserved [7]uint32
}
type Flock_t struct {
@@ -133,8 +134,7 @@ type Fbootstraptransfer_t struct {
type Log2phys_t struct {
Flags uint32
- _ [8]byte
- _ [8]byte
+ _ [16]byte
}
type Fsid struct {
@@ -151,6 +151,10 @@ type Dirent struct {
_ [3]byte
}
+const (
+ PathMax = 0x400
+)
+
type RawSockaddrInet4 struct {
Len uint8
Family uint8
@@ -196,8 +200,110 @@ type RawSockaddrAny struct {
Pad [92]int8
}
+type RawSockaddrCtl struct {
+ Sc_len uint8
+ Sc_family uint8
+ Ss_sysaddr uint16
+ Sc_id uint32
+ Sc_unit uint32
+ 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 {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -213,6 +319,12 @@ type IPMreq struct {
Interface [4]byte /* in_addr */
}
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
@@ -221,10 +333,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -262,8 +372,17 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
+ SizeofSockaddrCtl = 0x20
+ SizeofSockaddrVM = 0xc
+ SizeofXvsockpcb = 0xa8
+ SizeofXSocket = 0x64
+ SizeofXSockbuf = 0x18
+ SizeofXVSockPgen = 0x20
+ SizeofXucred = 0x4c
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
SizeofCmsghdr = 0xc
@@ -309,7 +428,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -352,7 +470,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -373,7 +490,6 @@ type IfmaMsghdr2 struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -382,7 +498,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -404,7 +519,8 @@ type RtMetrics struct {
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -427,7 +543,6 @@ type BpfStat struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -452,7 +567,6 @@ type Termios struct {
Cflag uint64
Lflag uint64
Cc [20]uint8
- _ [4]byte
Ispeed uint64
Ospeed uint64
}
@@ -507,3 +621,148 @@ type Clockinfo struct {
Stathz int32
Profhz int32
}
+
+type CtlInfo struct {
+ Id uint32
+ Name [96]byte
+}
+
+const SizeofKinfoProc = 0x288
+
+type Eproc struct {
+ Paddr uintptr
+ Sess uintptr
+ Pcred Pcred
+ Ucred Ucred
+ Vm Vmspace
+ Ppid int32
+ Pgid int32
+ Jobc int16
+ Tdev int32
+ Tpgid int32
+ Tsess uintptr
+ Wmesg [8]byte
+ Xsize int32
+ Xrssize int16
+ Xccount int16
+ Xswrss int16
+ Flag int32
+ Login [12]byte
+ Spare [4]int32
+ _ [4]byte
+}
+
+type ExternProc struct {
+ P_starttime Timeval
+ P_vmspace *Vmspace
+ P_sigacts uintptr
+ P_flag int32
+ P_stat int8
+ P_pid int32
+ P_oppid int32
+ P_dupfd int32
+ User_stack *int8
+ Exit_thread *byte
+ P_debugger int32
+ Sigwait int32
+ P_estcpu uint32
+ P_cpticks int32
+ P_pctcpu uint32
+ P_wchan *byte
+ P_wmesg *int8
+ P_swtime uint32
+ P_slptime uint32
+ P_realtimer Itimerval
+ P_rtime Timeval
+ P_uticks uint64
+ P_sticks uint64
+ P_iticks uint64
+ P_traceflag int32
+ P_tracep uintptr
+ P_siglist int32
+ P_textvp uintptr
+ P_holdcnt int32
+ P_sigmask uint32
+ P_sigignore uint32
+ P_sigcatch uint32
+ P_priority uint8
+ P_usrpri uint8
+ P_nice int8
+ P_comm [17]byte
+ P_pgrp uintptr
+ P_addr uintptr
+ P_xstat uint16
+ P_acflag uint16
+ P_ru *Rusage
+}
+
+type Itimerval struct {
+ Interval Timeval
+ Value Timeval
+}
+
+type KinfoProc struct {
+ Proc ExternProc
+ Eproc Eproc
+}
+
+type Vmspace struct {
+ Dummy int32
+ Dummy2 *int8
+ Dummy3 [5]int32
+ Dummy4 [3]*int8
+}
+
+type Pcred struct {
+ Pc_lock [72]int8
+ Pc_ucred uintptr
+ P_ruid uint32
+ P_svuid uint32
+ P_rgid uint32
+ P_svgid uint32
+ P_refcnt int32
+ _ [4]byte
+}
+
+type Ucred struct {
+ Ref int32
+ Uid uint32
+ 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
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
deleted file mode 100644
index 4fe4c9c..0000000
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
+++ /dev/null
@@ -1,500 +0,0 @@
-// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-// +build arm,darwin
-
-package unix
-
-const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-type Timeval32 [0]byte
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Btim Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint32
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Contigbytes int64
- Devoffset int64
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- _ [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- _ [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- _ [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
-
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
-const (
- AT_FDCWD = -0x2
- AT_REMOVEDIR = 0x80
- AT_SYMLINK_FOLLOW = 0x40
- AT_SYMLINK_NOFOLLOW = 0x20
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLIN = 0x1
- POLLNVAL = 0x20
- POLLOUT = 0x4
- POLLPRI = 0x2
- POLLRDBAND = 0x80
- POLLRDNORM = 0x40
- POLLWRBAND = 0x100
- POLLWRNORM = 0x4
-)
-
-type Utsname struct {
- Sysname [256]byte
- Nodename [256]byte
- Release [256]byte
- Version [256]byte
- Machine [256]byte
-}
-
-const SizeofClockinfo = 0x14
-
-type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
-}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 21999e4..b23c023 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_darwin.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && darwin
// +build arm64,darwin
package unix
@@ -70,7 +71,6 @@ type Stat_t struct {
Uid uint32
Gid uint32
Rdev int32
- _ [4]byte
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -97,10 +97,11 @@ type Statfs_t struct {
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
+ Flags_ext uint32
+ Reserved [7]uint32
}
type Flock_t struct {
@@ -133,8 +134,7 @@ type Fbootstraptransfer_t struct {
type Log2phys_t struct {
Flags uint32
- _ [8]byte
- _ [8]byte
+ _ [16]byte
}
type Fsid struct {
@@ -151,6 +151,10 @@ type Dirent struct {
_ [3]byte
}
+const (
+ PathMax = 0x400
+)
+
type RawSockaddrInet4 struct {
Len uint8
Family uint8
@@ -196,8 +200,110 @@ type RawSockaddrAny struct {
Pad [92]int8
}
+type RawSockaddrCtl struct {
+ Sc_len uint8
+ Sc_family uint8
+ Ss_sysaddr uint16
+ Sc_id uint32
+ Sc_unit uint32
+ 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 {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -213,6 +319,12 @@ type IPMreq struct {
Interface [4]byte /* in_addr */
}
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
@@ -221,10 +333,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -262,8 +372,17 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
+ SizeofSockaddrCtl = 0x20
+ SizeofSockaddrVM = 0xc
+ SizeofXvsockpcb = 0xa8
+ SizeofXSocket = 0x64
+ SizeofXSockbuf = 0x18
+ SizeofXVSockPgen = 0x20
+ SizeofXucred = 0x4c
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
SizeofCmsghdr = 0xc
@@ -309,7 +428,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -352,7 +470,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -373,7 +490,6 @@ type IfmaMsghdr2 struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -382,7 +498,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -404,7 +519,8 @@ type RtMetrics struct {
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -427,7 +543,6 @@ type BpfStat struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -452,7 +567,6 @@ type Termios struct {
Cflag uint64
Lflag uint64
Cc [20]uint8
- _ [4]byte
Ispeed uint64
Ospeed uint64
}
@@ -507,3 +621,148 @@ type Clockinfo struct {
Stathz int32
Profhz int32
}
+
+type CtlInfo struct {
+ Id uint32
+ Name [96]byte
+}
+
+const SizeofKinfoProc = 0x288
+
+type Eproc struct {
+ Paddr uintptr
+ Sess uintptr
+ Pcred Pcred
+ Ucred Ucred
+ Vm Vmspace
+ Ppid int32
+ Pgid int32
+ Jobc int16
+ Tdev int32
+ Tpgid int32
+ Tsess uintptr
+ Wmesg [8]byte
+ Xsize int32
+ Xrssize int16
+ Xccount int16
+ Xswrss int16
+ Flag int32
+ Login [12]byte
+ Spare [4]int32
+ _ [4]byte
+}
+
+type ExternProc struct {
+ P_starttime Timeval
+ P_vmspace *Vmspace
+ P_sigacts uintptr
+ P_flag int32
+ P_stat int8
+ P_pid int32
+ P_oppid int32
+ P_dupfd int32
+ User_stack *int8
+ Exit_thread *byte
+ P_debugger int32
+ Sigwait int32
+ P_estcpu uint32
+ P_cpticks int32
+ P_pctcpu uint32
+ P_wchan *byte
+ P_wmesg *int8
+ P_swtime uint32
+ P_slptime uint32
+ P_realtimer Itimerval
+ P_rtime Timeval
+ P_uticks uint64
+ P_sticks uint64
+ P_iticks uint64
+ P_traceflag int32
+ P_tracep uintptr
+ P_siglist int32
+ P_textvp uintptr
+ P_holdcnt int32
+ P_sigmask uint32
+ P_sigignore uint32
+ P_sigcatch uint32
+ P_priority uint8
+ P_usrpri uint8
+ P_nice int8
+ P_comm [17]byte
+ P_pgrp uintptr
+ P_addr uintptr
+ P_xstat uint16
+ P_acflag uint16
+ P_ru *Rusage
+}
+
+type Itimerval struct {
+ Interval Timeval
+ Value Timeval
+}
+
+type KinfoProc struct {
+ Proc ExternProc
+ Eproc Eproc
+}
+
+type Vmspace struct {
+ Dummy int32
+ Dummy2 *int8
+ Dummy3 [5]int32
+ Dummy4 [3]*int8
+}
+
+type Pcred struct {
+ Pc_lock [72]int8
+ Pc_ucred uintptr
+ P_ruid uint32
+ P_svuid uint32
+ P_rgid uint32
+ P_svgid uint32
+ P_refcnt int32
+ _ [4]byte
+}
+
+type Ucred struct {
+ Ref int32
+ Uid uint32
+ 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
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
index 71ea1d6..d0ba8e9 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_dragonfly.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
package unix
@@ -70,11 +71,11 @@ type Stat_t struct {
Ctim Timespec
Size int64
Blocks int64
- Blksize uint32
+ _ uint32
Flags uint32
Gen uint32
Lspare int32
- Qspare1 int64
+ Blksize int64
Qspare2 int64
}
@@ -91,17 +92,15 @@ type Statfs_t struct {
Owner uint32
Type int32
Flags int32
- _ [4]byte
Syncwrites int64
Asyncwrites int64
- Fstypename [16]int8
- Mntonname [80]int8
+ Fstypename [16]byte
+ Mntonname [80]byte
Syncreads int64
Asyncreads int64
Spares1 int16
- Mntfromname [80]int8
+ Mntfromname [80]byte
Spares2 int16
- _ [4]byte
Spare [2]int64
}
@@ -202,10 +201,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -238,6 +235,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -269,7 +267,7 @@ type FdSet struct {
const (
SizeofIfMsghdr = 0xb0
SizeofIfData = 0xa0
- SizeofIfaMsghdr = 0x14
+ SizeofIfaMsghdr = 0x18
SizeofIfmaMsghdr = 0x10
SizeofIfAnnounceMsghdr = 0x18
SizeofRtMsghdr = 0x98
@@ -280,10 +278,9 @@ type IfMsghdr struct {
Msglen uint16
Version uint8
Type uint8
- Addrs int32
- Flags int32
Index uint16
- _ [2]byte
+ Flags int32
+ Addrs int32
Data IfData
}
@@ -294,7 +291,6 @@ type IfData struct {
Hdrlen uint8
Recvquota uint8
Xmitquota uint8
- _ [2]byte
Mtu uint64
Metric uint64
Link_state uint64
@@ -316,24 +312,23 @@ type IfData struct {
}
type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Metric int32
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Index uint16
+ Flags int32
+ Addrs int32
+ Addrflags int32
+ Metric int32
}
type IfmaMsghdr struct {
Msglen uint16
Version uint8
Type uint8
- Addrs int32
- Flags int32
Index uint16
- _ [2]byte
+ Flags int32
+ Addrs int32
}
type IfAnnounceMsghdr struct {
@@ -350,7 +345,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -374,7 +368,6 @@ type RtMetrics struct {
Hopcount uint64
Mssopt uint16
Pad uint16
- _ [4]byte
Msl uint64
Iwmaxsegs uint64
Iwcapsegs uint64
@@ -400,7 +393,6 @@ type BpfStat struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -439,6 +431,9 @@ type Winsize struct {
const (
AT_FDCWD = 0xfffafdcd
AT_SYMLINK_NOFOLLOW = 0x1
+ AT_REMOVEDIR = 0x2
+ AT_EACCESS = 0x4
+ AT_SYMLINK_FOLLOW = 0x8
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index 0ec1596..4eec078 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && freebsd
// +build 386,freebsd
package unix
@@ -30,6 +31,8 @@ type Timeval struct {
Usec int32
}
+type Time_t int32
+
type Rusage struct {
Utime Timeval
Stime Timeval
@@ -128,9 +131,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -153,9 +156,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -250,6 +253,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -312,7 +323,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x50
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -375,15 +388,15 @@ type PtraceLwpInfoStruct struct {
}
type __Siginfo struct {
- Signo int32
- Errno int32
- Code int32
- Pid int32
- Uid uint32
- Status int32
- Addr *byte
- Value [4]byte
- X_reason [32]byte
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr *byte
+ Value [4]byte
+ _ [32]byte
}
type Sigset_t struct {
@@ -458,7 +471,7 @@ type ifMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Data ifData
}
@@ -469,7 +482,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -536,7 +548,7 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Metric int32
}
@@ -547,7 +559,7 @@ type IfmaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
}
type IfAnnounceMsghdr struct {
@@ -564,7 +576,7 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
+ _ uint16
Flags int32
Addrs int32
Pid int32
@@ -662,9 +674,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x800
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index 8340f57..7622904 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && freebsd
// +build amd64,freebsd
package unix
@@ -30,6 +31,8 @@ type Timeval struct {
Usec int64
}
+type Time_t int64
+
type Rusage struct {
Utime Timeval
Stime Timeval
@@ -123,9 +126,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -148,9 +151,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -246,6 +249,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -275,10 +286,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -310,7 +319,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x58
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -463,7 +474,7 @@ type ifMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Data ifData
}
@@ -474,7 +485,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -541,7 +551,7 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Metric int32
}
@@ -552,7 +562,7 @@ type IfmaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
}
type IfAnnounceMsghdr struct {
@@ -569,7 +579,7 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
+ _ uint16
Flags int32
Addrs int32
Pid int32
@@ -623,7 +633,6 @@ type BpfZbuf struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -668,9 +677,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x800
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index 6f79227..19223ce 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -1,6 +1,7 @@
// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && freebsd
// +build arm,freebsd
package unix
@@ -32,6 +33,8 @@ type Timeval struct {
_ [4]byte
}
+type Time_t int32
+
type Rusage struct {
Utime Timeval
Stime Timeval
@@ -125,9 +128,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -150,9 +153,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -248,6 +251,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -310,7 +321,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x50
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -645,9 +658,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x800
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index e751e00..8e3e33f 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -1,6 +1,7 @@
-// cgo -godefs types_freebsd.go | go run mkpost.go
+// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && freebsd
// +build arm64,freebsd
package unix
@@ -30,6 +31,8 @@ type Timeval struct {
Usec int64
}
+type Time_t int64
+
type Rusage struct {
Utime Timeval
Stime Timeval
@@ -123,9 +126,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -148,9 +151,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -246,6 +249,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -275,10 +286,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -310,7 +319,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x58
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -326,11 +337,9 @@ const (
PTRACE_CONT = 0x7
PTRACE_DETACH = 0xb
PTRACE_GETFPREGS = 0x23
- PTRACE_GETFSBASE = 0x47
PTRACE_GETLWPLIST = 0xf
PTRACE_GETNUMLWPS = 0xe
PTRACE_GETREGS = 0x21
- PTRACE_GETXSTATE = 0x45
PTRACE_IO = 0xc
PTRACE_KILL = 0x8
PTRACE_LWPEVENTS = 0x18
@@ -373,15 +382,15 @@ type PtraceLwpInfoStruct struct {
}
type __Siginfo struct {
- Signo int32
- Errno int32
- Code int32
- Pid int32
- Uid uint32
- Status int32
- Addr *byte
- Value [8]byte
- X_reason [40]byte
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr *byte
+ Value [8]byte
+ _ [40]byte
}
type Sigset_t struct {
@@ -394,12 +403,14 @@ type Reg struct {
Sp uint64
Elr uint64
Spsr uint32
+ _ [4]byte
}
type FpReg struct {
- Fp_q [512]uint8
- Fp_sr uint32
- Fp_cr uint32
+ Q [32][16]uint8
+ Sr uint32
+ Cr uint32
+ _ [8]byte
}
type PtraceIoDesc struct {
@@ -441,7 +452,7 @@ type ifMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Data ifData
}
@@ -452,7 +463,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -519,7 +529,7 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Metric int32
}
@@ -530,7 +540,7 @@ type IfmaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
}
type IfAnnounceMsghdr struct {
@@ -547,7 +557,7 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
+ _ uint16
Flags int32
Addrs int32
Pid int32
@@ -601,7 +611,6 @@ type BpfZbuf struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -646,9 +655,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_REMOVEDIR = 0x800
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
new file mode 100644
index 0000000..4c48526
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
@@ -0,0 +1,42 @@
+// cgo -godefs types_illumos.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build amd64 && illumos
+// +build amd64,illumos
+
+package unix
+
+const (
+ TUNNEWPPA = 0x540001
+ TUNSETPPA = 0x540002
+
+ I_STR = 0x5308
+ I_POP = 0x5303
+ I_PUSH = 0x5302
+ I_LINK = 0x530c
+ I_UNLINK = 0x530d
+ I_PLINK = 0x5316
+ I_PUNLINK = 0x5317
+
+ IF_UNITSEL = -0x7ffb8cca
+)
+
+type strbuf struct {
+ Maxlen int32
+ Len int32
+ Buf *int8
+}
+
+type Strioctl struct {
+ Cmd int32
+ Timout int32
+ Len int32
+ Dp *int8
+}
+
+type Lifreq struct {
+ Name [32]int8
+ Lifru1 [4]byte
+ Type uint32
+ Lifru [336]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
new file mode 100644
index 0000000..f6f0d79
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -0,0 +1,4045 @@
+// Code generated by mkmerge; DO NOT EDIT.
+
+//go:build linux
+// +build linux
+
+package unix
+
+const (
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLongLong = 0x8
+ PathMax = 0x1000
+)
+
+type (
+ _C_short int16
+ _C_int int32
+
+ _C_long_long int64
+)
+
+type ItimerSpec struct {
+ Interval Timespec
+ Value Timespec
+}
+
+const (
+ TIME_OK = 0x0
+ TIME_INS = 0x1
+ TIME_DEL = 0x2
+ TIME_OOP = 0x3
+ TIME_WAIT = 0x4
+ TIME_ERROR = 0x5
+ TIME_BAD = 0x5
+)
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type StatxTimestamp struct {
+ Sec int64
+ Nsec uint32
+ _ int32
+}
+
+type Statx_t struct {
+ Mask uint32
+ Blksize uint32
+ Attributes uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Mode uint16
+ _ [1]uint16
+ Ino uint64
+ Size uint64
+ Blocks uint64
+ Attributes_mask uint64
+ Atime StatxTimestamp
+ Btime StatxTimestamp
+ Ctime StatxTimestamp
+ Mtime StatxTimestamp
+ Rdev_major uint32
+ Rdev_minor uint32
+ Dev_major uint32
+ Dev_minor uint32
+ Mnt_id uint64
+ _ uint64
+ _ [12]uint64
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+type FileCloneRange struct {
+ Src_fd int64
+ Src_offset uint64
+ Src_length uint64
+ Dest_offset uint64
+}
+
+type RawFileDedupeRange struct {
+ Src_offset uint64
+ Src_length uint64
+ Dest_count uint16
+ Reserved1 uint16
+ Reserved2 uint32
+}
+
+type RawFileDedupeRangeInfo struct {
+ Dest_fd int64
+ Dest_offset uint64
+ Bytes_deduped uint64
+ Status int32
+ Reserved uint32
+}
+
+const (
+ SizeofRawFileDedupeRange = 0x18
+ SizeofRawFileDedupeRangeInfo = 0x20
+ FILE_DEDUPE_RANGE_SAME = 0x0
+ FILE_DEDUPE_RANGE_DIFFERS = 0x1
+)
+
+type FscryptPolicy struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ Master_key_descriptor [8]uint8
+}
+
+type FscryptKey struct {
+ Mode uint32
+ Raw [64]uint8
+ Size uint32
+}
+
+type FscryptPolicyV1 struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ Master_key_descriptor [8]uint8
+}
+
+type FscryptPolicyV2 struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ _ [4]uint8
+ Master_key_identifier [16]uint8
+}
+
+type FscryptGetPolicyExArg struct {
+ Size uint64
+ Policy [24]byte
+}
+
+type FscryptKeySpecifier struct {
+ Type uint32
+ _ uint32
+ U [32]byte
+}
+
+type FscryptAddKeyArg struct {
+ Key_spec FscryptKeySpecifier
+ Raw_size uint32
+ Key_id uint32
+ _ [8]uint32
+}
+
+type FscryptRemoveKeyArg struct {
+ Key_spec FscryptKeySpecifier
+ Removal_status_flags uint32
+ _ [5]uint32
+}
+
+type FscryptGetKeyStatusArg struct {
+ Key_spec FscryptKeySpecifier
+ _ [6]uint32
+ Status uint32
+ Status_flags uint32
+ User_count uint32
+ _ [13]uint32
+}
+
+type DmIoctl struct {
+ Version [3]uint32
+ Data_size uint32
+ Data_start uint32
+ Target_count uint32
+ Open_count int32
+ Flags uint32
+ Event_nr uint32
+ _ uint32
+ Dev uint64
+ Name [128]byte
+ Uuid [129]byte
+ Data [7]byte
+}
+
+type DmTargetSpec struct {
+ Sector_start uint64
+ Length uint64
+ Status int32
+ Next uint32
+ Target_type [16]byte
+}
+
+type DmTargetDeps struct {
+ Count uint32
+ _ uint32
+}
+
+type DmTargetVersions struct {
+ Next uint32
+ Version [3]uint32
+}
+
+type DmTargetMsg struct {
+ Sector uint64
+}
+
+const (
+ SizeofDmIoctl = 0x138
+ SizeofDmTargetSpec = 0x28
+)
+
+type KeyctlDHParams struct {
+ Private int32
+ Prime int32
+ Base int32
+}
+
+const (
+ FADV_NORMAL = 0x0
+ FADV_RANDOM = 0x1
+ FADV_SEQUENTIAL = 0x2
+ FADV_WILLNEED = 0x3
+)
+
+type RawSockaddrInet4 struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Family uint16
+ Path [108]int8
+}
+
+type RawSockaddrLinklayer struct {
+ Family uint16
+ Protocol uint16
+ Ifindex int32
+ Hatype uint16
+ Pkttype uint8
+ Halen uint8
+ Addr [8]uint8
+}
+
+type RawSockaddrNetlink struct {
+ Family uint16
+ Pad uint16
+ Pid uint32
+ Groups uint32
+}
+
+type RawSockaddrHCI struct {
+ Family uint16
+ Dev uint16
+ Channel uint16
+}
+
+type RawSockaddrL2 struct {
+ Family uint16
+ Psm uint16
+ Bdaddr [6]uint8
+ Cid uint16
+ Bdaddr_type uint8
+ _ [1]byte
+}
+
+type RawSockaddrRFCOMM struct {
+ Family uint16
+ Bdaddr [6]uint8
+ Channel uint8
+ _ [1]byte
+}
+
+type RawSockaddrCAN struct {
+ Family uint16
+ Ifindex int32
+ Addr [16]byte
+}
+
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
+type RawSockaddrVM struct {
+ Family uint16
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+ Flags uint8
+ Zero [3]uint8
+}
+
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
+type RawSockaddrPPPoX [0x1e]byte
+
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
+type RawSockaddrL2TPIP struct {
+ Family uint16
+ Unused uint16
+ Addr [4]byte /* in_addr */
+ Conn_id uint32
+ _ [4]uint8
+}
+
+type RawSockaddrL2TPIP6 struct {
+ Family uint16
+ Unused uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+ Conn_id uint32
+}
+
+type RawSockaddrIUCV struct {
+ Family uint16
+ Port uint16
+ Addr uint32
+ Nodeid [8]int8
+ User_id [8]int8
+ Name [8]int8
+}
+
+type RawSockaddrNFC struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type PacketMreq struct {
+ Ifindex int32
+ Type uint16
+ Alen uint16
+ Address [8]uint8
+}
+
+type Inet4Pktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Data [8]uint32
+}
+
+type Ucred struct {
+ Pid int32
+ Uid uint32
+ Gid uint32
+}
+
+type TCPInfo struct {
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+}
+
+type CanFilter struct {
+ Id uint32
+ Mask uint32
+}
+
+type TCPRepairOpt struct {
+ Code uint32
+ Val uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x70
+ SizeofSockaddrUnix = 0x6e
+ SizeofSockaddrLinklayer = 0x14
+ SizeofSockaddrNetlink = 0xc
+ SizeofSockaddrHCI = 0x6
+ SizeofSockaddrL2 = 0xe
+ SizeofSockaddrRFCOMM = 0xa
+ SizeofSockaddrCAN = 0x18
+ SizeofSockaddrALG = 0x58
+ SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
+ SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
+ SizeofSockaddrL2TPIP = 0x10
+ SizeofSockaddrL2TPIP6 = 0x20
+ SizeofSockaddrIUCV = 0x20
+ SizeofSockaddrNFC = 0x10
+ SizeofLinger = 0x8
+ SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
+ SizeofIPv6Mreq = 0x14
+ SizeofPacketMreq = 0x10
+ SizeofInet4Pktinfo = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+ SizeofUcred = 0xc
+ SizeofTCPInfo = 0x68
+ SizeofCanFilter = 0x8
+ SizeofTCPRepairOpt = 0x8
+)
+
+const (
+ NDA_UNSPEC = 0x0
+ NDA_DST = 0x1
+ NDA_LLADDR = 0x2
+ NDA_CACHEINFO = 0x3
+ NDA_PROBES = 0x4
+ NDA_VLAN = 0x5
+ NDA_PORT = 0x6
+ NDA_VNI = 0x7
+ NDA_IFINDEX = 0x8
+ NDA_MASTER = 0x9
+ NDA_LINK_NETNSID = 0xa
+ NDA_SRC_VNI = 0xb
+ NTF_USE = 0x1
+ NTF_SELF = 0x2
+ NTF_MASTER = 0x4
+ NTF_PROXY = 0x8
+ NTF_EXT_LEARNED = 0x10
+ NTF_OFFLOADED = 0x20
+ NTF_ROUTER = 0x80
+ NUD_INCOMPLETE = 0x1
+ NUD_REACHABLE = 0x2
+ NUD_STALE = 0x4
+ NUD_DELAY = 0x8
+ NUD_PROBE = 0x10
+ NUD_FAILED = 0x20
+ NUD_NOARP = 0x40
+ NUD_PERMANENT = 0x80
+ NUD_NONE = 0x0
+ IFA_UNSPEC = 0x0
+ IFA_ADDRESS = 0x1
+ IFA_LOCAL = 0x2
+ IFA_LABEL = 0x3
+ IFA_BROADCAST = 0x4
+ IFA_ANYCAST = 0x5
+ IFA_CACHEINFO = 0x6
+ IFA_MULTICAST = 0x7
+ IFA_FLAGS = 0x8
+ IFA_RT_PRIORITY = 0x9
+ IFA_TARGET_NETNSID = 0xa
+ RT_SCOPE_UNIVERSE = 0x0
+ RT_SCOPE_SITE = 0xc8
+ RT_SCOPE_LINK = 0xfd
+ RT_SCOPE_HOST = 0xfe
+ RT_SCOPE_NOWHERE = 0xff
+ RT_TABLE_UNSPEC = 0x0
+ RT_TABLE_COMPAT = 0xfc
+ RT_TABLE_DEFAULT = 0xfd
+ RT_TABLE_MAIN = 0xfe
+ RT_TABLE_LOCAL = 0xff
+ RT_TABLE_MAX = 0xffffffff
+ RTA_UNSPEC = 0x0
+ RTA_DST = 0x1
+ RTA_SRC = 0x2
+ RTA_IIF = 0x3
+ RTA_OIF = 0x4
+ RTA_GATEWAY = 0x5
+ RTA_PRIORITY = 0x6
+ RTA_PREFSRC = 0x7
+ RTA_METRICS = 0x8
+ RTA_MULTIPATH = 0x9
+ RTA_FLOW = 0xb
+ RTA_CACHEINFO = 0xc
+ RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
+ RTN_UNSPEC = 0x0
+ RTN_UNICAST = 0x1
+ RTN_LOCAL = 0x2
+ RTN_BROADCAST = 0x3
+ RTN_ANYCAST = 0x4
+ RTN_MULTICAST = 0x5
+ RTN_BLACKHOLE = 0x6
+ RTN_UNREACHABLE = 0x7
+ RTN_PROHIBIT = 0x8
+ RTN_THROW = 0x9
+ RTN_NAT = 0xa
+ RTN_XRESOLVE = 0xb
+ SizeofNlMsghdr = 0x10
+ SizeofNlMsgerr = 0x14
+ SizeofRtGenmsg = 0x1
+ SizeofNlAttr = 0x4
+ SizeofRtAttr = 0x4
+ SizeofIfInfomsg = 0x10
+ SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
+ SizeofRtMsg = 0xc
+ SizeofRtNexthop = 0x8
+ SizeofNdUseroptmsg = 0x10
+ SizeofNdMsg = 0xc
+)
+
+type NlMsghdr struct {
+ Len uint32
+ Type uint16
+ Flags uint16
+ Seq uint32
+ Pid uint32
+}
+
+type NlMsgerr struct {
+ Error int32
+ Msg NlMsghdr
+}
+
+type RtGenmsg struct {
+ Family uint8
+}
+
+type NlAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type RtAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type IfInfomsg struct {
+ Family uint8
+ _ uint8
+ Type uint16
+ Index int32
+ Flags uint32
+ Change uint32
+}
+
+type IfAddrmsg struct {
+ Family uint8
+ Prefixlen uint8
+ Flags uint8
+ Scope uint8
+ Index uint32
+}
+
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
+type RtMsg struct {
+ Family uint8
+ Dst_len uint8
+ Src_len uint8
+ Tos uint8
+ Table uint8
+ Protocol uint8
+ Scope uint8
+ Type uint8
+ Flags uint32
+}
+
+type RtNexthop struct {
+ Len uint16
+ Flags uint8
+ Hops uint8
+ Ifindex int32
+}
+
+type NdUseroptmsg struct {
+ Family uint8
+ Pad1 uint8
+ Opts_len uint16
+ Ifindex int32
+ Icmp_type uint8
+ Icmp_code uint8
+ Pad2 uint16
+ Pad3 uint32
+}
+
+type NdMsg struct {
+ Family uint8
+ Pad1 uint8
+ Pad2 uint16
+ Ifindex int32
+ State uint16
+ Flags uint8
+ Type uint8
+}
+
+const (
+ ICMP_FILTER = 0x1
+
+ ICMPV6_FILTER = 0x1
+ ICMPV6_FILTER_BLOCK = 0x1
+ ICMPV6_FILTER_BLOCKOTHERS = 0x3
+ ICMPV6_FILTER_PASS = 0x2
+ ICMPV6_FILTER_PASSONLY = 0x4
+)
+
+const (
+ SizeofSockFilter = 0x8
+)
+
+type SockFilter struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type SockFprog struct {
+ Len uint16
+ Filter *SockFilter
+}
+
+type InotifyEvent struct {
+ Wd int32
+ Mask uint32
+ Cookie uint32
+ Len uint32
+}
+
+const SizeofInotifyEvent = 0x10
+
+const SI_LOAD_SHIFT = 0x10
+
+type Utsname struct {
+ Sysname [65]byte
+ Nodename [65]byte
+ Release [65]byte
+ Version [65]byte
+ Machine [65]byte
+ Domainname [65]byte
+}
+
+const (
+ AT_EMPTY_PATH = 0x1000
+ AT_FDCWD = -0x64
+ AT_NO_AUTOMOUNT = 0x800
+ AT_REMOVEDIR = 0x200
+
+ AT_STATX_SYNC_AS_STAT = 0x0
+ AT_STATX_FORCE_SYNC = 0x2000
+ AT_STATX_DONT_SYNC = 0x4000
+
+ AT_RECURSIVE = 0x8000
+
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_SYMLINK_NOFOLLOW = 0x100
+
+ AT_EACCESS = 0x200
+)
+
+type OpenHow struct {
+ Flags uint64
+ Mode uint64
+ Resolve uint64
+}
+
+const SizeofOpenHow = 0x18
+
+const (
+ RESOLVE_BENEATH = 0x8
+ RESOLVE_IN_ROOT = 0x10
+ RESOLVE_NO_MAGICLINKS = 0x2
+ RESOLVE_NO_SYMLINKS = 0x4
+ RESOLVE_NO_XDEV = 0x1
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLIN = 0x1
+ POLLPRI = 0x2
+ POLLOUT = 0x4
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLNVAL = 0x20
+)
+
+type SignalfdSiginfo struct {
+ Signo uint32
+ Errno int32
+ Code int32
+ Pid uint32
+ Uid uint32
+ Fd int32
+ Tid uint32
+ Band uint32
+ Overrun uint32
+ Trapno uint32
+ Status int32
+ Int int32
+ Ptr uint64
+ Utime uint64
+ Stime uint64
+ Addr uint64
+ Addr_lsb uint16
+ _ uint16
+ Syscall int32
+ Call_addr uint64
+ Arch uint32
+ _ [28]uint8
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ TASKSTATS_CMD_UNSPEC = 0x0
+ TASKSTATS_CMD_GET = 0x1
+ TASKSTATS_CMD_NEW = 0x2
+ TASKSTATS_TYPE_UNSPEC = 0x0
+ TASKSTATS_TYPE_PID = 0x1
+ TASKSTATS_TYPE_TGID = 0x2
+ TASKSTATS_TYPE_STATS = 0x3
+ TASKSTATS_TYPE_AGGR_PID = 0x4
+ TASKSTATS_TYPE_AGGR_TGID = 0x5
+ TASKSTATS_TYPE_NULL = 0x6
+ TASKSTATS_CMD_ATTR_UNSPEC = 0x0
+ TASKSTATS_CMD_ATTR_PID = 0x1
+ TASKSTATS_CMD_ATTR_TGID = 0x2
+ TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
+ TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
+)
+
+type CGroupStats struct {
+ Sleeping uint64
+ Running uint64
+ Stopped uint64
+ Uninterruptible uint64
+ Io_wait uint64
+}
+
+const (
+ CGROUPSTATS_CMD_UNSPEC = 0x3
+ CGROUPSTATS_CMD_GET = 0x4
+ CGROUPSTATS_CMD_NEW = 0x5
+ CGROUPSTATS_TYPE_UNSPEC = 0x0
+ CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
+ CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
+ CGROUPSTATS_CMD_ATTR_FD = 0x1
+)
+
+type Genlmsghdr struct {
+ Cmd uint8
+ Version uint8
+ Reserved uint16
+}
+
+const (
+ CTRL_CMD_UNSPEC = 0x0
+ CTRL_CMD_NEWFAMILY = 0x1
+ CTRL_CMD_DELFAMILY = 0x2
+ CTRL_CMD_GETFAMILY = 0x3
+ CTRL_CMD_NEWOPS = 0x4
+ CTRL_CMD_DELOPS = 0x5
+ CTRL_CMD_GETOPS = 0x6
+ CTRL_CMD_NEWMCAST_GRP = 0x7
+ CTRL_CMD_DELMCAST_GRP = 0x8
+ CTRL_CMD_GETMCAST_GRP = 0x9
+ CTRL_CMD_GETPOLICY = 0xa
+ CTRL_ATTR_UNSPEC = 0x0
+ CTRL_ATTR_FAMILY_ID = 0x1
+ CTRL_ATTR_FAMILY_NAME = 0x2
+ CTRL_ATTR_VERSION = 0x3
+ CTRL_ATTR_HDRSIZE = 0x4
+ CTRL_ATTR_MAXATTR = 0x5
+ CTRL_ATTR_OPS = 0x6
+ CTRL_ATTR_MCAST_GROUPS = 0x7
+ CTRL_ATTR_POLICY = 0x8
+ CTRL_ATTR_OP_POLICY = 0x9
+ CTRL_ATTR_OP = 0xa
+ CTRL_ATTR_OP_UNSPEC = 0x0
+ CTRL_ATTR_OP_ID = 0x1
+ CTRL_ATTR_OP_FLAGS = 0x2
+ CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
+ CTRL_ATTR_MCAST_GRP_NAME = 0x1
+ CTRL_ATTR_MCAST_GRP_ID = 0x2
+ CTRL_ATTR_POLICY_UNSPEC = 0x0
+ CTRL_ATTR_POLICY_DO = 0x1
+ CTRL_ATTR_POLICY_DUMP = 0x2
+ CTRL_ATTR_POLICY_DUMP_MAX = 0x2
+)
+
+const (
+ _CPU_SETSIZE = 0x400
+)
+
+const (
+ BDADDR_BREDR = 0x0
+ BDADDR_LE_PUBLIC = 0x1
+ BDADDR_LE_RANDOM = 0x2
+)
+
+type PerfEventAttr struct {
+ Type uint32
+ Size uint32
+ Config uint64
+ Sample uint64
+ Sample_type uint64
+ Read_format uint64
+ Bits uint64
+ Wakeup uint32
+ Bp_type uint32
+ Ext1 uint64
+ Ext2 uint64
+ Branch_sample_type uint64
+ Sample_regs_user uint64
+ Sample_stack_user uint32
+ Clockid int32
+ Sample_regs_intr uint64
+ Aux_watermark uint32
+ Sample_max_stack uint16
+ _ uint16
+}
+
+type PerfEventMmapPage struct {
+ Version uint32
+ Compat_version uint32
+ Lock uint32
+ Index uint32
+ Offset int64
+ Time_enabled uint64
+ Time_running uint64
+ Capabilities uint64
+ Pmc_width uint16
+ Time_shift uint16
+ Time_mult uint32
+ Time_offset uint64
+ Time_zero uint64
+ Size uint32
+ _ uint32
+ Time_cycles uint64
+ Time_mask uint64
+ _ [928]uint8
+ Data_head uint64
+ Data_tail uint64
+ Data_offset uint64
+ Data_size uint64
+ Aux_head uint64
+ Aux_tail uint64
+ Aux_offset uint64
+ Aux_size uint64
+}
+
+const (
+ PerfBitDisabled uint64 = CBitFieldMaskBit0
+ PerfBitInherit = CBitFieldMaskBit1
+ PerfBitPinned = CBitFieldMaskBit2
+ PerfBitExclusive = CBitFieldMaskBit3
+ PerfBitExcludeUser = CBitFieldMaskBit4
+ PerfBitExcludeKernel = CBitFieldMaskBit5
+ PerfBitExcludeHv = CBitFieldMaskBit6
+ PerfBitExcludeIdle = CBitFieldMaskBit7
+ PerfBitMmap = CBitFieldMaskBit8
+ PerfBitComm = CBitFieldMaskBit9
+ PerfBitFreq = CBitFieldMaskBit10
+ PerfBitInheritStat = CBitFieldMaskBit11
+ PerfBitEnableOnExec = CBitFieldMaskBit12
+ PerfBitTask = CBitFieldMaskBit13
+ PerfBitWatermark = CBitFieldMaskBit14
+ PerfBitPreciseIPBit1 = CBitFieldMaskBit15
+ PerfBitPreciseIPBit2 = CBitFieldMaskBit16
+ PerfBitMmapData = CBitFieldMaskBit17
+ PerfBitSampleIDAll = CBitFieldMaskBit18
+ PerfBitExcludeHost = CBitFieldMaskBit19
+ PerfBitExcludeGuest = CBitFieldMaskBit20
+ PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
+ PerfBitExcludeCallchainUser = CBitFieldMaskBit22
+ PerfBitMmap2 = CBitFieldMaskBit23
+ PerfBitCommExec = CBitFieldMaskBit24
+ PerfBitUseClockID = CBitFieldMaskBit25
+ PerfBitContextSwitch = CBitFieldMaskBit26
+)
+
+const (
+ PERF_TYPE_HARDWARE = 0x0
+ PERF_TYPE_SOFTWARE = 0x1
+ PERF_TYPE_TRACEPOINT = 0x2
+ PERF_TYPE_HW_CACHE = 0x3
+ PERF_TYPE_RAW = 0x4
+ PERF_TYPE_BREAKPOINT = 0x5
+ PERF_TYPE_MAX = 0x6
+ PERF_COUNT_HW_CPU_CYCLES = 0x0
+ PERF_COUNT_HW_INSTRUCTIONS = 0x1
+ PERF_COUNT_HW_CACHE_REFERENCES = 0x2
+ PERF_COUNT_HW_CACHE_MISSES = 0x3
+ PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
+ PERF_COUNT_HW_BRANCH_MISSES = 0x5
+ PERF_COUNT_HW_BUS_CYCLES = 0x6
+ PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
+ PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
+ PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
+ PERF_COUNT_HW_MAX = 0xa
+ PERF_COUNT_HW_CACHE_L1D = 0x0
+ PERF_COUNT_HW_CACHE_L1I = 0x1
+ PERF_COUNT_HW_CACHE_LL = 0x2
+ PERF_COUNT_HW_CACHE_DTLB = 0x3
+ PERF_COUNT_HW_CACHE_ITLB = 0x4
+ PERF_COUNT_HW_CACHE_BPU = 0x5
+ PERF_COUNT_HW_CACHE_NODE = 0x6
+ PERF_COUNT_HW_CACHE_MAX = 0x7
+ PERF_COUNT_HW_CACHE_OP_READ = 0x0
+ PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
+ PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
+ PERF_COUNT_HW_CACHE_OP_MAX = 0x3
+ PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
+ PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
+ PERF_COUNT_HW_CACHE_RESULT_MAX = 0x2
+ PERF_COUNT_SW_CPU_CLOCK = 0x0
+ PERF_COUNT_SW_TASK_CLOCK = 0x1
+ PERF_COUNT_SW_PAGE_FAULTS = 0x2
+ PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
+ PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
+ PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
+ PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
+ PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
+ PERF_COUNT_SW_EMULATION_FAULTS = 0x8
+ PERF_COUNT_SW_DUMMY = 0x9
+ PERF_COUNT_SW_BPF_OUTPUT = 0xa
+ PERF_COUNT_SW_MAX = 0xc
+ PERF_SAMPLE_IP = 0x1
+ PERF_SAMPLE_TID = 0x2
+ PERF_SAMPLE_TIME = 0x4
+ PERF_SAMPLE_ADDR = 0x8
+ PERF_SAMPLE_READ = 0x10
+ PERF_SAMPLE_CALLCHAIN = 0x20
+ PERF_SAMPLE_ID = 0x40
+ PERF_SAMPLE_CPU = 0x80
+ PERF_SAMPLE_PERIOD = 0x100
+ PERF_SAMPLE_STREAM_ID = 0x200
+ PERF_SAMPLE_RAW = 0x400
+ PERF_SAMPLE_BRANCH_STACK = 0x800
+ PERF_SAMPLE_REGS_USER = 0x1000
+ PERF_SAMPLE_STACK_USER = 0x2000
+ PERF_SAMPLE_WEIGHT = 0x4000
+ PERF_SAMPLE_DATA_SRC = 0x8000
+ PERF_SAMPLE_IDENTIFIER = 0x10000
+ PERF_SAMPLE_TRANSACTION = 0x20000
+ PERF_SAMPLE_REGS_INTR = 0x40000
+ PERF_SAMPLE_PHYS_ADDR = 0x80000
+ PERF_SAMPLE_AUX = 0x100000
+ PERF_SAMPLE_CGROUP = 0x200000
+ PERF_SAMPLE_DATA_PAGE_SIZE = 0x400000
+ PERF_SAMPLE_CODE_PAGE_SIZE = 0x800000
+ PERF_SAMPLE_WEIGHT_STRUCT = 0x1000000
+ PERF_SAMPLE_MAX = 0x2000000
+ PERF_SAMPLE_BRANCH_USER_SHIFT = 0x0
+ PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 0x1
+ PERF_SAMPLE_BRANCH_HV_SHIFT = 0x2
+ PERF_SAMPLE_BRANCH_ANY_SHIFT = 0x3
+ PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 0x4
+ PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 0x5
+ PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 0x6
+ PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 0x7
+ PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 0x8
+ PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 0x9
+ PERF_SAMPLE_BRANCH_COND_SHIFT = 0xa
+ PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 0xb
+ PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 0xc
+ PERF_SAMPLE_BRANCH_CALL_SHIFT = 0xd
+ PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 0xe
+ PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 0xf
+ PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 0x10
+ PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 0x11
+ PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x12
+ PERF_SAMPLE_BRANCH_USER = 0x1
+ PERF_SAMPLE_BRANCH_KERNEL = 0x2
+ PERF_SAMPLE_BRANCH_HV = 0x4
+ PERF_SAMPLE_BRANCH_ANY = 0x8
+ PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
+ PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
+ PERF_SAMPLE_BRANCH_IND_CALL = 0x40
+ PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
+ PERF_SAMPLE_BRANCH_IN_TX = 0x100
+ PERF_SAMPLE_BRANCH_NO_TX = 0x200
+ PERF_SAMPLE_BRANCH_COND = 0x400
+ PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
+ PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
+ PERF_SAMPLE_BRANCH_CALL = 0x2000
+ PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
+ PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
+ PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
+ PERF_SAMPLE_BRANCH_HW_INDEX = 0x20000
+ PERF_SAMPLE_BRANCH_MAX = 0x40000
+ PERF_BR_UNKNOWN = 0x0
+ PERF_BR_COND = 0x1
+ PERF_BR_UNCOND = 0x2
+ PERF_BR_IND = 0x3
+ PERF_BR_CALL = 0x4
+ PERF_BR_IND_CALL = 0x5
+ PERF_BR_RET = 0x6
+ PERF_BR_SYSCALL = 0x7
+ PERF_BR_SYSRET = 0x8
+ PERF_BR_COND_CALL = 0x9
+ PERF_BR_COND_RET = 0xa
+ PERF_BR_MAX = 0xb
+ PERF_SAMPLE_REGS_ABI_NONE = 0x0
+ PERF_SAMPLE_REGS_ABI_32 = 0x1
+ PERF_SAMPLE_REGS_ABI_64 = 0x2
+ PERF_TXN_ELISION = 0x1
+ PERF_TXN_TRANSACTION = 0x2
+ PERF_TXN_SYNC = 0x4
+ PERF_TXN_ASYNC = 0x8
+ PERF_TXN_RETRY = 0x10
+ PERF_TXN_CONFLICT = 0x20
+ PERF_TXN_CAPACITY_WRITE = 0x40
+ PERF_TXN_CAPACITY_READ = 0x80
+ PERF_TXN_MAX = 0x100
+ PERF_TXN_ABORT_MASK = -0x100000000
+ PERF_TXN_ABORT_SHIFT = 0x20
+ PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
+ PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
+ PERF_FORMAT_ID = 0x4
+ PERF_FORMAT_GROUP = 0x8
+ PERF_FORMAT_MAX = 0x10
+ PERF_IOC_FLAG_GROUP = 0x1
+ PERF_RECORD_MMAP = 0x1
+ PERF_RECORD_LOST = 0x2
+ PERF_RECORD_COMM = 0x3
+ PERF_RECORD_EXIT = 0x4
+ PERF_RECORD_THROTTLE = 0x5
+ PERF_RECORD_UNTHROTTLE = 0x6
+ PERF_RECORD_FORK = 0x7
+ PERF_RECORD_READ = 0x8
+ PERF_RECORD_SAMPLE = 0x9
+ PERF_RECORD_MMAP2 = 0xa
+ PERF_RECORD_AUX = 0xb
+ PERF_RECORD_ITRACE_START = 0xc
+ PERF_RECORD_LOST_SAMPLES = 0xd
+ PERF_RECORD_SWITCH = 0xe
+ PERF_RECORD_SWITCH_CPU_WIDE = 0xf
+ PERF_RECORD_NAMESPACES = 0x10
+ PERF_RECORD_KSYMBOL = 0x11
+ PERF_RECORD_BPF_EVENT = 0x12
+ PERF_RECORD_CGROUP = 0x13
+ PERF_RECORD_TEXT_POKE = 0x14
+ PERF_RECORD_MAX = 0x15
+ PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0
+ PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1
+ PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2
+ PERF_RECORD_KSYMBOL_TYPE_MAX = 0x3
+ PERF_BPF_EVENT_UNKNOWN = 0x0
+ PERF_BPF_EVENT_PROG_LOAD = 0x1
+ PERF_BPF_EVENT_PROG_UNLOAD = 0x2
+ PERF_BPF_EVENT_MAX = 0x3
+ PERF_CONTEXT_HV = -0x20
+ PERF_CONTEXT_KERNEL = -0x80
+ PERF_CONTEXT_USER = -0x200
+ PERF_CONTEXT_GUEST = -0x800
+ PERF_CONTEXT_GUEST_KERNEL = -0x880
+ PERF_CONTEXT_GUEST_USER = -0xa00
+ PERF_CONTEXT_MAX = -0xfff
+)
+
+type TCPMD5Sig struct {
+ Addr SockaddrStorage
+ Flags uint8
+ Prefixlen uint8
+ Keylen uint16
+ _ uint32
+ Key [80]uint8
+}
+
+type HDDriveCmdHdr struct {
+ Command uint8
+ Number uint8
+ Feature uint8
+ Count uint8
+}
+
+type HDDriveID struct {
+ Config uint16
+ Cyls uint16
+ Reserved2 uint16
+ Heads uint16
+ Track_bytes uint16
+ Sector_bytes uint16
+ Sectors uint16
+ Vendor0 uint16
+ Vendor1 uint16
+ Vendor2 uint16
+ Serial_no [20]uint8
+ Buf_type uint16
+ Buf_size uint16
+ Ecc_bytes uint16
+ Fw_rev [8]uint8
+ Model [40]uint8
+ Max_multsect uint8
+ Vendor3 uint8
+ Dword_io uint16
+ Vendor4 uint8
+ Capability uint8
+ Reserved50 uint16
+ Vendor5 uint8
+ TPIO uint8
+ Vendor6 uint8
+ TDMA uint8
+ Field_valid uint16
+ Cur_cyls uint16
+ Cur_heads uint16
+ Cur_sectors uint16
+ Cur_capacity0 uint16
+ Cur_capacity1 uint16
+ Multsect uint8
+ Multsect_valid uint8
+ Lba_capacity uint32
+ Dma_1word uint16
+ Dma_mword uint16
+ Eide_pio_modes uint16
+ Eide_dma_min uint16
+ Eide_dma_time uint16
+ Eide_pio uint16
+ Eide_pio_iordy uint16
+ Words69_70 [2]uint16
+ Words71_74 [4]uint16
+ Queue_depth uint16
+ Words76_79 [4]uint16
+ Major_rev_num uint16
+ Minor_rev_num uint16
+ Command_set_1 uint16
+ Command_set_2 uint16
+ Cfsse uint16
+ Cfs_enable_1 uint16
+ Cfs_enable_2 uint16
+ Csf_default uint16
+ Dma_ultra uint16
+ Trseuc uint16
+ TrsEuc uint16
+ CurAPMvalues uint16
+ Mprc uint16
+ Hw_config uint16
+ Acoustic uint16
+ Msrqs uint16
+ Sxfert uint16
+ Sal uint16
+ Spg uint32
+ Lba_capacity_2 uint64
+ Words104_125 [22]uint16
+ Last_lun uint16
+ Word127 uint16
+ Dlf uint16
+ Csfo uint16
+ Words130_155 [26]uint16
+ Word156 uint16
+ Words157_159 [3]uint16
+ Cfa_power uint16
+ Words161_175 [15]uint16
+ Words176_205 [30]uint16
+ Words206_254 [49]uint16
+ Integrity_word uint16
+}
+
+const (
+ ST_MANDLOCK = 0x40
+ ST_NOATIME = 0x400
+ ST_NODEV = 0x4
+ ST_NODIRATIME = 0x800
+ ST_NOEXEC = 0x8
+ ST_NOSUID = 0x2
+ ST_RDONLY = 0x1
+ ST_RELATIME = 0x1000
+ ST_SYNCHRONOUS = 0x10
+)
+
+type Tpacket2Hdr struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Nsec uint32
+ Vlan_tci uint16
+ Vlan_tpid uint16
+ _ [4]uint8
+}
+
+type Tpacket3Hdr struct {
+ Next_offset uint32
+ Sec uint32
+ Nsec uint32
+ Snaplen uint32
+ Len uint32
+ Status uint32
+ Mac uint16
+ Net uint16
+ Hv1 TpacketHdrVariant1
+ _ [8]uint8
+}
+
+type TpacketHdrVariant1 struct {
+ Rxhash uint32
+ Vlan_tci uint32
+ Vlan_tpid uint16
+ _ uint16
+}
+
+type TpacketBlockDesc struct {
+ Version uint32
+ To_priv uint32
+ Hdr [40]byte
+}
+
+type TpacketBDTS struct {
+ Sec uint32
+ Usec uint32
+}
+
+type TpacketHdrV1 struct {
+ Block_status uint32
+ Num_pkts uint32
+ Offset_to_first_pkt uint32
+ Blk_len uint32
+ Seq_num uint64
+ Ts_first_pkt TpacketBDTS
+ Ts_last_pkt TpacketBDTS
+}
+
+type TpacketReq struct {
+ Block_size uint32
+ Block_nr uint32
+ Frame_size uint32
+ Frame_nr uint32
+}
+
+type TpacketReq3 struct {
+ Block_size uint32
+ Block_nr uint32
+ Frame_size uint32
+ Frame_nr uint32
+ Retire_blk_tov uint32
+ Sizeof_priv uint32
+ Feature_req_word uint32
+}
+
+type TpacketStats struct {
+ Packets uint32
+ Drops uint32
+}
+
+type TpacketStatsV3 struct {
+ Packets uint32
+ Drops uint32
+ Freeze_q_cnt uint32
+}
+
+type TpacketAuxdata struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Vlan_tci uint16
+ Vlan_tpid uint16
+}
+
+const (
+ TPACKET_V1 = 0x0
+ TPACKET_V2 = 0x1
+ TPACKET_V3 = 0x2
+)
+
+const (
+ SizeofTpacket2Hdr = 0x20
+ SizeofTpacket3Hdr = 0x30
+
+ SizeofTpacketStats = 0x8
+ SizeofTpacketStatsV3 = 0xc
+)
+
+const (
+ IFLA_UNSPEC = 0x0
+ IFLA_ADDRESS = 0x1
+ IFLA_BROADCAST = 0x2
+ IFLA_IFNAME = 0x3
+ IFLA_MTU = 0x4
+ IFLA_LINK = 0x5
+ IFLA_QDISC = 0x6
+ IFLA_STATS = 0x7
+ IFLA_COST = 0x8
+ IFLA_PRIORITY = 0x9
+ IFLA_MASTER = 0xa
+ IFLA_WIRELESS = 0xb
+ IFLA_PROTINFO = 0xc
+ IFLA_TXQLEN = 0xd
+ IFLA_MAP = 0xe
+ IFLA_WEIGHT = 0xf
+ IFLA_OPERSTATE = 0x10
+ IFLA_LINKMODE = 0x11
+ IFLA_LINKINFO = 0x12
+ IFLA_NET_NS_PID = 0x13
+ IFLA_IFALIAS = 0x14
+ IFLA_NUM_VF = 0x15
+ IFLA_VFINFO_LIST = 0x16
+ IFLA_STATS64 = 0x17
+ IFLA_VF_PORTS = 0x18
+ IFLA_PORT_SELF = 0x19
+ IFLA_AF_SPEC = 0x1a
+ IFLA_GROUP = 0x1b
+ IFLA_NET_NS_FD = 0x1c
+ IFLA_EXT_MASK = 0x1d
+ IFLA_PROMISCUITY = 0x1e
+ IFLA_NUM_TX_QUEUES = 0x1f
+ IFLA_NUM_RX_QUEUES = 0x20
+ IFLA_CARRIER = 0x21
+ IFLA_PHYS_PORT_ID = 0x22
+ IFLA_CARRIER_CHANGES = 0x23
+ IFLA_PHYS_SWITCH_ID = 0x24
+ IFLA_LINK_NETNSID = 0x25
+ IFLA_PHYS_PORT_NAME = 0x26
+ IFLA_PROTO_DOWN = 0x27
+ IFLA_GSO_MAX_SEGS = 0x28
+ IFLA_GSO_MAX_SIZE = 0x29
+ IFLA_PAD = 0x2a
+ IFLA_XDP = 0x2b
+ IFLA_EVENT = 0x2c
+ IFLA_NEW_NETNSID = 0x2d
+ IFLA_IF_NETNSID = 0x2e
+ IFLA_TARGET_NETNSID = 0x2e
+ IFLA_CARRIER_UP_COUNT = 0x2f
+ IFLA_CARRIER_DOWN_COUNT = 0x30
+ IFLA_NEW_IFINDEX = 0x31
+ IFLA_MIN_MTU = 0x32
+ IFLA_MAX_MTU = 0x33
+ IFLA_PROP_LIST = 0x34
+ IFLA_ALT_IFNAME = 0x35
+ IFLA_PERM_ADDRESS = 0x36
+ IFLA_PROTO_DOWN_REASON = 0x37
+ IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0
+ IFLA_PROTO_DOWN_REASON_MASK = 0x1
+ IFLA_PROTO_DOWN_REASON_VALUE = 0x2
+ IFLA_PROTO_DOWN_REASON_MAX = 0x2
+ IFLA_INET_UNSPEC = 0x0
+ IFLA_INET_CONF = 0x1
+ IFLA_INET6_UNSPEC = 0x0
+ IFLA_INET6_FLAGS = 0x1
+ IFLA_INET6_CONF = 0x2
+ IFLA_INET6_STATS = 0x3
+ IFLA_INET6_MCAST = 0x4
+ IFLA_INET6_CACHEINFO = 0x5
+ IFLA_INET6_ICMP6STATS = 0x6
+ IFLA_INET6_TOKEN = 0x7
+ IFLA_INET6_ADDR_GEN_MODE = 0x8
+ IFLA_BR_UNSPEC = 0x0
+ IFLA_BR_FORWARD_DELAY = 0x1
+ IFLA_BR_HELLO_TIME = 0x2
+ IFLA_BR_MAX_AGE = 0x3
+ IFLA_BR_AGEING_TIME = 0x4
+ IFLA_BR_STP_STATE = 0x5
+ IFLA_BR_PRIORITY = 0x6
+ IFLA_BR_VLAN_FILTERING = 0x7
+ IFLA_BR_VLAN_PROTOCOL = 0x8
+ IFLA_BR_GROUP_FWD_MASK = 0x9
+ IFLA_BR_ROOT_ID = 0xa
+ IFLA_BR_BRIDGE_ID = 0xb
+ IFLA_BR_ROOT_PORT = 0xc
+ IFLA_BR_ROOT_PATH_COST = 0xd
+ IFLA_BR_TOPOLOGY_CHANGE = 0xe
+ IFLA_BR_TOPOLOGY_CHANGE_DETECTED = 0xf
+ IFLA_BR_HELLO_TIMER = 0x10
+ IFLA_BR_TCN_TIMER = 0x11
+ IFLA_BR_TOPOLOGY_CHANGE_TIMER = 0x12
+ IFLA_BR_GC_TIMER = 0x13
+ IFLA_BR_GROUP_ADDR = 0x14
+ IFLA_BR_FDB_FLUSH = 0x15
+ IFLA_BR_MCAST_ROUTER = 0x16
+ IFLA_BR_MCAST_SNOOPING = 0x17
+ IFLA_BR_MCAST_QUERY_USE_IFADDR = 0x18
+ IFLA_BR_MCAST_QUERIER = 0x19
+ IFLA_BR_MCAST_HASH_ELASTICITY = 0x1a
+ IFLA_BR_MCAST_HASH_MAX = 0x1b
+ IFLA_BR_MCAST_LAST_MEMBER_CNT = 0x1c
+ IFLA_BR_MCAST_STARTUP_QUERY_CNT = 0x1d
+ IFLA_BR_MCAST_LAST_MEMBER_INTVL = 0x1e
+ IFLA_BR_MCAST_MEMBERSHIP_INTVL = 0x1f
+ IFLA_BR_MCAST_QUERIER_INTVL = 0x20
+ IFLA_BR_MCAST_QUERY_INTVL = 0x21
+ IFLA_BR_MCAST_QUERY_RESPONSE_INTVL = 0x22
+ IFLA_BR_MCAST_STARTUP_QUERY_INTVL = 0x23
+ IFLA_BR_NF_CALL_IPTABLES = 0x24
+ IFLA_BR_NF_CALL_IP6TABLES = 0x25
+ IFLA_BR_NF_CALL_ARPTABLES = 0x26
+ IFLA_BR_VLAN_DEFAULT_PVID = 0x27
+ IFLA_BR_PAD = 0x28
+ IFLA_BR_VLAN_STATS_ENABLED = 0x29
+ IFLA_BR_MCAST_STATS_ENABLED = 0x2a
+ IFLA_BR_MCAST_IGMP_VERSION = 0x2b
+ IFLA_BR_MCAST_MLD_VERSION = 0x2c
+ IFLA_BR_VLAN_STATS_PER_PORT = 0x2d
+ IFLA_BR_MULTI_BOOLOPT = 0x2e
+ IFLA_BRPORT_UNSPEC = 0x0
+ IFLA_BRPORT_STATE = 0x1
+ IFLA_BRPORT_PRIORITY = 0x2
+ IFLA_BRPORT_COST = 0x3
+ IFLA_BRPORT_MODE = 0x4
+ IFLA_BRPORT_GUARD = 0x5
+ IFLA_BRPORT_PROTECT = 0x6
+ IFLA_BRPORT_FAST_LEAVE = 0x7
+ IFLA_BRPORT_LEARNING = 0x8
+ IFLA_BRPORT_UNICAST_FLOOD = 0x9
+ IFLA_BRPORT_PROXYARP = 0xa
+ IFLA_BRPORT_LEARNING_SYNC = 0xb
+ IFLA_BRPORT_PROXYARP_WIFI = 0xc
+ IFLA_BRPORT_ROOT_ID = 0xd
+ IFLA_BRPORT_BRIDGE_ID = 0xe
+ IFLA_BRPORT_DESIGNATED_PORT = 0xf
+ IFLA_BRPORT_DESIGNATED_COST = 0x10
+ IFLA_BRPORT_ID = 0x11
+ IFLA_BRPORT_NO = 0x12
+ IFLA_BRPORT_TOPOLOGY_CHANGE_ACK = 0x13
+ IFLA_BRPORT_CONFIG_PENDING = 0x14
+ IFLA_BRPORT_MESSAGE_AGE_TIMER = 0x15
+ IFLA_BRPORT_FORWARD_DELAY_TIMER = 0x16
+ IFLA_BRPORT_HOLD_TIMER = 0x17
+ IFLA_BRPORT_FLUSH = 0x18
+ IFLA_BRPORT_MULTICAST_ROUTER = 0x19
+ IFLA_BRPORT_PAD = 0x1a
+ IFLA_BRPORT_MCAST_FLOOD = 0x1b
+ IFLA_BRPORT_MCAST_TO_UCAST = 0x1c
+ IFLA_BRPORT_VLAN_TUNNEL = 0x1d
+ IFLA_BRPORT_BCAST_FLOOD = 0x1e
+ IFLA_BRPORT_GROUP_FWD_MASK = 0x1f
+ IFLA_BRPORT_NEIGH_SUPPRESS = 0x20
+ IFLA_BRPORT_ISOLATED = 0x21
+ IFLA_BRPORT_BACKUP_PORT = 0x22
+ IFLA_BRPORT_MRP_RING_OPEN = 0x23
+ IFLA_BRPORT_MRP_IN_OPEN = 0x24
+ IFLA_INFO_UNSPEC = 0x0
+ IFLA_INFO_KIND = 0x1
+ IFLA_INFO_DATA = 0x2
+ IFLA_INFO_XSTATS = 0x3
+ IFLA_INFO_SLAVE_KIND = 0x4
+ IFLA_INFO_SLAVE_DATA = 0x5
+ IFLA_VLAN_UNSPEC = 0x0
+ IFLA_VLAN_ID = 0x1
+ IFLA_VLAN_FLAGS = 0x2
+ IFLA_VLAN_EGRESS_QOS = 0x3
+ IFLA_VLAN_INGRESS_QOS = 0x4
+ IFLA_VLAN_PROTOCOL = 0x5
+ IFLA_VLAN_QOS_UNSPEC = 0x0
+ IFLA_VLAN_QOS_MAPPING = 0x1
+ IFLA_MACVLAN_UNSPEC = 0x0
+ IFLA_MACVLAN_MODE = 0x1
+ IFLA_MACVLAN_FLAGS = 0x2
+ IFLA_MACVLAN_MACADDR_MODE = 0x3
+ IFLA_MACVLAN_MACADDR = 0x4
+ IFLA_MACVLAN_MACADDR_DATA = 0x5
+ IFLA_MACVLAN_MACADDR_COUNT = 0x6
+ IFLA_VRF_UNSPEC = 0x0
+ IFLA_VRF_TABLE = 0x1
+ IFLA_VRF_PORT_UNSPEC = 0x0
+ IFLA_VRF_PORT_TABLE = 0x1
+ IFLA_MACSEC_UNSPEC = 0x0
+ IFLA_MACSEC_SCI = 0x1
+ IFLA_MACSEC_PORT = 0x2
+ IFLA_MACSEC_ICV_LEN = 0x3
+ IFLA_MACSEC_CIPHER_SUITE = 0x4
+ IFLA_MACSEC_WINDOW = 0x5
+ IFLA_MACSEC_ENCODING_SA = 0x6
+ IFLA_MACSEC_ENCRYPT = 0x7
+ IFLA_MACSEC_PROTECT = 0x8
+ IFLA_MACSEC_INC_SCI = 0x9
+ IFLA_MACSEC_ES = 0xa
+ IFLA_MACSEC_SCB = 0xb
+ IFLA_MACSEC_REPLAY_PROTECT = 0xc
+ IFLA_MACSEC_VALIDATION = 0xd
+ IFLA_MACSEC_PAD = 0xe
+ IFLA_MACSEC_OFFLOAD = 0xf
+ IFLA_XFRM_UNSPEC = 0x0
+ IFLA_XFRM_LINK = 0x1
+ IFLA_XFRM_IF_ID = 0x2
+ IFLA_IPVLAN_UNSPEC = 0x0
+ IFLA_IPVLAN_MODE = 0x1
+ IFLA_IPVLAN_FLAGS = 0x2
+ IFLA_VXLAN_UNSPEC = 0x0
+ IFLA_VXLAN_ID = 0x1
+ IFLA_VXLAN_GROUP = 0x2
+ IFLA_VXLAN_LINK = 0x3
+ IFLA_VXLAN_LOCAL = 0x4
+ IFLA_VXLAN_TTL = 0x5
+ IFLA_VXLAN_TOS = 0x6
+ IFLA_VXLAN_LEARNING = 0x7
+ IFLA_VXLAN_AGEING = 0x8
+ IFLA_VXLAN_LIMIT = 0x9
+ IFLA_VXLAN_PORT_RANGE = 0xa
+ IFLA_VXLAN_PROXY = 0xb
+ IFLA_VXLAN_RSC = 0xc
+ IFLA_VXLAN_L2MISS = 0xd
+ IFLA_VXLAN_L3MISS = 0xe
+ IFLA_VXLAN_PORT = 0xf
+ IFLA_VXLAN_GROUP6 = 0x10
+ IFLA_VXLAN_LOCAL6 = 0x11
+ IFLA_VXLAN_UDP_CSUM = 0x12
+ IFLA_VXLAN_UDP_ZERO_CSUM6_TX = 0x13
+ IFLA_VXLAN_UDP_ZERO_CSUM6_RX = 0x14
+ IFLA_VXLAN_REMCSUM_TX = 0x15
+ IFLA_VXLAN_REMCSUM_RX = 0x16
+ IFLA_VXLAN_GBP = 0x17
+ IFLA_VXLAN_REMCSUM_NOPARTIAL = 0x18
+ IFLA_VXLAN_COLLECT_METADATA = 0x19
+ IFLA_VXLAN_LABEL = 0x1a
+ IFLA_VXLAN_GPE = 0x1b
+ IFLA_VXLAN_TTL_INHERIT = 0x1c
+ IFLA_VXLAN_DF = 0x1d
+ IFLA_GENEVE_UNSPEC = 0x0
+ IFLA_GENEVE_ID = 0x1
+ IFLA_GENEVE_REMOTE = 0x2
+ IFLA_GENEVE_TTL = 0x3
+ IFLA_GENEVE_TOS = 0x4
+ IFLA_GENEVE_PORT = 0x5
+ IFLA_GENEVE_COLLECT_METADATA = 0x6
+ IFLA_GENEVE_REMOTE6 = 0x7
+ IFLA_GENEVE_UDP_CSUM = 0x8
+ IFLA_GENEVE_UDP_ZERO_CSUM6_TX = 0x9
+ IFLA_GENEVE_UDP_ZERO_CSUM6_RX = 0xa
+ IFLA_GENEVE_LABEL = 0xb
+ IFLA_GENEVE_TTL_INHERIT = 0xc
+ IFLA_GENEVE_DF = 0xd
+ IFLA_BAREUDP_UNSPEC = 0x0
+ IFLA_BAREUDP_PORT = 0x1
+ IFLA_BAREUDP_ETHERTYPE = 0x2
+ IFLA_BAREUDP_SRCPORT_MIN = 0x3
+ IFLA_BAREUDP_MULTIPROTO_MODE = 0x4
+ IFLA_PPP_UNSPEC = 0x0
+ IFLA_PPP_DEV_FD = 0x1
+ IFLA_GTP_UNSPEC = 0x0
+ IFLA_GTP_FD0 = 0x1
+ IFLA_GTP_FD1 = 0x2
+ IFLA_GTP_PDP_HASHSIZE = 0x3
+ IFLA_GTP_ROLE = 0x4
+ IFLA_BOND_UNSPEC = 0x0
+ IFLA_BOND_MODE = 0x1
+ IFLA_BOND_ACTIVE_SLAVE = 0x2
+ IFLA_BOND_MIIMON = 0x3
+ IFLA_BOND_UPDELAY = 0x4
+ IFLA_BOND_DOWNDELAY = 0x5
+ IFLA_BOND_USE_CARRIER = 0x6
+ IFLA_BOND_ARP_INTERVAL = 0x7
+ IFLA_BOND_ARP_IP_TARGET = 0x8
+ IFLA_BOND_ARP_VALIDATE = 0x9
+ IFLA_BOND_ARP_ALL_TARGETS = 0xa
+ IFLA_BOND_PRIMARY = 0xb
+ IFLA_BOND_PRIMARY_RESELECT = 0xc
+ IFLA_BOND_FAIL_OVER_MAC = 0xd
+ IFLA_BOND_XMIT_HASH_POLICY = 0xe
+ IFLA_BOND_RESEND_IGMP = 0xf
+ IFLA_BOND_NUM_PEER_NOTIF = 0x10
+ IFLA_BOND_ALL_SLAVES_ACTIVE = 0x11
+ IFLA_BOND_MIN_LINKS = 0x12
+ IFLA_BOND_LP_INTERVAL = 0x13
+ IFLA_BOND_PACKETS_PER_SLAVE = 0x14
+ IFLA_BOND_AD_LACP_RATE = 0x15
+ IFLA_BOND_AD_SELECT = 0x16
+ IFLA_BOND_AD_INFO = 0x17
+ IFLA_BOND_AD_ACTOR_SYS_PRIO = 0x18
+ IFLA_BOND_AD_USER_PORT_KEY = 0x19
+ IFLA_BOND_AD_ACTOR_SYSTEM = 0x1a
+ IFLA_BOND_TLB_DYNAMIC_LB = 0x1b
+ IFLA_BOND_PEER_NOTIF_DELAY = 0x1c
+ IFLA_BOND_AD_INFO_UNSPEC = 0x0
+ IFLA_BOND_AD_INFO_AGGREGATOR = 0x1
+ IFLA_BOND_AD_INFO_NUM_PORTS = 0x2
+ IFLA_BOND_AD_INFO_ACTOR_KEY = 0x3
+ IFLA_BOND_AD_INFO_PARTNER_KEY = 0x4
+ IFLA_BOND_AD_INFO_PARTNER_MAC = 0x5
+ IFLA_BOND_SLAVE_UNSPEC = 0x0
+ IFLA_BOND_SLAVE_STATE = 0x1
+ IFLA_BOND_SLAVE_MII_STATUS = 0x2
+ IFLA_BOND_SLAVE_LINK_FAILURE_COUNT = 0x3
+ IFLA_BOND_SLAVE_PERM_HWADDR = 0x4
+ IFLA_BOND_SLAVE_QUEUE_ID = 0x5
+ IFLA_BOND_SLAVE_AD_AGGREGATOR_ID = 0x6
+ IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE = 0x7
+ IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8
+ IFLA_VF_INFO_UNSPEC = 0x0
+ IFLA_VF_INFO = 0x1
+ IFLA_VF_UNSPEC = 0x0
+ IFLA_VF_MAC = 0x1
+ IFLA_VF_VLAN = 0x2
+ IFLA_VF_TX_RATE = 0x3
+ IFLA_VF_SPOOFCHK = 0x4
+ IFLA_VF_LINK_STATE = 0x5
+ IFLA_VF_RATE = 0x6
+ IFLA_VF_RSS_QUERY_EN = 0x7
+ IFLA_VF_STATS = 0x8
+ IFLA_VF_TRUST = 0x9
+ IFLA_VF_IB_NODE_GUID = 0xa
+ IFLA_VF_IB_PORT_GUID = 0xb
+ IFLA_VF_VLAN_LIST = 0xc
+ IFLA_VF_BROADCAST = 0xd
+ IFLA_VF_VLAN_INFO_UNSPEC = 0x0
+ IFLA_VF_VLAN_INFO = 0x1
+ IFLA_VF_LINK_STATE_AUTO = 0x0
+ IFLA_VF_LINK_STATE_ENABLE = 0x1
+ IFLA_VF_LINK_STATE_DISABLE = 0x2
+ IFLA_VF_STATS_RX_PACKETS = 0x0
+ IFLA_VF_STATS_TX_PACKETS = 0x1
+ IFLA_VF_STATS_RX_BYTES = 0x2
+ IFLA_VF_STATS_TX_BYTES = 0x3
+ IFLA_VF_STATS_BROADCAST = 0x4
+ IFLA_VF_STATS_MULTICAST = 0x5
+ IFLA_VF_STATS_PAD = 0x6
+ IFLA_VF_STATS_RX_DROPPED = 0x7
+ IFLA_VF_STATS_TX_DROPPED = 0x8
+ IFLA_VF_PORT_UNSPEC = 0x0
+ IFLA_VF_PORT = 0x1
+ IFLA_PORT_UNSPEC = 0x0
+ IFLA_PORT_VF = 0x1
+ IFLA_PORT_PROFILE = 0x2
+ IFLA_PORT_VSI_TYPE = 0x3
+ IFLA_PORT_INSTANCE_UUID = 0x4
+ IFLA_PORT_HOST_UUID = 0x5
+ IFLA_PORT_REQUEST = 0x6
+ IFLA_PORT_RESPONSE = 0x7
+ IFLA_IPOIB_UNSPEC = 0x0
+ IFLA_IPOIB_PKEY = 0x1
+ IFLA_IPOIB_MODE = 0x2
+ IFLA_IPOIB_UMCAST = 0x3
+ IFLA_HSR_UNSPEC = 0x0
+ IFLA_HSR_SLAVE1 = 0x1
+ IFLA_HSR_SLAVE2 = 0x2
+ IFLA_HSR_MULTICAST_SPEC = 0x3
+ IFLA_HSR_SUPERVISION_ADDR = 0x4
+ IFLA_HSR_SEQ_NR = 0x5
+ IFLA_HSR_VERSION = 0x6
+ IFLA_HSR_PROTOCOL = 0x7
+ IFLA_STATS_UNSPEC = 0x0
+ IFLA_STATS_LINK_64 = 0x1
+ IFLA_STATS_LINK_XSTATS = 0x2
+ IFLA_STATS_LINK_XSTATS_SLAVE = 0x3
+ IFLA_STATS_LINK_OFFLOAD_XSTATS = 0x4
+ IFLA_STATS_AF_SPEC = 0x5
+ IFLA_OFFLOAD_XSTATS_UNSPEC = 0x0
+ IFLA_OFFLOAD_XSTATS_CPU_HIT = 0x1
+ IFLA_XDP_UNSPEC = 0x0
+ IFLA_XDP_FD = 0x1
+ IFLA_XDP_ATTACHED = 0x2
+ IFLA_XDP_FLAGS = 0x3
+ IFLA_XDP_PROG_ID = 0x4
+ IFLA_XDP_DRV_PROG_ID = 0x5
+ IFLA_XDP_SKB_PROG_ID = 0x6
+ IFLA_XDP_HW_PROG_ID = 0x7
+ IFLA_XDP_EXPECTED_FD = 0x8
+ IFLA_EVENT_NONE = 0x0
+ IFLA_EVENT_REBOOT = 0x1
+ IFLA_EVENT_FEATURES = 0x2
+ IFLA_EVENT_BONDING_FAILOVER = 0x3
+ IFLA_EVENT_NOTIFY_PEERS = 0x4
+ IFLA_EVENT_IGMP_RESEND = 0x5
+ IFLA_EVENT_BONDING_OPTIONS = 0x6
+ IFLA_TUN_UNSPEC = 0x0
+ IFLA_TUN_OWNER = 0x1
+ IFLA_TUN_GROUP = 0x2
+ IFLA_TUN_TYPE = 0x3
+ IFLA_TUN_PI = 0x4
+ IFLA_TUN_VNET_HDR = 0x5
+ IFLA_TUN_PERSIST = 0x6
+ IFLA_TUN_MULTI_QUEUE = 0x7
+ IFLA_TUN_NUM_QUEUES = 0x8
+ IFLA_TUN_NUM_DISABLED_QUEUES = 0x9
+ IFLA_RMNET_UNSPEC = 0x0
+ IFLA_RMNET_MUX_ID = 0x1
+ IFLA_RMNET_FLAGS = 0x2
+)
+
+const (
+ NF_INET_PRE_ROUTING = 0x0
+ NF_INET_LOCAL_IN = 0x1
+ NF_INET_FORWARD = 0x2
+ NF_INET_LOCAL_OUT = 0x3
+ NF_INET_POST_ROUTING = 0x4
+ NF_INET_NUMHOOKS = 0x5
+)
+
+const (
+ NF_NETDEV_INGRESS = 0x0
+ NF_NETDEV_NUMHOOKS = 0x1
+)
+
+const (
+ NFPROTO_UNSPEC = 0x0
+ NFPROTO_INET = 0x1
+ NFPROTO_IPV4 = 0x2
+ NFPROTO_ARP = 0x3
+ NFPROTO_NETDEV = 0x5
+ NFPROTO_BRIDGE = 0x7
+ NFPROTO_IPV6 = 0xa
+ NFPROTO_DECNET = 0xc
+ NFPROTO_NUMPROTO = 0xd
+)
+
+const SO_ORIGINAL_DST = 0x50
+
+type Nfgenmsg struct {
+ Nfgen_family uint8
+ Version uint8
+ Res_id uint16
+}
+
+const (
+ NFNL_BATCH_UNSPEC = 0x0
+ NFNL_BATCH_GENID = 0x1
+)
+
+const (
+ NFT_REG_VERDICT = 0x0
+ NFT_REG_1 = 0x1
+ NFT_REG_2 = 0x2
+ NFT_REG_3 = 0x3
+ NFT_REG_4 = 0x4
+ NFT_REG32_00 = 0x8
+ NFT_REG32_01 = 0x9
+ NFT_REG32_02 = 0xa
+ NFT_REG32_03 = 0xb
+ NFT_REG32_04 = 0xc
+ NFT_REG32_05 = 0xd
+ NFT_REG32_06 = 0xe
+ NFT_REG32_07 = 0xf
+ NFT_REG32_08 = 0x10
+ NFT_REG32_09 = 0x11
+ NFT_REG32_10 = 0x12
+ NFT_REG32_11 = 0x13
+ NFT_REG32_12 = 0x14
+ NFT_REG32_13 = 0x15
+ NFT_REG32_14 = 0x16
+ NFT_REG32_15 = 0x17
+ NFT_CONTINUE = -0x1
+ NFT_BREAK = -0x2
+ NFT_JUMP = -0x3
+ NFT_GOTO = -0x4
+ NFT_RETURN = -0x5
+ NFT_MSG_NEWTABLE = 0x0
+ NFT_MSG_GETTABLE = 0x1
+ NFT_MSG_DELTABLE = 0x2
+ NFT_MSG_NEWCHAIN = 0x3
+ NFT_MSG_GETCHAIN = 0x4
+ NFT_MSG_DELCHAIN = 0x5
+ NFT_MSG_NEWRULE = 0x6
+ NFT_MSG_GETRULE = 0x7
+ NFT_MSG_DELRULE = 0x8
+ NFT_MSG_NEWSET = 0x9
+ NFT_MSG_GETSET = 0xa
+ NFT_MSG_DELSET = 0xb
+ NFT_MSG_NEWSETELEM = 0xc
+ NFT_MSG_GETSETELEM = 0xd
+ NFT_MSG_DELSETELEM = 0xe
+ NFT_MSG_NEWGEN = 0xf
+ NFT_MSG_GETGEN = 0x10
+ NFT_MSG_TRACE = 0x11
+ NFT_MSG_NEWOBJ = 0x12
+ NFT_MSG_GETOBJ = 0x13
+ NFT_MSG_DELOBJ = 0x14
+ NFT_MSG_GETOBJ_RESET = 0x15
+ NFT_MSG_MAX = 0x19
+ NFTA_LIST_UNSPEC = 0x0
+ NFTA_LIST_ELEM = 0x1
+ NFTA_HOOK_UNSPEC = 0x0
+ NFTA_HOOK_HOOKNUM = 0x1
+ NFTA_HOOK_PRIORITY = 0x2
+ NFTA_HOOK_DEV = 0x3
+ NFT_TABLE_F_DORMANT = 0x1
+ NFTA_TABLE_UNSPEC = 0x0
+ NFTA_TABLE_NAME = 0x1
+ NFTA_TABLE_FLAGS = 0x2
+ NFTA_TABLE_USE = 0x3
+ NFTA_CHAIN_UNSPEC = 0x0
+ NFTA_CHAIN_TABLE = 0x1
+ NFTA_CHAIN_HANDLE = 0x2
+ NFTA_CHAIN_NAME = 0x3
+ NFTA_CHAIN_HOOK = 0x4
+ NFTA_CHAIN_POLICY = 0x5
+ NFTA_CHAIN_USE = 0x6
+ NFTA_CHAIN_TYPE = 0x7
+ NFTA_CHAIN_COUNTERS = 0x8
+ NFTA_CHAIN_PAD = 0x9
+ NFTA_RULE_UNSPEC = 0x0
+ NFTA_RULE_TABLE = 0x1
+ NFTA_RULE_CHAIN = 0x2
+ NFTA_RULE_HANDLE = 0x3
+ NFTA_RULE_EXPRESSIONS = 0x4
+ NFTA_RULE_COMPAT = 0x5
+ NFTA_RULE_POSITION = 0x6
+ NFTA_RULE_USERDATA = 0x7
+ NFTA_RULE_PAD = 0x8
+ NFTA_RULE_ID = 0x9
+ NFT_RULE_COMPAT_F_INV = 0x2
+ NFT_RULE_COMPAT_F_MASK = 0x2
+ NFTA_RULE_COMPAT_UNSPEC = 0x0
+ NFTA_RULE_COMPAT_PROTO = 0x1
+ NFTA_RULE_COMPAT_FLAGS = 0x2
+ NFT_SET_ANONYMOUS = 0x1
+ NFT_SET_CONSTANT = 0x2
+ NFT_SET_INTERVAL = 0x4
+ NFT_SET_MAP = 0x8
+ NFT_SET_TIMEOUT = 0x10
+ NFT_SET_EVAL = 0x20
+ NFT_SET_OBJECT = 0x40
+ NFT_SET_POL_PERFORMANCE = 0x0
+ NFT_SET_POL_MEMORY = 0x1
+ NFTA_SET_DESC_UNSPEC = 0x0
+ NFTA_SET_DESC_SIZE = 0x1
+ NFTA_SET_UNSPEC = 0x0
+ NFTA_SET_TABLE = 0x1
+ NFTA_SET_NAME = 0x2
+ NFTA_SET_FLAGS = 0x3
+ NFTA_SET_KEY_TYPE = 0x4
+ NFTA_SET_KEY_LEN = 0x5
+ NFTA_SET_DATA_TYPE = 0x6
+ NFTA_SET_DATA_LEN = 0x7
+ NFTA_SET_POLICY = 0x8
+ NFTA_SET_DESC = 0x9
+ NFTA_SET_ID = 0xa
+ NFTA_SET_TIMEOUT = 0xb
+ NFTA_SET_GC_INTERVAL = 0xc
+ NFTA_SET_USERDATA = 0xd
+ NFTA_SET_PAD = 0xe
+ NFTA_SET_OBJ_TYPE = 0xf
+ NFT_SET_ELEM_INTERVAL_END = 0x1
+ NFTA_SET_ELEM_UNSPEC = 0x0
+ NFTA_SET_ELEM_KEY = 0x1
+ NFTA_SET_ELEM_DATA = 0x2
+ NFTA_SET_ELEM_FLAGS = 0x3
+ NFTA_SET_ELEM_TIMEOUT = 0x4
+ NFTA_SET_ELEM_EXPIRATION = 0x5
+ NFTA_SET_ELEM_USERDATA = 0x6
+ NFTA_SET_ELEM_EXPR = 0x7
+ NFTA_SET_ELEM_PAD = 0x8
+ NFTA_SET_ELEM_OBJREF = 0x9
+ NFTA_SET_ELEM_LIST_UNSPEC = 0x0
+ NFTA_SET_ELEM_LIST_TABLE = 0x1
+ NFTA_SET_ELEM_LIST_SET = 0x2
+ NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
+ NFTA_SET_ELEM_LIST_SET_ID = 0x4
+ NFT_DATA_VALUE = 0x0
+ NFT_DATA_VERDICT = 0xffffff00
+ NFTA_DATA_UNSPEC = 0x0
+ NFTA_DATA_VALUE = 0x1
+ NFTA_DATA_VERDICT = 0x2
+ NFTA_VERDICT_UNSPEC = 0x0
+ NFTA_VERDICT_CODE = 0x1
+ NFTA_VERDICT_CHAIN = 0x2
+ NFTA_EXPR_UNSPEC = 0x0
+ NFTA_EXPR_NAME = 0x1
+ NFTA_EXPR_DATA = 0x2
+ NFTA_IMMEDIATE_UNSPEC = 0x0
+ NFTA_IMMEDIATE_DREG = 0x1
+ NFTA_IMMEDIATE_DATA = 0x2
+ NFTA_BITWISE_UNSPEC = 0x0
+ NFTA_BITWISE_SREG = 0x1
+ NFTA_BITWISE_DREG = 0x2
+ NFTA_BITWISE_LEN = 0x3
+ NFTA_BITWISE_MASK = 0x4
+ NFTA_BITWISE_XOR = 0x5
+ NFT_BYTEORDER_NTOH = 0x0
+ NFT_BYTEORDER_HTON = 0x1
+ NFTA_BYTEORDER_UNSPEC = 0x0
+ NFTA_BYTEORDER_SREG = 0x1
+ NFTA_BYTEORDER_DREG = 0x2
+ NFTA_BYTEORDER_OP = 0x3
+ NFTA_BYTEORDER_LEN = 0x4
+ NFTA_BYTEORDER_SIZE = 0x5
+ NFT_CMP_EQ = 0x0
+ NFT_CMP_NEQ = 0x1
+ NFT_CMP_LT = 0x2
+ NFT_CMP_LTE = 0x3
+ NFT_CMP_GT = 0x4
+ NFT_CMP_GTE = 0x5
+ NFTA_CMP_UNSPEC = 0x0
+ NFTA_CMP_SREG = 0x1
+ NFTA_CMP_OP = 0x2
+ NFTA_CMP_DATA = 0x3
+ NFT_RANGE_EQ = 0x0
+ NFT_RANGE_NEQ = 0x1
+ NFTA_RANGE_UNSPEC = 0x0
+ NFTA_RANGE_SREG = 0x1
+ NFTA_RANGE_OP = 0x2
+ NFTA_RANGE_FROM_DATA = 0x3
+ NFTA_RANGE_TO_DATA = 0x4
+ NFT_LOOKUP_F_INV = 0x1
+ NFTA_LOOKUP_UNSPEC = 0x0
+ NFTA_LOOKUP_SET = 0x1
+ NFTA_LOOKUP_SREG = 0x2
+ NFTA_LOOKUP_DREG = 0x3
+ NFTA_LOOKUP_SET_ID = 0x4
+ NFTA_LOOKUP_FLAGS = 0x5
+ NFT_DYNSET_OP_ADD = 0x0
+ NFT_DYNSET_OP_UPDATE = 0x1
+ NFT_DYNSET_F_INV = 0x1
+ NFTA_DYNSET_UNSPEC = 0x0
+ NFTA_DYNSET_SET_NAME = 0x1
+ NFTA_DYNSET_SET_ID = 0x2
+ NFTA_DYNSET_OP = 0x3
+ NFTA_DYNSET_SREG_KEY = 0x4
+ NFTA_DYNSET_SREG_DATA = 0x5
+ NFTA_DYNSET_TIMEOUT = 0x6
+ NFTA_DYNSET_EXPR = 0x7
+ NFTA_DYNSET_PAD = 0x8
+ NFTA_DYNSET_FLAGS = 0x9
+ NFT_PAYLOAD_LL_HEADER = 0x0
+ NFT_PAYLOAD_NETWORK_HEADER = 0x1
+ NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
+ NFT_PAYLOAD_CSUM_NONE = 0x0
+ NFT_PAYLOAD_CSUM_INET = 0x1
+ NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
+ NFTA_PAYLOAD_UNSPEC = 0x0
+ NFTA_PAYLOAD_DREG = 0x1
+ NFTA_PAYLOAD_BASE = 0x2
+ NFTA_PAYLOAD_OFFSET = 0x3
+ NFTA_PAYLOAD_LEN = 0x4
+ NFTA_PAYLOAD_SREG = 0x5
+ NFTA_PAYLOAD_CSUM_TYPE = 0x6
+ NFTA_PAYLOAD_CSUM_OFFSET = 0x7
+ NFTA_PAYLOAD_CSUM_FLAGS = 0x8
+ NFT_EXTHDR_F_PRESENT = 0x1
+ NFT_EXTHDR_OP_IPV6 = 0x0
+ NFT_EXTHDR_OP_TCPOPT = 0x1
+ NFTA_EXTHDR_UNSPEC = 0x0
+ NFTA_EXTHDR_DREG = 0x1
+ NFTA_EXTHDR_TYPE = 0x2
+ NFTA_EXTHDR_OFFSET = 0x3
+ NFTA_EXTHDR_LEN = 0x4
+ NFTA_EXTHDR_FLAGS = 0x5
+ NFTA_EXTHDR_OP = 0x6
+ NFTA_EXTHDR_SREG = 0x7
+ NFT_META_LEN = 0x0
+ NFT_META_PROTOCOL = 0x1
+ NFT_META_PRIORITY = 0x2
+ NFT_META_MARK = 0x3
+ NFT_META_IIF = 0x4
+ NFT_META_OIF = 0x5
+ NFT_META_IIFNAME = 0x6
+ NFT_META_OIFNAME = 0x7
+ NFT_META_IIFTYPE = 0x8
+ NFT_META_OIFTYPE = 0x9
+ NFT_META_SKUID = 0xa
+ NFT_META_SKGID = 0xb
+ NFT_META_NFTRACE = 0xc
+ NFT_META_RTCLASSID = 0xd
+ NFT_META_SECMARK = 0xe
+ NFT_META_NFPROTO = 0xf
+ NFT_META_L4PROTO = 0x10
+ NFT_META_BRI_IIFNAME = 0x11
+ NFT_META_BRI_OIFNAME = 0x12
+ NFT_META_PKTTYPE = 0x13
+ NFT_META_CPU = 0x14
+ NFT_META_IIFGROUP = 0x15
+ NFT_META_OIFGROUP = 0x16
+ NFT_META_CGROUP = 0x17
+ NFT_META_PRANDOM = 0x18
+ NFT_RT_CLASSID = 0x0
+ NFT_RT_NEXTHOP4 = 0x1
+ NFT_RT_NEXTHOP6 = 0x2
+ NFT_RT_TCPMSS = 0x3
+ NFT_HASH_JENKINS = 0x0
+ NFT_HASH_SYM = 0x1
+ NFTA_HASH_UNSPEC = 0x0
+ NFTA_HASH_SREG = 0x1
+ NFTA_HASH_DREG = 0x2
+ NFTA_HASH_LEN = 0x3
+ NFTA_HASH_MODULUS = 0x4
+ NFTA_HASH_SEED = 0x5
+ NFTA_HASH_OFFSET = 0x6
+ NFTA_HASH_TYPE = 0x7
+ NFTA_META_UNSPEC = 0x0
+ NFTA_META_DREG = 0x1
+ NFTA_META_KEY = 0x2
+ NFTA_META_SREG = 0x3
+ NFTA_RT_UNSPEC = 0x0
+ NFTA_RT_DREG = 0x1
+ NFTA_RT_KEY = 0x2
+ NFT_CT_STATE = 0x0
+ NFT_CT_DIRECTION = 0x1
+ NFT_CT_STATUS = 0x2
+ NFT_CT_MARK = 0x3
+ NFT_CT_SECMARK = 0x4
+ NFT_CT_EXPIRATION = 0x5
+ NFT_CT_HELPER = 0x6
+ NFT_CT_L3PROTOCOL = 0x7
+ NFT_CT_SRC = 0x8
+ NFT_CT_DST = 0x9
+ NFT_CT_PROTOCOL = 0xa
+ NFT_CT_PROTO_SRC = 0xb
+ NFT_CT_PROTO_DST = 0xc
+ NFT_CT_LABELS = 0xd
+ NFT_CT_PKTS = 0xe
+ NFT_CT_BYTES = 0xf
+ NFT_CT_AVGPKT = 0x10
+ NFT_CT_ZONE = 0x11
+ NFT_CT_EVENTMASK = 0x12
+ NFTA_CT_UNSPEC = 0x0
+ NFTA_CT_DREG = 0x1
+ NFTA_CT_KEY = 0x2
+ NFTA_CT_DIRECTION = 0x3
+ NFTA_CT_SREG = 0x4
+ NFT_LIMIT_PKTS = 0x0
+ NFT_LIMIT_PKT_BYTES = 0x1
+ NFT_LIMIT_F_INV = 0x1
+ NFTA_LIMIT_UNSPEC = 0x0
+ NFTA_LIMIT_RATE = 0x1
+ NFTA_LIMIT_UNIT = 0x2
+ NFTA_LIMIT_BURST = 0x3
+ NFTA_LIMIT_TYPE = 0x4
+ NFTA_LIMIT_FLAGS = 0x5
+ NFTA_LIMIT_PAD = 0x6
+ NFTA_COUNTER_UNSPEC = 0x0
+ NFTA_COUNTER_BYTES = 0x1
+ NFTA_COUNTER_PACKETS = 0x2
+ NFTA_COUNTER_PAD = 0x3
+ NFTA_LOG_UNSPEC = 0x0
+ NFTA_LOG_GROUP = 0x1
+ NFTA_LOG_PREFIX = 0x2
+ NFTA_LOG_SNAPLEN = 0x3
+ NFTA_LOG_QTHRESHOLD = 0x4
+ NFTA_LOG_LEVEL = 0x5
+ NFTA_LOG_FLAGS = 0x6
+ NFTA_QUEUE_UNSPEC = 0x0
+ NFTA_QUEUE_NUM = 0x1
+ NFTA_QUEUE_TOTAL = 0x2
+ NFTA_QUEUE_FLAGS = 0x3
+ NFTA_QUEUE_SREG_QNUM = 0x4
+ NFT_QUOTA_F_INV = 0x1
+ NFT_QUOTA_F_DEPLETED = 0x2
+ NFTA_QUOTA_UNSPEC = 0x0
+ NFTA_QUOTA_BYTES = 0x1
+ NFTA_QUOTA_FLAGS = 0x2
+ NFTA_QUOTA_PAD = 0x3
+ NFTA_QUOTA_CONSUMED = 0x4
+ NFT_REJECT_ICMP_UNREACH = 0x0
+ NFT_REJECT_TCP_RST = 0x1
+ NFT_REJECT_ICMPX_UNREACH = 0x2
+ NFT_REJECT_ICMPX_NO_ROUTE = 0x0
+ NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
+ NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
+ NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
+ NFTA_REJECT_UNSPEC = 0x0
+ NFTA_REJECT_TYPE = 0x1
+ NFTA_REJECT_ICMP_CODE = 0x2
+ NFT_NAT_SNAT = 0x0
+ NFT_NAT_DNAT = 0x1
+ NFTA_NAT_UNSPEC = 0x0
+ NFTA_NAT_TYPE = 0x1
+ NFTA_NAT_FAMILY = 0x2
+ NFTA_NAT_REG_ADDR_MIN = 0x3
+ NFTA_NAT_REG_ADDR_MAX = 0x4
+ NFTA_NAT_REG_PROTO_MIN = 0x5
+ NFTA_NAT_REG_PROTO_MAX = 0x6
+ NFTA_NAT_FLAGS = 0x7
+ NFTA_MASQ_UNSPEC = 0x0
+ NFTA_MASQ_FLAGS = 0x1
+ NFTA_MASQ_REG_PROTO_MIN = 0x2
+ NFTA_MASQ_REG_PROTO_MAX = 0x3
+ NFTA_REDIR_UNSPEC = 0x0
+ NFTA_REDIR_REG_PROTO_MIN = 0x1
+ NFTA_REDIR_REG_PROTO_MAX = 0x2
+ NFTA_REDIR_FLAGS = 0x3
+ NFTA_DUP_UNSPEC = 0x0
+ NFTA_DUP_SREG_ADDR = 0x1
+ NFTA_DUP_SREG_DEV = 0x2
+ NFTA_FWD_UNSPEC = 0x0
+ NFTA_FWD_SREG_DEV = 0x1
+ NFTA_OBJREF_UNSPEC = 0x0
+ NFTA_OBJREF_IMM_TYPE = 0x1
+ NFTA_OBJREF_IMM_NAME = 0x2
+ NFTA_OBJREF_SET_SREG = 0x3
+ NFTA_OBJREF_SET_NAME = 0x4
+ NFTA_OBJREF_SET_ID = 0x5
+ NFTA_GEN_UNSPEC = 0x0
+ NFTA_GEN_ID = 0x1
+ NFTA_GEN_PROC_PID = 0x2
+ NFTA_GEN_PROC_NAME = 0x3
+ NFTA_FIB_UNSPEC = 0x0
+ NFTA_FIB_DREG = 0x1
+ NFTA_FIB_RESULT = 0x2
+ NFTA_FIB_FLAGS = 0x3
+ NFT_FIB_RESULT_UNSPEC = 0x0
+ NFT_FIB_RESULT_OIF = 0x1
+ NFT_FIB_RESULT_OIFNAME = 0x2
+ NFT_FIB_RESULT_ADDRTYPE = 0x3
+ NFTA_FIB_F_SADDR = 0x1
+ NFTA_FIB_F_DADDR = 0x2
+ NFTA_FIB_F_MARK = 0x4
+ NFTA_FIB_F_IIF = 0x8
+ NFTA_FIB_F_OIF = 0x10
+ NFTA_FIB_F_PRESENT = 0x20
+ NFTA_CT_HELPER_UNSPEC = 0x0
+ NFTA_CT_HELPER_NAME = 0x1
+ NFTA_CT_HELPER_L3PROTO = 0x2
+ NFTA_CT_HELPER_L4PROTO = 0x3
+ NFTA_OBJ_UNSPEC = 0x0
+ NFTA_OBJ_TABLE = 0x1
+ NFTA_OBJ_NAME = 0x2
+ NFTA_OBJ_TYPE = 0x3
+ NFTA_OBJ_DATA = 0x4
+ NFTA_OBJ_USE = 0x5
+ NFTA_TRACE_UNSPEC = 0x0
+ NFTA_TRACE_TABLE = 0x1
+ NFTA_TRACE_CHAIN = 0x2
+ NFTA_TRACE_RULE_HANDLE = 0x3
+ NFTA_TRACE_TYPE = 0x4
+ NFTA_TRACE_VERDICT = 0x5
+ NFTA_TRACE_ID = 0x6
+ NFTA_TRACE_LL_HEADER = 0x7
+ NFTA_TRACE_NETWORK_HEADER = 0x8
+ NFTA_TRACE_TRANSPORT_HEADER = 0x9
+ NFTA_TRACE_IIF = 0xa
+ NFTA_TRACE_IIFTYPE = 0xb
+ NFTA_TRACE_OIF = 0xc
+ NFTA_TRACE_OIFTYPE = 0xd
+ NFTA_TRACE_MARK = 0xe
+ NFTA_TRACE_NFPROTO = 0xf
+ NFTA_TRACE_POLICY = 0x10
+ NFTA_TRACE_PAD = 0x11
+ NFT_TRACETYPE_UNSPEC = 0x0
+ NFT_TRACETYPE_POLICY = 0x1
+ NFT_TRACETYPE_RETURN = 0x2
+ NFT_TRACETYPE_RULE = 0x3
+ NFTA_NG_UNSPEC = 0x0
+ NFTA_NG_DREG = 0x1
+ NFTA_NG_MODULUS = 0x2
+ NFTA_NG_TYPE = 0x3
+ NFTA_NG_OFFSET = 0x4
+ NFT_NG_INCREMENTAL = 0x0
+ NFT_NG_RANDOM = 0x1
+)
+
+const (
+ NFTA_TARGET_UNSPEC = 0x0
+ NFTA_TARGET_NAME = 0x1
+ NFTA_TARGET_REV = 0x2
+ NFTA_TARGET_INFO = 0x3
+ NFTA_MATCH_UNSPEC = 0x0
+ NFTA_MATCH_NAME = 0x1
+ NFTA_MATCH_REV = 0x2
+ NFTA_MATCH_INFO = 0x3
+ NFTA_COMPAT_UNSPEC = 0x0
+ NFTA_COMPAT_NAME = 0x1
+ NFTA_COMPAT_REV = 0x2
+ NFTA_COMPAT_TYPE = 0x3
+)
+
+type RTCTime struct {
+ Sec int32
+ Min int32
+ Hour int32
+ Mday int32
+ Mon int32
+ Year int32
+ Wday int32
+ Yday int32
+ Isdst int32
+}
+
+type RTCWkAlrm struct {
+ Enabled uint8
+ Pending uint8
+ Time RTCTime
+}
+
+type BlkpgIoctlArg struct {
+ Op int32
+ Flags int32
+ Datalen int32
+ Data *byte
+}
+
+const (
+ BLKPG_ADD_PARTITION = 0x1
+ BLKPG_DEL_PARTITION = 0x2
+ BLKPG_RESIZE_PARTITION = 0x3
+)
+
+const (
+ NETNSA_NONE = 0x0
+ NETNSA_NSID = 0x1
+ NETNSA_PID = 0x2
+ NETNSA_FD = 0x3
+ NETNSA_TARGET_NSID = 0x4
+ NETNSA_CURRENT_NSID = 0x5
+)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+ Flags uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+ Rx_ring_full uint64
+ Rx_fill_ring_empty_descs uint64
+ Tx_ring_empty_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
+
+type ScmTimestamping struct {
+ Ts [3]Timespec
+}
+
+const (
+ SOF_TIMESTAMPING_TX_HARDWARE = 0x1
+ SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
+ SOF_TIMESTAMPING_RX_HARDWARE = 0x4
+ SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
+ SOF_TIMESTAMPING_SOFTWARE = 0x10
+ SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
+ SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
+ SOF_TIMESTAMPING_OPT_ID = 0x80
+ SOF_TIMESTAMPING_TX_SCHED = 0x100
+ SOF_TIMESTAMPING_TX_ACK = 0x200
+ SOF_TIMESTAMPING_OPT_CMSG = 0x400
+ SOF_TIMESTAMPING_OPT_TSONLY = 0x800
+ SOF_TIMESTAMPING_OPT_STATS = 0x1000
+ SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
+ SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
+
+ SOF_TIMESTAMPING_LAST = 0x8000
+ SOF_TIMESTAMPING_MASK = 0xffff
+
+ SCM_TSTAMP_SND = 0x0
+ SCM_TSTAMP_SCHED = 0x1
+ SCM_TSTAMP_ACK = 0x2
+)
+
+type SockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type FanotifyEventMetadata struct {
+ Event_len uint32
+ Vers uint8
+ Reserved uint8
+ Metadata_len uint16
+ Mask uint64
+ Fd int32
+ Pid int32
+}
+
+type FanotifyResponse struct {
+ Fd int32
+ Response uint32
+}
+
+const (
+ CRYPTO_MSG_BASE = 0x10
+ CRYPTO_MSG_NEWALG = 0x10
+ CRYPTO_MSG_DELALG = 0x11
+ CRYPTO_MSG_UPDATEALG = 0x12
+ CRYPTO_MSG_GETALG = 0x13
+ CRYPTO_MSG_DELRNG = 0x14
+ CRYPTO_MSG_GETSTAT = 0x15
+)
+
+const (
+ CRYPTOCFGA_UNSPEC = 0x0
+ CRYPTOCFGA_PRIORITY_VAL = 0x1
+ CRYPTOCFGA_REPORT_LARVAL = 0x2
+ CRYPTOCFGA_REPORT_HASH = 0x3
+ CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
+ CRYPTOCFGA_REPORT_AEAD = 0x5
+ CRYPTOCFGA_REPORT_COMPRESS = 0x6
+ CRYPTOCFGA_REPORT_RNG = 0x7
+ CRYPTOCFGA_REPORT_CIPHER = 0x8
+ CRYPTOCFGA_REPORT_AKCIPHER = 0x9
+ CRYPTOCFGA_REPORT_KPP = 0xa
+ CRYPTOCFGA_REPORT_ACOMP = 0xb
+ CRYPTOCFGA_STAT_LARVAL = 0xc
+ CRYPTOCFGA_STAT_HASH = 0xd
+ CRYPTOCFGA_STAT_BLKCIPHER = 0xe
+ CRYPTOCFGA_STAT_AEAD = 0xf
+ CRYPTOCFGA_STAT_COMPRESS = 0x10
+ CRYPTOCFGA_STAT_RNG = 0x11
+ CRYPTOCFGA_STAT_CIPHER = 0x12
+ CRYPTOCFGA_STAT_AKCIPHER = 0x13
+ CRYPTOCFGA_STAT_KPP = 0x14
+ CRYPTOCFGA_STAT_ACOMP = 0x15
+)
+
+const (
+ BPF_REG_0 = 0x0
+ BPF_REG_1 = 0x1
+ BPF_REG_2 = 0x2
+ BPF_REG_3 = 0x3
+ BPF_REG_4 = 0x4
+ BPF_REG_5 = 0x5
+ BPF_REG_6 = 0x6
+ BPF_REG_7 = 0x7
+ BPF_REG_8 = 0x8
+ BPF_REG_9 = 0x9
+ BPF_REG_10 = 0xa
+ BPF_MAP_CREATE = 0x0
+ BPF_MAP_LOOKUP_ELEM = 0x1
+ BPF_MAP_UPDATE_ELEM = 0x2
+ BPF_MAP_DELETE_ELEM = 0x3
+ BPF_MAP_GET_NEXT_KEY = 0x4
+ BPF_PROG_LOAD = 0x5
+ BPF_OBJ_PIN = 0x6
+ BPF_OBJ_GET = 0x7
+ BPF_PROG_ATTACH = 0x8
+ BPF_PROG_DETACH = 0x9
+ BPF_PROG_TEST_RUN = 0xa
+ BPF_PROG_GET_NEXT_ID = 0xb
+ BPF_MAP_GET_NEXT_ID = 0xc
+ BPF_PROG_GET_FD_BY_ID = 0xd
+ BPF_MAP_GET_FD_BY_ID = 0xe
+ BPF_OBJ_GET_INFO_BY_FD = 0xf
+ BPF_PROG_QUERY = 0x10
+ BPF_RAW_TRACEPOINT_OPEN = 0x11
+ BPF_BTF_LOAD = 0x12
+ BPF_BTF_GET_FD_BY_ID = 0x13
+ BPF_TASK_FD_QUERY = 0x14
+ BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
+ BPF_MAP_FREEZE = 0x16
+ BPF_BTF_GET_NEXT_ID = 0x17
+ BPF_MAP_LOOKUP_BATCH = 0x18
+ BPF_MAP_LOOKUP_AND_DELETE_BATCH = 0x19
+ BPF_MAP_UPDATE_BATCH = 0x1a
+ BPF_MAP_DELETE_BATCH = 0x1b
+ BPF_LINK_CREATE = 0x1c
+ BPF_LINK_UPDATE = 0x1d
+ BPF_LINK_GET_FD_BY_ID = 0x1e
+ BPF_LINK_GET_NEXT_ID = 0x1f
+ BPF_ENABLE_STATS = 0x20
+ BPF_ITER_CREATE = 0x21
+ BPF_LINK_DETACH = 0x22
+ BPF_PROG_BIND_MAP = 0x23
+ BPF_MAP_TYPE_UNSPEC = 0x0
+ BPF_MAP_TYPE_HASH = 0x1
+ BPF_MAP_TYPE_ARRAY = 0x2
+ BPF_MAP_TYPE_PROG_ARRAY = 0x3
+ BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
+ BPF_MAP_TYPE_PERCPU_HASH = 0x5
+ BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
+ BPF_MAP_TYPE_STACK_TRACE = 0x7
+ BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
+ BPF_MAP_TYPE_LRU_HASH = 0x9
+ BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
+ BPF_MAP_TYPE_LPM_TRIE = 0xb
+ BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
+ BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
+ BPF_MAP_TYPE_DEVMAP = 0xe
+ BPF_MAP_TYPE_SOCKMAP = 0xf
+ BPF_MAP_TYPE_CPUMAP = 0x10
+ BPF_MAP_TYPE_XSKMAP = 0x11
+ BPF_MAP_TYPE_SOCKHASH = 0x12
+ BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
+ BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
+ BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
+ BPF_MAP_TYPE_QUEUE = 0x16
+ BPF_MAP_TYPE_STACK = 0x17
+ BPF_MAP_TYPE_SK_STORAGE = 0x18
+ BPF_MAP_TYPE_DEVMAP_HASH = 0x19
+ BPF_MAP_TYPE_STRUCT_OPS = 0x1a
+ BPF_MAP_TYPE_RINGBUF = 0x1b
+ BPF_MAP_TYPE_INODE_STORAGE = 0x1c
+ BPF_PROG_TYPE_UNSPEC = 0x0
+ BPF_PROG_TYPE_SOCKET_FILTER = 0x1
+ BPF_PROG_TYPE_KPROBE = 0x2
+ BPF_PROG_TYPE_SCHED_CLS = 0x3
+ BPF_PROG_TYPE_SCHED_ACT = 0x4
+ BPF_PROG_TYPE_TRACEPOINT = 0x5
+ BPF_PROG_TYPE_XDP = 0x6
+ BPF_PROG_TYPE_PERF_EVENT = 0x7
+ BPF_PROG_TYPE_CGROUP_SKB = 0x8
+ BPF_PROG_TYPE_CGROUP_SOCK = 0x9
+ BPF_PROG_TYPE_LWT_IN = 0xa
+ BPF_PROG_TYPE_LWT_OUT = 0xb
+ BPF_PROG_TYPE_LWT_XMIT = 0xc
+ BPF_PROG_TYPE_SOCK_OPS = 0xd
+ BPF_PROG_TYPE_SK_SKB = 0xe
+ BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
+ BPF_PROG_TYPE_SK_MSG = 0x10
+ BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
+ BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
+ BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
+ BPF_PROG_TYPE_LIRC_MODE2 = 0x14
+ BPF_PROG_TYPE_SK_REUSEPORT = 0x15
+ BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
+ BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17
+ BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18
+ BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19
+ BPF_PROG_TYPE_TRACING = 0x1a
+ BPF_PROG_TYPE_STRUCT_OPS = 0x1b
+ BPF_PROG_TYPE_EXT = 0x1c
+ BPF_PROG_TYPE_LSM = 0x1d
+ BPF_PROG_TYPE_SK_LOOKUP = 0x1e
+ BPF_CGROUP_INET_INGRESS = 0x0
+ BPF_CGROUP_INET_EGRESS = 0x1
+ BPF_CGROUP_INET_SOCK_CREATE = 0x2
+ BPF_CGROUP_SOCK_OPS = 0x3
+ BPF_SK_SKB_STREAM_PARSER = 0x4
+ BPF_SK_SKB_STREAM_VERDICT = 0x5
+ BPF_CGROUP_DEVICE = 0x6
+ BPF_SK_MSG_VERDICT = 0x7
+ BPF_CGROUP_INET4_BIND = 0x8
+ BPF_CGROUP_INET6_BIND = 0x9
+ BPF_CGROUP_INET4_CONNECT = 0xa
+ BPF_CGROUP_INET6_CONNECT = 0xb
+ BPF_CGROUP_INET4_POST_BIND = 0xc
+ BPF_CGROUP_INET6_POST_BIND = 0xd
+ BPF_CGROUP_UDP4_SENDMSG = 0xe
+ BPF_CGROUP_UDP6_SENDMSG = 0xf
+ BPF_LIRC_MODE2 = 0x10
+ BPF_FLOW_DISSECTOR = 0x11
+ BPF_CGROUP_SYSCTL = 0x12
+ BPF_CGROUP_UDP4_RECVMSG = 0x13
+ BPF_CGROUP_UDP6_RECVMSG = 0x14
+ BPF_CGROUP_GETSOCKOPT = 0x15
+ BPF_CGROUP_SETSOCKOPT = 0x16
+ BPF_TRACE_RAW_TP = 0x17
+ BPF_TRACE_FENTRY = 0x18
+ BPF_TRACE_FEXIT = 0x19
+ BPF_MODIFY_RETURN = 0x1a
+ BPF_LSM_MAC = 0x1b
+ BPF_TRACE_ITER = 0x1c
+ BPF_CGROUP_INET4_GETPEERNAME = 0x1d
+ BPF_CGROUP_INET6_GETPEERNAME = 0x1e
+ BPF_CGROUP_INET4_GETSOCKNAME = 0x1f
+ BPF_CGROUP_INET6_GETSOCKNAME = 0x20
+ BPF_XDP_DEVMAP = 0x21
+ BPF_CGROUP_INET_SOCK_RELEASE = 0x22
+ BPF_XDP_CPUMAP = 0x23
+ BPF_SK_LOOKUP = 0x24
+ BPF_XDP = 0x25
+ BPF_LINK_TYPE_UNSPEC = 0x0
+ BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1
+ BPF_LINK_TYPE_TRACING = 0x2
+ BPF_LINK_TYPE_CGROUP = 0x3
+ BPF_LINK_TYPE_ITER = 0x4
+ BPF_LINK_TYPE_NETNS = 0x5
+ BPF_LINK_TYPE_XDP = 0x6
+ BPF_ANY = 0x0
+ BPF_NOEXIST = 0x1
+ BPF_EXIST = 0x2
+ BPF_F_LOCK = 0x4
+ BPF_F_NO_PREALLOC = 0x1
+ BPF_F_NO_COMMON_LRU = 0x2
+ BPF_F_NUMA_NODE = 0x4
+ BPF_F_RDONLY = 0x8
+ BPF_F_WRONLY = 0x10
+ BPF_F_STACK_BUILD_ID = 0x20
+ BPF_F_ZERO_SEED = 0x40
+ BPF_F_RDONLY_PROG = 0x80
+ BPF_F_WRONLY_PROG = 0x100
+ BPF_F_CLONE = 0x200
+ BPF_F_MMAPABLE = 0x400
+ BPF_F_PRESERVE_ELEMS = 0x800
+ BPF_F_INNER_MAP = 0x1000
+ BPF_STATS_RUN_TIME = 0x0
+ BPF_STACK_BUILD_ID_EMPTY = 0x0
+ BPF_STACK_BUILD_ID_VALID = 0x1
+ BPF_STACK_BUILD_ID_IP = 0x2
+ BPF_F_RECOMPUTE_CSUM = 0x1
+ BPF_F_INVALIDATE_HASH = 0x2
+ BPF_F_HDR_FIELD_MASK = 0xf
+ BPF_F_PSEUDO_HDR = 0x10
+ BPF_F_MARK_MANGLED_0 = 0x20
+ BPF_F_MARK_ENFORCE = 0x40
+ BPF_F_INGRESS = 0x1
+ BPF_F_TUNINFO_IPV6 = 0x1
+ BPF_F_SKIP_FIELD_MASK = 0xff
+ BPF_F_USER_STACK = 0x100
+ BPF_F_FAST_STACK_CMP = 0x200
+ BPF_F_REUSE_STACKID = 0x400
+ BPF_F_USER_BUILD_ID = 0x800
+ BPF_F_ZERO_CSUM_TX = 0x2
+ BPF_F_DONT_FRAGMENT = 0x4
+ BPF_F_SEQ_NUMBER = 0x8
+ BPF_F_INDEX_MASK = 0xffffffff
+ BPF_F_CURRENT_CPU = 0xffffffff
+ BPF_F_CTXLEN_MASK = 0xfffff00000000
+ BPF_F_CURRENT_NETNS = -0x1
+ BPF_CSUM_LEVEL_QUERY = 0x0
+ BPF_CSUM_LEVEL_INC = 0x1
+ BPF_CSUM_LEVEL_DEC = 0x2
+ BPF_CSUM_LEVEL_RESET = 0x3
+ BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
+ BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
+ BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
+ BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
+ BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
+ BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20
+ BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
+ BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
+ BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_LOCAL_STORAGE_GET_F_CREATE = 0x1
+ BPF_SK_STORAGE_GET_F_CREATE = 0x1
+ BPF_F_GET_BRANCH_RECORDS_SIZE = 0x1
+ BPF_RB_NO_WAKEUP = 0x1
+ BPF_RB_FORCE_WAKEUP = 0x2
+ BPF_RB_AVAIL_DATA = 0x0
+ BPF_RB_RING_SIZE = 0x1
+ BPF_RB_CONS_POS = 0x2
+ BPF_RB_PROD_POS = 0x3
+ BPF_RINGBUF_BUSY_BIT = 0x80000000
+ BPF_RINGBUF_DISCARD_BIT = 0x40000000
+ BPF_RINGBUF_HDR_SZ = 0x8
+ BPF_SK_LOOKUP_F_REPLACE = 0x1
+ BPF_SK_LOOKUP_F_NO_REUSEPORT = 0x2
+ BPF_ADJ_ROOM_NET = 0x0
+ BPF_ADJ_ROOM_MAC = 0x1
+ BPF_HDR_START_MAC = 0x0
+ BPF_HDR_START_NET = 0x1
+ BPF_LWT_ENCAP_SEG6 = 0x0
+ BPF_LWT_ENCAP_SEG6_INLINE = 0x1
+ BPF_LWT_ENCAP_IP = 0x2
+ BPF_OK = 0x0
+ BPF_DROP = 0x2
+ BPF_REDIRECT = 0x7
+ BPF_LWT_REROUTE = 0x80
+ BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
+ BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
+ BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 0x10
+ BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 0x20
+ BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 0x40
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7f
+ BPF_SOCK_OPS_VOID = 0x0
+ BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
+ BPF_SOCK_OPS_RWND_INIT = 0x2
+ BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
+ BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
+ BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
+ BPF_SOCK_OPS_NEEDS_ECN = 0x6
+ BPF_SOCK_OPS_BASE_RTT = 0x7
+ BPF_SOCK_OPS_RTO_CB = 0x8
+ BPF_SOCK_OPS_RETRANS_CB = 0x9
+ BPF_SOCK_OPS_STATE_CB = 0xa
+ BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
+ BPF_SOCK_OPS_RTT_CB = 0xc
+ BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 0xd
+ BPF_SOCK_OPS_HDR_OPT_LEN_CB = 0xe
+ BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 0xf
+ BPF_TCP_ESTABLISHED = 0x1
+ BPF_TCP_SYN_SENT = 0x2
+ BPF_TCP_SYN_RECV = 0x3
+ BPF_TCP_FIN_WAIT1 = 0x4
+ BPF_TCP_FIN_WAIT2 = 0x5
+ BPF_TCP_TIME_WAIT = 0x6
+ BPF_TCP_CLOSE = 0x7
+ BPF_TCP_CLOSE_WAIT = 0x8
+ BPF_TCP_LAST_ACK = 0x9
+ BPF_TCP_LISTEN = 0xa
+ BPF_TCP_CLOSING = 0xb
+ BPF_TCP_NEW_SYN_RECV = 0xc
+ BPF_TCP_MAX_STATES = 0xd
+ TCP_BPF_IW = 0x3e9
+ TCP_BPF_SNDCWND_CLAMP = 0x3ea
+ TCP_BPF_DELACK_MAX = 0x3eb
+ TCP_BPF_RTO_MIN = 0x3ec
+ TCP_BPF_SYN = 0x3ed
+ TCP_BPF_SYN_IP = 0x3ee
+ TCP_BPF_SYN_MAC = 0x3ef
+ BPF_LOAD_HDR_OPT_TCP_SYN = 0x1
+ BPF_WRITE_HDR_TCP_CURRENT_MSS = 0x1
+ BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 0x2
+ BPF_DEVCG_ACC_MKNOD = 0x1
+ BPF_DEVCG_ACC_READ = 0x2
+ BPF_DEVCG_ACC_WRITE = 0x4
+ BPF_DEVCG_DEV_BLOCK = 0x1
+ BPF_DEVCG_DEV_CHAR = 0x2
+ BPF_FIB_LOOKUP_DIRECT = 0x1
+ BPF_FIB_LOOKUP_OUTPUT = 0x2
+ BPF_FIB_LKUP_RET_SUCCESS = 0x0
+ BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
+ BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
+ BPF_FIB_LKUP_RET_PROHIBIT = 0x3
+ BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
+ BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
+ BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
+ BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
+ BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
+ BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
+ BPF_FD_TYPE_TRACEPOINT = 0x1
+ BPF_FD_TYPE_KPROBE = 0x2
+ BPF_FD_TYPE_KRETPROBE = 0x3
+ BPF_FD_TYPE_UPROBE = 0x4
+ BPF_FD_TYPE_URETPROBE = 0x5
+ BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
+ BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
+ BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
+)
+
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+ RTNLGRP_BRVLAN = 0x21
+)
+
+type CapUserHeader struct {
+ Version uint32
+ Pid int32
+}
+
+type CapUserData struct {
+ Effective uint32
+ Permitted uint32
+ Inheritable uint32
+}
+
+const (
+ LINUX_CAPABILITY_VERSION_1 = 0x19980330
+ LINUX_CAPABILITY_VERSION_2 = 0x20071026
+ LINUX_CAPABILITY_VERSION_3 = 0x20080522
+)
+
+const (
+ LO_FLAGS_READ_ONLY = 0x1
+ LO_FLAGS_AUTOCLEAR = 0x4
+ LO_FLAGS_PARTSCAN = 0x8
+ LO_FLAGS_DIRECT_IO = 0x10
+)
+
+type LoopInfo64 struct {
+ Device uint64
+ Inode uint64
+ Rdevice uint64
+ Offset uint64
+ Sizelimit uint64
+ Number uint32
+ Encrypt_type uint32
+ Encrypt_key_size uint32
+ Flags uint32
+ File_name [64]uint8
+ Crypt_name [64]uint8
+ Encrypt_key [32]uint8
+ Init [2]uint64
+}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_RESOURCE_SET = 0x23
+ DEVLINK_CMD_RESOURCE_DUMP = 0x24
+ DEVLINK_CMD_RELOAD = 0x25
+ DEVLINK_CMD_PARAM_GET = 0x26
+ DEVLINK_CMD_PARAM_SET = 0x27
+ DEVLINK_CMD_PARAM_NEW = 0x28
+ DEVLINK_CMD_PARAM_DEL = 0x29
+ DEVLINK_CMD_REGION_GET = 0x2a
+ DEVLINK_CMD_REGION_SET = 0x2b
+ DEVLINK_CMD_REGION_NEW = 0x2c
+ DEVLINK_CMD_REGION_DEL = 0x2d
+ DEVLINK_CMD_REGION_READ = 0x2e
+ DEVLINK_CMD_PORT_PARAM_GET = 0x2f
+ DEVLINK_CMD_PORT_PARAM_SET = 0x30
+ DEVLINK_CMD_PORT_PARAM_NEW = 0x31
+ DEVLINK_CMD_PORT_PARAM_DEL = 0x32
+ DEVLINK_CMD_INFO_GET = 0x33
+ DEVLINK_CMD_HEALTH_REPORTER_GET = 0x34
+ DEVLINK_CMD_HEALTH_REPORTER_SET = 0x35
+ DEVLINK_CMD_HEALTH_REPORTER_RECOVER = 0x36
+ DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE = 0x37
+ DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET = 0x38
+ DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR = 0x39
+ DEVLINK_CMD_FLASH_UPDATE = 0x3a
+ DEVLINK_CMD_FLASH_UPDATE_END = 0x3b
+ DEVLINK_CMD_FLASH_UPDATE_STATUS = 0x3c
+ DEVLINK_CMD_TRAP_GET = 0x3d
+ DEVLINK_CMD_TRAP_SET = 0x3e
+ DEVLINK_CMD_TRAP_NEW = 0x3f
+ DEVLINK_CMD_TRAP_DEL = 0x40
+ DEVLINK_CMD_TRAP_GROUP_GET = 0x41
+ DEVLINK_CMD_TRAP_GROUP_SET = 0x42
+ DEVLINK_CMD_TRAP_GROUP_NEW = 0x43
+ DEVLINK_CMD_TRAP_GROUP_DEL = 0x44
+ DEVLINK_CMD_TRAP_POLICER_GET = 0x45
+ DEVLINK_CMD_TRAP_POLICER_SET = 0x46
+ DEVLINK_CMD_TRAP_POLICER_NEW = 0x47
+ DEVLINK_CMD_TRAP_POLICER_DEL = 0x48
+ DEVLINK_CMD_HEALTH_REPORTER_TEST = 0x49
+ DEVLINK_CMD_MAX = 0x4d
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_PORT_FLAVOUR_PHYSICAL = 0x0
+ DEVLINK_PORT_FLAVOUR_CPU = 0x1
+ DEVLINK_PORT_FLAVOUR_DSA = 0x2
+ DEVLINK_PORT_FLAVOUR_PCI_PF = 0x3
+ DEVLINK_PORT_FLAVOUR_PCI_VF = 0x4
+ DEVLINK_PORT_FLAVOUR_VIRTUAL = 0x5
+ DEVLINK_PORT_FLAVOUR_UNUSED = 0x6
+ DEVLINK_PARAM_CMODE_RUNTIME = 0x0
+ DEVLINK_PARAM_CMODE_DRIVERINIT = 0x1
+ DEVLINK_PARAM_CMODE_PERMANENT = 0x2
+ DEVLINK_PARAM_CMODE_MAX = 0x2
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER = 0x0
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH = 0x1
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK = 0x2
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN = 0x3
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN = 0x0
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS = 0x1
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER = 0x2
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK = 0x3
+ DEVLINK_ATTR_STATS_RX_PACKETS = 0x0
+ DEVLINK_ATTR_STATS_RX_BYTES = 0x1
+ DEVLINK_ATTR_STATS_RX_DROPPED = 0x2
+ DEVLINK_ATTR_STATS_MAX = 0x2
+ DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT = 0x0
+ DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT = 0x1
+ DEVLINK_FLASH_OVERWRITE_MAX_BIT = 0x1
+ DEVLINK_TRAP_ACTION_DROP = 0x0
+ DEVLINK_TRAP_ACTION_TRAP = 0x1
+ DEVLINK_TRAP_ACTION_MIRROR = 0x2
+ DEVLINK_TRAP_TYPE_DROP = 0x0
+ DEVLINK_TRAP_TYPE_EXCEPTION = 0x1
+ DEVLINK_TRAP_TYPE_CONTROL = 0x2
+ DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT = 0x0
+ DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE = 0x1
+ DEVLINK_RELOAD_ACTION_UNSPEC = 0x0
+ DEVLINK_RELOAD_ACTION_DRIVER_REINIT = 0x1
+ DEVLINK_RELOAD_ACTION_FW_ACTIVATE = 0x2
+ DEVLINK_RELOAD_ACTION_MAX = 0x2
+ DEVLINK_RELOAD_LIMIT_UNSPEC = 0x0
+ DEVLINK_RELOAD_LIMIT_NO_RESET = 0x1
+ DEVLINK_RELOAD_LIMIT_MAX = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_RESOURCE_LIST = 0x3f
+ DEVLINK_ATTR_RESOURCE = 0x40
+ DEVLINK_ATTR_RESOURCE_NAME = 0x41
+ DEVLINK_ATTR_RESOURCE_ID = 0x42
+ DEVLINK_ATTR_RESOURCE_SIZE = 0x43
+ DEVLINK_ATTR_RESOURCE_SIZE_NEW = 0x44
+ DEVLINK_ATTR_RESOURCE_SIZE_VALID = 0x45
+ DEVLINK_ATTR_RESOURCE_SIZE_MIN = 0x46
+ DEVLINK_ATTR_RESOURCE_SIZE_MAX = 0x47
+ DEVLINK_ATTR_RESOURCE_SIZE_GRAN = 0x48
+ DEVLINK_ATTR_RESOURCE_UNIT = 0x49
+ DEVLINK_ATTR_RESOURCE_OCC = 0x4a
+ DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID = 0x4b
+ DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS = 0x4c
+ DEVLINK_ATTR_PORT_FLAVOUR = 0x4d
+ DEVLINK_ATTR_PORT_NUMBER = 0x4e
+ DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER = 0x4f
+ DEVLINK_ATTR_PARAM = 0x50
+ DEVLINK_ATTR_PARAM_NAME = 0x51
+ DEVLINK_ATTR_PARAM_GENERIC = 0x52
+ DEVLINK_ATTR_PARAM_TYPE = 0x53
+ DEVLINK_ATTR_PARAM_VALUES_LIST = 0x54
+ DEVLINK_ATTR_PARAM_VALUE = 0x55
+ DEVLINK_ATTR_PARAM_VALUE_DATA = 0x56
+ DEVLINK_ATTR_PARAM_VALUE_CMODE = 0x57
+ DEVLINK_ATTR_REGION_NAME = 0x58
+ DEVLINK_ATTR_REGION_SIZE = 0x59
+ DEVLINK_ATTR_REGION_SNAPSHOTS = 0x5a
+ DEVLINK_ATTR_REGION_SNAPSHOT = 0x5b
+ DEVLINK_ATTR_REGION_SNAPSHOT_ID = 0x5c
+ DEVLINK_ATTR_REGION_CHUNKS = 0x5d
+ DEVLINK_ATTR_REGION_CHUNK = 0x5e
+ DEVLINK_ATTR_REGION_CHUNK_DATA = 0x5f
+ DEVLINK_ATTR_REGION_CHUNK_ADDR = 0x60
+ DEVLINK_ATTR_REGION_CHUNK_LEN = 0x61
+ DEVLINK_ATTR_INFO_DRIVER_NAME = 0x62
+ DEVLINK_ATTR_INFO_SERIAL_NUMBER = 0x63
+ DEVLINK_ATTR_INFO_VERSION_FIXED = 0x64
+ DEVLINK_ATTR_INFO_VERSION_RUNNING = 0x65
+ DEVLINK_ATTR_INFO_VERSION_STORED = 0x66
+ DEVLINK_ATTR_INFO_VERSION_NAME = 0x67
+ DEVLINK_ATTR_INFO_VERSION_VALUE = 0x68
+ DEVLINK_ATTR_SB_POOL_CELL_SIZE = 0x69
+ DEVLINK_ATTR_FMSG = 0x6a
+ DEVLINK_ATTR_FMSG_OBJ_NEST_START = 0x6b
+ DEVLINK_ATTR_FMSG_PAIR_NEST_START = 0x6c
+ DEVLINK_ATTR_FMSG_ARR_NEST_START = 0x6d
+ DEVLINK_ATTR_FMSG_NEST_END = 0x6e
+ DEVLINK_ATTR_FMSG_OBJ_NAME = 0x6f
+ DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE = 0x70
+ DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA = 0x71
+ DEVLINK_ATTR_HEALTH_REPORTER = 0x72
+ DEVLINK_ATTR_HEALTH_REPORTER_NAME = 0x73
+ DEVLINK_ATTR_HEALTH_REPORTER_STATE = 0x74
+ DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT = 0x75
+ DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT = 0x76
+ DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS = 0x77
+ DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD = 0x78
+ DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER = 0x79
+ DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME = 0x7a
+ DEVLINK_ATTR_FLASH_UPDATE_COMPONENT = 0x7b
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG = 0x7c
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE = 0x7d
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL = 0x7e
+ DEVLINK_ATTR_PORT_PCI_PF_NUMBER = 0x7f
+ DEVLINK_ATTR_PORT_PCI_VF_NUMBER = 0x80
+ DEVLINK_ATTR_STATS = 0x81
+ DEVLINK_ATTR_TRAP_NAME = 0x82
+ DEVLINK_ATTR_TRAP_ACTION = 0x83
+ DEVLINK_ATTR_TRAP_TYPE = 0x84
+ DEVLINK_ATTR_TRAP_GENERIC = 0x85
+ DEVLINK_ATTR_TRAP_METADATA = 0x86
+ DEVLINK_ATTR_TRAP_GROUP_NAME = 0x87
+ DEVLINK_ATTR_RELOAD_FAILED = 0x88
+ DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS = 0x89
+ DEVLINK_ATTR_NETNS_FD = 0x8a
+ DEVLINK_ATTR_NETNS_PID = 0x8b
+ DEVLINK_ATTR_NETNS_ID = 0x8c
+ DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP = 0x8d
+ DEVLINK_ATTR_TRAP_POLICER_ID = 0x8e
+ DEVLINK_ATTR_TRAP_POLICER_RATE = 0x8f
+ DEVLINK_ATTR_TRAP_POLICER_BURST = 0x90
+ DEVLINK_ATTR_PORT_FUNCTION = 0x91
+ DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER = 0x92
+ DEVLINK_ATTR_PORT_LANES = 0x93
+ DEVLINK_ATTR_PORT_SPLITTABLE = 0x94
+ DEVLINK_ATTR_PORT_EXTERNAL = 0x95
+ DEVLINK_ATTR_PORT_CONTROLLER_NUMBER = 0x96
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT = 0x97
+ DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK = 0x98
+ DEVLINK_ATTR_RELOAD_ACTION = 0x99
+ DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED = 0x9a
+ DEVLINK_ATTR_RELOAD_LIMITS = 0x9b
+ DEVLINK_ATTR_DEV_STATS = 0x9c
+ DEVLINK_ATTR_RELOAD_STATS = 0x9d
+ DEVLINK_ATTR_RELOAD_STATS_ENTRY = 0x9e
+ DEVLINK_ATTR_RELOAD_STATS_LIMIT = 0x9f
+ DEVLINK_ATTR_RELOAD_STATS_VALUE = 0xa0
+ DEVLINK_ATTR_REMOTE_RELOAD_STATS = 0xa1
+ DEVLINK_ATTR_RELOAD_ACTION_INFO = 0xa2
+ DEVLINK_ATTR_RELOAD_ACTION_STATS = 0xa3
+ DEVLINK_ATTR_PORT_PCI_SF_NUMBER = 0xa4
+ DEVLINK_ATTR_MAX = 0xa9
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ DEVLINK_RESOURCE_UNIT_ENTRY = 0x0
+ DEVLINK_PORT_FUNCTION_ATTR_UNSPEC = 0x0
+ DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR = 0x1
+ DEVLINK_PORT_FN_ATTR_STATE = 0x2
+ DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3
+ DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x3
+)
+
+type FsverityDigest struct {
+ Algorithm uint16
+ Size uint16
+}
+
+type FsverityEnableArg struct {
+ Version uint32
+ Hash_algorithm uint32
+ Block_size uint32
+ Salt_size uint32
+ Salt_ptr uint64
+ Sig_size uint32
+ _ uint32
+ Sig_ptr uint64
+ _ [11]uint64
+}
+
+type Nhmsg struct {
+ Family uint8
+ Scope uint8
+ Protocol uint8
+ Resvd uint8
+ Flags uint32
+}
+
+type NexthopGrp struct {
+ Id uint32
+ Weight uint8
+ Resvd1 uint8
+ Resvd2 uint16
+}
+
+const (
+ NHA_UNSPEC = 0x0
+ NHA_ID = 0x1
+ NHA_GROUP = 0x2
+ NHA_GROUP_TYPE = 0x3
+ NHA_BLACKHOLE = 0x4
+ NHA_OIF = 0x5
+ NHA_GATEWAY = 0x6
+ NHA_ENCAP_TYPE = 0x7
+ NHA_ENCAP = 0x8
+ NHA_GROUPS = 0x9
+ NHA_MASTER = 0xa
+)
+
+const (
+ CAN_RAW_FILTER = 0x1
+ CAN_RAW_ERR_FILTER = 0x2
+ CAN_RAW_LOOPBACK = 0x3
+ CAN_RAW_RECV_OWN_MSGS = 0x4
+ CAN_RAW_FD_FRAMES = 0x5
+ CAN_RAW_JOIN_FILTERS = 0x6
+)
+
+type WatchdogInfo struct {
+ Options uint32
+ Version uint32
+ Identity [32]uint8
+}
+
+type PPSFData struct {
+ Info PPSKInfo
+ Timeout PPSKTime
+}
+
+type PPSKParams struct {
+ Api_version int32
+ Mode int32
+ Assert_off_tu PPSKTime
+ Clear_off_tu PPSKTime
+}
+
+type PPSKTime struct {
+ Sec int64
+ Nsec int32
+ Flags uint32
+}
+
+const (
+ LWTUNNEL_ENCAP_NONE = 0x0
+ LWTUNNEL_ENCAP_MPLS = 0x1
+ LWTUNNEL_ENCAP_IP = 0x2
+ LWTUNNEL_ENCAP_ILA = 0x3
+ LWTUNNEL_ENCAP_IP6 = 0x4
+ LWTUNNEL_ENCAP_SEG6 = 0x5
+ LWTUNNEL_ENCAP_BPF = 0x6
+ LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
+ LWTUNNEL_ENCAP_RPL = 0x8
+ LWTUNNEL_ENCAP_IOAM6 = 0x9
+ LWTUNNEL_ENCAP_MAX = 0x9
+
+ MPLS_IPTUNNEL_UNSPEC = 0x0
+ MPLS_IPTUNNEL_DST = 0x1
+ MPLS_IPTUNNEL_TTL = 0x2
+ MPLS_IPTUNNEL_MAX = 0x2
+)
+
+const (
+ ETHTOOL_ID_UNSPEC = 0x0
+ ETHTOOL_RX_COPYBREAK = 0x1
+ ETHTOOL_TX_COPYBREAK = 0x2
+ ETHTOOL_PFC_PREVENTION_TOUT = 0x3
+ ETHTOOL_TUNABLE_UNSPEC = 0x0
+ ETHTOOL_TUNABLE_U8 = 0x1
+ ETHTOOL_TUNABLE_U16 = 0x2
+ ETHTOOL_TUNABLE_U32 = 0x3
+ ETHTOOL_TUNABLE_U64 = 0x4
+ ETHTOOL_TUNABLE_STRING = 0x5
+ ETHTOOL_TUNABLE_S8 = 0x6
+ ETHTOOL_TUNABLE_S16 = 0x7
+ ETHTOOL_TUNABLE_S32 = 0x8
+ ETHTOOL_TUNABLE_S64 = 0x9
+ ETHTOOL_PHY_ID_UNSPEC = 0x0
+ ETHTOOL_PHY_DOWNSHIFT = 0x1
+ ETHTOOL_PHY_FAST_LINK_DOWN = 0x2
+ ETHTOOL_PHY_EDPD = 0x3
+ ETHTOOL_LINK_EXT_STATE_AUTONEG = 0x0
+ ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE = 0x1
+ ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH = 0x2
+ ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY = 0x3
+ ETHTOOL_LINK_EXT_STATE_NO_CABLE = 0x4
+ ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE = 0x5
+ ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE = 0x6
+ ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE = 0x7
+ ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED = 0x8
+ ETHTOOL_LINK_EXT_STATE_OVERHEAT = 0x9
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED = 0x3
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE = 0x4
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE = 0x5
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD = 0x6
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY = 0x3
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT = 0x4
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS = 0x3
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED = 0x4
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED = 0x5
+ ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE = 0x2
+ ETHTOOL_FLASH_ALL_REGIONS = 0x0
+ ETHTOOL_F_UNSUPPORTED__BIT = 0x0
+ ETHTOOL_F_WISH__BIT = 0x1
+ ETHTOOL_F_COMPAT__BIT = 0x2
+ ETHTOOL_FEC_NONE_BIT = 0x0
+ ETHTOOL_FEC_AUTO_BIT = 0x1
+ ETHTOOL_FEC_OFF_BIT = 0x2
+ ETHTOOL_FEC_RS_BIT = 0x3
+ ETHTOOL_FEC_BASER_BIT = 0x4
+ ETHTOOL_FEC_LLRS_BIT = 0x5
+ ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0x0
+ ETHTOOL_LINK_MODE_10baseT_Full_BIT = 0x1
+ ETHTOOL_LINK_MODE_100baseT_Half_BIT = 0x2
+ ETHTOOL_LINK_MODE_100baseT_Full_BIT = 0x3
+ ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 0x4
+ ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 0x5
+ ETHTOOL_LINK_MODE_Autoneg_BIT = 0x6
+ ETHTOOL_LINK_MODE_TP_BIT = 0x7
+ ETHTOOL_LINK_MODE_AUI_BIT = 0x8
+ ETHTOOL_LINK_MODE_MII_BIT = 0x9
+ ETHTOOL_LINK_MODE_FIBRE_BIT = 0xa
+ ETHTOOL_LINK_MODE_BNC_BIT = 0xb
+ ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 0xc
+ ETHTOOL_LINK_MODE_Pause_BIT = 0xd
+ ETHTOOL_LINK_MODE_Asym_Pause_BIT = 0xe
+ ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 0xf
+ ETHTOOL_LINK_MODE_Backplane_BIT = 0x10
+ ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 0x11
+ ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 0x12
+ ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 0x13
+ ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 0x14
+ ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 0x15
+ ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 0x16
+ ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 0x17
+ ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 0x18
+ ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 0x19
+ ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 0x1a
+ ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 0x1b
+ ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 0x1c
+ ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 0x1d
+ ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 0x1e
+ ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 0x1f
+ ETHTOOL_LINK_MODE_25000baseKR_Full_BIT = 0x20
+ ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 0x21
+ ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 0x22
+ ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 0x23
+ ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT = 0x24
+ ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 0x25
+ ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 0x26
+ ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 0x27
+ ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 0x28
+ ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 0x29
+ ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 0x2a
+ ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 0x2b
+ ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 0x2c
+ ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 0x2d
+ ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 0x2e
+ ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 0x2f
+ ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 0x30
+ ETHTOOL_LINK_MODE_FEC_NONE_BIT = 0x31
+ ETHTOOL_LINK_MODE_FEC_RS_BIT = 0x32
+ ETHTOOL_LINK_MODE_FEC_BASER_BIT = 0x33
+ ETHTOOL_LINK_MODE_50000baseKR_Full_BIT = 0x34
+ ETHTOOL_LINK_MODE_50000baseSR_Full_BIT = 0x35
+ ETHTOOL_LINK_MODE_50000baseCR_Full_BIT = 0x36
+ ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT = 0x37
+ ETHTOOL_LINK_MODE_50000baseDR_Full_BIT = 0x38
+ ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT = 0x39
+ ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT = 0x3a
+ ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT = 0x3b
+ ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 0x3c
+ ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT = 0x3d
+ ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT = 0x3e
+ ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT = 0x3f
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 0x40
+ ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 0x41
+ ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 0x42
+ ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 0x43
+ ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 0x44
+ ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT = 0x45
+ ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT = 0x46
+ ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 0x47
+ ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 0x48
+ ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 0x49
+ ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 0x4a
+ ETHTOOL_LINK_MODE_100000baseKR_Full_BIT = 0x4b
+ ETHTOOL_LINK_MODE_100000baseSR_Full_BIT = 0x4c
+ ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT = 0x4d
+ ETHTOOL_LINK_MODE_100000baseCR_Full_BIT = 0x4e
+ ETHTOOL_LINK_MODE_100000baseDR_Full_BIT = 0x4f
+ ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT = 0x50
+ ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT = 0x51
+ ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 0x52
+ ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT = 0x53
+ ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT = 0x54
+ ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT = 0x55
+ ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT = 0x56
+ ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 0x57
+ ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 0x58
+ ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 0x59
+ ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 0x5a
+ ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 0x5b
+
+ ETHTOOL_MSG_USER_NONE = 0x0
+ ETHTOOL_MSG_STRSET_GET = 0x1
+ ETHTOOL_MSG_LINKINFO_GET = 0x2
+ ETHTOOL_MSG_LINKINFO_SET = 0x3
+ ETHTOOL_MSG_LINKMODES_GET = 0x4
+ ETHTOOL_MSG_LINKMODES_SET = 0x5
+ ETHTOOL_MSG_LINKSTATE_GET = 0x6
+ ETHTOOL_MSG_DEBUG_GET = 0x7
+ ETHTOOL_MSG_DEBUG_SET = 0x8
+ ETHTOOL_MSG_WOL_GET = 0x9
+ ETHTOOL_MSG_WOL_SET = 0xa
+ ETHTOOL_MSG_FEATURES_GET = 0xb
+ ETHTOOL_MSG_FEATURES_SET = 0xc
+ ETHTOOL_MSG_PRIVFLAGS_GET = 0xd
+ ETHTOOL_MSG_PRIVFLAGS_SET = 0xe
+ ETHTOOL_MSG_RINGS_GET = 0xf
+ ETHTOOL_MSG_RINGS_SET = 0x10
+ ETHTOOL_MSG_CHANNELS_GET = 0x11
+ ETHTOOL_MSG_CHANNELS_SET = 0x12
+ ETHTOOL_MSG_COALESCE_GET = 0x13
+ ETHTOOL_MSG_COALESCE_SET = 0x14
+ ETHTOOL_MSG_PAUSE_GET = 0x15
+ ETHTOOL_MSG_PAUSE_SET = 0x16
+ ETHTOOL_MSG_EEE_GET = 0x17
+ ETHTOOL_MSG_EEE_SET = 0x18
+ ETHTOOL_MSG_TSINFO_GET = 0x19
+ ETHTOOL_MSG_CABLE_TEST_ACT = 0x1a
+ ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 0x1b
+ ETHTOOL_MSG_TUNNEL_INFO_GET = 0x1c
+ ETHTOOL_MSG_USER_MAX = 0x21
+ ETHTOOL_MSG_KERNEL_NONE = 0x0
+ ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
+ ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
+ ETHTOOL_MSG_LINKINFO_NTF = 0x3
+ ETHTOOL_MSG_LINKMODES_GET_REPLY = 0x4
+ ETHTOOL_MSG_LINKMODES_NTF = 0x5
+ ETHTOOL_MSG_LINKSTATE_GET_REPLY = 0x6
+ ETHTOOL_MSG_DEBUG_GET_REPLY = 0x7
+ ETHTOOL_MSG_DEBUG_NTF = 0x8
+ ETHTOOL_MSG_WOL_GET_REPLY = 0x9
+ ETHTOOL_MSG_WOL_NTF = 0xa
+ ETHTOOL_MSG_FEATURES_GET_REPLY = 0xb
+ ETHTOOL_MSG_FEATURES_SET_REPLY = 0xc
+ ETHTOOL_MSG_FEATURES_NTF = 0xd
+ ETHTOOL_MSG_PRIVFLAGS_GET_REPLY = 0xe
+ ETHTOOL_MSG_PRIVFLAGS_NTF = 0xf
+ ETHTOOL_MSG_RINGS_GET_REPLY = 0x10
+ ETHTOOL_MSG_RINGS_NTF = 0x11
+ ETHTOOL_MSG_CHANNELS_GET_REPLY = 0x12
+ ETHTOOL_MSG_CHANNELS_NTF = 0x13
+ ETHTOOL_MSG_COALESCE_GET_REPLY = 0x14
+ ETHTOOL_MSG_COALESCE_NTF = 0x15
+ ETHTOOL_MSG_PAUSE_GET_REPLY = 0x16
+ ETHTOOL_MSG_PAUSE_NTF = 0x17
+ ETHTOOL_MSG_EEE_GET_REPLY = 0x18
+ ETHTOOL_MSG_EEE_NTF = 0x19
+ ETHTOOL_MSG_TSINFO_GET_REPLY = 0x1a
+ ETHTOOL_MSG_CABLE_TEST_NTF = 0x1b
+ ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 0x1c
+ ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 0x1d
+ ETHTOOL_MSG_KERNEL_MAX = 0x22
+ ETHTOOL_A_HEADER_UNSPEC = 0x0
+ ETHTOOL_A_HEADER_DEV_INDEX = 0x1
+ ETHTOOL_A_HEADER_DEV_NAME = 0x2
+ ETHTOOL_A_HEADER_FLAGS = 0x3
+ ETHTOOL_A_HEADER_MAX = 0x3
+ ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0
+ ETHTOOL_A_BITSET_BIT_INDEX = 0x1
+ ETHTOOL_A_BITSET_BIT_NAME = 0x2
+ ETHTOOL_A_BITSET_BIT_VALUE = 0x3
+ ETHTOOL_A_BITSET_BIT_MAX = 0x3
+ ETHTOOL_A_BITSET_BITS_UNSPEC = 0x0
+ ETHTOOL_A_BITSET_BITS_BIT = 0x1
+ ETHTOOL_A_BITSET_BITS_MAX = 0x1
+ ETHTOOL_A_BITSET_UNSPEC = 0x0
+ ETHTOOL_A_BITSET_NOMASK = 0x1
+ ETHTOOL_A_BITSET_SIZE = 0x2
+ ETHTOOL_A_BITSET_BITS = 0x3
+ ETHTOOL_A_BITSET_VALUE = 0x4
+ ETHTOOL_A_BITSET_MASK = 0x5
+ ETHTOOL_A_BITSET_MAX = 0x5
+ ETHTOOL_A_STRING_UNSPEC = 0x0
+ ETHTOOL_A_STRING_INDEX = 0x1
+ ETHTOOL_A_STRING_VALUE = 0x2
+ ETHTOOL_A_STRING_MAX = 0x2
+ ETHTOOL_A_STRINGS_UNSPEC = 0x0
+ ETHTOOL_A_STRINGS_STRING = 0x1
+ ETHTOOL_A_STRINGS_MAX = 0x1
+ ETHTOOL_A_STRINGSET_UNSPEC = 0x0
+ ETHTOOL_A_STRINGSET_ID = 0x1
+ ETHTOOL_A_STRINGSET_COUNT = 0x2
+ ETHTOOL_A_STRINGSET_STRINGS = 0x3
+ ETHTOOL_A_STRINGSET_MAX = 0x3
+ ETHTOOL_A_STRINGSETS_UNSPEC = 0x0
+ ETHTOOL_A_STRINGSETS_STRINGSET = 0x1
+ ETHTOOL_A_STRINGSETS_MAX = 0x1
+ ETHTOOL_A_STRSET_UNSPEC = 0x0
+ ETHTOOL_A_STRSET_HEADER = 0x1
+ ETHTOOL_A_STRSET_STRINGSETS = 0x2
+ ETHTOOL_A_STRSET_COUNTS_ONLY = 0x3
+ ETHTOOL_A_STRSET_MAX = 0x3
+ ETHTOOL_A_LINKINFO_UNSPEC = 0x0
+ ETHTOOL_A_LINKINFO_HEADER = 0x1
+ ETHTOOL_A_LINKINFO_PORT = 0x2
+ ETHTOOL_A_LINKINFO_PHYADDR = 0x3
+ ETHTOOL_A_LINKINFO_TP_MDIX = 0x4
+ ETHTOOL_A_LINKINFO_TP_MDIX_CTRL = 0x5
+ ETHTOOL_A_LINKINFO_TRANSCEIVER = 0x6
+ ETHTOOL_A_LINKINFO_MAX = 0x6
+ ETHTOOL_A_LINKMODES_UNSPEC = 0x0
+ ETHTOOL_A_LINKMODES_HEADER = 0x1
+ ETHTOOL_A_LINKMODES_AUTONEG = 0x2
+ ETHTOOL_A_LINKMODES_OURS = 0x3
+ ETHTOOL_A_LINKMODES_PEER = 0x4
+ ETHTOOL_A_LINKMODES_SPEED = 0x5
+ ETHTOOL_A_LINKMODES_DUPLEX = 0x6
+ ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG = 0x7
+ ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE = 0x8
+ ETHTOOL_A_LINKMODES_LANES = 0x9
+ ETHTOOL_A_LINKMODES_MAX = 0x9
+ ETHTOOL_A_LINKSTATE_UNSPEC = 0x0
+ ETHTOOL_A_LINKSTATE_HEADER = 0x1
+ ETHTOOL_A_LINKSTATE_LINK = 0x2
+ ETHTOOL_A_LINKSTATE_SQI = 0x3
+ ETHTOOL_A_LINKSTATE_SQI_MAX = 0x4
+ ETHTOOL_A_LINKSTATE_EXT_STATE = 0x5
+ ETHTOOL_A_LINKSTATE_EXT_SUBSTATE = 0x6
+ ETHTOOL_A_LINKSTATE_MAX = 0x6
+ ETHTOOL_A_DEBUG_UNSPEC = 0x0
+ ETHTOOL_A_DEBUG_HEADER = 0x1
+ ETHTOOL_A_DEBUG_MSGMASK = 0x2
+ ETHTOOL_A_DEBUG_MAX = 0x2
+ ETHTOOL_A_WOL_UNSPEC = 0x0
+ ETHTOOL_A_WOL_HEADER = 0x1
+ ETHTOOL_A_WOL_MODES = 0x2
+ ETHTOOL_A_WOL_SOPASS = 0x3
+ ETHTOOL_A_WOL_MAX = 0x3
+ ETHTOOL_A_FEATURES_UNSPEC = 0x0
+ ETHTOOL_A_FEATURES_HEADER = 0x1
+ ETHTOOL_A_FEATURES_HW = 0x2
+ ETHTOOL_A_FEATURES_WANTED = 0x3
+ ETHTOOL_A_FEATURES_ACTIVE = 0x4
+ ETHTOOL_A_FEATURES_NOCHANGE = 0x5
+ ETHTOOL_A_FEATURES_MAX = 0x5
+ ETHTOOL_A_PRIVFLAGS_UNSPEC = 0x0
+ ETHTOOL_A_PRIVFLAGS_HEADER = 0x1
+ ETHTOOL_A_PRIVFLAGS_FLAGS = 0x2
+ ETHTOOL_A_PRIVFLAGS_MAX = 0x2
+ ETHTOOL_A_RINGS_UNSPEC = 0x0
+ ETHTOOL_A_RINGS_HEADER = 0x1
+ ETHTOOL_A_RINGS_RX_MAX = 0x2
+ ETHTOOL_A_RINGS_RX_MINI_MAX = 0x3
+ ETHTOOL_A_RINGS_RX_JUMBO_MAX = 0x4
+ ETHTOOL_A_RINGS_TX_MAX = 0x5
+ ETHTOOL_A_RINGS_RX = 0x6
+ ETHTOOL_A_RINGS_RX_MINI = 0x7
+ ETHTOOL_A_RINGS_RX_JUMBO = 0x8
+ ETHTOOL_A_RINGS_TX = 0x9
+ ETHTOOL_A_RINGS_MAX = 0x9
+ ETHTOOL_A_CHANNELS_UNSPEC = 0x0
+ ETHTOOL_A_CHANNELS_HEADER = 0x1
+ ETHTOOL_A_CHANNELS_RX_MAX = 0x2
+ ETHTOOL_A_CHANNELS_TX_MAX = 0x3
+ ETHTOOL_A_CHANNELS_OTHER_MAX = 0x4
+ ETHTOOL_A_CHANNELS_COMBINED_MAX = 0x5
+ ETHTOOL_A_CHANNELS_RX_COUNT = 0x6
+ ETHTOOL_A_CHANNELS_TX_COUNT = 0x7
+ ETHTOOL_A_CHANNELS_OTHER_COUNT = 0x8
+ ETHTOOL_A_CHANNELS_COMBINED_COUNT = 0x9
+ ETHTOOL_A_CHANNELS_MAX = 0x9
+ ETHTOOL_A_COALESCE_UNSPEC = 0x0
+ ETHTOOL_A_COALESCE_HEADER = 0x1
+ ETHTOOL_A_COALESCE_RX_USECS = 0x2
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES = 0x3
+ ETHTOOL_A_COALESCE_RX_USECS_IRQ = 0x4
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ = 0x5
+ ETHTOOL_A_COALESCE_TX_USECS = 0x6
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES = 0x7
+ ETHTOOL_A_COALESCE_TX_USECS_IRQ = 0x8
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ = 0x9
+ ETHTOOL_A_COALESCE_STATS_BLOCK_USECS = 0xa
+ ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX = 0xb
+ ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX = 0xc
+ ETHTOOL_A_COALESCE_PKT_RATE_LOW = 0xd
+ ETHTOOL_A_COALESCE_RX_USECS_LOW = 0xe
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW = 0xf
+ ETHTOOL_A_COALESCE_TX_USECS_LOW = 0x10
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW = 0x11
+ ETHTOOL_A_COALESCE_PKT_RATE_HIGH = 0x12
+ ETHTOOL_A_COALESCE_RX_USECS_HIGH = 0x13
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH = 0x14
+ ETHTOOL_A_COALESCE_TX_USECS_HIGH = 0x15
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = 0x16
+ ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
+ ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18
+ ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19
+ ETHTOOL_A_COALESCE_MAX = 0x19
+ ETHTOOL_A_PAUSE_UNSPEC = 0x0
+ ETHTOOL_A_PAUSE_HEADER = 0x1
+ ETHTOOL_A_PAUSE_AUTONEG = 0x2
+ ETHTOOL_A_PAUSE_RX = 0x3
+ ETHTOOL_A_PAUSE_TX = 0x4
+ ETHTOOL_A_PAUSE_STATS = 0x5
+ ETHTOOL_A_PAUSE_MAX = 0x5
+ ETHTOOL_A_PAUSE_STAT_UNSPEC = 0x0
+ ETHTOOL_A_PAUSE_STAT_PAD = 0x1
+ ETHTOOL_A_PAUSE_STAT_TX_FRAMES = 0x2
+ ETHTOOL_A_PAUSE_STAT_RX_FRAMES = 0x3
+ ETHTOOL_A_PAUSE_STAT_MAX = 0x3
+ ETHTOOL_A_EEE_UNSPEC = 0x0
+ ETHTOOL_A_EEE_HEADER = 0x1
+ ETHTOOL_A_EEE_MODES_OURS = 0x2
+ ETHTOOL_A_EEE_MODES_PEER = 0x3
+ ETHTOOL_A_EEE_ACTIVE = 0x4
+ ETHTOOL_A_EEE_ENABLED = 0x5
+ ETHTOOL_A_EEE_TX_LPI_ENABLED = 0x6
+ ETHTOOL_A_EEE_TX_LPI_TIMER = 0x7
+ ETHTOOL_A_EEE_MAX = 0x7
+ ETHTOOL_A_TSINFO_UNSPEC = 0x0
+ ETHTOOL_A_TSINFO_HEADER = 0x1
+ ETHTOOL_A_TSINFO_TIMESTAMPING = 0x2
+ ETHTOOL_A_TSINFO_TX_TYPES = 0x3
+ ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
+ ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
+ ETHTOOL_A_TSINFO_MAX = 0x5
+ ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_MAX = 0x1
+ ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_RESULT_CODE_OK = 0x1
+ ETHTOOL_A_CABLE_RESULT_CODE_OPEN = 0x2
+ ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT = 0x3
+ ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT = 0x4
+ ETHTOOL_A_CABLE_PAIR_A = 0x0
+ ETHTOOL_A_CABLE_PAIR_B = 0x1
+ ETHTOOL_A_CABLE_PAIR_C = 0x2
+ ETHTOOL_A_CABLE_PAIR_D = 0x3
+ ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_RESULT_PAIR = 0x1
+ ETHTOOL_A_CABLE_RESULT_CODE = 0x2
+ ETHTOOL_A_CABLE_RESULT_MAX = 0x2
+ ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1
+ ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2
+ ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2
+ ETHTOOL_A_CABLE_NEST_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_NEST_RESULT = 0x1
+ ETHTOOL_A_CABLE_NEST_FAULT_LENGTH = 0x2
+ ETHTOOL_A_CABLE_NEST_MAX = 0x2
+ ETHTOOL_A_CABLE_TEST_NTF_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_NTF_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS = 0x2
+ ETHTOOL_A_CABLE_TEST_NTF_NEST = 0x3
+ ETHTOOL_A_CABLE_TEST_NTF_MAX = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST = 0x1
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST = 0x2
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR = 0x4
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = 0x4
+ ETHTOOL_A_CABLE_TEST_TDR_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_TDR_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_TDR_CFG = 0x2
+ ETHTOOL_A_CABLE_TEST_TDR_MAX = 0x2
+ ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 0x1
+ ETHTOOL_A_CABLE_AMPLITUDE_mV = 0x2
+ ETHTOOL_A_CABLE_AMPLITUDE_MAX = 0x2
+ ETHTOOL_A_CABLE_PULSE_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_PULSE_mV = 0x1
+ ETHTOOL_A_CABLE_PULSE_MAX = 0x1
+ ETHTOOL_A_CABLE_STEP_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE = 0x1
+ ETHTOOL_A_CABLE_STEP_LAST_DISTANCE = 0x2
+ ETHTOOL_A_CABLE_STEP_STEP_DISTANCE = 0x3
+ ETHTOOL_A_CABLE_STEP_MAX = 0x3
+ ETHTOOL_A_CABLE_TDR_NEST_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TDR_NEST_STEP = 0x1
+ ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE = 0x2
+ ETHTOOL_A_CABLE_TDR_NEST_PULSE = 0x3
+ ETHTOOL_A_CABLE_TDR_NEST_MAX = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS = 0x2
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = 0x3
+ ETHTOOL_UDP_TUNNEL_TYPE_VXLAN = 0x0
+ ETHTOOL_UDP_TUNNEL_TYPE_GENEVE = 0x1
+ ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE = 0x2
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT = 0x1
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE = 0x2
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = 0x2
+ ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE = 0x1
+ ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES = 0x2
+ ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY = 0x3
+ ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = 0x3
+ ETHTOOL_A_TUNNEL_UDP_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_UDP_TABLE = 0x1
+ ETHTOOL_A_TUNNEL_UDP_MAX = 0x1
+ ETHTOOL_A_TUNNEL_INFO_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_INFO_HEADER = 0x1
+ ETHTOOL_A_TUNNEL_INFO_UDP_PORTS = 0x2
+ ETHTOOL_A_TUNNEL_INFO_MAX = 0x2
+)
+
+type EthtoolDrvinfo struct {
+ Cmd uint32
+ Driver [32]byte
+ Version [32]byte
+ Fw_version [32]byte
+ Bus_info [32]byte
+ Erom_version [32]byte
+ Reserved2 [12]byte
+ N_priv_flags uint32
+ N_stats uint32
+ Testinfo_len uint32
+ Eedump_len uint32
+ Regdump_len uint32
+}
+
+type (
+ HIDRawReportDescriptor struct {
+ Size uint32
+ Value [4096]uint8
+ }
+ HIDRawDevInfo struct {
+ Bustype uint32
+ Vendor int16
+ Product int16
+ }
+)
+
+const (
+ CLOSE_RANGE_UNSHARE = 0x2
+ CLOSE_RANGE_CLOEXEC = 0x4
+)
+
+const (
+ NLMSGERR_ATTR_MSG = 0x1
+ NLMSGERR_ATTR_OFFS = 0x2
+ NLMSGERR_ATTR_COOKIE = 0x3
+)
+
+type (
+ EraseInfo struct {
+ Start uint32
+ Length uint32
+ }
+ EraseInfo64 struct {
+ Start uint64
+ Length uint64
+ }
+ MtdOobBuf struct {
+ Start uint32
+ Length uint32
+ Ptr *uint8
+ }
+ MtdOobBuf64 struct {
+ Start uint64
+ Pad uint32
+ Length uint32
+ Ptr uint64
+ }
+ MtdWriteReq struct {
+ Start uint64
+ Len uint64
+ Ooblen uint64
+ Data uint64
+ Oob uint64
+ Mode uint8
+ _ [7]uint8
+ }
+ MtdInfo struct {
+ Type uint8
+ Flags uint32
+ Size uint32
+ Erasesize uint32
+ Writesize uint32
+ Oobsize uint32
+ _ uint64
+ }
+ RegionInfo struct {
+ Offset uint32
+ Erasesize uint32
+ Numblocks uint32
+ Regionindex uint32
+ }
+ OtpInfo struct {
+ Start uint32
+ Length uint32
+ Locked uint32
+ }
+ NandOobinfo struct {
+ Useecc uint32
+ Eccbytes uint32
+ Oobfree [8][2]uint32
+ Eccpos [32]uint32
+ }
+ NandOobfree struct {
+ Offset uint32
+ Length uint32
+ }
+ NandEcclayout struct {
+ Eccbytes uint32
+ Eccpos [64]uint32
+ Oobavail uint32
+ Oobfree [8]NandOobfree
+ }
+ MtdEccStats struct {
+ Corrected uint32
+ Failed uint32
+ Badblocks uint32
+ Bbtblocks uint32
+ }
+)
+
+const (
+ MTD_OPS_PLACE_OOB = 0x0
+ MTD_OPS_AUTO_OOB = 0x1
+ MTD_OPS_RAW = 0x2
+)
+
+const (
+ MTD_FILE_MODE_NORMAL = 0x0
+ MTD_FILE_MODE_OTP_FACTORY = 0x1
+ MTD_FILE_MODE_OTP_USER = 0x2
+ MTD_FILE_MODE_RAW = 0x3
+)
+
+const (
+ NFC_CMD_UNSPEC = 0x0
+ NFC_CMD_GET_DEVICE = 0x1
+ NFC_CMD_DEV_UP = 0x2
+ NFC_CMD_DEV_DOWN = 0x3
+ NFC_CMD_DEP_LINK_UP = 0x4
+ NFC_CMD_DEP_LINK_DOWN = 0x5
+ NFC_CMD_START_POLL = 0x6
+ NFC_CMD_STOP_POLL = 0x7
+ NFC_CMD_GET_TARGET = 0x8
+ NFC_EVENT_TARGETS_FOUND = 0x9
+ NFC_EVENT_DEVICE_ADDED = 0xa
+ NFC_EVENT_DEVICE_REMOVED = 0xb
+ NFC_EVENT_TARGET_LOST = 0xc
+ NFC_EVENT_TM_ACTIVATED = 0xd
+ NFC_EVENT_TM_DEACTIVATED = 0xe
+ NFC_CMD_LLC_GET_PARAMS = 0xf
+ NFC_CMD_LLC_SET_PARAMS = 0x10
+ NFC_CMD_ENABLE_SE = 0x11
+ NFC_CMD_DISABLE_SE = 0x12
+ NFC_CMD_LLC_SDREQ = 0x13
+ NFC_EVENT_LLC_SDRES = 0x14
+ NFC_CMD_FW_DOWNLOAD = 0x15
+ NFC_EVENT_SE_ADDED = 0x16
+ NFC_EVENT_SE_REMOVED = 0x17
+ NFC_EVENT_SE_CONNECTIVITY = 0x18
+ NFC_EVENT_SE_TRANSACTION = 0x19
+ NFC_CMD_GET_SE = 0x1a
+ NFC_CMD_SE_IO = 0x1b
+ NFC_CMD_ACTIVATE_TARGET = 0x1c
+ NFC_CMD_VENDOR = 0x1d
+ NFC_CMD_DEACTIVATE_TARGET = 0x1e
+ NFC_ATTR_UNSPEC = 0x0
+ NFC_ATTR_DEVICE_INDEX = 0x1
+ NFC_ATTR_DEVICE_NAME = 0x2
+ NFC_ATTR_PROTOCOLS = 0x3
+ NFC_ATTR_TARGET_INDEX = 0x4
+ NFC_ATTR_TARGET_SENS_RES = 0x5
+ NFC_ATTR_TARGET_SEL_RES = 0x6
+ NFC_ATTR_TARGET_NFCID1 = 0x7
+ NFC_ATTR_TARGET_SENSB_RES = 0x8
+ NFC_ATTR_TARGET_SENSF_RES = 0x9
+ NFC_ATTR_COMM_MODE = 0xa
+ NFC_ATTR_RF_MODE = 0xb
+ NFC_ATTR_DEVICE_POWERED = 0xc
+ NFC_ATTR_IM_PROTOCOLS = 0xd
+ NFC_ATTR_TM_PROTOCOLS = 0xe
+ NFC_ATTR_LLC_PARAM_LTO = 0xf
+ NFC_ATTR_LLC_PARAM_RW = 0x10
+ NFC_ATTR_LLC_PARAM_MIUX = 0x11
+ NFC_ATTR_SE = 0x12
+ NFC_ATTR_LLC_SDP = 0x13
+ NFC_ATTR_FIRMWARE_NAME = 0x14
+ NFC_ATTR_SE_INDEX = 0x15
+ NFC_ATTR_SE_TYPE = 0x16
+ NFC_ATTR_SE_AID = 0x17
+ NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS = 0x18
+ NFC_ATTR_SE_APDU = 0x19
+ NFC_ATTR_TARGET_ISO15693_DSFID = 0x1a
+ NFC_ATTR_TARGET_ISO15693_UID = 0x1b
+ NFC_ATTR_SE_PARAMS = 0x1c
+ NFC_ATTR_VENDOR_ID = 0x1d
+ NFC_ATTR_VENDOR_SUBCMD = 0x1e
+ NFC_ATTR_VENDOR_DATA = 0x1f
+ NFC_SDP_ATTR_UNSPEC = 0x0
+ 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
+)
+
+type MountAttr struct {
+ Attr_set uint64
+ Attr_clr uint64
+ Propagation uint64
+ Userns_fd uint64
+}
+
+const (
+ WG_CMD_GET_DEVICE = 0x0
+ WG_CMD_SET_DEVICE = 0x1
+ WGDEVICE_F_REPLACE_PEERS = 0x1
+ WGDEVICE_A_UNSPEC = 0x0
+ WGDEVICE_A_IFINDEX = 0x1
+ WGDEVICE_A_IFNAME = 0x2
+ WGDEVICE_A_PRIVATE_KEY = 0x3
+ WGDEVICE_A_PUBLIC_KEY = 0x4
+ WGDEVICE_A_FLAGS = 0x5
+ WGDEVICE_A_LISTEN_PORT = 0x6
+ WGDEVICE_A_FWMARK = 0x7
+ WGDEVICE_A_PEERS = 0x8
+ WGPEER_F_REMOVE_ME = 0x1
+ WGPEER_F_REPLACE_ALLOWEDIPS = 0x2
+ WGPEER_F_UPDATE_ONLY = 0x4
+ WGPEER_A_UNSPEC = 0x0
+ WGPEER_A_PUBLIC_KEY = 0x1
+ WGPEER_A_PRESHARED_KEY = 0x2
+ WGPEER_A_FLAGS = 0x3
+ WGPEER_A_ENDPOINT = 0x4
+ WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL = 0x5
+ WGPEER_A_LAST_HANDSHAKE_TIME = 0x6
+ WGPEER_A_RX_BYTES = 0x7
+ WGPEER_A_TX_BYTES = 0x8
+ WGPEER_A_ALLOWEDIPS = 0x9
+ WGPEER_A_PROTOCOL_VERSION = 0xa
+ WGALLOWEDIP_A_UNSPEC = 0x0
+ WGALLOWEDIP_A_FAMILY = 0x1
+ WGALLOWEDIP_A_IPADDR = 0x2
+ WGALLOWEDIP_A_CIDR_MASK = 0x3
+)
+
+const (
+ NL_ATTR_TYPE_INVALID = 0x0
+ NL_ATTR_TYPE_FLAG = 0x1
+ NL_ATTR_TYPE_U8 = 0x2
+ NL_ATTR_TYPE_U16 = 0x3
+ NL_ATTR_TYPE_U32 = 0x4
+ NL_ATTR_TYPE_U64 = 0x5
+ NL_ATTR_TYPE_S8 = 0x6
+ NL_ATTR_TYPE_S16 = 0x7
+ NL_ATTR_TYPE_S32 = 0x8
+ NL_ATTR_TYPE_S64 = 0x9
+ NL_ATTR_TYPE_BINARY = 0xa
+ NL_ATTR_TYPE_STRING = 0xb
+ NL_ATTR_TYPE_NUL_STRING = 0xc
+ NL_ATTR_TYPE_NESTED = 0xd
+ NL_ATTR_TYPE_NESTED_ARRAY = 0xe
+ NL_ATTR_TYPE_BITFIELD32 = 0xf
+
+ NL_POLICY_TYPE_ATTR_UNSPEC = 0x0
+ NL_POLICY_TYPE_ATTR_TYPE = 0x1
+ NL_POLICY_TYPE_ATTR_MIN_VALUE_S = 0x2
+ NL_POLICY_TYPE_ATTR_MAX_VALUE_S = 0x3
+ NL_POLICY_TYPE_ATTR_MIN_VALUE_U = 0x4
+ NL_POLICY_TYPE_ATTR_MAX_VALUE_U = 0x5
+ NL_POLICY_TYPE_ATTR_MIN_LENGTH = 0x6
+ NL_POLICY_TYPE_ATTR_MAX_LENGTH = 0x7
+ NL_POLICY_TYPE_ATTR_POLICY_IDX = 0x8
+ NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE = 0x9
+ NL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 0xa
+ NL_POLICY_TYPE_ATTR_PAD = 0xb
+ NL_POLICY_TYPE_ATTR_MASK = 0xc
+ NL_POLICY_TYPE_ATTR_MAX = 0xc
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index d2306df..bea2549 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && linux
// +build 386,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
_ uint16
@@ -114,36 +101,6 @@ type Stat_t struct {
Ino uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [1]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -165,180 +118,25 @@ type Flock_t struct {
Pid int32
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint32
}
type RawSockaddr struct {
@@ -351,41 +149,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -402,383 +170,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [16]byte
}
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockaddrNFCLLCP = 0x58
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Ebx int32
Ecx int32
@@ -820,15 +227,6 @@ type Sysinfo_t struct {
_ [8]int8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -843,35 +241,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -880,33 +250,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -918,13 +261,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -974,279 +310,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1322,22 +392,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1345,88 +399,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1442,18 +414,6 @@ type Statfs_t struct {
Spare [4]int32
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1464,589 +424,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2057,13 +438,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2073,33 +447,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2108,135 +458,6 @@ type XDPUmemReg struct {
Flags uint32
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2367,218 +588,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint16
@@ -2593,38 +602,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]int8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2633,21 +610,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2659,150 +621,50 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x800470a1
+ PPS_SETPARAMS = 0x400470a2
+ PPS_GETCAP = 0x800470a3
+ PPS_FETCH = 0xc00470a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 8888705..b8c8f28 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && linux
// +build amd64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -113,36 +100,6 @@ type Stat_t struct {
_ [3]int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -152,10 +109,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -165,180 +118,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -351,41 +151,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -403,383 +173,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
R15 uint64
R14 uint64
@@ -832,15 +241,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -856,35 +256,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -893,33 +265,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -931,13 +276,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -985,279 +323,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1333,22 +405,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1356,88 +412,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1453,18 +427,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1476,589 +438,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2069,13 +452,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2086,33 +462,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2122,135 +474,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2381,218 +604,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint64
@@ -2608,38 +619,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2648,21 +627,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2674,150 +638,48 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 5f6f594..4db4430 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && linux
// +build arm,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
_ uint16
@@ -116,36 +103,6 @@ type Stat_t struct {
Ino uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -155,10 +112,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -169,180 +122,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint32
}
type RawSockaddr struct {
@@ -355,41 +155,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -406,383 +176,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [16]byte
}
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockaddrNFCLLCP = 0x58
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Uregs [18]uint32
}
@@ -808,15 +217,6 @@ type Sysinfo_t struct {
_ [8]uint8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -832,35 +232,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -869,33 +241,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -907,13 +252,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -963,279 +301,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1311,22 +383,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1334,88 +390,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1432,18 +406,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1454,589 +416,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2047,13 +430,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2064,33 +440,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2100,135 +452,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2359,218 +582,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint16
@@ -2585,38 +596,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]uint8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2625,21 +604,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2651,150 +615,51 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x800470a1
+ PPS_SETPARAMS = 0x400470a2
+ PPS_GETCAP = 0x800470a3
+ PPS_FETCH = 0xc00470a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index e27030c..3ebcad8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && linux
// +build arm64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -114,36 +101,6 @@ type Stat_t struct {
_ [2]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,180 +119,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -352,41 +152,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +174,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [31]uint64
Sp uint64
@@ -810,15 +219,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -835,35 +235,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -872,33 +244,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -910,13 +255,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -964,279 +302,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1312,22 +384,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1335,88 +391,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1432,18 +406,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1455,589 +417,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2048,13 +431,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2065,33 +441,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2101,135 +453,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2360,218 +583,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2587,38 +598,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2627,21 +606,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2653,150 +617,48 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 9b1c03d..3eb33e4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips && linux
// +build mips,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]int32
@@ -115,36 +102,6 @@ type Stat_t struct {
Pad5 [14]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -168,180 +121,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint32
}
type RawSockaddr struct {
@@ -354,41 +154,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +175,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [16]byte
}
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockaddrNFCLLCP = 0x58
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +222,6 @@ type Sysinfo_t struct {
_ [8]int8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -837,35 +237,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -874,33 +246,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -912,13 +257,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -968,279 +306,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1316,22 +388,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1339,88 +395,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1438,18 +412,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1460,589 +422,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2053,13 +436,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2070,33 +446,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2106,135 +458,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2365,218 +588,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2591,38 +602,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]int8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2631,21 +610,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2657,150 +621,50 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400470a1
+ PPS_SETPARAMS = 0x800470a2
+ PPS_GETCAP = 0x400470a3
+ PPS_FETCH = 0xc00470a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 3b88e1f..79a9446 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64 && linux
// +build mips64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]uint32
@@ -114,36 +101,6 @@ type Stat_t struct {
Blocks int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,180 +119,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -352,41 +152,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +174,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +222,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -838,35 +238,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -875,33 +247,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -913,13 +258,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -967,279 +305,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1315,22 +387,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1338,88 +394,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1435,18 +409,6 @@ type Statfs_t struct {
Spare [5]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1458,589 +420,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2051,13 +434,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2068,33 +444,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2104,135 +456,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2363,218 +586,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2590,38 +601,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2630,21 +609,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2656,150 +620,48 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 7277dc3..8f4b107 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64le && linux
// +build mips64le,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]uint32
@@ -114,36 +101,6 @@ type Stat_t struct {
Blocks int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,180 +119,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -352,41 +152,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +174,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +222,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -838,35 +238,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -875,33 +247,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -913,13 +258,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -967,279 +305,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1315,22 +387,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1338,88 +394,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1435,18 +409,6 @@ type Statfs_t struct {
Spare [5]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1458,589 +420,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2051,13 +434,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2068,33 +444,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2104,135 +456,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2363,218 +586,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2590,38 +601,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2630,21 +609,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2656,150 +620,48 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 6f32c17..e4eb217 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mipsle && linux
// +build mipsle,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]int32
@@ -115,36 +102,6 @@ type Stat_t struct {
Pad5 [14]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -168,180 +121,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint32
}
type RawSockaddr struct {
@@ -354,41 +154,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +175,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [16]byte
}
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockaddrNFCLLCP = 0x58
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +222,6 @@ type Sysinfo_t struct {
_ [8]int8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -837,35 +237,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -874,33 +246,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -912,13 +257,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -968,279 +306,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1316,22 +388,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1339,88 +395,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1438,18 +412,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1460,589 +422,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2053,13 +436,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2070,33 +446,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2106,135 +458,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2365,218 +588,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2591,38 +602,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]int8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2631,21 +610,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2657,150 +621,50 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400470a1
+ PPS_SETPARAMS = 0x800470a2
+ PPS_GETCAP = 0x400470a3
+ PPS_FETCH = 0xc00470a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
new file mode 100644
index 0000000..d5b21f0
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -0,0 +1,678 @@
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc && linux
+// +build ppc,linux
+
+package unix
+
+const (
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
+)
+
+type (
+ _C_long int32
+)
+
+type Timespec struct {
+ Sec int32
+ Nsec int32
+}
+
+type Timeval struct {
+ Sec int32
+ Usec int32
+}
+
+type Timex struct {
+ Modes uint32
+ Offset int32
+ Freq int32
+ Maxerror int32
+ Esterror int32
+ Status int32
+ Constant int32
+ Precision int32
+ Tolerance int32
+ Time Timeval
+ Tick int32
+ Ppsfreq int32
+ Jitter int32
+ Shift int32
+ Stabil int32
+ Jitcnt int32
+ Calcnt int32
+ Errcnt int32
+ Stbcnt int32
+ Tai int32
+ _ [44]byte
+}
+
+type Time_t int32
+
+type Tms struct {
+ Utime int32
+ Stime int32
+ Cutime int32
+ Cstime int32
+}
+
+type Utimbuf struct {
+ Actime int32
+ Modtime int32
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int32
+ Ixrss int32
+ Idrss int32
+ Isrss int32
+ Minflt int32
+ Majflt int32
+ Nswap int32
+ Inblock int32
+ Oublock int32
+ Msgsnd int32
+ Msgrcv int32
+ Nsignals int32
+ Nvcsw int32
+ Nivcsw int32
+}
+
+type Stat_t struct {
+ Dev uint64
+ Ino uint64
+ Mode uint32
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev uint64
+ _ uint16
+ _ [4]byte
+ Size int64
+ Blksize int32
+ _ [4]byte
+ Blocks int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ _ uint32
+ _ uint32
+}
+
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]uint8
+ _ [5]byte
+}
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ _ [4]byte
+ Start int64
+ Len int64
+ Pid int32
+ _ [4]byte
+}
+
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
+}
+
+const (
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
+)
+
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint32
+}
+
+type RawSockaddr struct {
+ Family uint16
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [96]uint8
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [16]byte
+}
+
+const (
+ SizeofSockaddrNFCLLCP = 0x58
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
+)
+
+const (
+ SizeofSockFprog = 0x8
+)
+
+type PtraceRegs struct {
+ Gpr [32]uint32
+ Nip uint32
+ Msr uint32
+ Orig_gpr3 uint32
+ Ctr uint32
+ Link uint32
+ Xer uint32
+ Ccr uint32
+ Mq uint32
+ Trap uint32
+ Dar uint32
+ Dsisr uint32
+ Result uint32
+}
+
+type FdSet struct {
+ Bits [32]int32
+}
+
+type Sysinfo_t struct {
+ Uptime int32
+ Loads [3]uint32
+ Totalram uint32
+ Freeram uint32
+ Sharedram uint32
+ Bufferram uint32
+ Totalswap uint32
+ Freeswap uint32
+ Procs uint16
+ Pad uint16
+ Totalhigh uint32
+ Freehigh uint32
+ Unit uint32
+ _ [8]uint8
+}
+
+type Ustat_t struct {
+ Tfree int32
+ Tinode uint32
+ Fname [6]uint8
+ Fpack [6]uint8
+}
+
+type EpollEvent struct {
+ Events uint32
+ _ int32
+ Fd int32
+ Pad int32
+}
+
+const (
+ POLLRDHUP = 0x2000
+)
+
+type Sigset_t struct {
+ Val [32]uint32
+}
+
+const _C__NSIG = 0x41
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [19]uint8
+ Line uint8
+ Ispeed uint32
+ Ospeed uint32
+}
+
+type Taskstats struct {
+ Version uint16
+ Ac_exitcode uint32
+ Ac_flag uint8
+ Ac_nice uint8
+ _ [4]byte
+ Cpu_count uint64
+ Cpu_delay_total uint64
+ Blkio_count uint64
+ Blkio_delay_total uint64
+ Swapin_count uint64
+ Swapin_delay_total uint64
+ Cpu_run_real_total uint64
+ Cpu_run_virtual_total uint64
+ Ac_comm [32]uint8
+ Ac_sched uint8
+ Ac_pad [3]uint8
+ _ [4]byte
+ Ac_uid uint32
+ Ac_gid uint32
+ Ac_pid uint32
+ Ac_ppid uint32
+ Ac_btime uint32
+ _ [4]byte
+ Ac_etime uint64
+ Ac_utime uint64
+ Ac_stime uint64
+ Ac_minflt uint64
+ Ac_majflt uint64
+ Coremem uint64
+ Virtmem uint64
+ Hiwater_rss uint64
+ Hiwater_vm uint64
+ Read_char uint64
+ Write_char uint64
+ Read_syscalls uint64
+ Write_syscalls uint64
+ Read_bytes uint64
+ Write_bytes uint64
+ Cancelled_write_bytes uint64
+ Nvcsw uint64
+ Nivcsw uint64
+ Ac_utimescaled uint64
+ Ac_stimescaled uint64
+ Cpu_scaled_run_real_total uint64
+ Freepages_count uint64
+ Freepages_delay_total uint64
+ Thrashing_count uint64
+ Thrashing_delay_total uint64
+ Ac_btime64 uint64
+}
+
+type cpuMask uint32
+
+const (
+ _NCPUBITS = 0x20
+)
+
+const (
+ CBitFieldMaskBit0 = 0x8000000000000000
+ CBitFieldMaskBit1 = 0x4000000000000000
+ CBitFieldMaskBit2 = 0x2000000000000000
+ CBitFieldMaskBit3 = 0x1000000000000000
+ CBitFieldMaskBit4 = 0x800000000000000
+ CBitFieldMaskBit5 = 0x400000000000000
+ CBitFieldMaskBit6 = 0x200000000000000
+ CBitFieldMaskBit7 = 0x100000000000000
+ CBitFieldMaskBit8 = 0x80000000000000
+ CBitFieldMaskBit9 = 0x40000000000000
+ CBitFieldMaskBit10 = 0x20000000000000
+ CBitFieldMaskBit11 = 0x10000000000000
+ CBitFieldMaskBit12 = 0x8000000000000
+ CBitFieldMaskBit13 = 0x4000000000000
+ CBitFieldMaskBit14 = 0x2000000000000
+ CBitFieldMaskBit15 = 0x1000000000000
+ CBitFieldMaskBit16 = 0x800000000000
+ CBitFieldMaskBit17 = 0x400000000000
+ CBitFieldMaskBit18 = 0x200000000000
+ CBitFieldMaskBit19 = 0x100000000000
+ CBitFieldMaskBit20 = 0x80000000000
+ CBitFieldMaskBit21 = 0x40000000000
+ CBitFieldMaskBit22 = 0x20000000000
+ CBitFieldMaskBit23 = 0x10000000000
+ CBitFieldMaskBit24 = 0x8000000000
+ CBitFieldMaskBit25 = 0x4000000000
+ CBitFieldMaskBit26 = 0x2000000000
+ CBitFieldMaskBit27 = 0x1000000000
+ CBitFieldMaskBit28 = 0x800000000
+ CBitFieldMaskBit29 = 0x400000000
+ CBitFieldMaskBit30 = 0x200000000
+ CBitFieldMaskBit31 = 0x100000000
+ CBitFieldMaskBit32 = 0x80000000
+ CBitFieldMaskBit33 = 0x40000000
+ CBitFieldMaskBit34 = 0x20000000
+ CBitFieldMaskBit35 = 0x10000000
+ CBitFieldMaskBit36 = 0x8000000
+ CBitFieldMaskBit37 = 0x4000000
+ CBitFieldMaskBit38 = 0x2000000
+ CBitFieldMaskBit39 = 0x1000000
+ CBitFieldMaskBit40 = 0x800000
+ CBitFieldMaskBit41 = 0x400000
+ CBitFieldMaskBit42 = 0x200000
+ CBitFieldMaskBit43 = 0x100000
+ CBitFieldMaskBit44 = 0x80000
+ CBitFieldMaskBit45 = 0x40000
+ CBitFieldMaskBit46 = 0x20000
+ CBitFieldMaskBit47 = 0x10000
+ CBitFieldMaskBit48 = 0x8000
+ CBitFieldMaskBit49 = 0x4000
+ CBitFieldMaskBit50 = 0x2000
+ CBitFieldMaskBit51 = 0x1000
+ CBitFieldMaskBit52 = 0x800
+ CBitFieldMaskBit53 = 0x400
+ CBitFieldMaskBit54 = 0x200
+ CBitFieldMaskBit55 = 0x100
+ CBitFieldMaskBit56 = 0x80
+ CBitFieldMaskBit57 = 0x40
+ CBitFieldMaskBit58 = 0x20
+ CBitFieldMaskBit59 = 0x10
+ CBitFieldMaskBit60 = 0x8
+ CBitFieldMaskBit61 = 0x4
+ CBitFieldMaskBit62 = 0x2
+ CBitFieldMaskBit63 = 0x1
+)
+
+type SockaddrStorage struct {
+ Family uint16
+ _ [122]uint8
+ _ uint32
+}
+
+type HDGeometry struct {
+ Heads uint8
+ Sectors uint8
+ Cylinders uint16
+ Start uint32
+}
+
+type Statfs_t struct {
+ Type int32
+ Bsize int32
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint64
+ Ffree uint64
+ Fsid Fsid
+ Namelen int32
+ Frsize int32
+ Flags int32
+ Spare [4]int32
+ _ [4]byte
+}
+
+type TpacketHdr struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Usec uint32
+}
+
+const (
+ SizeofTpacketHdr = 0x18
+)
+
+type RTCPLLInfo struct {
+ Ctrl int32
+ Value int32
+ Max int32
+ Min int32
+ Posmult int32
+ Negmult int32
+ Clock int32
+}
+
+type BlkpgPartition struct {
+ Start int64
+ Length int64
+ Pno int32
+ Devname [64]uint8
+ Volname [64]uint8
+ _ [4]byte
+}
+
+const (
+ BLKPG = 0x20001269
+)
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+ Flags uint32
+ _ [4]byte
+}
+
+type CryptoUserAlg struct {
+ Name [64]uint8
+ Driver_name [64]uint8
+ Module_name [64]uint8
+ Type uint32
+ Mask uint32
+ Refcnt uint32
+ Flags uint32
+}
+
+type CryptoStatAEAD struct {
+ Type [64]uint8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatAKCipher struct {
+ Type [64]uint8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Verify_cnt uint64
+ Sign_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatCipher struct {
+ Type [64]uint8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatCompress struct {
+ Type [64]uint8
+ Compress_cnt uint64
+ Compress_tlen uint64
+ Decompress_cnt uint64
+ Decompress_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatHash struct {
+ Type [64]uint8
+ Hash_cnt uint64
+ Hash_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatKPP struct {
+ Type [64]uint8
+ Setsecret_cnt uint64
+ Generate_public_key_cnt uint64
+ Compute_shared_secret_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatRNG struct {
+ Type [64]uint8
+ Generate_cnt uint64
+ Generate_tlen uint64
+ Seed_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatLarval struct {
+ Type [64]uint8
+}
+
+type CryptoReportLarval struct {
+ Type [64]uint8
+}
+
+type CryptoReportHash struct {
+ Type [64]uint8
+ Blocksize uint32
+ Digestsize uint32
+}
+
+type CryptoReportCipher struct {
+ Type [64]uint8
+ Blocksize uint32
+ Min_keysize uint32
+ Max_keysize uint32
+}
+
+type CryptoReportBlkCipher struct {
+ Type [64]uint8
+ Geniv [64]uint8
+ Blocksize uint32
+ Min_keysize uint32
+ Max_keysize uint32
+ Ivsize uint32
+}
+
+type CryptoReportAEAD struct {
+ Type [64]uint8
+ Geniv [64]uint8
+ Blocksize uint32
+ Maxauthsize uint32
+ Ivsize uint32
+}
+
+type CryptoReportComp struct {
+ Type [64]uint8
+}
+
+type CryptoReportRNG struct {
+ Type [64]uint8
+ Seedsize uint32
+}
+
+type CryptoReportAKCipher struct {
+ Type [64]uint8
+}
+
+type CryptoReportKPP struct {
+ Type [64]uint8
+}
+
+type CryptoReportAcomp struct {
+ Type [64]uint8
+}
+
+type LoopInfo struct {
+ Number int32
+ Device uint32
+ Inode uint32
+ Rdevice uint32
+ Offset int32
+ Encrypt_type int32
+ Encrypt_key_size int32
+ Flags int32
+ Name [64]uint8
+ Encrypt_key [32]uint8
+ Init [2]uint32
+ Reserved [4]uint8
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]uint8
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]uint8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]uint8
+}
+
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
+
+const (
+ PPS_GETPARAMS = 0x400470a1
+ PPS_SETPARAMS = 0x800470a2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 8a9484d..5188d14 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && linux
// +build ppc64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -115,36 +102,6 @@ type Stat_t struct {
_ uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -167,180 +120,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -353,41 +153,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +175,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Gpr [32]uint64
Nip uint64
@@ -820,15 +229,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -845,35 +245,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -882,33 +254,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -920,13 +265,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -974,279 +312,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1322,22 +394,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1345,88 +401,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1442,18 +416,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1465,589 +427,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2058,13 +441,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2075,33 +451,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x20001269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2111,135 +463,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2370,218 +593,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint64
@@ -2597,38 +608,6 @@ type LoopInfo struct {
Reserved [4]uint8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2637,21 +616,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2663,150 +627,47 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 7190a18..de4dd4c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64le && linux
// +build ppc64le,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -115,36 +102,6 @@ type Stat_t struct {
_ uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -167,180 +120,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -353,41 +153,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +175,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Gpr [32]uint64
Nip uint64
@@ -820,15 +229,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -845,35 +245,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -882,33 +254,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -920,13 +265,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -974,279 +312,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1322,22 +394,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1345,88 +401,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1442,18 +416,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1465,589 +427,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2058,13 +441,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2075,33 +451,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x20001269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2111,135 +463,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2370,218 +593,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint64
@@ -2597,38 +608,6 @@ type LoopInfo struct {
Reserved [4]uint8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2637,21 +616,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2663,150 +627,47 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 502d98a..dccbf9b 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build riscv64 && linux
// +build riscv64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -114,36 +101,6 @@ type Stat_t struct {
_ [2]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,180 +119,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -352,41 +152,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +174,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Pc uint64
Ra uint64
@@ -838,15 +247,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -863,35 +263,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -900,33 +272,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -938,13 +283,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -992,279 +330,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1340,22 +412,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1363,88 +419,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1460,18 +434,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1483,589 +445,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2076,13 +459,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2093,33 +469,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2129,135 +481,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2388,218 +611,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2615,38 +626,6 @@ type LoopInfo struct {
Reserved [4]uint8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2655,21 +634,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2681,150 +645,48 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 65e12d7..6358806 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build s390x && linux
// +build s390x,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -113,36 +100,6 @@ type Stat_t struct {
_ [3]int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -152,10 +109,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -165,180 +118,27 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x6
- FADV_NOREUSE = 0x7
+ FADV_DONTNEED = 0x6
+ FADV_NOREUSE = 0x7
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -351,41 +151,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -403,383 +173,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Psw PtracePsw
Gprs [16]uint64
@@ -833,15 +242,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -858,35 +258,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -895,33 +267,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -933,13 +278,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -987,279 +325,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1335,22 +407,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1358,88 +414,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type uint32
Bsize uint32
@@ -1456,18 +430,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1479,589 +441,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2072,13 +455,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2089,33 +465,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2125,135 +477,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2384,218 +607,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint16
@@ -2611,38 +622,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2651,21 +630,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2677,150 +641,47 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 26e8a2b..765edc1 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build sparc64 && linux
// +build sparc64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -89,13 +83,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
_ uint16
@@ -116,36 +103,6 @@ type Stat_t struct {
_ uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -155,10 +112,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -169,180 +122,27 @@ type Flock_t struct {
_ [2]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
}
type RawSockaddr struct {
@@ -355,41 +155,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -407,383 +177,22 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
}
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x33
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [16]uint64
Tstate uint64
@@ -815,15 +224,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -840,35 +240,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x800
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -877,33 +249,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -915,13 +260,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -969,279 +307,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_RECORD_MMAP2 = 0xa
- PERF_RECORD_AUX = 0xb
- PERF_RECORD_ITRACE_START = 0xc
- PERF_RECORD_LOST_SAMPLES = 0xd
- PERF_RECORD_SWITCH = 0xe
- PERF_RECORD_SWITCH_CPU_WIDE = 0xf
- PERF_RECORD_NAMESPACES = 0x10
-
- PERF_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1317,22 +389,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1340,88 +396,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1437,18 +411,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1460,589 +422,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2053,13 +436,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2070,33 +446,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2106,135 +458,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2365,218 +588,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2592,38 +603,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2632,21 +611,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2658,150 +622,47 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x89
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ 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
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
index a89100c..2fd2060 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && netbsd
// +build 386,netbsd
package unix
@@ -248,6 +249,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
@@ -443,8 +445,10 @@ type Ptmget struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
index 289184e..6a5a1a8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && netbsd
// +build amd64,netbsd
package unix
@@ -255,6 +256,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -451,8 +453,10 @@ type Ptmget struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
index 428c450..84cc8d0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && netbsd
// +build arm,netbsd
package unix
@@ -253,6 +254,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
@@ -448,8 +450,10 @@ type Ptmget struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
index 6f1f284..c844e70 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && netbsd
// +build arm64,netbsd
package unix
@@ -255,6 +256,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -451,8 +453,10 @@ type Ptmget struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x400
+ AT_EACCESS = 0x100
AT_SYMLINK_NOFOLLOW = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_REMOVEDIR = 0x800
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index 61ea001..baf5fe6 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
@@ -231,6 +232,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
@@ -436,8 +438,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x4
+ AT_EACCESS = 0x1
AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
)
type PollFd struct {
@@ -560,12 +564,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index 87a493f..e21ae8e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
@@ -235,6 +236,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -436,8 +438,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x4
+ AT_EACCESS = 0x1
AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
)
type PollFd struct {
@@ -560,12 +564,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index d80836e..f190651 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -1,6 +1,7 @@
// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
@@ -235,6 +236,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
@@ -437,8 +439,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x4
+ AT_EACCESS = 0x1
AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
)
type PollFd struct {
@@ -561,12 +565,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
index 4e15874..84747c5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
@@ -1,6 +1,7 @@
// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
@@ -231,6 +232,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -430,8 +432,10 @@ type Winsize struct {
const (
AT_FDCWD = -0x64
- AT_SYMLINK_FOLLOW = 0x4
+ AT_EACCESS = 0x1
AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
)
type PollFd struct {
@@ -554,12 +558,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
new file mode 100644
index 0000000..ac5c8b6
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
@@ -0,0 +1,568 @@
+// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Mode uint32
+ Dev int32
+ Ino uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev int32
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Size int64
+ Blocks int64
+ Blksize int32
+ Flags uint32
+ Gen uint32
+ _ Timespec
+}
+
+type Statfs_t struct {
+ F_flags uint32
+ F_bsize uint32
+ F_iosize uint32
+ F_blocks uint64
+ F_bfree uint64
+ F_bavail int64
+ F_files uint64
+ F_ffree uint64
+ F_favail int64
+ F_syncwrites uint64
+ F_syncreads uint64
+ F_asyncwrites uint64
+ F_asyncreads uint64
+ F_fsid Fsid
+ F_namemax uint32
+ F_owner uint32
+ F_ctime uint64
+ F_fstypename [16]int8
+ F_mntonname [90]int8
+ F_mntfromname [90]int8
+ F_mntfromspec [90]int8
+ _ [2]byte
+ Mount_info [160]byte
+}
+
+type Flock_t struct {
+ Start int64
+ Len int64
+ Pid int32
+ Type int16
+ Whence int16
+}
+
+type Dirent struct {
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ _ [4]uint8
+ Name [256]int8
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+const (
+ PathMax = 0x400
+)
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [104]int8
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [24]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [92]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x6c
+ SizeofSockaddrUnix = 0x6a
+ SizeofSockaddrDatalink = 0x20
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ PTRACE_TRACEME = 0x0
+ PTRACE_CONT = 0x7
+ PTRACE_KILL = 0x8
+)
+
+type Kevent_t struct {
+ Ident uint64
+ Filter int16
+ Flags uint16
+ Fflags uint32
+ Data int64
+ Udata *byte
+}
+
+type FdSet struct {
+ Bits [32]uint32
+}
+
+const (
+ SizeofIfMsghdr = 0xa8
+ SizeofIfData = 0x90
+ SizeofIfaMsghdr = 0x18
+ SizeofIfAnnounceMsghdr = 0x1a
+ SizeofRtMsghdr = 0x60
+ SizeofRtMetrics = 0x38
+)
+
+type IfMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Xflags int32
+ Data IfData
+}
+
+type IfData struct {
+ Type uint8
+ Addrlen uint8
+ Hdrlen uint8
+ Link_state uint8
+ Mtu uint32
+ Metric uint32
+ Rdomain uint32
+ Baudrate uint64
+ Ipackets uint64
+ Ierrors uint64
+ Opackets uint64
+ Oerrors uint64
+ Collisions uint64
+ Ibytes uint64
+ Obytes uint64
+ Imcasts uint64
+ Omcasts uint64
+ Iqdrops uint64
+ Oqdrops uint64
+ Noproto uint64
+ Capabilities uint32
+ Lastchange Timeval
+}
+
+type IfaMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Metric int32
+}
+
+type IfAnnounceMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ What uint16
+ Name [16]int8
+}
+
+type RtMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Priority uint8
+ Mpls uint8
+ Addrs int32
+ Flags int32
+ Fmask int32
+ Pid int32
+ Seq int32
+ Errno int32
+ Inits uint32
+ Rmx RtMetrics
+}
+
+type RtMetrics struct {
+ Pksent uint64
+ Expire int64
+ Locks uint32
+ Mtu uint32
+ Refcnt uint32
+ Hopcount uint32
+ Recvpipe uint32
+ Sendpipe uint32
+ Ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Pad uint32
+}
+
+type Mclpool struct{}
+
+const (
+ SizeofBpfVersion = 0x4
+ SizeofBpfStat = 0x8
+ SizeofBpfProgram = 0x10
+ SizeofBpfInsn = 0x8
+ SizeofBpfHdr = 0x14
+)
+
+type BpfVersion struct {
+ Major uint16
+ Minor uint16
+}
+
+type BpfStat struct {
+ Recv uint32
+ Drop uint32
+}
+
+type BpfProgram struct {
+ Len uint32
+ Insns *BpfInsn
+}
+
+type BpfInsn struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type BpfHdr struct {
+ Tstamp BpfTimeval
+ Caplen uint32
+ Datalen uint32
+ Hdrlen uint16
+ _ [2]byte
+}
+
+type BpfTimeval struct {
+ Sec uint32
+ Usec uint32
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_EACCESS = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLIN = 0x1
+ POLLNVAL = 0x20
+ POLLOUT = 0x4
+ POLLPRI = 0x2
+ POLLRDBAND = 0x80
+ POLLRDNORM = 0x40
+ POLLWRBAND = 0x100
+ POLLWRNORM = 0x4
+)
+
+type Sigset_t uint32
+
+type Utsname struct {
+ Sysname [256]byte
+ Nodename [256]byte
+ Release [256]byte
+ Version [256]byte
+ Machine [256]byte
+}
+
+const SizeofUvmexp = 0x158
+
+type Uvmexp struct {
+ Pagesize int32
+ Pagemask int32
+ Pageshift int32
+ Npages int32
+ Free int32
+ Active int32
+ Inactive int32
+ Paging int32
+ Wired int32
+ Zeropages int32
+ Reserve_pagedaemon int32
+ Reserve_kernel int32
+ Unused01 int32
+ Vnodepages int32
+ Vtextpages int32
+ Freemin int32
+ Freetarg int32
+ Inactarg int32
+ Wiredmax int32
+ Anonmin int32
+ Vtextmin int32
+ Vnodemin int32
+ Anonminpct int32
+ Vtextminpct int32
+ Vnodeminpct int32
+ Nswapdev int32
+ Swpages int32
+ Swpginuse int32
+ Swpgonly int32
+ Nswget int32
+ Nanon int32
+ Unused05 int32
+ Unused06 int32
+ Faults int32
+ Traps int32
+ Intrs int32
+ Swtch int32
+ Softs int32
+ Syscalls int32
+ Pageins int32
+ Unused07 int32
+ Unused08 int32
+ Pgswapin int32
+ Pgswapout int32
+ Forks int32
+ Forks_ppwait int32
+ Forks_sharevm int32
+ Pga_zerohit int32
+ Pga_zeromiss int32
+ Unused09 int32
+ Fltnoram int32
+ Fltnoanon int32
+ Fltnoamap int32
+ Fltpgwait int32
+ Fltpgrele int32
+ Fltrelck int32
+ Fltrelckok int32
+ Fltanget int32
+ Fltanretry int32
+ Fltamcopy int32
+ Fltnamap int32
+ Fltnomap int32
+ Fltlget int32
+ Fltget int32
+ Flt_anon int32
+ Flt_acow int32
+ Flt_obj int32
+ Flt_prcopy int32
+ Flt_przero int32
+ Pdwoke int32
+ Pdrevs int32
+ Pdswout int32
+ Pdfreed int32
+ Pdscans int32
+ Pdanscan int32
+ Pdobscan int32
+ Pdreact int32
+ Pdbusy int32
+ Pdpageouts int32
+ Pdpending int32
+ Pddeact int32
+ Unused11 int32
+ Unused12 int32
+ Unused13 int32
+ Fpswtch int32
+ Kmapent int32
+}
+
+const SizeofClockinfo = 0x10
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
index 23ed9fe..ad4aad2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_solaris.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && solaris
// +build amd64,solaris
package unix
@@ -88,7 +89,6 @@ type Stat_t struct {
Mtim Timespec
Ctim Timespec
Blksize int32
- _ [4]byte
Blocks int64
Fstype [16]int8
}
@@ -96,7 +96,6 @@ type Stat_t struct {
type Flock_t struct {
Type int16
Whence int16
- _ [4]byte
Start int64
Len int64
Sysid int32
@@ -138,12 +137,12 @@ type RawSockaddrInet4 struct {
}
type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
- X__sin6_src_id uint32
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+ _ uint32
}
type RawSockaddrUnix struct {
@@ -196,10 +195,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Accrights *int8
Accrightslen int32
_ [4]byte
@@ -228,7 +225,7 @@ type IPv6MTUInfo struct {
}
type ICMPv6Filter struct {
- X__icmp6_filt [8]uint32
+ Filt [8]uint32
}
const (
@@ -238,6 +235,7 @@ const (
SizeofSockaddrUnix = 0x6e
SizeofSockaddrDatalink = 0xfc
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -291,7 +289,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -299,7 +296,6 @@ type IfData struct {
Type uint8
Addrlen uint8
Hdrlen uint8
- _ [1]byte
Mtu uint32
Metric uint32
Baudrate uint32
@@ -324,7 +320,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -333,7 +328,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -371,15 +365,14 @@ type BpfVersion struct {
}
type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
+ Recv uint64
+ Drop uint64
+ Capt uint64
+ _ [13]uint64
}
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -447,3 +440,43 @@ const (
POLLWRBAND = 0x100
POLLWRNORM = 0x4
)
+
+type fileObj struct {
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Pad [3]uint64
+ Name *int8
+}
+
+type portEvent struct {
+ Events int32
+ Source uint16
+ Pad uint16
+ Object uint64
+ User *byte
+}
+
+const (
+ PORT_SOURCE_AIO = 0x1
+ PORT_SOURCE_TIMER = 0x2
+ PORT_SOURCE_USER = 0x3
+ PORT_SOURCE_FD = 0x4
+ PORT_SOURCE_ALERT = 0x5
+ PORT_SOURCE_MQ = 0x6
+ PORT_SOURCE_FILE = 0x7
+ PORT_ALERT_SET = 0x1
+ PORT_ALERT_UPDATE = 0x2
+ PORT_ALERT_INVALID = 0x3
+ FILE_ACCESS = 0x1
+ FILE_MODIFIED = 0x2
+ FILE_ATTRIB = 0x4
+ FILE_TRUNC = 0x100000
+ FILE_NOFOLLOW = 0x10000000
+ FILE_DELETE = 0x10
+ FILE_RENAME_TO = 0x20
+ FILE_RENAME_FROM = 0x40
+ UNMOUNTED = 0x20000000
+ MOUNTEDOVER = 0x40000000
+ FILE_EXCEPTION = 0x60000070
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
new file mode 100644
index 0000000..4ab638c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
@@ -0,0 +1,406 @@
+// Copyright 2020 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 zos && s390x
+// +build zos,s390x
+
+// Hand edited based on ztypes_linux_s390x.go
+// TODO: auto-generate.
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+ PathMax = 0x1000
+)
+
+const (
+ SizeofSockaddrAny = 128
+ SizeofCmsghdr = 12
+ SizeofIPMreq = 8
+ SizeofIPv6Mreq = 20
+ SizeofICMPv6Filter = 32
+ SizeofIPv6MTUInfo = 32
+ SizeofLinger = 8
+ SizeofSockaddrInet4 = 16
+ SizeofSockaddrInet6 = 28
+ SizeofTCPInfo = 0x68
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type timeval_zos struct { //correct (with padding and all)
+ Sec int64
+ _ [4]byte // pad
+ Usec int32
+}
+
+type Tms struct { //clock_t is 4-byte unsigned int in zos
+ Utime uint32
+ Stime uint32
+ Cutime uint32
+ Cstime uint32
+}
+
+type Time_t int64
+
+type Utimbuf struct {
+ Actime int64
+ Modtime int64
+}
+
+type Utsname struct {
+ Sysname [65]byte
+ Nodename [65]byte
+ Release [65]byte
+ Version [65]byte
+ Machine [65]byte
+ Domainname [65]byte
+}
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [108]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ _ [112]uint8 // pad
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Iov *Iovec
+ Control *byte
+ Flags int32
+ Namelen int32
+ Iovlen int32
+ Controllen int32
+}
+
+type Cmsghdr struct {
+ Len int32
+ Level int32
+ Type int32
+}
+
+type Inet4Pktinfo struct {
+ Addr [4]byte /* in_addr */
+ Ifindex uint32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Data [8]uint32
+}
+
+type TCPInfo struct {
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+}
+
+type _Gid_t uint32
+
+type rusage_zos struct {
+ Utime timeval_zos
+ Stime timeval_zos
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+// { int, short, short } in poll.h
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+type Stat_t struct { //Linux Definition
+ Dev uint64
+ Ino uint64
+ Nlink uint64
+ Mode uint32
+ Uid uint32
+ Gid uint32
+ _ int32
+ Rdev uint64
+ Size int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Blksize int64
+ Blocks int64
+ _ [3]int64
+}
+
+type Stat_LE_t struct {
+ _ [4]byte // eye catcher
+ Length uint16
+ Version uint16
+ Mode int32
+ Ino uint32
+ Dev uint32
+ Nlink int32
+ Uid int32
+ Gid int32
+ Size int64
+ Atim31 [4]byte
+ Mtim31 [4]byte
+ Ctim31 [4]byte
+ Rdev uint32
+ Auditoraudit uint32
+ Useraudit uint32
+ Blksize int32
+ Creatim31 [4]byte
+ AuditID [16]byte
+ _ [4]byte // rsrvd1
+ File_tag struct {
+ Ccsid uint16
+ Txtflag uint16 // aggregating Txflag:1 deferred:1 rsvflags:14
+ }
+ CharsetID [8]byte
+ Blocks int64
+ Genvalue uint32
+ Reftim31 [4]byte
+ Fid [8]byte
+ Filefmt byte
+ Fspflag2 byte
+ _ [2]byte // rsrvd2
+ Ctimemsec int32
+ Seclabel [8]byte
+ _ [4]byte // rsrvd3
+ _ [4]byte // rsrvd4
+ Atim Time_t
+ Mtim Time_t
+ Ctim Time_t
+ Creatim Time_t
+ Reftim Time_t
+ _ [24]byte // rsrvd5
+}
+
+type Statvfs_t struct {
+ ID [4]byte
+ Len int32
+ Bsize uint64
+ Blocks uint64
+ Usedspace uint64
+ Bavail uint64
+ Flag uint64
+ Maxfilesize int64
+ _ [16]byte
+ Frsize uint64
+ Bfree uint64
+ Files uint32
+ Ffree uint32
+ Favail uint32
+ Namemax31 uint32
+ Invarsec uint32
+ _ [4]byte
+ Fsid uint64
+ Namemax uint64
+}
+
+type Statfs_t struct {
+ Type uint32
+ Bsize uint64
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint32
+ Ffree uint32
+ Fsid uint64
+ Namelen uint64
+ Frsize uint64
+ Flags uint64
+}
+
+type Dirent struct {
+ Reclen uint16
+ Namlen uint16
+ Ino uint32
+ Extra uintptr
+ Name [256]byte
+}
+
+type FdSet struct {
+ Bits [64]int32
+}
+
+// This struct is packed on z/OS so it can't be used directly.
+type Flock_t struct {
+ Type int16
+ Whence int16
+ Start int64
+ Len int64
+ Pid int32
+}
+
+type Termios struct {
+ Cflag uint32
+ Iflag uint32
+ Lflag uint32
+ Oflag uint32
+ Cc [11]uint8
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+type W_Mnth struct {
+ Hid [4]byte
+ Size int32
+ Cur1 int32 //32bit pointer
+ Cur2 int32 //^
+ Devno uint32
+ _ [4]byte
+}
+
+type W_Mntent struct {
+ Fstype uint32
+ Mode uint32
+ Dev uint32
+ Parentdev uint32
+ Rootino uint32
+ Status byte
+ Ddname [9]byte
+ Fstname [9]byte
+ Fsname [45]byte
+ Pathlen uint32
+ Mountpoint [1024]byte
+ Jobname [8]byte
+ PID int32
+ Parmoffset int32
+ Parmlen int16
+ Owner [8]byte
+ Quiesceowner [8]byte
+ _ [38]byte
+}
diff --git a/vendor/golang.org/x/sys/windows/aliases.go b/vendor/golang.org/x/sys/windows/aliases.go
index af3af60..a20ebea 100644
--- a/vendor/golang.org/x/sys/windows/aliases.go
+++ b/vendor/golang.org/x/sys/windows/aliases.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build windows
-// +build go1.9
+//go:build windows && go1.9
+// +build windows,go1.9
package windows
diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go
index d777113..115341f 100644
--- a/vendor/golang.org/x/sys/windows/dll_windows.go
+++ b/vendor/golang.org/x/sys/windows/dll_windows.go
@@ -32,6 +32,8 @@ type DLLError struct {
func (e *DLLError) Error() string { return e.Msg }
+func (e *DLLError) Unwrap() error { return e.Err }
+
// A DLL implements access to a single DLL.
type DLL struct {
Name string
@@ -104,6 +106,35 @@ func (d *DLL) MustFindProc(name string) *Proc {
return p
}
+// FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc
+// if found. It returns an error if search fails.
+func (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) {
+ a, e := GetProcAddressByOrdinal(d.Handle, ordinal)
+ name := "#" + itoa(int(ordinal))
+ if e != nil {
+ return nil, &DLLError{
+ Err: e,
+ ObjName: name,
+ Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(),
+ }
+ }
+ p := &Proc{
+ Dll: d,
+ Name: name,
+ addr: a,
+ }
+ return p, nil
+}
+
+// MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails.
+func (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc {
+ p, e := d.FindProcByOrdinal(ordinal)
+ if e != nil {
+ panic(e)
+ }
+ return p
+}
+
// Release unloads DLL d from memory.
func (d *DLL) Release() (err error) {
return FreeLibrary(d.Handle)
@@ -360,7 +391,6 @@ func loadLibraryEx(name string, system bool) (*DLL, error) {
var flags uintptr
if system {
if canDoSearchSystem32() {
- const LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
flags = LOAD_LIBRARY_SEARCH_SYSTEM32
} else if isBaseName(name) {
// WindowsXP or unpatched Windows machine
diff --git a/vendor/golang.org/x/sys/windows/empty.s b/vendor/golang.org/x/sys/windows/empty.s
index 69309e4..fdbbbcd 100644
--- a/vendor/golang.org/x/sys/windows/empty.s
+++ b/vendor/golang.org/x/sys/windows/empty.s
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.12
// +build !go1.12
// This file is here to allow bodyless functions with go:linkname for Go 1.11
diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go
index f482a9f..92ac05f 100644
--- a/vendor/golang.org/x/sys/windows/env_windows.go
+++ b/vendor/golang.org/x/sys/windows/env_windows.go
@@ -8,7 +8,6 @@ package windows
import (
"syscall"
- "unicode/utf16"
"unsafe"
)
@@ -40,17 +39,11 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
defer DestroyEnvironmentBlock(block)
blockp := uintptr(unsafe.Pointer(block))
for {
- entry := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(blockp))[:]
- for i, v := range entry {
- if v == 0 {
- entry = entry[:i]
- break
- }
- }
+ entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp)))
if len(entry) == 0 {
break
}
- env = append(env, string(utf16.Decode(entry)))
+ env = append(env, entry)
blockp += 2 * (uintptr(len(entry)) + 1)
}
return env, nil
diff --git a/vendor/golang.org/x/sys/windows/eventlog.go b/vendor/golang.org/x/sys/windows/eventlog.go
index 40af946..2cd6064 100644
--- a/vendor/golang.org/x/sys/windows/eventlog.go
+++ b/vendor/golang.org/x/sys/windows/eventlog.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go
index 3606c3a..855698b 100644
--- a/vendor/golang.org/x/sys/windows/exec_windows.go
+++ b/vendor/golang.org/x/sys/windows/exec_windows.go
@@ -6,6 +6,11 @@
package windows
+import (
+ errorspkg "errors"
+ "unsafe"
+)
+
// EscapeArg rewrites command line argument s as prescribed
// in http://msdn.microsoft.com/en-us/library/ms880421.
// This function returns "" (2 double quotes) if s is empty.
@@ -73,6 +78,40 @@ func EscapeArg(s string) string {
return string(qs[:j])
}
+// ComposeCommandLine escapes and joins the given arguments suitable for use as a Windows command line,
+// in CreateProcess's CommandLine argument, CreateService/ChangeServiceConfig's BinaryPathName argument,
+// or any program that uses CommandLineToArgv.
+func ComposeCommandLine(args []string) string {
+ var commandLine string
+ for i := range args {
+ if i > 0 {
+ commandLine += " "
+ }
+ commandLine += EscapeArg(args[i])
+ }
+ return commandLine
+}
+
+// DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv,
+// as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that
+// command lines are passed around.
+func DecomposeCommandLine(commandLine string) ([]string, error) {
+ if len(commandLine) == 0 {
+ return []string{}, nil
+ }
+ var argc int32
+ argv, err := CommandLineToArgv(StringToUTF16Ptr(commandLine), &argc)
+ if err != nil {
+ return nil, err
+ }
+ defer LocalFree(Handle(unsafe.Pointer(argv)))
+ var args []string
+ for _, v := range (*argv)[:argc] {
+ args = append(args, UTF16ToString((*v)[:]))
+ }
+ return args, nil
+}
+
func CloseOnExec(fd Handle) {
SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
}
@@ -95,3 +134,45 @@ func FullPath(name string) (path string, err error) {
}
}
}
+
+// NewProcThreadAttributeList allocates a new ProcThreadAttributeListContainer, with the requested maximum number of attributes.
+func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListContainer, error) {
+ var size uintptr
+ err := initializeProcThreadAttributeList(nil, maxAttrCount, 0, &size)
+ if err != ERROR_INSUFFICIENT_BUFFER {
+ if err == nil {
+ return nil, errorspkg.New("unable to query buffer size from InitializeProcThreadAttributeList")
+ }
+ return nil, err
+ }
+ alloc, err := LocalAlloc(LMEM_FIXED, uint32(size))
+ if err != nil {
+ return nil, err
+ }
+ // size is guaranteed to be ≥1 by InitializeProcThreadAttributeList.
+ al := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(alloc))}
+ err = initializeProcThreadAttributeList(al.data, maxAttrCount, 0, &size)
+ if err != nil {
+ return nil, err
+ }
+ return al, err
+}
+
+// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute.
+func (al *ProcThreadAttributeListContainer) Update(attribute uintptr, value unsafe.Pointer, size uintptr) error {
+ al.pointers = append(al.pointers, value)
+ return updateProcThreadAttribute(al.data, 0, attribute, value, size, nil, nil)
+}
+
+// Delete frees ProcThreadAttributeList's resources.
+func (al *ProcThreadAttributeListContainer) Delete() {
+ deleteProcThreadAttributeList(al.data)
+ LocalFree(Handle(unsafe.Pointer(al.data)))
+ al.data = nil
+ al.pointers = nil
+}
+
+// List returns the actual ProcThreadAttributeList to be passed to StartupInfoEx.
+func (al *ProcThreadAttributeListContainer) List() *ProcThreadAttributeList {
+ return al.data
+}
diff --git a/vendor/golang.org/x/sys/windows/memory_windows.go b/vendor/golang.org/x/sys/windows/memory_windows.go
index f80a420..6dc0920 100644
--- a/vendor/golang.org/x/sys/windows/memory_windows.go
+++ b/vendor/golang.org/x/sys/windows/memory_windows.go
@@ -16,11 +16,33 @@ const (
MEM_RESET_UNDO = 0x01000000
MEM_LARGE_PAGES = 0x20000000
- PAGE_NOACCESS = 0x01
- PAGE_READONLY = 0x02
- PAGE_READWRITE = 0x04
- PAGE_WRITECOPY = 0x08
- PAGE_EXECUTE_READ = 0x20
- PAGE_EXECUTE_READWRITE = 0x40
- PAGE_EXECUTE_WRITECOPY = 0x80
+ PAGE_NOACCESS = 0x00000001
+ PAGE_READONLY = 0x00000002
+ PAGE_READWRITE = 0x00000004
+ PAGE_WRITECOPY = 0x00000008
+ PAGE_EXECUTE = 0x00000010
+ PAGE_EXECUTE_READ = 0x00000020
+ PAGE_EXECUTE_READWRITE = 0x00000040
+ PAGE_EXECUTE_WRITECOPY = 0x00000080
+ PAGE_GUARD = 0x00000100
+ PAGE_NOCACHE = 0x00000200
+ PAGE_WRITECOMBINE = 0x00000400
+ PAGE_TARGETS_INVALID = 0x40000000
+ PAGE_TARGETS_NO_UPDATE = 0x40000000
+
+ QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002
+ QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001
+ 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
+}
diff --git a/vendor/golang.org/x/sys/windows/mkerrors.bash b/vendor/golang.org/x/sys/windows/mkerrors.bash
index 2163843..58e0188 100644
--- a/vendor/golang.org/x/sys/windows/mkerrors.bash
+++ b/vendor/golang.org/x/sys/windows/mkerrors.bash
@@ -9,6 +9,8 @@ shopt -s nullglob
winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)"
[[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; }
+ntstatus="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)"
+[[ -n $ntstatus ]] || { echo "Unable to find ntstatus.h" >&2; exit 1; }
declare -A errors
@@ -59,5 +61,10 @@ declare -A errors
echo "$key $vtype = $value"
done < "$winerror"
+ while read -r line; do
+ [[ $line =~ ^#define\ (STATUS_[^\s]+)\ +\(\(NTSTATUS\)((0x)?[0-9a-fA-F]+)L?\) ]] || continue
+ echo "${BASH_REMATCH[1]} NTStatus = ${BASH_REMATCH[2]}"
+ done < "$ntstatus"
+
echo ")"
} | gofmt > "zerrors_windows.go"
diff --git a/vendor/golang.org/x/sys/windows/mksyscall.go b/vendor/golang.org/x/sys/windows/mksyscall.go
index 328e3b2..8563f79 100644
--- a/vendor/golang.org/x/sys/windows/mksyscall.go
+++ b/vendor/golang.org/x/sys/windows/mksyscall.go
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build generate
// +build generate
package windows
-//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
+//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go
diff --git a/vendor/golang.org/x/sys/windows/race.go b/vendor/golang.org/x/sys/windows/race.go
index a74e3e2..9196b08 100644
--- a/vendor/golang.org/x/sys/windows/race.go
+++ b/vendor/golang.org/x/sys/windows/race.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows && race
// +build windows,race
package windows
diff --git a/vendor/golang.org/x/sys/windows/race0.go b/vendor/golang.org/x/sys/windows/race0.go
index e44a3cb..7bae481 100644
--- a/vendor/golang.org/x/sys/windows/race0.go
+++ b/vendor/golang.org/x/sys/windows/race0.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows && !race
// +build windows,!race
package windows
diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go
index 4b6eff1..d414ef1 100644
--- a/vendor/golang.org/x/sys/windows/security_windows.go
+++ b/vendor/golang.org/x/sys/windows/security_windows.go
@@ -7,6 +7,8 @@ package windows
import (
"syscall"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
const (
@@ -622,6 +624,7 @@ func (tml *Tokenmandatorylabel) Size() uint32 {
// Authorization Functions
//sys checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) = advapi32.CheckTokenMembership
+//sys isTokenRestricted(tokenHandle Token) (ret bool, err error) [!failretval] = advapi32.IsTokenRestricted
//sys OpenProcessToken(process Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken
//sys OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) = advapi32.OpenThreadToken
//sys ImpersonateSelf(impersonationlevel uint32) (err error) = advapi32.ImpersonateSelf
@@ -835,6 +838,16 @@ func (t Token) IsMember(sid *SID) (bool, error) {
return b != 0, nil
}
+// IsRestricted reports whether the access token t is a restricted token.
+func (t Token) IsRestricted() (isRestricted bool, err error) {
+ isRestricted, err = isTokenRestricted(t)
+ if !isRestricted && err == syscall.EINVAL {
+ // If err is EINVAL, this returned ERROR_SUCCESS indicating a non-restricted token.
+ err = nil
+ }
+ return
+}
+
const (
WTS_CONSOLE_CONNECT = 0x1
WTS_CONSOLE_DISCONNECT = 0x2
@@ -876,6 +889,7 @@ type WTS_SESSION_INFO struct {
//sys WTSQueryUserToken(session uint32, token *Token) (err error) = wtsapi32.WTSQueryUserToken
//sys WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW
//sys WTSFreeMemory(ptr uintptr) = wtsapi32.WTSFreeMemory
+//sys WTSGetActiveConsoleSessionId() (sessionID uint32)
type ACL struct {
aclRevision byte
@@ -895,6 +909,19 @@ type SECURITY_DESCRIPTOR struct {
dacl *ACL
}
+type SECURITY_QUALITY_OF_SERVICE struct {
+ Length uint32
+ ImpersonationLevel uint32
+ ContextTrackingMode byte
+ EffectiveOnly byte
+}
+
+// Constants for the ContextTrackingMode field of SECURITY_QUALITY_OF_SERVICE.
+const (
+ SECURITY_STATIC_TRACKING = 0
+ SECURITY_DYNAMIC_TRACKING = 1
+)
+
type SecurityAttributes struct {
Length uint32
SecurityDescriptor *SECURITY_DESCRIPTOR
@@ -1101,9 +1128,10 @@ type OBJECTS_AND_NAME struct {
}
//sys getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetSecurityInfo
-//sys SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) = advapi32.SetSecurityInfo
+//sys SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetSecurityInfo
//sys getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetNamedSecurityInfoW
//sys SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetNamedSecurityInfoW
+//sys SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) = advapi32.SetKernelObjectSecurity
//sys buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) = advapi32.BuildSecurityDescriptorW
//sys initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) = advapi32.InitializeSecurityDescriptor
@@ -1229,7 +1257,7 @@ func (sd *SECURITY_DESCRIPTOR) String() string {
return ""
}
defer LocalFree(Handle(unsafe.Pointer(sddl)))
- return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(sddl))[:])
+ return UTF16PtrToString(sddl)
}
// ToAbsolute converts a self-relative security descriptor into an absolute one.
@@ -1307,9 +1335,29 @@ func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURIT
}
func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
- sdBytes := make([]byte, selfRelativeSD.Length())
- copy(sdBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(selfRelativeSD))[:len(sdBytes)])
- return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&sdBytes[0]))
+ sdLen := int(selfRelativeSD.Length())
+ const min = int(unsafe.Sizeof(SECURITY_DESCRIPTOR{}))
+ if sdLen < min {
+ sdLen = min
+ }
+
+ var src []byte
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&src))
+ h.Data = unsafe.Pointer(selfRelativeSD)
+ h.Len = sdLen
+ h.Cap = sdLen
+
+ const psize = int(unsafe.Sizeof(uintptr(0)))
+
+ var dst []byte
+ h = (*unsafeheader.Slice)(unsafe.Pointer(&dst))
+ alloc := make([]uintptr, (sdLen+psize-1)/psize)
+ h.Data = (*unsafeheader.Slice)(unsafe.Pointer(&alloc)).Data
+ h.Len = sdLen
+ h.Cap = sdLen
+
+ copy(dst, src)
+ return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))
}
// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
@@ -1391,6 +1439,6 @@ func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL
}
defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
aclBytes := make([]byte, winHeapACL.aclSize)
- copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes)])
+ copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)])
return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
}
diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go
index 847e00b..f8deca8 100644
--- a/vendor/golang.org/x/sys/windows/service.go
+++ b/vendor/golang.org/x/sys/windows/service.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
@@ -16,8 +17,6 @@ const (
SC_MANAGER_ALL_ACCESS = 0xf003f
)
-//sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
-
const (
SERVICE_KERNEL_DRIVER = 1
SERVICE_FILE_SYSTEM_DRIVER = 2
@@ -65,6 +64,7 @@ const (
SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32
SERVICE_ACCEPT_POWEREVENT = 64
SERVICE_ACCEPT_SESSIONCHANGE = 128
+ SERVICE_ACCEPT_PRESHUTDOWN = 256
SERVICE_CONTROL_STOP = 1
SERVICE_CONTROL_PAUSE = 2
@@ -80,6 +80,7 @@ const (
SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12
SERVICE_CONTROL_POWEREVENT = 13
SERVICE_CONTROL_SESSIONCHANGE = 14
+ SERVICE_CONTROL_PRESHUTDOWN = 15
SERVICE_ACTIVE = 1
SERVICE_INACTIVE = 2
@@ -126,6 +127,18 @@ const (
SERVICE_NOTIFY_CREATED = 0x00000080
SERVICE_NOTIFY_DELETED = 0x00000100
SERVICE_NOTIFY_DELETE_PENDING = 0x00000200
+
+ SC_EVENT_DATABASE_CHANGE = 0
+ SC_EVENT_PROPERTY_CHANGE = 1
+ SC_EVENT_STATUS_CHANGE = 2
+
+ SERVICE_START_REASON_DEMAND = 0x00000001
+ SERVICE_START_REASON_AUTO = 0x00000002
+ SERVICE_START_REASON_TRIGGER = 0x00000004
+ SERVICE_START_REASON_RESTART_ON_FAILURE = 0x00000008
+ SERVICE_START_REASON_DELAYEDAUTO = 0x00000010
+
+ SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1
)
type SERVICE_STATUS struct {
@@ -210,6 +223,7 @@ type QUERY_SERVICE_LOCK_STATUS struct {
LockDuration uint32
}
+//sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
//sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle
//sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW
//sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW
@@ -227,3 +241,7 @@ type QUERY_SERVICE_LOCK_STATUS struct {
//sys EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW
//sys QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx
//sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
+//sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
+//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
+//sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
+//sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?
diff --git a/vendor/golang.org/x/sys/windows/setupapi_windows.go b/vendor/golang.org/x/sys/windows/setupapi_windows.go
new file mode 100644
index 0000000..14027da
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/setupapi_windows.go
@@ -0,0 +1,1425 @@
+// 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 windows
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "runtime"
+ "strings"
+ "syscall"
+ "unsafe"
+)
+
+// This file contains functions that wrap SetupAPI.dll and CfgMgr32.dll,
+// core system functions for managing hardware devices, drivers, and the PnP tree.
+// Information about these APIs can be found at:
+// https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi
+// https://docs.microsoft.com/en-us/windows/win32/devinst/cfgmgr32-
+
+const (
+ ERROR_EXPECTED_SECTION_NAME Errno = 0x20000000 | 0xC0000000 | 0
+ ERROR_BAD_SECTION_NAME_LINE Errno = 0x20000000 | 0xC0000000 | 1
+ ERROR_SECTION_NAME_TOO_LONG Errno = 0x20000000 | 0xC0000000 | 2
+ ERROR_GENERAL_SYNTAX Errno = 0x20000000 | 0xC0000000 | 3
+ ERROR_WRONG_INF_STYLE Errno = 0x20000000 | 0xC0000000 | 0x100
+ ERROR_SECTION_NOT_FOUND Errno = 0x20000000 | 0xC0000000 | 0x101
+ ERROR_LINE_NOT_FOUND Errno = 0x20000000 | 0xC0000000 | 0x102
+ ERROR_NO_BACKUP Errno = 0x20000000 | 0xC0000000 | 0x103
+ ERROR_NO_ASSOCIATED_CLASS Errno = 0x20000000 | 0xC0000000 | 0x200
+ ERROR_CLASS_MISMATCH Errno = 0x20000000 | 0xC0000000 | 0x201
+ ERROR_DUPLICATE_FOUND Errno = 0x20000000 | 0xC0000000 | 0x202
+ ERROR_NO_DRIVER_SELECTED Errno = 0x20000000 | 0xC0000000 | 0x203
+ ERROR_KEY_DOES_NOT_EXIST Errno = 0x20000000 | 0xC0000000 | 0x204
+ ERROR_INVALID_DEVINST_NAME Errno = 0x20000000 | 0xC0000000 | 0x205
+ ERROR_INVALID_CLASS Errno = 0x20000000 | 0xC0000000 | 0x206
+ ERROR_DEVINST_ALREADY_EXISTS Errno = 0x20000000 | 0xC0000000 | 0x207
+ ERROR_DEVINFO_NOT_REGISTERED Errno = 0x20000000 | 0xC0000000 | 0x208
+ ERROR_INVALID_REG_PROPERTY Errno = 0x20000000 | 0xC0000000 | 0x209
+ ERROR_NO_INF Errno = 0x20000000 | 0xC0000000 | 0x20A
+ ERROR_NO_SUCH_DEVINST Errno = 0x20000000 | 0xC0000000 | 0x20B
+ ERROR_CANT_LOAD_CLASS_ICON Errno = 0x20000000 | 0xC0000000 | 0x20C
+ ERROR_INVALID_CLASS_INSTALLER Errno = 0x20000000 | 0xC0000000 | 0x20D
+ ERROR_DI_DO_DEFAULT Errno = 0x20000000 | 0xC0000000 | 0x20E
+ ERROR_DI_NOFILECOPY Errno = 0x20000000 | 0xC0000000 | 0x20F
+ ERROR_INVALID_HWPROFILE Errno = 0x20000000 | 0xC0000000 | 0x210
+ ERROR_NO_DEVICE_SELECTED Errno = 0x20000000 | 0xC0000000 | 0x211
+ ERROR_DEVINFO_LIST_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x212
+ ERROR_DEVINFO_DATA_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x213
+ ERROR_DI_BAD_PATH Errno = 0x20000000 | 0xC0000000 | 0x214
+ ERROR_NO_CLASSINSTALL_PARAMS Errno = 0x20000000 | 0xC0000000 | 0x215
+ ERROR_FILEQUEUE_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x216
+ ERROR_BAD_SERVICE_INSTALLSECT Errno = 0x20000000 | 0xC0000000 | 0x217
+ ERROR_NO_CLASS_DRIVER_LIST Errno = 0x20000000 | 0xC0000000 | 0x218
+ ERROR_NO_ASSOCIATED_SERVICE Errno = 0x20000000 | 0xC0000000 | 0x219
+ ERROR_NO_DEFAULT_DEVICE_INTERFACE Errno = 0x20000000 | 0xC0000000 | 0x21A
+ ERROR_DEVICE_INTERFACE_ACTIVE Errno = 0x20000000 | 0xC0000000 | 0x21B
+ ERROR_DEVICE_INTERFACE_REMOVED Errno = 0x20000000 | 0xC0000000 | 0x21C
+ ERROR_BAD_INTERFACE_INSTALLSECT Errno = 0x20000000 | 0xC0000000 | 0x21D
+ ERROR_NO_SUCH_INTERFACE_CLASS Errno = 0x20000000 | 0xC0000000 | 0x21E
+ ERROR_INVALID_REFERENCE_STRING Errno = 0x20000000 | 0xC0000000 | 0x21F
+ ERROR_INVALID_MACHINENAME Errno = 0x20000000 | 0xC0000000 | 0x220
+ ERROR_REMOTE_COMM_FAILURE Errno = 0x20000000 | 0xC0000000 | 0x221
+ ERROR_MACHINE_UNAVAILABLE Errno = 0x20000000 | 0xC0000000 | 0x222
+ ERROR_NO_CONFIGMGR_SERVICES Errno = 0x20000000 | 0xC0000000 | 0x223
+ ERROR_INVALID_PROPPAGE_PROVIDER Errno = 0x20000000 | 0xC0000000 | 0x224
+ ERROR_NO_SUCH_DEVICE_INTERFACE Errno = 0x20000000 | 0xC0000000 | 0x225
+ ERROR_DI_POSTPROCESSING_REQUIRED Errno = 0x20000000 | 0xC0000000 | 0x226
+ ERROR_INVALID_COINSTALLER Errno = 0x20000000 | 0xC0000000 | 0x227
+ ERROR_NO_COMPAT_DRIVERS Errno = 0x20000000 | 0xC0000000 | 0x228
+ ERROR_NO_DEVICE_ICON Errno = 0x20000000 | 0xC0000000 | 0x229
+ ERROR_INVALID_INF_LOGCONFIG Errno = 0x20000000 | 0xC0000000 | 0x22A
+ ERROR_DI_DONT_INSTALL Errno = 0x20000000 | 0xC0000000 | 0x22B
+ ERROR_INVALID_FILTER_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22C
+ ERROR_NON_WINDOWS_NT_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22D
+ ERROR_NON_WINDOWS_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22E
+ ERROR_NO_CATALOG_FOR_OEM_INF Errno = 0x20000000 | 0xC0000000 | 0x22F
+ ERROR_DEVINSTALL_QUEUE_NONNATIVE Errno = 0x20000000 | 0xC0000000 | 0x230
+ ERROR_NOT_DISABLEABLE Errno = 0x20000000 | 0xC0000000 | 0x231
+ ERROR_CANT_REMOVE_DEVINST Errno = 0x20000000 | 0xC0000000 | 0x232
+ ERROR_INVALID_TARGET Errno = 0x20000000 | 0xC0000000 | 0x233
+ ERROR_DRIVER_NONNATIVE Errno = 0x20000000 | 0xC0000000 | 0x234
+ ERROR_IN_WOW64 Errno = 0x20000000 | 0xC0000000 | 0x235
+ ERROR_SET_SYSTEM_RESTORE_POINT Errno = 0x20000000 | 0xC0000000 | 0x236
+ ERROR_SCE_DISABLED Errno = 0x20000000 | 0xC0000000 | 0x238
+ ERROR_UNKNOWN_EXCEPTION Errno = 0x20000000 | 0xC0000000 | 0x239
+ ERROR_PNP_REGISTRY_ERROR Errno = 0x20000000 | 0xC0000000 | 0x23A
+ ERROR_REMOTE_REQUEST_UNSUPPORTED Errno = 0x20000000 | 0xC0000000 | 0x23B
+ ERROR_NOT_AN_INSTALLED_OEM_INF Errno = 0x20000000 | 0xC0000000 | 0x23C
+ ERROR_INF_IN_USE_BY_DEVICES Errno = 0x20000000 | 0xC0000000 | 0x23D
+ ERROR_DI_FUNCTION_OBSOLETE Errno = 0x20000000 | 0xC0000000 | 0x23E
+ ERROR_NO_AUTHENTICODE_CATALOG Errno = 0x20000000 | 0xC0000000 | 0x23F
+ ERROR_AUTHENTICODE_DISALLOWED Errno = 0x20000000 | 0xC0000000 | 0x240
+ ERROR_AUTHENTICODE_TRUSTED_PUBLISHER Errno = 0x20000000 | 0xC0000000 | 0x241
+ ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED Errno = 0x20000000 | 0xC0000000 | 0x242
+ ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED Errno = 0x20000000 | 0xC0000000 | 0x243
+ ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH Errno = 0x20000000 | 0xC0000000 | 0x244
+ ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE Errno = 0x20000000 | 0xC0000000 | 0x245
+ ERROR_DEVICE_INSTALLER_NOT_READY Errno = 0x20000000 | 0xC0000000 | 0x246
+ ERROR_DRIVER_STORE_ADD_FAILED Errno = 0x20000000 | 0xC0000000 | 0x247
+ ERROR_DEVICE_INSTALL_BLOCKED Errno = 0x20000000 | 0xC0000000 | 0x248
+ ERROR_DRIVER_INSTALL_BLOCKED Errno = 0x20000000 | 0xC0000000 | 0x249
+ ERROR_WRONG_INF_TYPE Errno = 0x20000000 | 0xC0000000 | 0x24A
+ ERROR_FILE_HASH_NOT_IN_CATALOG Errno = 0x20000000 | 0xC0000000 | 0x24B
+ ERROR_DRIVER_STORE_DELETE_FAILED Errno = 0x20000000 | 0xC0000000 | 0x24C
+ ERROR_UNRECOVERABLE_STACK_OVERFLOW Errno = 0x20000000 | 0xC0000000 | 0x300
+ EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW
+ ERROR_NO_DEFAULT_INTERFACE_DEVICE Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE
+ ERROR_INTERFACE_DEVICE_ACTIVE Errno = ERROR_DEVICE_INTERFACE_ACTIVE
+ ERROR_INTERFACE_DEVICE_REMOVED Errno = ERROR_DEVICE_INTERFACE_REMOVED
+ ERROR_NO_SUCH_INTERFACE_DEVICE Errno = ERROR_NO_SUCH_DEVICE_INTERFACE
+)
+
+const (
+ MAX_DEVICE_ID_LEN = 200
+ MAX_DEVNODE_ID_LEN = MAX_DEVICE_ID_LEN
+ MAX_GUID_STRING_LEN = 39 // 38 chars + terminator null
+ MAX_CLASS_NAME_LEN = 32
+ MAX_PROFILE_LEN = 80
+ MAX_CONFIG_VALUE = 9999
+ MAX_INSTANCE_VALUE = 9999
+ CONFIGMG_VERSION = 0x0400
+)
+
+// Maximum string length constants
+const (
+ LINE_LEN = 256 // Windows 9x-compatible maximum for displayable strings coming from a device INF.
+ MAX_INF_STRING_LENGTH = 4096 // Actual maximum size of an INF string (including string substitutions).
+ MAX_INF_SECTION_NAME_LENGTH = 255 // For Windows 9x compatibility, INF section names should be constrained to 32 characters.
+ MAX_TITLE_LEN = 60
+ MAX_INSTRUCTION_LEN = 256
+ MAX_LABEL_LEN = 30
+ MAX_SERVICE_NAME_LEN = 256
+ MAX_SUBTITLE_LEN = 256
+)
+
+const (
+ // SP_MAX_MACHINENAME_LENGTH defines maximum length of a machine name in the format expected by ConfigMgr32 CM_Connect_Machine (i.e., "\\\\MachineName\0").
+ SP_MAX_MACHINENAME_LENGTH = MAX_PATH + 3
+)
+
+// HSPFILEQ is type for setup file queue
+type HSPFILEQ uintptr
+
+// DevInfo holds reference to device information set
+type DevInfo Handle
+
+// DEVINST is a handle usually recognized by cfgmgr32 APIs
+type DEVINST uint32
+
+// DevInfoData is a device information structure (references a device instance that is a member of a device information set)
+type DevInfoData struct {
+ size uint32
+ ClassGUID GUID
+ DevInst DEVINST
+ _ uintptr
+}
+
+// DevInfoListDetailData is a structure for detailed information on a device information set (used for SetupDiGetDeviceInfoListDetail which supersedes the functionality of SetupDiGetDeviceInfoListClass).
+type DevInfoListDetailData struct {
+ size uint32 // Use unsafeSizeOf method
+ ClassGUID GUID
+ RemoteMachineHandle Handle
+ remoteMachineName [SP_MAX_MACHINENAME_LENGTH]uint16
+}
+
+func (*DevInfoListDetailData) unsafeSizeOf() uint32 {
+ if unsafe.Sizeof(uintptr(0)) == 4 {
+ // Windows declares this with pshpack1.h
+ return uint32(unsafe.Offsetof(DevInfoListDetailData{}.remoteMachineName) + unsafe.Sizeof(DevInfoListDetailData{}.remoteMachineName))
+ }
+ return uint32(unsafe.Sizeof(DevInfoListDetailData{}))
+}
+
+func (data *DevInfoListDetailData) RemoteMachineName() string {
+ return UTF16ToString(data.remoteMachineName[:])
+}
+
+func (data *DevInfoListDetailData) SetRemoteMachineName(remoteMachineName string) error {
+ str, err := UTF16FromString(remoteMachineName)
+ if err != nil {
+ return err
+ }
+ copy(data.remoteMachineName[:], str)
+ return nil
+}
+
+// DI_FUNCTION is function type for device installer
+type DI_FUNCTION uint32
+
+const (
+ DIF_SELECTDEVICE DI_FUNCTION = 0x00000001
+ DIF_INSTALLDEVICE DI_FUNCTION = 0x00000002
+ DIF_ASSIGNRESOURCES DI_FUNCTION = 0x00000003
+ DIF_PROPERTIES DI_FUNCTION = 0x00000004
+ DIF_REMOVE DI_FUNCTION = 0x00000005
+ DIF_FIRSTTIMESETUP DI_FUNCTION = 0x00000006
+ DIF_FOUNDDEVICE DI_FUNCTION = 0x00000007
+ DIF_SELECTCLASSDRIVERS DI_FUNCTION = 0x00000008
+ DIF_VALIDATECLASSDRIVERS DI_FUNCTION = 0x00000009
+ DIF_INSTALLCLASSDRIVERS DI_FUNCTION = 0x0000000A
+ DIF_CALCDISKSPACE DI_FUNCTION = 0x0000000B
+ DIF_DESTROYPRIVATEDATA DI_FUNCTION = 0x0000000C
+ DIF_VALIDATEDRIVER DI_FUNCTION = 0x0000000D
+ DIF_DETECT DI_FUNCTION = 0x0000000F
+ DIF_INSTALLWIZARD DI_FUNCTION = 0x00000010
+ DIF_DESTROYWIZARDDATA DI_FUNCTION = 0x00000011
+ DIF_PROPERTYCHANGE DI_FUNCTION = 0x00000012
+ DIF_ENABLECLASS DI_FUNCTION = 0x00000013
+ DIF_DETECTVERIFY DI_FUNCTION = 0x00000014
+ DIF_INSTALLDEVICEFILES DI_FUNCTION = 0x00000015
+ DIF_UNREMOVE DI_FUNCTION = 0x00000016
+ DIF_SELECTBESTCOMPATDRV DI_FUNCTION = 0x00000017
+ DIF_ALLOW_INSTALL DI_FUNCTION = 0x00000018
+ DIF_REGISTERDEVICE DI_FUNCTION = 0x00000019
+ DIF_NEWDEVICEWIZARD_PRESELECT DI_FUNCTION = 0x0000001A
+ DIF_NEWDEVICEWIZARD_SELECT DI_FUNCTION = 0x0000001B
+ DIF_NEWDEVICEWIZARD_PREANALYZE DI_FUNCTION = 0x0000001C
+ DIF_NEWDEVICEWIZARD_POSTANALYZE DI_FUNCTION = 0x0000001D
+ DIF_NEWDEVICEWIZARD_FINISHINSTALL DI_FUNCTION = 0x0000001E
+ DIF_INSTALLINTERFACES DI_FUNCTION = 0x00000020
+ DIF_DETECTCANCEL DI_FUNCTION = 0x00000021
+ DIF_REGISTER_COINSTALLERS DI_FUNCTION = 0x00000022
+ DIF_ADDPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000023
+ DIF_ADDPROPERTYPAGE_BASIC DI_FUNCTION = 0x00000024
+ DIF_TROUBLESHOOTER DI_FUNCTION = 0x00000026
+ DIF_POWERMESSAGEWAKE DI_FUNCTION = 0x00000027
+ DIF_ADDREMOTEPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000028
+ DIF_UPDATEDRIVER_UI DI_FUNCTION = 0x00000029
+ DIF_FINISHINSTALL_ACTION DI_FUNCTION = 0x0000002A
+)
+
+// DevInstallParams is device installation parameters structure (associated with a particular device information element, or globally with a device information set)
+type DevInstallParams struct {
+ size uint32
+ Flags DI_FLAGS
+ FlagsEx DI_FLAGSEX
+ hwndParent uintptr
+ InstallMsgHandler uintptr
+ InstallMsgHandlerContext uintptr
+ FileQueue HSPFILEQ
+ _ uintptr
+ _ uint32
+ driverPath [MAX_PATH]uint16
+}
+
+func (params *DevInstallParams) DriverPath() string {
+ return UTF16ToString(params.driverPath[:])
+}
+
+func (params *DevInstallParams) SetDriverPath(driverPath string) error {
+ str, err := UTF16FromString(driverPath)
+ if err != nil {
+ return err
+ }
+ copy(params.driverPath[:], str)
+ return nil
+}
+
+// DI_FLAGS is SP_DEVINSTALL_PARAMS.Flags values
+type DI_FLAGS uint32
+
+const (
+ // Flags for choosing a device
+ DI_SHOWOEM DI_FLAGS = 0x00000001 // support Other... button
+ DI_SHOWCOMPAT DI_FLAGS = 0x00000002 // show compatibility list
+ DI_SHOWCLASS DI_FLAGS = 0x00000004 // show class list
+ DI_SHOWALL DI_FLAGS = 0x00000007 // both class & compat list shown
+ DI_NOVCP DI_FLAGS = 0x00000008 // don't create a new copy queue--use caller-supplied FileQueue
+ DI_DIDCOMPAT DI_FLAGS = 0x00000010 // Searched for compatible devices
+ DI_DIDCLASS DI_FLAGS = 0x00000020 // Searched for class devices
+ DI_AUTOASSIGNRES DI_FLAGS = 0x00000040 // No UI for resources if possible
+
+ // Flags returned by DiInstallDevice to indicate need to reboot/restart
+ DI_NEEDRESTART DI_FLAGS = 0x00000080 // Reboot required to take effect
+ DI_NEEDREBOOT DI_FLAGS = 0x00000100 // ""
+
+ // Flags for device installation
+ DI_NOBROWSE DI_FLAGS = 0x00000200 // no Browse... in InsertDisk
+
+ // Flags set by DiBuildDriverInfoList
+ DI_MULTMFGS DI_FLAGS = 0x00000400 // Set if multiple manufacturers in class driver list
+
+ // Flag indicates that device is disabled
+ DI_DISABLED DI_FLAGS = 0x00000800 // Set if device disabled
+
+ // Flags for Device/Class Properties
+ DI_GENERALPAGE_ADDED DI_FLAGS = 0x00001000
+ DI_RESOURCEPAGE_ADDED DI_FLAGS = 0x00002000
+
+ // Flag to indicate the setting properties for this Device (or class) caused a change so the Dev Mgr UI probably needs to be updated.
+ DI_PROPERTIES_CHANGE DI_FLAGS = 0x00004000
+
+ // Flag to indicate that the sorting from the INF file should be used.
+ DI_INF_IS_SORTED DI_FLAGS = 0x00008000
+
+ // Flag to indicate that only the the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
+ DI_ENUMSINGLEINF DI_FLAGS = 0x00010000
+
+ // Flag that prevents ConfigMgr from removing/re-enumerating devices during device
+ // registration, installation, and deletion.
+ DI_DONOTCALLCONFIGMG DI_FLAGS = 0x00020000
+
+ // The following flag can be used to install a device disabled
+ DI_INSTALLDISABLED DI_FLAGS = 0x00040000
+
+ // Flag that causes SetupDiBuildDriverInfoList to build a device's compatible driver
+ // list from its existing class driver list, instead of the normal INF search.
+ DI_COMPAT_FROM_CLASS DI_FLAGS = 0x00080000
+
+ // This flag is set if the Class Install params should be used.
+ DI_CLASSINSTALLPARAMS DI_FLAGS = 0x00100000
+
+ // This flag is set if the caller of DiCallClassInstaller does NOT want the internal default action performed if the Class installer returns ERROR_DI_DO_DEFAULT.
+ DI_NODI_DEFAULTACTION DI_FLAGS = 0x00200000
+
+ // Flags for device installation
+ DI_QUIETINSTALL DI_FLAGS = 0x00800000 // don't confuse the user with questions or excess info
+ DI_NOFILECOPY DI_FLAGS = 0x01000000 // No file Copy necessary
+ DI_FORCECOPY DI_FLAGS = 0x02000000 // Force files to be copied from install path
+ DI_DRIVERPAGE_ADDED DI_FLAGS = 0x04000000 // Prop provider added Driver page.
+ DI_USECI_SELECTSTRINGS DI_FLAGS = 0x08000000 // Use Class Installer Provided strings in the Select Device Dlg
+ DI_OVERRIDE_INFFLAGS DI_FLAGS = 0x10000000 // Override INF flags
+ DI_PROPS_NOCHANGEUSAGE DI_FLAGS = 0x20000000 // No Enable/Disable in General Props
+
+ DI_NOSELECTICONS DI_FLAGS = 0x40000000 // No small icons in select device dialogs
+
+ DI_NOWRITE_IDS DI_FLAGS = 0x80000000 // Don't write HW & Compat IDs on install
+)
+
+// DI_FLAGSEX is SP_DEVINSTALL_PARAMS.FlagsEx values
+type DI_FLAGSEX uint32
+
+const (
+ DI_FLAGSEX_CI_FAILED DI_FLAGSEX = 0x00000004 // Failed to Load/Call class installer
+ DI_FLAGSEX_FINISHINSTALL_ACTION DI_FLAGSEX = 0x00000008 // Class/co-installer wants to get a DIF_FINISH_INSTALL action in client context.
+ DI_FLAGSEX_DIDINFOLIST DI_FLAGSEX = 0x00000010 // Did the Class Info List
+ DI_FLAGSEX_DIDCOMPATINFO DI_FLAGSEX = 0x00000020 // Did the Compat Info List
+ DI_FLAGSEX_FILTERCLASSES DI_FLAGSEX = 0x00000040
+ DI_FLAGSEX_SETFAILEDINSTALL DI_FLAGSEX = 0x00000080
+ DI_FLAGSEX_DEVICECHANGE DI_FLAGSEX = 0x00000100
+ DI_FLAGSEX_ALWAYSWRITEIDS DI_FLAGSEX = 0x00000200
+ DI_FLAGSEX_PROPCHANGE_PENDING DI_FLAGSEX = 0x00000400 // One or more device property sheets have had changes made to them, and need to have a DIF_PROPERTYCHANGE occur.
+ DI_FLAGSEX_ALLOWEXCLUDEDDRVS DI_FLAGSEX = 0x00000800
+ DI_FLAGSEX_NOUIONQUERYREMOVE DI_FLAGSEX = 0x00001000
+ DI_FLAGSEX_USECLASSFORCOMPAT DI_FLAGSEX = 0x00002000 // Use the device's class when building compat drv list. (Ignored if DI_COMPAT_FROM_CLASS flag is specified.)
+ DI_FLAGSEX_NO_DRVREG_MODIFY DI_FLAGSEX = 0x00008000 // Don't run AddReg and DelReg for device's software (driver) key.
+ DI_FLAGSEX_IN_SYSTEM_SETUP DI_FLAGSEX = 0x00010000 // Installation is occurring during initial system setup.
+ DI_FLAGSEX_INET_DRIVER DI_FLAGSEX = 0x00020000 // Driver came from Windows Update
+ DI_FLAGSEX_APPENDDRIVERLIST DI_FLAGSEX = 0x00040000 // Cause SetupDiBuildDriverInfoList to append a new driver list to an existing list.
+ DI_FLAGSEX_PREINSTALLBACKUP DI_FLAGSEX = 0x00080000 // not used
+ DI_FLAGSEX_BACKUPONREPLACE DI_FLAGSEX = 0x00100000 // not used
+ DI_FLAGSEX_DRIVERLIST_FROM_URL DI_FLAGSEX = 0x00200000 // build driver list from INF(s) retrieved from URL specified in SP_DEVINSTALL_PARAMS.DriverPath (empty string means Windows Update website)
+ DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS DI_FLAGSEX = 0x00800000 // Don't include old Internet drivers when building a driver list. Ignored on Windows Vista and later.
+ DI_FLAGSEX_POWERPAGE_ADDED DI_FLAGSEX = 0x01000000 // class installer added their own power page
+ DI_FLAGSEX_FILTERSIMILARDRIVERS DI_FLAGSEX = 0x02000000 // only include similar drivers in class list
+ DI_FLAGSEX_INSTALLEDDRIVER DI_FLAGSEX = 0x04000000 // only add the installed driver to the class or compat driver list. Used in calls to SetupDiBuildDriverInfoList
+ DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE DI_FLAGSEX = 0x08000000 // Don't remove identical driver nodes from the class list
+ DI_FLAGSEX_ALTPLATFORM_DRVSEARCH DI_FLAGSEX = 0x10000000 // Build driver list based on alternate platform information specified in associated file queue
+ DI_FLAGSEX_RESTART_DEVICE_ONLY DI_FLAGSEX = 0x20000000 // only restart the device drivers are being installed on as opposed to restarting all devices using those drivers.
+ DI_FLAGSEX_RECURSIVESEARCH DI_FLAGSEX = 0x40000000 // Tell SetupDiBuildDriverInfoList to do a recursive search
+ DI_FLAGSEX_SEARCH_PUBLISHED_INFS DI_FLAGSEX = 0x80000000 // Tell SetupDiBuildDriverInfoList to do a "published INF" search
+)
+
+// ClassInstallHeader is the first member of any class install parameters structure. It contains the device installation request code that defines the format of the rest of the install parameters structure.
+type ClassInstallHeader struct {
+ size uint32
+ InstallFunction DI_FUNCTION
+}
+
+func MakeClassInstallHeader(installFunction DI_FUNCTION) *ClassInstallHeader {
+ hdr := &ClassInstallHeader{InstallFunction: installFunction}
+ hdr.size = uint32(unsafe.Sizeof(*hdr))
+ return hdr
+}
+
+// DICS_STATE specifies values indicating a change in a device's state
+type DICS_STATE uint32
+
+const (
+ DICS_ENABLE DICS_STATE = 0x00000001 // The device is being enabled.
+ DICS_DISABLE DICS_STATE = 0x00000002 // The device is being disabled.
+ DICS_PROPCHANGE DICS_STATE = 0x00000003 // The properties of the device have changed.
+ DICS_START DICS_STATE = 0x00000004 // The device is being started (if the request is for the currently active hardware profile).
+ DICS_STOP DICS_STATE = 0x00000005 // The device is being stopped. The driver stack will be unloaded and the CSCONFIGFLAG_DO_NOT_START flag will be set for the device.
+)
+
+// DICS_FLAG specifies the scope of a device property change
+type DICS_FLAG uint32
+
+const (
+ DICS_FLAG_GLOBAL DICS_FLAG = 0x00000001 // make change in all hardware profiles
+ DICS_FLAG_CONFIGSPECIFIC DICS_FLAG = 0x00000002 // make change in specified profile only
+ DICS_FLAG_CONFIGGENERAL DICS_FLAG = 0x00000004 // 1 or more hardware profile-specific changes to follow (obsolete)
+)
+
+// PropChangeParams is a structure corresponding to a DIF_PROPERTYCHANGE install function.
+type PropChangeParams struct {
+ ClassInstallHeader ClassInstallHeader
+ StateChange DICS_STATE
+ Scope DICS_FLAG
+ HwProfile uint32
+}
+
+// DI_REMOVEDEVICE specifies the scope of the device removal
+type DI_REMOVEDEVICE uint32
+
+const (
+ DI_REMOVEDEVICE_GLOBAL DI_REMOVEDEVICE = 0x00000001 // Make this change in all hardware profiles. Remove information about the device from the registry.
+ DI_REMOVEDEVICE_CONFIGSPECIFIC DI_REMOVEDEVICE = 0x00000002 // Make this change to only the hardware profile specified by HwProfile. this flag only applies to root-enumerated devices. When Windows removes the device from the last hardware profile in which it was configured, Windows performs a global removal.
+)
+
+// RemoveDeviceParams is a structure corresponding to a DIF_REMOVE install function.
+type RemoveDeviceParams struct {
+ ClassInstallHeader ClassInstallHeader
+ Scope DI_REMOVEDEVICE
+ HwProfile uint32
+}
+
+// DrvInfoData is driver information structure (member of a driver info list that may be associated with a particular device instance, or (globally) with a device information set)
+type DrvInfoData struct {
+ size uint32
+ DriverType uint32
+ _ uintptr
+ description [LINE_LEN]uint16
+ mfgName [LINE_LEN]uint16
+ providerName [LINE_LEN]uint16
+ DriverDate Filetime
+ DriverVersion uint64
+}
+
+func (data *DrvInfoData) Description() string {
+ return UTF16ToString(data.description[:])
+}
+
+func (data *DrvInfoData) SetDescription(description string) error {
+ str, err := UTF16FromString(description)
+ if err != nil {
+ return err
+ }
+ copy(data.description[:], str)
+ return nil
+}
+
+func (data *DrvInfoData) MfgName() string {
+ return UTF16ToString(data.mfgName[:])
+}
+
+func (data *DrvInfoData) SetMfgName(mfgName string) error {
+ str, err := UTF16FromString(mfgName)
+ if err != nil {
+ return err
+ }
+ copy(data.mfgName[:], str)
+ return nil
+}
+
+func (data *DrvInfoData) ProviderName() string {
+ return UTF16ToString(data.providerName[:])
+}
+
+func (data *DrvInfoData) SetProviderName(providerName string) error {
+ str, err := UTF16FromString(providerName)
+ if err != nil {
+ return err
+ }
+ copy(data.providerName[:], str)
+ return nil
+}
+
+// IsNewer method returns true if DrvInfoData date and version is newer than supplied parameters.
+func (data *DrvInfoData) IsNewer(driverDate Filetime, driverVersion uint64) bool {
+ if data.DriverDate.HighDateTime > driverDate.HighDateTime {
+ return true
+ }
+ if data.DriverDate.HighDateTime < driverDate.HighDateTime {
+ return false
+ }
+
+ if data.DriverDate.LowDateTime > driverDate.LowDateTime {
+ return true
+ }
+ if data.DriverDate.LowDateTime < driverDate.LowDateTime {
+ return false
+ }
+
+ if data.DriverVersion > driverVersion {
+ return true
+ }
+ if data.DriverVersion < driverVersion {
+ return false
+ }
+
+ return false
+}
+
+// DrvInfoDetailData is driver information details structure (provides detailed information about a particular driver information structure)
+type DrvInfoDetailData struct {
+ size uint32 // Use unsafeSizeOf method
+ InfDate Filetime
+ compatIDsOffset uint32
+ compatIDsLength uint32
+ _ uintptr
+ sectionName [LINE_LEN]uint16
+ infFileName [MAX_PATH]uint16
+ drvDescription [LINE_LEN]uint16
+ hardwareID [1]uint16
+}
+
+func (*DrvInfoDetailData) unsafeSizeOf() uint32 {
+ if unsafe.Sizeof(uintptr(0)) == 4 {
+ // Windows declares this with pshpack1.h
+ return uint32(unsafe.Offsetof(DrvInfoDetailData{}.hardwareID) + unsafe.Sizeof(DrvInfoDetailData{}.hardwareID))
+ }
+ return uint32(unsafe.Sizeof(DrvInfoDetailData{}))
+}
+
+func (data *DrvInfoDetailData) SectionName() string {
+ return UTF16ToString(data.sectionName[:])
+}
+
+func (data *DrvInfoDetailData) InfFileName() string {
+ return UTF16ToString(data.infFileName[:])
+}
+
+func (data *DrvInfoDetailData) DrvDescription() string {
+ return UTF16ToString(data.drvDescription[:])
+}
+
+func (data *DrvInfoDetailData) HardwareID() string {
+ if data.compatIDsOffset > 1 {
+ bufW := data.getBuf()
+ return UTF16ToString(bufW[:wcslen(bufW)])
+ }
+
+ return ""
+}
+
+func (data *DrvInfoDetailData) CompatIDs() []string {
+ a := make([]string, 0)
+
+ if data.compatIDsLength > 0 {
+ bufW := data.getBuf()
+ bufW = bufW[data.compatIDsOffset : data.compatIDsOffset+data.compatIDsLength]
+ for i := 0; i < len(bufW); {
+ j := i + wcslen(bufW[i:])
+ if i < j {
+ a = append(a, UTF16ToString(bufW[i:j]))
+ }
+ i = j + 1
+ }
+ }
+
+ return a
+}
+
+func (data *DrvInfoDetailData) getBuf() []uint16 {
+ len := (data.size - uint32(unsafe.Offsetof(data.hardwareID))) / 2
+ sl := struct {
+ addr *uint16
+ len int
+ cap int
+ }{&data.hardwareID[0], int(len), int(len)}
+ return *(*[]uint16)(unsafe.Pointer(&sl))
+}
+
+// IsCompatible method tests if given hardware ID matches the driver or is listed on the compatible ID list.
+func (data *DrvInfoDetailData) IsCompatible(hwid string) bool {
+ hwidLC := strings.ToLower(hwid)
+ if strings.ToLower(data.HardwareID()) == hwidLC {
+ return true
+ }
+ a := data.CompatIDs()
+ for i := range a {
+ if strings.ToLower(a[i]) == hwidLC {
+ return true
+ }
+ }
+
+ return false
+}
+
+// DICD flags control SetupDiCreateDeviceInfo
+type DICD uint32
+
+const (
+ DICD_GENERATE_ID DICD = 0x00000001
+ DICD_INHERIT_CLASSDRVS DICD = 0x00000002
+)
+
+// SUOI flags control SetupUninstallOEMInf
+type SUOI uint32
+
+const (
+ SUOI_FORCEDELETE SUOI = 0x0001
+)
+
+// SPDIT flags to distinguish between class drivers and
+// device drivers. (Passed in 'DriverType' parameter of
+// driver information list APIs)
+type SPDIT uint32
+
+const (
+ SPDIT_NODRIVER SPDIT = 0x00000000
+ SPDIT_CLASSDRIVER SPDIT = 0x00000001
+ SPDIT_COMPATDRIVER SPDIT = 0x00000002
+)
+
+// DIGCF flags control what is included in the device information set built by SetupDiGetClassDevs
+type DIGCF uint32
+
+const (
+ DIGCF_DEFAULT DIGCF = 0x00000001 // only valid with DIGCF_DEVICEINTERFACE
+ DIGCF_PRESENT DIGCF = 0x00000002
+ DIGCF_ALLCLASSES DIGCF = 0x00000004
+ DIGCF_PROFILE DIGCF = 0x00000008
+ DIGCF_DEVICEINTERFACE DIGCF = 0x00000010
+)
+
+// DIREG specifies values for SetupDiCreateDevRegKey, SetupDiOpenDevRegKey, and SetupDiDeleteDevRegKey.
+type DIREG uint32
+
+const (
+ DIREG_DEV DIREG = 0x00000001 // Open/Create/Delete device key
+ DIREG_DRV DIREG = 0x00000002 // Open/Create/Delete driver key
+ DIREG_BOTH DIREG = 0x00000004 // Delete both driver and Device key
+)
+
+// SPDRP specifies device registry property codes
+// (Codes marked as read-only (R) may only be used for
+// SetupDiGetDeviceRegistryProperty)
+//
+// These values should cover the same set of registry properties
+// as defined by the CM_DRP codes in cfgmgr32.h.
+//
+// Note that SPDRP codes are zero based while CM_DRP codes are one based!
+type SPDRP uint32
+
+const (
+ SPDRP_DEVICEDESC SPDRP = 0x00000000 // DeviceDesc (R/W)
+ SPDRP_HARDWAREID SPDRP = 0x00000001 // HardwareID (R/W)
+ SPDRP_COMPATIBLEIDS SPDRP = 0x00000002 // CompatibleIDs (R/W)
+ SPDRP_SERVICE SPDRP = 0x00000004 // Service (R/W)
+ SPDRP_CLASS SPDRP = 0x00000007 // Class (R--tied to ClassGUID)
+ SPDRP_CLASSGUID SPDRP = 0x00000008 // ClassGUID (R/W)
+ SPDRP_DRIVER SPDRP = 0x00000009 // Driver (R/W)
+ SPDRP_CONFIGFLAGS SPDRP = 0x0000000A // ConfigFlags (R/W)
+ SPDRP_MFG SPDRP = 0x0000000B // Mfg (R/W)
+ SPDRP_FRIENDLYNAME SPDRP = 0x0000000C // FriendlyName (R/W)
+ SPDRP_LOCATION_INFORMATION SPDRP = 0x0000000D // LocationInformation (R/W)
+ SPDRP_PHYSICAL_DEVICE_OBJECT_NAME SPDRP = 0x0000000E // PhysicalDeviceObjectName (R)
+ SPDRP_CAPABILITIES SPDRP = 0x0000000F // Capabilities (R)
+ SPDRP_UI_NUMBER SPDRP = 0x00000010 // UiNumber (R)
+ SPDRP_UPPERFILTERS SPDRP = 0x00000011 // UpperFilters (R/W)
+ SPDRP_LOWERFILTERS SPDRP = 0x00000012 // LowerFilters (R/W)
+ SPDRP_BUSTYPEGUID SPDRP = 0x00000013 // BusTypeGUID (R)
+ SPDRP_LEGACYBUSTYPE SPDRP = 0x00000014 // LegacyBusType (R)
+ SPDRP_BUSNUMBER SPDRP = 0x00000015 // BusNumber (R)
+ SPDRP_ENUMERATOR_NAME SPDRP = 0x00000016 // Enumerator Name (R)
+ SPDRP_SECURITY SPDRP = 0x00000017 // Security (R/W, binary form)
+ SPDRP_SECURITY_SDS SPDRP = 0x00000018 // Security (W, SDS form)
+ SPDRP_DEVTYPE SPDRP = 0x00000019 // Device Type (R/W)
+ SPDRP_EXCLUSIVE SPDRP = 0x0000001A // Device is exclusive-access (R/W)
+ SPDRP_CHARACTERISTICS SPDRP = 0x0000001B // Device Characteristics (R/W)
+ SPDRP_ADDRESS SPDRP = 0x0000001C // Device Address (R)
+ SPDRP_UI_NUMBER_DESC_FORMAT SPDRP = 0x0000001D // UiNumberDescFormat (R/W)
+ SPDRP_DEVICE_POWER_DATA SPDRP = 0x0000001E // Device Power Data (R)
+ SPDRP_REMOVAL_POLICY SPDRP = 0x0000001F // Removal Policy (R)
+ SPDRP_REMOVAL_POLICY_HW_DEFAULT SPDRP = 0x00000020 // Hardware Removal Policy (R)
+ SPDRP_REMOVAL_POLICY_OVERRIDE SPDRP = 0x00000021 // Removal Policy Override (RW)
+ SPDRP_INSTALL_STATE SPDRP = 0x00000022 // Device Install State (R)
+ SPDRP_LOCATION_PATHS SPDRP = 0x00000023 // Device Location Paths (R)
+ SPDRP_BASE_CONTAINERID SPDRP = 0x00000024 // Base ContainerID (R)
+
+ SPDRP_MAXIMUM_PROPERTY SPDRP = 0x00000025 // Upper bound on ordinals
+)
+
+// DEVPROPTYPE represents the property-data-type identifier that specifies the
+// data type of a device property value in the unified device property model.
+type DEVPROPTYPE uint32
+
+const (
+ DEVPROP_TYPEMOD_ARRAY DEVPROPTYPE = 0x00001000
+ DEVPROP_TYPEMOD_LIST DEVPROPTYPE = 0x00002000
+
+ DEVPROP_TYPE_EMPTY DEVPROPTYPE = 0x00000000
+ DEVPROP_TYPE_NULL DEVPROPTYPE = 0x00000001
+ DEVPROP_TYPE_SBYTE DEVPROPTYPE = 0x00000002
+ DEVPROP_TYPE_BYTE DEVPROPTYPE = 0x00000003
+ DEVPROP_TYPE_INT16 DEVPROPTYPE = 0x00000004
+ DEVPROP_TYPE_UINT16 DEVPROPTYPE = 0x00000005
+ DEVPROP_TYPE_INT32 DEVPROPTYPE = 0x00000006
+ DEVPROP_TYPE_UINT32 DEVPROPTYPE = 0x00000007
+ DEVPROP_TYPE_INT64 DEVPROPTYPE = 0x00000008
+ DEVPROP_TYPE_UINT64 DEVPROPTYPE = 0x00000009
+ DEVPROP_TYPE_FLOAT DEVPROPTYPE = 0x0000000A
+ DEVPROP_TYPE_DOUBLE DEVPROPTYPE = 0x0000000B
+ DEVPROP_TYPE_DECIMAL DEVPROPTYPE = 0x0000000C
+ DEVPROP_TYPE_GUID DEVPROPTYPE = 0x0000000D
+ DEVPROP_TYPE_CURRENCY DEVPROPTYPE = 0x0000000E
+ DEVPROP_TYPE_DATE DEVPROPTYPE = 0x0000000F
+ DEVPROP_TYPE_FILETIME DEVPROPTYPE = 0x00000010
+ DEVPROP_TYPE_BOOLEAN DEVPROPTYPE = 0x00000011
+ DEVPROP_TYPE_STRING DEVPROPTYPE = 0x00000012
+ DEVPROP_TYPE_STRING_LIST DEVPROPTYPE = DEVPROP_TYPE_STRING | DEVPROP_TYPEMOD_LIST
+ DEVPROP_TYPE_SECURITY_DESCRIPTOR DEVPROPTYPE = 0x00000013
+ DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING DEVPROPTYPE = 0x00000014
+ DEVPROP_TYPE_DEVPROPKEY DEVPROPTYPE = 0x00000015
+ DEVPROP_TYPE_DEVPROPTYPE DEVPROPTYPE = 0x00000016
+ DEVPROP_TYPE_BINARY DEVPROPTYPE = DEVPROP_TYPE_BYTE | DEVPROP_TYPEMOD_ARRAY
+ DEVPROP_TYPE_ERROR DEVPROPTYPE = 0x00000017
+ DEVPROP_TYPE_NTSTATUS DEVPROPTYPE = 0x00000018
+ DEVPROP_TYPE_STRING_INDIRECT DEVPROPTYPE = 0x00000019
+
+ MAX_DEVPROP_TYPE DEVPROPTYPE = 0x00000019
+ MAX_DEVPROP_TYPEMOD DEVPROPTYPE = 0x00002000
+
+ DEVPROP_MASK_TYPE DEVPROPTYPE = 0x00000FFF
+ DEVPROP_MASK_TYPEMOD DEVPROPTYPE = 0x0000F000
+)
+
+// DEVPROPGUID specifies a property category.
+type DEVPROPGUID GUID
+
+// DEVPROPID uniquely identifies the property within the property category.
+type DEVPROPID uint32
+
+const DEVPROPID_FIRST_USABLE DEVPROPID = 2
+
+// DEVPROPKEY represents a device property key for a device property in the
+// unified device property model.
+type DEVPROPKEY struct {
+ FmtID DEVPROPGUID
+ PID DEVPROPID
+}
+
+// CONFIGRET is a return value or error code from cfgmgr32 APIs
+type CONFIGRET uint32
+
+func (ret CONFIGRET) Error() string {
+ if win32Error, ok := ret.Unwrap().(Errno); ok {
+ return fmt.Sprintf("%s (CfgMgr error: 0x%08x)", win32Error.Error(), uint32(ret))
+ }
+ return fmt.Sprintf("CfgMgr error: 0x%08x", uint32(ret))
+}
+
+func (ret CONFIGRET) Win32Error(defaultError Errno) Errno {
+ return cm_MapCrToWin32Err(ret, defaultError)
+}
+
+func (ret CONFIGRET) Unwrap() error {
+ const noMatch = Errno(^uintptr(0))
+ win32Error := ret.Win32Error(noMatch)
+ if win32Error == noMatch {
+ return nil
+ }
+ return win32Error
+}
+
+const (
+ CR_SUCCESS CONFIGRET = 0x00000000
+ CR_DEFAULT CONFIGRET = 0x00000001
+ CR_OUT_OF_MEMORY CONFIGRET = 0x00000002
+ CR_INVALID_POINTER CONFIGRET = 0x00000003
+ CR_INVALID_FLAG CONFIGRET = 0x00000004
+ CR_INVALID_DEVNODE CONFIGRET = 0x00000005
+ CR_INVALID_DEVINST = CR_INVALID_DEVNODE
+ CR_INVALID_RES_DES CONFIGRET = 0x00000006
+ CR_INVALID_LOG_CONF CONFIGRET = 0x00000007
+ CR_INVALID_ARBITRATOR CONFIGRET = 0x00000008
+ CR_INVALID_NODELIST CONFIGRET = 0x00000009
+ CR_DEVNODE_HAS_REQS CONFIGRET = 0x0000000A
+ CR_DEVINST_HAS_REQS = CR_DEVNODE_HAS_REQS
+ CR_INVALID_RESOURCEID CONFIGRET = 0x0000000B
+ CR_DLVXD_NOT_FOUND CONFIGRET = 0x0000000C
+ CR_NO_SUCH_DEVNODE CONFIGRET = 0x0000000D
+ CR_NO_SUCH_DEVINST = CR_NO_SUCH_DEVNODE
+ CR_NO_MORE_LOG_CONF CONFIGRET = 0x0000000E
+ CR_NO_MORE_RES_DES CONFIGRET = 0x0000000F
+ CR_ALREADY_SUCH_DEVNODE CONFIGRET = 0x00000010
+ CR_ALREADY_SUCH_DEVINST = CR_ALREADY_SUCH_DEVNODE
+ CR_INVALID_RANGE_LIST CONFIGRET = 0x00000011
+ CR_INVALID_RANGE CONFIGRET = 0x00000012
+ CR_FAILURE CONFIGRET = 0x00000013
+ CR_NO_SUCH_LOGICAL_DEV CONFIGRET = 0x00000014
+ CR_CREATE_BLOCKED CONFIGRET = 0x00000015
+ CR_NOT_SYSTEM_VM CONFIGRET = 0x00000016
+ CR_REMOVE_VETOED CONFIGRET = 0x00000017
+ CR_APM_VETOED CONFIGRET = 0x00000018
+ CR_INVALID_LOAD_TYPE CONFIGRET = 0x00000019
+ CR_BUFFER_SMALL CONFIGRET = 0x0000001A
+ CR_NO_ARBITRATOR CONFIGRET = 0x0000001B
+ CR_NO_REGISTRY_HANDLE CONFIGRET = 0x0000001C
+ CR_REGISTRY_ERROR CONFIGRET = 0x0000001D
+ CR_INVALID_DEVICE_ID CONFIGRET = 0x0000001E
+ CR_INVALID_DATA CONFIGRET = 0x0000001F
+ CR_INVALID_API CONFIGRET = 0x00000020
+ CR_DEVLOADER_NOT_READY CONFIGRET = 0x00000021
+ CR_NEED_RESTART CONFIGRET = 0x00000022
+ CR_NO_MORE_HW_PROFILES CONFIGRET = 0x00000023
+ CR_DEVICE_NOT_THERE CONFIGRET = 0x00000024
+ CR_NO_SUCH_VALUE CONFIGRET = 0x00000025
+ CR_WRONG_TYPE CONFIGRET = 0x00000026
+ CR_INVALID_PRIORITY CONFIGRET = 0x00000027
+ CR_NOT_DISABLEABLE CONFIGRET = 0x00000028
+ CR_FREE_RESOURCES CONFIGRET = 0x00000029
+ CR_QUERY_VETOED CONFIGRET = 0x0000002A
+ CR_CANT_SHARE_IRQ CONFIGRET = 0x0000002B
+ CR_NO_DEPENDENT CONFIGRET = 0x0000002C
+ CR_SAME_RESOURCES CONFIGRET = 0x0000002D
+ CR_NO_SUCH_REGISTRY_KEY CONFIGRET = 0x0000002E
+ CR_INVALID_MACHINENAME CONFIGRET = 0x0000002F
+ CR_REMOTE_COMM_FAILURE CONFIGRET = 0x00000030
+ CR_MACHINE_UNAVAILABLE CONFIGRET = 0x00000031
+ CR_NO_CM_SERVICES CONFIGRET = 0x00000032
+ CR_ACCESS_DENIED CONFIGRET = 0x00000033
+ CR_CALL_NOT_IMPLEMENTED CONFIGRET = 0x00000034
+ CR_INVALID_PROPERTY CONFIGRET = 0x00000035
+ CR_DEVICE_INTERFACE_ACTIVE CONFIGRET = 0x00000036
+ CR_NO_SUCH_DEVICE_INTERFACE CONFIGRET = 0x00000037
+ CR_INVALID_REFERENCE_STRING CONFIGRET = 0x00000038
+ CR_INVALID_CONFLICT_LIST CONFIGRET = 0x00000039
+ CR_INVALID_INDEX CONFIGRET = 0x0000003A
+ CR_INVALID_STRUCTURE_SIZE CONFIGRET = 0x0000003B
+ NUM_CR_RESULTS CONFIGRET = 0x0000003C
+)
+
+const (
+ CM_GET_DEVICE_INTERFACE_LIST_PRESENT = 0 // only currently 'live' device interfaces
+ CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES = 1 // all registered device interfaces, live or not
+)
+
+const (
+ DN_ROOT_ENUMERATED = 0x00000001 // Was enumerated by ROOT
+ DN_DRIVER_LOADED = 0x00000002 // Has Register_Device_Driver
+ DN_ENUM_LOADED = 0x00000004 // Has Register_Enumerator
+ DN_STARTED = 0x00000008 // Is currently configured
+ DN_MANUAL = 0x00000010 // Manually installed
+ DN_NEED_TO_ENUM = 0x00000020 // May need reenumeration
+ DN_NOT_FIRST_TIME = 0x00000040 // Has received a config
+ DN_HARDWARE_ENUM = 0x00000080 // Enum generates hardware ID
+ DN_LIAR = 0x00000100 // Lied about can reconfig once
+ DN_HAS_MARK = 0x00000200 // Not CM_Create_DevInst lately
+ DN_HAS_PROBLEM = 0x00000400 // Need device installer
+ DN_FILTERED = 0x00000800 // Is filtered
+ DN_MOVED = 0x00001000 // Has been moved
+ DN_DISABLEABLE = 0x00002000 // Can be disabled
+ DN_REMOVABLE = 0x00004000 // Can be removed
+ DN_PRIVATE_PROBLEM = 0x00008000 // Has a private problem
+ DN_MF_PARENT = 0x00010000 // Multi function parent
+ DN_MF_CHILD = 0x00020000 // Multi function child
+ DN_WILL_BE_REMOVED = 0x00040000 // DevInst is being removed
+ DN_NOT_FIRST_TIMEE = 0x00080000 // Has received a config enumerate
+ DN_STOP_FREE_RES = 0x00100000 // When child is stopped, free resources
+ DN_REBAL_CANDIDATE = 0x00200000 // Don't skip during rebalance
+ DN_BAD_PARTIAL = 0x00400000 // This devnode's log_confs do not have same resources
+ DN_NT_ENUMERATOR = 0x00800000 // This devnode's is an NT enumerator
+ DN_NT_DRIVER = 0x01000000 // This devnode's is an NT driver
+ DN_NEEDS_LOCKING = 0x02000000 // Devnode need lock resume processing
+ DN_ARM_WAKEUP = 0x04000000 // Devnode can be the wakeup device
+ DN_APM_ENUMERATOR = 0x08000000 // APM aware enumerator
+ DN_APM_DRIVER = 0x10000000 // APM aware driver
+ DN_SILENT_INSTALL = 0x20000000 // Silent install
+ DN_NO_SHOW_IN_DM = 0x40000000 // No show in device manager
+ DN_BOOT_LOG_PROB = 0x80000000 // Had a problem during preassignment of boot log conf
+ DN_NEED_RESTART = DN_LIAR // System needs to be restarted for this Devnode to work properly
+ DN_DRIVER_BLOCKED = DN_NOT_FIRST_TIME // One or more drivers are blocked from loading for this Devnode
+ DN_LEGACY_DRIVER = DN_MOVED // This device is using a legacy driver
+ DN_CHILD_WITH_INVALID_ID = DN_HAS_MARK // One or more children have invalid IDs
+ DN_DEVICE_DISCONNECTED = DN_NEEDS_LOCKING // The function driver for a device reported that the device is not connected. Typically this means a wireless device is out of range.
+ DN_QUERY_REMOVE_PENDING = DN_MF_PARENT // Device is part of a set of related devices collectively pending query-removal
+ DN_QUERY_REMOVE_ACTIVE = DN_MF_CHILD // Device is actively engaged in a query-remove IRP
+ DN_CHANGEABLE_FLAGS = DN_NOT_FIRST_TIME | DN_HARDWARE_ENUM | DN_HAS_MARK | DN_DISABLEABLE | DN_REMOVABLE | DN_MF_CHILD | DN_MF_PARENT | DN_NOT_FIRST_TIMEE | DN_STOP_FREE_RES | DN_REBAL_CANDIDATE | DN_NT_ENUMERATOR | DN_NT_DRIVER | DN_SILENT_INSTALL | DN_NO_SHOW_IN_DM
+)
+
+//sys setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiCreateDeviceInfoListExW
+
+// SetupDiCreateDeviceInfoListEx function creates an empty device information set on a remote or a local computer and optionally associates the set with a device setup class.
+func SetupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName string) (deviceInfoSet DevInfo, err error) {
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return
+ }
+ }
+ return setupDiCreateDeviceInfoListEx(classGUID, hwndParent, machineNameUTF16, 0)
+}
+
+//sys setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) = setupapi.SetupDiGetDeviceInfoListDetailW
+
+// SetupDiGetDeviceInfoListDetail function retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.
+func SetupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo) (deviceInfoSetDetailData *DevInfoListDetailData, err error) {
+ data := &DevInfoListDetailData{}
+ data.size = data.unsafeSizeOf()
+
+ return data, setupDiGetDeviceInfoListDetail(deviceInfoSet, data)
+}
+
+// DeviceInfoListDetail method retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.
+func (deviceInfoSet DevInfo) DeviceInfoListDetail() (*DevInfoListDetailData, error) {
+ return SetupDiGetDeviceInfoListDetail(deviceInfoSet)
+}
+
+//sys setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCreateDeviceInfoW
+
+// SetupDiCreateDeviceInfo function creates a new device information element and adds it as a new member to the specified device information set.
+func SetupDiCreateDeviceInfo(deviceInfoSet DevInfo, deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (deviceInfoData *DevInfoData, err error) {
+ deviceNameUTF16, err := UTF16PtrFromString(deviceName)
+ if err != nil {
+ return
+ }
+
+ var deviceDescriptionUTF16 *uint16
+ if deviceDescription != "" {
+ deviceDescriptionUTF16, err = UTF16PtrFromString(deviceDescription)
+ if err != nil {
+ return
+ }
+ }
+
+ data := &DevInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiCreateDeviceInfo(deviceInfoSet, deviceNameUTF16, classGUID, deviceDescriptionUTF16, hwndParent, creationFlags, data)
+}
+
+// CreateDeviceInfo method creates a new device information element and adds it as a new member to the specified device information set.
+func (deviceInfoSet DevInfo) CreateDeviceInfo(deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (*DevInfoData, error) {
+ return SetupDiCreateDeviceInfo(deviceInfoSet, deviceName, classGUID, deviceDescription, hwndParent, creationFlags)
+}
+
+//sys setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiEnumDeviceInfo
+
+// SetupDiEnumDeviceInfo function returns a DevInfoData structure that specifies a device information element in a device information set.
+func SetupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex int) (*DevInfoData, error) {
+ data := &DevInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiEnumDeviceInfo(deviceInfoSet, uint32(memberIndex), data)
+}
+
+// EnumDeviceInfo method returns a DevInfoData structure that specifies a device information element in a device information set.
+func (deviceInfoSet DevInfo) EnumDeviceInfo(memberIndex int) (*DevInfoData, error) {
+ return SetupDiEnumDeviceInfo(deviceInfoSet, memberIndex)
+}
+
+// SetupDiDestroyDeviceInfoList function deletes a device information set and frees all associated memory.
+//sys SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiDestroyDeviceInfoList
+
+// Close method deletes a device information set and frees all associated memory.
+func (deviceInfoSet DevInfo) Close() error {
+ return SetupDiDestroyDeviceInfoList(deviceInfoSet)
+}
+
+//sys SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiBuildDriverInfoList
+
+// BuildDriverInfoList method builds a list of drivers that is associated with a specific device or with the global class driver list for a device information set.
+func (deviceInfoSet DevInfo) BuildDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error {
+ return SetupDiBuildDriverInfoList(deviceInfoSet, deviceInfoData, driverType)
+}
+
+//sys SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiCancelDriverInfoSearch
+
+// CancelDriverInfoSearch method cancels a driver list search that is currently in progress in a different thread.
+func (deviceInfoSet DevInfo) CancelDriverInfoSearch() error {
+ return SetupDiCancelDriverInfoSearch(deviceInfoSet)
+}
+
+//sys setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiEnumDriverInfoW
+
+// SetupDiEnumDriverInfo function enumerates the members of a driver list.
+func SetupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) {
+ data := &DrvInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, uint32(memberIndex), data)
+}
+
+// EnumDriverInfo method enumerates the members of a driver list.
+func (deviceInfoSet DevInfo) EnumDriverInfo(deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) {
+ return SetupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, memberIndex)
+}
+
+//sys setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiGetSelectedDriverW
+
+// SetupDiGetSelectedDriver function retrieves the selected driver for a device information set or a particular device information element.
+func SetupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DrvInfoData, error) {
+ data := &DrvInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiGetSelectedDriver(deviceInfoSet, deviceInfoData, data)
+}
+
+// SelectedDriver method retrieves the selected driver for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) SelectedDriver(deviceInfoData *DevInfoData) (*DrvInfoData, error) {
+ return SetupDiGetSelectedDriver(deviceInfoSet, deviceInfoData)
+}
+
+//sys SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiSetSelectedDriverW
+
+// SetSelectedDriver method sets, or resets, the selected driver for a device information element or the selected class driver for a device information set.
+func (deviceInfoSet DevInfo) SetSelectedDriver(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) error {
+ return SetupDiSetSelectedDriver(deviceInfoSet, deviceInfoData, driverInfoData)
+}
+
+//sys setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDriverInfoDetailW
+
+// SetupDiGetDriverInfoDetail function retrieves driver information detail for a device information set or a particular device information element in the device information set.
+func SetupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) {
+ reqSize := uint32(2048)
+ for {
+ buf := make([]byte, reqSize)
+ data := (*DrvInfoDetailData)(unsafe.Pointer(&buf[0]))
+ data.size = data.unsafeSizeOf()
+ err := setupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData, data, uint32(len(buf)), &reqSize)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+ data.size = reqSize
+ return data, nil
+ }
+}
+
+// DriverInfoDetail method retrieves driver information detail for a device information set or a particular device information element in the device information set.
+func (deviceInfoSet DevInfo) DriverInfoDetail(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) {
+ return SetupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData)
+}
+
+//sys SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiDestroyDriverInfoList
+
+// DestroyDriverInfoList method deletes a driver list.
+func (deviceInfoSet DevInfo) DestroyDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error {
+ return SetupDiDestroyDriverInfoList(deviceInfoSet, deviceInfoData, driverType)
+}
+
+//sys setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiGetClassDevsExW
+
+// SetupDiGetClassDevsEx function returns a handle to a device information set that contains requested device information elements for a local or a remote computer.
+func SetupDiGetClassDevsEx(classGUID *GUID, enumerator string, hwndParent uintptr, flags DIGCF, deviceInfoSet DevInfo, machineName string) (handle DevInfo, err error) {
+ var enumeratorUTF16 *uint16
+ if enumerator != "" {
+ enumeratorUTF16, err = UTF16PtrFromString(enumerator)
+ if err != nil {
+ return
+ }
+ }
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return
+ }
+ }
+ return setupDiGetClassDevsEx(classGUID, enumeratorUTF16, hwndParent, flags, deviceInfoSet, machineNameUTF16, 0)
+}
+
+// SetupDiCallClassInstaller function calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code).
+//sys SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCallClassInstaller
+
+// CallClassInstaller member calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code).
+func (deviceInfoSet DevInfo) CallClassInstaller(installFunction DI_FUNCTION, deviceInfoData *DevInfoData) error {
+ return SetupDiCallClassInstaller(installFunction, deviceInfoSet, deviceInfoData)
+}
+
+// SetupDiOpenDevRegKey function opens a registry key for device-specific configuration information.
+//sys SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) [failretval==InvalidHandle] = setupapi.SetupDiOpenDevRegKey
+
+// OpenDevRegKey method opens a registry key for device-specific configuration information.
+func (deviceInfoSet DevInfo) OpenDevRegKey(DeviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (Handle, error) {
+ return SetupDiOpenDevRegKey(deviceInfoSet, DeviceInfoData, Scope, HwProfile, KeyType, samDesired)
+}
+
+//sys setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) = setupapi.SetupDiGetDevicePropertyW
+
+// SetupDiGetDeviceProperty function retrieves a specified device instance property.
+func SetupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY) (value interface{}, err error) {
+ reqSize := uint32(256)
+ for {
+ var dataType DEVPROPTYPE
+ buf := make([]byte, reqSize)
+ err = setupDiGetDeviceProperty(deviceInfoSet, deviceInfoData, propertyKey, &dataType, &buf[0], uint32(len(buf)), &reqSize, 0)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return
+ }
+ switch dataType {
+ case DEVPROP_TYPE_STRING:
+ ret := UTF16ToString(bufToUTF16(buf))
+ runtime.KeepAlive(buf)
+ return ret, nil
+ }
+ return nil, errors.New("unimplemented property type")
+ }
+}
+
+//sys setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceRegistryPropertyW
+
+// SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and Play device property.
+func SetupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP) (value interface{}, err error) {
+ reqSize := uint32(256)
+ for {
+ var dataType uint32
+ buf := make([]byte, reqSize)
+ err = setupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &dataType, &buf[0], uint32(len(buf)), &reqSize)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return
+ }
+ return getRegistryValue(buf[:reqSize], dataType)
+ }
+}
+
+func getRegistryValue(buf []byte, dataType uint32) (interface{}, error) {
+ switch dataType {
+ case REG_SZ:
+ ret := UTF16ToString(bufToUTF16(buf))
+ runtime.KeepAlive(buf)
+ return ret, nil
+ case REG_EXPAND_SZ:
+ value := UTF16ToString(bufToUTF16(buf))
+ if value == "" {
+ return "", nil
+ }
+ p, err := syscall.UTF16PtrFromString(value)
+ if err != nil {
+ return "", err
+ }
+ ret := make([]uint16, 100)
+ for {
+ n, err := ExpandEnvironmentStrings(p, &ret[0], uint32(len(ret)))
+ if err != nil {
+ return "", err
+ }
+ if n <= uint32(len(ret)) {
+ return UTF16ToString(ret[:n]), nil
+ }
+ ret = make([]uint16, n)
+ }
+ case REG_BINARY:
+ return buf, nil
+ case REG_DWORD_LITTLE_ENDIAN:
+ return binary.LittleEndian.Uint32(buf), nil
+ case REG_DWORD_BIG_ENDIAN:
+ return binary.BigEndian.Uint32(buf), nil
+ case REG_MULTI_SZ:
+ bufW := bufToUTF16(buf)
+ a := []string{}
+ for i := 0; i < len(bufW); {
+ j := i + wcslen(bufW[i:])
+ if i < j {
+ a = append(a, UTF16ToString(bufW[i:j]))
+ }
+ i = j + 1
+ }
+ runtime.KeepAlive(buf)
+ return a, nil
+ case REG_QWORD_LITTLE_ENDIAN:
+ return binary.LittleEndian.Uint64(buf), nil
+ default:
+ return nil, fmt.Errorf("Unsupported registry value type: %v", dataType)
+ }
+}
+
+// bufToUTF16 function reinterprets []byte buffer as []uint16
+func bufToUTF16(buf []byte) []uint16 {
+ sl := struct {
+ addr *uint16
+ len int
+ cap int
+ }{(*uint16)(unsafe.Pointer(&buf[0])), len(buf) / 2, cap(buf) / 2}
+ return *(*[]uint16)(unsafe.Pointer(&sl))
+}
+
+// utf16ToBuf function reinterprets []uint16 as []byte
+func utf16ToBuf(buf []uint16) []byte {
+ sl := struct {
+ addr *byte
+ len int
+ cap int
+ }{(*byte)(unsafe.Pointer(&buf[0])), len(buf) * 2, cap(buf) * 2}
+ return *(*[]byte)(unsafe.Pointer(&sl))
+}
+
+func wcslen(str []uint16) int {
+ for i := 0; i < len(str); i++ {
+ if str[i] == 0 {
+ return i
+ }
+ }
+ return len(str)
+}
+
+// DeviceRegistryProperty method retrieves a specified Plug and Play device property.
+func (deviceInfoSet DevInfo) DeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP) (interface{}, error) {
+ return SetupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property)
+}
+
+//sys setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) = setupapi.SetupDiSetDeviceRegistryPropertyW
+
+// SetupDiSetDeviceRegistryProperty function sets a Plug and Play device property for a device.
+func SetupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error {
+ return setupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &propertyBuffers[0], uint32(len(propertyBuffers)))
+}
+
+// SetDeviceRegistryProperty function sets a Plug and Play device property for a device.
+func (deviceInfoSet DevInfo) SetDeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error {
+ return SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, propertyBuffers)
+}
+
+// SetDeviceRegistryPropertyString method sets a Plug and Play device property string for a device.
+func (deviceInfoSet DevInfo) SetDeviceRegistryPropertyString(deviceInfoData *DevInfoData, property SPDRP, str string) error {
+ str16, err := UTF16FromString(str)
+ if err != nil {
+ return err
+ }
+ err = SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, utf16ToBuf(append(str16, 0)))
+ runtime.KeepAlive(str16)
+ return err
+}
+
+//sys setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiGetDeviceInstallParamsW
+
+// SetupDiGetDeviceInstallParams function retrieves device installation parameters for a device information set or a particular device information element.
+func SetupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DevInstallParams, error) {
+ params := &DevInstallParams{}
+ params.size = uint32(unsafe.Sizeof(*params))
+
+ return params, setupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData, params)
+}
+
+// DeviceInstallParams method retrieves device installation parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) DeviceInstallParams(deviceInfoData *DevInfoData) (*DevInstallParams, error) {
+ return SetupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData)
+}
+
+//sys setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceInstanceIdW
+
+// SetupDiGetDeviceInstanceId function retrieves the instance ID of the device.
+func SetupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (string, error) {
+ reqSize := uint32(1024)
+ for {
+ buf := make([]uint16, reqSize)
+ err := setupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData, &buf[0], uint32(len(buf)), &reqSize)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return "", err
+ }
+ return UTF16ToString(buf), nil
+ }
+}
+
+// DeviceInstanceID method retrieves the instance ID of the device.
+func (deviceInfoSet DevInfo) DeviceInstanceID(deviceInfoData *DevInfoData) (string, error) {
+ return SetupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData)
+}
+
+// SetupDiGetClassInstallParams function retrieves class installation parameters for a device information set or a particular device information element.
+//sys SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetClassInstallParamsW
+
+// ClassInstallParams method retrieves class installation parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) ClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) error {
+ return SetupDiGetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize, requiredSize)
+}
+
+//sys SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiSetDeviceInstallParamsW
+
+// SetDeviceInstallParams member sets device installation parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) SetDeviceInstallParams(deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) error {
+ return SetupDiSetDeviceInstallParams(deviceInfoSet, deviceInfoData, deviceInstallParams)
+}
+
+// SetupDiSetClassInstallParams function sets or clears class install parameters for a device information set or a particular device information element.
+//sys SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) = setupapi.SetupDiSetClassInstallParamsW
+
+// SetClassInstallParams method sets or clears class install parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) SetClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) error {
+ return SetupDiSetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize)
+}
+
+//sys setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassNameFromGuidExW
+
+// SetupDiClassNameFromGuidEx function retrieves the class name associated with a class GUID. The class can be installed on a local or remote computer.
+func SetupDiClassNameFromGuidEx(classGUID *GUID, machineName string) (className string, err error) {
+ var classNameUTF16 [MAX_CLASS_NAME_LEN]uint16
+
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return
+ }
+ }
+
+ err = setupDiClassNameFromGuidEx(classGUID, &classNameUTF16[0], MAX_CLASS_NAME_LEN, nil, machineNameUTF16, 0)
+ if err != nil {
+ return
+ }
+
+ className = UTF16ToString(classNameUTF16[:])
+ return
+}
+
+//sys setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassGuidsFromNameExW
+
+// SetupDiClassGuidsFromNameEx function retrieves the GUIDs associated with the specified class name. This resulting list contains the classes currently installed on a local or remote computer.
+func SetupDiClassGuidsFromNameEx(className string, machineName string) ([]GUID, error) {
+ classNameUTF16, err := UTF16PtrFromString(className)
+ if err != nil {
+ return nil, err
+ }
+
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ reqSize := uint32(4)
+ for {
+ buf := make([]GUID, reqSize)
+ err = setupDiClassGuidsFromNameEx(classNameUTF16, &buf[0], uint32(len(buf)), &reqSize, machineNameUTF16, 0)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+ return buf[:reqSize], nil
+ }
+}
+
+//sys setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiGetSelectedDevice
+
+// SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set.
+func SetupDiGetSelectedDevice(deviceInfoSet DevInfo) (*DevInfoData, error) {
+ data := &DevInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiGetSelectedDevice(deviceInfoSet, data)
+}
+
+// SelectedDevice method retrieves the selected device information element in a device information set.
+func (deviceInfoSet DevInfo) SelectedDevice() (*DevInfoData, error) {
+ return SetupDiGetSelectedDevice(deviceInfoSet)
+}
+
+// SetupDiSetSelectedDevice function sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.
+//sys SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiSetSelectedDevice
+
+// SetSelectedDevice method sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.
+func (deviceInfoSet DevInfo) SetSelectedDevice(deviceInfoData *DevInfoData) error {
+ return SetupDiSetSelectedDevice(deviceInfoSet, deviceInfoData)
+}
+
+//sys setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) = setupapi.SetupUninstallOEMInfW
+
+// SetupUninstallOEMInf uninstalls the specified driver.
+func SetupUninstallOEMInf(infFileName string, flags SUOI) error {
+ infFileName16, err := UTF16PtrFromString(infFileName)
+ if err != nil {
+ return err
+ }
+ return setupUninstallOEMInf(infFileName16, flags, 0)
+}
+
+//sys cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) = CfgMgr32.CM_MapCrToWin32Err
+
+//sys cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_List_SizeW
+//sys cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_ListW
+
+func CM_Get_Device_Interface_List(deviceID string, interfaceClass *GUID, flags uint32) ([]string, error) {
+ deviceID16, err := UTF16PtrFromString(deviceID)
+ if err != nil {
+ return nil, err
+ }
+ var buf []uint16
+ var buflen uint32
+ for {
+ if ret := cm_Get_Device_Interface_List_Size(&buflen, interfaceClass, deviceID16, flags); ret != CR_SUCCESS {
+ return nil, ret
+ }
+ buf = make([]uint16, buflen)
+ if ret := cm_Get_Device_Interface_List(interfaceClass, deviceID16, &buf[0], buflen, flags); ret == CR_SUCCESS {
+ break
+ } else if ret != CR_BUFFER_SMALL {
+ return nil, ret
+ }
+ }
+ var interfaces []string
+ for i := 0; i < len(buf); {
+ j := i + wcslen(buf[i:])
+ if i < j {
+ interfaces = append(interfaces, UTF16ToString(buf[i:j]))
+ }
+ i = j + 1
+ }
+ if interfaces == nil {
+ return nil, ERROR_NO_SUCH_DEVICE_INTERFACE
+ }
+ return interfaces, nil
+}
+
+//sys cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_DevNode_Status
+
+func CM_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) error {
+ ret := cm_Get_DevNode_Status(status, problemNumber, devInst, flags)
+ if ret == CR_SUCCESS {
+ return nil
+ }
+ return ret
+}
diff --git a/vendor/golang.org/x/sys/windows/str.go b/vendor/golang.org/x/sys/windows/str.go
index 917cc2a..4fc0143 100644
--- a/vendor/golang.org/x/sys/windows/str.go
+++ b/vendor/golang.org/x/sys/windows/str.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go
index af828a9..72074d5 100644
--- a/vendor/golang.org/x/sys/windows/syscall.go
+++ b/vendor/golang.org/x/sys/windows/syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package windows contains an interface to the low-level operating system
@@ -25,17 +26,20 @@
package windows // import "golang.org/x/sys/windows"
import (
+ "bytes"
+ "strings"
"syscall"
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
// containing the text of s. If s contains a NUL byte at any
// location, it returns (nil, syscall.EINVAL).
func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, syscall.EINVAL
- }
+ if strings.IndexByte(s, 0) != -1 {
+ return nil, syscall.EINVAL
}
a := make([]byte, len(s)+1)
copy(a, s)
@@ -53,6 +57,41 @@ func BytePtrFromString(s string) (*byte, error) {
return &a[0], nil
}
+// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any
+// bytes after the NUL removed.
+func ByteSliceToString(s []byte) string {
+ if i := bytes.IndexByte(s, 0); i != -1 {
+ s = s[:i]
+ }
+ return string(s)
+}
+
+// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.
+// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated
+// at a zero byte; if the zero byte is not present, the program may crash.
+func BytePtrToString(p *byte) string {
+ if p == nil {
+ return ""
+ }
+ if *p == 0 {
+ return ""
+ }
+
+ // Find NUL terminator.
+ n := 0
+ for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {
+ ptr = unsafe.Pointer(uintptr(ptr) + 1)
+ }
+
+ var s []byte
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ h.Data = unsafe.Pointer(p)
+ h.Len = n
+ h.Cap = n
+
+ return string(s)
+}
+
// Single-word zero for use when we need a valid pointer to 0 bytes.
// See mksyscall.pl.
var _zero uintptr
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index 053d664..200b62a 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -8,17 +8,23 @@ package windows
import (
errorspkg "errors"
+ "fmt"
+ "runtime"
"sync"
"syscall"
"time"
"unicode/utf16"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
type Handle uintptr
+type HWND uintptr
const (
InvalidHandle = ^Handle(0)
+ InvalidHWND = ^HWND(0)
// Flags for DefineDosDevice.
DDD_EXACT_MATCH_ON_REMOVE = 0x00000004
@@ -61,9 +67,8 @@ const (
LOCKFILE_FAIL_IMMEDIATELY = 0x00000001
LOCKFILE_EXCLUSIVE_LOCK = 0x00000002
- // Return values of SleepEx and other APC functions
- STATUS_USER_APC = 0x000000C0
- WAIT_IO_COMPLETION = STATUS_USER_APC
+ // Return value of SleepEx and other APC functions
+ WAIT_IO_COMPLETION = 0x000000C0
)
// StringToUTF16 is deprecated. Use UTF16FromString instead.
@@ -90,11 +95,11 @@ func UTF16FromString(s string) ([]uint16, error) {
}
// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,
-// with a terminating NUL removed.
+// with a terminating NUL and any bytes after the NUL removed.
func UTF16ToString(s []uint16) string {
for i, v := range s {
if v == 0 {
- s = s[0:i]
+ s = s[:i]
break
}
}
@@ -117,6 +122,32 @@ func UTF16PtrFromString(s string) (*uint16, error) {
return &a[0], nil
}
+// UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string.
+// If the pointer is nil, it returns the empty string. It assumes that the UTF-16 sequence is terminated
+// at a zero word; if the zero word is not present, the program may crash.
+func UTF16PtrToString(p *uint16) string {
+ if p == nil {
+ return ""
+ }
+ if *p == 0 {
+ return ""
+ }
+
+ // Find NUL terminator.
+ n := 0
+ for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ {
+ ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
+ }
+
+ var s []uint16
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ h.Data = unsafe.Pointer(p)
+ h.Len = n
+ h.Cap = n
+
+ return string(utf16.Decode(s))
+}
+
func Getpagesize() int { return 4096 }
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
@@ -142,11 +173,19 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetProcAddress(module Handle, procname string) (proc uintptr, err error)
//sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW
//sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW
+//sys SetDefaultDllDirectories(directoryFlags uint32) (err error)
+//sys SetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW
//sys GetVersion() (ver uint32, err error)
//sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
//sys ExitProcess(exitcode uint32)
//sys IsWow64Process(handle Handle, isWow64 *bool) (err error) = IsWow64Process
+//sys IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) = IsWow64Process2?
//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
+//sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW
+//sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error)
+//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
+//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
+//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
@@ -159,6 +198,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys FindClose(handle Handle) (err error)
//sys GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error)
//sys GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error)
+//sys SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error)
//sys GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW
//sys SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW
//sys CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW
@@ -174,14 +214,22 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetSystemTimeAsFileTime(time *Filetime)
//sys GetSystemTimePreciseAsFileTime(time *Filetime)
//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]
-//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error)
-//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error)
-//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error)
+//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error)
+//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error)
+//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error)
//sys CancelIo(s Handle) (err error)
//sys CancelIoEx(s Handle, o *Overlapped) (err error)
//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW
+//sys CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = advapi32.CreateProcessAsUserW
+//sys initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) = InitializeProcThreadAttributeList
+//sys deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) = DeleteProcThreadAttributeList
+//sys updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) = UpdateProcThreadAttribute
//sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)
//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW
+//sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId
+//sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow
+//sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
+//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
//sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath
//sys TerminateProcess(handle Handle, exitcode uint32) (err error)
//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
@@ -200,6 +248,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys FreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW
//sys GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW
//sys SetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW
+//sys ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW
//sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock
//sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock
//sys getTickCount64() (ms uint64) = kernel32.GetTickCount64
@@ -210,12 +259,14 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW
//sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW
//sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0]
+//sys LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error)
//sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
//sys FlushFileBuffers(handle Handle) (err error)
//sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW
//sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW
//sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW
-//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW
+//sys GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW
+//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateFileMappingW
//sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)
//sys UnmapViewOfFile(addr uintptr) (err error)
//sys FlushViewOfFile(addr uintptr, length uintptr) (err error)
@@ -224,30 +275,56 @@ 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
+//sys FindNextChangeNotification(handle Handle) (err error)
+//sys FindCloseChangeNotification(handle Handle) (err error)
//sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW
-//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) [failretval==InvalidHandle] = crypt32.CertOpenStore
+//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) = crypt32.CertOpenStore
//sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore
-//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
+//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
//sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore
-//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
-//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
-//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
-//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
-//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
+//sys CertDeleteCertificateFromStore(certContext *CertContext) (err error) = crypt32.CertDeleteCertificateFromStore
+//sys CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) = crypt32.CertDuplicateCertificateContext
+//sys PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) = crypt32.PFXImportCertStore
+//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
+//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
+//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
+//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
+//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
+//sys CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) = crypt32.CertGetNameStringW
+//sys CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) = crypt32.CertFindExtension
+//sys CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) [failretval==nil] = crypt32.CertFindCertificateInStore
+//sys CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) [failretval==nil] = crypt32.CertFindChainInStore
+//sys CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) = crypt32.CryptAcquireCertificatePrivateKey
+//sys CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) = crypt32.CryptQueryObject
+//sys CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) = crypt32.CryptDecodeObject
+//sys CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptProtectData
+//sys CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptUnprotectData
+//sys WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) = wintrust.WinVerifyTrustEx
//sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW
//sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey
//sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW
//sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW
//sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW
+//sys RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) = advapi32.RegNotifyChangeKeyValue
//sys GetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
+//sys ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) = kernel32.ProcessIdToSessionId
//sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode
//sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
//sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
+//sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
+//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
+//sys Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW
//sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW
//sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW
//sys Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error)
@@ -257,14 +334,14 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW
//sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW
//sys GetCurrentThreadId() (id uint32)
-//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW
-//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateEventExW
+//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventW
+//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventExW
//sys OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW
//sys SetEvent(event Handle) (err error) = kernel32.SetEvent
//sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent
//sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent
-//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) = kernel32.CreateMutexW
-//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateMutexExW
+//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexW
+//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexExW
//sys OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenMutexW
//sys ReleaseMutex(mutex Handle) (err error) = kernel32.ReleaseMutex
//sys SleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx
@@ -275,11 +352,17 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys ResumeThread(thread Handle) (ret uint32, err error) [failretval==0xffffffff] = kernel32.ResumeThread
//sys SetPriorityClass(process Handle, priorityClass uint32) (err error) = kernel32.SetPriorityClass
//sys GetPriorityClass(process Handle) (ret uint32, err error) = kernel32.GetPriorityClass
+//sys QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) = kernel32.QueryInformationJobObject
//sys SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error)
//sys GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error)
//sys GetProcessId(process Handle) (id uint32, err error)
+//sys QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) = kernel32.QueryFullProcessImageNameW
//sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error)
//sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost
+//sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32)
+//sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)
+//sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
+//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -302,8 +385,6 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW
//sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW
//sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW
-//sys MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
-//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
//sys InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) = advapi32.InitiateSystemShutdownExW
//sys SetProcessShutdownParameters(level uint32, flags uint32) (err error) = kernel32.SetProcessShutdownParameters
//sys GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) = kernel32.GetProcessShutdownParameters
@@ -311,15 +392,50 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2
//sys coCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid
//sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree
-//sys rtlGetVersion(info *OsVersionInfoEx) (ret error) = ntdll.RtlGetVersion
-//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers
+//sys CoInitializeEx(reserved uintptr, coInit uint32) (ret error) = ole32.CoInitializeEx
+//sys CoUninitialize() = ole32.CoUninitialize
+//sys CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) = ole32.CoGetObject
//sys getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetProcessPreferredUILanguages
//sys getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages
//sys getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages
//sys getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages
+//sys findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) = kernel32.FindResourceW
+//sys SizeofResource(module Handle, resInfo Handle) (size uint32, err error) = kernel32.SizeofResource
+//sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
+//sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
+
+// Version APIs
+//sys GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW
+//sys GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW
+//sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
// 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
+//sys rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) = ntdll.RtlGetVersion
+//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers
+//sys RtlGetCurrentPeb() (peb *PEB) = ntdll.RtlGetCurrentPeb
+//sys RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) = ntdll.RtlInitUnicodeString
+//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
+//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
+//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
+//sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
+//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
+//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
+//sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
+//sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
+//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
+//sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
+//sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
+//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
+//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
// syscall interface implementation for other packages
@@ -357,11 +473,7 @@ func GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err
r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0)
proc = uintptr(r0)
if proc == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -718,6 +830,7 @@ const socket_error = uintptr(^uint32(0))
//sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend
//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom
//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo
+//sys WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW
//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname
//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname
//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs
@@ -731,6 +844,7 @@ const socket_error = uintptr(^uint32(0))
//sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo
//sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes
//sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW
+//sys WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
//sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
//sys GetACP() (acp uint32) = kernel32.GetACP
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
@@ -782,9 +896,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
}
@@ -804,9 +916,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
}
@@ -879,9 +989,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -890,9 +998,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, syscall.EAFNOSUPPORT
@@ -1058,11 +1164,7 @@ func WSASendMsg(fd Handle, msg *WSAMsg, flags uint32, bytesSent *uint32, overlap
}
r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return err
}
@@ -1074,11 +1176,7 @@ func WSARecvMsg(fd Handle, msg *WSAMsg, bytesReceived *uint32, overlapped *Overl
}
r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0)
if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return err
}
@@ -1181,7 +1279,12 @@ type IPv6Mreq struct {
Interface uint32
}
-func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS }
+func GetsockoptInt(fd Handle, level, opt int) (int, error) {
+ v := int32(0)
+ l := int32(unsafe.Sizeof(v))
+ err := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l)
+ return int(v), err
+}
func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
@@ -1378,7 +1481,7 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e
return "", err
}
defer CoTaskMemFree(unsafe.Pointer(p))
- return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil
+ return UTF16PtrToString(p), nil
}
// RtlGetVersion returns the version of the underlying operating system, ignoring
@@ -1452,3 +1555,133 @@ func getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf
return languages, nil
}
}
+
+func SetConsoleCursorPosition(console Handle, position Coord) error {
+ return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position))))
+}
+
+func (s NTStatus) Errno() syscall.Errno {
+ return rtlNtStatusToDosErrorNoTeb(s)
+}
+
+func langID(pri, sub uint16) uint32 { return uint32(sub)<<10 | uint32(pri) }
+
+func (s NTStatus) Error() string {
+ b := make([]uint16, 300)
+ n, err := FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_ARGUMENT_ARRAY, modntdll.Handle(), uint32(s), langID(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil)
+ if err != nil {
+ return fmt.Sprintf("NTSTATUS 0x%08x", uint32(s))
+ }
+ // trim terminating \r and \n
+ for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- {
+ }
+ return string(utf16.Decode(b[:n]))
+}
+
+// NewNTUnicodeString returns a new NTUnicodeString structure for use with native
+// NT APIs that work over the NTUnicodeString type. Note that most Windows APIs
+// do not use NTUnicodeString, and instead UTF16PtrFromString should be used for
+// the more common *uint16 string type.
+func NewNTUnicodeString(s string) (*NTUnicodeString, error) {
+ var u NTUnicodeString
+ s16, err := UTF16PtrFromString(s)
+ if err != nil {
+ return nil, err
+ }
+ RtlInitUnicodeString(&u, s16)
+ return &u, nil
+}
+
+// Slice returns a uint16 slice that aliases the data in the NTUnicodeString.
+func (s *NTUnicodeString) Slice() []uint16 {
+ var slice []uint16
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice))
+ hdr.Data = unsafe.Pointer(s.Buffer)
+ hdr.Len = int(s.Length)
+ hdr.Cap = int(s.MaximumLength)
+ return slice
+}
+
+func (s *NTUnicodeString) String() string {
+ return UTF16ToString(s.Slice())
+}
+
+// NewNTString returns a new NTString structure for use with native
+// NT APIs that work over the NTString type. Note that most Windows APIs
+// do not use NTString, and instead UTF16PtrFromString should be used for
+// the more common *uint16 string type.
+func NewNTString(s string) (*NTString, error) {
+ var nts NTString
+ s8, err := BytePtrFromString(s)
+ if err != nil {
+ return nil, err
+ }
+ RtlInitString(&nts, s8)
+ return &nts, nil
+}
+
+// Slice returns a byte slice that aliases the data in the NTString.
+func (s *NTString) Slice() []byte {
+ var slice []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice))
+ hdr.Data = unsafe.Pointer(s.Buffer)
+ hdr.Len = int(s.Length)
+ hdr.Cap = int(s.MaximumLength)
+ return slice
+}
+
+func (s *NTString) String() string {
+ return ByteSliceToString(s.Slice())
+}
+
+// FindResource resolves a resource of the given name and resource type.
+func FindResource(module Handle, name, resType ResourceIDOrString) (Handle, error) {
+ var namePtr, resTypePtr uintptr
+ var name16, resType16 *uint16
+ var err error
+ resolvePtr := func(i interface{}, keep **uint16) (uintptr, error) {
+ switch v := i.(type) {
+ case string:
+ *keep, err = UTF16PtrFromString(v)
+ if err != nil {
+ return 0, err
+ }
+ return uintptr(unsafe.Pointer(*keep)), nil
+ case ResourceID:
+ return uintptr(v), nil
+ }
+ return 0, errorspkg.New("parameter must be a ResourceID or a string")
+ }
+ namePtr, err = resolvePtr(name, &name16)
+ if err != nil {
+ return 0, err
+ }
+ resTypePtr, err = resolvePtr(resType, &resType16)
+ if err != nil {
+ return 0, err
+ }
+ resInfo, err := findResource(module, namePtr, resTypePtr)
+ runtime.KeepAlive(name16)
+ runtime.KeepAlive(resType16)
+ return resInfo, err
+}
+
+func LoadResourceData(module, resInfo Handle) (data []byte, err error) {
+ size, err := SizeofResource(module, resInfo)
+ if err != nil {
+ return
+ }
+ resData, err := LoadResource(module, resInfo)
+ if err != nil {
+ return
+ }
+ ptr, err := LockResource(resData)
+ if err != nil {
+ return
+ }
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&data))
+ h.Data = unsafe.Pointer(ptr)
+ h.Len = int(size)
+ h.Cap = int(size)
+ return
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 809fff0..bb31abd 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -10,6 +10,10 @@ import (
"unsafe"
)
+// NTStatus corresponds with NTSTATUS, error values returned by ntdll.dll and
+// other native functions.
+type NTStatus uint32
+
const (
// Invented values to support what package os expects.
O_RDONLY = 0x00000
@@ -62,9 +66,21 @@ var signals = [...]string{
}
const (
- FILE_LIST_DIRECTORY = 0x00000001
- FILE_APPEND_DATA = 0x00000004
+ FILE_READ_DATA = 0x00000001
+ FILE_READ_ATTRIBUTES = 0x00000080
+ FILE_READ_EA = 0x00000008
+ FILE_WRITE_DATA = 0x00000002
FILE_WRITE_ATTRIBUTES = 0x00000100
+ FILE_WRITE_EA = 0x00000010
+ FILE_APPEND_DATA = 0x00000004
+ FILE_EXECUTE = 0x00000020
+
+ FILE_GENERIC_READ = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE
+ FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE
+ FILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE
+
+ FILE_LIST_DIRECTORY = 0x00000001
+ FILE_TRAVERSE = 0x00000020
FILE_SHARE_READ = 0x00000001
FILE_SHARE_WRITE = 0x00000002
@@ -140,6 +156,8 @@ const (
MAX_PATH = 260
MAX_LONG_PATH = 32768
+ MAX_MODULE_NAME32 = 255
+
MAX_COMPUTERNAME_LENGTH = 15
TIME_ZONE_ID_UNKNOWN = 0
@@ -216,6 +234,18 @@ const (
)
const (
+ // attributes for ProcThreadAttributeList
+ PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = 0x00020000
+ PROC_THREAD_ATTRIBUTE_HANDLE_LIST = 0x00020002
+ PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY = 0x00030003
+ PROC_THREAD_ATTRIBUTE_PREFERRED_NODE = 0x00020004
+ PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR = 0x00030005
+ PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007
+ PROC_THREAD_ATTRIBUTE_UMS_THREAD = 0x00030006
+ PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL = 0x0002000b
+)
+
+const (
// flags for CreateToolhelp32Snapshot
TH32CS_SNAPHEAPLIST = 0x01
TH32CS_SNAPPROCESS = 0x02
@@ -227,7 +257,15 @@ const (
)
const (
- // filters for ReadDirectoryChangesW
+ // 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
FILE_NOTIFY_CHANGE_DIR_NAME = 0x002
FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x004
@@ -249,24 +287,27 @@ const (
const (
// wincrypt.h
- PROV_RSA_FULL = 1
- PROV_RSA_SIG = 2
- PROV_DSS = 3
- PROV_FORTEZZA = 4
- PROV_MS_EXCHANGE = 5
- PROV_SSL = 6
- PROV_RSA_SCHANNEL = 12
- PROV_DSS_DH = 13
- PROV_EC_ECDSA_SIG = 14
- PROV_EC_ECNRA_SIG = 15
- PROV_EC_ECDSA_FULL = 16
- PROV_EC_ECNRA_FULL = 17
- PROV_DH_SCHANNEL = 18
- PROV_SPYRUS_LYNKS = 20
- PROV_RNG = 21
- PROV_INTEL_SEC = 22
- PROV_REPLACE_OWF = 23
- PROV_RSA_AES = 24
+ /* certenrolld_begin -- PROV_RSA_*/
+ PROV_RSA_FULL = 1
+ PROV_RSA_SIG = 2
+ PROV_DSS = 3
+ PROV_FORTEZZA = 4
+ PROV_MS_EXCHANGE = 5
+ PROV_SSL = 6
+ PROV_RSA_SCHANNEL = 12
+ PROV_DSS_DH = 13
+ PROV_EC_ECDSA_SIG = 14
+ PROV_EC_ECNRA_SIG = 15
+ PROV_EC_ECDSA_FULL = 16
+ PROV_EC_ECNRA_FULL = 17
+ PROV_DH_SCHANNEL = 18
+ PROV_SPYRUS_LYNKS = 20
+ PROV_RNG = 21
+ PROV_INTEL_SEC = 22
+ PROV_REPLACE_OWF = 23
+ PROV_RSA_AES = 24
+
+ /* dwFlags definitions for CryptAcquireContext */
CRYPT_VERIFYCONTEXT = 0xF0000000
CRYPT_NEWKEYSET = 0x00000008
CRYPT_DELETEKEYSET = 0x00000010
@@ -274,6 +315,34 @@ const (
CRYPT_SILENT = 0x00000040
CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
+ /* Flags for PFXImportCertStore */
+ CRYPT_EXPORTABLE = 0x00000001
+ CRYPT_USER_PROTECTED = 0x00000002
+ CRYPT_USER_KEYSET = 0x00001000
+ PKCS12_PREFER_CNG_KSP = 0x00000100
+ PKCS12_ALWAYS_CNG_KSP = 0x00000200
+ PKCS12_ALLOW_OVERWRITE_KEY = 0x00004000
+ PKCS12_NO_PERSIST_KEY = 0x00008000
+ PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x00000010
+
+ /* Flags for CryptAcquireCertificatePrivateKey */
+ CRYPT_ACQUIRE_CACHE_FLAG = 0x00000001
+ CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x00000002
+ CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x00000004
+ CRYPT_ACQUIRE_NO_HEALING = 0x00000008
+ CRYPT_ACQUIRE_SILENT_FLAG = 0x00000040
+ CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x00000080
+ CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x00070000
+ CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x00010000
+ CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x00020000
+ CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x00040000
+
+ /* pdwKeySpec for CryptAcquireCertificatePrivateKey */
+ AT_KEYEXCHANGE = 1
+ AT_SIGNATURE = 2
+ CERT_NCRYPT_KEY_SPEC = 0xFFFFFFFF
+
+ /* Default usage match type is AND with value zero */
USAGE_MATCH_TYPE_AND = 0
USAGE_MATCH_TYPE_OR = 1
@@ -398,6 +467,89 @@ const (
CERT_TRUST_IS_CA_TRUSTED = 0x00004000
CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000
+ /* Certificate Information Flags */
+ CERT_INFO_VERSION_FLAG = 1
+ CERT_INFO_SERIAL_NUMBER_FLAG = 2
+ CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3
+ CERT_INFO_ISSUER_FLAG = 4
+ CERT_INFO_NOT_BEFORE_FLAG = 5
+ CERT_INFO_NOT_AFTER_FLAG = 6
+ CERT_INFO_SUBJECT_FLAG = 7
+ CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8
+ CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9
+ CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10
+ CERT_INFO_EXTENSION_FLAG = 11
+
+ /* dwFindType for CertFindCertificateInStore */
+ CERT_COMPARE_MASK = 0xFFFF
+ CERT_COMPARE_SHIFT = 16
+ CERT_COMPARE_ANY = 0
+ CERT_COMPARE_SHA1_HASH = 1
+ CERT_COMPARE_NAME = 2
+ CERT_COMPARE_ATTR = 3
+ CERT_COMPARE_MD5_HASH = 4
+ CERT_COMPARE_PROPERTY = 5
+ CERT_COMPARE_PUBLIC_KEY = 6
+ CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH
+ CERT_COMPARE_NAME_STR_A = 7
+ CERT_COMPARE_NAME_STR_W = 8
+ CERT_COMPARE_KEY_SPEC = 9
+ CERT_COMPARE_ENHKEY_USAGE = 10
+ CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE
+ CERT_COMPARE_SUBJECT_CERT = 11
+ CERT_COMPARE_ISSUER_OF = 12
+ CERT_COMPARE_EXISTING = 13
+ CERT_COMPARE_SIGNATURE_HASH = 14
+ CERT_COMPARE_KEY_IDENTIFIER = 15
+ CERT_COMPARE_CERT_ID = 16
+ CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17
+ CERT_COMPARE_PUBKEY_MD5_HASH = 18
+ CERT_COMPARE_SUBJECT_INFO_ACCESS = 19
+ CERT_COMPARE_HASH_STR = 20
+ CERT_COMPARE_HAS_PRIVATE_KEY = 21
+ CERT_FIND_ANY = (CERT_COMPARE_ANY << CERT_COMPARE_SHIFT)
+ CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_MD5_HASH = (CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_SIGNATURE_HASH = (CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_KEY_IDENTIFIER = (CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT)
+ CERT_FIND_HASH = CERT_FIND_SHA1_HASH
+ CERT_FIND_PROPERTY = (CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT)
+ CERT_FIND_PUBLIC_KEY = (CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT)
+ CERT_FIND_SUBJECT_NAME = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_SUBJECT_ATTR = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_ISSUER_NAME = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_ISSUER_ATTR = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_SUBJECT_STR_A = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_SUBJECT_STR_W = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_SUBJECT_STR = CERT_FIND_SUBJECT_STR_W
+ CERT_FIND_ISSUER_STR_A = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_ISSUER_STR_W = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_ISSUER_STR = CERT_FIND_ISSUER_STR_W
+ CERT_FIND_KEY_SPEC = (CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT)
+ CERT_FIND_ENHKEY_USAGE = (CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT)
+ CERT_FIND_CTL_USAGE = CERT_FIND_ENHKEY_USAGE
+ CERT_FIND_SUBJECT_CERT = (CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT)
+ CERT_FIND_ISSUER_OF = (CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT)
+ CERT_FIND_EXISTING = (CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT)
+ CERT_FIND_CERT_ID = (CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT)
+ CERT_FIND_CROSS_CERT_DIST_POINTS = (CERT_COMPARE_CROSS_CERT_DIST_POINTS << CERT_COMPARE_SHIFT)
+ CERT_FIND_PUBKEY_MD5_HASH = (CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_SUBJECT_INFO_ACCESS = (CERT_COMPARE_SUBJECT_INFO_ACCESS << CERT_COMPARE_SHIFT)
+ CERT_FIND_HASH_STR = (CERT_COMPARE_HASH_STR << CERT_COMPARE_SHIFT)
+ CERT_FIND_HAS_PRIVATE_KEY = (CERT_COMPARE_HAS_PRIVATE_KEY << CERT_COMPARE_SHIFT)
+ CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = 0x1
+ CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = 0x2
+ CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = 0x4
+ CERT_FIND_NO_ENHKEY_USAGE_FLAG = 0x8
+ CERT_FIND_OR_ENHKEY_USAGE_FLAG = 0x10
+ CERT_FIND_VALID_ENHKEY_USAGE_FLAG = 0x20
+ CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG
+ CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG
+ CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG
+ CERT_FIND_NO_CTL_USAGE_FLAG = CERT_FIND_NO_ENHKEY_USAGE_FLAG
+ CERT_FIND_OR_CTL_USAGE_FLAG = CERT_FIND_OR_ENHKEY_USAGE_FLAG
+ CERT_FIND_VALID_CTL_USAGE_FLAG = CERT_FIND_VALID_ENHKEY_USAGE_FLAG
+
/* policyOID values for CertVerifyCertificateChainPolicy function */
CERT_CHAIN_POLICY_BASE = 1
CERT_CHAIN_POLICY_AUTHENTICODE = 2
@@ -409,6 +561,82 @@ const (
CERT_CHAIN_POLICY_EV = 8
CERT_CHAIN_POLICY_SSL_F12 = 9
+ /* flag for dwFindType CertFindChainInStore */
+ CERT_CHAIN_FIND_BY_ISSUER = 1
+
+ /* dwFindFlags for CertFindChainInStore when dwFindType == CERT_CHAIN_FIND_BY_ISSUER */
+ CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = 0x0001
+ CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = 0x0002
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = 0x0004
+ CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = 0x0008
+ CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = 0x4000
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = 0x8000
+
+ /* Certificate Store close flags */
+ CERT_CLOSE_STORE_FORCE_FLAG = 0x00000001
+ CERT_CLOSE_STORE_CHECK_FLAG = 0x00000002
+
+ /* CryptQueryObject object type */
+ CERT_QUERY_OBJECT_FILE = 1
+ CERT_QUERY_OBJECT_BLOB = 2
+
+ /* CryptQueryObject content type flags */
+ CERT_QUERY_CONTENT_CERT = 1
+ CERT_QUERY_CONTENT_CTL = 2
+ CERT_QUERY_CONTENT_CRL = 3
+ CERT_QUERY_CONTENT_SERIALIZED_STORE = 4
+ CERT_QUERY_CONTENT_SERIALIZED_CERT = 5
+ CERT_QUERY_CONTENT_SERIALIZED_CTL = 6
+ CERT_QUERY_CONTENT_SERIALIZED_CRL = 7
+ CERT_QUERY_CONTENT_PKCS7_SIGNED = 8
+ CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9
+ CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10
+ CERT_QUERY_CONTENT_PKCS10 = 11
+ CERT_QUERY_CONTENT_PFX = 12
+ CERT_QUERY_CONTENT_CERT_PAIR = 13
+ CERT_QUERY_CONTENT_PFX_AND_LOAD = 14
+ CERT_QUERY_CONTENT_FLAG_CERT = (1 << CERT_QUERY_CONTENT_CERT)
+ CERT_QUERY_CONTENT_FLAG_CTL = (1 << CERT_QUERY_CONTENT_CTL)
+ CERT_QUERY_CONTENT_FLAG_CRL = (1 << CERT_QUERY_CONTENT_CRL)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = (1 << CERT_QUERY_CONTENT_SERIALIZED_STORE)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = (1 << CERT_QUERY_CONTENT_SERIALIZED_CERT)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = (1 << CERT_QUERY_CONTENT_SERIALIZED_CTL)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = (1 << CERT_QUERY_CONTENT_SERIALIZED_CRL)
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED)
+ CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = (1 << CERT_QUERY_CONTENT_PKCS7_UNSIGNED)
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED)
+ CERT_QUERY_CONTENT_FLAG_PKCS10 = (1 << CERT_QUERY_CONTENT_PKCS10)
+ CERT_QUERY_CONTENT_FLAG_PFX = (1 << CERT_QUERY_CONTENT_PFX)
+ CERT_QUERY_CONTENT_FLAG_CERT_PAIR = (1 << CERT_QUERY_CONTENT_CERT_PAIR)
+ CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD = (1 << CERT_QUERY_CONTENT_PFX_AND_LOAD)
+ CERT_QUERY_CONTENT_FLAG_ALL = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_CTL | CERT_QUERY_CONTENT_FLAG_CRL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED | CERT_QUERY_CONTENT_FLAG_PKCS10 | CERT_QUERY_CONTENT_FLAG_PFX | CERT_QUERY_CONTENT_FLAG_CERT_PAIR)
+ CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED)
+
+ /* CryptQueryObject format type flags */
+ CERT_QUERY_FORMAT_BINARY = 1
+ CERT_QUERY_FORMAT_BASE64_ENCODED = 2
+ CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED = 3
+ CERT_QUERY_FORMAT_FLAG_BINARY = (1 << CERT_QUERY_FORMAT_BINARY)
+ CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = (1 << CERT_QUERY_FORMAT_BASE64_ENCODED)
+ CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED = (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED)
+ CERT_QUERY_FORMAT_FLAG_ALL = (CERT_QUERY_FORMAT_FLAG_BINARY | CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED | CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED)
+
+ /* CertGetNameString name types */
+ CERT_NAME_EMAIL_TYPE = 1
+ CERT_NAME_RDN_TYPE = 2
+ CERT_NAME_ATTR_TYPE = 3
+ CERT_NAME_SIMPLE_DISPLAY_TYPE = 4
+ CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5
+ CERT_NAME_DNS_TYPE = 6
+ CERT_NAME_URL_TYPE = 7
+ CERT_NAME_UPN_TYPE = 8
+
+ /* CertGetNameString flags */
+ CERT_NAME_ISSUER_FLAG = 0x1
+ CERT_NAME_DISABLE_IE4_UTF8_FLAG = 0x10000
+ CERT_NAME_SEARCH_ALL_NAMES_FLAG = 0x2
+ CERT_NAME_STR_ENABLE_PUNYCODE_FLAG = 0x00200000
+
/* AuthType values for SSLExtraCertChainPolicyPara struct */
AUTHTYPE_CLIENT = 1
AUTHTYPE_SERVER = 2
@@ -419,6 +647,22 @@ const (
SECURITY_FLAG_IGNORE_WRONG_USAGE = 0x00000200
SECURITY_FLAG_IGNORE_CERT_CN_INVALID = 0x00001000
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = 0x00002000
+
+ /* Flags for Crypt[Un]ProtectData */
+ CRYPTPROTECT_UI_FORBIDDEN = 0x1
+ CRYPTPROTECT_LOCAL_MACHINE = 0x4
+ CRYPTPROTECT_CRED_SYNC = 0x8
+ CRYPTPROTECT_AUDIT = 0x10
+ CRYPTPROTECT_NO_RECOVERY = 0x20
+ CRYPTPROTECT_VERIFY_PROTECTION = 0x40
+ CRYPTPROTECT_CRED_REGENERATE = 0x80
+
+ /* Flags for CryptProtectPromptStruct */
+ CRYPTPROTECT_PROMPT_ON_UNPROTECT = 1
+ CRYPTPROTECT_PROMPT_ON_PROTECT = 2
+ CRYPTPROTECT_PROMPT_RESERVED = 4
+ CRYPTPROTECT_PROMPT_STRONG = 8
+ CRYPTPROTECT_PROMPT_REQUIRE_STRONG = 16
)
const (
@@ -441,10 +685,58 @@ const (
REALTIME_PRIORITY_CLASS = 0x00000100
)
+/* wintrust.h constants for WinVerifyTrustEx */
+const (
+ WTD_UI_ALL = 1
+ WTD_UI_NONE = 2
+ WTD_UI_NOBAD = 3
+ WTD_UI_NOGOOD = 4
+
+ WTD_REVOKE_NONE = 0
+ WTD_REVOKE_WHOLECHAIN = 1
+
+ WTD_CHOICE_FILE = 1
+ WTD_CHOICE_CATALOG = 2
+ WTD_CHOICE_BLOB = 3
+ WTD_CHOICE_SIGNER = 4
+ WTD_CHOICE_CERT = 5
+
+ WTD_STATEACTION_IGNORE = 0x00000000
+ WTD_STATEACTION_VERIFY = 0x00000001
+ WTD_STATEACTION_CLOSE = 0x00000002
+ WTD_STATEACTION_AUTO_CACHE = 0x00000003
+ WTD_STATEACTION_AUTO_CACHE_FLUSH = 0x00000004
+
+ WTD_USE_IE4_TRUST_FLAG = 0x1
+ WTD_NO_IE4_CHAIN_FLAG = 0x2
+ WTD_NO_POLICY_USAGE_FLAG = 0x4
+ WTD_REVOCATION_CHECK_NONE = 0x10
+ WTD_REVOCATION_CHECK_END_CERT = 0x20
+ WTD_REVOCATION_CHECK_CHAIN = 0x40
+ WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x80
+ WTD_SAFER_FLAG = 0x100
+ WTD_HASH_ONLY_FLAG = 0x200
+ WTD_USE_DEFAULT_OSVER_CHECK = 0x400
+ WTD_LIFETIME_SIGNING_FLAG = 0x800
+ WTD_CACHE_ONLY_URL_RETRIEVAL = 0x1000
+ WTD_DISABLE_MD2_MD4 = 0x2000
+ WTD_MOTW = 0x4000
+
+ WTD_UICONTEXT_EXECUTE = 0
+ WTD_UICONTEXT_INSTALL = 1
+)
+
var (
OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00")
OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00")
OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00")
+
+ WINTRUST_ACTION_GENERIC_VERIFY_V2 = GUID{
+ Data1: 0xaac56b,
+ Data2: 0xcd44,
+ Data3: 0x11d0,
+ Data4: [8]byte{0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee},
+ }
)
// Pointer represents a pointer to an arbitrary Windows type.
@@ -540,6 +832,14 @@ type win32finddata1 struct {
Reserved1 uint32
FileName [MAX_PATH]uint16
AlternateFileName [14]uint16
+
+ // The Microsoft documentation for this struct¹ describes three additional
+ // fields: dwFileType, dwCreatorType, and wFinderFlags. However, those fields
+ // are empirically only present in the macOS port of the Win32 API,² and thus
+ // not needed for binaries built for Windows.
+ //
+ // ¹ https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw describe
+ // ² https://golang.org/issue/42637#issuecomment-760715755.
}
func copyFindData(dst *Win32finddata, src *win32finddata1) {
@@ -624,6 +924,24 @@ type StartupInfo struct {
StdErr Handle
}
+type StartupInfoEx struct {
+ StartupInfo
+ ProcThreadAttributeList *ProcThreadAttributeList
+}
+
+// ProcThreadAttributeList is a placeholder type to represent a PROC_THREAD_ATTRIBUTE_LIST.
+//
+// To create a *ProcThreadAttributeList, use NewProcThreadAttributeList, update
+// it with ProcThreadAttributeListContainer.Update, free its memory using
+// ProcThreadAttributeListContainer.Delete, and access the list itself using
+// ProcThreadAttributeListContainer.List.
+type ProcThreadAttributeList struct{}
+
+type ProcThreadAttributeListContainer struct {
+ data *ProcThreadAttributeList
+ pointers []unsafe.Pointer
+}
+
type ProcessInformation struct {
Process Handle
Thread Handle
@@ -654,6 +972,21 @@ type ThreadEntry32 struct {
Flags uint32
}
+type ModuleEntry32 struct {
+ Size uint32
+ ModuleID uint32
+ ProcessID uint32
+ GlblcntUsage uint32
+ ProccntUsage uint32
+ ModBaseAddr uintptr
+ ModBaseSize uint32
+ ModuleHandle Handle
+ Module [MAX_MODULE_NAME32 + 1]uint16
+ ExePath [MAX_PATH]uint16
+}
+
+const SizeofModuleEntry32 = unsafe.Sizeof(ModuleEntry32{})
+
type Systemtime struct {
Year uint16
Month uint16
@@ -725,6 +1058,7 @@ const (
// cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460
+ IP_HDRINCL = 0x2
IP_TOS = 0x3
IP_TTL = 0x4
IP_MULTICAST_IF = 0x9
@@ -732,6 +1066,7 @@ const (
IP_MULTICAST_LOOP = 0xb
IP_ADD_MEMBERSHIP = 0xc
IP_DROP_MEMBERSHIP = 0xd
+ IP_PKTINFO = 0x13
IPV6_V6ONLY = 0x1b
IPV6_UNICAST_HOPS = 0x4
@@ -740,6 +1075,7 @@ const (
IPV6_MULTICAST_LOOP = 0xb
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
+ IPV6_PKTINFO = 0x13
MSG_OOB = 0x1
MSG_PEEK = 0x2
@@ -777,6 +1113,18 @@ type WSAMsg struct {
Flags uint32
}
+// Flags for WSASocket
+const (
+ WSA_FLAG_OVERLAPPED = 0x01
+ WSA_FLAG_MULTIPOINT_C_ROOT = 0x02
+ WSA_FLAG_MULTIPOINT_C_LEAF = 0x04
+ WSA_FLAG_MULTIPOINT_D_ROOT = 0x08
+ WSA_FLAG_MULTIPOINT_D_LEAF = 0x10
+ WSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40
+ WSA_FLAG_NO_HANDLE_INHERIT = 0x80
+ WSA_FLAG_REGISTERED_IO = 0x100
+)
+
// Invented values to support what package os expects.
const (
S_IFMT = 0x1f000
@@ -1033,7 +1381,57 @@ type MibIfRow struct {
}
type CertInfo struct {
- // Not implemented
+ Version uint32
+ SerialNumber CryptIntegerBlob
+ SignatureAlgorithm CryptAlgorithmIdentifier
+ Issuer CertNameBlob
+ NotBefore Filetime
+ NotAfter Filetime
+ Subject CertNameBlob
+ SubjectPublicKeyInfo CertPublicKeyInfo
+ IssuerUniqueId CryptBitBlob
+ SubjectUniqueId CryptBitBlob
+ CountExtensions uint32
+ Extensions *CertExtension
+}
+
+type CertExtension struct {
+ ObjId *byte
+ Critical int32
+ Value CryptObjidBlob
+}
+
+type CryptAlgorithmIdentifier struct {
+ ObjId *byte
+ Parameters CryptObjidBlob
+}
+
+type CertPublicKeyInfo struct {
+ Algorithm CryptAlgorithmIdentifier
+ PublicKey CryptBitBlob
+}
+
+type DataBlob struct {
+ Size uint32
+ Data *byte
+}
+type CryptIntegerBlob DataBlob
+type CryptUintBlob DataBlob
+type CryptObjidBlob DataBlob
+type CertNameBlob DataBlob
+type CertRdnValueBlob DataBlob
+type CertBlob DataBlob
+type CrlBlob DataBlob
+type CryptDataBlob DataBlob
+type CryptHashBlob DataBlob
+type CryptDigestBlob DataBlob
+type CryptDerBlob DataBlob
+type CryptAttrBlob DataBlob
+
+type CryptBitBlob struct {
+ Size uint32
+ Data *byte
+ UnusedBits uint32
}
type CertContext struct {
@@ -1139,6 +1537,79 @@ type CertChainPolicyStatus struct {
ExtraPolicyStatus Pointer
}
+type CertPolicyInfo struct {
+ Identifier *byte
+ CountQualifiers uint32
+ Qualifiers *CertPolicyQualifierInfo
+}
+
+type CertPoliciesInfo struct {
+ Count uint32
+ PolicyInfos *CertPolicyInfo
+}
+
+type CertPolicyQualifierInfo struct {
+ // Not implemented
+}
+
+type CertStrongSignPara struct {
+ Size uint32
+ InfoChoice uint32
+ InfoOrSerializedInfoOrOID unsafe.Pointer
+}
+
+type CryptProtectPromptStruct struct {
+ Size uint32
+ PromptFlags uint32
+ App HWND
+ Prompt *uint16
+}
+
+type CertChainFindByIssuerPara struct {
+ Size uint32
+ UsageIdentifier *byte
+ KeySpec uint32
+ AcquirePrivateKeyFlags uint32
+ IssuerCount uint32
+ Issuer Pointer
+ FindCallback Pointer
+ FindArg Pointer
+ IssuerChainIndex *uint32
+ IssuerElementIndex *uint32
+}
+
+type WinTrustData struct {
+ Size uint32
+ PolicyCallbackData uintptr
+ SIPClientData uintptr
+ UIChoice uint32
+ RevocationChecks uint32
+ UnionChoice uint32
+ FileOrCatalogOrBlobOrSgnrOrCert unsafe.Pointer
+ StateAction uint32
+ StateData Handle
+ URLReference *uint16
+ ProvFlags uint32
+ UIContext uint32
+ SignatureSettings *WinTrustSignatureSettings
+}
+
+type WinTrustFileInfo struct {
+ Size uint32
+ FilePath *uint16
+ File Handle
+ KnownSubject *GUID
+}
+
+type WinTrustSignatureSettings struct {
+ Size uint32
+ Index uint32
+ Flags uint32
+ SecondarySigs uint32
+ VerifiedSigIndex uint32
+ CryptoPolicy *CertStrongSignPara
+}
+
const (
// do not reorder
HKEY_CLASSES_ROOT = 0x80000000 + iota
@@ -1347,7 +1818,53 @@ type reparseDataBuffer struct {
}
const (
- FSCTL_GET_REPARSE_POINT = 0x900A8
+ FSCTL_CREATE_OR_GET_OBJECT_ID = 0x0900C0
+ FSCTL_DELETE_OBJECT_ID = 0x0900A0
+ FSCTL_DELETE_REPARSE_POINT = 0x0900AC
+ FSCTL_DUPLICATE_EXTENTS_TO_FILE = 0x098344
+ FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX = 0x0983E8
+ FSCTL_FILESYSTEM_GET_STATISTICS = 0x090060
+ FSCTL_FILE_LEVEL_TRIM = 0x098208
+ FSCTL_FIND_FILES_BY_SID = 0x09008F
+ FSCTL_GET_COMPRESSION = 0x09003C
+ FSCTL_GET_INTEGRITY_INFORMATION = 0x09027C
+ FSCTL_GET_NTFS_VOLUME_DATA = 0x090064
+ FSCTL_GET_REFS_VOLUME_DATA = 0x0902D8
+ FSCTL_GET_OBJECT_ID = 0x09009C
+ FSCTL_GET_REPARSE_POINT = 0x0900A8
+ FSCTL_GET_RETRIEVAL_POINTER_COUNT = 0x09042B
+ FSCTL_GET_RETRIEVAL_POINTERS = 0x090073
+ FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = 0x0903D3
+ FSCTL_IS_PATHNAME_VALID = 0x09002C
+ FSCTL_LMR_SET_LINK_TRACKING_INFORMATION = 0x1400EC
+ FSCTL_MARK_HANDLE = 0x0900FC
+ FSCTL_OFFLOAD_READ = 0x094264
+ FSCTL_OFFLOAD_WRITE = 0x098268
+ FSCTL_PIPE_PEEK = 0x11400C
+ FSCTL_PIPE_TRANSCEIVE = 0x11C017
+ FSCTL_PIPE_WAIT = 0x110018
+ FSCTL_QUERY_ALLOCATED_RANGES = 0x0940CF
+ FSCTL_QUERY_FAT_BPB = 0x090058
+ FSCTL_QUERY_FILE_REGIONS = 0x090284
+ FSCTL_QUERY_ON_DISK_VOLUME_INFO = 0x09013C
+ FSCTL_QUERY_SPARING_INFO = 0x090138
+ FSCTL_READ_FILE_USN_DATA = 0x0900EB
+ FSCTL_RECALL_FILE = 0x090117
+ FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT = 0x090440
+ FSCTL_SET_COMPRESSION = 0x09C040
+ FSCTL_SET_DEFECT_MANAGEMENT = 0x098134
+ FSCTL_SET_ENCRYPTION = 0x0900D7
+ FSCTL_SET_INTEGRITY_INFORMATION = 0x09C280
+ FSCTL_SET_INTEGRITY_INFORMATION_EX = 0x090380
+ FSCTL_SET_OBJECT_ID = 0x090098
+ FSCTL_SET_OBJECT_ID_EXTENDED = 0x0900BC
+ FSCTL_SET_REPARSE_POINT = 0x0900A4
+ FSCTL_SET_SPARSE = 0x0900C4
+ FSCTL_SET_ZERO_DATA = 0x0980C8
+ FSCTL_SET_ZERO_ON_DEALLOCATION = 0x090194
+ FSCTL_SIS_COPYFILE = 0x090100
+ FSCTL_WRITE_USN_CLOSE_RECORD = 0x0900EF
+
MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024
IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003
IO_REPARSE_TAG_SYMLINK = 0xA000000C
@@ -1584,18 +2101,6 @@ const (
JOB_OBJECT_LIMIT_WORKINGSET = 0x00000001
)
-type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
- PerProcessUserTimeLimit int64
- PerJobUserTimeLimit int64
- LimitFlags uint32
- MinimumWorkingSetSize uintptr
- MaximumWorkingSetSize uintptr
- ActiveProcessLimit uint32
- Affinity uintptr
- PriorityClass uint32
- SchedulingClass uint32
-}
-
type IO_COUNTERS struct {
ReadOperationCount uint64
WriteOperationCount uint64
@@ -1784,3 +2289,886 @@ const (
MUI_LANGUAGE_INSTALLED = 0x20
MUI_LANGUAGE_LICENSED = 0x40
)
+
+// FILE_INFO_BY_HANDLE_CLASS constants for SetFileInformationByHandle/GetFileInformationByHandleEx
+const (
+ FileBasicInfo = 0
+ FileStandardInfo = 1
+ FileNameInfo = 2
+ FileRenameInfo = 3
+ FileDispositionInfo = 4
+ FileAllocationInfo = 5
+ FileEndOfFileInfo = 6
+ FileStreamInfo = 7
+ FileCompressionInfo = 8
+ FileAttributeTagInfo = 9
+ FileIdBothDirectoryInfo = 10
+ FileIdBothDirectoryRestartInfo = 11
+ FileIoPriorityHintInfo = 12
+ FileRemoteProtocolInfo = 13
+ FileFullDirectoryInfo = 14
+ FileFullDirectoryRestartInfo = 15
+ FileStorageInfo = 16
+ FileAlignmentInfo = 17
+ FileIdInfo = 18
+ FileIdExtdDirectoryInfo = 19
+ FileIdExtdDirectoryRestartInfo = 20
+ FileDispositionInfoEx = 21
+ FileRenameInfoEx = 22
+ FileCaseSensitiveInfo = 23
+ FileNormalizedNameInfo = 24
+)
+
+// LoadLibrary flags for determining from where to search for a DLL
+const (
+ DONT_RESOLVE_DLL_REFERENCES = 0x1
+ LOAD_LIBRARY_AS_DATAFILE = 0x2
+ LOAD_WITH_ALTERED_SEARCH_PATH = 0x8
+ LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10
+ LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20
+ LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40
+ LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80
+ LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100
+ LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200
+ LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400
+ LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800
+ LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000
+ LOAD_LIBRARY_SAFE_CURRENT_DIRS = 0x00002000
+ LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x00004000
+ LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY = 0x00008000
+)
+
+// RegNotifyChangeKeyValue notifyFilter flags.
+const (
+ // REG_NOTIFY_CHANGE_NAME notifies the caller if a subkey is added or deleted.
+ REG_NOTIFY_CHANGE_NAME = 0x00000001
+
+ // REG_NOTIFY_CHANGE_ATTRIBUTES notifies the caller of changes to the attributes of the key, such as the security descriptor information.
+ REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002
+
+ // REG_NOTIFY_CHANGE_LAST_SET notifies the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value.
+ REG_NOTIFY_CHANGE_LAST_SET = 0x00000004
+
+ // REG_NOTIFY_CHANGE_SECURITY notifies the caller of changes to the security descriptor of the key.
+ REG_NOTIFY_CHANGE_SECURITY = 0x00000008
+
+ // REG_NOTIFY_THREAD_AGNOSTIC indicates that the lifetime of the registration must not be tied to the lifetime of the thread issuing the RegNotifyChangeKeyValue call. Note: This flag value is only supported in Windows 8 and later.
+ REG_NOTIFY_THREAD_AGNOSTIC = 0x10000000
+)
+
+type CommTimeouts struct {
+ ReadIntervalTimeout uint32
+ ReadTotalTimeoutMultiplier uint32
+ ReadTotalTimeoutConstant uint32
+ WriteTotalTimeoutMultiplier uint32
+ WriteTotalTimeoutConstant uint32
+}
+
+// NTUnicodeString is a UTF-16 string for NT native APIs, corresponding to UNICODE_STRING.
+type NTUnicodeString struct {
+ Length uint16
+ MaximumLength uint16
+ Buffer *uint16
+}
+
+// NTString is an ANSI string for NT native APIs, corresponding to STRING.
+type NTString struct {
+ Length uint16
+ MaximumLength uint16
+ Buffer *byte
+}
+
+type LIST_ENTRY struct {
+ Flink *LIST_ENTRY
+ Blink *LIST_ENTRY
+}
+
+type RUNTIME_FUNCTION struct {
+ BeginAddress uint32
+ EndAddress uint32
+ UnwindData uint32
+}
+
+type LDR_DATA_TABLE_ENTRY struct {
+ reserved1 [2]uintptr
+ InMemoryOrderLinks LIST_ENTRY
+ reserved2 [2]uintptr
+ DllBase uintptr
+ reserved3 [2]uintptr
+ FullDllName NTUnicodeString
+ reserved4 [8]byte
+ reserved5 [3]uintptr
+ reserved6 uintptr
+ TimeDateStamp uint32
+}
+
+type PEB_LDR_DATA struct {
+ reserved1 [8]byte
+ reserved2 [3]uintptr
+ InMemoryOrderModuleList LIST_ENTRY
+}
+
+type CURDIR struct {
+ DosPath NTUnicodeString
+ Handle Handle
+}
+
+type RTL_DRIVE_LETTER_CURDIR struct {
+ Flags uint16
+ Length uint16
+ TimeStamp uint32
+ DosPath NTString
+}
+
+type RTL_USER_PROCESS_PARAMETERS struct {
+ MaximumLength, Length uint32
+
+ Flags, DebugFlags uint32
+
+ ConsoleHandle Handle
+ ConsoleFlags uint32
+ StandardInput, StandardOutput, StandardError Handle
+
+ CurrentDirectory CURDIR
+ DllPath NTUnicodeString
+ ImagePathName NTUnicodeString
+ CommandLine NTUnicodeString
+ Environment unsafe.Pointer
+
+ StartingX, StartingY, CountX, CountY, CountCharsX, CountCharsY, FillAttribute uint32
+
+ WindowFlags, ShowWindowFlags uint32
+ WindowTitle, DesktopInfo, ShellInfo, RuntimeData NTUnicodeString
+ CurrentDirectories [32]RTL_DRIVE_LETTER_CURDIR
+
+ EnvironmentSize, EnvironmentVersion uintptr
+
+ PackageDependencyData unsafe.Pointer
+ ProcessGroupId uint32
+ LoaderThreads uint32
+
+ RedirectionDllName NTUnicodeString
+ HeapPartitionName NTUnicodeString
+ DefaultThreadpoolCpuSetMasks uintptr
+ DefaultThreadpoolCpuSetMaskCount uint32
+}
+
+type PEB struct {
+ reserved1 [2]byte
+ BeingDebugged byte
+ BitField byte
+ reserved3 uintptr
+ ImageBaseAddress uintptr
+ Ldr *PEB_LDR_DATA
+ ProcessParameters *RTL_USER_PROCESS_PARAMETERS
+ reserved4 [3]uintptr
+ AtlThunkSListPtr uintptr
+ reserved5 uintptr
+ reserved6 uint32
+ reserved7 uintptr
+ reserved8 uint32
+ AtlThunkSListPtr32 uint32
+ reserved9 [45]uintptr
+ reserved10 [96]byte
+ PostProcessInitRoutine uintptr
+ reserved11 [128]byte
+ reserved12 [1]uintptr
+ SessionId uint32
+}
+
+type OBJECT_ATTRIBUTES struct {
+ Length uint32
+ RootDirectory Handle
+ ObjectName *NTUnicodeString
+ Attributes uint32
+ SecurityDescriptor *SECURITY_DESCRIPTOR
+ SecurityQoS *SECURITY_QUALITY_OF_SERVICE
+}
+
+// Values for the Attributes member of OBJECT_ATTRIBUTES.
+const (
+ OBJ_INHERIT = 0x00000002
+ OBJ_PERMANENT = 0x00000010
+ OBJ_EXCLUSIVE = 0x00000020
+ OBJ_CASE_INSENSITIVE = 0x00000040
+ OBJ_OPENIF = 0x00000080
+ OBJ_OPENLINK = 0x00000100
+ OBJ_KERNEL_HANDLE = 0x00000200
+ OBJ_FORCE_ACCESS_CHECK = 0x00000400
+ OBJ_IGNORE_IMPERSONATED_DEVICEMAP = 0x00000800
+ OBJ_DONT_REPARSE = 0x00001000
+ OBJ_VALID_ATTRIBUTES = 0x00001FF2
+)
+
+type IO_STATUS_BLOCK struct {
+ Status NTStatus
+ Information uintptr
+}
+
+type RTLP_CURDIR_REF struct {
+ RefCount int32
+ Handle Handle
+}
+
+type RTL_RELATIVE_NAME struct {
+ RelativeName NTUnicodeString
+ ContainingDirectory Handle
+ CurDirRef *RTLP_CURDIR_REF
+}
+
+const (
+ // CreateDisposition flags for NtCreateFile and NtCreateNamedPipeFile.
+ FILE_SUPERSEDE = 0x00000000
+ FILE_OPEN = 0x00000001
+ FILE_CREATE = 0x00000002
+ FILE_OPEN_IF = 0x00000003
+ FILE_OVERWRITE = 0x00000004
+ FILE_OVERWRITE_IF = 0x00000005
+ FILE_MAXIMUM_DISPOSITION = 0x00000005
+
+ // CreateOptions flags for NtCreateFile and NtCreateNamedPipeFile.
+ FILE_DIRECTORY_FILE = 0x00000001
+ FILE_WRITE_THROUGH = 0x00000002
+ FILE_SEQUENTIAL_ONLY = 0x00000004
+ FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008
+ FILE_SYNCHRONOUS_IO_ALERT = 0x00000010
+ FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
+ FILE_NON_DIRECTORY_FILE = 0x00000040
+ FILE_CREATE_TREE_CONNECTION = 0x00000080
+ FILE_COMPLETE_IF_OPLOCKED = 0x00000100
+ FILE_NO_EA_KNOWLEDGE = 0x00000200
+ FILE_OPEN_REMOTE_INSTANCE = 0x00000400
+ FILE_RANDOM_ACCESS = 0x00000800
+ FILE_DELETE_ON_CLOSE = 0x00001000
+ FILE_OPEN_BY_FILE_ID = 0x00002000
+ FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000
+ FILE_NO_COMPRESSION = 0x00008000
+ FILE_OPEN_REQUIRING_OPLOCK = 0x00010000
+ FILE_DISALLOW_EXCLUSIVE = 0x00020000
+ FILE_RESERVE_OPFILTER = 0x00100000
+ FILE_OPEN_REPARSE_POINT = 0x00200000
+ FILE_OPEN_NO_RECALL = 0x00400000
+ FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000
+
+ // Parameter constants for NtCreateNamedPipeFile.
+
+ FILE_PIPE_BYTE_STREAM_TYPE = 0x00000000
+ FILE_PIPE_MESSAGE_TYPE = 0x00000001
+
+ FILE_PIPE_ACCEPT_REMOTE_CLIENTS = 0x00000000
+ FILE_PIPE_REJECT_REMOTE_CLIENTS = 0x00000002
+
+ FILE_PIPE_TYPE_VALID_MASK = 0x00000003
+
+ FILE_PIPE_BYTE_STREAM_MODE = 0x00000000
+ FILE_PIPE_MESSAGE_MODE = 0x00000001
+
+ FILE_PIPE_QUEUE_OPERATION = 0x00000000
+ FILE_PIPE_COMPLETE_OPERATION = 0x00000001
+
+ FILE_PIPE_INBOUND = 0x00000000
+ FILE_PIPE_OUTBOUND = 0x00000001
+ FILE_PIPE_FULL_DUPLEX = 0x00000002
+
+ FILE_PIPE_DISCONNECTED_STATE = 0x00000001
+ FILE_PIPE_LISTENING_STATE = 0x00000002
+ FILE_PIPE_CONNECTED_STATE = 0x00000003
+ FILE_PIPE_CLOSING_STATE = 0x00000004
+
+ FILE_PIPE_CLIENT_END = 0x00000000
+ FILE_PIPE_SERVER_END = 0x00000001
+)
+
+const (
+ // FileInformationClass for NtSetInformationFile
+ FileBasicInformation = 4
+ FileRenameInformation = 10
+ FileDispositionInformation = 13
+ FilePositionInformation = 14
+ FileEndOfFileInformation = 20
+ FileValidDataLengthInformation = 39
+ FileShortNameInformation = 40
+ FileIoPriorityHintInformation = 43
+ FileReplaceCompletionInformation = 61
+ FileDispositionInformationEx = 64
+ FileCaseSensitiveInformation = 71
+ FileLinkInformation = 72
+ FileCaseSensitiveInformationForceAccessCheck = 75
+ FileKnownFolderInformation = 76
+
+ // Flags for FILE_RENAME_INFORMATION
+ FILE_RENAME_REPLACE_IF_EXISTS = 0x00000001
+ FILE_RENAME_POSIX_SEMANTICS = 0x00000002
+ FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE = 0x00000004
+ FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+ FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
+ FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
+ FILE_RENAME_PRESERVE_AVAILABLE_SPACE = 0x00000030
+ FILE_RENAME_IGNORE_READONLY_ATTRIBUTE = 0x00000040
+ FILE_RENAME_FORCE_RESIZE_TARGET_SR = 0x00000080
+ FILE_RENAME_FORCE_RESIZE_SOURCE_SR = 0x00000100
+ FILE_RENAME_FORCE_RESIZE_SR = 0x00000180
+
+ // Flags for FILE_DISPOSITION_INFORMATION_EX
+ FILE_DISPOSITION_DO_NOT_DELETE = 0x00000000
+ FILE_DISPOSITION_DELETE = 0x00000001
+ FILE_DISPOSITION_POSIX_SEMANTICS = 0x00000002
+ FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004
+ FILE_DISPOSITION_ON_CLOSE = 0x00000008
+ FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010
+
+ // Flags for FILE_CASE_SENSITIVE_INFORMATION
+ FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001
+
+ // Flags for FILE_LINK_INFORMATION
+ FILE_LINK_REPLACE_IF_EXISTS = 0x00000001
+ FILE_LINK_POSIX_SEMANTICS = 0x00000002
+ FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+ FILE_LINK_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
+ FILE_LINK_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
+ FILE_LINK_PRESERVE_AVAILABLE_SPACE = 0x00000030
+ FILE_LINK_IGNORE_READONLY_ATTRIBUTE = 0x00000040
+ FILE_LINK_FORCE_RESIZE_TARGET_SR = 0x00000080
+ FILE_LINK_FORCE_RESIZE_SOURCE_SR = 0x00000100
+ FILE_LINK_FORCE_RESIZE_SR = 0x00000180
+)
+
+// ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.
+const (
+ ProcessBasicInformation = iota
+ ProcessQuotaLimits
+ ProcessIoCounters
+ ProcessVmCounters
+ ProcessTimes
+ ProcessBasePriority
+ ProcessRaisePriority
+ ProcessDebugPort
+ ProcessExceptionPort
+ ProcessAccessToken
+ ProcessLdtInformation
+ ProcessLdtSize
+ ProcessDefaultHardErrorMode
+ ProcessIoPortHandlers
+ ProcessPooledUsageAndLimits
+ ProcessWorkingSetWatch
+ ProcessUserModeIOPL
+ ProcessEnableAlignmentFaultFixup
+ ProcessPriorityClass
+ ProcessWx86Information
+ ProcessHandleCount
+ ProcessAffinityMask
+ ProcessPriorityBoost
+ ProcessDeviceMap
+ ProcessSessionInformation
+ ProcessForegroundInformation
+ ProcessWow64Information
+ ProcessImageFileName
+ ProcessLUIDDeviceMapsEnabled
+ ProcessBreakOnTermination
+ ProcessDebugObjectHandle
+ ProcessDebugFlags
+ ProcessHandleTracing
+ ProcessIoPriority
+ ProcessExecuteFlags
+ ProcessTlsInformation
+ ProcessCookie
+ ProcessImageInformation
+ ProcessCycleTime
+ ProcessPagePriority
+ ProcessInstrumentationCallback
+ ProcessThreadStackAllocation
+ ProcessWorkingSetWatchEx
+ ProcessImageFileNameWin32
+ ProcessImageFileMapping
+ ProcessAffinityUpdateMode
+ ProcessMemoryAllocationMode
+ ProcessGroupInformation
+ ProcessTokenVirtualizationEnabled
+ ProcessConsoleHostProcess
+ ProcessWindowInformation
+ ProcessHandleInformation
+ ProcessMitigationPolicy
+ ProcessDynamicFunctionTableInformation
+ ProcessHandleCheckingMode
+ ProcessKeepAliveCount
+ ProcessRevokeFileHandles
+ ProcessWorkingSetControl
+ ProcessHandleTable
+ ProcessCheckStackExtentsMode
+ ProcessCommandLineInformation
+ ProcessProtectionInformation
+ ProcessMemoryExhaustion
+ ProcessFaultInformation
+ ProcessTelemetryIdInformation
+ ProcessCommitReleaseInformation
+ ProcessDefaultCpuSetsInformation
+ ProcessAllowedCpuSetsInformation
+ ProcessSubsystemProcess
+ ProcessJobMemoryInformation
+ ProcessInPrivate
+ ProcessRaiseUMExceptionOnInvalidHandleClose
+ ProcessIumChallengeResponse
+ ProcessChildProcessInformation
+ ProcessHighGraphicsPriorityInformation
+ ProcessSubsystemInformation
+ ProcessEnergyValues
+ ProcessActivityThrottleState
+ ProcessActivityThrottlePolicy
+ ProcessWin32kSyscallFilterInformation
+ ProcessDisableSystemAllowedCpuSets
+ ProcessWakeInformation
+ ProcessEnergyTrackingState
+ ProcessManageWritesToExecutableMemory
+ ProcessCaptureTrustletLiveDump
+ ProcessTelemetryCoverage
+ ProcessEnclaveInformation
+ ProcessEnableReadWriteVmLogging
+ ProcessUptimeInformation
+ ProcessImageSection
+ ProcessDebugAuthInformation
+ ProcessSystemResourceManagement
+ ProcessSequenceNumber
+ ProcessLoaderDetour
+ ProcessSecurityDomainInformation
+ ProcessCombineSecurityDomainsInformation
+ ProcessEnableLogging
+ ProcessLeapSecondInformation
+ ProcessFiberShadowStackAllocation
+ ProcessFreeFiberShadowStackAllocation
+ ProcessAltSystemCallInformation
+ ProcessDynamicEHContinuationTargets
+ ProcessDynamicEnforcedCetCompatibleRanges
+)
+
+type PROCESS_BASIC_INFORMATION struct {
+ ExitStatus NTStatus
+ PebBaseAddress *PEB
+ AffinityMask uintptr
+ BasePriority int32
+ UniqueProcessId uintptr
+ InheritedFromUniqueProcessId uintptr
+}
+
+type SYSTEM_PROCESS_INFORMATION struct {
+ NextEntryOffset uint32
+ NumberOfThreads uint32
+ WorkingSetPrivateSize int64
+ HardFaultCount uint32
+ NumberOfThreadsHighWatermark uint32
+ CycleTime uint64
+ CreateTime int64
+ UserTime int64
+ KernelTime int64
+ ImageName NTUnicodeString
+ BasePriority int32
+ UniqueProcessID uintptr
+ InheritedFromUniqueProcessID uintptr
+ HandleCount uint32
+ SessionID uint32
+ UniqueProcessKey *uint32
+ PeakVirtualSize uintptr
+ VirtualSize uintptr
+ PageFaultCount uint32
+ PeakWorkingSetSize uintptr
+ WorkingSetSize uintptr
+ QuotaPeakPagedPoolUsage uintptr
+ QuotaPagedPoolUsage uintptr
+ QuotaPeakNonPagedPoolUsage uintptr
+ QuotaNonPagedPoolUsage uintptr
+ PagefileUsage uintptr
+ PeakPagefileUsage uintptr
+ PrivatePageCount uintptr
+ ReadOperationCount int64
+ WriteOperationCount int64
+ OtherOperationCount int64
+ ReadTransferCount int64
+ WriteTransferCount int64
+ OtherTransferCount int64
+}
+
+// SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation
+const (
+ SystemBasicInformation = iota
+ SystemProcessorInformation
+ SystemPerformanceInformation
+ SystemTimeOfDayInformation
+ SystemPathInformation
+ SystemProcessInformation
+ SystemCallCountInformation
+ SystemDeviceInformation
+ SystemProcessorPerformanceInformation
+ SystemFlagsInformation
+ SystemCallTimeInformation
+ SystemModuleInformation
+ SystemLocksInformation
+ SystemStackTraceInformation
+ SystemPagedPoolInformation
+ SystemNonPagedPoolInformation
+ SystemHandleInformation
+ SystemObjectInformation
+ SystemPageFileInformation
+ SystemVdmInstemulInformation
+ SystemVdmBopInformation
+ SystemFileCacheInformation
+ SystemPoolTagInformation
+ SystemInterruptInformation
+ SystemDpcBehaviorInformation
+ SystemFullMemoryInformation
+ SystemLoadGdiDriverInformation
+ SystemUnloadGdiDriverInformation
+ SystemTimeAdjustmentInformation
+ SystemSummaryMemoryInformation
+ SystemMirrorMemoryInformation
+ SystemPerformanceTraceInformation
+ systemObsolete0
+ SystemExceptionInformation
+ SystemCrashDumpStateInformation
+ SystemKernelDebuggerInformation
+ SystemContextSwitchInformation
+ SystemRegistryQuotaInformation
+ SystemExtendServiceTableInformation
+ SystemPrioritySeperation
+ SystemVerifierAddDriverInformation
+ SystemVerifierRemoveDriverInformation
+ SystemProcessorIdleInformation
+ SystemLegacyDriverInformation
+ SystemCurrentTimeZoneInformation
+ SystemLookasideInformation
+ SystemTimeSlipNotification
+ SystemSessionCreate
+ SystemSessionDetach
+ SystemSessionInformation
+ SystemRangeStartInformation
+ SystemVerifierInformation
+ SystemVerifierThunkExtend
+ SystemSessionProcessInformation
+ SystemLoadGdiDriverInSystemSpace
+ SystemNumaProcessorMap
+ SystemPrefetcherInformation
+ SystemExtendedProcessInformation
+ SystemRecommendedSharedDataAlignment
+ SystemComPlusPackage
+ SystemNumaAvailableMemory
+ SystemProcessorPowerInformation
+ SystemEmulationBasicInformation
+ SystemEmulationProcessorInformation
+ SystemExtendedHandleInformation
+ SystemLostDelayedWriteInformation
+ SystemBigPoolInformation
+ SystemSessionPoolTagInformation
+ SystemSessionMappedViewInformation
+ SystemHotpatchInformation
+ SystemObjectSecurityMode
+ SystemWatchdogTimerHandler
+ SystemWatchdogTimerInformation
+ SystemLogicalProcessorInformation
+ SystemWow64SharedInformationObsolete
+ SystemRegisterFirmwareTableInformationHandler
+ SystemFirmwareTableInformation
+ SystemModuleInformationEx
+ SystemVerifierTriageInformation
+ SystemSuperfetchInformation
+ SystemMemoryListInformation
+ SystemFileCacheInformationEx
+ SystemThreadPriorityClientIdInformation
+ SystemProcessorIdleCycleTimeInformation
+ SystemVerifierCancellationInformation
+ SystemProcessorPowerInformationEx
+ SystemRefTraceInformation
+ SystemSpecialPoolInformation
+ SystemProcessIdInformation
+ SystemErrorPortInformation
+ SystemBootEnvironmentInformation
+ SystemHypervisorInformation
+ SystemVerifierInformationEx
+ SystemTimeZoneInformation
+ SystemImageFileExecutionOptionsInformation
+ SystemCoverageInformation
+ SystemPrefetchPatchInformation
+ SystemVerifierFaultsInformation
+ SystemSystemPartitionInformation
+ SystemSystemDiskInformation
+ SystemProcessorPerformanceDistribution
+ SystemNumaProximityNodeInformation
+ SystemDynamicTimeZoneInformation
+ SystemCodeIntegrityInformation
+ SystemProcessorMicrocodeUpdateInformation
+ SystemProcessorBrandString
+ SystemVirtualAddressInformation
+ SystemLogicalProcessorAndGroupInformation
+ SystemProcessorCycleTimeInformation
+ SystemStoreInformation
+ SystemRegistryAppendString
+ SystemAitSamplingValue
+ SystemVhdBootInformation
+ SystemCpuQuotaInformation
+ SystemNativeBasicInformation
+ systemSpare1
+ SystemLowPriorityIoInformation
+ SystemTpmBootEntropyInformation
+ SystemVerifierCountersInformation
+ SystemPagedPoolInformationEx
+ SystemSystemPtesInformationEx
+ SystemNodeDistanceInformation
+ SystemAcpiAuditInformation
+ SystemBasicPerformanceInformation
+ SystemQueryPerformanceCounterInformation
+ SystemSessionBigPoolInformation
+ SystemBootGraphicsInformation
+ SystemScrubPhysicalMemoryInformation
+ SystemBadPageInformation
+ SystemProcessorProfileControlArea
+ SystemCombinePhysicalMemoryInformation
+ SystemEntropyInterruptTimingCallback
+ SystemConsoleInformation
+ SystemPlatformBinaryInformation
+ SystemThrottleNotificationInformation
+ SystemHypervisorProcessorCountInformation
+ SystemDeviceDataInformation
+ SystemDeviceDataEnumerationInformation
+ SystemMemoryTopologyInformation
+ SystemMemoryChannelInformation
+ SystemBootLogoInformation
+ SystemProcessorPerformanceInformationEx
+ systemSpare0
+ SystemSecureBootPolicyInformation
+ SystemPageFileInformationEx
+ SystemSecureBootInformation
+ SystemEntropyInterruptTimingRawInformation
+ SystemPortableWorkspaceEfiLauncherInformation
+ SystemFullProcessInformation
+ SystemKernelDebuggerInformationEx
+ SystemBootMetadataInformation
+ SystemSoftRebootInformation
+ SystemElamCertificateInformation
+ SystemOfflineDumpConfigInformation
+ SystemProcessorFeaturesInformation
+ SystemRegistryReconciliationInformation
+ SystemEdidInformation
+ SystemManufacturingInformation
+ SystemEnergyEstimationConfigInformation
+ SystemHypervisorDetailInformation
+ SystemProcessorCycleStatsInformation
+ SystemVmGenerationCountInformation
+ SystemTrustedPlatformModuleInformation
+ SystemKernelDebuggerFlags
+ SystemCodeIntegrityPolicyInformation
+ SystemIsolatedUserModeInformation
+ SystemHardwareSecurityTestInterfaceResultsInformation
+ SystemSingleModuleInformation
+ SystemAllowedCpuSetsInformation
+ SystemDmaProtectionInformation
+ SystemInterruptCpuSetsInformation
+ SystemSecureBootPolicyFullInformation
+ SystemCodeIntegrityPolicyFullInformation
+ SystemAffinitizedInterruptProcessorInformation
+ SystemRootSiloInformation
+)
+
+type RTL_PROCESS_MODULE_INFORMATION struct {
+ Section Handle
+ MappedBase uintptr
+ ImageBase uintptr
+ ImageSize uint32
+ Flags uint32
+ LoadOrderIndex uint16
+ InitOrderIndex uint16
+ LoadCount uint16
+ OffsetToFileName uint16
+ FullPathName [256]byte
+}
+
+type RTL_PROCESS_MODULES struct {
+ NumberOfModules uint32
+ Modules [1]RTL_PROCESS_MODULE_INFORMATION
+}
+
+// Constants for LocalAlloc flags.
+const (
+ LMEM_FIXED = 0x0
+ LMEM_MOVEABLE = 0x2
+ LMEM_NOCOMPACT = 0x10
+ LMEM_NODISCARD = 0x20
+ LMEM_ZEROINIT = 0x40
+ LMEM_MODIFY = 0x80
+ LMEM_DISCARDABLE = 0xf00
+ LMEM_VALID_FLAGS = 0xf72
+ LMEM_INVALID_HANDLE = 0x8000
+ LHND = LMEM_MOVEABLE | LMEM_ZEROINIT
+ LPTR = LMEM_FIXED | LMEM_ZEROINIT
+ NONZEROLHND = LMEM_MOVEABLE
+ NONZEROLPTR = LMEM_FIXED
+)
+
+// Constants for the CreateNamedPipe-family of functions.
+const (
+ PIPE_ACCESS_INBOUND = 0x1
+ PIPE_ACCESS_OUTBOUND = 0x2
+ PIPE_ACCESS_DUPLEX = 0x3
+
+ PIPE_CLIENT_END = 0x0
+ PIPE_SERVER_END = 0x1
+
+ PIPE_WAIT = 0x0
+ PIPE_NOWAIT = 0x1
+ PIPE_READMODE_BYTE = 0x0
+ PIPE_READMODE_MESSAGE = 0x2
+ PIPE_TYPE_BYTE = 0x0
+ PIPE_TYPE_MESSAGE = 0x4
+ PIPE_ACCEPT_REMOTE_CLIENTS = 0x0
+ PIPE_REJECT_REMOTE_CLIENTS = 0x8
+
+ PIPE_UNLIMITED_INSTANCES = 255
+)
+
+// Constants for security attributes when opening named pipes.
+const (
+ SECURITY_ANONYMOUS = SecurityAnonymous << 16
+ SECURITY_IDENTIFICATION = SecurityIdentification << 16
+ SECURITY_IMPERSONATION = SecurityImpersonation << 16
+ SECURITY_DELEGATION = SecurityDelegation << 16
+
+ SECURITY_CONTEXT_TRACKING = 0x40000
+ SECURITY_EFFECTIVE_ONLY = 0x80000
+
+ SECURITY_SQOS_PRESENT = 0x100000
+ SECURITY_VALID_SQOS_FLAGS = 0x1f0000
+)
+
+// ResourceID represents a 16-bit resource identifier, traditionally created with the MAKEINTRESOURCE macro.
+type ResourceID uint16
+
+// ResourceIDOrString must be either a ResourceID, to specify a resource or resource type by ID,
+// or a string, to specify a resource or resource type by name.
+type ResourceIDOrString interface{}
+
+// Predefined resource names and types.
+var (
+ // Predefined names.
+ CREATEPROCESS_MANIFEST_RESOURCE_ID ResourceID = 1
+ ISOLATIONAWARE_MANIFEST_RESOURCE_ID ResourceID = 2
+ ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID ResourceID = 3
+ ISOLATIONPOLICY_MANIFEST_RESOURCE_ID ResourceID = 4
+ ISOLATIONPOLICY_BROWSER_MANIFEST_RESOURCE_ID ResourceID = 5
+ MINIMUM_RESERVED_MANIFEST_RESOURCE_ID ResourceID = 1 // inclusive
+ MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID ResourceID = 16 // inclusive
+
+ // Predefined types.
+ RT_CURSOR ResourceID = 1
+ RT_BITMAP ResourceID = 2
+ RT_ICON ResourceID = 3
+ RT_MENU ResourceID = 4
+ RT_DIALOG ResourceID = 5
+ RT_STRING ResourceID = 6
+ RT_FONTDIR ResourceID = 7
+ RT_FONT ResourceID = 8
+ RT_ACCELERATOR ResourceID = 9
+ RT_RCDATA ResourceID = 10
+ RT_MESSAGETABLE ResourceID = 11
+ RT_GROUP_CURSOR ResourceID = 12
+ RT_GROUP_ICON ResourceID = 14
+ RT_VERSION ResourceID = 16
+ RT_DLGINCLUDE ResourceID = 17
+ RT_PLUGPLAY ResourceID = 19
+ RT_VXD ResourceID = 20
+ RT_ANICURSOR ResourceID = 21
+ RT_ANIICON ResourceID = 22
+ RT_HTML ResourceID = 23
+ RT_MANIFEST ResourceID = 24
+)
+
+type VS_FIXEDFILEINFO struct {
+ Signature uint32
+ StrucVersion uint32
+ FileVersionMS uint32
+ FileVersionLS uint32
+ ProductVersionMS uint32
+ ProductVersionLS uint32
+ FileFlagsMask uint32
+ FileFlags uint32
+ FileOS uint32
+ FileType uint32
+ FileSubtype uint32
+ FileDateMS uint32
+ FileDateLS uint32
+}
+
+type COAUTHIDENTITY struct {
+ User *uint16
+ UserLength uint32
+ Domain *uint16
+ DomainLength uint32
+ Password *uint16
+ PasswordLength uint32
+ Flags uint32
+}
+
+type COAUTHINFO struct {
+ AuthnSvc uint32
+ AuthzSvc uint32
+ ServerPrincName *uint16
+ AuthnLevel uint32
+ ImpersonationLevel uint32
+ AuthIdentityData *COAUTHIDENTITY
+ Capabilities uint32
+}
+
+type COSERVERINFO struct {
+ Reserved1 uint32
+ Aame *uint16
+ AuthInfo *COAUTHINFO
+ Reserved2 uint32
+}
+
+type BIND_OPTS3 struct {
+ CbStruct uint32
+ Flags uint32
+ Mode uint32
+ TickCountDeadline uint32
+ TrackFlags uint32
+ ClassContext uint32
+ Locale uint32
+ ServerInfo *COSERVERINFO
+ Hwnd HWND
+}
+
+const (
+ CLSCTX_INPROC_SERVER = 0x1
+ CLSCTX_INPROC_HANDLER = 0x2
+ CLSCTX_LOCAL_SERVER = 0x4
+ CLSCTX_INPROC_SERVER16 = 0x8
+ CLSCTX_REMOTE_SERVER = 0x10
+ CLSCTX_INPROC_HANDLER16 = 0x20
+ CLSCTX_RESERVED1 = 0x40
+ CLSCTX_RESERVED2 = 0x80
+ CLSCTX_RESERVED3 = 0x100
+ CLSCTX_RESERVED4 = 0x200
+ CLSCTX_NO_CODE_DOWNLOAD = 0x400
+ CLSCTX_RESERVED5 = 0x800
+ CLSCTX_NO_CUSTOM_MARSHAL = 0x1000
+ CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000
+ CLSCTX_NO_FAILURE_LOG = 0x4000
+ CLSCTX_DISABLE_AAA = 0x8000
+ CLSCTX_ENABLE_AAA = 0x10000
+ CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000
+ CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000
+ CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000
+ CLSCTX_ENABLE_CLOAKING = 0x100000
+ CLSCTX_APPCONTAINER = 0x400000
+ CLSCTX_ACTIVATE_AAA_AS_IU = 0x800000
+ CLSCTX_PS_DLL = 0x80000000
+
+ COINIT_MULTITHREADED = 0x0
+ COINIT_APARTMENTTHREADED = 0x2
+ COINIT_DISABLE_OLE1DDE = 0x4
+ COINIT_SPEED_OVER_MEMORY = 0x8
+)
+
+// Flag for QueryFullProcessImageName.
+const PROCESS_NAME_NATIVE = 1
+
+type ModuleInfo struct {
+ BaseOfDll uintptr
+ SizeOfImage uint32
+ EntryPoint uintptr
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_386.go b/vendor/golang.org/x/sys/windows/types_windows_386.go
index fe0ddd0..8bce3e2 100644
--- a/vendor/golang.org/x/sys/windows/types_windows_386.go
+++ b/vendor/golang.org/x/sys/windows/types_windows_386.go
@@ -20,3 +20,16 @@ type Servent struct {
Port uint16
Proto *byte
}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+ _ uint32 // pad to 8 byte boundary
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_amd64.go b/vendor/golang.org/x/sys/windows/types_windows_amd64.go
index 7e154c2..fdddc0c 100644
--- a/vendor/golang.org/x/sys/windows/types_windows_amd64.go
+++ b/vendor/golang.org/x/sys/windows/types_windows_amd64.go
@@ -20,3 +20,15 @@ type Servent struct {
Proto *byte
Port uint16
}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_arm.go b/vendor/golang.org/x/sys/windows/types_windows_arm.go
index 74571e3..321872c 100644
--- a/vendor/golang.org/x/sys/windows/types_windows_arm.go
+++ b/vendor/golang.org/x/sys/windows/types_windows_arm.go
@@ -20,3 +20,16 @@ type Servent struct {
Port uint16
Proto *byte
}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+ _ uint32 // pad to 8 byte boundary
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_arm64.go b/vendor/golang.org/x/sys/windows/types_windows_arm64.go
new file mode 100644
index 0000000..fdddc0c
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/types_windows_arm64.go
@@ -0,0 +1,34 @@
+// Copyright 2011 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 windows
+
+type WSAData struct {
+ Version uint16
+ HighVersion uint16
+ MaxSockets uint16
+ MaxUdpDg uint16
+ VendorInfo *byte
+ Description [WSADESCRIPTION_LEN + 1]byte
+ SystemStatus [WSASYS_STATUS_LEN + 1]byte
+}
+
+type Servent struct {
+ Name *byte
+ Aliases **byte
+ Proto *byte
+ Port uint16
+}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+}
diff --git a/vendor/golang.org/x/sys/windows/zerrors_windows.go b/vendor/golang.org/x/sys/windows/zerrors_windows.go
index f021200..0cf658f 100644
--- a/vendor/golang.org/x/sys/windows/zerrors_windows.go
+++ b/vendor/golang.org/x/sys/windows/zerrors_windows.go
@@ -146,6 +146,7 @@ const (
FACILITY_WEP = 2049
FACILITY_SYNCENGINE = 2050
FACILITY_XBOX = 2339
+ FACILITY_GAME = 2340
FACILITY_PIX = 2748
ERROR_SUCCESS syscall.Errno = 0
NO_ERROR = 0
@@ -469,9 +470,18 @@ const (
ERROR_STORAGE_RESERVE_NOT_EMPTY syscall.Errno = 419
ERROR_NOT_A_DAX_VOLUME syscall.Errno = 420
ERROR_NOT_DAX_MAPPABLE syscall.Errno = 421
- ERROR_TIME_CRITICAL_THREAD syscall.Errno = 422
+ ERROR_TIME_SENSITIVE_THREAD syscall.Errno = 422
ERROR_DPL_NOT_SUPPORTED_FOR_USER syscall.Errno = 423
ERROR_CASE_DIFFERING_NAMES_IN_DIR syscall.Errno = 424
+ ERROR_FILE_NOT_SUPPORTED syscall.Errno = 425
+ ERROR_CLOUD_FILE_REQUEST_TIMEOUT syscall.Errno = 426
+ ERROR_NO_TASK_QUEUE syscall.Errno = 427
+ ERROR_SRC_SRV_DLL_LOAD_FAILED syscall.Errno = 428
+ ERROR_NOT_SUPPORTED_WITH_BTT syscall.Errno = 429
+ ERROR_ENCRYPTION_DISABLED syscall.Errno = 430
+ ERROR_ENCRYPTING_METADATA_DISALLOWED syscall.Errno = 431
+ ERROR_CANT_CLEAR_ENCRYPTION_FLAG syscall.Errno = 432
+ ERROR_NO_SUCH_DEVICE syscall.Errno = 433
ERROR_CAPAUTHZ_NOT_DEVUNLOCKED syscall.Errno = 450
ERROR_CAPAUTHZ_CHANGE_TYPE syscall.Errno = 451
ERROR_CAPAUTHZ_NOT_PROVISIONED syscall.Errno = 452
@@ -1593,6 +1603,8 @@ const (
ERROR_SYSTEM_INTEGRITY_POLICY_VIOLATION syscall.Errno = 4551
ERROR_SYSTEM_INTEGRITY_INVALID_POLICY syscall.Errno = 4552
ERROR_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED syscall.Errno = 4553
+ ERROR_SYSTEM_INTEGRITY_TOO_MANY_POLICIES syscall.Errno = 4554
+ ERROR_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED syscall.Errno = 4555
ERROR_VSM_NOT_INITIALIZED syscall.Errno = 4560
ERROR_VSM_DMA_PROTECTION_NOT_IN_USE syscall.Errno = 4561
ERROR_PLATFORM_MANIFEST_NOT_AUTHORIZED syscall.Errno = 4570
@@ -1824,6 +1836,7 @@ const (
ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE syscall.Errno = 6020
ERROR_CS_ENCRYPTION_FILE_NOT_CSE syscall.Errno = 6021
ERROR_ENCRYPTION_POLICY_DENIES_OPERATION syscall.Errno = 6022
+ ERROR_WIP_ENCRYPTION_FAILED syscall.Errno = 6023
ERROR_NO_BROWSER_SERVERS_FOUND syscall.Errno = 6118
SCHED_E_SERVICE_NOT_LOCALSYSTEM syscall.Errno = 6200
ERROR_LOG_SECTOR_INVALID syscall.Errno = 6600
@@ -3000,6 +3013,7 @@ const (
ERROR_SMI_PRIMITIVE_INSTALLER_FAILED syscall.Errno = 14108
ERROR_GENERIC_COMMAND_FAILED syscall.Errno = 14109
ERROR_SXS_FILE_HASH_MISSING syscall.Errno = 14110
+ ERROR_SXS_DUPLICATE_ACTIVATABLE_CLASS syscall.Errno = 14111
ERROR_EVT_INVALID_CHANNEL_PATH syscall.Errno = 15000
ERROR_EVT_INVALID_QUERY syscall.Errno = 15001
ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND syscall.Errno = 15002
@@ -3093,6 +3107,7 @@ const (
ERROR_PRI_MERGE_RESOURCE_PACKAGE_REQUIRED syscall.Errno = 15157
ERROR_PRI_MERGE_INVALID_FILE_NAME syscall.Errno = 15158
ERROR_MRM_PACKAGE_NOT_FOUND syscall.Errno = 15159
+ ERROR_MRM_MISSING_DEFAULT_LANGUAGE syscall.Errno = 15160
ERROR_MCA_INVALID_CAPABILITIES_STRING syscall.Errno = 15200
ERROR_MCA_INVALID_VCP_VERSION syscall.Errno = 15201
ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION syscall.Errno = 15202
@@ -3167,6 +3182,15 @@ const (
ERROR_DEPLOYMENT_OPTION_NOT_SUPPORTED syscall.Errno = 15645
ERROR_APPINSTALLER_ACTIVATION_BLOCKED syscall.Errno = 15646
ERROR_REGISTRATION_FROM_REMOTE_DRIVE_NOT_SUPPORTED syscall.Errno = 15647
+ ERROR_APPX_RAW_DATA_WRITE_FAILED syscall.Errno = 15648
+ ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_PACKAGE syscall.Errno = 15649
+ ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_MACHINE syscall.Errno = 15650
+ ERROR_DEPLOYMENT_BLOCKED_BY_PROFILE_POLICY syscall.Errno = 15651
+ ERROR_DEPLOYMENT_FAILED_CONFLICTING_MUTABLE_PACKAGE_DIRECTORY syscall.Errno = 15652
+ ERROR_SINGLETON_RESOURCE_INSTALLED_IN_ACTIVE_USER syscall.Errno = 15653
+ ERROR_DIFFERENT_VERSION_OF_PACKAGED_SERVICE_INSTALLED syscall.Errno = 15654
+ ERROR_SERVICE_EXISTS_AS_NON_PACKAGED_SERVICE syscall.Errno = 15655
+ ERROR_PACKAGED_SERVICE_REQUIRES_ADMIN_PRIVILEGES syscall.Errno = 15656
APPMODEL_ERROR_NO_PACKAGE syscall.Errno = 15700
APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT syscall.Errno = 15701
APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT syscall.Errno = 15702
@@ -3174,6 +3198,7 @@ const (
APPMODEL_ERROR_DYNAMIC_PROPERTY_READ_FAILED syscall.Errno = 15704
APPMODEL_ERROR_DYNAMIC_PROPERTY_INVALID syscall.Errno = 15705
APPMODEL_ERROR_PACKAGE_NOT_AVAILABLE syscall.Errno = 15706
+ APPMODEL_ERROR_NO_MUTABLE_DIRECTORY syscall.Errno = 15707
ERROR_STATE_LOAD_STORE_FAILED syscall.Errno = 15800
ERROR_STATE_GET_VERSION_FAILED syscall.Errno = 15801
ERROR_STATE_SET_VERSION_FAILED syscall.Errno = 15802
@@ -3204,7 +3229,8 @@ const (
E_NOT_SET = ERROR_NOT_FOUND
E_NOT_VALID_STATE = ERROR_INVALID_STATE
E_NOT_SUFFICIENT_BUFFER = ERROR_INSUFFICIENT_BUFFER
- E_TIME_CRITICAL_THREAD = ERROR_TIME_CRITICAL_THREAD
+ E_TIME_SENSITIVE_THREAD = ERROR_TIME_SENSITIVE_THREAD
+ E_NO_TASK_QUEUE = ERROR_NO_TASK_QUEUE
NOERROR syscall.Errno = 0
E_UNEXPECTED Handle = 0x8000FFFF
E_NOTIMPL Handle = 0x80004001
@@ -3966,6 +3992,7 @@ const (
SEC_I_COMPLETE_NEEDED Handle = 0x00090313
SEC_I_COMPLETE_AND_CONTINUE Handle = 0x00090314
SEC_I_LOCAL_LOGON Handle = 0x00090315
+ SEC_I_GENERIC_EXTENSION_RECEIVED Handle = 0x00090316
SEC_E_BAD_PKGID Handle = 0x80090316
SEC_E_CONTEXT_EXPIRED Handle = 0x80090317
SEC_I_CONTEXT_EXPIRED Handle = 0x00090317
@@ -4033,6 +4060,8 @@ const (
SEC_E_APPLICATION_PROTOCOL_MISMATCH Handle = 0x80090367
SEC_I_ASYNC_CALL_PENDING Handle = 0x00090368
SEC_E_INVALID_UPN_NAME Handle = 0x80090369
+ SEC_E_EXT_BUFFER_TOO_SMALL Handle = 0x8009036A
+ SEC_E_INSUFFICIENT_BUFFERS Handle = 0x8009036B
SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR
SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION
CRYPT_E_MSG_ERROR Handle = 0x80091001
@@ -4637,6 +4666,8 @@ const (
ERROR_GRAPHICS_PRESENT_INVALID_WINDOW Handle = 0xC026200F
ERROR_GRAPHICS_PRESENT_BUFFER_NOT_BOUND Handle = 0xC0262010
ERROR_GRAPHICS_VAIL_STATE_CHANGED Handle = 0xC0262011
+ ERROR_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN Handle = 0xC0262012
+ ERROR_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED Handle = 0xC0262013
ERROR_GRAPHICS_NO_VIDEO_MEMORY Handle = 0xC0262100
ERROR_GRAPHICS_CANT_LOCK_MEMORY Handle = 0xC0262101
ERROR_GRAPHICS_ALLOCATION_BUSY Handle = 0xC0262102
@@ -5393,6 +5424,13 @@ const (
FVE_E_NOT_DE_VOLUME Handle = 0x803100D7
FVE_E_PROTECTION_CANNOT_BE_DISABLED Handle = 0x803100D8
FVE_E_OSV_KSR_NOT_ALLOWED Handle = 0x803100D9
+ FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_OS_DRIVE Handle = 0x803100DA
+ FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_FIXED_DRIVE Handle = 0x803100DB
+ FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_REMOVABLE_DRIVE Handle = 0x803100DC
+ FVE_E_KEY_ROTATION_NOT_SUPPORTED Handle = 0x803100DD
+ FVE_E_EXECUTE_REQUEST_SENT_TOO_SOON Handle = 0x803100DE
+ FVE_E_KEY_ROTATION_NOT_ENABLED Handle = 0x803100DF
+ FVE_E_DEVICE_NOT_JOINED Handle = 0x803100E0
FWP_E_CALLOUT_NOT_FOUND Handle = 0x80320001
FWP_E_CONDITION_NOT_FOUND Handle = 0x80320002
FWP_E_FILTER_NOT_FOUND Handle = 0x80320003
@@ -5881,6 +5919,12 @@ const (
GCN_E_NETCOMPARTMENT_NOT_FOUND Handle = 0x803B0027
GCN_E_NETINTERFACE_NOT_FOUND Handle = 0x803B0028
GCN_E_DEFAULTNAMESPACE_EXISTS Handle = 0x803B0029
+ HCN_E_ICS_DISABLED Handle = 0x803B002A
+ HCN_E_ENDPOINT_NAMESPACE_ALREADY_EXISTS Handle = 0x803B002B
+ HCN_E_ENTITY_HAS_REFERENCES Handle = 0x803B002C
+ HCN_E_INVALID_INTERNAL_PORT Handle = 0x803B002D
+ HCN_E_NAMESPACE_ATTACH_FAILED Handle = 0x803B002E
+ HCN_E_ADDR_INVALID_OR_RESERVED Handle = 0x803B002F
SDIAG_E_CANCELLED syscall.Errno = 0x803C0100
SDIAG_E_SCRIPT syscall.Errno = 0x803C0101
SDIAG_E_POWERSHELL syscall.Errno = 0x803C0102
@@ -6846,8 +6890,2579 @@ const (
UTC_E_INSUFFICIENT_SPACE_TO_START_TRACE Handle = 0x87C51059
UTC_E_ESCALATION_CANCELLED_AT_SHUTDOWN Handle = 0x87C5105A
UTC_E_GETFILEINFOACTION_FILE_NOT_APPROVED Handle = 0x87C5105B
+ UTC_E_SETREGKEYACTION_TYPE_NOT_APPROVED Handle = 0x87C5105C
WINML_ERR_INVALID_DEVICE Handle = 0x88900001
WINML_ERR_INVALID_BINDING Handle = 0x88900002
WINML_ERR_VALUE_NOTFOUND Handle = 0x88900003
WINML_ERR_SIZE_MISMATCH Handle = 0x88900004
+ STATUS_WAIT_0 NTStatus = 0x00000000
+ STATUS_SUCCESS NTStatus = 0x00000000
+ STATUS_WAIT_1 NTStatus = 0x00000001
+ STATUS_WAIT_2 NTStatus = 0x00000002
+ STATUS_WAIT_3 NTStatus = 0x00000003
+ STATUS_WAIT_63 NTStatus = 0x0000003F
+ STATUS_ABANDONED NTStatus = 0x00000080
+ STATUS_ABANDONED_WAIT_0 NTStatus = 0x00000080
+ STATUS_ABANDONED_WAIT_63 NTStatus = 0x000000BF
+ STATUS_USER_APC NTStatus = 0x000000C0
+ STATUS_ALREADY_COMPLETE NTStatus = 0x000000FF
+ STATUS_KERNEL_APC NTStatus = 0x00000100
+ STATUS_ALERTED NTStatus = 0x00000101
+ STATUS_TIMEOUT NTStatus = 0x00000102
+ STATUS_PENDING NTStatus = 0x00000103
+ STATUS_REPARSE NTStatus = 0x00000104
+ STATUS_MORE_ENTRIES NTStatus = 0x00000105
+ STATUS_NOT_ALL_ASSIGNED NTStatus = 0x00000106
+ STATUS_SOME_NOT_MAPPED NTStatus = 0x00000107
+ STATUS_OPLOCK_BREAK_IN_PROGRESS NTStatus = 0x00000108
+ STATUS_VOLUME_MOUNTED NTStatus = 0x00000109
+ STATUS_RXACT_COMMITTED NTStatus = 0x0000010A
+ STATUS_NOTIFY_CLEANUP NTStatus = 0x0000010B
+ STATUS_NOTIFY_ENUM_DIR NTStatus = 0x0000010C
+ STATUS_NO_QUOTAS_FOR_ACCOUNT NTStatus = 0x0000010D
+ STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED NTStatus = 0x0000010E
+ STATUS_PAGE_FAULT_TRANSITION NTStatus = 0x00000110
+ STATUS_PAGE_FAULT_DEMAND_ZERO NTStatus = 0x00000111
+ STATUS_PAGE_FAULT_COPY_ON_WRITE NTStatus = 0x00000112
+ STATUS_PAGE_FAULT_GUARD_PAGE NTStatus = 0x00000113
+ STATUS_PAGE_FAULT_PAGING_FILE NTStatus = 0x00000114
+ STATUS_CACHE_PAGE_LOCKED NTStatus = 0x00000115
+ STATUS_CRASH_DUMP NTStatus = 0x00000116
+ STATUS_BUFFER_ALL_ZEROS NTStatus = 0x00000117
+ STATUS_REPARSE_OBJECT NTStatus = 0x00000118
+ STATUS_RESOURCE_REQUIREMENTS_CHANGED NTStatus = 0x00000119
+ STATUS_TRANSLATION_COMPLETE NTStatus = 0x00000120
+ STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY NTStatus = 0x00000121
+ STATUS_NOTHING_TO_TERMINATE NTStatus = 0x00000122
+ STATUS_PROCESS_NOT_IN_JOB NTStatus = 0x00000123
+ STATUS_PROCESS_IN_JOB NTStatus = 0x00000124
+ STATUS_VOLSNAP_HIBERNATE_READY NTStatus = 0x00000125
+ STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY NTStatus = 0x00000126
+ STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED NTStatus = 0x00000127
+ STATUS_INTERRUPT_STILL_CONNECTED NTStatus = 0x00000128
+ STATUS_PROCESS_CLONED NTStatus = 0x00000129
+ STATUS_FILE_LOCKED_WITH_ONLY_READERS NTStatus = 0x0000012A
+ STATUS_FILE_LOCKED_WITH_WRITERS NTStatus = 0x0000012B
+ STATUS_VALID_IMAGE_HASH NTStatus = 0x0000012C
+ STATUS_VALID_CATALOG_HASH NTStatus = 0x0000012D
+ STATUS_VALID_STRONG_CODE_HASH NTStatus = 0x0000012E
+ STATUS_GHOSTED NTStatus = 0x0000012F
+ STATUS_DATA_OVERWRITTEN NTStatus = 0x00000130
+ STATUS_RESOURCEMANAGER_READ_ONLY NTStatus = 0x00000202
+ STATUS_RING_PREVIOUSLY_EMPTY NTStatus = 0x00000210
+ STATUS_RING_PREVIOUSLY_FULL NTStatus = 0x00000211
+ STATUS_RING_PREVIOUSLY_ABOVE_QUOTA NTStatus = 0x00000212
+ STATUS_RING_NEWLY_EMPTY NTStatus = 0x00000213
+ STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT NTStatus = 0x00000214
+ STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE NTStatus = 0x00000215
+ STATUS_OPLOCK_HANDLE_CLOSED NTStatus = 0x00000216
+ STATUS_WAIT_FOR_OPLOCK NTStatus = 0x00000367
+ STATUS_REPARSE_GLOBAL NTStatus = 0x00000368
+ STATUS_FLT_IO_COMPLETE NTStatus = 0x001C0001
+ STATUS_OBJECT_NAME_EXISTS NTStatus = 0x40000000
+ STATUS_THREAD_WAS_SUSPENDED NTStatus = 0x40000001
+ STATUS_WORKING_SET_LIMIT_RANGE NTStatus = 0x40000002
+ STATUS_IMAGE_NOT_AT_BASE NTStatus = 0x40000003
+ STATUS_RXACT_STATE_CREATED NTStatus = 0x40000004
+ STATUS_SEGMENT_NOTIFICATION NTStatus = 0x40000005
+ STATUS_LOCAL_USER_SESSION_KEY NTStatus = 0x40000006
+ STATUS_BAD_CURRENT_DIRECTORY NTStatus = 0x40000007
+ STATUS_SERIAL_MORE_WRITES NTStatus = 0x40000008
+ STATUS_REGISTRY_RECOVERED NTStatus = 0x40000009
+ STATUS_FT_READ_RECOVERY_FROM_BACKUP NTStatus = 0x4000000A
+ STATUS_FT_WRITE_RECOVERY NTStatus = 0x4000000B
+ STATUS_SERIAL_COUNTER_TIMEOUT NTStatus = 0x4000000C
+ STATUS_NULL_LM_PASSWORD NTStatus = 0x4000000D
+ STATUS_IMAGE_MACHINE_TYPE_MISMATCH NTStatus = 0x4000000E
+ STATUS_RECEIVE_PARTIAL NTStatus = 0x4000000F
+ STATUS_RECEIVE_EXPEDITED NTStatus = 0x40000010
+ STATUS_RECEIVE_PARTIAL_EXPEDITED NTStatus = 0x40000011
+ STATUS_EVENT_DONE NTStatus = 0x40000012
+ STATUS_EVENT_PENDING NTStatus = 0x40000013
+ STATUS_CHECKING_FILE_SYSTEM NTStatus = 0x40000014
+ STATUS_FATAL_APP_EXIT NTStatus = 0x40000015
+ STATUS_PREDEFINED_HANDLE NTStatus = 0x40000016
+ STATUS_WAS_UNLOCKED NTStatus = 0x40000017
+ STATUS_SERVICE_NOTIFICATION NTStatus = 0x40000018
+ STATUS_WAS_LOCKED NTStatus = 0x40000019
+ STATUS_LOG_HARD_ERROR NTStatus = 0x4000001A
+ STATUS_ALREADY_WIN32 NTStatus = 0x4000001B
+ STATUS_WX86_UNSIMULATE NTStatus = 0x4000001C
+ STATUS_WX86_CONTINUE NTStatus = 0x4000001D
+ STATUS_WX86_SINGLE_STEP NTStatus = 0x4000001E
+ STATUS_WX86_BREAKPOINT NTStatus = 0x4000001F
+ STATUS_WX86_EXCEPTION_CONTINUE NTStatus = 0x40000020
+ STATUS_WX86_EXCEPTION_LASTCHANCE NTStatus = 0x40000021
+ STATUS_WX86_EXCEPTION_CHAIN NTStatus = 0x40000022
+ STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE NTStatus = 0x40000023
+ STATUS_NO_YIELD_PERFORMED NTStatus = 0x40000024
+ STATUS_TIMER_RESUME_IGNORED NTStatus = 0x40000025
+ STATUS_ARBITRATION_UNHANDLED NTStatus = 0x40000026
+ STATUS_CARDBUS_NOT_SUPPORTED NTStatus = 0x40000027
+ STATUS_WX86_CREATEWX86TIB NTStatus = 0x40000028
+ STATUS_MP_PROCESSOR_MISMATCH NTStatus = 0x40000029
+ STATUS_HIBERNATED NTStatus = 0x4000002A
+ STATUS_RESUME_HIBERNATION NTStatus = 0x4000002B
+ STATUS_FIRMWARE_UPDATED NTStatus = 0x4000002C
+ STATUS_DRIVERS_LEAKING_LOCKED_PAGES NTStatus = 0x4000002D
+ STATUS_MESSAGE_RETRIEVED NTStatus = 0x4000002E
+ STATUS_SYSTEM_POWERSTATE_TRANSITION NTStatus = 0x4000002F
+ STATUS_ALPC_CHECK_COMPLETION_LIST NTStatus = 0x40000030
+ STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION NTStatus = 0x40000031
+ STATUS_ACCESS_AUDIT_BY_POLICY NTStatus = 0x40000032
+ STATUS_ABANDON_HIBERFILE NTStatus = 0x40000033
+ STATUS_BIZRULES_NOT_ENABLED NTStatus = 0x40000034
+ STATUS_FT_READ_FROM_COPY NTStatus = 0x40000035
+ STATUS_IMAGE_AT_DIFFERENT_BASE NTStatus = 0x40000036
+ STATUS_PATCH_DEFERRED NTStatus = 0x40000037
+ STATUS_HEURISTIC_DAMAGE_POSSIBLE NTStatus = 0x40190001
+ STATUS_GUARD_PAGE_VIOLATION NTStatus = 0x80000001
+ STATUS_DATATYPE_MISALIGNMENT NTStatus = 0x80000002
+ STATUS_BREAKPOINT NTStatus = 0x80000003
+ STATUS_SINGLE_STEP NTStatus = 0x80000004
+ STATUS_BUFFER_OVERFLOW NTStatus = 0x80000005
+ STATUS_NO_MORE_FILES NTStatus = 0x80000006
+ STATUS_WAKE_SYSTEM_DEBUGGER NTStatus = 0x80000007
+ STATUS_HANDLES_CLOSED NTStatus = 0x8000000A
+ STATUS_NO_INHERITANCE NTStatus = 0x8000000B
+ STATUS_GUID_SUBSTITUTION_MADE NTStatus = 0x8000000C
+ STATUS_PARTIAL_COPY NTStatus = 0x8000000D
+ STATUS_DEVICE_PAPER_EMPTY NTStatus = 0x8000000E
+ STATUS_DEVICE_POWERED_OFF NTStatus = 0x8000000F
+ STATUS_DEVICE_OFF_LINE NTStatus = 0x80000010
+ STATUS_DEVICE_BUSY NTStatus = 0x80000011
+ STATUS_NO_MORE_EAS NTStatus = 0x80000012
+ STATUS_INVALID_EA_NAME NTStatus = 0x80000013
+ STATUS_EA_LIST_INCONSISTENT NTStatus = 0x80000014
+ STATUS_INVALID_EA_FLAG NTStatus = 0x80000015
+ STATUS_VERIFY_REQUIRED NTStatus = 0x80000016
+ STATUS_EXTRANEOUS_INFORMATION NTStatus = 0x80000017
+ STATUS_RXACT_COMMIT_NECESSARY NTStatus = 0x80000018
+ STATUS_NO_MORE_ENTRIES NTStatus = 0x8000001A
+ STATUS_FILEMARK_DETECTED NTStatus = 0x8000001B
+ STATUS_MEDIA_CHANGED NTStatus = 0x8000001C
+ STATUS_BUS_RESET NTStatus = 0x8000001D
+ STATUS_END_OF_MEDIA NTStatus = 0x8000001E
+ STATUS_BEGINNING_OF_MEDIA NTStatus = 0x8000001F
+ STATUS_MEDIA_CHECK NTStatus = 0x80000020
+ STATUS_SETMARK_DETECTED NTStatus = 0x80000021
+ STATUS_NO_DATA_DETECTED NTStatus = 0x80000022
+ STATUS_REDIRECTOR_HAS_OPEN_HANDLES NTStatus = 0x80000023
+ STATUS_SERVER_HAS_OPEN_HANDLES NTStatus = 0x80000024
+ STATUS_ALREADY_DISCONNECTED NTStatus = 0x80000025
+ STATUS_LONGJUMP NTStatus = 0x80000026
+ STATUS_CLEANER_CARTRIDGE_INSTALLED NTStatus = 0x80000027
+ STATUS_PLUGPLAY_QUERY_VETOED NTStatus = 0x80000028
+ STATUS_UNWIND_CONSOLIDATE NTStatus = 0x80000029
+ STATUS_REGISTRY_HIVE_RECOVERED NTStatus = 0x8000002A
+ STATUS_DLL_MIGHT_BE_INSECURE NTStatus = 0x8000002B
+ STATUS_DLL_MIGHT_BE_INCOMPATIBLE NTStatus = 0x8000002C
+ STATUS_STOPPED_ON_SYMLINK NTStatus = 0x8000002D
+ STATUS_CANNOT_GRANT_REQUESTED_OPLOCK NTStatus = 0x8000002E
+ STATUS_NO_ACE_CONDITION NTStatus = 0x8000002F
+ STATUS_DEVICE_SUPPORT_IN_PROGRESS NTStatus = 0x80000030
+ STATUS_DEVICE_POWER_CYCLE_REQUIRED NTStatus = 0x80000031
+ STATUS_NO_WORK_DONE NTStatus = 0x80000032
+ STATUS_CLUSTER_NODE_ALREADY_UP NTStatus = 0x80130001
+ STATUS_CLUSTER_NODE_ALREADY_DOWN NTStatus = 0x80130002
+ STATUS_CLUSTER_NETWORK_ALREADY_ONLINE NTStatus = 0x80130003
+ STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE NTStatus = 0x80130004
+ STATUS_CLUSTER_NODE_ALREADY_MEMBER NTStatus = 0x80130005
+ STATUS_FLT_BUFFER_TOO_SMALL NTStatus = 0x801C0001
+ STATUS_FVE_PARTIAL_METADATA NTStatus = 0x80210001
+ STATUS_FVE_TRANSIENT_STATE NTStatus = 0x80210002
+ STATUS_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH NTStatus = 0x8000CF00
+ STATUS_UNSUCCESSFUL NTStatus = 0xC0000001
+ STATUS_NOT_IMPLEMENTED NTStatus = 0xC0000002
+ STATUS_INVALID_INFO_CLASS NTStatus = 0xC0000003
+ STATUS_INFO_LENGTH_MISMATCH NTStatus = 0xC0000004
+ STATUS_ACCESS_VIOLATION NTStatus = 0xC0000005
+ STATUS_IN_PAGE_ERROR NTStatus = 0xC0000006
+ STATUS_PAGEFILE_QUOTA NTStatus = 0xC0000007
+ STATUS_INVALID_HANDLE NTStatus = 0xC0000008
+ STATUS_BAD_INITIAL_STACK NTStatus = 0xC0000009
+ STATUS_BAD_INITIAL_PC NTStatus = 0xC000000A
+ STATUS_INVALID_CID NTStatus = 0xC000000B
+ STATUS_TIMER_NOT_CANCELED NTStatus = 0xC000000C
+ STATUS_INVALID_PARAMETER NTStatus = 0xC000000D
+ STATUS_NO_SUCH_DEVICE NTStatus = 0xC000000E
+ STATUS_NO_SUCH_FILE NTStatus = 0xC000000F
+ STATUS_INVALID_DEVICE_REQUEST NTStatus = 0xC0000010
+ STATUS_END_OF_FILE NTStatus = 0xC0000011
+ STATUS_WRONG_VOLUME NTStatus = 0xC0000012
+ STATUS_NO_MEDIA_IN_DEVICE NTStatus = 0xC0000013
+ STATUS_UNRECOGNIZED_MEDIA NTStatus = 0xC0000014
+ STATUS_NONEXISTENT_SECTOR NTStatus = 0xC0000015
+ STATUS_MORE_PROCESSING_REQUIRED NTStatus = 0xC0000016
+ STATUS_NO_MEMORY NTStatus = 0xC0000017
+ STATUS_CONFLICTING_ADDRESSES NTStatus = 0xC0000018
+ STATUS_NOT_MAPPED_VIEW NTStatus = 0xC0000019
+ STATUS_UNABLE_TO_FREE_VM NTStatus = 0xC000001A
+ STATUS_UNABLE_TO_DELETE_SECTION NTStatus = 0xC000001B
+ STATUS_INVALID_SYSTEM_SERVICE NTStatus = 0xC000001C
+ STATUS_ILLEGAL_INSTRUCTION NTStatus = 0xC000001D
+ STATUS_INVALID_LOCK_SEQUENCE NTStatus = 0xC000001E
+ STATUS_INVALID_VIEW_SIZE NTStatus = 0xC000001F
+ STATUS_INVALID_FILE_FOR_SECTION NTStatus = 0xC0000020
+ STATUS_ALREADY_COMMITTED NTStatus = 0xC0000021
+ STATUS_ACCESS_DENIED NTStatus = 0xC0000022
+ STATUS_BUFFER_TOO_SMALL NTStatus = 0xC0000023
+ STATUS_OBJECT_TYPE_MISMATCH NTStatus = 0xC0000024
+ STATUS_NONCONTINUABLE_EXCEPTION NTStatus = 0xC0000025
+ STATUS_INVALID_DISPOSITION NTStatus = 0xC0000026
+ STATUS_UNWIND NTStatus = 0xC0000027
+ STATUS_BAD_STACK NTStatus = 0xC0000028
+ STATUS_INVALID_UNWIND_TARGET NTStatus = 0xC0000029
+ STATUS_NOT_LOCKED NTStatus = 0xC000002A
+ STATUS_PARITY_ERROR NTStatus = 0xC000002B
+ STATUS_UNABLE_TO_DECOMMIT_VM NTStatus = 0xC000002C
+ STATUS_NOT_COMMITTED NTStatus = 0xC000002D
+ STATUS_INVALID_PORT_ATTRIBUTES NTStatus = 0xC000002E
+ STATUS_PORT_MESSAGE_TOO_LONG NTStatus = 0xC000002F
+ STATUS_INVALID_PARAMETER_MIX NTStatus = 0xC0000030
+ STATUS_INVALID_QUOTA_LOWER NTStatus = 0xC0000031
+ STATUS_DISK_CORRUPT_ERROR NTStatus = 0xC0000032
+ STATUS_OBJECT_NAME_INVALID NTStatus = 0xC0000033
+ STATUS_OBJECT_NAME_NOT_FOUND NTStatus = 0xC0000034
+ STATUS_OBJECT_NAME_COLLISION NTStatus = 0xC0000035
+ STATUS_PORT_DO_NOT_DISTURB NTStatus = 0xC0000036
+ STATUS_PORT_DISCONNECTED NTStatus = 0xC0000037
+ STATUS_DEVICE_ALREADY_ATTACHED NTStatus = 0xC0000038
+ STATUS_OBJECT_PATH_INVALID NTStatus = 0xC0000039
+ STATUS_OBJECT_PATH_NOT_FOUND NTStatus = 0xC000003A
+ STATUS_OBJECT_PATH_SYNTAX_BAD NTStatus = 0xC000003B
+ STATUS_DATA_OVERRUN NTStatus = 0xC000003C
+ STATUS_DATA_LATE_ERROR NTStatus = 0xC000003D
+ STATUS_DATA_ERROR NTStatus = 0xC000003E
+ STATUS_CRC_ERROR NTStatus = 0xC000003F
+ STATUS_SECTION_TOO_BIG NTStatus = 0xC0000040
+ STATUS_PORT_CONNECTION_REFUSED NTStatus = 0xC0000041
+ STATUS_INVALID_PORT_HANDLE NTStatus = 0xC0000042
+ STATUS_SHARING_VIOLATION NTStatus = 0xC0000043
+ STATUS_QUOTA_EXCEEDED NTStatus = 0xC0000044
+ STATUS_INVALID_PAGE_PROTECTION NTStatus = 0xC0000045
+ STATUS_MUTANT_NOT_OWNED NTStatus = 0xC0000046
+ STATUS_SEMAPHORE_LIMIT_EXCEEDED NTStatus = 0xC0000047
+ STATUS_PORT_ALREADY_SET NTStatus = 0xC0000048
+ STATUS_SECTION_NOT_IMAGE NTStatus = 0xC0000049
+ STATUS_SUSPEND_COUNT_EXCEEDED NTStatus = 0xC000004A
+ STATUS_THREAD_IS_TERMINATING NTStatus = 0xC000004B
+ STATUS_BAD_WORKING_SET_LIMIT NTStatus = 0xC000004C
+ STATUS_INCOMPATIBLE_FILE_MAP NTStatus = 0xC000004D
+ STATUS_SECTION_PROTECTION NTStatus = 0xC000004E
+ STATUS_EAS_NOT_SUPPORTED NTStatus = 0xC000004F
+ STATUS_EA_TOO_LARGE NTStatus = 0xC0000050
+ STATUS_NONEXISTENT_EA_ENTRY NTStatus = 0xC0000051
+ STATUS_NO_EAS_ON_FILE NTStatus = 0xC0000052
+ STATUS_EA_CORRUPT_ERROR NTStatus = 0xC0000053
+ STATUS_FILE_LOCK_CONFLICT NTStatus = 0xC0000054
+ STATUS_LOCK_NOT_GRANTED NTStatus = 0xC0000055
+ STATUS_DELETE_PENDING NTStatus = 0xC0000056
+ STATUS_CTL_FILE_NOT_SUPPORTED NTStatus = 0xC0000057
+ STATUS_UNKNOWN_REVISION NTStatus = 0xC0000058
+ STATUS_REVISION_MISMATCH NTStatus = 0xC0000059
+ STATUS_INVALID_OWNER NTStatus = 0xC000005A
+ STATUS_INVALID_PRIMARY_GROUP NTStatus = 0xC000005B
+ STATUS_NO_IMPERSONATION_TOKEN NTStatus = 0xC000005C
+ STATUS_CANT_DISABLE_MANDATORY NTStatus = 0xC000005D
+ STATUS_NO_LOGON_SERVERS NTStatus = 0xC000005E
+ STATUS_NO_SUCH_LOGON_SESSION NTStatus = 0xC000005F
+ STATUS_NO_SUCH_PRIVILEGE NTStatus = 0xC0000060
+ STATUS_PRIVILEGE_NOT_HELD NTStatus = 0xC0000061
+ STATUS_INVALID_ACCOUNT_NAME NTStatus = 0xC0000062
+ STATUS_USER_EXISTS NTStatus = 0xC0000063
+ STATUS_NO_SUCH_USER NTStatus = 0xC0000064
+ STATUS_GROUP_EXISTS NTStatus = 0xC0000065
+ STATUS_NO_SUCH_GROUP NTStatus = 0xC0000066
+ STATUS_MEMBER_IN_GROUP NTStatus = 0xC0000067
+ STATUS_MEMBER_NOT_IN_GROUP NTStatus = 0xC0000068
+ STATUS_LAST_ADMIN NTStatus = 0xC0000069
+ STATUS_WRONG_PASSWORD NTStatus = 0xC000006A
+ STATUS_ILL_FORMED_PASSWORD NTStatus = 0xC000006B
+ STATUS_PASSWORD_RESTRICTION NTStatus = 0xC000006C
+ STATUS_LOGON_FAILURE NTStatus = 0xC000006D
+ STATUS_ACCOUNT_RESTRICTION NTStatus = 0xC000006E
+ STATUS_INVALID_LOGON_HOURS NTStatus = 0xC000006F
+ STATUS_INVALID_WORKSTATION NTStatus = 0xC0000070
+ STATUS_PASSWORD_EXPIRED NTStatus = 0xC0000071
+ STATUS_ACCOUNT_DISABLED NTStatus = 0xC0000072
+ STATUS_NONE_MAPPED NTStatus = 0xC0000073
+ STATUS_TOO_MANY_LUIDS_REQUESTED NTStatus = 0xC0000074
+ STATUS_LUIDS_EXHAUSTED NTStatus = 0xC0000075
+ STATUS_INVALID_SUB_AUTHORITY NTStatus = 0xC0000076
+ STATUS_INVALID_ACL NTStatus = 0xC0000077
+ STATUS_INVALID_SID NTStatus = 0xC0000078
+ STATUS_INVALID_SECURITY_DESCR NTStatus = 0xC0000079
+ STATUS_PROCEDURE_NOT_FOUND NTStatus = 0xC000007A
+ STATUS_INVALID_IMAGE_FORMAT NTStatus = 0xC000007B
+ STATUS_NO_TOKEN NTStatus = 0xC000007C
+ STATUS_BAD_INHERITANCE_ACL NTStatus = 0xC000007D
+ STATUS_RANGE_NOT_LOCKED NTStatus = 0xC000007E
+ STATUS_DISK_FULL NTStatus = 0xC000007F
+ STATUS_SERVER_DISABLED NTStatus = 0xC0000080
+ STATUS_SERVER_NOT_DISABLED NTStatus = 0xC0000081
+ STATUS_TOO_MANY_GUIDS_REQUESTED NTStatus = 0xC0000082
+ STATUS_GUIDS_EXHAUSTED NTStatus = 0xC0000083
+ STATUS_INVALID_ID_AUTHORITY NTStatus = 0xC0000084
+ STATUS_AGENTS_EXHAUSTED NTStatus = 0xC0000085
+ STATUS_INVALID_VOLUME_LABEL NTStatus = 0xC0000086
+ STATUS_SECTION_NOT_EXTENDED NTStatus = 0xC0000087
+ STATUS_NOT_MAPPED_DATA NTStatus = 0xC0000088
+ STATUS_RESOURCE_DATA_NOT_FOUND NTStatus = 0xC0000089
+ STATUS_RESOURCE_TYPE_NOT_FOUND NTStatus = 0xC000008A
+ STATUS_RESOURCE_NAME_NOT_FOUND NTStatus = 0xC000008B
+ STATUS_ARRAY_BOUNDS_EXCEEDED NTStatus = 0xC000008C
+ STATUS_FLOAT_DENORMAL_OPERAND NTStatus = 0xC000008D
+ STATUS_FLOAT_DIVIDE_BY_ZERO NTStatus = 0xC000008E
+ STATUS_FLOAT_INEXACT_RESULT NTStatus = 0xC000008F
+ STATUS_FLOAT_INVALID_OPERATION NTStatus = 0xC0000090
+ STATUS_FLOAT_OVERFLOW NTStatus = 0xC0000091
+ STATUS_FLOAT_STACK_CHECK NTStatus = 0xC0000092
+ STATUS_FLOAT_UNDERFLOW NTStatus = 0xC0000093
+ STATUS_INTEGER_DIVIDE_BY_ZERO NTStatus = 0xC0000094
+ STATUS_INTEGER_OVERFLOW NTStatus = 0xC0000095
+ STATUS_PRIVILEGED_INSTRUCTION NTStatus = 0xC0000096
+ STATUS_TOO_MANY_PAGING_FILES NTStatus = 0xC0000097
+ STATUS_FILE_INVALID NTStatus = 0xC0000098
+ STATUS_ALLOTTED_SPACE_EXCEEDED NTStatus = 0xC0000099
+ STATUS_INSUFFICIENT_RESOURCES NTStatus = 0xC000009A
+ STATUS_DFS_EXIT_PATH_FOUND NTStatus = 0xC000009B
+ STATUS_DEVICE_DATA_ERROR NTStatus = 0xC000009C
+ STATUS_DEVICE_NOT_CONNECTED NTStatus = 0xC000009D
+ STATUS_DEVICE_POWER_FAILURE NTStatus = 0xC000009E
+ STATUS_FREE_VM_NOT_AT_BASE NTStatus = 0xC000009F
+ STATUS_MEMORY_NOT_ALLOCATED NTStatus = 0xC00000A0
+ STATUS_WORKING_SET_QUOTA NTStatus = 0xC00000A1
+ STATUS_MEDIA_WRITE_PROTECTED NTStatus = 0xC00000A2
+ STATUS_DEVICE_NOT_READY NTStatus = 0xC00000A3
+ STATUS_INVALID_GROUP_ATTRIBUTES NTStatus = 0xC00000A4
+ STATUS_BAD_IMPERSONATION_LEVEL NTStatus = 0xC00000A5
+ STATUS_CANT_OPEN_ANONYMOUS NTStatus = 0xC00000A6
+ STATUS_BAD_VALIDATION_CLASS NTStatus = 0xC00000A7
+ STATUS_BAD_TOKEN_TYPE NTStatus = 0xC00000A8
+ STATUS_BAD_MASTER_BOOT_RECORD NTStatus = 0xC00000A9
+ STATUS_INSTRUCTION_MISALIGNMENT NTStatus = 0xC00000AA
+ STATUS_INSTANCE_NOT_AVAILABLE NTStatus = 0xC00000AB
+ STATUS_PIPE_NOT_AVAILABLE NTStatus = 0xC00000AC
+ STATUS_INVALID_PIPE_STATE NTStatus = 0xC00000AD
+ STATUS_PIPE_BUSY NTStatus = 0xC00000AE
+ STATUS_ILLEGAL_FUNCTION NTStatus = 0xC00000AF
+ STATUS_PIPE_DISCONNECTED NTStatus = 0xC00000B0
+ STATUS_PIPE_CLOSING NTStatus = 0xC00000B1
+ STATUS_PIPE_CONNECTED NTStatus = 0xC00000B2
+ STATUS_PIPE_LISTENING NTStatus = 0xC00000B3
+ STATUS_INVALID_READ_MODE NTStatus = 0xC00000B4
+ STATUS_IO_TIMEOUT NTStatus = 0xC00000B5
+ STATUS_FILE_FORCED_CLOSED NTStatus = 0xC00000B6
+ STATUS_PROFILING_NOT_STARTED NTStatus = 0xC00000B7
+ STATUS_PROFILING_NOT_STOPPED NTStatus = 0xC00000B8
+ STATUS_COULD_NOT_INTERPRET NTStatus = 0xC00000B9
+ STATUS_FILE_IS_A_DIRECTORY NTStatus = 0xC00000BA
+ STATUS_NOT_SUPPORTED NTStatus = 0xC00000BB
+ STATUS_REMOTE_NOT_LISTENING NTStatus = 0xC00000BC
+ STATUS_DUPLICATE_NAME NTStatus = 0xC00000BD
+ STATUS_BAD_NETWORK_PATH NTStatus = 0xC00000BE
+ STATUS_NETWORK_BUSY NTStatus = 0xC00000BF
+ STATUS_DEVICE_DOES_NOT_EXIST NTStatus = 0xC00000C0
+ STATUS_TOO_MANY_COMMANDS NTStatus = 0xC00000C1
+ STATUS_ADAPTER_HARDWARE_ERROR NTStatus = 0xC00000C2
+ STATUS_INVALID_NETWORK_RESPONSE NTStatus = 0xC00000C3
+ STATUS_UNEXPECTED_NETWORK_ERROR NTStatus = 0xC00000C4
+ STATUS_BAD_REMOTE_ADAPTER NTStatus = 0xC00000C5
+ STATUS_PRINT_QUEUE_FULL NTStatus = 0xC00000C6
+ STATUS_NO_SPOOL_SPACE NTStatus = 0xC00000C7
+ STATUS_PRINT_CANCELLED NTStatus = 0xC00000C8
+ STATUS_NETWORK_NAME_DELETED NTStatus = 0xC00000C9
+ STATUS_NETWORK_ACCESS_DENIED NTStatus = 0xC00000CA
+ STATUS_BAD_DEVICE_TYPE NTStatus = 0xC00000CB
+ STATUS_BAD_NETWORK_NAME NTStatus = 0xC00000CC
+ STATUS_TOO_MANY_NAMES NTStatus = 0xC00000CD
+ STATUS_TOO_MANY_SESSIONS NTStatus = 0xC00000CE
+ STATUS_SHARING_PAUSED NTStatus = 0xC00000CF
+ STATUS_REQUEST_NOT_ACCEPTED NTStatus = 0xC00000D0
+ STATUS_REDIRECTOR_PAUSED NTStatus = 0xC00000D1
+ STATUS_NET_WRITE_FAULT NTStatus = 0xC00000D2
+ STATUS_PROFILING_AT_LIMIT NTStatus = 0xC00000D3
+ STATUS_NOT_SAME_DEVICE NTStatus = 0xC00000D4
+ STATUS_FILE_RENAMED NTStatus = 0xC00000D5
+ STATUS_VIRTUAL_CIRCUIT_CLOSED NTStatus = 0xC00000D6
+ STATUS_NO_SECURITY_ON_OBJECT NTStatus = 0xC00000D7
+ STATUS_CANT_WAIT NTStatus = 0xC00000D8
+ STATUS_PIPE_EMPTY NTStatus = 0xC00000D9
+ STATUS_CANT_ACCESS_DOMAIN_INFO NTStatus = 0xC00000DA
+ STATUS_CANT_TERMINATE_SELF NTStatus = 0xC00000DB
+ STATUS_INVALID_SERVER_STATE NTStatus = 0xC00000DC
+ STATUS_INVALID_DOMAIN_STATE NTStatus = 0xC00000DD
+ STATUS_INVALID_DOMAIN_ROLE NTStatus = 0xC00000DE
+ STATUS_NO_SUCH_DOMAIN NTStatus = 0xC00000DF
+ STATUS_DOMAIN_EXISTS NTStatus = 0xC00000E0
+ STATUS_DOMAIN_LIMIT_EXCEEDED NTStatus = 0xC00000E1
+ STATUS_OPLOCK_NOT_GRANTED NTStatus = 0xC00000E2
+ STATUS_INVALID_OPLOCK_PROTOCOL NTStatus = 0xC00000E3
+ STATUS_INTERNAL_DB_CORRUPTION NTStatus = 0xC00000E4
+ STATUS_INTERNAL_ERROR NTStatus = 0xC00000E5
+ STATUS_GENERIC_NOT_MAPPED NTStatus = 0xC00000E6
+ STATUS_BAD_DESCRIPTOR_FORMAT NTStatus = 0xC00000E7
+ STATUS_INVALID_USER_BUFFER NTStatus = 0xC00000E8
+ STATUS_UNEXPECTED_IO_ERROR NTStatus = 0xC00000E9
+ STATUS_UNEXPECTED_MM_CREATE_ERR NTStatus = 0xC00000EA
+ STATUS_UNEXPECTED_MM_MAP_ERROR NTStatus = 0xC00000EB
+ STATUS_UNEXPECTED_MM_EXTEND_ERR NTStatus = 0xC00000EC
+ STATUS_NOT_LOGON_PROCESS NTStatus = 0xC00000ED
+ STATUS_LOGON_SESSION_EXISTS NTStatus = 0xC00000EE
+ STATUS_INVALID_PARAMETER_1 NTStatus = 0xC00000EF
+ STATUS_INVALID_PARAMETER_2 NTStatus = 0xC00000F0
+ STATUS_INVALID_PARAMETER_3 NTStatus = 0xC00000F1
+ STATUS_INVALID_PARAMETER_4 NTStatus = 0xC00000F2
+ STATUS_INVALID_PARAMETER_5 NTStatus = 0xC00000F3
+ STATUS_INVALID_PARAMETER_6 NTStatus = 0xC00000F4
+ STATUS_INVALID_PARAMETER_7 NTStatus = 0xC00000F5
+ STATUS_INVALID_PARAMETER_8 NTStatus = 0xC00000F6
+ STATUS_INVALID_PARAMETER_9 NTStatus = 0xC00000F7
+ STATUS_INVALID_PARAMETER_10 NTStatus = 0xC00000F8
+ STATUS_INVALID_PARAMETER_11 NTStatus = 0xC00000F9
+ STATUS_INVALID_PARAMETER_12 NTStatus = 0xC00000FA
+ STATUS_REDIRECTOR_NOT_STARTED NTStatus = 0xC00000FB
+ STATUS_REDIRECTOR_STARTED NTStatus = 0xC00000FC
+ STATUS_STACK_OVERFLOW NTStatus = 0xC00000FD
+ STATUS_NO_SUCH_PACKAGE NTStatus = 0xC00000FE
+ STATUS_BAD_FUNCTION_TABLE NTStatus = 0xC00000FF
+ STATUS_VARIABLE_NOT_FOUND NTStatus = 0xC0000100
+ STATUS_DIRECTORY_NOT_EMPTY NTStatus = 0xC0000101
+ STATUS_FILE_CORRUPT_ERROR NTStatus = 0xC0000102
+ STATUS_NOT_A_DIRECTORY NTStatus = 0xC0000103
+ STATUS_BAD_LOGON_SESSION_STATE NTStatus = 0xC0000104
+ STATUS_LOGON_SESSION_COLLISION NTStatus = 0xC0000105
+ STATUS_NAME_TOO_LONG NTStatus = 0xC0000106
+ STATUS_FILES_OPEN NTStatus = 0xC0000107
+ STATUS_CONNECTION_IN_USE NTStatus = 0xC0000108
+ STATUS_MESSAGE_NOT_FOUND NTStatus = 0xC0000109
+ STATUS_PROCESS_IS_TERMINATING NTStatus = 0xC000010A
+ STATUS_INVALID_LOGON_TYPE NTStatus = 0xC000010B
+ STATUS_NO_GUID_TRANSLATION NTStatus = 0xC000010C
+ STATUS_CANNOT_IMPERSONATE NTStatus = 0xC000010D
+ STATUS_IMAGE_ALREADY_LOADED NTStatus = 0xC000010E
+ STATUS_ABIOS_NOT_PRESENT NTStatus = 0xC000010F
+ STATUS_ABIOS_LID_NOT_EXIST NTStatus = 0xC0000110
+ STATUS_ABIOS_LID_ALREADY_OWNED NTStatus = 0xC0000111
+ STATUS_ABIOS_NOT_LID_OWNER NTStatus = 0xC0000112
+ STATUS_ABIOS_INVALID_COMMAND NTStatus = 0xC0000113
+ STATUS_ABIOS_INVALID_LID NTStatus = 0xC0000114
+ STATUS_ABIOS_SELECTOR_NOT_AVAILABLE NTStatus = 0xC0000115
+ STATUS_ABIOS_INVALID_SELECTOR NTStatus = 0xC0000116
+ STATUS_NO_LDT NTStatus = 0xC0000117
+ STATUS_INVALID_LDT_SIZE NTStatus = 0xC0000118
+ STATUS_INVALID_LDT_OFFSET NTStatus = 0xC0000119
+ STATUS_INVALID_LDT_DESCRIPTOR NTStatus = 0xC000011A
+ STATUS_INVALID_IMAGE_NE_FORMAT NTStatus = 0xC000011B
+ STATUS_RXACT_INVALID_STATE NTStatus = 0xC000011C
+ STATUS_RXACT_COMMIT_FAILURE NTStatus = 0xC000011D
+ STATUS_MAPPED_FILE_SIZE_ZERO NTStatus = 0xC000011E
+ STATUS_TOO_MANY_OPENED_FILES NTStatus = 0xC000011F
+ STATUS_CANCELLED NTStatus = 0xC0000120
+ STATUS_CANNOT_DELETE NTStatus = 0xC0000121
+ STATUS_INVALID_COMPUTER_NAME NTStatus = 0xC0000122
+ STATUS_FILE_DELETED NTStatus = 0xC0000123
+ STATUS_SPECIAL_ACCOUNT NTStatus = 0xC0000124
+ STATUS_SPECIAL_GROUP NTStatus = 0xC0000125
+ STATUS_SPECIAL_USER NTStatus = 0xC0000126
+ STATUS_MEMBERS_PRIMARY_GROUP NTStatus = 0xC0000127
+ STATUS_FILE_CLOSED NTStatus = 0xC0000128
+ STATUS_TOO_MANY_THREADS NTStatus = 0xC0000129
+ STATUS_THREAD_NOT_IN_PROCESS NTStatus = 0xC000012A
+ STATUS_TOKEN_ALREADY_IN_USE NTStatus = 0xC000012B
+ STATUS_PAGEFILE_QUOTA_EXCEEDED NTStatus = 0xC000012C
+ STATUS_COMMITMENT_LIMIT NTStatus = 0xC000012D
+ STATUS_INVALID_IMAGE_LE_FORMAT NTStatus = 0xC000012E
+ STATUS_INVALID_IMAGE_NOT_MZ NTStatus = 0xC000012F
+ STATUS_INVALID_IMAGE_PROTECT NTStatus = 0xC0000130
+ STATUS_INVALID_IMAGE_WIN_16 NTStatus = 0xC0000131
+ STATUS_LOGON_SERVER_CONFLICT NTStatus = 0xC0000132
+ STATUS_TIME_DIFFERENCE_AT_DC NTStatus = 0xC0000133
+ STATUS_SYNCHRONIZATION_REQUIRED NTStatus = 0xC0000134
+ STATUS_DLL_NOT_FOUND NTStatus = 0xC0000135
+ STATUS_OPEN_FAILED NTStatus = 0xC0000136
+ STATUS_IO_PRIVILEGE_FAILED NTStatus = 0xC0000137
+ STATUS_ORDINAL_NOT_FOUND NTStatus = 0xC0000138
+ STATUS_ENTRYPOINT_NOT_FOUND NTStatus = 0xC0000139
+ STATUS_CONTROL_C_EXIT NTStatus = 0xC000013A
+ STATUS_LOCAL_DISCONNECT NTStatus = 0xC000013B
+ STATUS_REMOTE_DISCONNECT NTStatus = 0xC000013C
+ STATUS_REMOTE_RESOURCES NTStatus = 0xC000013D
+ STATUS_LINK_FAILED NTStatus = 0xC000013E
+ STATUS_LINK_TIMEOUT NTStatus = 0xC000013F
+ STATUS_INVALID_CONNECTION NTStatus = 0xC0000140
+ STATUS_INVALID_ADDRESS NTStatus = 0xC0000141
+ STATUS_DLL_INIT_FAILED NTStatus = 0xC0000142
+ STATUS_MISSING_SYSTEMFILE NTStatus = 0xC0000143
+ STATUS_UNHANDLED_EXCEPTION NTStatus = 0xC0000144
+ STATUS_APP_INIT_FAILURE NTStatus = 0xC0000145
+ STATUS_PAGEFILE_CREATE_FAILED NTStatus = 0xC0000146
+ STATUS_NO_PAGEFILE NTStatus = 0xC0000147
+ STATUS_INVALID_LEVEL NTStatus = 0xC0000148
+ STATUS_WRONG_PASSWORD_CORE NTStatus = 0xC0000149
+ STATUS_ILLEGAL_FLOAT_CONTEXT NTStatus = 0xC000014A
+ STATUS_PIPE_BROKEN NTStatus = 0xC000014B
+ STATUS_REGISTRY_CORRUPT NTStatus = 0xC000014C
+ STATUS_REGISTRY_IO_FAILED NTStatus = 0xC000014D
+ STATUS_NO_EVENT_PAIR NTStatus = 0xC000014E
+ STATUS_UNRECOGNIZED_VOLUME NTStatus = 0xC000014F
+ STATUS_SERIAL_NO_DEVICE_INITED NTStatus = 0xC0000150
+ STATUS_NO_SUCH_ALIAS NTStatus = 0xC0000151
+ STATUS_MEMBER_NOT_IN_ALIAS NTStatus = 0xC0000152
+ STATUS_MEMBER_IN_ALIAS NTStatus = 0xC0000153
+ STATUS_ALIAS_EXISTS NTStatus = 0xC0000154
+ STATUS_LOGON_NOT_GRANTED NTStatus = 0xC0000155
+ STATUS_TOO_MANY_SECRETS NTStatus = 0xC0000156
+ STATUS_SECRET_TOO_LONG NTStatus = 0xC0000157
+ STATUS_INTERNAL_DB_ERROR NTStatus = 0xC0000158
+ STATUS_FULLSCREEN_MODE NTStatus = 0xC0000159
+ STATUS_TOO_MANY_CONTEXT_IDS NTStatus = 0xC000015A
+ STATUS_LOGON_TYPE_NOT_GRANTED NTStatus = 0xC000015B
+ STATUS_NOT_REGISTRY_FILE NTStatus = 0xC000015C
+ STATUS_NT_CROSS_ENCRYPTION_REQUIRED NTStatus = 0xC000015D
+ STATUS_DOMAIN_CTRLR_CONFIG_ERROR NTStatus = 0xC000015E
+ STATUS_FT_MISSING_MEMBER NTStatus = 0xC000015F
+ STATUS_ILL_FORMED_SERVICE_ENTRY NTStatus = 0xC0000160
+ STATUS_ILLEGAL_CHARACTER NTStatus = 0xC0000161
+ STATUS_UNMAPPABLE_CHARACTER NTStatus = 0xC0000162
+ STATUS_UNDEFINED_CHARACTER NTStatus = 0xC0000163
+ STATUS_FLOPPY_VOLUME NTStatus = 0xC0000164
+ STATUS_FLOPPY_ID_MARK_NOT_FOUND NTStatus = 0xC0000165
+ STATUS_FLOPPY_WRONG_CYLINDER NTStatus = 0xC0000166
+ STATUS_FLOPPY_UNKNOWN_ERROR NTStatus = 0xC0000167
+ STATUS_FLOPPY_BAD_REGISTERS NTStatus = 0xC0000168
+ STATUS_DISK_RECALIBRATE_FAILED NTStatus = 0xC0000169
+ STATUS_DISK_OPERATION_FAILED NTStatus = 0xC000016A
+ STATUS_DISK_RESET_FAILED NTStatus = 0xC000016B
+ STATUS_SHARED_IRQ_BUSY NTStatus = 0xC000016C
+ STATUS_FT_ORPHANING NTStatus = 0xC000016D
+ STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT NTStatus = 0xC000016E
+ STATUS_PARTITION_FAILURE NTStatus = 0xC0000172
+ STATUS_INVALID_BLOCK_LENGTH NTStatus = 0xC0000173
+ STATUS_DEVICE_NOT_PARTITIONED NTStatus = 0xC0000174
+ STATUS_UNABLE_TO_LOCK_MEDIA NTStatus = 0xC0000175
+ STATUS_UNABLE_TO_UNLOAD_MEDIA NTStatus = 0xC0000176
+ STATUS_EOM_OVERFLOW NTStatus = 0xC0000177
+ STATUS_NO_MEDIA NTStatus = 0xC0000178
+ STATUS_NO_SUCH_MEMBER NTStatus = 0xC000017A
+ STATUS_INVALID_MEMBER NTStatus = 0xC000017B
+ STATUS_KEY_DELETED NTStatus = 0xC000017C
+ STATUS_NO_LOG_SPACE NTStatus = 0xC000017D
+ STATUS_TOO_MANY_SIDS NTStatus = 0xC000017E
+ STATUS_LM_CROSS_ENCRYPTION_REQUIRED NTStatus = 0xC000017F
+ STATUS_KEY_HAS_CHILDREN NTStatus = 0xC0000180
+ STATUS_CHILD_MUST_BE_VOLATILE NTStatus = 0xC0000181
+ STATUS_DEVICE_CONFIGURATION_ERROR NTStatus = 0xC0000182
+ STATUS_DRIVER_INTERNAL_ERROR NTStatus = 0xC0000183
+ STATUS_INVALID_DEVICE_STATE NTStatus = 0xC0000184
+ STATUS_IO_DEVICE_ERROR NTStatus = 0xC0000185
+ STATUS_DEVICE_PROTOCOL_ERROR NTStatus = 0xC0000186
+ STATUS_BACKUP_CONTROLLER NTStatus = 0xC0000187
+ STATUS_LOG_FILE_FULL NTStatus = 0xC0000188
+ STATUS_TOO_LATE NTStatus = 0xC0000189
+ STATUS_NO_TRUST_LSA_SECRET NTStatus = 0xC000018A
+ STATUS_NO_TRUST_SAM_ACCOUNT NTStatus = 0xC000018B
+ STATUS_TRUSTED_DOMAIN_FAILURE NTStatus = 0xC000018C
+ STATUS_TRUSTED_RELATIONSHIP_FAILURE NTStatus = 0xC000018D
+ STATUS_EVENTLOG_FILE_CORRUPT NTStatus = 0xC000018E
+ STATUS_EVENTLOG_CANT_START NTStatus = 0xC000018F
+ STATUS_TRUST_FAILURE NTStatus = 0xC0000190
+ STATUS_MUTANT_LIMIT_EXCEEDED NTStatus = 0xC0000191
+ STATUS_NETLOGON_NOT_STARTED NTStatus = 0xC0000192
+ STATUS_ACCOUNT_EXPIRED NTStatus = 0xC0000193
+ STATUS_POSSIBLE_DEADLOCK NTStatus = 0xC0000194
+ STATUS_NETWORK_CREDENTIAL_CONFLICT NTStatus = 0xC0000195
+ STATUS_REMOTE_SESSION_LIMIT NTStatus = 0xC0000196
+ STATUS_EVENTLOG_FILE_CHANGED NTStatus = 0xC0000197
+ STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT NTStatus = 0xC0000198
+ STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT NTStatus = 0xC0000199
+ STATUS_NOLOGON_SERVER_TRUST_ACCOUNT NTStatus = 0xC000019A
+ STATUS_DOMAIN_TRUST_INCONSISTENT NTStatus = 0xC000019B
+ STATUS_FS_DRIVER_REQUIRED NTStatus = 0xC000019C
+ STATUS_IMAGE_ALREADY_LOADED_AS_DLL NTStatus = 0xC000019D
+ STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING NTStatus = 0xC000019E
+ STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME NTStatus = 0xC000019F
+ STATUS_SECURITY_STREAM_IS_INCONSISTENT NTStatus = 0xC00001A0
+ STATUS_INVALID_LOCK_RANGE NTStatus = 0xC00001A1
+ STATUS_INVALID_ACE_CONDITION NTStatus = 0xC00001A2
+ STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT NTStatus = 0xC00001A3
+ STATUS_NOTIFICATION_GUID_ALREADY_DEFINED NTStatus = 0xC00001A4
+ STATUS_INVALID_EXCEPTION_HANDLER NTStatus = 0xC00001A5
+ STATUS_DUPLICATE_PRIVILEGES NTStatus = 0xC00001A6
+ STATUS_NOT_ALLOWED_ON_SYSTEM_FILE NTStatus = 0xC00001A7
+ STATUS_REPAIR_NEEDED NTStatus = 0xC00001A8
+ STATUS_QUOTA_NOT_ENABLED NTStatus = 0xC00001A9
+ STATUS_NO_APPLICATION_PACKAGE NTStatus = 0xC00001AA
+ STATUS_FILE_METADATA_OPTIMIZATION_IN_PROGRESS NTStatus = 0xC00001AB
+ STATUS_NOT_SAME_OBJECT NTStatus = 0xC00001AC
+ STATUS_FATAL_MEMORY_EXHAUSTION NTStatus = 0xC00001AD
+ STATUS_ERROR_PROCESS_NOT_IN_JOB NTStatus = 0xC00001AE
+ STATUS_CPU_SET_INVALID NTStatus = 0xC00001AF
+ STATUS_IO_DEVICE_INVALID_DATA NTStatus = 0xC00001B0
+ STATUS_IO_UNALIGNED_WRITE NTStatus = 0xC00001B1
+ STATUS_NETWORK_OPEN_RESTRICTION NTStatus = 0xC0000201
+ STATUS_NO_USER_SESSION_KEY NTStatus = 0xC0000202
+ STATUS_USER_SESSION_DELETED NTStatus = 0xC0000203
+ STATUS_RESOURCE_LANG_NOT_FOUND NTStatus = 0xC0000204
+ STATUS_INSUFF_SERVER_RESOURCES NTStatus = 0xC0000205
+ STATUS_INVALID_BUFFER_SIZE NTStatus = 0xC0000206
+ STATUS_INVALID_ADDRESS_COMPONENT NTStatus = 0xC0000207
+ STATUS_INVALID_ADDRESS_WILDCARD NTStatus = 0xC0000208
+ STATUS_TOO_MANY_ADDRESSES NTStatus = 0xC0000209
+ STATUS_ADDRESS_ALREADY_EXISTS NTStatus = 0xC000020A
+ STATUS_ADDRESS_CLOSED NTStatus = 0xC000020B
+ STATUS_CONNECTION_DISCONNECTED NTStatus = 0xC000020C
+ STATUS_CONNECTION_RESET NTStatus = 0xC000020D
+ STATUS_TOO_MANY_NODES NTStatus = 0xC000020E
+ STATUS_TRANSACTION_ABORTED NTStatus = 0xC000020F
+ STATUS_TRANSACTION_TIMED_OUT NTStatus = 0xC0000210
+ STATUS_TRANSACTION_NO_RELEASE NTStatus = 0xC0000211
+ STATUS_TRANSACTION_NO_MATCH NTStatus = 0xC0000212
+ STATUS_TRANSACTION_RESPONDED NTStatus = 0xC0000213
+ STATUS_TRANSACTION_INVALID_ID NTStatus = 0xC0000214
+ STATUS_TRANSACTION_INVALID_TYPE NTStatus = 0xC0000215
+ STATUS_NOT_SERVER_SESSION NTStatus = 0xC0000216
+ STATUS_NOT_CLIENT_SESSION NTStatus = 0xC0000217
+ STATUS_CANNOT_LOAD_REGISTRY_FILE NTStatus = 0xC0000218
+ STATUS_DEBUG_ATTACH_FAILED NTStatus = 0xC0000219
+ STATUS_SYSTEM_PROCESS_TERMINATED NTStatus = 0xC000021A
+ STATUS_DATA_NOT_ACCEPTED NTStatus = 0xC000021B
+ STATUS_NO_BROWSER_SERVERS_FOUND NTStatus = 0xC000021C
+ STATUS_VDM_HARD_ERROR NTStatus = 0xC000021D
+ STATUS_DRIVER_CANCEL_TIMEOUT NTStatus = 0xC000021E
+ STATUS_REPLY_MESSAGE_MISMATCH NTStatus = 0xC000021F
+ STATUS_MAPPED_ALIGNMENT NTStatus = 0xC0000220
+ STATUS_IMAGE_CHECKSUM_MISMATCH NTStatus = 0xC0000221
+ STATUS_LOST_WRITEBEHIND_DATA NTStatus = 0xC0000222
+ STATUS_CLIENT_SERVER_PARAMETERS_INVALID NTStatus = 0xC0000223
+ STATUS_PASSWORD_MUST_CHANGE NTStatus = 0xC0000224
+ STATUS_NOT_FOUND NTStatus = 0xC0000225
+ STATUS_NOT_TINY_STREAM NTStatus = 0xC0000226
+ STATUS_RECOVERY_FAILURE NTStatus = 0xC0000227
+ STATUS_STACK_OVERFLOW_READ NTStatus = 0xC0000228
+ STATUS_FAIL_CHECK NTStatus = 0xC0000229
+ STATUS_DUPLICATE_OBJECTID NTStatus = 0xC000022A
+ STATUS_OBJECTID_EXISTS NTStatus = 0xC000022B
+ STATUS_CONVERT_TO_LARGE NTStatus = 0xC000022C
+ STATUS_RETRY NTStatus = 0xC000022D
+ STATUS_FOUND_OUT_OF_SCOPE NTStatus = 0xC000022E
+ STATUS_ALLOCATE_BUCKET NTStatus = 0xC000022F
+ STATUS_PROPSET_NOT_FOUND NTStatus = 0xC0000230
+ STATUS_MARSHALL_OVERFLOW NTStatus = 0xC0000231
+ STATUS_INVALID_VARIANT NTStatus = 0xC0000232
+ STATUS_DOMAIN_CONTROLLER_NOT_FOUND NTStatus = 0xC0000233
+ STATUS_ACCOUNT_LOCKED_OUT NTStatus = 0xC0000234
+ STATUS_HANDLE_NOT_CLOSABLE NTStatus = 0xC0000235
+ STATUS_CONNECTION_REFUSED NTStatus = 0xC0000236
+ STATUS_GRACEFUL_DISCONNECT NTStatus = 0xC0000237
+ STATUS_ADDRESS_ALREADY_ASSOCIATED NTStatus = 0xC0000238
+ STATUS_ADDRESS_NOT_ASSOCIATED NTStatus = 0xC0000239
+ STATUS_CONNECTION_INVALID NTStatus = 0xC000023A
+ STATUS_CONNECTION_ACTIVE NTStatus = 0xC000023B
+ STATUS_NETWORK_UNREACHABLE NTStatus = 0xC000023C
+ STATUS_HOST_UNREACHABLE NTStatus = 0xC000023D
+ STATUS_PROTOCOL_UNREACHABLE NTStatus = 0xC000023E
+ STATUS_PORT_UNREACHABLE NTStatus = 0xC000023F
+ STATUS_REQUEST_ABORTED NTStatus = 0xC0000240
+ STATUS_CONNECTION_ABORTED NTStatus = 0xC0000241
+ STATUS_BAD_COMPRESSION_BUFFER NTStatus = 0xC0000242
+ STATUS_USER_MAPPED_FILE NTStatus = 0xC0000243
+ STATUS_AUDIT_FAILED NTStatus = 0xC0000244
+ STATUS_TIMER_RESOLUTION_NOT_SET NTStatus = 0xC0000245
+ STATUS_CONNECTION_COUNT_LIMIT NTStatus = 0xC0000246
+ STATUS_LOGIN_TIME_RESTRICTION NTStatus = 0xC0000247
+ STATUS_LOGIN_WKSTA_RESTRICTION NTStatus = 0xC0000248
+ STATUS_IMAGE_MP_UP_MISMATCH NTStatus = 0xC0000249
+ STATUS_INSUFFICIENT_LOGON_INFO NTStatus = 0xC0000250
+ STATUS_BAD_DLL_ENTRYPOINT NTStatus = 0xC0000251
+ STATUS_BAD_SERVICE_ENTRYPOINT NTStatus = 0xC0000252
+ STATUS_LPC_REPLY_LOST NTStatus = 0xC0000253
+ STATUS_IP_ADDRESS_CONFLICT1 NTStatus = 0xC0000254
+ STATUS_IP_ADDRESS_CONFLICT2 NTStatus = 0xC0000255
+ STATUS_REGISTRY_QUOTA_LIMIT NTStatus = 0xC0000256
+ STATUS_PATH_NOT_COVERED NTStatus = 0xC0000257
+ STATUS_NO_CALLBACK_ACTIVE NTStatus = 0xC0000258
+ STATUS_LICENSE_QUOTA_EXCEEDED NTStatus = 0xC0000259
+ STATUS_PWD_TOO_SHORT NTStatus = 0xC000025A
+ STATUS_PWD_TOO_RECENT NTStatus = 0xC000025B
+ STATUS_PWD_HISTORY_CONFLICT NTStatus = 0xC000025C
+ STATUS_PLUGPLAY_NO_DEVICE NTStatus = 0xC000025E
+ STATUS_UNSUPPORTED_COMPRESSION NTStatus = 0xC000025F
+ STATUS_INVALID_HW_PROFILE NTStatus = 0xC0000260
+ STATUS_INVALID_PLUGPLAY_DEVICE_PATH NTStatus = 0xC0000261
+ STATUS_DRIVER_ORDINAL_NOT_FOUND NTStatus = 0xC0000262
+ STATUS_DRIVER_ENTRYPOINT_NOT_FOUND NTStatus = 0xC0000263
+ STATUS_RESOURCE_NOT_OWNED NTStatus = 0xC0000264
+ STATUS_TOO_MANY_LINKS NTStatus = 0xC0000265
+ STATUS_QUOTA_LIST_INCONSISTENT NTStatus = 0xC0000266
+ STATUS_FILE_IS_OFFLINE NTStatus = 0xC0000267
+ STATUS_EVALUATION_EXPIRATION NTStatus = 0xC0000268
+ STATUS_ILLEGAL_DLL_RELOCATION NTStatus = 0xC0000269
+ STATUS_LICENSE_VIOLATION NTStatus = 0xC000026A
+ STATUS_DLL_INIT_FAILED_LOGOFF NTStatus = 0xC000026B
+ STATUS_DRIVER_UNABLE_TO_LOAD NTStatus = 0xC000026C
+ STATUS_DFS_UNAVAILABLE NTStatus = 0xC000026D
+ STATUS_VOLUME_DISMOUNTED NTStatus = 0xC000026E
+ STATUS_WX86_INTERNAL_ERROR NTStatus = 0xC000026F
+ STATUS_WX86_FLOAT_STACK_CHECK NTStatus = 0xC0000270
+ STATUS_VALIDATE_CONTINUE NTStatus = 0xC0000271
+ STATUS_NO_MATCH NTStatus = 0xC0000272
+ STATUS_NO_MORE_MATCHES NTStatus = 0xC0000273
+ STATUS_NOT_A_REPARSE_POINT NTStatus = 0xC0000275
+ STATUS_IO_REPARSE_TAG_INVALID NTStatus = 0xC0000276
+ STATUS_IO_REPARSE_TAG_MISMATCH NTStatus = 0xC0000277
+ STATUS_IO_REPARSE_DATA_INVALID NTStatus = 0xC0000278
+ STATUS_IO_REPARSE_TAG_NOT_HANDLED NTStatus = 0xC0000279
+ STATUS_PWD_TOO_LONG NTStatus = 0xC000027A
+ STATUS_STOWED_EXCEPTION NTStatus = 0xC000027B
+ STATUS_CONTEXT_STOWED_EXCEPTION NTStatus = 0xC000027C
+ STATUS_REPARSE_POINT_NOT_RESOLVED NTStatus = 0xC0000280
+ STATUS_DIRECTORY_IS_A_REPARSE_POINT NTStatus = 0xC0000281
+ STATUS_RANGE_LIST_CONFLICT NTStatus = 0xC0000282
+ STATUS_SOURCE_ELEMENT_EMPTY NTStatus = 0xC0000283
+ STATUS_DESTINATION_ELEMENT_FULL NTStatus = 0xC0000284
+ STATUS_ILLEGAL_ELEMENT_ADDRESS NTStatus = 0xC0000285
+ STATUS_MAGAZINE_NOT_PRESENT NTStatus = 0xC0000286
+ STATUS_REINITIALIZATION_NEEDED NTStatus = 0xC0000287
+ STATUS_DEVICE_REQUIRES_CLEANING NTStatus = 0x80000288
+ STATUS_DEVICE_DOOR_OPEN NTStatus = 0x80000289
+ STATUS_ENCRYPTION_FAILED NTStatus = 0xC000028A
+ STATUS_DECRYPTION_FAILED NTStatus = 0xC000028B
+ STATUS_RANGE_NOT_FOUND NTStatus = 0xC000028C
+ STATUS_NO_RECOVERY_POLICY NTStatus = 0xC000028D
+ STATUS_NO_EFS NTStatus = 0xC000028E
+ STATUS_WRONG_EFS NTStatus = 0xC000028F
+ STATUS_NO_USER_KEYS NTStatus = 0xC0000290
+ STATUS_FILE_NOT_ENCRYPTED NTStatus = 0xC0000291
+ STATUS_NOT_EXPORT_FORMAT NTStatus = 0xC0000292
+ STATUS_FILE_ENCRYPTED NTStatus = 0xC0000293
+ STATUS_WAKE_SYSTEM NTStatus = 0x40000294
+ STATUS_WMI_GUID_NOT_FOUND NTStatus = 0xC0000295
+ STATUS_WMI_INSTANCE_NOT_FOUND NTStatus = 0xC0000296
+ STATUS_WMI_ITEMID_NOT_FOUND NTStatus = 0xC0000297
+ STATUS_WMI_TRY_AGAIN NTStatus = 0xC0000298
+ STATUS_SHARED_POLICY NTStatus = 0xC0000299
+ STATUS_POLICY_OBJECT_NOT_FOUND NTStatus = 0xC000029A
+ STATUS_POLICY_ONLY_IN_DS NTStatus = 0xC000029B
+ STATUS_VOLUME_NOT_UPGRADED NTStatus = 0xC000029C
+ STATUS_REMOTE_STORAGE_NOT_ACTIVE NTStatus = 0xC000029D
+ STATUS_REMOTE_STORAGE_MEDIA_ERROR NTStatus = 0xC000029E
+ STATUS_NO_TRACKING_SERVICE NTStatus = 0xC000029F
+ STATUS_SERVER_SID_MISMATCH NTStatus = 0xC00002A0
+ STATUS_DS_NO_ATTRIBUTE_OR_VALUE NTStatus = 0xC00002A1
+ STATUS_DS_INVALID_ATTRIBUTE_SYNTAX NTStatus = 0xC00002A2
+ STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED NTStatus = 0xC00002A3
+ STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS NTStatus = 0xC00002A4
+ STATUS_DS_BUSY NTStatus = 0xC00002A5
+ STATUS_DS_UNAVAILABLE NTStatus = 0xC00002A6
+ STATUS_DS_NO_RIDS_ALLOCATED NTStatus = 0xC00002A7
+ STATUS_DS_NO_MORE_RIDS NTStatus = 0xC00002A8
+ STATUS_DS_INCORRECT_ROLE_OWNER NTStatus = 0xC00002A9
+ STATUS_DS_RIDMGR_INIT_ERROR NTStatus = 0xC00002AA
+ STATUS_DS_OBJ_CLASS_VIOLATION NTStatus = 0xC00002AB
+ STATUS_DS_CANT_ON_NON_LEAF NTStatus = 0xC00002AC
+ STATUS_DS_CANT_ON_RDN NTStatus = 0xC00002AD
+ STATUS_DS_CANT_MOD_OBJ_CLASS NTStatus = 0xC00002AE
+ STATUS_DS_CROSS_DOM_MOVE_FAILED NTStatus = 0xC00002AF
+ STATUS_DS_GC_NOT_AVAILABLE NTStatus = 0xC00002B0
+ STATUS_DIRECTORY_SERVICE_REQUIRED NTStatus = 0xC00002B1
+ STATUS_REPARSE_ATTRIBUTE_CONFLICT NTStatus = 0xC00002B2
+ STATUS_CANT_ENABLE_DENY_ONLY NTStatus = 0xC00002B3
+ STATUS_FLOAT_MULTIPLE_FAULTS NTStatus = 0xC00002B4
+ STATUS_FLOAT_MULTIPLE_TRAPS NTStatus = 0xC00002B5
+ STATUS_DEVICE_REMOVED NTStatus = 0xC00002B6
+ STATUS_JOURNAL_DELETE_IN_PROGRESS NTStatus = 0xC00002B7
+ STATUS_JOURNAL_NOT_ACTIVE NTStatus = 0xC00002B8
+ STATUS_NOINTERFACE NTStatus = 0xC00002B9
+ STATUS_DS_RIDMGR_DISABLED NTStatus = 0xC00002BA
+ STATUS_DS_ADMIN_LIMIT_EXCEEDED NTStatus = 0xC00002C1
+ STATUS_DRIVER_FAILED_SLEEP NTStatus = 0xC00002C2
+ STATUS_MUTUAL_AUTHENTICATION_FAILED NTStatus = 0xC00002C3
+ STATUS_CORRUPT_SYSTEM_FILE NTStatus = 0xC00002C4
+ STATUS_DATATYPE_MISALIGNMENT_ERROR NTStatus = 0xC00002C5
+ STATUS_WMI_READ_ONLY NTStatus = 0xC00002C6
+ STATUS_WMI_SET_FAILURE NTStatus = 0xC00002C7
+ STATUS_COMMITMENT_MINIMUM NTStatus = 0xC00002C8
+ STATUS_REG_NAT_CONSUMPTION NTStatus = 0xC00002C9
+ STATUS_TRANSPORT_FULL NTStatus = 0xC00002CA
+ STATUS_DS_SAM_INIT_FAILURE NTStatus = 0xC00002CB
+ STATUS_ONLY_IF_CONNECTED NTStatus = 0xC00002CC
+ STATUS_DS_SENSITIVE_GROUP_VIOLATION NTStatus = 0xC00002CD
+ STATUS_PNP_RESTART_ENUMERATION NTStatus = 0xC00002CE
+ STATUS_JOURNAL_ENTRY_DELETED NTStatus = 0xC00002CF
+ STATUS_DS_CANT_MOD_PRIMARYGROUPID NTStatus = 0xC00002D0
+ STATUS_SYSTEM_IMAGE_BAD_SIGNATURE NTStatus = 0xC00002D1
+ STATUS_PNP_REBOOT_REQUIRED NTStatus = 0xC00002D2
+ STATUS_POWER_STATE_INVALID NTStatus = 0xC00002D3
+ STATUS_DS_INVALID_GROUP_TYPE NTStatus = 0xC00002D4
+ STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN NTStatus = 0xC00002D5
+ STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN NTStatus = 0xC00002D6
+ STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER NTStatus = 0xC00002D7
+ STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER NTStatus = 0xC00002D8
+ STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER NTStatus = 0xC00002D9
+ STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER NTStatus = 0xC00002DA
+ STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER NTStatus = 0xC00002DB
+ STATUS_DS_HAVE_PRIMARY_MEMBERS NTStatus = 0xC00002DC
+ STATUS_WMI_NOT_SUPPORTED NTStatus = 0xC00002DD
+ STATUS_INSUFFICIENT_POWER NTStatus = 0xC00002DE
+ STATUS_SAM_NEED_BOOTKEY_PASSWORD NTStatus = 0xC00002DF
+ STATUS_SAM_NEED_BOOTKEY_FLOPPY NTStatus = 0xC00002E0
+ STATUS_DS_CANT_START NTStatus = 0xC00002E1
+ STATUS_DS_INIT_FAILURE NTStatus = 0xC00002E2
+ STATUS_SAM_INIT_FAILURE NTStatus = 0xC00002E3
+ STATUS_DS_GC_REQUIRED NTStatus = 0xC00002E4
+ STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY NTStatus = 0xC00002E5
+ STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS NTStatus = 0xC00002E6
+ STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED NTStatus = 0xC00002E7
+ STATUS_MULTIPLE_FAULT_VIOLATION NTStatus = 0xC00002E8
+ STATUS_CURRENT_DOMAIN_NOT_ALLOWED NTStatus = 0xC00002E9
+ STATUS_CANNOT_MAKE NTStatus = 0xC00002EA
+ STATUS_SYSTEM_SHUTDOWN NTStatus = 0xC00002EB
+ STATUS_DS_INIT_FAILURE_CONSOLE NTStatus = 0xC00002EC
+ STATUS_DS_SAM_INIT_FAILURE_CONSOLE NTStatus = 0xC00002ED
+ STATUS_UNFINISHED_CONTEXT_DELETED NTStatus = 0xC00002EE
+ STATUS_NO_TGT_REPLY NTStatus = 0xC00002EF
+ STATUS_OBJECTID_NOT_FOUND NTStatus = 0xC00002F0
+ STATUS_NO_IP_ADDRESSES NTStatus = 0xC00002F1
+ STATUS_WRONG_CREDENTIAL_HANDLE NTStatus = 0xC00002F2
+ STATUS_CRYPTO_SYSTEM_INVALID NTStatus = 0xC00002F3
+ STATUS_MAX_REFERRALS_EXCEEDED NTStatus = 0xC00002F4
+ STATUS_MUST_BE_KDC NTStatus = 0xC00002F5
+ STATUS_STRONG_CRYPTO_NOT_SUPPORTED NTStatus = 0xC00002F6
+ STATUS_TOO_MANY_PRINCIPALS NTStatus = 0xC00002F7
+ STATUS_NO_PA_DATA NTStatus = 0xC00002F8
+ STATUS_PKINIT_NAME_MISMATCH NTStatus = 0xC00002F9
+ STATUS_SMARTCARD_LOGON_REQUIRED NTStatus = 0xC00002FA
+ STATUS_KDC_INVALID_REQUEST NTStatus = 0xC00002FB
+ STATUS_KDC_UNABLE_TO_REFER NTStatus = 0xC00002FC
+ STATUS_KDC_UNKNOWN_ETYPE NTStatus = 0xC00002FD
+ STATUS_SHUTDOWN_IN_PROGRESS NTStatus = 0xC00002FE
+ STATUS_SERVER_SHUTDOWN_IN_PROGRESS NTStatus = 0xC00002FF
+ STATUS_NOT_SUPPORTED_ON_SBS NTStatus = 0xC0000300
+ STATUS_WMI_GUID_DISCONNECTED NTStatus = 0xC0000301
+ STATUS_WMI_ALREADY_DISABLED NTStatus = 0xC0000302
+ STATUS_WMI_ALREADY_ENABLED NTStatus = 0xC0000303
+ STATUS_MFT_TOO_FRAGMENTED NTStatus = 0xC0000304
+ STATUS_COPY_PROTECTION_FAILURE NTStatus = 0xC0000305
+ STATUS_CSS_AUTHENTICATION_FAILURE NTStatus = 0xC0000306
+ STATUS_CSS_KEY_NOT_PRESENT NTStatus = 0xC0000307
+ STATUS_CSS_KEY_NOT_ESTABLISHED NTStatus = 0xC0000308
+ STATUS_CSS_SCRAMBLED_SECTOR NTStatus = 0xC0000309
+ STATUS_CSS_REGION_MISMATCH NTStatus = 0xC000030A
+ STATUS_CSS_RESETS_EXHAUSTED NTStatus = 0xC000030B
+ STATUS_PASSWORD_CHANGE_REQUIRED NTStatus = 0xC000030C
+ STATUS_LOST_MODE_LOGON_RESTRICTION NTStatus = 0xC000030D
+ STATUS_PKINIT_FAILURE NTStatus = 0xC0000320
+ STATUS_SMARTCARD_SUBSYSTEM_FAILURE NTStatus = 0xC0000321
+ STATUS_NO_KERB_KEY NTStatus = 0xC0000322
+ STATUS_HOST_DOWN NTStatus = 0xC0000350
+ STATUS_UNSUPPORTED_PREAUTH NTStatus = 0xC0000351
+ STATUS_EFS_ALG_BLOB_TOO_BIG NTStatus = 0xC0000352
+ STATUS_PORT_NOT_SET NTStatus = 0xC0000353
+ STATUS_DEBUGGER_INACTIVE NTStatus = 0xC0000354
+ STATUS_DS_VERSION_CHECK_FAILURE NTStatus = 0xC0000355
+ STATUS_AUDITING_DISABLED NTStatus = 0xC0000356
+ STATUS_PRENT4_MACHINE_ACCOUNT NTStatus = 0xC0000357
+ STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER NTStatus = 0xC0000358
+ STATUS_INVALID_IMAGE_WIN_32 NTStatus = 0xC0000359
+ STATUS_INVALID_IMAGE_WIN_64 NTStatus = 0xC000035A
+ STATUS_BAD_BINDINGS NTStatus = 0xC000035B
+ STATUS_NETWORK_SESSION_EXPIRED NTStatus = 0xC000035C
+ STATUS_APPHELP_BLOCK NTStatus = 0xC000035D
+ STATUS_ALL_SIDS_FILTERED NTStatus = 0xC000035E
+ STATUS_NOT_SAFE_MODE_DRIVER NTStatus = 0xC000035F
+ STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT NTStatus = 0xC0000361
+ STATUS_ACCESS_DISABLED_BY_POLICY_PATH NTStatus = 0xC0000362
+ STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER NTStatus = 0xC0000363
+ STATUS_ACCESS_DISABLED_BY_POLICY_OTHER NTStatus = 0xC0000364
+ STATUS_FAILED_DRIVER_ENTRY NTStatus = 0xC0000365
+ STATUS_DEVICE_ENUMERATION_ERROR NTStatus = 0xC0000366
+ STATUS_MOUNT_POINT_NOT_RESOLVED NTStatus = 0xC0000368
+ STATUS_INVALID_DEVICE_OBJECT_PARAMETER NTStatus = 0xC0000369
+ STATUS_MCA_OCCURED NTStatus = 0xC000036A
+ STATUS_DRIVER_BLOCKED_CRITICAL NTStatus = 0xC000036B
+ STATUS_DRIVER_BLOCKED NTStatus = 0xC000036C
+ STATUS_DRIVER_DATABASE_ERROR NTStatus = 0xC000036D
+ STATUS_SYSTEM_HIVE_TOO_LARGE NTStatus = 0xC000036E
+ STATUS_INVALID_IMPORT_OF_NON_DLL NTStatus = 0xC000036F
+ STATUS_DS_SHUTTING_DOWN NTStatus = 0x40000370
+ STATUS_NO_SECRETS NTStatus = 0xC0000371
+ STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY NTStatus = 0xC0000372
+ STATUS_FAILED_STACK_SWITCH NTStatus = 0xC0000373
+ STATUS_HEAP_CORRUPTION NTStatus = 0xC0000374
+ STATUS_SMARTCARD_WRONG_PIN NTStatus = 0xC0000380
+ STATUS_SMARTCARD_CARD_BLOCKED NTStatus = 0xC0000381
+ STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED NTStatus = 0xC0000382
+ STATUS_SMARTCARD_NO_CARD NTStatus = 0xC0000383
+ STATUS_SMARTCARD_NO_KEY_CONTAINER NTStatus = 0xC0000384
+ STATUS_SMARTCARD_NO_CERTIFICATE NTStatus = 0xC0000385
+ STATUS_SMARTCARD_NO_KEYSET NTStatus = 0xC0000386
+ STATUS_SMARTCARD_IO_ERROR NTStatus = 0xC0000387
+ STATUS_DOWNGRADE_DETECTED NTStatus = 0xC0000388
+ STATUS_SMARTCARD_CERT_REVOKED NTStatus = 0xC0000389
+ STATUS_ISSUING_CA_UNTRUSTED NTStatus = 0xC000038A
+ STATUS_REVOCATION_OFFLINE_C NTStatus = 0xC000038B
+ STATUS_PKINIT_CLIENT_FAILURE NTStatus = 0xC000038C
+ STATUS_SMARTCARD_CERT_EXPIRED NTStatus = 0xC000038D
+ STATUS_DRIVER_FAILED_PRIOR_UNLOAD NTStatus = 0xC000038E
+ STATUS_SMARTCARD_SILENT_CONTEXT NTStatus = 0xC000038F
+ STATUS_PER_USER_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000401
+ STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000402
+ STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000403
+ STATUS_DS_NAME_NOT_UNIQUE NTStatus = 0xC0000404
+ STATUS_DS_DUPLICATE_ID_FOUND NTStatus = 0xC0000405
+ STATUS_DS_GROUP_CONVERSION_ERROR NTStatus = 0xC0000406
+ STATUS_VOLSNAP_PREPARE_HIBERNATE NTStatus = 0xC0000407
+ STATUS_USER2USER_REQUIRED NTStatus = 0xC0000408
+ STATUS_STACK_BUFFER_OVERRUN NTStatus = 0xC0000409
+ STATUS_NO_S4U_PROT_SUPPORT NTStatus = 0xC000040A
+ STATUS_CROSSREALM_DELEGATION_FAILURE NTStatus = 0xC000040B
+ STATUS_REVOCATION_OFFLINE_KDC NTStatus = 0xC000040C
+ STATUS_ISSUING_CA_UNTRUSTED_KDC NTStatus = 0xC000040D
+ STATUS_KDC_CERT_EXPIRED NTStatus = 0xC000040E
+ STATUS_KDC_CERT_REVOKED NTStatus = 0xC000040F
+ STATUS_PARAMETER_QUOTA_EXCEEDED NTStatus = 0xC0000410
+ STATUS_HIBERNATION_FAILURE NTStatus = 0xC0000411
+ STATUS_DELAY_LOAD_FAILED NTStatus = 0xC0000412
+ STATUS_AUTHENTICATION_FIREWALL_FAILED NTStatus = 0xC0000413
+ STATUS_VDM_DISALLOWED NTStatus = 0xC0000414
+ STATUS_HUNG_DISPLAY_DRIVER_THREAD NTStatus = 0xC0000415
+ STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE NTStatus = 0xC0000416
+ STATUS_INVALID_CRUNTIME_PARAMETER NTStatus = 0xC0000417
+ STATUS_NTLM_BLOCKED NTStatus = 0xC0000418
+ STATUS_DS_SRC_SID_EXISTS_IN_FOREST NTStatus = 0xC0000419
+ STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST NTStatus = 0xC000041A
+ STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST NTStatus = 0xC000041B
+ STATUS_INVALID_USER_PRINCIPAL_NAME NTStatus = 0xC000041C
+ STATUS_FATAL_USER_CALLBACK_EXCEPTION NTStatus = 0xC000041D
+ STATUS_ASSERTION_FAILURE NTStatus = 0xC0000420
+ STATUS_VERIFIER_STOP NTStatus = 0xC0000421
+ STATUS_CALLBACK_POP_STACK NTStatus = 0xC0000423
+ STATUS_INCOMPATIBLE_DRIVER_BLOCKED NTStatus = 0xC0000424
+ STATUS_HIVE_UNLOADED NTStatus = 0xC0000425
+ STATUS_COMPRESSION_DISABLED NTStatus = 0xC0000426
+ STATUS_FILE_SYSTEM_LIMITATION NTStatus = 0xC0000427
+ STATUS_INVALID_IMAGE_HASH NTStatus = 0xC0000428
+ STATUS_NOT_CAPABLE NTStatus = 0xC0000429
+ STATUS_REQUEST_OUT_OF_SEQUENCE NTStatus = 0xC000042A
+ STATUS_IMPLEMENTATION_LIMIT NTStatus = 0xC000042B
+ STATUS_ELEVATION_REQUIRED NTStatus = 0xC000042C
+ STATUS_NO_SECURITY_CONTEXT NTStatus = 0xC000042D
+ STATUS_PKU2U_CERT_FAILURE NTStatus = 0xC000042F
+ STATUS_BEYOND_VDL NTStatus = 0xC0000432
+ STATUS_ENCOUNTERED_WRITE_IN_PROGRESS NTStatus = 0xC0000433
+ STATUS_PTE_CHANGED NTStatus = 0xC0000434
+ STATUS_PURGE_FAILED NTStatus = 0xC0000435
+ STATUS_CRED_REQUIRES_CONFIRMATION NTStatus = 0xC0000440
+ STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE NTStatus = 0xC0000441
+ STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER NTStatus = 0xC0000442
+ STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE NTStatus = 0xC0000443
+ STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE NTStatus = 0xC0000444
+ STATUS_CS_ENCRYPTION_FILE_NOT_CSE NTStatus = 0xC0000445
+ STATUS_INVALID_LABEL NTStatus = 0xC0000446
+ STATUS_DRIVER_PROCESS_TERMINATED NTStatus = 0xC0000450
+ STATUS_AMBIGUOUS_SYSTEM_DEVICE NTStatus = 0xC0000451
+ STATUS_SYSTEM_DEVICE_NOT_FOUND NTStatus = 0xC0000452
+ STATUS_RESTART_BOOT_APPLICATION NTStatus = 0xC0000453
+ STATUS_INSUFFICIENT_NVRAM_RESOURCES NTStatus = 0xC0000454
+ STATUS_INVALID_SESSION NTStatus = 0xC0000455
+ STATUS_THREAD_ALREADY_IN_SESSION NTStatus = 0xC0000456
+ STATUS_THREAD_NOT_IN_SESSION NTStatus = 0xC0000457
+ STATUS_INVALID_WEIGHT NTStatus = 0xC0000458
+ STATUS_REQUEST_PAUSED NTStatus = 0xC0000459
+ STATUS_NO_RANGES_PROCESSED NTStatus = 0xC0000460
+ STATUS_DISK_RESOURCES_EXHAUSTED NTStatus = 0xC0000461
+ STATUS_NEEDS_REMEDIATION NTStatus = 0xC0000462
+ STATUS_DEVICE_FEATURE_NOT_SUPPORTED NTStatus = 0xC0000463
+ STATUS_DEVICE_UNREACHABLE NTStatus = 0xC0000464
+ STATUS_INVALID_TOKEN NTStatus = 0xC0000465
+ STATUS_SERVER_UNAVAILABLE NTStatus = 0xC0000466
+ STATUS_FILE_NOT_AVAILABLE NTStatus = 0xC0000467
+ STATUS_DEVICE_INSUFFICIENT_RESOURCES NTStatus = 0xC0000468
+ STATUS_PACKAGE_UPDATING NTStatus = 0xC0000469
+ STATUS_NOT_READ_FROM_COPY NTStatus = 0xC000046A
+ STATUS_FT_WRITE_FAILURE NTStatus = 0xC000046B
+ STATUS_FT_DI_SCAN_REQUIRED NTStatus = 0xC000046C
+ STATUS_OBJECT_NOT_EXTERNALLY_BACKED NTStatus = 0xC000046D
+ STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN NTStatus = 0xC000046E
+ STATUS_COMPRESSION_NOT_BENEFICIAL NTStatus = 0xC000046F
+ STATUS_DATA_CHECKSUM_ERROR NTStatus = 0xC0000470
+ STATUS_INTERMIXED_KERNEL_EA_OPERATION NTStatus = 0xC0000471
+ STATUS_TRIM_READ_ZERO_NOT_SUPPORTED NTStatus = 0xC0000472
+ STATUS_TOO_MANY_SEGMENT_DESCRIPTORS NTStatus = 0xC0000473
+ STATUS_INVALID_OFFSET_ALIGNMENT NTStatus = 0xC0000474
+ STATUS_INVALID_FIELD_IN_PARAMETER_LIST NTStatus = 0xC0000475
+ STATUS_OPERATION_IN_PROGRESS NTStatus = 0xC0000476
+ STATUS_INVALID_INITIATOR_TARGET_PATH NTStatus = 0xC0000477
+ STATUS_SCRUB_DATA_DISABLED NTStatus = 0xC0000478
+ STATUS_NOT_REDUNDANT_STORAGE NTStatus = 0xC0000479
+ STATUS_RESIDENT_FILE_NOT_SUPPORTED NTStatus = 0xC000047A
+ STATUS_COMPRESSED_FILE_NOT_SUPPORTED NTStatus = 0xC000047B
+ STATUS_DIRECTORY_NOT_SUPPORTED NTStatus = 0xC000047C
+ STATUS_IO_OPERATION_TIMEOUT NTStatus = 0xC000047D
+ STATUS_SYSTEM_NEEDS_REMEDIATION NTStatus = 0xC000047E
+ STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN NTStatus = 0xC000047F
+ STATUS_SHARE_UNAVAILABLE NTStatus = 0xC0000480
+ STATUS_APISET_NOT_HOSTED NTStatus = 0xC0000481
+ STATUS_APISET_NOT_PRESENT NTStatus = 0xC0000482
+ STATUS_DEVICE_HARDWARE_ERROR NTStatus = 0xC0000483
+ STATUS_FIRMWARE_SLOT_INVALID NTStatus = 0xC0000484
+ STATUS_FIRMWARE_IMAGE_INVALID NTStatus = 0xC0000485
+ STATUS_STORAGE_TOPOLOGY_ID_MISMATCH NTStatus = 0xC0000486
+ STATUS_WIM_NOT_BOOTABLE NTStatus = 0xC0000487
+ STATUS_BLOCKED_BY_PARENTAL_CONTROLS NTStatus = 0xC0000488
+ STATUS_NEEDS_REGISTRATION NTStatus = 0xC0000489
+ STATUS_QUOTA_ACTIVITY NTStatus = 0xC000048A
+ STATUS_CALLBACK_INVOKE_INLINE NTStatus = 0xC000048B
+ STATUS_BLOCK_TOO_MANY_REFERENCES NTStatus = 0xC000048C
+ STATUS_MARKED_TO_DISALLOW_WRITES NTStatus = 0xC000048D
+ STATUS_NETWORK_ACCESS_DENIED_EDP NTStatus = 0xC000048E
+ STATUS_ENCLAVE_FAILURE NTStatus = 0xC000048F
+ STATUS_PNP_NO_COMPAT_DRIVERS NTStatus = 0xC0000490
+ STATUS_PNP_DRIVER_PACKAGE_NOT_FOUND NTStatus = 0xC0000491
+ STATUS_PNP_DRIVER_CONFIGURATION_NOT_FOUND NTStatus = 0xC0000492
+ STATUS_PNP_DRIVER_CONFIGURATION_INCOMPLETE NTStatus = 0xC0000493
+ STATUS_PNP_FUNCTION_DRIVER_REQUIRED NTStatus = 0xC0000494
+ STATUS_PNP_DEVICE_CONFIGURATION_PENDING NTStatus = 0xC0000495
+ STATUS_DEVICE_HINT_NAME_BUFFER_TOO_SMALL NTStatus = 0xC0000496
+ STATUS_PACKAGE_NOT_AVAILABLE NTStatus = 0xC0000497
+ STATUS_DEVICE_IN_MAINTENANCE NTStatus = 0xC0000499
+ STATUS_NOT_SUPPORTED_ON_DAX NTStatus = 0xC000049A
+ STATUS_FREE_SPACE_TOO_FRAGMENTED NTStatus = 0xC000049B
+ STATUS_DAX_MAPPING_EXISTS NTStatus = 0xC000049C
+ STATUS_CHILD_PROCESS_BLOCKED NTStatus = 0xC000049D
+ STATUS_STORAGE_LOST_DATA_PERSISTENCE NTStatus = 0xC000049E
+ STATUS_VRF_CFG_ENABLED NTStatus = 0xC000049F
+ STATUS_PARTITION_TERMINATING NTStatus = 0xC00004A0
+ STATUS_EXTERNAL_SYSKEY_NOT_SUPPORTED NTStatus = 0xC00004A1
+ STATUS_ENCLAVE_VIOLATION NTStatus = 0xC00004A2
+ STATUS_FILE_PROTECTED_UNDER_DPL NTStatus = 0xC00004A3
+ STATUS_VOLUME_NOT_CLUSTER_ALIGNED NTStatus = 0xC00004A4
+ STATUS_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND NTStatus = 0xC00004A5
+ STATUS_APPX_FILE_NOT_ENCRYPTED NTStatus = 0xC00004A6
+ STATUS_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED NTStatus = 0xC00004A7
+ STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET NTStatus = 0xC00004A8
+ STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE NTStatus = 0xC00004A9
+ STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER NTStatus = 0xC00004AA
+ STATUS_FT_READ_FAILURE NTStatus = 0xC00004AB
+ STATUS_PATCH_CONFLICT NTStatus = 0xC00004AC
+ STATUS_STORAGE_RESERVE_ID_INVALID NTStatus = 0xC00004AD
+ STATUS_STORAGE_RESERVE_DOES_NOT_EXIST NTStatus = 0xC00004AE
+ STATUS_STORAGE_RESERVE_ALREADY_EXISTS NTStatus = 0xC00004AF
+ STATUS_STORAGE_RESERVE_NOT_EMPTY NTStatus = 0xC00004B0
+ STATUS_NOT_A_DAX_VOLUME NTStatus = 0xC00004B1
+ STATUS_NOT_DAX_MAPPABLE NTStatus = 0xC00004B2
+ STATUS_CASE_DIFFERING_NAMES_IN_DIR NTStatus = 0xC00004B3
+ STATUS_FILE_NOT_SUPPORTED NTStatus = 0xC00004B4
+ STATUS_NOT_SUPPORTED_WITH_BTT NTStatus = 0xC00004B5
+ STATUS_ENCRYPTION_DISABLED NTStatus = 0xC00004B6
+ STATUS_ENCRYPTING_METADATA_DISALLOWED NTStatus = 0xC00004B7
+ STATUS_CANT_CLEAR_ENCRYPTION_FLAG NTStatus = 0xC00004B8
+ STATUS_INVALID_TASK_NAME NTStatus = 0xC0000500
+ STATUS_INVALID_TASK_INDEX NTStatus = 0xC0000501
+ STATUS_THREAD_ALREADY_IN_TASK NTStatus = 0xC0000502
+ STATUS_CALLBACK_BYPASS NTStatus = 0xC0000503
+ STATUS_UNDEFINED_SCOPE NTStatus = 0xC0000504
+ STATUS_INVALID_CAP NTStatus = 0xC0000505
+ STATUS_NOT_GUI_PROCESS NTStatus = 0xC0000506
+ STATUS_DEVICE_HUNG NTStatus = 0xC0000507
+ STATUS_CONTAINER_ASSIGNED NTStatus = 0xC0000508
+ STATUS_JOB_NO_CONTAINER NTStatus = 0xC0000509
+ STATUS_DEVICE_UNRESPONSIVE NTStatus = 0xC000050A
+ STATUS_REPARSE_POINT_ENCOUNTERED NTStatus = 0xC000050B
+ STATUS_ATTRIBUTE_NOT_PRESENT NTStatus = 0xC000050C
+ STATUS_NOT_A_TIERED_VOLUME NTStatus = 0xC000050D
+ STATUS_ALREADY_HAS_STREAM_ID NTStatus = 0xC000050E
+ STATUS_JOB_NOT_EMPTY NTStatus = 0xC000050F
+ STATUS_ALREADY_INITIALIZED NTStatus = 0xC0000510
+ STATUS_ENCLAVE_NOT_TERMINATED NTStatus = 0xC0000511
+ STATUS_ENCLAVE_IS_TERMINATING NTStatus = 0xC0000512
+ STATUS_SMB1_NOT_AVAILABLE NTStatus = 0xC0000513
+ STATUS_SMR_GARBAGE_COLLECTION_REQUIRED NTStatus = 0xC0000514
+ STATUS_INTERRUPTED NTStatus = 0xC0000515
+ STATUS_THREAD_NOT_RUNNING NTStatus = 0xC0000516
+ STATUS_FAIL_FAST_EXCEPTION NTStatus = 0xC0000602
+ STATUS_IMAGE_CERT_REVOKED NTStatus = 0xC0000603
+ STATUS_DYNAMIC_CODE_BLOCKED NTStatus = 0xC0000604
+ STATUS_IMAGE_CERT_EXPIRED NTStatus = 0xC0000605
+ STATUS_STRICT_CFG_VIOLATION NTStatus = 0xC0000606
+ STATUS_SET_CONTEXT_DENIED NTStatus = 0xC000060A
+ STATUS_CROSS_PARTITION_VIOLATION NTStatus = 0xC000060B
+ STATUS_PORT_CLOSED NTStatus = 0xC0000700
+ STATUS_MESSAGE_LOST NTStatus = 0xC0000701
+ STATUS_INVALID_MESSAGE NTStatus = 0xC0000702
+ STATUS_REQUEST_CANCELED NTStatus = 0xC0000703
+ STATUS_RECURSIVE_DISPATCH NTStatus = 0xC0000704
+ STATUS_LPC_RECEIVE_BUFFER_EXPECTED NTStatus = 0xC0000705
+ STATUS_LPC_INVALID_CONNECTION_USAGE NTStatus = 0xC0000706
+ STATUS_LPC_REQUESTS_NOT_ALLOWED NTStatus = 0xC0000707
+ STATUS_RESOURCE_IN_USE NTStatus = 0xC0000708
+ STATUS_HARDWARE_MEMORY_ERROR NTStatus = 0xC0000709
+ STATUS_THREADPOOL_HANDLE_EXCEPTION NTStatus = 0xC000070A
+ STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED NTStatus = 0xC000070B
+ STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED NTStatus = 0xC000070C
+ STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED NTStatus = 0xC000070D
+ STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED NTStatus = 0xC000070E
+ STATUS_THREADPOOL_RELEASED_DURING_OPERATION NTStatus = 0xC000070F
+ STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING NTStatus = 0xC0000710
+ STATUS_APC_RETURNED_WHILE_IMPERSONATING NTStatus = 0xC0000711
+ STATUS_PROCESS_IS_PROTECTED NTStatus = 0xC0000712
+ STATUS_MCA_EXCEPTION NTStatus = 0xC0000713
+ STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE NTStatus = 0xC0000714
+ STATUS_SYMLINK_CLASS_DISABLED NTStatus = 0xC0000715
+ STATUS_INVALID_IDN_NORMALIZATION NTStatus = 0xC0000716
+ STATUS_NO_UNICODE_TRANSLATION NTStatus = 0xC0000717
+ STATUS_ALREADY_REGISTERED NTStatus = 0xC0000718
+ STATUS_CONTEXT_MISMATCH NTStatus = 0xC0000719
+ STATUS_PORT_ALREADY_HAS_COMPLETION_LIST NTStatus = 0xC000071A
+ STATUS_CALLBACK_RETURNED_THREAD_PRIORITY NTStatus = 0xC000071B
+ STATUS_INVALID_THREAD NTStatus = 0xC000071C
+ STATUS_CALLBACK_RETURNED_TRANSACTION NTStatus = 0xC000071D
+ STATUS_CALLBACK_RETURNED_LDR_LOCK NTStatus = 0xC000071E
+ STATUS_CALLBACK_RETURNED_LANG NTStatus = 0xC000071F
+ STATUS_CALLBACK_RETURNED_PRI_BACK NTStatus = 0xC0000720
+ STATUS_CALLBACK_RETURNED_THREAD_AFFINITY NTStatus = 0xC0000721
+ STATUS_LPC_HANDLE_COUNT_EXCEEDED NTStatus = 0xC0000722
+ STATUS_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000723
+ STATUS_KERNEL_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000724
+ STATUS_ATTACHED_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000725
+ STATUS_TRIGGERED_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000726
+ STATUS_DISK_REPAIR_DISABLED NTStatus = 0xC0000800
+ STATUS_DS_DOMAIN_RENAME_IN_PROGRESS NTStatus = 0xC0000801
+ STATUS_DISK_QUOTA_EXCEEDED NTStatus = 0xC0000802
+ STATUS_DATA_LOST_REPAIR NTStatus = 0x80000803
+ STATUS_CONTENT_BLOCKED NTStatus = 0xC0000804
+ STATUS_BAD_CLUSTERS NTStatus = 0xC0000805
+ STATUS_VOLUME_DIRTY NTStatus = 0xC0000806
+ STATUS_DISK_REPAIR_REDIRECTED NTStatus = 0x40000807
+ STATUS_DISK_REPAIR_UNSUCCESSFUL NTStatus = 0xC0000808
+ STATUS_CORRUPT_LOG_OVERFULL NTStatus = 0xC0000809
+ STATUS_CORRUPT_LOG_CORRUPTED NTStatus = 0xC000080A
+ STATUS_CORRUPT_LOG_UNAVAILABLE NTStatus = 0xC000080B
+ STATUS_CORRUPT_LOG_DELETED_FULL NTStatus = 0xC000080C
+ STATUS_CORRUPT_LOG_CLEARED NTStatus = 0xC000080D
+ STATUS_ORPHAN_NAME_EXHAUSTED NTStatus = 0xC000080E
+ STATUS_PROACTIVE_SCAN_IN_PROGRESS NTStatus = 0xC000080F
+ STATUS_ENCRYPTED_IO_NOT_POSSIBLE NTStatus = 0xC0000810
+ STATUS_CORRUPT_LOG_UPLEVEL_RECORDS NTStatus = 0xC0000811
+ STATUS_FILE_CHECKED_OUT NTStatus = 0xC0000901
+ STATUS_CHECKOUT_REQUIRED NTStatus = 0xC0000902
+ STATUS_BAD_FILE_TYPE NTStatus = 0xC0000903
+ STATUS_FILE_TOO_LARGE NTStatus = 0xC0000904
+ STATUS_FORMS_AUTH_REQUIRED NTStatus = 0xC0000905
+ STATUS_VIRUS_INFECTED NTStatus = 0xC0000906
+ STATUS_VIRUS_DELETED NTStatus = 0xC0000907
+ STATUS_BAD_MCFG_TABLE NTStatus = 0xC0000908
+ STATUS_CANNOT_BREAK_OPLOCK NTStatus = 0xC0000909
+ STATUS_BAD_KEY NTStatus = 0xC000090A
+ STATUS_BAD_DATA NTStatus = 0xC000090B
+ STATUS_NO_KEY NTStatus = 0xC000090C
+ STATUS_FILE_HANDLE_REVOKED NTStatus = 0xC0000910
+ STATUS_WOW_ASSERTION NTStatus = 0xC0009898
+ STATUS_INVALID_SIGNATURE NTStatus = 0xC000A000
+ STATUS_HMAC_NOT_SUPPORTED NTStatus = 0xC000A001
+ STATUS_AUTH_TAG_MISMATCH NTStatus = 0xC000A002
+ STATUS_INVALID_STATE_TRANSITION NTStatus = 0xC000A003
+ STATUS_INVALID_KERNEL_INFO_VERSION NTStatus = 0xC000A004
+ STATUS_INVALID_PEP_INFO_VERSION NTStatus = 0xC000A005
+ STATUS_HANDLE_REVOKED NTStatus = 0xC000A006
+ STATUS_EOF_ON_GHOSTED_RANGE NTStatus = 0xC000A007
+ STATUS_IPSEC_QUEUE_OVERFLOW NTStatus = 0xC000A010
+ STATUS_ND_QUEUE_OVERFLOW NTStatus = 0xC000A011
+ STATUS_HOPLIMIT_EXCEEDED NTStatus = 0xC000A012
+ STATUS_PROTOCOL_NOT_SUPPORTED NTStatus = 0xC000A013
+ STATUS_FASTPATH_REJECTED NTStatus = 0xC000A014
+ STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED NTStatus = 0xC000A080
+ STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR NTStatus = 0xC000A081
+ STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR NTStatus = 0xC000A082
+ STATUS_XML_PARSE_ERROR NTStatus = 0xC000A083
+ STATUS_XMLDSIG_ERROR NTStatus = 0xC000A084
+ STATUS_WRONG_COMPARTMENT NTStatus = 0xC000A085
+ STATUS_AUTHIP_FAILURE NTStatus = 0xC000A086
+ STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS NTStatus = 0xC000A087
+ STATUS_DS_OID_NOT_FOUND NTStatus = 0xC000A088
+ STATUS_INCORRECT_ACCOUNT_TYPE NTStatus = 0xC000A089
+ STATUS_HASH_NOT_SUPPORTED NTStatus = 0xC000A100
+ STATUS_HASH_NOT_PRESENT NTStatus = 0xC000A101
+ STATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED NTStatus = 0xC000A121
+ STATUS_GPIO_CLIENT_INFORMATION_INVALID NTStatus = 0xC000A122
+ STATUS_GPIO_VERSION_NOT_SUPPORTED NTStatus = 0xC000A123
+ STATUS_GPIO_INVALID_REGISTRATION_PACKET NTStatus = 0xC000A124
+ STATUS_GPIO_OPERATION_DENIED NTStatus = 0xC000A125
+ STATUS_GPIO_INCOMPATIBLE_CONNECT_MODE NTStatus = 0xC000A126
+ STATUS_GPIO_INTERRUPT_ALREADY_UNMASKED NTStatus = 0x8000A127
+ STATUS_CANNOT_SWITCH_RUNLEVEL NTStatus = 0xC000A141
+ STATUS_INVALID_RUNLEVEL_SETTING NTStatus = 0xC000A142
+ STATUS_RUNLEVEL_SWITCH_TIMEOUT NTStatus = 0xC000A143
+ STATUS_SERVICES_FAILED_AUTOSTART NTStatus = 0x4000A144
+ STATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT NTStatus = 0xC000A145
+ STATUS_RUNLEVEL_SWITCH_IN_PROGRESS NTStatus = 0xC000A146
+ STATUS_NOT_APPCONTAINER NTStatus = 0xC000A200
+ STATUS_NOT_SUPPORTED_IN_APPCONTAINER NTStatus = 0xC000A201
+ STATUS_INVALID_PACKAGE_SID_LENGTH NTStatus = 0xC000A202
+ STATUS_LPAC_ACCESS_DENIED NTStatus = 0xC000A203
+ STATUS_ADMINLESS_ACCESS_DENIED NTStatus = 0xC000A204
+ STATUS_APP_DATA_NOT_FOUND NTStatus = 0xC000A281
+ STATUS_APP_DATA_EXPIRED NTStatus = 0xC000A282
+ STATUS_APP_DATA_CORRUPT NTStatus = 0xC000A283
+ STATUS_APP_DATA_LIMIT_EXCEEDED NTStatus = 0xC000A284
+ STATUS_APP_DATA_REBOOT_REQUIRED NTStatus = 0xC000A285
+ STATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED NTStatus = 0xC000A2A1
+ STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED NTStatus = 0xC000A2A2
+ STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED NTStatus = 0xC000A2A3
+ STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED NTStatus = 0xC000A2A4
+ STATUS_WOF_WIM_HEADER_CORRUPT NTStatus = 0xC000A2A5
+ STATUS_WOF_WIM_RESOURCE_TABLE_CORRUPT NTStatus = 0xC000A2A6
+ STATUS_WOF_FILE_RESOURCE_TABLE_CORRUPT NTStatus = 0xC000A2A7
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE NTStatus = 0xC000CE01
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT NTStatus = 0xC000CE02
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_BUSY NTStatus = 0xC000CE03
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN NTStatus = 0xC000CE04
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION NTStatus = 0xC000CE05
+ STATUS_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT NTStatus = 0xC000CF00
+ STATUS_CLOUD_FILE_PROVIDER_NOT_RUNNING NTStatus = 0xC000CF01
+ STATUS_CLOUD_FILE_METADATA_CORRUPT NTStatus = 0xC000CF02
+ STATUS_CLOUD_FILE_METADATA_TOO_LARGE NTStatus = 0xC000CF03
+ STATUS_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE NTStatus = 0x8000CF04
+ STATUS_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS NTStatus = 0x8000CF05
+ STATUS_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED NTStatus = 0xC000CF06
+ STATUS_NOT_A_CLOUD_FILE NTStatus = 0xC000CF07
+ STATUS_CLOUD_FILE_NOT_IN_SYNC NTStatus = 0xC000CF08
+ STATUS_CLOUD_FILE_ALREADY_CONNECTED NTStatus = 0xC000CF09
+ STATUS_CLOUD_FILE_NOT_SUPPORTED NTStatus = 0xC000CF0A
+ STATUS_CLOUD_FILE_INVALID_REQUEST NTStatus = 0xC000CF0B
+ STATUS_CLOUD_FILE_READ_ONLY_VOLUME NTStatus = 0xC000CF0C
+ STATUS_CLOUD_FILE_CONNECTED_PROVIDER_ONLY NTStatus = 0xC000CF0D
+ STATUS_CLOUD_FILE_VALIDATION_FAILED NTStatus = 0xC000CF0E
+ STATUS_CLOUD_FILE_AUTHENTICATION_FAILED NTStatus = 0xC000CF0F
+ STATUS_CLOUD_FILE_INSUFFICIENT_RESOURCES NTStatus = 0xC000CF10
+ STATUS_CLOUD_FILE_NETWORK_UNAVAILABLE NTStatus = 0xC000CF11
+ STATUS_CLOUD_FILE_UNSUCCESSFUL NTStatus = 0xC000CF12
+ STATUS_CLOUD_FILE_NOT_UNDER_SYNC_ROOT NTStatus = 0xC000CF13
+ STATUS_CLOUD_FILE_IN_USE NTStatus = 0xC000CF14
+ STATUS_CLOUD_FILE_PINNED NTStatus = 0xC000CF15
+ STATUS_CLOUD_FILE_REQUEST_ABORTED NTStatus = 0xC000CF16
+ STATUS_CLOUD_FILE_PROPERTY_CORRUPT NTStatus = 0xC000CF17
+ STATUS_CLOUD_FILE_ACCESS_DENIED NTStatus = 0xC000CF18
+ STATUS_CLOUD_FILE_INCOMPATIBLE_HARDLINKS NTStatus = 0xC000CF19
+ STATUS_CLOUD_FILE_PROPERTY_LOCK_CONFLICT NTStatus = 0xC000CF1A
+ STATUS_CLOUD_FILE_REQUEST_CANCELED NTStatus = 0xC000CF1B
+ STATUS_CLOUD_FILE_PROVIDER_TERMINATED NTStatus = 0xC000CF1D
+ STATUS_NOT_A_CLOUD_SYNC_ROOT NTStatus = 0xC000CF1E
+ STATUS_CLOUD_FILE_REQUEST_TIMEOUT NTStatus = 0xC000CF1F
+ STATUS_ACPI_INVALID_OPCODE NTStatus = 0xC0140001
+ STATUS_ACPI_STACK_OVERFLOW NTStatus = 0xC0140002
+ STATUS_ACPI_ASSERT_FAILED NTStatus = 0xC0140003
+ STATUS_ACPI_INVALID_INDEX NTStatus = 0xC0140004
+ STATUS_ACPI_INVALID_ARGUMENT NTStatus = 0xC0140005
+ STATUS_ACPI_FATAL NTStatus = 0xC0140006
+ STATUS_ACPI_INVALID_SUPERNAME NTStatus = 0xC0140007
+ STATUS_ACPI_INVALID_ARGTYPE NTStatus = 0xC0140008
+ STATUS_ACPI_INVALID_OBJTYPE NTStatus = 0xC0140009
+ STATUS_ACPI_INVALID_TARGETTYPE NTStatus = 0xC014000A
+ STATUS_ACPI_INCORRECT_ARGUMENT_COUNT NTStatus = 0xC014000B
+ STATUS_ACPI_ADDRESS_NOT_MAPPED NTStatus = 0xC014000C
+ STATUS_ACPI_INVALID_EVENTTYPE NTStatus = 0xC014000D
+ STATUS_ACPI_HANDLER_COLLISION NTStatus = 0xC014000E
+ STATUS_ACPI_INVALID_DATA NTStatus = 0xC014000F
+ STATUS_ACPI_INVALID_REGION NTStatus = 0xC0140010
+ STATUS_ACPI_INVALID_ACCESS_SIZE NTStatus = 0xC0140011
+ STATUS_ACPI_ACQUIRE_GLOBAL_LOCK NTStatus = 0xC0140012
+ STATUS_ACPI_ALREADY_INITIALIZED NTStatus = 0xC0140013
+ STATUS_ACPI_NOT_INITIALIZED NTStatus = 0xC0140014
+ STATUS_ACPI_INVALID_MUTEX_LEVEL NTStatus = 0xC0140015
+ STATUS_ACPI_MUTEX_NOT_OWNED NTStatus = 0xC0140016
+ STATUS_ACPI_MUTEX_NOT_OWNER NTStatus = 0xC0140017
+ STATUS_ACPI_RS_ACCESS NTStatus = 0xC0140018
+ STATUS_ACPI_INVALID_TABLE NTStatus = 0xC0140019
+ STATUS_ACPI_REG_HANDLER_FAILED NTStatus = 0xC0140020
+ STATUS_ACPI_POWER_REQUEST_FAILED NTStatus = 0xC0140021
+ STATUS_CTX_WINSTATION_NAME_INVALID NTStatus = 0xC00A0001
+ STATUS_CTX_INVALID_PD NTStatus = 0xC00A0002
+ STATUS_CTX_PD_NOT_FOUND NTStatus = 0xC00A0003
+ STATUS_CTX_CDM_CONNECT NTStatus = 0x400A0004
+ STATUS_CTX_CDM_DISCONNECT NTStatus = 0x400A0005
+ STATUS_CTX_CLOSE_PENDING NTStatus = 0xC00A0006
+ STATUS_CTX_NO_OUTBUF NTStatus = 0xC00A0007
+ STATUS_CTX_MODEM_INF_NOT_FOUND NTStatus = 0xC00A0008
+ STATUS_CTX_INVALID_MODEMNAME NTStatus = 0xC00A0009
+ STATUS_CTX_RESPONSE_ERROR NTStatus = 0xC00A000A
+ STATUS_CTX_MODEM_RESPONSE_TIMEOUT NTStatus = 0xC00A000B
+ STATUS_CTX_MODEM_RESPONSE_NO_CARRIER NTStatus = 0xC00A000C
+ STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE NTStatus = 0xC00A000D
+ STATUS_CTX_MODEM_RESPONSE_BUSY NTStatus = 0xC00A000E
+ STATUS_CTX_MODEM_RESPONSE_VOICE NTStatus = 0xC00A000F
+ STATUS_CTX_TD_ERROR NTStatus = 0xC00A0010
+ STATUS_CTX_LICENSE_CLIENT_INVALID NTStatus = 0xC00A0012
+ STATUS_CTX_LICENSE_NOT_AVAILABLE NTStatus = 0xC00A0013
+ STATUS_CTX_LICENSE_EXPIRED NTStatus = 0xC00A0014
+ STATUS_CTX_WINSTATION_NOT_FOUND NTStatus = 0xC00A0015
+ STATUS_CTX_WINSTATION_NAME_COLLISION NTStatus = 0xC00A0016
+ STATUS_CTX_WINSTATION_BUSY NTStatus = 0xC00A0017
+ STATUS_CTX_BAD_VIDEO_MODE NTStatus = 0xC00A0018
+ STATUS_CTX_GRAPHICS_INVALID NTStatus = 0xC00A0022
+ STATUS_CTX_NOT_CONSOLE NTStatus = 0xC00A0024
+ STATUS_CTX_CLIENT_QUERY_TIMEOUT NTStatus = 0xC00A0026
+ STATUS_CTX_CONSOLE_DISCONNECT NTStatus = 0xC00A0027
+ STATUS_CTX_CONSOLE_CONNECT NTStatus = 0xC00A0028
+ STATUS_CTX_SHADOW_DENIED NTStatus = 0xC00A002A
+ STATUS_CTX_WINSTATION_ACCESS_DENIED NTStatus = 0xC00A002B
+ STATUS_CTX_INVALID_WD NTStatus = 0xC00A002E
+ STATUS_CTX_WD_NOT_FOUND NTStatus = 0xC00A002F
+ STATUS_CTX_SHADOW_INVALID NTStatus = 0xC00A0030
+ STATUS_CTX_SHADOW_DISABLED NTStatus = 0xC00A0031
+ STATUS_RDP_PROTOCOL_ERROR NTStatus = 0xC00A0032
+ STATUS_CTX_CLIENT_LICENSE_NOT_SET NTStatus = 0xC00A0033
+ STATUS_CTX_CLIENT_LICENSE_IN_USE NTStatus = 0xC00A0034
+ STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE NTStatus = 0xC00A0035
+ STATUS_CTX_SHADOW_NOT_RUNNING NTStatus = 0xC00A0036
+ STATUS_CTX_LOGON_DISABLED NTStatus = 0xC00A0037
+ STATUS_CTX_SECURITY_LAYER_ERROR NTStatus = 0xC00A0038
+ STATUS_TS_INCOMPATIBLE_SESSIONS NTStatus = 0xC00A0039
+ STATUS_TS_VIDEO_SUBSYSTEM_ERROR NTStatus = 0xC00A003A
+ STATUS_PNP_BAD_MPS_TABLE NTStatus = 0xC0040035
+ STATUS_PNP_TRANSLATION_FAILED NTStatus = 0xC0040036
+ STATUS_PNP_IRQ_TRANSLATION_FAILED NTStatus = 0xC0040037
+ STATUS_PNP_INVALID_ID NTStatus = 0xC0040038
+ STATUS_IO_REISSUE_AS_CACHED NTStatus = 0xC0040039
+ STATUS_MUI_FILE_NOT_FOUND NTStatus = 0xC00B0001
+ STATUS_MUI_INVALID_FILE NTStatus = 0xC00B0002
+ STATUS_MUI_INVALID_RC_CONFIG NTStatus = 0xC00B0003
+ STATUS_MUI_INVALID_LOCALE_NAME NTStatus = 0xC00B0004
+ STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME NTStatus = 0xC00B0005
+ STATUS_MUI_FILE_NOT_LOADED NTStatus = 0xC00B0006
+ STATUS_RESOURCE_ENUM_USER_STOP NTStatus = 0xC00B0007
+ STATUS_FLT_NO_HANDLER_DEFINED NTStatus = 0xC01C0001
+ STATUS_FLT_CONTEXT_ALREADY_DEFINED NTStatus = 0xC01C0002
+ STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST NTStatus = 0xC01C0003
+ STATUS_FLT_DISALLOW_FAST_IO NTStatus = 0xC01C0004
+ STATUS_FLT_INVALID_NAME_REQUEST NTStatus = 0xC01C0005
+ STATUS_FLT_NOT_SAFE_TO_POST_OPERATION NTStatus = 0xC01C0006
+ STATUS_FLT_NOT_INITIALIZED NTStatus = 0xC01C0007
+ STATUS_FLT_FILTER_NOT_READY NTStatus = 0xC01C0008
+ STATUS_FLT_POST_OPERATION_CLEANUP NTStatus = 0xC01C0009
+ STATUS_FLT_INTERNAL_ERROR NTStatus = 0xC01C000A
+ STATUS_FLT_DELETING_OBJECT NTStatus = 0xC01C000B
+ STATUS_FLT_MUST_BE_NONPAGED_POOL NTStatus = 0xC01C000C
+ STATUS_FLT_DUPLICATE_ENTRY NTStatus = 0xC01C000D
+ STATUS_FLT_CBDQ_DISABLED NTStatus = 0xC01C000E
+ STATUS_FLT_DO_NOT_ATTACH NTStatus = 0xC01C000F
+ STATUS_FLT_DO_NOT_DETACH NTStatus = 0xC01C0010
+ STATUS_FLT_INSTANCE_ALTITUDE_COLLISION NTStatus = 0xC01C0011
+ STATUS_FLT_INSTANCE_NAME_COLLISION NTStatus = 0xC01C0012
+ STATUS_FLT_FILTER_NOT_FOUND NTStatus = 0xC01C0013
+ STATUS_FLT_VOLUME_NOT_FOUND NTStatus = 0xC01C0014
+ STATUS_FLT_INSTANCE_NOT_FOUND NTStatus = 0xC01C0015
+ STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND NTStatus = 0xC01C0016
+ STATUS_FLT_INVALID_CONTEXT_REGISTRATION NTStatus = 0xC01C0017
+ STATUS_FLT_NAME_CACHE_MISS NTStatus = 0xC01C0018
+ STATUS_FLT_NO_DEVICE_OBJECT NTStatus = 0xC01C0019
+ STATUS_FLT_VOLUME_ALREADY_MOUNTED NTStatus = 0xC01C001A
+ STATUS_FLT_ALREADY_ENLISTED NTStatus = 0xC01C001B
+ STATUS_FLT_CONTEXT_ALREADY_LINKED NTStatus = 0xC01C001C
+ STATUS_FLT_NO_WAITER_FOR_REPLY NTStatus = 0xC01C0020
+ STATUS_FLT_REGISTRATION_BUSY NTStatus = 0xC01C0023
+ STATUS_SXS_SECTION_NOT_FOUND NTStatus = 0xC0150001
+ STATUS_SXS_CANT_GEN_ACTCTX NTStatus = 0xC0150002
+ STATUS_SXS_INVALID_ACTCTXDATA_FORMAT NTStatus = 0xC0150003
+ STATUS_SXS_ASSEMBLY_NOT_FOUND NTStatus = 0xC0150004
+ STATUS_SXS_MANIFEST_FORMAT_ERROR NTStatus = 0xC0150005
+ STATUS_SXS_MANIFEST_PARSE_ERROR NTStatus = 0xC0150006
+ STATUS_SXS_ACTIVATION_CONTEXT_DISABLED NTStatus = 0xC0150007
+ STATUS_SXS_KEY_NOT_FOUND NTStatus = 0xC0150008
+ STATUS_SXS_VERSION_CONFLICT NTStatus = 0xC0150009
+ STATUS_SXS_WRONG_SECTION_TYPE NTStatus = 0xC015000A
+ STATUS_SXS_THREAD_QUERIES_DISABLED NTStatus = 0xC015000B
+ STATUS_SXS_ASSEMBLY_MISSING NTStatus = 0xC015000C
+ STATUS_SXS_RELEASE_ACTIVATION_CONTEXT NTStatus = 0x4015000D
+ STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET NTStatus = 0xC015000E
+ STATUS_SXS_EARLY_DEACTIVATION NTStatus = 0xC015000F
+ STATUS_SXS_INVALID_DEACTIVATION NTStatus = 0xC0150010
+ STATUS_SXS_MULTIPLE_DEACTIVATION NTStatus = 0xC0150011
+ STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY NTStatus = 0xC0150012
+ STATUS_SXS_PROCESS_TERMINATION_REQUESTED NTStatus = 0xC0150013
+ STATUS_SXS_CORRUPT_ACTIVATION_STACK NTStatus = 0xC0150014
+ STATUS_SXS_CORRUPTION NTStatus = 0xC0150015
+ STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE NTStatus = 0xC0150016
+ STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME NTStatus = 0xC0150017
+ STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE NTStatus = 0xC0150018
+ STATUS_SXS_IDENTITY_PARSE_ERROR NTStatus = 0xC0150019
+ STATUS_SXS_COMPONENT_STORE_CORRUPT NTStatus = 0xC015001A
+ STATUS_SXS_FILE_HASH_MISMATCH NTStatus = 0xC015001B
+ STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT NTStatus = 0xC015001C
+ STATUS_SXS_IDENTITIES_DIFFERENT NTStatus = 0xC015001D
+ STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT NTStatus = 0xC015001E
+ STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY NTStatus = 0xC015001F
+ STATUS_ADVANCED_INSTALLER_FAILED NTStatus = 0xC0150020
+ STATUS_XML_ENCODING_MISMATCH NTStatus = 0xC0150021
+ STATUS_SXS_MANIFEST_TOO_BIG NTStatus = 0xC0150022
+ STATUS_SXS_SETTING_NOT_REGISTERED NTStatus = 0xC0150023
+ STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE NTStatus = 0xC0150024
+ STATUS_SMI_PRIMITIVE_INSTALLER_FAILED NTStatus = 0xC0150025
+ STATUS_GENERIC_COMMAND_FAILED NTStatus = 0xC0150026
+ STATUS_SXS_FILE_HASH_MISSING NTStatus = 0xC0150027
+ STATUS_CLUSTER_INVALID_NODE NTStatus = 0xC0130001
+ STATUS_CLUSTER_NODE_EXISTS NTStatus = 0xC0130002
+ STATUS_CLUSTER_JOIN_IN_PROGRESS NTStatus = 0xC0130003
+ STATUS_CLUSTER_NODE_NOT_FOUND NTStatus = 0xC0130004
+ STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND NTStatus = 0xC0130005
+ STATUS_CLUSTER_NETWORK_EXISTS NTStatus = 0xC0130006
+ STATUS_CLUSTER_NETWORK_NOT_FOUND NTStatus = 0xC0130007
+ STATUS_CLUSTER_NETINTERFACE_EXISTS NTStatus = 0xC0130008
+ STATUS_CLUSTER_NETINTERFACE_NOT_FOUND NTStatus = 0xC0130009
+ STATUS_CLUSTER_INVALID_REQUEST NTStatus = 0xC013000A
+ STATUS_CLUSTER_INVALID_NETWORK_PROVIDER NTStatus = 0xC013000B
+ STATUS_CLUSTER_NODE_DOWN NTStatus = 0xC013000C
+ STATUS_CLUSTER_NODE_UNREACHABLE NTStatus = 0xC013000D
+ STATUS_CLUSTER_NODE_NOT_MEMBER NTStatus = 0xC013000E
+ STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS NTStatus = 0xC013000F
+ STATUS_CLUSTER_INVALID_NETWORK NTStatus = 0xC0130010
+ STATUS_CLUSTER_NO_NET_ADAPTERS NTStatus = 0xC0130011
+ STATUS_CLUSTER_NODE_UP NTStatus = 0xC0130012
+ STATUS_CLUSTER_NODE_PAUSED NTStatus = 0xC0130013
+ STATUS_CLUSTER_NODE_NOT_PAUSED NTStatus = 0xC0130014
+ STATUS_CLUSTER_NO_SECURITY_CONTEXT NTStatus = 0xC0130015
+ STATUS_CLUSTER_NETWORK_NOT_INTERNAL NTStatus = 0xC0130016
+ STATUS_CLUSTER_POISONED NTStatus = 0xC0130017
+ STATUS_CLUSTER_NON_CSV_PATH NTStatus = 0xC0130018
+ STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL NTStatus = 0xC0130019
+ STATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS NTStatus = 0xC0130020
+ STATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR NTStatus = 0xC0130021
+ STATUS_CLUSTER_CSV_REDIRECTED NTStatus = 0xC0130022
+ STATUS_CLUSTER_CSV_NOT_REDIRECTED NTStatus = 0xC0130023
+ STATUS_CLUSTER_CSV_VOLUME_DRAINING NTStatus = 0xC0130024
+ STATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS NTStatus = 0xC0130025
+ STATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL NTStatus = 0xC0130026
+ STATUS_CLUSTER_CSV_NO_SNAPSHOTS NTStatus = 0xC0130027
+ STATUS_CSV_IO_PAUSE_TIMEOUT NTStatus = 0xC0130028
+ STATUS_CLUSTER_CSV_INVALID_HANDLE NTStatus = 0xC0130029
+ STATUS_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR NTStatus = 0xC0130030
+ STATUS_CLUSTER_CAM_TICKET_REPLAY_DETECTED NTStatus = 0xC0130031
+ STATUS_TRANSACTIONAL_CONFLICT NTStatus = 0xC0190001
+ STATUS_INVALID_TRANSACTION NTStatus = 0xC0190002
+ STATUS_TRANSACTION_NOT_ACTIVE NTStatus = 0xC0190003
+ STATUS_TM_INITIALIZATION_FAILED NTStatus = 0xC0190004
+ STATUS_RM_NOT_ACTIVE NTStatus = 0xC0190005
+ STATUS_RM_METADATA_CORRUPT NTStatus = 0xC0190006
+ STATUS_TRANSACTION_NOT_JOINED NTStatus = 0xC0190007
+ STATUS_DIRECTORY_NOT_RM NTStatus = 0xC0190008
+ STATUS_COULD_NOT_RESIZE_LOG NTStatus = 0x80190009
+ STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE NTStatus = 0xC019000A
+ STATUS_LOG_RESIZE_INVALID_SIZE NTStatus = 0xC019000B
+ STATUS_REMOTE_FILE_VERSION_MISMATCH NTStatus = 0xC019000C
+ STATUS_CRM_PROTOCOL_ALREADY_EXISTS NTStatus = 0xC019000F
+ STATUS_TRANSACTION_PROPAGATION_FAILED NTStatus = 0xC0190010
+ STATUS_CRM_PROTOCOL_NOT_FOUND NTStatus = 0xC0190011
+ STATUS_TRANSACTION_SUPERIOR_EXISTS NTStatus = 0xC0190012
+ STATUS_TRANSACTION_REQUEST_NOT_VALID NTStatus = 0xC0190013
+ STATUS_TRANSACTION_NOT_REQUESTED NTStatus = 0xC0190014
+ STATUS_TRANSACTION_ALREADY_ABORTED NTStatus = 0xC0190015
+ STATUS_TRANSACTION_ALREADY_COMMITTED NTStatus = 0xC0190016
+ STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER NTStatus = 0xC0190017
+ STATUS_CURRENT_TRANSACTION_NOT_VALID NTStatus = 0xC0190018
+ STATUS_LOG_GROWTH_FAILED NTStatus = 0xC0190019
+ STATUS_OBJECT_NO_LONGER_EXISTS NTStatus = 0xC0190021
+ STATUS_STREAM_MINIVERSION_NOT_FOUND NTStatus = 0xC0190022
+ STATUS_STREAM_MINIVERSION_NOT_VALID NTStatus = 0xC0190023
+ STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION NTStatus = 0xC0190024
+ STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT NTStatus = 0xC0190025
+ STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS NTStatus = 0xC0190026
+ STATUS_HANDLE_NO_LONGER_VALID NTStatus = 0xC0190028
+ STATUS_NO_TXF_METADATA NTStatus = 0x80190029
+ STATUS_LOG_CORRUPTION_DETECTED NTStatus = 0xC0190030
+ STATUS_CANT_RECOVER_WITH_HANDLE_OPEN NTStatus = 0x80190031
+ STATUS_RM_DISCONNECTED NTStatus = 0xC0190032
+ STATUS_ENLISTMENT_NOT_SUPERIOR NTStatus = 0xC0190033
+ STATUS_RECOVERY_NOT_NEEDED NTStatus = 0x40190034
+ STATUS_RM_ALREADY_STARTED NTStatus = 0x40190035
+ STATUS_FILE_IDENTITY_NOT_PERSISTENT NTStatus = 0xC0190036
+ STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY NTStatus = 0xC0190037
+ STATUS_CANT_CROSS_RM_BOUNDARY NTStatus = 0xC0190038
+ STATUS_TXF_DIR_NOT_EMPTY NTStatus = 0xC0190039
+ STATUS_INDOUBT_TRANSACTIONS_EXIST NTStatus = 0xC019003A
+ STATUS_TM_VOLATILE NTStatus = 0xC019003B
+ STATUS_ROLLBACK_TIMER_EXPIRED NTStatus = 0xC019003C
+ STATUS_TXF_ATTRIBUTE_CORRUPT NTStatus = 0xC019003D
+ STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC019003E
+ STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED NTStatus = 0xC019003F
+ STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE NTStatus = 0xC0190040
+ STATUS_TXF_METADATA_ALREADY_PRESENT NTStatus = 0x80190041
+ STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET NTStatus = 0x80190042
+ STATUS_TRANSACTION_REQUIRED_PROMOTION NTStatus = 0xC0190043
+ STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION NTStatus = 0xC0190044
+ STATUS_TRANSACTIONS_NOT_FROZEN NTStatus = 0xC0190045
+ STATUS_TRANSACTION_FREEZE_IN_PROGRESS NTStatus = 0xC0190046
+ STATUS_NOT_SNAPSHOT_VOLUME NTStatus = 0xC0190047
+ STATUS_NO_SAVEPOINT_WITH_OPEN_FILES NTStatus = 0xC0190048
+ STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC0190049
+ STATUS_TM_IDENTITY_MISMATCH NTStatus = 0xC019004A
+ STATUS_FLOATED_SECTION NTStatus = 0xC019004B
+ STATUS_CANNOT_ACCEPT_TRANSACTED_WORK NTStatus = 0xC019004C
+ STATUS_CANNOT_ABORT_TRANSACTIONS NTStatus = 0xC019004D
+ STATUS_TRANSACTION_NOT_FOUND NTStatus = 0xC019004E
+ STATUS_RESOURCEMANAGER_NOT_FOUND NTStatus = 0xC019004F
+ STATUS_ENLISTMENT_NOT_FOUND NTStatus = 0xC0190050
+ STATUS_TRANSACTIONMANAGER_NOT_FOUND NTStatus = 0xC0190051
+ STATUS_TRANSACTIONMANAGER_NOT_ONLINE NTStatus = 0xC0190052
+ STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION NTStatus = 0xC0190053
+ STATUS_TRANSACTION_NOT_ROOT NTStatus = 0xC0190054
+ STATUS_TRANSACTION_OBJECT_EXPIRED NTStatus = 0xC0190055
+ STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC0190056
+ STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED NTStatus = 0xC0190057
+ STATUS_TRANSACTION_RECORD_TOO_LONG NTStatus = 0xC0190058
+ STATUS_NO_LINK_TRACKING_IN_TRANSACTION NTStatus = 0xC0190059
+ STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION NTStatus = 0xC019005A
+ STATUS_TRANSACTION_INTEGRITY_VIOLATED NTStatus = 0xC019005B
+ STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH NTStatus = 0xC019005C
+ STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT NTStatus = 0xC019005D
+ STATUS_TRANSACTION_MUST_WRITETHROUGH NTStatus = 0xC019005E
+ STATUS_TRANSACTION_NO_SUPERIOR NTStatus = 0xC019005F
+ STATUS_EXPIRED_HANDLE NTStatus = 0xC0190060
+ STATUS_TRANSACTION_NOT_ENLISTED NTStatus = 0xC0190061
+ STATUS_LOG_SECTOR_INVALID NTStatus = 0xC01A0001
+ STATUS_LOG_SECTOR_PARITY_INVALID NTStatus = 0xC01A0002
+ STATUS_LOG_SECTOR_REMAPPED NTStatus = 0xC01A0003
+ STATUS_LOG_BLOCK_INCOMPLETE NTStatus = 0xC01A0004
+ STATUS_LOG_INVALID_RANGE NTStatus = 0xC01A0005
+ STATUS_LOG_BLOCKS_EXHAUSTED NTStatus = 0xC01A0006
+ STATUS_LOG_READ_CONTEXT_INVALID NTStatus = 0xC01A0007
+ STATUS_LOG_RESTART_INVALID NTStatus = 0xC01A0008
+ STATUS_LOG_BLOCK_VERSION NTStatus = 0xC01A0009
+ STATUS_LOG_BLOCK_INVALID NTStatus = 0xC01A000A
+ STATUS_LOG_READ_MODE_INVALID NTStatus = 0xC01A000B
+ STATUS_LOG_NO_RESTART NTStatus = 0x401A000C
+ STATUS_LOG_METADATA_CORRUPT NTStatus = 0xC01A000D
+ STATUS_LOG_METADATA_INVALID NTStatus = 0xC01A000E
+ STATUS_LOG_METADATA_INCONSISTENT NTStatus = 0xC01A000F
+ STATUS_LOG_RESERVATION_INVALID NTStatus = 0xC01A0010
+ STATUS_LOG_CANT_DELETE NTStatus = 0xC01A0011
+ STATUS_LOG_CONTAINER_LIMIT_EXCEEDED NTStatus = 0xC01A0012
+ STATUS_LOG_START_OF_LOG NTStatus = 0xC01A0013
+ STATUS_LOG_POLICY_ALREADY_INSTALLED NTStatus = 0xC01A0014
+ STATUS_LOG_POLICY_NOT_INSTALLED NTStatus = 0xC01A0015
+ STATUS_LOG_POLICY_INVALID NTStatus = 0xC01A0016
+ STATUS_LOG_POLICY_CONFLICT NTStatus = 0xC01A0017
+ STATUS_LOG_PINNED_ARCHIVE_TAIL NTStatus = 0xC01A0018
+ STATUS_LOG_RECORD_NONEXISTENT NTStatus = 0xC01A0019
+ STATUS_LOG_RECORDS_RESERVED_INVALID NTStatus = 0xC01A001A
+ STATUS_LOG_SPACE_RESERVED_INVALID NTStatus = 0xC01A001B
+ STATUS_LOG_TAIL_INVALID NTStatus = 0xC01A001C
+ STATUS_LOG_FULL NTStatus = 0xC01A001D
+ STATUS_LOG_MULTIPLEXED NTStatus = 0xC01A001E
+ STATUS_LOG_DEDICATED NTStatus = 0xC01A001F
+ STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS NTStatus = 0xC01A0020
+ STATUS_LOG_ARCHIVE_IN_PROGRESS NTStatus = 0xC01A0021
+ STATUS_LOG_EPHEMERAL NTStatus = 0xC01A0022
+ STATUS_LOG_NOT_ENOUGH_CONTAINERS NTStatus = 0xC01A0023
+ STATUS_LOG_CLIENT_ALREADY_REGISTERED NTStatus = 0xC01A0024
+ STATUS_LOG_CLIENT_NOT_REGISTERED NTStatus = 0xC01A0025
+ STATUS_LOG_FULL_HANDLER_IN_PROGRESS NTStatus = 0xC01A0026
+ STATUS_LOG_CONTAINER_READ_FAILED NTStatus = 0xC01A0027
+ STATUS_LOG_CONTAINER_WRITE_FAILED NTStatus = 0xC01A0028
+ STATUS_LOG_CONTAINER_OPEN_FAILED NTStatus = 0xC01A0029
+ STATUS_LOG_CONTAINER_STATE_INVALID NTStatus = 0xC01A002A
+ STATUS_LOG_STATE_INVALID NTStatus = 0xC01A002B
+ STATUS_LOG_PINNED NTStatus = 0xC01A002C
+ STATUS_LOG_METADATA_FLUSH_FAILED NTStatus = 0xC01A002D
+ STATUS_LOG_INCONSISTENT_SECURITY NTStatus = 0xC01A002E
+ STATUS_LOG_APPENDED_FLUSH_FAILED NTStatus = 0xC01A002F
+ STATUS_LOG_PINNED_RESERVATION NTStatus = 0xC01A0030
+ STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD NTStatus = 0xC01B00EA
+ STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED NTStatus = 0x801B00EB
+ STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST NTStatus = 0x401B00EC
+ STATUS_MONITOR_NO_DESCRIPTOR NTStatus = 0xC01D0001
+ STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT NTStatus = 0xC01D0002
+ STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM NTStatus = 0xC01D0003
+ STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK NTStatus = 0xC01D0004
+ STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED NTStatus = 0xC01D0005
+ STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK NTStatus = 0xC01D0006
+ STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK NTStatus = 0xC01D0007
+ STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA NTStatus = 0xC01D0008
+ STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK NTStatus = 0xC01D0009
+ STATUS_MONITOR_INVALID_MANUFACTURE_DATE NTStatus = 0xC01D000A
+ STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER NTStatus = 0xC01E0000
+ STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER NTStatus = 0xC01E0001
+ STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER NTStatus = 0xC01E0002
+ STATUS_GRAPHICS_ADAPTER_WAS_RESET NTStatus = 0xC01E0003
+ STATUS_GRAPHICS_INVALID_DRIVER_MODEL NTStatus = 0xC01E0004
+ STATUS_GRAPHICS_PRESENT_MODE_CHANGED NTStatus = 0xC01E0005
+ STATUS_GRAPHICS_PRESENT_OCCLUDED NTStatus = 0xC01E0006
+ STATUS_GRAPHICS_PRESENT_DENIED NTStatus = 0xC01E0007
+ STATUS_GRAPHICS_CANNOTCOLORCONVERT NTStatus = 0xC01E0008
+ STATUS_GRAPHICS_DRIVER_MISMATCH NTStatus = 0xC01E0009
+ STATUS_GRAPHICS_PARTIAL_DATA_POPULATED NTStatus = 0x401E000A
+ STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED NTStatus = 0xC01E000B
+ STATUS_GRAPHICS_PRESENT_UNOCCLUDED NTStatus = 0xC01E000C
+ STATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE NTStatus = 0xC01E000D
+ STATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED NTStatus = 0xC01E000E
+ STATUS_GRAPHICS_PRESENT_INVALID_WINDOW NTStatus = 0xC01E000F
+ STATUS_GRAPHICS_PRESENT_BUFFER_NOT_BOUND NTStatus = 0xC01E0010
+ STATUS_GRAPHICS_VAIL_STATE_CHANGED NTStatus = 0xC01E0011
+ STATUS_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN NTStatus = 0xC01E0012
+ STATUS_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED NTStatus = 0xC01E0013
+ STATUS_GRAPHICS_NO_VIDEO_MEMORY NTStatus = 0xC01E0100
+ STATUS_GRAPHICS_CANT_LOCK_MEMORY NTStatus = 0xC01E0101
+ STATUS_GRAPHICS_ALLOCATION_BUSY NTStatus = 0xC01E0102
+ STATUS_GRAPHICS_TOO_MANY_REFERENCES NTStatus = 0xC01E0103
+ STATUS_GRAPHICS_TRY_AGAIN_LATER NTStatus = 0xC01E0104
+ STATUS_GRAPHICS_TRY_AGAIN_NOW NTStatus = 0xC01E0105
+ STATUS_GRAPHICS_ALLOCATION_INVALID NTStatus = 0xC01E0106
+ STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE NTStatus = 0xC01E0107
+ STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED NTStatus = 0xC01E0108
+ STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION NTStatus = 0xC01E0109
+ STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE NTStatus = 0xC01E0110
+ STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION NTStatus = 0xC01E0111
+ STATUS_GRAPHICS_ALLOCATION_CLOSED NTStatus = 0xC01E0112
+ STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE NTStatus = 0xC01E0113
+ STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE NTStatus = 0xC01E0114
+ STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE NTStatus = 0xC01E0115
+ STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST NTStatus = 0xC01E0116
+ STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE NTStatus = 0xC01E0200
+ STATUS_GRAPHICS_SKIP_ALLOCATION_PREPARATION NTStatus = 0x401E0201
+ STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY NTStatus = 0xC01E0300
+ STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED NTStatus = 0xC01E0301
+ STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED NTStatus = 0xC01E0302
+ STATUS_GRAPHICS_INVALID_VIDPN NTStatus = 0xC01E0303
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE NTStatus = 0xC01E0304
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET NTStatus = 0xC01E0305
+ STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED NTStatus = 0xC01E0306
+ STATUS_GRAPHICS_MODE_NOT_PINNED NTStatus = 0x401E0307
+ STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET NTStatus = 0xC01E0308
+ STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET NTStatus = 0xC01E0309
+ STATUS_GRAPHICS_INVALID_FREQUENCY NTStatus = 0xC01E030A
+ STATUS_GRAPHICS_INVALID_ACTIVE_REGION NTStatus = 0xC01E030B
+ STATUS_GRAPHICS_INVALID_TOTAL_REGION NTStatus = 0xC01E030C
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE NTStatus = 0xC01E0310
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE NTStatus = 0xC01E0311
+ STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET NTStatus = 0xC01E0312
+ STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY NTStatus = 0xC01E0313
+ STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET NTStatus = 0xC01E0314
+ STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET NTStatus = 0xC01E0315
+ STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET NTStatus = 0xC01E0316
+ STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET NTStatus = 0xC01E0317
+ STATUS_GRAPHICS_TARGET_ALREADY_IN_SET NTStatus = 0xC01E0318
+ STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH NTStatus = 0xC01E0319
+ STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY NTStatus = 0xC01E031A
+ STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET NTStatus = 0xC01E031B
+ STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE NTStatus = 0xC01E031C
+ STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET NTStatus = 0xC01E031D
+ STATUS_GRAPHICS_NO_PREFERRED_MODE NTStatus = 0x401E031E
+ STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET NTStatus = 0xC01E031F
+ STATUS_GRAPHICS_STALE_MODESET NTStatus = 0xC01E0320
+ STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET NTStatus = 0xC01E0321
+ STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE NTStatus = 0xC01E0322
+ STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN NTStatus = 0xC01E0323
+ STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0324
+ STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION NTStatus = 0xC01E0325
+ STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES NTStatus = 0xC01E0326
+ STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY NTStatus = 0xC01E0327
+ STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE NTStatus = 0xC01E0328
+ STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET NTStatus = 0xC01E0329
+ STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET NTStatus = 0xC01E032A
+ STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR NTStatus = 0xC01E032B
+ STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET NTStatus = 0xC01E032C
+ STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET NTStatus = 0xC01E032D
+ STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE NTStatus = 0xC01E032E
+ STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE NTStatus = 0xC01E032F
+ STATUS_GRAPHICS_RESOURCES_NOT_RELATED NTStatus = 0xC01E0330
+ STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0331
+ STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0332
+ STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET NTStatus = 0xC01E0333
+ STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER NTStatus = 0xC01E0334
+ STATUS_GRAPHICS_NO_VIDPNMGR NTStatus = 0xC01E0335
+ STATUS_GRAPHICS_NO_ACTIVE_VIDPN NTStatus = 0xC01E0336
+ STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY NTStatus = 0xC01E0337
+ STATUS_GRAPHICS_MONITOR_NOT_CONNECTED NTStatus = 0xC01E0338
+ STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY NTStatus = 0xC01E0339
+ STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE NTStatus = 0xC01E033A
+ STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE NTStatus = 0xC01E033B
+ STATUS_GRAPHICS_INVALID_STRIDE NTStatus = 0xC01E033C
+ STATUS_GRAPHICS_INVALID_PIXELFORMAT NTStatus = 0xC01E033D
+ STATUS_GRAPHICS_INVALID_COLORBASIS NTStatus = 0xC01E033E
+ STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE NTStatus = 0xC01E033F
+ STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY NTStatus = 0xC01E0340
+ STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT NTStatus = 0xC01E0341
+ STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE NTStatus = 0xC01E0342
+ STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN NTStatus = 0xC01E0343
+ STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL NTStatus = 0xC01E0344
+ STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION NTStatus = 0xC01E0345
+ STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED NTStatus = 0xC01E0346
+ STATUS_GRAPHICS_INVALID_GAMMA_RAMP NTStatus = 0xC01E0347
+ STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED NTStatus = 0xC01E0348
+ STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED NTStatus = 0xC01E0349
+ STATUS_GRAPHICS_MODE_NOT_IN_MODESET NTStatus = 0xC01E034A
+ STATUS_GRAPHICS_DATASET_IS_EMPTY NTStatus = 0x401E034B
+ STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET NTStatus = 0x401E034C
+ STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON NTStatus = 0xC01E034D
+ STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE NTStatus = 0xC01E034E
+ STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE NTStatus = 0xC01E034F
+ STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS NTStatus = 0xC01E0350
+ STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED NTStatus = 0x401E0351
+ STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING NTStatus = 0xC01E0352
+ STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED NTStatus = 0xC01E0353
+ STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS NTStatus = 0xC01E0354
+ STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT NTStatus = 0xC01E0355
+ STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM NTStatus = 0xC01E0356
+ STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN NTStatus = 0xC01E0357
+ STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT NTStatus = 0xC01E0358
+ STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED NTStatus = 0xC01E0359
+ STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION NTStatus = 0xC01E035A
+ STATUS_GRAPHICS_INVALID_CLIENT_TYPE NTStatus = 0xC01E035B
+ STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET NTStatus = 0xC01E035C
+ STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED NTStatus = 0xC01E0400
+ STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED NTStatus = 0xC01E0401
+ STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS NTStatus = 0x401E042F
+ STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER NTStatus = 0xC01E0430
+ STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED NTStatus = 0xC01E0431
+ STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED NTStatus = 0xC01E0432
+ STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY NTStatus = 0xC01E0433
+ STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED NTStatus = 0xC01E0434
+ STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON NTStatus = 0xC01E0435
+ STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE NTStatus = 0xC01E0436
+ STATUS_GRAPHICS_LEADLINK_START_DEFERRED NTStatus = 0x401E0437
+ STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER NTStatus = 0xC01E0438
+ STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY NTStatus = 0x401E0439
+ STATUS_GRAPHICS_START_DEFERRED NTStatus = 0x401E043A
+ STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED NTStatus = 0xC01E043B
+ STATUS_GRAPHICS_DEPENDABLE_CHILD_STATUS NTStatus = 0x401E043C
+ STATUS_GRAPHICS_OPM_NOT_SUPPORTED NTStatus = 0xC01E0500
+ STATUS_GRAPHICS_COPP_NOT_SUPPORTED NTStatus = 0xC01E0501
+ STATUS_GRAPHICS_UAB_NOT_SUPPORTED NTStatus = 0xC01E0502
+ STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS NTStatus = 0xC01E0503
+ STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST NTStatus = 0xC01E0505
+ STATUS_GRAPHICS_OPM_INTERNAL_ERROR NTStatus = 0xC01E050B
+ STATUS_GRAPHICS_OPM_INVALID_HANDLE NTStatus = 0xC01E050C
+ STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH NTStatus = 0xC01E050E
+ STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED NTStatus = 0xC01E050F
+ STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED NTStatus = 0xC01E0510
+ STATUS_GRAPHICS_PVP_HFS_FAILED NTStatus = 0xC01E0511
+ STATUS_GRAPHICS_OPM_INVALID_SRM NTStatus = 0xC01E0512
+ STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP NTStatus = 0xC01E0513
+ STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP NTStatus = 0xC01E0514
+ STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA NTStatus = 0xC01E0515
+ STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET NTStatus = 0xC01E0516
+ STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH NTStatus = 0xC01E0517
+ STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE NTStatus = 0xC01E0518
+ STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS NTStatus = 0xC01E051A
+ STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS NTStatus = 0xC01E051C
+ STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST NTStatus = 0xC01E051D
+ STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR NTStatus = 0xC01E051E
+ STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS NTStatus = 0xC01E051F
+ STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED NTStatus = 0xC01E0520
+ STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST NTStatus = 0xC01E0521
+ STATUS_GRAPHICS_I2C_NOT_SUPPORTED NTStatus = 0xC01E0580
+ STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST NTStatus = 0xC01E0581
+ STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA NTStatus = 0xC01E0582
+ STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA NTStatus = 0xC01E0583
+ STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED NTStatus = 0xC01E0584
+ STATUS_GRAPHICS_DDCCI_INVALID_DATA NTStatus = 0xC01E0585
+ STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE NTStatus = 0xC01E0586
+ STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING NTStatus = 0xC01E0587
+ STATUS_GRAPHICS_MCA_INTERNAL_ERROR NTStatus = 0xC01E0588
+ STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND NTStatus = 0xC01E0589
+ STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH NTStatus = 0xC01E058A
+ STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM NTStatus = 0xC01E058B
+ STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE NTStatus = 0xC01E058C
+ STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS NTStatus = 0xC01E058D
+ STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED NTStatus = 0xC01E05E0
+ STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME NTStatus = 0xC01E05E1
+ STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP NTStatus = 0xC01E05E2
+ STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED NTStatus = 0xC01E05E3
+ STATUS_GRAPHICS_INVALID_POINTER NTStatus = 0xC01E05E4
+ STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE NTStatus = 0xC01E05E5
+ STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL NTStatus = 0xC01E05E6
+ STATUS_GRAPHICS_INTERNAL_ERROR NTStatus = 0xC01E05E7
+ STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS NTStatus = 0xC01E05E8
+ STATUS_FVE_LOCKED_VOLUME NTStatus = 0xC0210000
+ STATUS_FVE_NOT_ENCRYPTED NTStatus = 0xC0210001
+ STATUS_FVE_BAD_INFORMATION NTStatus = 0xC0210002
+ STATUS_FVE_TOO_SMALL NTStatus = 0xC0210003
+ STATUS_FVE_FAILED_WRONG_FS NTStatus = 0xC0210004
+ STATUS_FVE_BAD_PARTITION_SIZE NTStatus = 0xC0210005
+ STATUS_FVE_FS_NOT_EXTENDED NTStatus = 0xC0210006
+ STATUS_FVE_FS_MOUNTED NTStatus = 0xC0210007
+ STATUS_FVE_NO_LICENSE NTStatus = 0xC0210008
+ STATUS_FVE_ACTION_NOT_ALLOWED NTStatus = 0xC0210009
+ STATUS_FVE_BAD_DATA NTStatus = 0xC021000A
+ STATUS_FVE_VOLUME_NOT_BOUND NTStatus = 0xC021000B
+ STATUS_FVE_NOT_DATA_VOLUME NTStatus = 0xC021000C
+ STATUS_FVE_CONV_READ_ERROR NTStatus = 0xC021000D
+ STATUS_FVE_CONV_WRITE_ERROR NTStatus = 0xC021000E
+ STATUS_FVE_OVERLAPPED_UPDATE NTStatus = 0xC021000F
+ STATUS_FVE_FAILED_SECTOR_SIZE NTStatus = 0xC0210010
+ STATUS_FVE_FAILED_AUTHENTICATION NTStatus = 0xC0210011
+ STATUS_FVE_NOT_OS_VOLUME NTStatus = 0xC0210012
+ STATUS_FVE_KEYFILE_NOT_FOUND NTStatus = 0xC0210013
+ STATUS_FVE_KEYFILE_INVALID NTStatus = 0xC0210014
+ STATUS_FVE_KEYFILE_NO_VMK NTStatus = 0xC0210015
+ STATUS_FVE_TPM_DISABLED NTStatus = 0xC0210016
+ STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO NTStatus = 0xC0210017
+ STATUS_FVE_TPM_INVALID_PCR NTStatus = 0xC0210018
+ STATUS_FVE_TPM_NO_VMK NTStatus = 0xC0210019
+ STATUS_FVE_PIN_INVALID NTStatus = 0xC021001A
+ STATUS_FVE_AUTH_INVALID_APPLICATION NTStatus = 0xC021001B
+ STATUS_FVE_AUTH_INVALID_CONFIG NTStatus = 0xC021001C
+ STATUS_FVE_DEBUGGER_ENABLED NTStatus = 0xC021001D
+ STATUS_FVE_DRY_RUN_FAILED NTStatus = 0xC021001E
+ STATUS_FVE_BAD_METADATA_POINTER NTStatus = 0xC021001F
+ STATUS_FVE_OLD_METADATA_COPY NTStatus = 0xC0210020
+ STATUS_FVE_REBOOT_REQUIRED NTStatus = 0xC0210021
+ STATUS_FVE_RAW_ACCESS NTStatus = 0xC0210022
+ STATUS_FVE_RAW_BLOCKED NTStatus = 0xC0210023
+ STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY NTStatus = 0xC0210024
+ STATUS_FVE_MOR_FAILED NTStatus = 0xC0210025
+ STATUS_FVE_NO_FEATURE_LICENSE NTStatus = 0xC0210026
+ STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED NTStatus = 0xC0210027
+ STATUS_FVE_CONV_RECOVERY_FAILED NTStatus = 0xC0210028
+ STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG NTStatus = 0xC0210029
+ STATUS_FVE_INVALID_DATUM_TYPE NTStatus = 0xC021002A
+ STATUS_FVE_VOLUME_TOO_SMALL NTStatus = 0xC0210030
+ STATUS_FVE_ENH_PIN_INVALID NTStatus = 0xC0210031
+ STATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE NTStatus = 0xC0210032
+ STATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE NTStatus = 0xC0210033
+ STATUS_FVE_NOT_ALLOWED_ON_CSV_STACK NTStatus = 0xC0210034
+ STATUS_FVE_NOT_ALLOWED_ON_CLUSTER NTStatus = 0xC0210035
+ STATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING NTStatus = 0xC0210036
+ STATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE NTStatus = 0xC0210037
+ STATUS_FVE_EDRIVE_DRY_RUN_FAILED NTStatus = 0xC0210038
+ STATUS_FVE_SECUREBOOT_DISABLED NTStatus = 0xC0210039
+ STATUS_FVE_SECUREBOOT_CONFIG_CHANGE NTStatus = 0xC021003A
+ STATUS_FVE_DEVICE_LOCKEDOUT NTStatus = 0xC021003B
+ STATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT NTStatus = 0xC021003C
+ STATUS_FVE_NOT_DE_VOLUME NTStatus = 0xC021003D
+ STATUS_FVE_PROTECTION_DISABLED NTStatus = 0xC021003E
+ STATUS_FVE_PROTECTION_CANNOT_BE_DISABLED NTStatus = 0xC021003F
+ STATUS_FVE_OSV_KSR_NOT_ALLOWED NTStatus = 0xC0210040
+ STATUS_FWP_CALLOUT_NOT_FOUND NTStatus = 0xC0220001
+ STATUS_FWP_CONDITION_NOT_FOUND NTStatus = 0xC0220002
+ STATUS_FWP_FILTER_NOT_FOUND NTStatus = 0xC0220003
+ STATUS_FWP_LAYER_NOT_FOUND NTStatus = 0xC0220004
+ STATUS_FWP_PROVIDER_NOT_FOUND NTStatus = 0xC0220005
+ STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND NTStatus = 0xC0220006
+ STATUS_FWP_SUBLAYER_NOT_FOUND NTStatus = 0xC0220007
+ STATUS_FWP_NOT_FOUND NTStatus = 0xC0220008
+ STATUS_FWP_ALREADY_EXISTS NTStatus = 0xC0220009
+ STATUS_FWP_IN_USE NTStatus = 0xC022000A
+ STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS NTStatus = 0xC022000B
+ STATUS_FWP_WRONG_SESSION NTStatus = 0xC022000C
+ STATUS_FWP_NO_TXN_IN_PROGRESS NTStatus = 0xC022000D
+ STATUS_FWP_TXN_IN_PROGRESS NTStatus = 0xC022000E
+ STATUS_FWP_TXN_ABORTED NTStatus = 0xC022000F
+ STATUS_FWP_SESSION_ABORTED NTStatus = 0xC0220010
+ STATUS_FWP_INCOMPATIBLE_TXN NTStatus = 0xC0220011
+ STATUS_FWP_TIMEOUT NTStatus = 0xC0220012
+ STATUS_FWP_NET_EVENTS_DISABLED NTStatus = 0xC0220013
+ STATUS_FWP_INCOMPATIBLE_LAYER NTStatus = 0xC0220014
+ STATUS_FWP_KM_CLIENTS_ONLY NTStatus = 0xC0220015
+ STATUS_FWP_LIFETIME_MISMATCH NTStatus = 0xC0220016
+ STATUS_FWP_BUILTIN_OBJECT NTStatus = 0xC0220017
+ STATUS_FWP_TOO_MANY_CALLOUTS NTStatus = 0xC0220018
+ STATUS_FWP_NOTIFICATION_DROPPED NTStatus = 0xC0220019
+ STATUS_FWP_TRAFFIC_MISMATCH NTStatus = 0xC022001A
+ STATUS_FWP_INCOMPATIBLE_SA_STATE NTStatus = 0xC022001B
+ STATUS_FWP_NULL_POINTER NTStatus = 0xC022001C
+ STATUS_FWP_INVALID_ENUMERATOR NTStatus = 0xC022001D
+ STATUS_FWP_INVALID_FLAGS NTStatus = 0xC022001E
+ STATUS_FWP_INVALID_NET_MASK NTStatus = 0xC022001F
+ STATUS_FWP_INVALID_RANGE NTStatus = 0xC0220020
+ STATUS_FWP_INVALID_INTERVAL NTStatus = 0xC0220021
+ STATUS_FWP_ZERO_LENGTH_ARRAY NTStatus = 0xC0220022
+ STATUS_FWP_NULL_DISPLAY_NAME NTStatus = 0xC0220023
+ STATUS_FWP_INVALID_ACTION_TYPE NTStatus = 0xC0220024
+ STATUS_FWP_INVALID_WEIGHT NTStatus = 0xC0220025
+ STATUS_FWP_MATCH_TYPE_MISMATCH NTStatus = 0xC0220026
+ STATUS_FWP_TYPE_MISMATCH NTStatus = 0xC0220027
+ STATUS_FWP_OUT_OF_BOUNDS NTStatus = 0xC0220028
+ STATUS_FWP_RESERVED NTStatus = 0xC0220029
+ STATUS_FWP_DUPLICATE_CONDITION NTStatus = 0xC022002A
+ STATUS_FWP_DUPLICATE_KEYMOD NTStatus = 0xC022002B
+ STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER NTStatus = 0xC022002C
+ STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER NTStatus = 0xC022002D
+ STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER NTStatus = 0xC022002E
+ STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT NTStatus = 0xC022002F
+ STATUS_FWP_INCOMPATIBLE_AUTH_METHOD NTStatus = 0xC0220030
+ STATUS_FWP_INCOMPATIBLE_DH_GROUP NTStatus = 0xC0220031
+ STATUS_FWP_EM_NOT_SUPPORTED NTStatus = 0xC0220032
+ STATUS_FWP_NEVER_MATCH NTStatus = 0xC0220033
+ STATUS_FWP_PROVIDER_CONTEXT_MISMATCH NTStatus = 0xC0220034
+ STATUS_FWP_INVALID_PARAMETER NTStatus = 0xC0220035
+ STATUS_FWP_TOO_MANY_SUBLAYERS NTStatus = 0xC0220036
+ STATUS_FWP_CALLOUT_NOTIFICATION_FAILED NTStatus = 0xC0220037
+ STATUS_FWP_INVALID_AUTH_TRANSFORM NTStatus = 0xC0220038
+ STATUS_FWP_INVALID_CIPHER_TRANSFORM NTStatus = 0xC0220039
+ STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM NTStatus = 0xC022003A
+ STATUS_FWP_INVALID_TRANSFORM_COMBINATION NTStatus = 0xC022003B
+ STATUS_FWP_DUPLICATE_AUTH_METHOD NTStatus = 0xC022003C
+ STATUS_FWP_INVALID_TUNNEL_ENDPOINT NTStatus = 0xC022003D
+ STATUS_FWP_L2_DRIVER_NOT_READY NTStatus = 0xC022003E
+ STATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED NTStatus = 0xC022003F
+ STATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL NTStatus = 0xC0220040
+ STATUS_FWP_CONNECTIONS_DISABLED NTStatus = 0xC0220041
+ STATUS_FWP_INVALID_DNS_NAME NTStatus = 0xC0220042
+ STATUS_FWP_STILL_ON NTStatus = 0xC0220043
+ STATUS_FWP_IKEEXT_NOT_RUNNING NTStatus = 0xC0220044
+ STATUS_FWP_TCPIP_NOT_READY NTStatus = 0xC0220100
+ STATUS_FWP_INJECT_HANDLE_CLOSING NTStatus = 0xC0220101
+ STATUS_FWP_INJECT_HANDLE_STALE NTStatus = 0xC0220102
+ STATUS_FWP_CANNOT_PEND NTStatus = 0xC0220103
+ STATUS_FWP_DROP_NOICMP NTStatus = 0xC0220104
+ STATUS_NDIS_CLOSING NTStatus = 0xC0230002
+ STATUS_NDIS_BAD_VERSION NTStatus = 0xC0230004
+ STATUS_NDIS_BAD_CHARACTERISTICS NTStatus = 0xC0230005
+ STATUS_NDIS_ADAPTER_NOT_FOUND NTStatus = 0xC0230006
+ STATUS_NDIS_OPEN_FAILED NTStatus = 0xC0230007
+ STATUS_NDIS_DEVICE_FAILED NTStatus = 0xC0230008
+ STATUS_NDIS_MULTICAST_FULL NTStatus = 0xC0230009
+ STATUS_NDIS_MULTICAST_EXISTS NTStatus = 0xC023000A
+ STATUS_NDIS_MULTICAST_NOT_FOUND NTStatus = 0xC023000B
+ STATUS_NDIS_REQUEST_ABORTED NTStatus = 0xC023000C
+ STATUS_NDIS_RESET_IN_PROGRESS NTStatus = 0xC023000D
+ STATUS_NDIS_NOT_SUPPORTED NTStatus = 0xC02300BB
+ STATUS_NDIS_INVALID_PACKET NTStatus = 0xC023000F
+ STATUS_NDIS_ADAPTER_NOT_READY NTStatus = 0xC0230011
+ STATUS_NDIS_INVALID_LENGTH NTStatus = 0xC0230014
+ STATUS_NDIS_INVALID_DATA NTStatus = 0xC0230015
+ STATUS_NDIS_BUFFER_TOO_SHORT NTStatus = 0xC0230016
+ STATUS_NDIS_INVALID_OID NTStatus = 0xC0230017
+ STATUS_NDIS_ADAPTER_REMOVED NTStatus = 0xC0230018
+ STATUS_NDIS_UNSUPPORTED_MEDIA NTStatus = 0xC0230019
+ STATUS_NDIS_GROUP_ADDRESS_IN_USE NTStatus = 0xC023001A
+ STATUS_NDIS_FILE_NOT_FOUND NTStatus = 0xC023001B
+ STATUS_NDIS_ERROR_READING_FILE NTStatus = 0xC023001C
+ STATUS_NDIS_ALREADY_MAPPED NTStatus = 0xC023001D
+ STATUS_NDIS_RESOURCE_CONFLICT NTStatus = 0xC023001E
+ STATUS_NDIS_MEDIA_DISCONNECTED NTStatus = 0xC023001F
+ STATUS_NDIS_INVALID_ADDRESS NTStatus = 0xC0230022
+ STATUS_NDIS_INVALID_DEVICE_REQUEST NTStatus = 0xC0230010
+ STATUS_NDIS_PAUSED NTStatus = 0xC023002A
+ STATUS_NDIS_INTERFACE_NOT_FOUND NTStatus = 0xC023002B
+ STATUS_NDIS_UNSUPPORTED_REVISION NTStatus = 0xC023002C
+ STATUS_NDIS_INVALID_PORT NTStatus = 0xC023002D
+ STATUS_NDIS_INVALID_PORT_STATE NTStatus = 0xC023002E
+ STATUS_NDIS_LOW_POWER_STATE NTStatus = 0xC023002F
+ STATUS_NDIS_REINIT_REQUIRED NTStatus = 0xC0230030
+ STATUS_NDIS_NO_QUEUES NTStatus = 0xC0230031
+ STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED NTStatus = 0xC0232000
+ STATUS_NDIS_DOT11_MEDIA_IN_USE NTStatus = 0xC0232001
+ STATUS_NDIS_DOT11_POWER_STATE_INVALID NTStatus = 0xC0232002
+ STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL NTStatus = 0xC0232003
+ STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL NTStatus = 0xC0232004
+ STATUS_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE NTStatus = 0xC0232005
+ STATUS_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE NTStatus = 0xC0232006
+ STATUS_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED NTStatus = 0xC0232007
+ STATUS_NDIS_DOT11_AP_BAND_NOT_ALLOWED NTStatus = 0xC0232008
+ STATUS_NDIS_INDICATION_REQUIRED NTStatus = 0x40230001
+ STATUS_NDIS_OFFLOAD_POLICY NTStatus = 0xC023100F
+ STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED NTStatus = 0xC0231012
+ STATUS_NDIS_OFFLOAD_PATH_REJECTED NTStatus = 0xC0231013
+ STATUS_TPM_ERROR_MASK NTStatus = 0xC0290000
+ STATUS_TPM_AUTHFAIL NTStatus = 0xC0290001
+ STATUS_TPM_BADINDEX NTStatus = 0xC0290002
+ STATUS_TPM_BAD_PARAMETER NTStatus = 0xC0290003
+ STATUS_TPM_AUDITFAILURE NTStatus = 0xC0290004
+ STATUS_TPM_CLEAR_DISABLED NTStatus = 0xC0290005
+ STATUS_TPM_DEACTIVATED NTStatus = 0xC0290006
+ STATUS_TPM_DISABLED NTStatus = 0xC0290007
+ STATUS_TPM_DISABLED_CMD NTStatus = 0xC0290008
+ STATUS_TPM_FAIL NTStatus = 0xC0290009
+ STATUS_TPM_BAD_ORDINAL NTStatus = 0xC029000A
+ STATUS_TPM_INSTALL_DISABLED NTStatus = 0xC029000B
+ STATUS_TPM_INVALID_KEYHANDLE NTStatus = 0xC029000C
+ STATUS_TPM_KEYNOTFOUND NTStatus = 0xC029000D
+ STATUS_TPM_INAPPROPRIATE_ENC NTStatus = 0xC029000E
+ STATUS_TPM_MIGRATEFAIL NTStatus = 0xC029000F
+ STATUS_TPM_INVALID_PCR_INFO NTStatus = 0xC0290010
+ STATUS_TPM_NOSPACE NTStatus = 0xC0290011
+ STATUS_TPM_NOSRK NTStatus = 0xC0290012
+ STATUS_TPM_NOTSEALED_BLOB NTStatus = 0xC0290013
+ STATUS_TPM_OWNER_SET NTStatus = 0xC0290014
+ STATUS_TPM_RESOURCES NTStatus = 0xC0290015
+ STATUS_TPM_SHORTRANDOM NTStatus = 0xC0290016
+ STATUS_TPM_SIZE NTStatus = 0xC0290017
+ STATUS_TPM_WRONGPCRVAL NTStatus = 0xC0290018
+ STATUS_TPM_BAD_PARAM_SIZE NTStatus = 0xC0290019
+ STATUS_TPM_SHA_THREAD NTStatus = 0xC029001A
+ STATUS_TPM_SHA_ERROR NTStatus = 0xC029001B
+ STATUS_TPM_FAILEDSELFTEST NTStatus = 0xC029001C
+ STATUS_TPM_AUTH2FAIL NTStatus = 0xC029001D
+ STATUS_TPM_BADTAG NTStatus = 0xC029001E
+ STATUS_TPM_IOERROR NTStatus = 0xC029001F
+ STATUS_TPM_ENCRYPT_ERROR NTStatus = 0xC0290020
+ STATUS_TPM_DECRYPT_ERROR NTStatus = 0xC0290021
+ STATUS_TPM_INVALID_AUTHHANDLE NTStatus = 0xC0290022
+ STATUS_TPM_NO_ENDORSEMENT NTStatus = 0xC0290023
+ STATUS_TPM_INVALID_KEYUSAGE NTStatus = 0xC0290024
+ STATUS_TPM_WRONG_ENTITYTYPE NTStatus = 0xC0290025
+ STATUS_TPM_INVALID_POSTINIT NTStatus = 0xC0290026
+ STATUS_TPM_INAPPROPRIATE_SIG NTStatus = 0xC0290027
+ STATUS_TPM_BAD_KEY_PROPERTY NTStatus = 0xC0290028
+ STATUS_TPM_BAD_MIGRATION NTStatus = 0xC0290029
+ STATUS_TPM_BAD_SCHEME NTStatus = 0xC029002A
+ STATUS_TPM_BAD_DATASIZE NTStatus = 0xC029002B
+ STATUS_TPM_BAD_MODE NTStatus = 0xC029002C
+ STATUS_TPM_BAD_PRESENCE NTStatus = 0xC029002D
+ STATUS_TPM_BAD_VERSION NTStatus = 0xC029002E
+ STATUS_TPM_NO_WRAP_TRANSPORT NTStatus = 0xC029002F
+ STATUS_TPM_AUDITFAIL_UNSUCCESSFUL NTStatus = 0xC0290030
+ STATUS_TPM_AUDITFAIL_SUCCESSFUL NTStatus = 0xC0290031
+ STATUS_TPM_NOTRESETABLE NTStatus = 0xC0290032
+ STATUS_TPM_NOTLOCAL NTStatus = 0xC0290033
+ STATUS_TPM_BAD_TYPE NTStatus = 0xC0290034
+ STATUS_TPM_INVALID_RESOURCE NTStatus = 0xC0290035
+ STATUS_TPM_NOTFIPS NTStatus = 0xC0290036
+ STATUS_TPM_INVALID_FAMILY NTStatus = 0xC0290037
+ STATUS_TPM_NO_NV_PERMISSION NTStatus = 0xC0290038
+ STATUS_TPM_REQUIRES_SIGN NTStatus = 0xC0290039
+ STATUS_TPM_KEY_NOTSUPPORTED NTStatus = 0xC029003A
+ STATUS_TPM_AUTH_CONFLICT NTStatus = 0xC029003B
+ STATUS_TPM_AREA_LOCKED NTStatus = 0xC029003C
+ STATUS_TPM_BAD_LOCALITY NTStatus = 0xC029003D
+ STATUS_TPM_READ_ONLY NTStatus = 0xC029003E
+ STATUS_TPM_PER_NOWRITE NTStatus = 0xC029003F
+ STATUS_TPM_FAMILYCOUNT NTStatus = 0xC0290040
+ STATUS_TPM_WRITE_LOCKED NTStatus = 0xC0290041
+ STATUS_TPM_BAD_ATTRIBUTES NTStatus = 0xC0290042
+ STATUS_TPM_INVALID_STRUCTURE NTStatus = 0xC0290043
+ STATUS_TPM_KEY_OWNER_CONTROL NTStatus = 0xC0290044
+ STATUS_TPM_BAD_COUNTER NTStatus = 0xC0290045
+ STATUS_TPM_NOT_FULLWRITE NTStatus = 0xC0290046
+ STATUS_TPM_CONTEXT_GAP NTStatus = 0xC0290047
+ STATUS_TPM_MAXNVWRITES NTStatus = 0xC0290048
+ STATUS_TPM_NOOPERATOR NTStatus = 0xC0290049
+ STATUS_TPM_RESOURCEMISSING NTStatus = 0xC029004A
+ STATUS_TPM_DELEGATE_LOCK NTStatus = 0xC029004B
+ STATUS_TPM_DELEGATE_FAMILY NTStatus = 0xC029004C
+ STATUS_TPM_DELEGATE_ADMIN NTStatus = 0xC029004D
+ STATUS_TPM_TRANSPORT_NOTEXCLUSIVE NTStatus = 0xC029004E
+ STATUS_TPM_OWNER_CONTROL NTStatus = 0xC029004F
+ STATUS_TPM_DAA_RESOURCES NTStatus = 0xC0290050
+ STATUS_TPM_DAA_INPUT_DATA0 NTStatus = 0xC0290051
+ STATUS_TPM_DAA_INPUT_DATA1 NTStatus = 0xC0290052
+ STATUS_TPM_DAA_ISSUER_SETTINGS NTStatus = 0xC0290053
+ STATUS_TPM_DAA_TPM_SETTINGS NTStatus = 0xC0290054
+ STATUS_TPM_DAA_STAGE NTStatus = 0xC0290055
+ STATUS_TPM_DAA_ISSUER_VALIDITY NTStatus = 0xC0290056
+ STATUS_TPM_DAA_WRONG_W NTStatus = 0xC0290057
+ STATUS_TPM_BAD_HANDLE NTStatus = 0xC0290058
+ STATUS_TPM_BAD_DELEGATE NTStatus = 0xC0290059
+ STATUS_TPM_BADCONTEXT NTStatus = 0xC029005A
+ STATUS_TPM_TOOMANYCONTEXTS NTStatus = 0xC029005B
+ STATUS_TPM_MA_TICKET_SIGNATURE NTStatus = 0xC029005C
+ STATUS_TPM_MA_DESTINATION NTStatus = 0xC029005D
+ STATUS_TPM_MA_SOURCE NTStatus = 0xC029005E
+ STATUS_TPM_MA_AUTHORITY NTStatus = 0xC029005F
+ STATUS_TPM_PERMANENTEK NTStatus = 0xC0290061
+ STATUS_TPM_BAD_SIGNATURE NTStatus = 0xC0290062
+ STATUS_TPM_NOCONTEXTSPACE NTStatus = 0xC0290063
+ STATUS_TPM_20_E_ASYMMETRIC NTStatus = 0xC0290081
+ STATUS_TPM_20_E_ATTRIBUTES NTStatus = 0xC0290082
+ STATUS_TPM_20_E_HASH NTStatus = 0xC0290083
+ STATUS_TPM_20_E_VALUE NTStatus = 0xC0290084
+ STATUS_TPM_20_E_HIERARCHY NTStatus = 0xC0290085
+ STATUS_TPM_20_E_KEY_SIZE NTStatus = 0xC0290087
+ STATUS_TPM_20_E_MGF NTStatus = 0xC0290088
+ STATUS_TPM_20_E_MODE NTStatus = 0xC0290089
+ STATUS_TPM_20_E_TYPE NTStatus = 0xC029008A
+ STATUS_TPM_20_E_HANDLE NTStatus = 0xC029008B
+ STATUS_TPM_20_E_KDF NTStatus = 0xC029008C
+ STATUS_TPM_20_E_RANGE NTStatus = 0xC029008D
+ STATUS_TPM_20_E_AUTH_FAIL NTStatus = 0xC029008E
+ STATUS_TPM_20_E_NONCE NTStatus = 0xC029008F
+ STATUS_TPM_20_E_PP NTStatus = 0xC0290090
+ STATUS_TPM_20_E_SCHEME NTStatus = 0xC0290092
+ STATUS_TPM_20_E_SIZE NTStatus = 0xC0290095
+ STATUS_TPM_20_E_SYMMETRIC NTStatus = 0xC0290096
+ STATUS_TPM_20_E_TAG NTStatus = 0xC0290097
+ STATUS_TPM_20_E_SELECTOR NTStatus = 0xC0290098
+ STATUS_TPM_20_E_INSUFFICIENT NTStatus = 0xC029009A
+ STATUS_TPM_20_E_SIGNATURE NTStatus = 0xC029009B
+ STATUS_TPM_20_E_KEY NTStatus = 0xC029009C
+ STATUS_TPM_20_E_POLICY_FAIL NTStatus = 0xC029009D
+ STATUS_TPM_20_E_INTEGRITY NTStatus = 0xC029009F
+ STATUS_TPM_20_E_TICKET NTStatus = 0xC02900A0
+ STATUS_TPM_20_E_RESERVED_BITS NTStatus = 0xC02900A1
+ STATUS_TPM_20_E_BAD_AUTH NTStatus = 0xC02900A2
+ STATUS_TPM_20_E_EXPIRED NTStatus = 0xC02900A3
+ STATUS_TPM_20_E_POLICY_CC NTStatus = 0xC02900A4
+ STATUS_TPM_20_E_BINDING NTStatus = 0xC02900A5
+ STATUS_TPM_20_E_CURVE NTStatus = 0xC02900A6
+ STATUS_TPM_20_E_ECC_POINT NTStatus = 0xC02900A7
+ STATUS_TPM_20_E_INITIALIZE NTStatus = 0xC0290100
+ STATUS_TPM_20_E_FAILURE NTStatus = 0xC0290101
+ STATUS_TPM_20_E_SEQUENCE NTStatus = 0xC0290103
+ STATUS_TPM_20_E_PRIVATE NTStatus = 0xC029010B
+ STATUS_TPM_20_E_HMAC NTStatus = 0xC0290119
+ STATUS_TPM_20_E_DISABLED NTStatus = 0xC0290120
+ STATUS_TPM_20_E_EXCLUSIVE NTStatus = 0xC0290121
+ STATUS_TPM_20_E_ECC_CURVE NTStatus = 0xC0290123
+ STATUS_TPM_20_E_AUTH_TYPE NTStatus = 0xC0290124
+ STATUS_TPM_20_E_AUTH_MISSING NTStatus = 0xC0290125
+ STATUS_TPM_20_E_POLICY NTStatus = 0xC0290126
+ STATUS_TPM_20_E_PCR NTStatus = 0xC0290127
+ STATUS_TPM_20_E_PCR_CHANGED NTStatus = 0xC0290128
+ STATUS_TPM_20_E_UPGRADE NTStatus = 0xC029012D
+ STATUS_TPM_20_E_TOO_MANY_CONTEXTS NTStatus = 0xC029012E
+ STATUS_TPM_20_E_AUTH_UNAVAILABLE NTStatus = 0xC029012F
+ STATUS_TPM_20_E_REBOOT NTStatus = 0xC0290130
+ STATUS_TPM_20_E_UNBALANCED NTStatus = 0xC0290131
+ STATUS_TPM_20_E_COMMAND_SIZE NTStatus = 0xC0290142
+ STATUS_TPM_20_E_COMMAND_CODE NTStatus = 0xC0290143
+ STATUS_TPM_20_E_AUTHSIZE NTStatus = 0xC0290144
+ STATUS_TPM_20_E_AUTH_CONTEXT NTStatus = 0xC0290145
+ STATUS_TPM_20_E_NV_RANGE NTStatus = 0xC0290146
+ STATUS_TPM_20_E_NV_SIZE NTStatus = 0xC0290147
+ STATUS_TPM_20_E_NV_LOCKED NTStatus = 0xC0290148
+ STATUS_TPM_20_E_NV_AUTHORIZATION NTStatus = 0xC0290149
+ STATUS_TPM_20_E_NV_UNINITIALIZED NTStatus = 0xC029014A
+ STATUS_TPM_20_E_NV_SPACE NTStatus = 0xC029014B
+ STATUS_TPM_20_E_NV_DEFINED NTStatus = 0xC029014C
+ STATUS_TPM_20_E_BAD_CONTEXT NTStatus = 0xC0290150
+ STATUS_TPM_20_E_CPHASH NTStatus = 0xC0290151
+ STATUS_TPM_20_E_PARENT NTStatus = 0xC0290152
+ STATUS_TPM_20_E_NEEDS_TEST NTStatus = 0xC0290153
+ STATUS_TPM_20_E_NO_RESULT NTStatus = 0xC0290154
+ STATUS_TPM_20_E_SENSITIVE NTStatus = 0xC0290155
+ STATUS_TPM_COMMAND_BLOCKED NTStatus = 0xC0290400
+ STATUS_TPM_INVALID_HANDLE NTStatus = 0xC0290401
+ STATUS_TPM_DUPLICATE_VHANDLE NTStatus = 0xC0290402
+ STATUS_TPM_EMBEDDED_COMMAND_BLOCKED NTStatus = 0xC0290403
+ STATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED NTStatus = 0xC0290404
+ STATUS_TPM_RETRY NTStatus = 0xC0290800
+ STATUS_TPM_NEEDS_SELFTEST NTStatus = 0xC0290801
+ STATUS_TPM_DOING_SELFTEST NTStatus = 0xC0290802
+ STATUS_TPM_DEFEND_LOCK_RUNNING NTStatus = 0xC0290803
+ STATUS_TPM_COMMAND_CANCELED NTStatus = 0xC0291001
+ STATUS_TPM_TOO_MANY_CONTEXTS NTStatus = 0xC0291002
+ STATUS_TPM_NOT_FOUND NTStatus = 0xC0291003
+ STATUS_TPM_ACCESS_DENIED NTStatus = 0xC0291004
+ STATUS_TPM_INSUFFICIENT_BUFFER NTStatus = 0xC0291005
+ STATUS_TPM_PPI_FUNCTION_UNSUPPORTED NTStatus = 0xC0291006
+ STATUS_PCP_ERROR_MASK NTStatus = 0xC0292000
+ STATUS_PCP_DEVICE_NOT_READY NTStatus = 0xC0292001
+ STATUS_PCP_INVALID_HANDLE NTStatus = 0xC0292002
+ STATUS_PCP_INVALID_PARAMETER NTStatus = 0xC0292003
+ STATUS_PCP_FLAG_NOT_SUPPORTED NTStatus = 0xC0292004
+ STATUS_PCP_NOT_SUPPORTED NTStatus = 0xC0292005
+ STATUS_PCP_BUFFER_TOO_SMALL NTStatus = 0xC0292006
+ STATUS_PCP_INTERNAL_ERROR NTStatus = 0xC0292007
+ STATUS_PCP_AUTHENTICATION_FAILED NTStatus = 0xC0292008
+ STATUS_PCP_AUTHENTICATION_IGNORED NTStatus = 0xC0292009
+ STATUS_PCP_POLICY_NOT_FOUND NTStatus = 0xC029200A
+ STATUS_PCP_PROFILE_NOT_FOUND NTStatus = 0xC029200B
+ STATUS_PCP_VALIDATION_FAILED NTStatus = 0xC029200C
+ STATUS_PCP_DEVICE_NOT_FOUND NTStatus = 0xC029200D
+ STATUS_PCP_WRONG_PARENT NTStatus = 0xC029200E
+ STATUS_PCP_KEY_NOT_LOADED NTStatus = 0xC029200F
+ STATUS_PCP_NO_KEY_CERTIFICATION NTStatus = 0xC0292010
+ STATUS_PCP_KEY_NOT_FINALIZED NTStatus = 0xC0292011
+ STATUS_PCP_ATTESTATION_CHALLENGE_NOT_SET NTStatus = 0xC0292012
+ STATUS_PCP_NOT_PCR_BOUND NTStatus = 0xC0292013
+ STATUS_PCP_KEY_ALREADY_FINALIZED NTStatus = 0xC0292014
+ STATUS_PCP_KEY_USAGE_POLICY_NOT_SUPPORTED NTStatus = 0xC0292015
+ STATUS_PCP_KEY_USAGE_POLICY_INVALID NTStatus = 0xC0292016
+ STATUS_PCP_SOFT_KEY_ERROR NTStatus = 0xC0292017
+ STATUS_PCP_KEY_NOT_AUTHENTICATED NTStatus = 0xC0292018
+ STATUS_PCP_KEY_NOT_AIK NTStatus = 0xC0292019
+ STATUS_PCP_KEY_NOT_SIGNING_KEY NTStatus = 0xC029201A
+ STATUS_PCP_LOCKED_OUT NTStatus = 0xC029201B
+ STATUS_PCP_CLAIM_TYPE_NOT_SUPPORTED NTStatus = 0xC029201C
+ STATUS_PCP_TPM_VERSION_NOT_SUPPORTED NTStatus = 0xC029201D
+ STATUS_PCP_BUFFER_LENGTH_MISMATCH NTStatus = 0xC029201E
+ STATUS_PCP_IFX_RSA_KEY_CREATION_BLOCKED NTStatus = 0xC029201F
+ STATUS_PCP_TICKET_MISSING NTStatus = 0xC0292020
+ STATUS_PCP_RAW_POLICY_NOT_SUPPORTED NTStatus = 0xC0292021
+ STATUS_PCP_KEY_HANDLE_INVALIDATED NTStatus = 0xC0292022
+ STATUS_PCP_UNSUPPORTED_PSS_SALT NTStatus = 0x40292023
+ STATUS_RTPM_CONTEXT_CONTINUE NTStatus = 0x00293000
+ STATUS_RTPM_CONTEXT_COMPLETE NTStatus = 0x00293001
+ STATUS_RTPM_NO_RESULT NTStatus = 0xC0293002
+ STATUS_RTPM_PCR_READ_INCOMPLETE NTStatus = 0xC0293003
+ STATUS_RTPM_INVALID_CONTEXT NTStatus = 0xC0293004
+ STATUS_RTPM_UNSUPPORTED_CMD NTStatus = 0xC0293005
+ STATUS_TPM_ZERO_EXHAUST_ENABLED NTStatus = 0xC0294000
+ STATUS_HV_INVALID_HYPERCALL_CODE NTStatus = 0xC0350002
+ STATUS_HV_INVALID_HYPERCALL_INPUT NTStatus = 0xC0350003
+ STATUS_HV_INVALID_ALIGNMENT NTStatus = 0xC0350004
+ STATUS_HV_INVALID_PARAMETER NTStatus = 0xC0350005
+ STATUS_HV_ACCESS_DENIED NTStatus = 0xC0350006
+ STATUS_HV_INVALID_PARTITION_STATE NTStatus = 0xC0350007
+ STATUS_HV_OPERATION_DENIED NTStatus = 0xC0350008
+ STATUS_HV_UNKNOWN_PROPERTY NTStatus = 0xC0350009
+ STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE NTStatus = 0xC035000A
+ STATUS_HV_INSUFFICIENT_MEMORY NTStatus = 0xC035000B
+ STATUS_HV_PARTITION_TOO_DEEP NTStatus = 0xC035000C
+ STATUS_HV_INVALID_PARTITION_ID NTStatus = 0xC035000D
+ STATUS_HV_INVALID_VP_INDEX NTStatus = 0xC035000E
+ STATUS_HV_INVALID_PORT_ID NTStatus = 0xC0350011
+ STATUS_HV_INVALID_CONNECTION_ID NTStatus = 0xC0350012
+ STATUS_HV_INSUFFICIENT_BUFFERS NTStatus = 0xC0350013
+ STATUS_HV_NOT_ACKNOWLEDGED NTStatus = 0xC0350014
+ STATUS_HV_INVALID_VP_STATE NTStatus = 0xC0350015
+ STATUS_HV_ACKNOWLEDGED NTStatus = 0xC0350016
+ STATUS_HV_INVALID_SAVE_RESTORE_STATE NTStatus = 0xC0350017
+ STATUS_HV_INVALID_SYNIC_STATE NTStatus = 0xC0350018
+ STATUS_HV_OBJECT_IN_USE NTStatus = 0xC0350019
+ STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO NTStatus = 0xC035001A
+ STATUS_HV_NO_DATA NTStatus = 0xC035001B
+ STATUS_HV_INACTIVE NTStatus = 0xC035001C
+ STATUS_HV_NO_RESOURCES NTStatus = 0xC035001D
+ STATUS_HV_FEATURE_UNAVAILABLE NTStatus = 0xC035001E
+ STATUS_HV_INSUFFICIENT_BUFFER NTStatus = 0xC0350033
+ STATUS_HV_INSUFFICIENT_DEVICE_DOMAINS NTStatus = 0xC0350038
+ STATUS_HV_CPUID_FEATURE_VALIDATION_ERROR NTStatus = 0xC035003C
+ STATUS_HV_CPUID_XSAVE_FEATURE_VALIDATION_ERROR NTStatus = 0xC035003D
+ STATUS_HV_PROCESSOR_STARTUP_TIMEOUT NTStatus = 0xC035003E
+ STATUS_HV_SMX_ENABLED NTStatus = 0xC035003F
+ STATUS_HV_INVALID_LP_INDEX NTStatus = 0xC0350041
+ STATUS_HV_INVALID_REGISTER_VALUE NTStatus = 0xC0350050
+ STATUS_HV_INVALID_VTL_STATE NTStatus = 0xC0350051
+ STATUS_HV_NX_NOT_DETECTED NTStatus = 0xC0350055
+ STATUS_HV_INVALID_DEVICE_ID NTStatus = 0xC0350057
+ STATUS_HV_INVALID_DEVICE_STATE NTStatus = 0xC0350058
+ STATUS_HV_PENDING_PAGE_REQUESTS NTStatus = 0x00350059
+ STATUS_HV_PAGE_REQUEST_INVALID NTStatus = 0xC0350060
+ STATUS_HV_INVALID_CPU_GROUP_ID NTStatus = 0xC035006F
+ STATUS_HV_INVALID_CPU_GROUP_STATE NTStatus = 0xC0350070
+ STATUS_HV_OPERATION_FAILED NTStatus = 0xC0350071
+ STATUS_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE NTStatus = 0xC0350072
+ STATUS_HV_INSUFFICIENT_ROOT_MEMORY NTStatus = 0xC0350073
+ STATUS_HV_NOT_PRESENT NTStatus = 0xC0351000
+ STATUS_VID_DUPLICATE_HANDLER NTStatus = 0xC0370001
+ STATUS_VID_TOO_MANY_HANDLERS NTStatus = 0xC0370002
+ STATUS_VID_QUEUE_FULL NTStatus = 0xC0370003
+ STATUS_VID_HANDLER_NOT_PRESENT NTStatus = 0xC0370004
+ STATUS_VID_INVALID_OBJECT_NAME NTStatus = 0xC0370005
+ STATUS_VID_PARTITION_NAME_TOO_LONG NTStatus = 0xC0370006
+ STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG NTStatus = 0xC0370007
+ STATUS_VID_PARTITION_ALREADY_EXISTS NTStatus = 0xC0370008
+ STATUS_VID_PARTITION_DOES_NOT_EXIST NTStatus = 0xC0370009
+ STATUS_VID_PARTITION_NAME_NOT_FOUND NTStatus = 0xC037000A
+ STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS NTStatus = 0xC037000B
+ STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT NTStatus = 0xC037000C
+ STATUS_VID_MB_STILL_REFERENCED NTStatus = 0xC037000D
+ STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED NTStatus = 0xC037000E
+ STATUS_VID_INVALID_NUMA_SETTINGS NTStatus = 0xC037000F
+ STATUS_VID_INVALID_NUMA_NODE_INDEX NTStatus = 0xC0370010
+ STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED NTStatus = 0xC0370011
+ STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE NTStatus = 0xC0370012
+ STATUS_VID_PAGE_RANGE_OVERFLOW NTStatus = 0xC0370013
+ STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE NTStatus = 0xC0370014
+ STATUS_VID_INVALID_GPA_RANGE_HANDLE NTStatus = 0xC0370015
+ STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE NTStatus = 0xC0370016
+ STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED NTStatus = 0xC0370017
+ STATUS_VID_INVALID_PPM_HANDLE NTStatus = 0xC0370018
+ STATUS_VID_MBPS_ARE_LOCKED NTStatus = 0xC0370019
+ STATUS_VID_MESSAGE_QUEUE_CLOSED NTStatus = 0xC037001A
+ STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED NTStatus = 0xC037001B
+ STATUS_VID_STOP_PENDING NTStatus = 0xC037001C
+ STATUS_VID_INVALID_PROCESSOR_STATE NTStatus = 0xC037001D
+ STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT NTStatus = 0xC037001E
+ STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED NTStatus = 0xC037001F
+ STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET NTStatus = 0xC0370020
+ STATUS_VID_MMIO_RANGE_DESTROYED NTStatus = 0xC0370021
+ STATUS_VID_INVALID_CHILD_GPA_PAGE_SET NTStatus = 0xC0370022
+ STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED NTStatus = 0xC0370023
+ STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL NTStatus = 0xC0370024
+ STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE NTStatus = 0xC0370025
+ STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT NTStatus = 0xC0370026
+ STATUS_VID_SAVED_STATE_CORRUPT NTStatus = 0xC0370027
+ STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM NTStatus = 0xC0370028
+ STATUS_VID_SAVED_STATE_INCOMPATIBLE NTStatus = 0xC0370029
+ STATUS_VID_VTL_ACCESS_DENIED NTStatus = 0xC037002A
+ STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED NTStatus = 0x80370001
+ STATUS_IPSEC_BAD_SPI NTStatus = 0xC0360001
+ STATUS_IPSEC_SA_LIFETIME_EXPIRED NTStatus = 0xC0360002
+ STATUS_IPSEC_WRONG_SA NTStatus = 0xC0360003
+ STATUS_IPSEC_REPLAY_CHECK_FAILED NTStatus = 0xC0360004
+ STATUS_IPSEC_INVALID_PACKET NTStatus = 0xC0360005
+ STATUS_IPSEC_INTEGRITY_CHECK_FAILED NTStatus = 0xC0360006
+ STATUS_IPSEC_CLEAR_TEXT_DROP NTStatus = 0xC0360007
+ STATUS_IPSEC_AUTH_FIREWALL_DROP NTStatus = 0xC0360008
+ STATUS_IPSEC_THROTTLE_DROP NTStatus = 0xC0360009
+ STATUS_IPSEC_DOSP_BLOCK NTStatus = 0xC0368000
+ STATUS_IPSEC_DOSP_RECEIVED_MULTICAST NTStatus = 0xC0368001
+ STATUS_IPSEC_DOSP_INVALID_PACKET NTStatus = 0xC0368002
+ STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED NTStatus = 0xC0368003
+ STATUS_IPSEC_DOSP_MAX_ENTRIES NTStatus = 0xC0368004
+ STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED NTStatus = 0xC0368005
+ STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES NTStatus = 0xC0368006
+ STATUS_VOLMGR_INCOMPLETE_REGENERATION NTStatus = 0x80380001
+ STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION NTStatus = 0x80380002
+ STATUS_VOLMGR_DATABASE_FULL NTStatus = 0xC0380001
+ STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED NTStatus = 0xC0380002
+ STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC NTStatus = 0xC0380003
+ STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED NTStatus = 0xC0380004
+ STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME NTStatus = 0xC0380005
+ STATUS_VOLMGR_DISK_DUPLICATE NTStatus = 0xC0380006
+ STATUS_VOLMGR_DISK_DYNAMIC NTStatus = 0xC0380007
+ STATUS_VOLMGR_DISK_ID_INVALID NTStatus = 0xC0380008
+ STATUS_VOLMGR_DISK_INVALID NTStatus = 0xC0380009
+ STATUS_VOLMGR_DISK_LAST_VOTER NTStatus = 0xC038000A
+ STATUS_VOLMGR_DISK_LAYOUT_INVALID NTStatus = 0xC038000B
+ STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS NTStatus = 0xC038000C
+ STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED NTStatus = 0xC038000D
+ STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL NTStatus = 0xC038000E
+ STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS NTStatus = 0xC038000F
+ STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS NTStatus = 0xC0380010
+ STATUS_VOLMGR_DISK_MISSING NTStatus = 0xC0380011
+ STATUS_VOLMGR_DISK_NOT_EMPTY NTStatus = 0xC0380012
+ STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE NTStatus = 0xC0380013
+ STATUS_VOLMGR_DISK_REVECTORING_FAILED NTStatus = 0xC0380014
+ STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID NTStatus = 0xC0380015
+ STATUS_VOLMGR_DISK_SET_NOT_CONTAINED NTStatus = 0xC0380016
+ STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS NTStatus = 0xC0380017
+ STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES NTStatus = 0xC0380018
+ STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED NTStatus = 0xC0380019
+ STATUS_VOLMGR_EXTENT_ALREADY_USED NTStatus = 0xC038001A
+ STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS NTStatus = 0xC038001B
+ STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION NTStatus = 0xC038001C
+ STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED NTStatus = 0xC038001D
+ STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION NTStatus = 0xC038001E
+ STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH NTStatus = 0xC038001F
+ STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED NTStatus = 0xC0380020
+ STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID NTStatus = 0xC0380021
+ STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS NTStatus = 0xC0380022
+ STATUS_VOLMGR_MEMBER_IN_SYNC NTStatus = 0xC0380023
+ STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE NTStatus = 0xC0380024
+ STATUS_VOLMGR_MEMBER_INDEX_INVALID NTStatus = 0xC0380025
+ STATUS_VOLMGR_MEMBER_MISSING NTStatus = 0xC0380026
+ STATUS_VOLMGR_MEMBER_NOT_DETACHED NTStatus = 0xC0380027
+ STATUS_VOLMGR_MEMBER_REGENERATING NTStatus = 0xC0380028
+ STATUS_VOLMGR_ALL_DISKS_FAILED NTStatus = 0xC0380029
+ STATUS_VOLMGR_NO_REGISTERED_USERS NTStatus = 0xC038002A
+ STATUS_VOLMGR_NO_SUCH_USER NTStatus = 0xC038002B
+ STATUS_VOLMGR_NOTIFICATION_RESET NTStatus = 0xC038002C
+ STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID NTStatus = 0xC038002D
+ STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID NTStatus = 0xC038002E
+ STATUS_VOLMGR_PACK_DUPLICATE NTStatus = 0xC038002F
+ STATUS_VOLMGR_PACK_ID_INVALID NTStatus = 0xC0380030
+ STATUS_VOLMGR_PACK_INVALID NTStatus = 0xC0380031
+ STATUS_VOLMGR_PACK_NAME_INVALID NTStatus = 0xC0380032
+ STATUS_VOLMGR_PACK_OFFLINE NTStatus = 0xC0380033
+ STATUS_VOLMGR_PACK_HAS_QUORUM NTStatus = 0xC0380034
+ STATUS_VOLMGR_PACK_WITHOUT_QUORUM NTStatus = 0xC0380035
+ STATUS_VOLMGR_PARTITION_STYLE_INVALID NTStatus = 0xC0380036
+ STATUS_VOLMGR_PARTITION_UPDATE_FAILED NTStatus = 0xC0380037
+ STATUS_VOLMGR_PLEX_IN_SYNC NTStatus = 0xC0380038
+ STATUS_VOLMGR_PLEX_INDEX_DUPLICATE NTStatus = 0xC0380039
+ STATUS_VOLMGR_PLEX_INDEX_INVALID NTStatus = 0xC038003A
+ STATUS_VOLMGR_PLEX_LAST_ACTIVE NTStatus = 0xC038003B
+ STATUS_VOLMGR_PLEX_MISSING NTStatus = 0xC038003C
+ STATUS_VOLMGR_PLEX_REGENERATING NTStatus = 0xC038003D
+ STATUS_VOLMGR_PLEX_TYPE_INVALID NTStatus = 0xC038003E
+ STATUS_VOLMGR_PLEX_NOT_RAID5 NTStatus = 0xC038003F
+ STATUS_VOLMGR_PLEX_NOT_SIMPLE NTStatus = 0xC0380040
+ STATUS_VOLMGR_STRUCTURE_SIZE_INVALID NTStatus = 0xC0380041
+ STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS NTStatus = 0xC0380042
+ STATUS_VOLMGR_TRANSACTION_IN_PROGRESS NTStatus = 0xC0380043
+ STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE NTStatus = 0xC0380044
+ STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK NTStatus = 0xC0380045
+ STATUS_VOLMGR_VOLUME_ID_INVALID NTStatus = 0xC0380046
+ STATUS_VOLMGR_VOLUME_LENGTH_INVALID NTStatus = 0xC0380047
+ STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE NTStatus = 0xC0380048
+ STATUS_VOLMGR_VOLUME_NOT_MIRRORED NTStatus = 0xC0380049
+ STATUS_VOLMGR_VOLUME_NOT_RETAINED NTStatus = 0xC038004A
+ STATUS_VOLMGR_VOLUME_OFFLINE NTStatus = 0xC038004B
+ STATUS_VOLMGR_VOLUME_RETAINED NTStatus = 0xC038004C
+ STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID NTStatus = 0xC038004D
+ STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE NTStatus = 0xC038004E
+ STATUS_VOLMGR_BAD_BOOT_DISK NTStatus = 0xC038004F
+ STATUS_VOLMGR_PACK_CONFIG_OFFLINE NTStatus = 0xC0380050
+ STATUS_VOLMGR_PACK_CONFIG_ONLINE NTStatus = 0xC0380051
+ STATUS_VOLMGR_NOT_PRIMARY_PACK NTStatus = 0xC0380052
+ STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED NTStatus = 0xC0380053
+ STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID NTStatus = 0xC0380054
+ STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID NTStatus = 0xC0380055
+ STATUS_VOLMGR_VOLUME_MIRRORED NTStatus = 0xC0380056
+ STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED NTStatus = 0xC0380057
+ STATUS_VOLMGR_NO_VALID_LOG_COPIES NTStatus = 0xC0380058
+ STATUS_VOLMGR_PRIMARY_PACK_PRESENT NTStatus = 0xC0380059
+ STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID NTStatus = 0xC038005A
+ STATUS_VOLMGR_MIRROR_NOT_SUPPORTED NTStatus = 0xC038005B
+ STATUS_VOLMGR_RAID5_NOT_SUPPORTED NTStatus = 0xC038005C
+ STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED NTStatus = 0x80390001
+ STATUS_BCD_TOO_MANY_ELEMENTS NTStatus = 0xC0390002
+ STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED NTStatus = 0x80390003
+ STATUS_VHD_DRIVE_FOOTER_MISSING NTStatus = 0xC03A0001
+ STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH NTStatus = 0xC03A0002
+ STATUS_VHD_DRIVE_FOOTER_CORRUPT NTStatus = 0xC03A0003
+ STATUS_VHD_FORMAT_UNKNOWN NTStatus = 0xC03A0004
+ STATUS_VHD_FORMAT_UNSUPPORTED_VERSION NTStatus = 0xC03A0005
+ STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH NTStatus = 0xC03A0006
+ STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION NTStatus = 0xC03A0007
+ STATUS_VHD_SPARSE_HEADER_CORRUPT NTStatus = 0xC03A0008
+ STATUS_VHD_BLOCK_ALLOCATION_FAILURE NTStatus = 0xC03A0009
+ STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT NTStatus = 0xC03A000A
+ STATUS_VHD_INVALID_BLOCK_SIZE NTStatus = 0xC03A000B
+ STATUS_VHD_BITMAP_MISMATCH NTStatus = 0xC03A000C
+ STATUS_VHD_PARENT_VHD_NOT_FOUND NTStatus = 0xC03A000D
+ STATUS_VHD_CHILD_PARENT_ID_MISMATCH NTStatus = 0xC03A000E
+ STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH NTStatus = 0xC03A000F
+ STATUS_VHD_METADATA_READ_FAILURE NTStatus = 0xC03A0010
+ STATUS_VHD_METADATA_WRITE_FAILURE NTStatus = 0xC03A0011
+ STATUS_VHD_INVALID_SIZE NTStatus = 0xC03A0012
+ STATUS_VHD_INVALID_FILE_SIZE NTStatus = 0xC03A0013
+ STATUS_VIRTDISK_PROVIDER_NOT_FOUND NTStatus = 0xC03A0014
+ STATUS_VIRTDISK_NOT_VIRTUAL_DISK NTStatus = 0xC03A0015
+ STATUS_VHD_PARENT_VHD_ACCESS_DENIED NTStatus = 0xC03A0016
+ STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH NTStatus = 0xC03A0017
+ STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED NTStatus = 0xC03A0018
+ STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT NTStatus = 0xC03A0019
+ STATUS_VIRTUAL_DISK_LIMITATION NTStatus = 0xC03A001A
+ STATUS_VHD_INVALID_TYPE NTStatus = 0xC03A001B
+ STATUS_VHD_INVALID_STATE NTStatus = 0xC03A001C
+ STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE NTStatus = 0xC03A001D
+ STATUS_VIRTDISK_DISK_ALREADY_OWNED NTStatus = 0xC03A001E
+ STATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE NTStatus = 0xC03A001F
+ STATUS_CTLOG_TRACKING_NOT_INITIALIZED NTStatus = 0xC03A0020
+ STATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE NTStatus = 0xC03A0021
+ STATUS_CTLOG_VHD_CHANGED_OFFLINE NTStatus = 0xC03A0022
+ STATUS_CTLOG_INVALID_TRACKING_STATE NTStatus = 0xC03A0023
+ STATUS_CTLOG_INCONSISTENT_TRACKING_FILE NTStatus = 0xC03A0024
+ STATUS_VHD_METADATA_FULL NTStatus = 0xC03A0028
+ STATUS_VHD_INVALID_CHANGE_TRACKING_ID NTStatus = 0xC03A0029
+ STATUS_VHD_CHANGE_TRACKING_DISABLED NTStatus = 0xC03A002A
+ STATUS_VHD_MISSING_CHANGE_TRACKING_INFORMATION NTStatus = 0xC03A0030
+ STATUS_VHD_RESIZE_WOULD_TRUNCATE_DATA NTStatus = 0xC03A0031
+ STATUS_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE NTStatus = 0xC03A0032
+ STATUS_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE NTStatus = 0xC03A0033
+ STATUS_QUERY_STORAGE_ERROR NTStatus = 0x803A0001
+ STATUS_GDI_HANDLE_LEAK NTStatus = 0x803F0001
+ STATUS_RKF_KEY_NOT_FOUND NTStatus = 0xC0400001
+ STATUS_RKF_DUPLICATE_KEY NTStatus = 0xC0400002
+ STATUS_RKF_BLOB_FULL NTStatus = 0xC0400003
+ STATUS_RKF_STORE_FULL NTStatus = 0xC0400004
+ STATUS_RKF_FILE_BLOCKED NTStatus = 0xC0400005
+ STATUS_RKF_ACTIVE_KEY NTStatus = 0xC0400006
+ STATUS_RDBSS_RESTART_OPERATION NTStatus = 0xC0410001
+ STATUS_RDBSS_CONTINUE_OPERATION NTStatus = 0xC0410002
+ STATUS_RDBSS_POST_OPERATION NTStatus = 0xC0410003
+ STATUS_RDBSS_RETRY_LOOKUP NTStatus = 0xC0410004
+ STATUS_BTH_ATT_INVALID_HANDLE NTStatus = 0xC0420001
+ STATUS_BTH_ATT_READ_NOT_PERMITTED NTStatus = 0xC0420002
+ STATUS_BTH_ATT_WRITE_NOT_PERMITTED NTStatus = 0xC0420003
+ STATUS_BTH_ATT_INVALID_PDU NTStatus = 0xC0420004
+ STATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION NTStatus = 0xC0420005
+ STATUS_BTH_ATT_REQUEST_NOT_SUPPORTED NTStatus = 0xC0420006
+ STATUS_BTH_ATT_INVALID_OFFSET NTStatus = 0xC0420007
+ STATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION NTStatus = 0xC0420008
+ STATUS_BTH_ATT_PREPARE_QUEUE_FULL NTStatus = 0xC0420009
+ STATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND NTStatus = 0xC042000A
+ STATUS_BTH_ATT_ATTRIBUTE_NOT_LONG NTStatus = 0xC042000B
+ STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE NTStatus = 0xC042000C
+ STATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH NTStatus = 0xC042000D
+ STATUS_BTH_ATT_UNLIKELY NTStatus = 0xC042000E
+ STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION NTStatus = 0xC042000F
+ STATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE NTStatus = 0xC0420010
+ STATUS_BTH_ATT_INSUFFICIENT_RESOURCES NTStatus = 0xC0420011
+ STATUS_BTH_ATT_UNKNOWN_ERROR NTStatus = 0xC0421000
+ STATUS_SECUREBOOT_ROLLBACK_DETECTED NTStatus = 0xC0430001
+ STATUS_SECUREBOOT_POLICY_VIOLATION NTStatus = 0xC0430002
+ STATUS_SECUREBOOT_INVALID_POLICY NTStatus = 0xC0430003
+ STATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND NTStatus = 0xC0430004
+ STATUS_SECUREBOOT_POLICY_NOT_SIGNED NTStatus = 0xC0430005
+ STATUS_SECUREBOOT_NOT_ENABLED NTStatus = 0x80430006
+ STATUS_SECUREBOOT_FILE_REPLACED NTStatus = 0xC0430007
+ STATUS_SECUREBOOT_POLICY_NOT_AUTHORIZED NTStatus = 0xC0430008
+ STATUS_SECUREBOOT_POLICY_UNKNOWN NTStatus = 0xC0430009
+ STATUS_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION NTStatus = 0xC043000A
+ STATUS_SECUREBOOT_PLATFORM_ID_MISMATCH NTStatus = 0xC043000B
+ STATUS_SECUREBOOT_POLICY_ROLLBACK_DETECTED NTStatus = 0xC043000C
+ STATUS_SECUREBOOT_POLICY_UPGRADE_MISMATCH NTStatus = 0xC043000D
+ STATUS_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING NTStatus = 0xC043000E
+ STATUS_SECUREBOOT_NOT_BASE_POLICY NTStatus = 0xC043000F
+ STATUS_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY NTStatus = 0xC0430010
+ STATUS_PLATFORM_MANIFEST_NOT_AUTHORIZED NTStatus = 0xC0EB0001
+ STATUS_PLATFORM_MANIFEST_INVALID NTStatus = 0xC0EB0002
+ STATUS_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED NTStatus = 0xC0EB0003
+ STATUS_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED NTStatus = 0xC0EB0004
+ STATUS_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND NTStatus = 0xC0EB0005
+ STATUS_PLATFORM_MANIFEST_NOT_ACTIVE NTStatus = 0xC0EB0006
+ STATUS_PLATFORM_MANIFEST_NOT_SIGNED NTStatus = 0xC0EB0007
+ STATUS_SYSTEM_INTEGRITY_ROLLBACK_DETECTED NTStatus = 0xC0E90001
+ STATUS_SYSTEM_INTEGRITY_POLICY_VIOLATION NTStatus = 0xC0E90002
+ STATUS_SYSTEM_INTEGRITY_INVALID_POLICY NTStatus = 0xC0E90003
+ STATUS_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED NTStatus = 0xC0E90004
+ STATUS_SYSTEM_INTEGRITY_TOO_MANY_POLICIES NTStatus = 0xC0E90005
+ STATUS_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED NTStatus = 0xC0E90006
+ STATUS_NO_APPLICABLE_APP_LICENSES_FOUND NTStatus = 0xC0EA0001
+ STATUS_CLIP_LICENSE_NOT_FOUND NTStatus = 0xC0EA0002
+ STATUS_CLIP_DEVICE_LICENSE_MISSING NTStatus = 0xC0EA0003
+ STATUS_CLIP_LICENSE_INVALID_SIGNATURE NTStatus = 0xC0EA0004
+ STATUS_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID NTStatus = 0xC0EA0005
+ STATUS_CLIP_LICENSE_EXPIRED NTStatus = 0xC0EA0006
+ STATUS_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE NTStatus = 0xC0EA0007
+ STATUS_CLIP_LICENSE_NOT_SIGNED NTStatus = 0xC0EA0008
+ STATUS_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE NTStatus = 0xC0EA0009
+ STATUS_CLIP_LICENSE_DEVICE_ID_MISMATCH NTStatus = 0xC0EA000A
+ STATUS_AUDIO_ENGINE_NODE_NOT_FOUND NTStatus = 0xC0440001
+ STATUS_HDAUDIO_EMPTY_CONNECTION_LIST NTStatus = 0xC0440002
+ STATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED NTStatus = 0xC0440003
+ STATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED NTStatus = 0xC0440004
+ STATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY NTStatus = 0xC0440005
+ STATUS_SPACES_REPAIRED NTStatus = 0x00E70000
+ STATUS_SPACES_PAUSE NTStatus = 0x00E70001
+ STATUS_SPACES_COMPLETE NTStatus = 0x00E70002
+ STATUS_SPACES_REDIRECT NTStatus = 0x00E70003
+ STATUS_SPACES_FAULT_DOMAIN_TYPE_INVALID NTStatus = 0xC0E70001
+ STATUS_SPACES_RESILIENCY_TYPE_INVALID NTStatus = 0xC0E70003
+ STATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID NTStatus = 0xC0E70004
+ STATUS_SPACES_DRIVE_REDUNDANCY_INVALID NTStatus = 0xC0E70006
+ STATUS_SPACES_NUMBER_OF_DATA_COPIES_INVALID NTStatus = 0xC0E70007
+ STATUS_SPACES_INTERLEAVE_LENGTH_INVALID NTStatus = 0xC0E70009
+ STATUS_SPACES_NUMBER_OF_COLUMNS_INVALID NTStatus = 0xC0E7000A
+ STATUS_SPACES_NOT_ENOUGH_DRIVES NTStatus = 0xC0E7000B
+ STATUS_SPACES_EXTENDED_ERROR NTStatus = 0xC0E7000C
+ STATUS_SPACES_PROVISIONING_TYPE_INVALID NTStatus = 0xC0E7000D
+ STATUS_SPACES_ALLOCATION_SIZE_INVALID NTStatus = 0xC0E7000E
+ STATUS_SPACES_ENCLOSURE_AWARE_INVALID NTStatus = 0xC0E7000F
+ STATUS_SPACES_WRITE_CACHE_SIZE_INVALID NTStatus = 0xC0E70010
+ STATUS_SPACES_NUMBER_OF_GROUPS_INVALID NTStatus = 0xC0E70011
+ STATUS_SPACES_DRIVE_OPERATIONAL_STATE_INVALID NTStatus = 0xC0E70012
+ STATUS_SPACES_UPDATE_COLUMN_STATE NTStatus = 0xC0E70013
+ STATUS_SPACES_MAP_REQUIRED NTStatus = 0xC0E70014
+ STATUS_SPACES_UNSUPPORTED_VERSION NTStatus = 0xC0E70015
+ STATUS_SPACES_CORRUPT_METADATA NTStatus = 0xC0E70016
+ STATUS_SPACES_DRT_FULL NTStatus = 0xC0E70017
+ STATUS_SPACES_INCONSISTENCY NTStatus = 0xC0E70018
+ STATUS_SPACES_LOG_NOT_READY NTStatus = 0xC0E70019
+ STATUS_SPACES_NO_REDUNDANCY NTStatus = 0xC0E7001A
+ STATUS_SPACES_DRIVE_NOT_READY NTStatus = 0xC0E7001B
+ STATUS_SPACES_DRIVE_SPLIT NTStatus = 0xC0E7001C
+ STATUS_SPACES_DRIVE_LOST_DATA NTStatus = 0xC0E7001D
+ STATUS_SPACES_ENTRY_INCOMPLETE NTStatus = 0xC0E7001E
+ STATUS_SPACES_ENTRY_INVALID NTStatus = 0xC0E7001F
+ STATUS_SPACES_MARK_DIRTY NTStatus = 0xC0E70020
+ STATUS_VOLSNAP_BOOTFILE_NOT_VALID NTStatus = 0xC0500003
+ STATUS_VOLSNAP_ACTIVATION_TIMEOUT NTStatus = 0xC0500004
+ STATUS_IO_PREEMPTED NTStatus = 0xC0510001
+ STATUS_SVHDX_ERROR_STORED NTStatus = 0xC05C0000
+ STATUS_SVHDX_ERROR_NOT_AVAILABLE NTStatus = 0xC05CFF00
+ STATUS_SVHDX_UNIT_ATTENTION_AVAILABLE NTStatus = 0xC05CFF01
+ STATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED NTStatus = 0xC05CFF02
+ STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED NTStatus = 0xC05CFF03
+ STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED NTStatus = 0xC05CFF04
+ STATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED NTStatus = 0xC05CFF05
+ STATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED NTStatus = 0xC05CFF06
+ STATUS_SVHDX_RESERVATION_CONFLICT NTStatus = 0xC05CFF07
+ STATUS_SVHDX_WRONG_FILE_TYPE NTStatus = 0xC05CFF08
+ STATUS_SVHDX_VERSION_MISMATCH NTStatus = 0xC05CFF09
+ STATUS_VHD_SHARED NTStatus = 0xC05CFF0A
+ STATUS_SVHDX_NO_INITIATOR NTStatus = 0xC05CFF0B
+ STATUS_VHDSET_BACKING_STORAGE_NOT_FOUND NTStatus = 0xC05CFF0C
+ STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP NTStatus = 0xC05D0000
+ STATUS_SMB_BAD_CLUSTER_DIALECT NTStatus = 0xC05D0001
+ STATUS_SMB_GUEST_LOGON_BLOCKED NTStatus = 0xC05D0002
+ STATUS_SECCORE_INVALID_COMMAND NTStatus = 0xC0E80000
+ STATUS_VSM_NOT_INITIALIZED NTStatus = 0xC0450000
+ STATUS_VSM_DMA_PROTECTION_NOT_IN_USE NTStatus = 0xC0450001
+ STATUS_APPEXEC_CONDITION_NOT_SATISFIED NTStatus = 0xC0EC0000
+ STATUS_APPEXEC_HANDLE_INVALIDATED NTStatus = 0xC0EC0001
+ STATUS_APPEXEC_INVALID_HOST_GENERATION NTStatus = 0xC0EC0002
+ STATUS_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION NTStatus = 0xC0EC0003
+ STATUS_APPEXEC_INVALID_HOST_STATE NTStatus = 0xC0EC0004
+ STATUS_APPEXEC_NO_DONOR NTStatus = 0xC0EC0005
+ STATUS_APPEXEC_HOST_ID_MISMATCH NTStatus = 0xC0EC0006
+ STATUS_APPEXEC_UNKNOWN_USER NTStatus = 0xC0EC0007
)
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 2aa4fa6..1055d47 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -17,6 +17,7 @@ const (
var (
errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+ errERROR_EINVAL error = syscall.EINVAL
)
// errnoErr returns common boxed Errno values, to prevent
@@ -24,7 +25,7 @@ var (
func errnoErr(e syscall.Errno) error {
switch e {
case 0:
- return nil
+ return errERROR_EINVAL
case errnoERROR_IO_PENDING:
return errERROR_IO_PENDING
}
@@ -35,373 +36,538 @@ func errnoErr(e syscall.Errno) error {
}
var (
+ modCfgMgr32 = NewLazySystemDLL("CfgMgr32.dll")
modadvapi32 = NewLazySystemDLL("advapi32.dll")
+ modcrypt32 = NewLazySystemDLL("crypt32.dll")
+ moddnsapi = NewLazySystemDLL("dnsapi.dll")
+ modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
modkernel32 = NewLazySystemDLL("kernel32.dll")
- modshell32 = NewLazySystemDLL("shell32.dll")
- moduserenv = NewLazySystemDLL("userenv.dll")
modmswsock = NewLazySystemDLL("mswsock.dll")
- modcrypt32 = NewLazySystemDLL("crypt32.dll")
- moduser32 = NewLazySystemDLL("user32.dll")
- modole32 = NewLazySystemDLL("ole32.dll")
+ modnetapi32 = NewLazySystemDLL("netapi32.dll")
modntdll = NewLazySystemDLL("ntdll.dll")
+ modole32 = NewLazySystemDLL("ole32.dll")
modpsapi = NewLazySystemDLL("psapi.dll")
- modws2_32 = NewLazySystemDLL("ws2_32.dll")
- moddnsapi = NewLazySystemDLL("dnsapi.dll")
- modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
+ modsechost = NewLazySystemDLL("sechost.dll")
modsecur32 = NewLazySystemDLL("secur32.dll")
- modnetapi32 = NewLazySystemDLL("netapi32.dll")
+ modsetupapi = NewLazySystemDLL("setupapi.dll")
+ modshell32 = NewLazySystemDLL("shell32.dll")
+ moduser32 = NewLazySystemDLL("user32.dll")
+ moduserenv = NewLazySystemDLL("userenv.dll")
+ modversion = NewLazySystemDLL("version.dll")
+ modwintrust = NewLazySystemDLL("wintrust.dll")
+ modws2_32 = NewLazySystemDLL("ws2_32.dll")
modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
- procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
- procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
- procReportEventW = modadvapi32.NewProc("ReportEventW")
- procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
+ procCM_Get_DevNode_Status = modCfgMgr32.NewProc("CM_Get_DevNode_Status")
+ procCM_Get_Device_Interface_ListW = modCfgMgr32.NewProc("CM_Get_Device_Interface_ListW")
+ procCM_Get_Device_Interface_List_SizeW = modCfgMgr32.NewProc("CM_Get_Device_Interface_List_SizeW")
+ procCM_MapCrToWin32Err = modCfgMgr32.NewProc("CM_MapCrToWin32Err")
+ procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
+ procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
+ procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
+ procBuildSecurityDescriptorW = modadvapi32.NewProc("BuildSecurityDescriptorW")
+ procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
+ procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
+ procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle")
+ procControlService = modadvapi32.NewProc("ControlService")
+ procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
+ procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
+ procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
+ procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
+ procCopySid = modadvapi32.NewProc("CopySid")
+ procCreateProcessAsUserW = modadvapi32.NewProc("CreateProcessAsUserW")
procCreateServiceW = modadvapi32.NewProc("CreateServiceW")
- procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
+ procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid")
+ procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
+ procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
+ procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
procDeleteService = modadvapi32.NewProc("DeleteService")
- procStartServiceW = modadvapi32.NewProc("StartServiceW")
- procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
- procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
- procControlService = modadvapi32.NewProc("ControlService")
- procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
- procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
- procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
- procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
- procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
- procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
+ procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
+ procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
- procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
+ procEqualSid = modadvapi32.NewProc("EqualSid")
+ procFreeSid = modadvapi32.NewProc("FreeSid")
+ procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
+ procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
+ procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
+ procGetSecurityDescriptorDacl = modadvapi32.NewProc("GetSecurityDescriptorDacl")
+ procGetSecurityDescriptorGroup = modadvapi32.NewProc("GetSecurityDescriptorGroup")
+ procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
+ procGetSecurityDescriptorOwner = modadvapi32.NewProc("GetSecurityDescriptorOwner")
+ procGetSecurityDescriptorRMControl = modadvapi32.NewProc("GetSecurityDescriptorRMControl")
+ procGetSecurityDescriptorSacl = modadvapi32.NewProc("GetSecurityDescriptorSacl")
+ procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo")
+ procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority")
+ procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority")
+ procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount")
+ procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
+ procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
+ procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor")
+ procInitiateSystemShutdownExW = modadvapi32.NewProc("InitiateSystemShutdownExW")
+ procIsTokenRestricted = modadvapi32.NewProc("IsTokenRestricted")
+ procIsValidSecurityDescriptor = modadvapi32.NewProc("IsValidSecurityDescriptor")
+ procIsValidSid = modadvapi32.NewProc("IsValidSid")
+ procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid")
+ procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
+ procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
+ procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
+ procMakeAbsoluteSD = modadvapi32.NewProc("MakeAbsoluteSD")
+ procMakeSelfRelativeSD = modadvapi32.NewProc("MakeSelfRelativeSD")
procNotifyServiceStatusChangeW = modadvapi32.NewProc("NotifyServiceStatusChangeW")
- procGetLastError = modkernel32.NewProc("GetLastError")
- procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
- procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
- procFreeLibrary = modkernel32.NewProc("FreeLibrary")
- procGetProcAddress = modkernel32.NewProc("GetProcAddress")
- procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
- procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
- procGetVersion = modkernel32.NewProc("GetVersion")
- procFormatMessageW = modkernel32.NewProc("FormatMessageW")
- procExitProcess = modkernel32.NewProc("ExitProcess")
- procIsWow64Process = modkernel32.NewProc("IsWow64Process")
- procCreateFileW = modkernel32.NewProc("CreateFileW")
- procReadFile = modkernel32.NewProc("ReadFile")
- procWriteFile = modkernel32.NewProc("WriteFile")
- procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
- procSetFilePointer = modkernel32.NewProc("SetFilePointer")
- procCloseHandle = modkernel32.NewProc("CloseHandle")
- procGetStdHandle = modkernel32.NewProc("GetStdHandle")
- procSetStdHandle = modkernel32.NewProc("SetStdHandle")
- procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
- procFindNextFileW = modkernel32.NewProc("FindNextFileW")
- procFindClose = modkernel32.NewProc("FindClose")
- procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
- procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
- procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
- procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
- procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
- procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
- procDeleteFileW = modkernel32.NewProc("DeleteFileW")
- procMoveFileW = modkernel32.NewProc("MoveFileW")
- procMoveFileExW = modkernel32.NewProc("MoveFileExW")
- procLockFileEx = modkernel32.NewProc("LockFileEx")
- procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
- procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
- procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
- procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
- procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
- procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
- procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
- procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
- procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
- procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
- procCancelIo = modkernel32.NewProc("CancelIo")
- procCancelIoEx = modkernel32.NewProc("CancelIoEx")
- procCreateProcessW = modkernel32.NewProc("CreateProcessW")
- procOpenProcess = modkernel32.NewProc("OpenProcess")
- procShellExecuteW = modshell32.NewProc("ShellExecuteW")
- procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
- procTerminateProcess = modkernel32.NewProc("TerminateProcess")
- procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
- procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
- procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
- procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
- procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
- procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
- procGetTempPathW = modkernel32.NewProc("GetTempPathW")
- procCreatePipe = modkernel32.NewProc("CreatePipe")
- procGetFileType = modkernel32.NewProc("GetFileType")
- procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
- procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
- procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
- procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
- procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
- procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
- procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
- procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
- procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
- procGetTickCount64 = modkernel32.NewProc("GetTickCount64")
- procSetFileTime = modkernel32.NewProc("SetFileTime")
- procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
- procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
- procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
- procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
- procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
- procLocalFree = modkernel32.NewProc("LocalFree")
- procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
- procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
- procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
- procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
- procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
- procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
- procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
- procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
- procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
- procVirtualLock = modkernel32.NewProc("VirtualLock")
- procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
- procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
- procVirtualFree = modkernel32.NewProc("VirtualFree")
- procVirtualProtect = modkernel32.NewProc("VirtualProtect")
- procTransmitFile = modmswsock.NewProc("TransmitFile")
- procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
- procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
- procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
- procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
+ procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
+ procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
+ procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
+ procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
+ procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
+ procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
+ procQueryServiceDynamicInformation = modadvapi32.NewProc("QueryServiceDynamicInformation")
+ procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
+ procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
+ procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
+ procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
+ procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
+ procRegNotifyChangeKeyValue = modadvapi32.NewProc("RegNotifyChangeKeyValue")
+ procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
+ procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
+ procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
+ procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
+ procRegisterServiceCtrlHandlerExW = modadvapi32.NewProc("RegisterServiceCtrlHandlerExW")
+ procReportEventW = modadvapi32.NewProc("ReportEventW")
+ procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
+ procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
+ procSetKernelObjectSecurity = modadvapi32.NewProc("SetKernelObjectSecurity")
+ procSetNamedSecurityInfoW = modadvapi32.NewProc("SetNamedSecurityInfoW")
+ procSetSecurityDescriptorControl = modadvapi32.NewProc("SetSecurityDescriptorControl")
+ procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl")
+ procSetSecurityDescriptorGroup = modadvapi32.NewProc("SetSecurityDescriptorGroup")
+ procSetSecurityDescriptorOwner = modadvapi32.NewProc("SetSecurityDescriptorOwner")
+ procSetSecurityDescriptorRMControl = modadvapi32.NewProc("SetSecurityDescriptorRMControl")
+ procSetSecurityDescriptorSacl = modadvapi32.NewProc("SetSecurityDescriptorSacl")
+ procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo")
+ procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
+ procSetThreadToken = modadvapi32.NewProc("SetThreadToken")
+ procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation")
+ procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
+ procStartServiceW = modadvapi32.NewProc("StartServiceW")
procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
- procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
- procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
+ procCertDeleteCertificateFromStore = modcrypt32.NewProc("CertDeleteCertificateFromStore")
+ procCertDuplicateCertificateContext = modcrypt32.NewProc("CertDuplicateCertificateContext")
+ procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
+ procCertFindCertificateInStore = modcrypt32.NewProc("CertFindCertificateInStore")
+ procCertFindChainInStore = modcrypt32.NewProc("CertFindChainInStore")
+ procCertFindExtension = modcrypt32.NewProc("CertFindExtension")
+ procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
+ procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
+ procCertGetNameStringW = modcrypt32.NewProc("CertGetNameStringW")
+ procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
+ procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
- procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
- procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
- procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
- procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
- procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
- procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
- procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
- procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
- procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
- procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
- procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
- procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
- procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
- procProcess32NextW = modkernel32.NewProc("Process32NextW")
- procThread32First = modkernel32.NewProc("Thread32First")
- procThread32Next = modkernel32.NewProc("Thread32Next")
- procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
- procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
- procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
- procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
- procCreateEventW = modkernel32.NewProc("CreateEventW")
+ procCryptAcquireCertificatePrivateKey = modcrypt32.NewProc("CryptAcquireCertificatePrivateKey")
+ procCryptDecodeObject = modcrypt32.NewProc("CryptDecodeObject")
+ procCryptProtectData = modcrypt32.NewProc("CryptProtectData")
+ procCryptQueryObject = modcrypt32.NewProc("CryptQueryObject")
+ procCryptUnprotectData = modcrypt32.NewProc("CryptUnprotectData")
+ procPFXImportCertStore = modcrypt32.NewProc("PFXImportCertStore")
+ procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
+ procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
+ procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
+ procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
+ procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
+ procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
+ procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
+ procCancelIo = modkernel32.NewProc("CancelIo")
+ procCancelIoEx = modkernel32.NewProc("CancelIoEx")
+ procCloseHandle = modkernel32.NewProc("CloseHandle")
+ procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
+ procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
procCreateEventExW = modkernel32.NewProc("CreateEventExW")
- procOpenEventW = modkernel32.NewProc("OpenEventW")
- procSetEvent = modkernel32.NewProc("SetEvent")
- procResetEvent = modkernel32.NewProc("ResetEvent")
- procPulseEvent = modkernel32.NewProc("PulseEvent")
- procCreateMutexW = modkernel32.NewProc("CreateMutexW")
- procCreateMutexExW = modkernel32.NewProc("CreateMutexExW")
- procOpenMutexW = modkernel32.NewProc("OpenMutexW")
- procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
- procSleepEx = modkernel32.NewProc("SleepEx")
+ procCreateEventW = modkernel32.NewProc("CreateEventW")
+ procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
+ procCreateFileW = modkernel32.NewProc("CreateFileW")
+ procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
+ procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
procCreateJobObjectW = modkernel32.NewProc("CreateJobObjectW")
- procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
- procTerminateJobObject = modkernel32.NewProc("TerminateJobObject")
- procSetErrorMode = modkernel32.NewProc("SetErrorMode")
- procResumeThread = modkernel32.NewProc("ResumeThread")
- procSetPriorityClass = modkernel32.NewProc("SetPriorityClass")
- procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
- procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject")
- procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
- procGetProcessId = modkernel32.NewProc("GetProcessId")
- procOpenThread = modkernel32.NewProc("OpenThread")
- procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
+ procCreateMutexExW = modkernel32.NewProc("CreateMutexExW")
+ procCreateMutexW = modkernel32.NewProc("CreateMutexW")
+ procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
+ procCreatePipe = modkernel32.NewProc("CreatePipe")
+ procCreateProcessW = modkernel32.NewProc("CreateProcessW")
+ procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
+ procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
+ procDeleteFileW = modkernel32.NewProc("DeleteFileW")
+ procDeleteProcThreadAttributeList = modkernel32.NewProc("DeleteProcThreadAttributeList")
procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
- procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
+ procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
+ procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
+ procExitProcess = modkernel32.NewProc("ExitProcess")
+ procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW")
+ procFindClose = modkernel32.NewProc("FindClose")
+ procFindCloseChangeNotification = modkernel32.NewProc("FindCloseChangeNotification")
+ procFindFirstChangeNotificationW = modkernel32.NewProc("FindFirstChangeNotificationW")
+ procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW")
- procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
+ procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
+ procFindNextChangeNotification = modkernel32.NewProc("FindNextChangeNotification")
+ procFindNextFileW = modkernel32.NewProc("FindNextFileW")
procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
+ procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
+ procFindResourceW = modkernel32.NewProc("FindResourceW")
procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
+ procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
+ procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
+ procFormatMessageW = modkernel32.NewProc("FormatMessageW")
+ procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
+ procFreeLibrary = modkernel32.NewProc("FreeLibrary")
+ procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
+ procGetACP = modkernel32.NewProc("GetACP")
+ procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts")
+ procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
+ procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
+ procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
+ procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
+ procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
+ procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
+ procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
+ procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
procGetDiskFreeSpaceExW = modkernel32.NewProc("GetDiskFreeSpaceExW")
procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW")
- procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
+ procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
+ procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
+ procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
+ procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
+ procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
+ procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
+ procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
+ procGetFileType = modkernel32.NewProc("GetFileType")
+ procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW")
+ procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
+ procGetLastError = modkernel32.NewProc("GetLastError")
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
- procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
+ procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
+ procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
+ procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
+ procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
+ procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
+ procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
+ procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
+ procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
+ procGetProcAddress = modkernel32.NewProc("GetProcAddress")
+ procGetProcessId = modkernel32.NewProc("GetProcessId")
+ procGetProcessPreferredUILanguages = modkernel32.NewProc("GetProcessPreferredUILanguages")
+ procGetProcessShutdownParameters = modkernel32.NewProc("GetProcessShutdownParameters")
+ procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
+ procGetProcessWorkingSetSizeEx = modkernel32.NewProc("GetProcessWorkingSetSizeEx")
+ procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
+ procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
+ procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
+ procGetStdHandle = modkernel32.NewProc("GetStdHandle")
+ procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW")
+ procGetSystemPreferredUILanguages = modkernel32.NewProc("GetSystemPreferredUILanguages")
+ procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
+ procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
+ procGetSystemWindowsDirectoryW = modkernel32.NewProc("GetSystemWindowsDirectoryW")
+ procGetTempPathW = modkernel32.NewProc("GetTempPathW")
+ procGetThreadPreferredUILanguages = modkernel32.NewProc("GetThreadPreferredUILanguages")
+ procGetTickCount64 = modkernel32.NewProc("GetTickCount64")
+ procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
+ procGetUserPreferredUILanguages = modkernel32.NewProc("GetUserPreferredUILanguages")
+ procGetVersion = modkernel32.NewProc("GetVersion")
procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW")
+ procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW")
procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW")
procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW")
+ procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW")
+ procInitializeProcThreadAttributeList = modkernel32.NewProc("InitializeProcThreadAttributeList")
+ procIsWow64Process = modkernel32.NewProc("IsWow64Process")
+ procIsWow64Process2 = modkernel32.NewProc("IsWow64Process2")
+ procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
+ procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
+ procLoadResource = modkernel32.NewProc("LoadResource")
+ procLocalAlloc = modkernel32.NewProc("LocalAlloc")
+ procLocalFree = modkernel32.NewProc("LocalFree")
+ procLockFileEx = modkernel32.NewProc("LockFileEx")
+ procLockResource = modkernel32.NewProc("LockResource")
+ procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
+ procModule32FirstW = modkernel32.NewProc("Module32FirstW")
+ procModule32NextW = modkernel32.NewProc("Module32NextW")
+ procMoveFileExW = modkernel32.NewProc("MoveFileExW")
+ procMoveFileW = modkernel32.NewProc("MoveFileW")
+ procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
+ procOpenEventW = modkernel32.NewProc("OpenEventW")
+ procOpenMutexW = modkernel32.NewProc("OpenMutexW")
+ procOpenProcess = modkernel32.NewProc("OpenProcess")
+ procOpenThread = modkernel32.NewProc("OpenThread")
+ procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
+ procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
+ procProcess32NextW = modkernel32.NewProc("Process32NextW")
+ procProcessIdToSessionId = modkernel32.NewProc("ProcessIdToSessionId")
+ procPulseEvent = modkernel32.NewProc("PulseEvent")
procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW")
+ procQueryFullProcessImageNameW = modkernel32.NewProc("QueryFullProcessImageNameW")
+ procQueryInformationJobObject = modkernel32.NewProc("QueryInformationJobObject")
+ 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")
+ procResumeThread = modkernel32.NewProc("ResumeThread")
+ procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts")
+ procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition")
+ procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
+ procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
+ procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories")
+ procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW")
+ procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
+ procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
+ procSetErrorMode = modkernel32.NewProc("SetErrorMode")
+ procSetEvent = modkernel32.NewProc("SetEvent")
+ procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
+ procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
+ procSetFileInformationByHandle = modkernel32.NewProc("SetFileInformationByHandle")
+ procSetFilePointer = modkernel32.NewProc("SetFilePointer")
+ procSetFileTime = modkernel32.NewProc("SetFileTime")
+ procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
+ procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject")
+ procSetNamedPipeHandleState = modkernel32.NewProc("SetNamedPipeHandleState")
+ procSetPriorityClass = modkernel32.NewProc("SetPriorityClass")
+ procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
+ procSetProcessShutdownParameters = modkernel32.NewProc("SetProcessShutdownParameters")
+ procSetProcessWorkingSetSizeEx = modkernel32.NewProc("SetProcessWorkingSetSizeEx")
+ procSetStdHandle = modkernel32.NewProc("SetStdHandle")
procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW")
procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW")
- procMessageBoxW = moduser32.NewProc("MessageBoxW")
- procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
- procInitiateSystemShutdownExW = modadvapi32.NewProc("InitiateSystemShutdownExW")
- procSetProcessShutdownParameters = modkernel32.NewProc("SetProcessShutdownParameters")
- procGetProcessShutdownParameters = modkernel32.NewProc("GetProcessShutdownParameters")
+ procSizeofResource = modkernel32.NewProc("SizeofResource")
+ procSleepEx = modkernel32.NewProc("SleepEx")
+ procTerminateJobObject = modkernel32.NewProc("TerminateJobObject")
+ procTerminateProcess = modkernel32.NewProc("TerminateProcess")
+ procThread32First = modkernel32.NewProc("Thread32First")
+ procThread32Next = modkernel32.NewProc("Thread32Next")
+ procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
+ procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
+ procUpdateProcThreadAttribute = modkernel32.NewProc("UpdateProcThreadAttribute")
+ procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
+ 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")
+ procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
+ procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
+ procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
+ procNtCreateFile = modntdll.NewProc("NtCreateFile")
+ procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
+ procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess")
+ procNtQuerySystemInformation = modntdll.NewProc("NtQuerySystemInformation")
+ procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile")
+ procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess")
+ procNtSetSystemInformation = modntdll.NewProc("NtSetSystemInformation")
+ procRtlAddFunctionTable = modntdll.NewProc("RtlAddFunctionTable")
+ procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
+ procRtlDeleteFunctionTable = modntdll.NewProc("RtlDeleteFunctionTable")
+ procRtlDosPathNameToNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToNtPathName_U_WithStatus")
+ procRtlDosPathNameToRelativeNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToRelativeNtPathName_U_WithStatus")
+ procRtlGetCurrentPeb = modntdll.NewProc("RtlGetCurrentPeb")
+ procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers")
+ procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
+ procRtlInitString = modntdll.NewProc("RtlInitString")
+ procRtlInitUnicodeString = modntdll.NewProc("RtlInitUnicodeString")
+ procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb")
procCLSIDFromString = modole32.NewProc("CLSIDFromString")
- procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
procCoCreateGuid = modole32.NewProc("CoCreateGuid")
+ procCoGetObject = modole32.NewProc("CoGetObject")
+ procCoInitializeEx = modole32.NewProc("CoInitializeEx")
procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
- procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
- procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers")
- procGetProcessPreferredUILanguages = modkernel32.NewProc("GetProcessPreferredUILanguages")
- procGetThreadPreferredUILanguages = modkernel32.NewProc("GetThreadPreferredUILanguages")
- procGetUserPreferredUILanguages = modkernel32.NewProc("GetUserPreferredUILanguages")
- procGetSystemPreferredUILanguages = modkernel32.NewProc("GetSystemPreferredUILanguages")
+ procCoUninitialize = modole32.NewProc("CoUninitialize")
+ procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
+ procEnumProcessModules = modpsapi.NewProc("EnumProcessModules")
+ procEnumProcessModulesEx = modpsapi.NewProc("EnumProcessModulesEx")
procEnumProcesses = modpsapi.NewProc("EnumProcesses")
- procWSAStartup = modws2_32.NewProc("WSAStartup")
+ procGetModuleBaseNameW = modpsapi.NewProc("GetModuleBaseNameW")
+ procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW")
+ procGetModuleInformation = modpsapi.NewProc("GetModuleInformation")
+ procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications")
+ procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
+ procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
+ procTranslateNameW = modsecur32.NewProc("TranslateNameW")
+ procSetupDiBuildDriverInfoList = modsetupapi.NewProc("SetupDiBuildDriverInfoList")
+ procSetupDiCallClassInstaller = modsetupapi.NewProc("SetupDiCallClassInstaller")
+ procSetupDiCancelDriverInfoSearch = modsetupapi.NewProc("SetupDiCancelDriverInfoSearch")
+ procSetupDiClassGuidsFromNameExW = modsetupapi.NewProc("SetupDiClassGuidsFromNameExW")
+ procSetupDiClassNameFromGuidExW = modsetupapi.NewProc("SetupDiClassNameFromGuidExW")
+ procSetupDiCreateDeviceInfoListExW = modsetupapi.NewProc("SetupDiCreateDeviceInfoListExW")
+ procSetupDiCreateDeviceInfoW = modsetupapi.NewProc("SetupDiCreateDeviceInfoW")
+ procSetupDiDestroyDeviceInfoList = modsetupapi.NewProc("SetupDiDestroyDeviceInfoList")
+ procSetupDiDestroyDriverInfoList = modsetupapi.NewProc("SetupDiDestroyDriverInfoList")
+ procSetupDiEnumDeviceInfo = modsetupapi.NewProc("SetupDiEnumDeviceInfo")
+ procSetupDiEnumDriverInfoW = modsetupapi.NewProc("SetupDiEnumDriverInfoW")
+ procSetupDiGetClassDevsExW = modsetupapi.NewProc("SetupDiGetClassDevsExW")
+ procSetupDiGetClassInstallParamsW = modsetupapi.NewProc("SetupDiGetClassInstallParamsW")
+ procSetupDiGetDeviceInfoListDetailW = modsetupapi.NewProc("SetupDiGetDeviceInfoListDetailW")
+ procSetupDiGetDeviceInstallParamsW = modsetupapi.NewProc("SetupDiGetDeviceInstallParamsW")
+ procSetupDiGetDeviceInstanceIdW = modsetupapi.NewProc("SetupDiGetDeviceInstanceIdW")
+ procSetupDiGetDevicePropertyW = modsetupapi.NewProc("SetupDiGetDevicePropertyW")
+ procSetupDiGetDeviceRegistryPropertyW = modsetupapi.NewProc("SetupDiGetDeviceRegistryPropertyW")
+ procSetupDiGetDriverInfoDetailW = modsetupapi.NewProc("SetupDiGetDriverInfoDetailW")
+ procSetupDiGetSelectedDevice = modsetupapi.NewProc("SetupDiGetSelectedDevice")
+ procSetupDiGetSelectedDriverW = modsetupapi.NewProc("SetupDiGetSelectedDriverW")
+ procSetupDiOpenDevRegKey = modsetupapi.NewProc("SetupDiOpenDevRegKey")
+ procSetupDiSetClassInstallParamsW = modsetupapi.NewProc("SetupDiSetClassInstallParamsW")
+ procSetupDiSetDeviceInstallParamsW = modsetupapi.NewProc("SetupDiSetDeviceInstallParamsW")
+ procSetupDiSetDeviceRegistryPropertyW = modsetupapi.NewProc("SetupDiSetDeviceRegistryPropertyW")
+ procSetupDiSetSelectedDevice = modsetupapi.NewProc("SetupDiSetSelectedDevice")
+ procSetupDiSetSelectedDriverW = modsetupapi.NewProc("SetupDiSetSelectedDriverW")
+ procSetupUninstallOEMInfW = modsetupapi.NewProc("SetupUninstallOEMInfW")
+ procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
+ procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
+ procShellExecuteW = modshell32.NewProc("ShellExecuteW")
+ procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
+ procGetShellWindow = moduser32.NewProc("GetShellWindow")
+ procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
+ procMessageBoxW = moduser32.NewProc("MessageBoxW")
+ procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
+ procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
+ procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
+ procGetFileVersionInfoSizeW = modversion.NewProc("GetFileVersionInfoSizeW")
+ procGetFileVersionInfoW = modversion.NewProc("GetFileVersionInfoW")
+ procVerQueryValueW = modversion.NewProc("VerQueryValueW")
+ procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx")
+ procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
+ procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
procWSACleanup = modws2_32.NewProc("WSACleanup")
+ procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
+ procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult")
procWSAIoctl = modws2_32.NewProc("WSAIoctl")
- procsocket = modws2_32.NewProc("socket")
- procsendto = modws2_32.NewProc("sendto")
- procrecvfrom = modws2_32.NewProc("recvfrom")
- procsetsockopt = modws2_32.NewProc("setsockopt")
- procgetsockopt = modws2_32.NewProc("getsockopt")
- procbind = modws2_32.NewProc("bind")
- procconnect = modws2_32.NewProc("connect")
- procgetsockname = modws2_32.NewProc("getsockname")
- procgetpeername = modws2_32.NewProc("getpeername")
- proclisten = modws2_32.NewProc("listen")
- procshutdown = modws2_32.NewProc("shutdown")
- procclosesocket = modws2_32.NewProc("closesocket")
- procAcceptEx = modmswsock.NewProc("AcceptEx")
- procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
procWSARecv = modws2_32.NewProc("WSARecv")
- procWSASend = modws2_32.NewProc("WSASend")
procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
+ procWSASend = modws2_32.NewProc("WSASend")
procWSASendTo = modws2_32.NewProc("WSASendTo")
+ procWSASocketW = modws2_32.NewProc("WSASocketW")
+ procWSAStartup = modws2_32.NewProc("WSAStartup")
+ procbind = modws2_32.NewProc("bind")
+ procclosesocket = modws2_32.NewProc("closesocket")
+ procconnect = modws2_32.NewProc("connect")
procgethostbyname = modws2_32.NewProc("gethostbyname")
+ procgetpeername = modws2_32.NewProc("getpeername")
+ procgetprotobyname = modws2_32.NewProc("getprotobyname")
procgetservbyname = modws2_32.NewProc("getservbyname")
+ procgetsockname = modws2_32.NewProc("getsockname")
+ procgetsockopt = modws2_32.NewProc("getsockopt")
+ proclisten = modws2_32.NewProc("listen")
procntohs = modws2_32.NewProc("ntohs")
- procgetprotobyname = modws2_32.NewProc("getprotobyname")
- procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
- procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
- procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
- procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
- procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
- procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
- procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
- procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
- procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
- procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
- procGetACP = modkernel32.NewProc("GetACP")
- procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
- procTranslateNameW = modsecur32.NewProc("TranslateNameW")
- procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
- procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
- procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
- procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
- procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
- procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
- procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
- procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
- procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
- procCopySid = modadvapi32.NewProc("CopySid")
- procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
- procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid")
- procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid")
- procFreeSid = modadvapi32.NewProc("FreeSid")
- procEqualSid = modadvapi32.NewProc("EqualSid")
- procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority")
- procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount")
- procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority")
- procIsValidSid = modadvapi32.NewProc("IsValidSid")
- procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
- procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
- procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
- procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
- procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
- procSetThreadToken = modadvapi32.NewProc("SetThreadToken")
- procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
- procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
- procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
- procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
- procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation")
- procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
- procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
- procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW")
- procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW")
- procGetSystemWindowsDirectoryW = modkernel32.NewProc("GetSystemWindowsDirectoryW")
- procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
+ procrecvfrom = modws2_32.NewProc("recvfrom")
+ procsendto = modws2_32.NewProc("sendto")
+ procsetsockopt = modws2_32.NewProc("setsockopt")
+ procshutdown = modws2_32.NewProc("shutdown")
+ procsocket = modws2_32.NewProc("socket")
procWTSEnumerateSessionsW = modwtsapi32.NewProc("WTSEnumerateSessionsW")
procWTSFreeMemory = modwtsapi32.NewProc("WTSFreeMemory")
- procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo")
- procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo")
- procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
- procSetNamedSecurityInfoW = modadvapi32.NewProc("SetNamedSecurityInfoW")
- procBuildSecurityDescriptorW = modadvapi32.NewProc("BuildSecurityDescriptorW")
- procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor")
- procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
- procGetSecurityDescriptorDacl = modadvapi32.NewProc("GetSecurityDescriptorDacl")
- procGetSecurityDescriptorSacl = modadvapi32.NewProc("GetSecurityDescriptorSacl")
- procGetSecurityDescriptorOwner = modadvapi32.NewProc("GetSecurityDescriptorOwner")
- procGetSecurityDescriptorGroup = modadvapi32.NewProc("GetSecurityDescriptorGroup")
- procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
- procGetSecurityDescriptorRMControl = modadvapi32.NewProc("GetSecurityDescriptorRMControl")
- procIsValidSecurityDescriptor = modadvapi32.NewProc("IsValidSecurityDescriptor")
- procSetSecurityDescriptorControl = modadvapi32.NewProc("SetSecurityDescriptorControl")
- procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl")
- procSetSecurityDescriptorSacl = modadvapi32.NewProc("SetSecurityDescriptorSacl")
- procSetSecurityDescriptorOwner = modadvapi32.NewProc("SetSecurityDescriptorOwner")
- procSetSecurityDescriptorGroup = modadvapi32.NewProc("SetSecurityDescriptorGroup")
- procSetSecurityDescriptorRMControl = modadvapi32.NewProc("SetSecurityDescriptorRMControl")
- procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
- procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
- procMakeAbsoluteSD = modadvapi32.NewProc("MakeAbsoluteSD")
- procMakeSelfRelativeSD = modadvapi32.NewProc("MakeSelfRelativeSD")
- procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
+ procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
)
-func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_Status.Addr(), 4, uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags), 0, 0)
+ ret = CONFIGRET(r0)
+ return
+}
+
+func cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_ListW.Addr(), 5, uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags), 0)
+ ret = CONFIGRET(r0)
+ return
+}
+
+func cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_List_SizeW.Addr(), 4, uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags), 0, 0)
+ ret = CONFIGRET(r0)
+ return
+}
+
+func cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) {
+ r0, _, _ := syscall.Syscall(procCM_MapCrToWin32Err.Addr(), 2, uintptr(configRet), uintptr(defaultWin32Error), 0)
+ ret = Errno(r0)
+ return
+}
+
+func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) {
+ var _p0 uint32
+ if resetToDefault {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func DeregisterEventSource(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0)
+func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) {
+ var _p0 uint32
+ if disableAllPrivileges {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
+func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
+ r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -409,11 +575,76 @@ func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (ha
func CloseServiceHandle(handle Handle) (err error) {
r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
+ r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(str)
+ if err != nil {
+ return
+ }
+ return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
+}
+
+func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
+ r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
+ r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
+ var _p0 uint32
+ if inheritHandles {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall12(procCreateProcessAsUserW.Addr(), 11, uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -422,24 +653,39 @@ func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access
r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0)
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -447,155 +693,285 @@ func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle,
func DeleteService(service Handle) (err error) {
r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
+func DeregisterEventSource(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0)
+func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {
+ r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
+func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
+func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
+ r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0)
+ isEqual = r0 != 0
+ return
+}
+
+func FreeSid(sid *SID) (err error) {
+ r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ if r1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetLengthSid(sid *SID) (len uint32) {
+ r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ len = uint32(r0)
+ return
+}
+
+func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ var _p0 *uint16
+ _p0, ret = syscall.UTF16PtrFromString(objectName)
+ if ret != nil {
+ return
+ }
+ return _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd)
+}
+
+func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
- r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0)
+func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *daclPresent {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if *daclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ *daclPresent = _p0 != 0
+ *daclDefaulted = _p1 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0)
+func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *groupDefaulted {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
+ *groupDefaulted = _p0 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0)
+func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ len = uint32(r0)
+ return
+}
+
+func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *ownerDefaulted {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
+ *ownerDefaulted = _p0 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
+func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *saclPresent {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if *saclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ *saclPresent = _p0 != 0
+ *saclDefaulted = _p1 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
+func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {
+ r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))
+ return
+}
+
+func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {
+ r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0)
+ subAuthority = (*uint32)(unsafe.Pointer(r0))
+ return
+}
+
+func getSidSubAuthorityCount(sid *SID) (count *uint8) {
+ r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ count = (*uint8)(unsafe.Pointer(r0))
+ return
+}
+
+func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+func ImpersonateSelf(impersonationlevel uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
+func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) {
+ var _p0 uint32
+ if forceAppsClosed {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if rebootAfterShutdown {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func isTokenRestricted(tokenHandle Token) (ret bool, err error) {
+ r0, _, e1 := syscall.Syscall(procIsTokenRestricted.Addr(), 1, uintptr(tokenHandle), 0, 0)
+ ret = r0 != 0
+ if !ret {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
+ r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ isValid = r0 != 0
+ return
+}
+
+func isValidSid(sid *SID) (isValid bool) {
+ r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ isValid = r0 != 0
+ return
+}
+
+func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {
+ r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0)
+ isWellKnown = r0 != 0
+ return
+}
+
+func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {
+ r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -608,546 +984,571 @@ func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERV
return
}
-func GetLastError() (lasterr error) {
- r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
- if r0 != 0 {
- lasterr = syscall.Errno(r0)
+func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
+ r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func LoadLibrary(libname string) (handle Handle, err error) {
- var _p0 *uint16
- _p0, err = syscall.UTF16PtrFromString(libname)
- if err != nil {
- return
+func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
- return _LoadLibrary(_p0)
+ return
}
-func _LoadLibrary(libname *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0)
+func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {
- var _p0 *uint16
- _p0, err = syscall.UTF16PtrFromString(libname)
- if err != nil {
- return
+func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) {
+ var _p0 uint32
+ if openAsSelf {
+ _p0 = 1
}
- return _LoadLibraryEx(_p0, zero, flags)
+ r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
}
-func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FreeLibrary(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
+func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(procname)
+func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) {
+ err = procQueryServiceDynamicInformation.Find()
if err != nil {
return
}
- return _GetProcAddress(module, _p0)
+ r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
}
-func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
- r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0)
- proc = uintptr(r0)
- if proc == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
+ r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
+func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetVersion() (ver uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
- ver = uint32(r0)
- if ver == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RegCloseKey(key Handle) (regerrno error) {
+ r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
return
}
-func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
- var _p0 *uint16
- if len(buf) > 0 {
- _p0 = &buf[0]
+func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
+ r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
- r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) {
+ var _p0 uint32
+ if watchSubtree {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if asynchronous {
+ _p1 = 1
+ }
+ r0, _, _ := syscall.Syscall6(procRegNotifyChangeKeyValue.Addr(), 5, uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1), 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
return
}
-func ExitProcess(exitcode uint32) {
- syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
+func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
+ r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
+ }
return
}
-func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
- var _p0 uint32
- if *isWow64 {
- _p0 = 1
- } else {
- _p0 = 0
+func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
+ r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
- r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0)
- *isWow64 = _p0 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
+ r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
return
}
-func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
+func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
+func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ return
+}
+
+func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
+func RevertToSelf() (err error) {
+ r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ return
+}
+
+func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
+ r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {
+func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ var _p0 *uint16
+ _p0, ret = syscall.UTF16PtrFromString(objectName)
+ if ret != nil {
+ return
+ }
+ return _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl)
+}
+
+func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) {
var _p0 uint32
- if wait {
+ if daclPresent {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0)
+ var _p1 uint32
+ if daclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
- newlowoffset = uint32(r0)
- if newlowoffset == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) {
+ var _p0 uint32
+ if groupDefaulted {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CloseHandle(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
+func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) {
+ var _p0 uint32
+ if ownerDefaulted {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
+ syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
return
}
-func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
+func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) {
+ var _p0 uint32
+ if saclPresent {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if saclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func findNextFile1(handle Handle, data *win32finddata1) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindClose(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
+func SetThreadToken(thread *Handle, token Token) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
- r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0)
+func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
+ r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetCurrentDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
+func CertCloseStore(store Handle, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func RemoveDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
+ r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
+ context = (*CertContext)(unsafe.Pointer(r0))
+ if context == nil {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
+ r1, _, e1 := syscall.Syscall(procCertDeleteCertificateFromStore.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DeleteFile(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) {
+ r0, _, _ := syscall.Syscall(procCertDuplicateCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
+ dupContext = (*CertContext)(unsafe.Pointer(r0))
+ return
+}
+
+func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
+ r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
+ context = (*CertContext)(unsafe.Pointer(r0))
+ if context == nil {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) {
+ r0, _, e1 := syscall.Syscall6(procCertFindCertificateInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))
+ cert = (*CertContext)(unsafe.Pointer(r0))
+ if cert == nil {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) {
+ r0, _, e1 := syscall.Syscall6(procCertFindChainInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))
+ certchain = (*CertChainContext)(unsafe.Pointer(r0))
+ if certchain == nil {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) {
+ r0, _, _ := syscall.Syscall(procCertFindExtension.Addr(), 3, uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))
+ ret = (*CertExtension)(unsafe.Pointer(r0))
+ return
+}
+
+func CertFreeCertificateChain(ctx *CertChainContext) {
+ syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+ return
+}
+
+func CertFreeCertificateContext(ctx *CertContext) (err error) {
+ r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func MoveFile(from *uint16, to *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
+func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
+func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) {
+ r0, _, _ := syscall.Syscall6(procCertGetNameStringW.Addr(), 6, uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size))
+ chars = uint32(r0)
+ return
+}
+
+func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
+ store = Handle(r0)
+ if store == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
+func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) {
+ var _p0 uint32
+ if *callerFreeProvOrNCryptKey {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procCryptAcquireCertificatePrivateKey.Addr(), 6, uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))
+ *callerFreeProvOrNCryptKey = _p0 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0)
+func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCryptDecodeObject.Addr(), 7, uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetComputerName(buf *uint16, n *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
+func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCryptProtectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
+func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall12(procCryptQueryObject.Addr(), 11, uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetEndOfFile(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
+func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCryptUnprotectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetSystemTimeAsFileTime(time *Filetime) {
- syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procPFXImportCertStore.Addr(), 3, uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))
+ store = Handle(r0)
+ if store == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetSystemTimePreciseAsFileTime(time *Filetime) {
- syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
+ r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
+ same = r0 != 0
return
}
-func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
- rc = uint32(r0)
- if rc == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
+ var _p0 *uint16
+ _p0, status = syscall.UTF16PtrFromString(name)
+ if status != nil {
+ return
+ }
+ return _DnsQuery(_p0, qtype, options, extra, qrs, pr)
+}
+
+func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
+ r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
+ if r0 != 0 {
+ status = syscall.Errno(r0)
}
return
}
-func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
+ syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
+ return
+}
+
+func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
+ r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
}
return
}
-func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
+ r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
}
return
}
-func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
+func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
+ r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
+func AssignProcessToJobObject(job Handle, process Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -1155,11 +1556,7 @@ func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlap
func CancelIo(s Handle) (err error) {
r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -1167,116 +1564,198 @@ func CancelIo(s Handle) (err error) {
func CancelIoEx(s Handle, o *Overlapped) (err error) {
r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
+func CloseHandle(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(overlapped)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
+ r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) {
var _p0 uint32
- if inheritHandles {
+ if initialOwner {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
+ r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) {
+func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
var _p0 uint32
- if inheritHandle {
+ if inheritHandles {
_p0 = 1
- } else {
- _p0 = 0
}
- r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
- if r1 <= 32 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {
- r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func TerminateProcess(handle Handle, exitcode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
+func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
+func DeleteFile(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetStartupInfo(startupInfo *StartupInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
+func deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) {
+ syscall.Syscall(procDeleteProcThreadAttributeList.Addr(), 1, uintptr(unsafe.Pointer(attrlist)), 0, 0)
+ return
+}
+
+func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
+func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -1285,257 +1764,213 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP
var _p0 uint32
if bInheritHandle {
_p0 = 1
- } else {
- _p0 = 0
}
r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
- r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
- event = uint32(r0)
- if event == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ExitProcess(exitcode uint32) {
+ syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
+ return
+}
+
+func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
- var _p0 uint32
- if waitAll {
- _p0 = 1
- } else {
- _p0 = 0
+func FindClose(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0)
- event = uint32(r0)
- if event == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func FindCloseChangeNotification(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindCloseChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(path)
+ if err != nil {
+ return
+ }
+ return _FindFirstChangeNotification(_p0, watchSubtree, notifyFilter)
+}
+
+func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {
+ var _p1 uint32
+ if watchSubtree {
+ _p1 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procFindFirstChangeNotificationW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func GetFileType(filehandle Handle) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
+func FindNextChangeNotification(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
+func findNextFile1(handle Handle, data *win32finddata1) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetEnvironmentStrings() (envs *uint16, err error) {
- r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
- envs = (*uint16)(unsafe.Pointer(r0))
- if envs == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FreeEnvironmentStrings(envs *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
+func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindResourceW.Addr(), 3, uintptr(module), uintptr(name), uintptr(resType))
+ resInfo = Handle(r0)
+ if resInfo == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
+func FindVolumeClose(findVolume Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) {
- var _p0 uint32
- if inheritExisting {
- _p0 = 1
- } else {
- _p0 = 0
+func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
+ return
+}
+
+func FlushFileBuffers(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DestroyEnvironmentBlock(block *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0)
+func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getTickCount64() (ms uint64) {
- r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
- ms = uint64(r0)
+func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
+ var _p0 *uint16
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
+func FreeEnvironmentStrings(envs *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileAttributes(name *uint16) (attrs uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- attrs = uint32(r0)
- if attrs == INVALID_FILE_ATTRIBUTES {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FreeLibrary(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetFileAttributes(name *uint16, attrs uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
+func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
+func GetACP() (acp uint32) {
+ r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
+ acp = uint32(r0)
+ return
+}
+
+func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -1546,671 +1981,644 @@ func GetCommandLine() (cmd *uint16) {
return
}
-func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
- r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
- argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
- if argv == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func LocalFree(hmem Handle) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
- handle = Handle(r0)
- if handle != 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetComputerName(buf *uint16, n *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
+func GetConsoleMode(console Handle, mode *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FlushFileBuffers(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
+func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
+func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
n = uint32(r0)
if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetCurrentProcessId() (pid uint32) {
+ r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
+ pid = uint32(r0)
+ return
+}
+
+func GetCurrentThreadId() (id uint32) {
+ r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0)
+ id = uint32(r0)
+ return
+}
+
+func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
+func GetDriveType(rootPathName *uint16) (driveType uint32) {
+ r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
+ driveType = uint32(r0)
+ return
+}
+
+func GetEnvironmentStrings() (envs *uint16, err error) {
+ r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
+ envs = (*uint16)(unsafe.Pointer(r0))
+ if envs == nil {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
n = uint32(r0)
if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
- r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
- addr = uintptr(r0)
- if addr == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func UnmapViewOfFile(addr uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetFileAttributes(name *uint16) (attrs uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ attrs = uint32(r0)
+ if attrs == INVALID_FILE_ATTRIBUTES {
+ err = errnoErr(e1)
}
return
}
-func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
+func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func VirtualLock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
+func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ 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 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetFileType(filehandle Handle) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
- r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0)
- value = uintptr(r0)
- if value == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procGetFinalPathNameByHandleW.Addr(), 4, uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype))
+func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetLastError() (lasterr error) {
+ r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
+ if r0 != 0 {
+ lasterr = syscall.Errno(r0)
+ }
+ return
+}
+
+func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetLogicalDrives() (drivesBitMask uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0)
+ drivesBitMask = uint32(r0)
+ if drivesBitMask == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0)
+func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
+func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
+func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {
var _p0 uint32
- if watchSubTree {
+ if wait {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
+ r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
- store = Handle(r0)
- if store == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetPriorityClass(process Handle) (ret uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetPriorityClass.Addr(), 1, uintptr(process), 0, 0)
+ ret = uint32(r0)
+ if ret == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(procname)
+ if err != nil {
+ return
+ }
+ return _GetProcAddress(module, _p0)
+}
+
+func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0)
+ proc = uintptr(r0)
+ if proc == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
- r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetProcessId(process Handle) (id uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetProcessId.Addr(), 1, uintptr(process), 0, 0)
+ id = uint32(r0)
+ if id == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
- r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
+func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertCloseStore(store Handle, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
+func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
- r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
+func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertFreeCertificateChain(ctx *CertChainContext) {
- syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) {
+ syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0)
return
}
-func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
- r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertFreeCertificateContext(ctx *CertContext) (err error) {
- r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
- r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
+func GetStartupInfo(startupInfo *StartupInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func RegCloseKey(key Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ err = errnoErr(e1)
}
return
}
-func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
- }
+func GetSystemTimeAsFileTime(time *Filetime) {
+ syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
return
}
-func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func GetSystemTimePreciseAsFileTime(time *Filetime) {
+ syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+ return
+}
+
+func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetCurrentProcessId() (pid uint32) {
- r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
- pid = uint32(r0)
+func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetConsoleMode(console Handle, mode *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
+func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetConsoleMode(console Handle, mode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getTickCount64() (ms uint64) {
+ r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
+ ms = uint64(r0)
+ return
+}
+
+func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
+ rc = uint32(r0)
+ if rc == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
+func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
- r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetVersion() (ver uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
+ ver = uint32(r0)
+ if ver == 0 {
+ err = errnoErr(e1)
}
return
}
-func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
- r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
+func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ err = errnoErr(e1)
}
return
}
-func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0)
+func initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procInitializeProcThreadAttributeList.Addr(), 4, uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
+ var _p0 uint32
+ if *isWow64 {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0)
+ *isWow64 = _p0 != 0
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) {
+ err = procIsWow64Process2.Find()
+ if err != nil {
+ return
+ }
+ r1, _, e1 := syscall.Syscall(procIsWow64Process2.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetCurrentThreadId() (id uint32) {
- r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0)
- id = uint32(r0)
- return
+func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(libname)
+ if err != nil {
+ return
+ }
+ return _LoadLibraryEx(_p0, zero, flags)
}
-func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0)
+func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+func LoadLibrary(libname string) (handle Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(libname)
+ if err != nil {
+ return
+ }
+ return _LoadLibrary(_p0)
+}
+
+func _LoadLibrary(libname *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0)
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
- var _p0 uint32
- if inheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
+func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
+ resData = Handle(r0)
+ if resData == 0 {
+ err = errnoErr(e1)
}
- r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ return
+}
+
+func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(length), 0)
+ ptr = uintptr(r0)
+ if ptr == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func LocalFree(hmem Handle) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ if handle != 0 {
+ err = errnoErr(e1)
}
return
}
-func SetEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0)
+func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ResetEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
+func LockResource(resData Handle) (addr uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procLockResource.Addr(), 1, uintptr(resData), 0, 0)
+ addr = uintptr(r0)
+ if addr == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
+ r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
+ addr = uintptr(r0)
+ if addr == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func PulseEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0)
+func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) {
- var _p0 uint32
- if initialOwner {
- _p0 = 1
- } else {
- _p0 = 0
+func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func MoveFile(from *uint16, to *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
+ r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
+ nwrite = int32(r0)
+ if nwrite == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -2219,485 +2627,348 @@ func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H
var _p0 uint32
if inheritHandle {
_p0 = 1
- } else {
- _p0 = 0
}
r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ReleaseMutex(mutex Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
+func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) {
var _p0 uint32
- if alertable {
+ if inheritHandle {
_p0 = 1
- } else {
- _p0 = 0
}
- r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0)
- ret = uint32(r0)
- return
-}
-
-func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0)
+ r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func AssignProcessToJobObject(job Handle, process Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0)
+func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func TerminateJobObject(job Handle, exitCode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0)
+func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetErrorMode(mode uint32) (ret uint32) {
- r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0)
- ret = uint32(r0)
+func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func ResumeThread(thread Handle) (ret uint32, err error) {
- r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0)
- ret = uint32(r0)
- if ret == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procProcessIdToSessionId.Addr(), 2, uintptr(pid), uintptr(unsafe.Pointer(sessionid)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetPriorityClass(process Handle, priorityClass uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0)
+func PulseEvent(event Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetPriorityClass(process Handle) (ret uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetPriorityClass.Addr(), 1, uintptr(process), 0, 0)
- ret = uint32(r0)
- if ret == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {
- r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0)
- ret = int(r0)
- if ret == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryFullProcessImageNameW.Addr(), 4, uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0)
+func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetProcessId(process Handle) (id uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetProcessId.Addr(), 1, uintptr(process), 0, 0)
- id = uint32(r0)
- if id == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
+ r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) {
+func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
var _p0 uint32
- if inheritHandle {
+ if watchSubTree {
_p0 = 1
- } else {
- _p0 = 0
}
- r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
- var _p0 uint32
- if disable {
- _p0 = 1
- } else {
- _p0 = 0
+func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
}
- r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0)
+ r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
+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 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0)
+func ReleaseMutex(mutex Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RemoveDirectory(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ResetEvent(event Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ResumeThread(thread Handle) (ret uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0)
+ ret = uint32(r0)
+ if ret == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindVolumeClose(findVolume Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0)
+func setConsoleCursorPosition(console Handle, position uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0)
+func SetConsoleMode(console Handle, mode uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
+func SetCurrentDirectory(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetDriveType(rootPathName *uint16) (driveType uint32) {
- r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
- driveType = uint32(r0)
+func SetDefaultDllDirectories(directoryFlags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetDefaultDllDirectories.Addr(), 1, uintptr(directoryFlags), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetLogicalDrives() (drivesBitMask uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0)
- drivesBitMask = uint32(r0)
- if drivesBitMask == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetDllDirectory(path string) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(path)
+ if err != nil {
+ return
+ }
+ return _SetDllDirectory(_p0)
+}
+
+func _SetDllDirectory(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetDllDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetEndOfFile(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
+func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
+func SetErrorMode(mode uint32) (ret uint32) {
+ r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0)
+ ret = uint32(r0)
+ return
+}
+
+func SetEvent(event Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
+func SetFileAttributes(name *uint16, attrs uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
+func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0)
+func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
+ newlowoffset = uint32(r0)
+ if newlowoffset == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0)
+func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0)
+func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
- r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
- ret = int32(r0)
+func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0)
+ ret = int(r0)
if ret == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ExitWindowsEx(flags uint32, reason uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
+func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetNamedPipeHandleState.Addr(), 4, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) {
+func SetPriorityClass(process Handle, priorityClass uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
var _p0 uint32
- if forceAppsClosed {
+ if disable {
_p0 = 1
- } else {
- _p0 = 0
- }
- var _p1 uint32
- if rebootAfterShutdown {
- _p1 = 1
- } else {
- _p1 = 0
}
- r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
+ r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -2705,313 +2976,235 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint
func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0)
+func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
- r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
- r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
- chars = int32(r0)
+func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func coCreateGuid(pguid *GUID) (ret error) {
- r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CoTaskMemFree(address unsafe.Pointer) {
- syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0)
+func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
+ size = uint32(r0)
+ if size == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func rtlGetVersion(info *OsVersionInfoEx) (ret error) {
- r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
+ var _p0 uint32
+ if alertable {
+ _p0 = 1
}
+ r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0)
+ ret = uint32(r0)
return
}
-func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
- syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
+func TerminateJobObject(job Handle, exitCode uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func TerminateProcess(handle Handle, exitcode uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
- var _p0 *uint32
- if len(processIds) > 0 {
- _p0 = &processIds[0]
- }
- r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
+func UnmapViewOfFile(addr uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
- r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
- if r0 != 0 {
- sockerr = syscall.Errno(r0)
+func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall9(procUpdateProcThreadAttribute.Addr(), 7, uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSACleanup() (err error) {
- r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
+ r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0)
+ value = uintptr(r0)
+ if value == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func VirtualLock(addr uintptr, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int32(r0)
- if n == -1 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+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 Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+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 Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+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 bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func VirtualUnlock(addr uintptr, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func WTSGetActiveConsoleSessionId() (sessionID uint32) {
+ r0, _, _ := syscall.Syscall(procWTSGetActiveConsoleSessionId.Addr(), 0, 0, 0, 0)
+ sessionID = uint32(r0)
return
}
-func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
+ var _p0 uint32
+ if waitAll {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0)
+ event = uint32(r0)
+ if event == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
+ event = uint32(r0)
+ if event == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func listen(s Handle, backlog int32) (err error) {
- r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
+ r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func shutdown(s Handle, how int32) (err error) {
- r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Closesocket(s Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+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
}
@@ -3019,11 +3212,7 @@ func Closesocket(s Handle) (err error) {
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 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -3033,1019 +3222,961 @@ func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen
return
}
-func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NetApiBufferFree(buf *byte) (neterr error) {
+ r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
}
return
}
-func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
+ r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
}
return
}
-func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
+ r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
}
return
}
-func GetHostByName(name string) (h *Hostent, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(name)
- if err != nil {
- return
+func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
- return _GetHostByName(_p0)
+ return
}
-func _GetHostByName(name *byte) (h *Hostent, err error) {
- r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- h = (*Hostent)(unsafe.Pointer(r0))
- if h == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) {
+ r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func GetServByName(name string, proto string) (s *Servent, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(name)
- if err != nil {
- return
+func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtQueryInformationProcess.Addr(), 5, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
- var _p1 *byte
- _p1, err = syscall.BytePtrFromString(proto)
- if err != nil {
- return
+ return
+}
+
+func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
- return _GetServByName(_p0, _p1)
+ return
}
-func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
- r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0)
- s = (*Servent)(unsafe.Pointer(r0))
- if s == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func Ntohs(netshort uint16) (u uint16) {
- r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
- u = uint16(r0)
+func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
return
}
-func GetProtoByName(name string) (p *Protoent, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(name)
- if err != nil {
- return
+func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
- return _GetProtoByName(_p0)
+ return
}
-func _GetProtoByName(name *byte) (p *Protoent, err error) {
- r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- p = (*Protoent)(unsafe.Pointer(r0))
- if p == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {
+ r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
+ ret = r0 != 0
+ return
+}
+
+func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
+ r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- var _p0 *uint16
- _p0, status = syscall.UTF16PtrFromString(name)
- if status != nil {
- return
+func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {
+ r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0)
+ ret = r0 != 0
+ return
+}
+
+func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
- return _DnsQuery(_p0, qtype, options, extra, qrs, pr)
+ return
}
-func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
+func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
if r0 != 0 {
- status = syscall.Errno(r0)
+ ntstatus = NTStatus(r0)
}
return
}
-func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
- syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
+func RtlGetCurrentPeb() (peb *PEB) {
+ r0, _, _ := syscall.Syscall(procRtlGetCurrentPeb.Addr(), 0, 0, 0, 0)
+ peb = (*PEB)(unsafe.Pointer(r0))
return
}
-func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
- r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
- same = r0 != 0
+func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
+ syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
return
}
-func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
- r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
+func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {
+ r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0)
if r0 != 0 {
- sockerr = syscall.Errno(r0)
+ ntstatus = NTStatus(r0)
}
return
}
-func FreeAddrInfoW(addrinfo *AddrinfoW) {
- syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
+func RtlInitString(destinationString *NTString, sourceString *byte) {
+ syscall.Syscall(procRtlInitString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0)
return
}
-func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
+func RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) {
+ syscall.Syscall(procRtlInitUnicodeString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0)
+ return
+}
+
+func rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) {
+ r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(ntstatus), 0, 0)
+ ret = syscall.Errno(r0)
+ return
+}
+
+func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
+ r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0)
if r0 != 0 {
- errcode = syscall.Errno(r0)
+ ret = syscall.Errno(r0)
}
return
}
-func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
+func coCreateGuid(pguid *GUID) (ret error) {
+ r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0)
if r0 != 0 {
- errcode = syscall.Errno(r0)
+ ret = syscall.Errno(r0)
}
return
}
-func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) {
+ r0, _, _ := syscall.Syscall6(procCoGetObject.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
- r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
- n = int32(r0)
- if n == -1 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {
+ r0, _, _ := syscall.Syscall(procCoInitializeEx.Addr(), 2, uintptr(reserved), uintptr(coInit), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
- if r0 != 0 {
- errcode = syscall.Errno(r0)
+func CoTaskMemFree(address unsafe.Pointer) {
+ syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0)
+ return
+}
+
+func CoUninitialize() {
+ syscall.Syscall(procCoUninitialize.Addr(), 0, 0, 0, 0)
+ return
+}
+
+func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
+ r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
+ chars = int32(r0)
+ 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 GetACP() (acp uint32) {
- r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
- acp = uint32(r0)
+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 MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
- r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
- nwrite = int32(r0)
- if nwrite == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
+ var _p0 *uint32
+ if len(processIds) > 0 {
+ _p0 = &processIds[0]
+ }
+ r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+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 GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+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 NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
- r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = syscall.Errno(r0)
+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 NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
- r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
+func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
+ ret = procSubscribeServiceChangeNotifications.Find()
+ if ret != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall6(procSubscribeServiceChangeNotifications.Addr(), 5, uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)), 0)
if r0 != 0 {
- neterr = syscall.Errno(r0)
+ ret = syscall.Errno(r0)
}
return
}
-func NetApiBufferFree(buf *byte) (neterr error) {
- r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = syscall.Errno(r0)
+func UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) {
+ err = procUnsubscribeServiceChangeNotifications.Find()
+ if err != nil {
+ return
}
+ syscall.Syscall(procUnsubscribeServiceChangeNotifications.Addr(), 1, uintptr(subscription), 0, 0)
return
}
-func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
+func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiBuildDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
- r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
+func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiCallClassInstaller.Addr(), 3, uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetLengthSid(sid *SID) (len uint32) {
- r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- len = uint32(r0)
+func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiCancelDriverInfoSearch.Addr(), 1, uintptr(deviceInfoSet), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
- r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
+func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiClassGuidsFromNameExW.Addr(), 6, uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
- r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0)
+func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiClassNameFromGuidExW.Addr(), 6, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetupDiCreateDeviceInfoListExW.Addr(), 4, uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0)
+ handle = DevInfo(r0)
+ if handle == DevInfo(InvalidHandle) {
+ err = errnoErr(e1)
}
return
}
-func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {
- r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0)
- isWellKnown = r0 != 0
+func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetupDiCreateDeviceInfoW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func FreeSid(sid *SID) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- if r1 != 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiDestroyDeviceInfoList.Addr(), 1, uintptr(deviceInfoSet), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
- r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0)
- isEqual = r0 != 0
+func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiDestroyDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {
- r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))
+func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiEnumDeviceInfo.Addr(), 3, uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getSidSubAuthorityCount(sid *SID) (count *uint8) {
- r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- count = (*uint8)(unsafe.Pointer(r0))
+func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiEnumDriverInfoW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {
- r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0)
- subAuthority = (*uint32)(unsafe.Pointer(r0))
+func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
+ r0, _, e1 := syscall.Syscall9(procSetupDiGetClassDevsExW.Addr(), 7, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0)
+ handle = DevInfo(r0)
+ if handle == DevInfo(InvalidHandle) {
+ err = errnoErr(e1)
+ }
return
}
-func isValidSid(sid *SID) (isValid bool) {
- r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- isValid = r0 != 0
+func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiGetClassInstallParamsW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
+func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInfoListDetailW.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
- r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
+func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) {
- var _p0 uint32
- if openAsSelf {
- _p0 = 1
- } else {
- _p0 = 0
+func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiGetDeviceInstanceIdW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
+ return
+}
+
+func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetupDiGetDevicePropertyW.Addr(), 8, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ImpersonateSelf(impersonationlevel uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0)
+func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetupDiGetDeviceRegistryPropertyW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func RevertToSelf() (err error) {
- r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
+func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiGetDriverInfoDetailW.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetThreadToken(thread *Handle, token Token) (err error) {
- r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0)
+func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {
- r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
+func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) {
- var _p0 uint32
- if disableAllPrivileges {
- _p0 = 1
- } else {
- _p0 = 0
+func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetupDiOpenDevRegKey.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired))
+ key = Handle(r0)
+ if key == InvalidHandle {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
+ return
+}
+
+func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiSetClassInstallParamsW.Addr(), 4, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) {
- var _p0 uint32
- if resetToDefault {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
+func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiSetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
+func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiSetDeviceRegistryPropertyW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0)
+func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {
- r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
+func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
+func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupUninstallOEMInfW.Addr(), 3, uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
- len = uint32(r0)
- if len == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
+ r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
+ argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
+ if argv == nil {
+ err = errnoErr(e1)
}
return
}
-func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
- len = uint32(r0)
- if len == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {
+ r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
- len = uint32(r0)
- if len == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
+ if r1 <= 32 {
+ err = errnoErr(e1)
}
return
}
-func WTSQueryUserToken(session uint32, token *Token) (err error) {
- r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0)
+func ExitWindowsEx(flags uint32, reason uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0)
+func GetShellWindow() (shellWindow HWND) {
+ r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
+ shellWindow = HWND(r0)
+ return
+}
+
+func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0)
+ tid = uint32(r0)
+ if tid == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
+ r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
+ ret = int32(r0)
+ if ret == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) {
+ var _p0 uint32
+ if inheritExisting {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WTSFreeMemory(ptr uintptr) {
- syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0)
+func DestroyEnvironmentBlock(block *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) {
- syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(filename)
+ if err != nil {
+ return
+ }
+ return _GetFileVersionInfoSize(_p0, zeroHandle)
+}
+
+func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0)
+ bufSize = uint32(r0)
+ if bufSize == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
var _p0 *uint16
- _p0, ret = syscall.UTF16PtrFromString(objectName)
- if ret != nil {
+ _p0, err = syscall.UTF16PtrFromString(filename)
+ if err != nil {
return
}
- return _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd)
+ return _GetFileVersionInfo(_p0, handle, bufSize, buffer)
}
-func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
var _p0 *uint16
- _p0, ret = syscall.UTF16PtrFromString(objectName)
- if ret != nil {
+ _p0, err = syscall.UTF16PtrFromString(subBlock)
+ if err != nil {
return
}
- return _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl)
+ return _VerQueryValue(block, _p0, pointerToBufferPointer, bufSize)
}
-func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
- r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
+ r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
return
}
-func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
+func FreeAddrInfoW(addrinfo *AddrinfoW) {
+ syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
+ return
+}
+
+func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
+ r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
if r0 != 0 {
- ret = syscall.Errno(r0)
+ sockerr = syscall.Errno(r0)
}
return
}
-func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WSACleanup() (err error) {
+ r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
+ r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
+ n = int32(r0)
+ if n == -1 {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) {
+func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {
var _p0 uint32
- if *daclPresent {
+ if wait {
_p0 = 1
- } else {
- _p0 = 0
- }
- var _p1 uint32
- if *daclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
}
- r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
- *daclPresent = _p0 != 0
- *daclDefaulted = _p1 != 0
+ r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) {
- var _p0 uint32
- if *saclPresent {
- _p0 = 1
- } else {
- _p0 = 0
- }
- var _p1 uint32
- if *saclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
- }
- r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
- *saclPresent = _p0 != 0
- *saclDefaulted = _p1 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) {
- var _p0 uint32
- if *ownerDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
- *ownerDefaulted = _p0 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) {
- var _p0 uint32
- if *groupDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
- *groupDefaulted = _p0 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
- r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
- len = uint32(r0)
+func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procWSASocketW.Addr(), 6, uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
return
}
-func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
- r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
+ r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
if r0 != 0 {
- ret = syscall.Errno(r0)
+ sockerr = syscall.Errno(r0)
}
return
}
-func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
- r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
- isValid = r0 != 0
+func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ if r1 == socket_error {
+ err = errnoErr(e1)
+ }
return
}
-func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func Closesocket(s Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) {
- var _p0 uint32
- if daclPresent {
- _p0 = 1
- } else {
- _p0 = 0
+func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- var _p1 uint32
- if daclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
+ return
+}
+
+func GetHostByName(name string) (h *Hostent, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(name)
+ if err != nil {
+ return
}
- r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return _GetHostByName(_p0)
+}
+
+func _GetHostByName(name *byte) (h *Hostent, err error) {
+ r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ h = (*Hostent)(unsafe.Pointer(r0))
+ if h == nil {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) {
- var _p0 uint32
- if saclPresent {
- _p0 = 1
- } else {
- _p0 = 0
+func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- var _p1 uint32
- if saclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
+ return
+}
+
+func GetProtoByName(name string) (p *Protoent, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(name)
+ if err != nil {
+ return
}
- r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return _GetProtoByName(_p0)
+}
+
+func _GetProtoByName(name *byte) (p *Protoent, err error) {
+ r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ p = (*Protoent)(unsafe.Pointer(r0))
+ if p == nil {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) {
- var _p0 uint32
- if ownerDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func GetServByName(name string, proto string) (s *Servent, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(name)
+ if err != nil {
+ return
}
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ var _p1 *byte
+ _p1, err = syscall.BytePtrFromString(proto)
+ if err != nil {
+ return
+ }
+ return _GetServByName(_p0, _p1)
+}
+
+func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
+ r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0)
+ s = (*Servent)(unsafe.Pointer(r0))
+ if s == nil {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) {
- var _p0 uint32
- if groupDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
- syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+func listen(s Handle, backlog int32) (err error) {
+ r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
+ }
return
}
-func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
- var _p0 *uint16
- _p0, err = syscall.UTF16PtrFromString(str)
- if err != nil {
- return
+func Ntohs(netshort uint16) (u uint16) {
+ r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
+ u = uint16(r0)
+ return
+}
+
+func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
}
- return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
+ r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int32(r0)
+ if n == -1 {
+ err = errnoErr(e1)
+ }
+ return
}
-func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func shutdown(s Handle, how int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
+func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
- r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func WTSFreeMemory(ptr uintptr) {
+ syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0)
+ return
+}
+
+func WTSQueryUserToken(session uint32, token *Token) (err error) {
+ r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
diff --git a/vendor/golang.org/x/text/encoding/encoding.go b/vendor/golang.org/x/text/encoding/encoding.go
index 221f175..a0bd7cd 100644
--- a/vendor/golang.org/x/text/encoding/encoding.go
+++ b/vendor/golang.org/x/text/encoding/encoding.go
@@ -124,7 +124,7 @@ func (e *Encoder) Writer(w io.Writer) io.Writer {
}
// ASCIISub is the ASCII substitute character, as recommended by
-// http://unicode.org/reports/tr36/#Text_Comparison
+// https://unicode.org/reports/tr36/#Text_Comparison
const ASCIISub = '\x1a'
// Nop is the nop encoding. Its transformed bytes are the same as the source
diff --git a/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go b/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go
index 7351b4e..5c9b85c 100644
--- a/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go
+++ b/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go
@@ -34,7 +34,7 @@ package identifier
// - http://www.iana.org/assignments/character-sets/character-sets.xhtml
// - http://www.iana.org/assignments/ianacharset-mib/ianacharset-mib
// - http://www.ietf.org/rfc/rfc2978.txt
-// - http://www.unicode.org/reports/tr22/
+// - https://www.unicode.org/reports/tr22/
// - http://www.w3.org/TR/encoding/
// - https://encoding.spec.whatwg.org/
// - https://encoding.spec.whatwg.org/encodings.json
diff --git a/vendor/golang.org/x/text/encoding/internal/identifier/mib.go b/vendor/golang.org/x/text/encoding/internal/identifier/mib.go
index 768842b..fc7df1b 100644
--- a/vendor/golang.org/x/text/encoding/internal/identifier/mib.go
+++ b/vendor/golang.org/x/text/encoding/internal/identifier/mib.go
@@ -538,8 +538,6 @@ const (
// ISO111ECMACyrillic is the MIB identifier with IANA name ECMA-cyrillic.
//
// ISO registry
- // (formerly ECMA
- // registry )
ISO111ECMACyrillic MIB = 77
// ISO121Canadian1 is the MIB identifier with IANA name CSA_Z243.4-1985-1.
@@ -732,18 +730,18 @@ const (
// ISO885913 is the MIB identifier with IANA name ISO-8859-13.
//
- // ISO See http://www.iana.org/assignments/charset-reg/ISO-8859-13 http://www.iana.org/assignments/charset-reg/ISO-8859-13
+ // ISO See https://www.iana.org/assignments/charset-reg/ISO-8859-13 https://www.iana.org/assignments/charset-reg/ISO-8859-13
ISO885913 MIB = 109
// ISO885914 is the MIB identifier with IANA name ISO-8859-14.
//
- // ISO See http://www.iana.org/assignments/charset-reg/ISO-8859-14
+ // ISO See https://www.iana.org/assignments/charset-reg/ISO-8859-14
ISO885914 MIB = 110
// ISO885915 is the MIB identifier with IANA name ISO-8859-15.
//
// ISO
- // Please see: http://www.iana.org/assignments/charset-reg/ISO-8859-15
+ // Please see: https://www.iana.org/assignments/charset-reg/ISO-8859-15
ISO885915 MIB = 111
// ISO885916 is the MIB identifier with IANA name ISO-8859-16.
@@ -754,41 +752,41 @@ const (
// GBK is the MIB identifier with IANA name GBK.
//
// Chinese IT Standardization Technical Committee
- // Please see: http://www.iana.org/assignments/charset-reg/GBK
+ // Please see: https://www.iana.org/assignments/charset-reg/GBK
GBK MIB = 113
// GB18030 is the MIB identifier with IANA name GB18030.
//
// Chinese IT Standardization Technical Committee
- // Please see: http://www.iana.org/assignments/charset-reg/GB18030
+ // Please see: https://www.iana.org/assignments/charset-reg/GB18030
GB18030 MIB = 114
// OSDEBCDICDF0415 is the MIB identifier with IANA name OSD_EBCDIC_DF04_15.
//
// Fujitsu-Siemens standard mainframe EBCDIC encoding
- // Please see: http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15
+ // Please see: https://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15
OSDEBCDICDF0415 MIB = 115
// OSDEBCDICDF03IRV is the MIB identifier with IANA name OSD_EBCDIC_DF03_IRV.
//
// Fujitsu-Siemens standard mainframe EBCDIC encoding
- // Please see: http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF03-IRV
+ // Please see: https://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF03-IRV
OSDEBCDICDF03IRV MIB = 116
// OSDEBCDICDF041 is the MIB identifier with IANA name OSD_EBCDIC_DF04_1.
//
// Fujitsu-Siemens standard mainframe EBCDIC encoding
- // Please see: http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-1
+ // Please see: https://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-1
OSDEBCDICDF041 MIB = 117
// ISO115481 is the MIB identifier with IANA name ISO-11548-1.
//
- // See http://www.iana.org/assignments/charset-reg/ISO-11548-1
+ // See https://www.iana.org/assignments/charset-reg/ISO-11548-1
ISO115481 MIB = 118
// KZ1048 is the MIB identifier with IANA name KZ-1048.
//
- // See http://www.iana.org/assignments/charset-reg/KZ-1048
+ // See https://www.iana.org/assignments/charset-reg/KZ-1048
KZ1048 MIB = 119
// Unicode is the MIB identifier with IANA name ISO-10646-UCS-2.
@@ -855,7 +853,7 @@ const (
// SCSU is the MIB identifier with IANA name SCSU.
//
- // SCSU See http://www.iana.org/assignments/charset-reg/SCSU
+ // SCSU See https://www.iana.org/assignments/charset-reg/SCSU
SCSU MIB = 1011
// UTF7 is the MIB identifier with IANA name UTF-7.
@@ -884,27 +882,27 @@ const (
// CESU8 is the MIB identifier with IANA name CESU-8.
//
- // http://www.unicode.org/unicode/reports/tr26
+ // https://www.unicode.org/reports/tr26
CESU8 MIB = 1016
// UTF32 is the MIB identifier with IANA name UTF-32.
//
- // http://www.unicode.org/unicode/reports/tr19/
+ // https://www.unicode.org/reports/tr19/
UTF32 MIB = 1017
// UTF32BE is the MIB identifier with IANA name UTF-32BE.
//
- // http://www.unicode.org/unicode/reports/tr19/
+ // https://www.unicode.org/reports/tr19/
UTF32BE MIB = 1018
// UTF32LE is the MIB identifier with IANA name UTF-32LE.
//
- // http://www.unicode.org/unicode/reports/tr19/
+ // https://www.unicode.org/reports/tr19/
UTF32LE MIB = 1019
// BOCU1 is the MIB identifier with IANA name BOCU-1.
//
- // http://www.unicode.org/notes/tn6/
+ // https://www.unicode.org/notes/tn6/
BOCU1 MIB = 1020
// Windows30Latin1 is the MIB identifier with IANA name ISO-8859-1-Windows-3.0-Latin-1.
@@ -1461,152 +1459,152 @@ const (
// IBM00858 is the MIB identifier with IANA name IBM00858.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM00858
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM00858
IBM00858 MIB = 2089
// IBM00924 is the MIB identifier with IANA name IBM00924.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM00924
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM00924
IBM00924 MIB = 2090
// IBM01140 is the MIB identifier with IANA name IBM01140.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01140
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01140
IBM01140 MIB = 2091
// IBM01141 is the MIB identifier with IANA name IBM01141.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01141
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01141
IBM01141 MIB = 2092
// IBM01142 is the MIB identifier with IANA name IBM01142.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01142
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01142
IBM01142 MIB = 2093
// IBM01143 is the MIB identifier with IANA name IBM01143.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01143
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01143
IBM01143 MIB = 2094
// IBM01144 is the MIB identifier with IANA name IBM01144.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01144
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01144
IBM01144 MIB = 2095
// IBM01145 is the MIB identifier with IANA name IBM01145.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01145
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01145
IBM01145 MIB = 2096
// IBM01146 is the MIB identifier with IANA name IBM01146.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01146
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01146
IBM01146 MIB = 2097
// IBM01147 is the MIB identifier with IANA name IBM01147.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01147
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01147
IBM01147 MIB = 2098
// IBM01148 is the MIB identifier with IANA name IBM01148.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01148
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01148
IBM01148 MIB = 2099
// IBM01149 is the MIB identifier with IANA name IBM01149.
//
- // IBM See http://www.iana.org/assignments/charset-reg/IBM01149
+ // IBM See https://www.iana.org/assignments/charset-reg/IBM01149
IBM01149 MIB = 2100
// Big5HKSCS is the MIB identifier with IANA name Big5-HKSCS.
//
- // See http://www.iana.org/assignments/charset-reg/Big5-HKSCS
+ // See https://www.iana.org/assignments/charset-reg/Big5-HKSCS
Big5HKSCS MIB = 2101
// IBM1047 is the MIB identifier with IANA name IBM1047.
//
- // IBM1047 (EBCDIC Latin 1/Open Systems) http://www-1.ibm.com/servers/eserver/iseries/software/globalization/pdf/cp01047z.pdf
+ // IBM1047 (EBCDIC Latin 1/Open Systems) https://www-1.ibm.com/servers/eserver/iseries/software/globalization/pdf/cp01047z.pdf
IBM1047 MIB = 2102
// PTCP154 is the MIB identifier with IANA name PTCP154.
//
- // See http://www.iana.org/assignments/charset-reg/PTCP154
+ // See https://www.iana.org/assignments/charset-reg/PTCP154
PTCP154 MIB = 2103
// Amiga1251 is the MIB identifier with IANA name Amiga-1251.
//
- // See http://www.amiga.ultranet.ru/Amiga-1251.html
+ // See https://www.amiga.ultranet.ru/Amiga-1251.html
Amiga1251 MIB = 2104
// KOI7switched is the MIB identifier with IANA name KOI7-switched.
//
- // See http://www.iana.org/assignments/charset-reg/KOI7-switched
+ // See https://www.iana.org/assignments/charset-reg/KOI7-switched
KOI7switched MIB = 2105
// BRF is the MIB identifier with IANA name BRF.
//
- // See http://www.iana.org/assignments/charset-reg/BRF
+ // See https://www.iana.org/assignments/charset-reg/BRF
BRF MIB = 2106
// TSCII is the MIB identifier with IANA name TSCII.
//
- // See http://www.iana.org/assignments/charset-reg/TSCII
+ // See https://www.iana.org/assignments/charset-reg/TSCII
TSCII MIB = 2107
// CP51932 is the MIB identifier with IANA name CP51932.
//
- // See http://www.iana.org/assignments/charset-reg/CP51932
+ // See https://www.iana.org/assignments/charset-reg/CP51932
CP51932 MIB = 2108
// Windows874 is the MIB identifier with IANA name windows-874.
//
- // See http://www.iana.org/assignments/charset-reg/windows-874
+ // See https://www.iana.org/assignments/charset-reg/windows-874
Windows874 MIB = 2109
// Windows1250 is the MIB identifier with IANA name windows-1250.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1250
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1250
Windows1250 MIB = 2250
// Windows1251 is the MIB identifier with IANA name windows-1251.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1251
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1251
Windows1251 MIB = 2251
// Windows1252 is the MIB identifier with IANA name windows-1252.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1252
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1252
Windows1252 MIB = 2252
// Windows1253 is the MIB identifier with IANA name windows-1253.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1253
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1253
Windows1253 MIB = 2253
// Windows1254 is the MIB identifier with IANA name windows-1254.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1254
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1254
Windows1254 MIB = 2254
// Windows1255 is the MIB identifier with IANA name windows-1255.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1255
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1255
Windows1255 MIB = 2255
// Windows1256 is the MIB identifier with IANA name windows-1256.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1256
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1256
Windows1256 MIB = 2256
// Windows1257 is the MIB identifier with IANA name windows-1257.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1257
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1257
Windows1257 MIB = 2257
// Windows1258 is the MIB identifier with IANA name windows-1258.
//
- // Microsoft http://www.iana.org/assignments/charset-reg/windows-1258
+ // Microsoft https://www.iana.org/assignments/charset-reg/windows-1258
Windows1258 MIB = 2258
// TIS620 is the MIB identifier with IANA name TIS-620.
@@ -1616,6 +1614,6 @@ const (
// CP50220 is the MIB identifier with IANA name CP50220.
//
- // See http://www.iana.org/assignments/charset-reg/CP50220
+ // See https://www.iana.org/assignments/charset-reg/CP50220
CP50220 MIB = 2260
)
diff --git a/vendor/golang.org/x/text/transform/transform.go b/vendor/golang.org/x/text/transform/transform.go
index fe47b9b..48ec64b 100644
--- a/vendor/golang.org/x/text/transform/transform.go
+++ b/vendor/golang.org/x/text/transform/transform.go
@@ -78,8 +78,8 @@ type SpanningTransformer interface {
// considering the error err.
//
// A nil error means that all input bytes are known to be identical to the
- // output produced by the Transformer. A nil error can be be returned
- // regardless of whether atEOF is true. If err is nil, then then n must
+ // output produced by the Transformer. A nil error can be returned
+ // regardless of whether atEOF is true. If err is nil, then n must
// equal len(src); the converse is not necessarily true.
//
// ErrEndOfSpan means that the Transformer output may differ from the
@@ -493,7 +493,7 @@ func (c *chain) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err erro
return dstL.n, srcL.p, err
}
-// Deprecated: use runes.Remove instead.
+// Deprecated: Use runes.Remove instead.
func RemoveFunc(f func(r rune) bool) Transformer {
return removeF(f)
}
@@ -648,7 +648,8 @@ func String(t Transformer, s string) (result string, n int, err error) {
// Transform the remaining input, growing dst and src buffers as necessary.
for {
n := copy(src, s[pSrc:])
- nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], pSrc+n == len(s))
+ atEOF := pSrc+n == len(s)
+ nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], atEOF)
pDst += nDst
pSrc += nSrc
@@ -659,6 +660,9 @@ func String(t Transformer, s string) (result string, n int, err error) {
dst = grow(dst, pDst)
}
} else if err == ErrShortSrc {
+ if atEOF {
+ return string(dst[:pDst]), pSrc, err
+ }
if nSrc == 0 {
src = grow(src, 0)
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 3842d4d..ab0455b 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,45 +1,58 @@
-# dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9
+# dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037
dmitri.shuralyov.com/gpu/mtl
-# gioui.org v0.0.0-20200630184602-223f8fd40ae4
+# gioui.org v0.0.0-20220105104929-8d8aeef66bef
## explicit
gioui.org/app
-gioui.org/app/internal/cocoainit
-gioui.org/app/internal/d3d11
-gioui.org/app/internal/egl
-gioui.org/app/internal/glimpl
gioui.org/app/internal/log
-gioui.org/app/internal/srgb
-gioui.org/app/internal/window
gioui.org/app/internal/windows
gioui.org/app/internal/xkb
gioui.org/f32
gioui.org/font/opentype
gioui.org/gesture
gioui.org/gpu
-gioui.org/gpu/backend
-gioui.org/gpu/gl
+gioui.org/gpu/internal/d3d11
+gioui.org/gpu/internal/driver
+gioui.org/gpu/internal/metal
+gioui.org/gpu/internal/opengl
+gioui.org/gpu/internal/vulkan
+gioui.org/internal/byteslice
+gioui.org/internal/cocoainit
+gioui.org/internal/d3d11
+gioui.org/internal/egl
gioui.org/internal/f32color
gioui.org/internal/fling
-gioui.org/internal/opconst
+gioui.org/internal/gl
gioui.org/internal/ops
-gioui.org/internal/unsafe
+gioui.org/internal/scene
+gioui.org/internal/stroke
+gioui.org/internal/vk
+gioui.org/io/clipboard
gioui.org/io/event
gioui.org/io/key
gioui.org/io/pointer
gioui.org/io/profile
gioui.org/io/router
+gioui.org/io/semantic
gioui.org/io/system
+gioui.org/io/transfer
gioui.org/layout
gioui.org/op
gioui.org/op/clip
gioui.org/op/paint
gioui.org/text
gioui.org/unit
+# gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2
+gioui.org/cpu
+# gioui.org/shader v1.0.6
+gioui.org/shader
+gioui.org/shader/gio
+gioui.org/shader/piet
# github.com/BurntSushi/toml v0.4.1
## explicit
github.com/BurntSushi/toml
github.com/BurntSushi/toml/internal
-# github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
+# github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc
+## explicit
github.com/BurntSushi/xgb
github.com/BurntSushi/xgb/render
github.com/BurntSushi/xgb/shape
@@ -53,7 +66,7 @@ github.com/BurntSushi/xgbutil/ewmh
github.com/BurntSushi/xgbutil/icccm
github.com/BurntSushi/xgbutil/xevent
github.com/BurntSushi/xgbutil/xprop
-# github.com/aarzilli/nucular v0.0.0-20200615134801-81910c722bba
+# github.com/aarzilli/nucular v0.0.0-20210408133902-d3dd7b05a80a
## explicit
github.com/aarzilli/nucular
github.com/aarzilli/nucular/clipboard
@@ -63,13 +76,22 @@ github.com/aarzilli/nucular/internal/assets
github.com/aarzilli/nucular/label
github.com/aarzilli/nucular/rect
github.com/aarzilli/nucular/style
-# github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72
+# github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211213063430-748e38ca8aec
+## explicit
github.com/go-gl/glfw/v3.3/glfw
-# github.com/golang/freetype v0.0.0-20161208064710-d9be45aaf745
+github.com/go-gl/glfw/v3.3/glfw/glfw/deps
+github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad
+github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw
+github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008
+github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW
+github.com/go-gl/glfw/v3.3/glfw/glfw/src
+# github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
+## explicit
github.com/golang/freetype
github.com/golang/freetype/raster
github.com/golang/freetype/truetype
-# github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad
+# github.com/hashicorp/golang-lru v0.5.4
+## explicit
github.com/hashicorp/golang-lru
github.com/hashicorp/golang-lru/simplelru
# github.com/lawl/pulseaudio v0.0.0-20210928141934-ed754c0c6618
@@ -78,11 +100,12 @@ github.com/lawl/pulseaudio
# github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
## explicit
github.com/syndtr/gocapability/capability
-# golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
+# golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
## explicit
golang.org/x/crypto/ed25519
golang.org/x/crypto/ed25519/internal/edwards25519
-# golang.org/x/exp v0.0.0-20191224044220-1fea468a75e9
+# golang.org/x/exp v0.0.0-20220104160115-025e73f80486
+## explicit
golang.org/x/exp/shiny/driver
golang.org/x/exp/shiny/driver/gldriver
golang.org/x/exp/shiny/driver/internal/drawer
@@ -98,13 +121,15 @@ golang.org/x/exp/shiny/driver/mtldriver/internal/coreanim
golang.org/x/exp/shiny/driver/windriver
golang.org/x/exp/shiny/driver/x11driver
golang.org/x/exp/shiny/screen
-# golang.org/x/image v0.0.0-20200618115811-c13761719519
+# golang.org/x/image v0.0.0-20211028202545-6944b10bf410
+## explicit
golang.org/x/image/draw
golang.org/x/image/font
golang.org/x/image/font/sfnt
golang.org/x/image/math/f64
golang.org/x/image/math/fixed
-# golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028
+# golang.org/x/mobile v0.0.0-20220104184238-4a8be17bd2e3
+## explicit
golang.org/x/mobile/event/key
golang.org/x/mobile/event/lifecycle
golang.org/x/mobile/event/mouse
@@ -112,10 +137,12 @@ golang.org/x/mobile/event/paint
golang.org/x/mobile/event/size
golang.org/x/mobile/geom
golang.org/x/mobile/gl
-# golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9
+# golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
+## explicit
+golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/text v0.3.0
+# golang.org/x/text v0.3.7
golang.org/x/text/encoding
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/internal